Methods
(inner) collectRoyaltyForReleaseViaHub(client, releasePublicKey, hubPublicKey) → {Object}
Collects royalties on a releaase via Hub Dashboard.
Name | Type | Description |
---|---|---|
client | Object | The Nina Client. |
releasePublicKey | String | The public key of the Release. |
hubPublicKey | String | The public key of the Hub. |
- Source
Hub Release, recipient, paymentMint.
- Type:
- Object
const royalty = await NinaClient.Hub.collectRoyaltyForReleaseViaHub(ninaClient, releasePublicKey, hubPublicKey);
(inner) fetch(publicKeyOrHandle, withAccountDataopt)
Fetches a Hub along with its Releases, Collaborators, and Posts.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
publicKeyOrHandle | String | The public key or handle of the Hub account. | ||
withAccountData | Boolean | <optional> | false | Include full on-chain Hub, HubRelease, HubPost, HubContent, HubCollaborator, Release, and Post accounts. |
- Source
const hub = await NinaClient.Hub.fetch('ninas-picks');
(inner) fetchAll(paginationopt, withAccountDataopt)
Fetches all hubs.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pagination | Object | <optional> | {limit: 20, offset: 0, sort: 'desc'} | Pagination options. |
withAccountData | Boolean | <optional> | false | Include full on-chain Hub accounts. |
- Source
const hubs = await NinaClient.Hub.fetchAll();
(inner) fetchCollaborator(publicKeyOrHandle, withAccountDataopt)
Fetches a Collaborator by Publickey.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
publicKeyOrHandle | String | The public key or handle of the Hub account. | ||
withAccountData | Boolean | <optional> | false | Include full on-chain HubCollaborator accounts. |
- Source
const collaborators = await NinaClient.Hub.fetchCollaborators('ninas-picks');
(inner) fetchCollaborators(publicKeyOrHandle, withAccountDataopt, paginationopt)
Fetches the Collaborators of a Hub.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
publicKeyOrHandle | String | The public key or handle of the Hub account. | ||
withAccountData | Boolean | <optional> | false | Include full on-chain HubCollaborator accounts. |
pagination | Object | <optional> | {limit, offset, sort} | Pagination options. |
- Source
const collaborators = await NinaClient.Hub.fetchCollaborators('ninas-picks');
(inner) fetchHubPost(publicKeyOrHandle, hubPostPublicKey, withAccountDataopt)
Fetches a hubPost
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
publicKeyOrHandle | String | The public key or handle of the Hub. | ||
hubPostPublicKey | String | The public key of the HubPost. | ||
withAccountData | Boolean | <optional> | false | Include full on-chain HubPost, HubContent, and Post accounts. |
- Source
const hubPost = await NinaClient.Hub.fetchHubPost('ninas-picks', 'H2aoAZfxbQX6s77yj31Duy7DiJnJcN3Gg1HkA2VuvNUZ');
(inner) fetchHubRelease(publicKeyOrHandle, hubReleasePublicKey, withAccountDataopt)
Fetches a Release for a Hub.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
publicKeyOrHandle | String | The public key or handle of the Hub. | ||
hubReleasePublicKey | String | The public key of the HubRelease. | ||
withAccountData | Boolean | <optional> | false | Include full on-chain HubPost, HubContent, and Post accounts. |
- Source
const hubRelease = await NinaClient.Hub.fetchHubRelease('ninas-picks', 'H2aoAZfxbQX6s77yj31Duy7DiJnJcN3Gg1HkA2VuvNUZ);
(inner) fetchPosts(publicKeyOrHandle, withAccountDataopt, paginationopt)
Fetches Posts for a hub.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
publicKeyOrHandle | String | The public key or handle of the Hub account. | ||
withAccountData | Boolean | <optional> | false | Include full on-chain HubPost, HubContent, and Post accounts. |
pagination | Object | <optional> | {limit, offset, sort} | Pagination options. |
- Source
const posts = await NinaClient.Hub.fetchPosts('ninas-picks');
(inner) fetchReleases(publicKeyOrHandle, withAccountDataopt, paginationopt)
Fetches Releases for a Hub.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
publicKeyOrHandle | String | The public key or handle of the Hub account. | ||
withAccountData | Boolean | <optional> | false | Include full on-chain HubRelease, HubContent, and Release accounts. |
pagination | Object | <optional> | {limit, offset, sort} | Pagination options. |
- Source
const releases = await NinaClient.Hub.fetchReleases('ninas-picks');
(inner) fetchSubscriptions(publicKeyOrHandle, paginationopt)
Fetches the subscriptions for a Hub.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
publicKeyOrHandle | String | The public key or handle of the Hub account. | ||
pagination | Object | <optional> | {limit, offset, sort} | Pagination options. |
- Source
const subscriptions = await NinaClient.Hub.fetchSubscriptions("ninas-picks");
(inner) hubAddCollaborator(client, hubPublicKey, collaboratorPubkey, canAddContent, canAddCollaborator, allowance) → {Object}
Adds a collaborator to a Hub.
Name | Type | Description |
---|---|---|
client | Object | The NinaClient. |
hubPublicKey | String | The public key of the Hub account. |
collaboratorPubkey | String | The public key of the collaborator account. |
canAddContent | Boolean | Boolean indicating if the collaborator can add content to the Hub. |
canAddCollaborator | Boolean | Boolean indicating if the collaborator can add collaborators to the Hub. |
allowance | Integer | integer indicating the amount of Hub actions the collaborator can execute (-1 for unlimited). |
- Source
Collaborator
- Type:
- Object
(inner) hubAddRelease(client, hubPublicKey, releasePublicKey, fromHubopt) → {Object}
Adds a Release to a Hub.
Name | Type | Attributes | Description |
---|---|---|---|
client | Object | The NinaClient. | |
hubPublicKey | String | ||
releasePublicKey | String | ||
fromHub | String | <optional> |
- Source
The Hub Release Data
- Type:
- Object
(inner) hubContentToggleVisibility(client, hubPublicKey, contentAccountPublicKey, type) → {Object}
Toggles the visibility of a piece of content on a Hub.
Name | Type | Description |
---|---|---|
client | Object | The NinaClient. |
hubPublicKey | String | Pulic key of the content's Hub. |
contentAccountPublicKey | String | Pubkey of the content account. |
type | String | Should be either 'Release' or 'Post'. |
- Source
The HubChildPublicKey.
- Type:
- Object
const hub = await NinaClient.Hub.hubContentToggleVisibility(ninaClient, hubPublicKey, contentAccountPublicKey, 'Release');
(inner) hubInit(client, hubParams) → {Object}
Initializes a Hub account with Hub Credit.
Name | Type | Description |
---|---|---|
client | Object | The NinaClient. |
hubParams | Object | The Hub parameters. // NOTE: exand |
- Source
The created Hub account.
- Type:
- Object
const hub = await NinaClient.Hub.hubInit({})
(inner) hubRemoveCollaborator(client, hubPublicKey, collaboratorPubkey) → {Object}
Removes a collaborator from a Hub.
Name | Type | Description |
---|---|---|
client | Object | The NinaClient. |
hubPublicKey | String | |
collaboratorPubkey | String |
- Source
Collaborator
- Type:
- Object
(inner) hubUpdateCollaboratorPermission(client, hubPublicKey, collaboratorPubkey, canAddContent, canAddCollaborator, allowance) → {Object}
Updates the permissions of a collaborator on a Hub.
Name | Type | Description |
---|---|---|
client | Object | The NinaClient. |
hubPublicKey | String | The public key of the Hub account. |
collaboratorPubkey | String | The public key of the collaborator account. |
canAddContent | Boolean | Boolean indicating if the collaborator can add content to the Hub. |
canAddCollaborator | Boolean | Boolean indicating if the collaborator can add collaborators to the Hub. |
allowance | Integer | integer indicating the amount of Hub actions the collaborator can execute (-1 for unlimited). |
- Source
Collaborator
- Type:
- Object
const hub = await NinaClient.Hub.hubUpdateCollaboratorPermission(hubPublicKey, collaboratorPubkey, true, true, 10, wallet, connection);
(inner) hubUpdateConfig(client, hubPublicKey, uri, publishFee, referralFee) → {Object}
Updates the configuration of a Hub.
Name | Type | Description |
---|---|---|
client | Object | The NinaClient. |
hubPublicKey | String | The public key of the Hub account. |
uri | String | The URI of the Hubs updated metadata. |
publishFee | Number | |
referralFee | Number |
- Source
The updated Hub account.
- Type:
- Object
const hub = await NinaClient.Hub.hubUpdateConfig(hubPublicKey, 'https://nina.com', 0.1, 0.1, wallet, connection);
(inner) hubWithdraw(client, hubPublicKey) → {Object}
Withdraws Hub fees in Hub dashboard.
Name | Type | Description |
---|---|---|
client | Object | The Nina Client. |
hubPublicKey | String |
- Source
the Hub Public Key.
- Type:
- Object
const txid = await NinaClient.Hub.hubWithdraw(ninaClient, hubPublicKey);
(inner) postInitViaHub(hubPublicKey, slug, uri, referenceReleaseopt, fromHubopt) → {Object}
Creates a Post on a Hub.
Name | Type | Attributes | Description |
---|---|---|---|
hubPublicKey | String | The public key of the Hub. | |
slug | String | The slug of the Post. | |
uri | String | The URI of the Post. | |
referenceRelease | String | <optional> | The public key of the reference Release. |
fromHub | String | <optional> | The public key of the reference Hub. |
- Source
The Post and Referenced Release Public Key.
- Type:
- Object
const post = await NinaClient.Hub.postInitViaHub(ninaClient, hubPublicKey, slug, uri);
(inner) postUpdateViaHub(hubPublicKey, slug, uri, referenceReleaseopt, fromHubopt) → {Object}
Creates a Post on a Hub.
Name | Type | Attributes | Description |
---|---|---|---|
hubPublicKey | String | The public key of the Hub. | |
slug | String | The slug of the Post. | |
uri | String | The URI of the Post. | |
referenceRelease | String | <optional> | The public key of the reference Release. |
fromHub | String | <optional> | The public key of the reference Hub. |
- Source
The Post.
- Type:
- Object
const post = await NinaClient.Hub.postInitViaHub(ninaClient, hubPublicKey, slug, uri);