EluvioLive
EluvioLive is an application platform built on top of the Eluvio Content Fabric. It provides a consumer-facing marketplace for digital content: live performances, digital collectibles, etc.
This SDK provides tools for working with EluvioLive APIs and services.
Constructor
Instantiate the EluvioLive SDK
Returns: New EluvioLive object connected to the specified content fabric and blockchain
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
configUrl | string | ✓ | The Content Fabric configuration URL |
mainObjectId | string | ✓ | The top-level Eluvio Live object ID |
AccountShow
Show info about this account.
AddMinter
addr,
mintAddr
})
Add a minter to NFT or ElvToken
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT/ElvToken contract address |
mintAddr | string | ✓ | The address of the minter (key or helper contract) |
AdminHealth
Get Admin API status from Authority Service
Returns: The API Response for the adm/health api
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
host | string | ✓ | Authority Service url (Optional) |
ASNFTRedeemOffer
addr,
offerId
})
Redeem an nft offer using the Authority Service
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
offerId | string | ✓ | The Offer ID |
AsNftTransfer
addr,
tokenId
}) → Promise.<Object>
Transfer the specified NFT token as the owner using Authority Service
Returns: NFT info JSON
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | Local NFT contract address |
tokenId | integer | ✓ | External NFT token ID |
CheckIsOwner
addr,
tokenId
})
Checks if the current signer address owns the NFT token. Throws error if not owner.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | Local NFT contract address |
tokenId | integer | ✓ | External NFT token ID |
ContentClearPolicy
Get the content object policy from the Object metadata and the delegate from the Object's contract meta
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The NFT object ID |
ContentGetPolicy
Get the content object policy from the Object metadata and the delegate from the Object's contract meta
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The NFT object ID |
ContentSetPolicy
objectId,
policyPath,
data
})
Sets the content object policy
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The NFT object ID |
policyPath | string | ✓ | Path to the content policy file (eg. policy.yaml). |
data | string | ✓ | Metadata path within the policy object to link to |
ContentSetPolicyDelegate
objectId,
delegateId
})
Sets the content object policy
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The NFT object ID |
delegateId | string | ✓ | Path to the content policy file (eg. policy.yaml). |
CreateNftContract
tenantId,
minterAddr,
mintHelperAddr,
collectionName,
collectionSymbol,
contractUri,
proxyAddress,
totalSupply,
hold
}) → Promise.<Object>
Create a new NFT contract (ElvTradable, ERC-721-based) and set it up for this tenant
- create a new contract
- add minter
- add NFT address to tenant 'tenant_nfts' group
TODO: preflight - ensure signer is a tenant admin
Returns: New contract address
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The tenant ID |
minterAddr | string | ✓ | Address of the minter (hex format) (Optional, Default uses tenant minter config) |
mintHelperAddr | string | ✓ | Address of the mint helper (hex format) (Optional, Default uses tenant minter config) |
collectionName | string | ✓ | Short name for the ERC-721 contract |
collectionSymbol | string | ✓ | Short string for the ERC-721 contract |
contractUri | string | ✓ | URI for the ERC-721 contract |
proxyAddress | string | ✓ | Proxy address for the ERC721 contract (Optional, Default uses tenant minter config) |
totalSupply | number | ✓ | the mint cap for this template (should be called 'cap') |
hold | number | ✓ | the hold period (seconds) |
CreateNftTransferProxy
Create a new NFT TransferProxy contract
Returns: New contract address
CreateWalletAccount
email,
tenant,
callbackUrl,
onlyCreateAccount,
onlySendEmail,
scheduleAt
}) → Promise.<Object>
create account for tenant
Returns: The API Response containing created account info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email | string | ✓ | The email to create, or @filename to read a list of emails from file |
tenant | string | ✓ | The Tenant ID |
callbackUrl | string | ✓ | The base URL info for the link in the email |
onlyCreateAccount | boolean | ✓ | only create the account |
onlySendEmail | boolean | ✓ | only send email, do not create the account |
scheduleAt | string | ✓ | when to schedule the email |
Domains
Get the list of domains from the Main Live Object info/domains_map
Returns: List of domain objects
FabricTenantBalanceOf
objectId,
ownerAddr
}) → Promise.<Object>
Get a list of the NFTs of this tenant owned by 'ownerAddr'
Returns: Number of tokens owned
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The ID of the tenant specific EluvioLive object |
ownerAddr | string | ✓ | A user address to check the balance of |
IsMinter
addr,
mintAddr
})
check if minter to NFT or ElvToken
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT/ElvToken contract address |
mintAddr | string | ✓ | The address of the minter (key or helper contract) |
List
tenantId,
tenantSlug
}) → Promise.<Object>
Get the list of Tenant marketplaces/sites from the Main Live Object No Tenant ID or Tenant Slug will return all tenants.
Returns: List or single Tenant Info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The Tenant ID (Optional). |
tenantSlug | string | ✓ | The Tenant ID (Optional). No Tenant ID will return all tenants. |
NFTAddRedeemableOffer
Add a redeemable offer to the NFT contract
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
NftBalanceOf
addr,
ownerAddr
}) → Promise.<Object>
Get the NFT balance for a given user address
Returns: Number of tokens owned
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
ownerAddr | string | ✓ | A user address to check the balance of |
NftBuild
library,
hash,
nftDir
}) → Promise.<Object>
Set the public/nft section based on asset metadata
For generative NFTs we use the following convention - nftDir must contain: One or more json files with a '.json' extension (for example: nft001.json, nft002.json) Example JSON File:
{ "count":3, (OPTIONAL, Default: 1) "name": "Example NFT", (OPTIONAL, Default: from Content Object) "display_name": "Example NFT", (OPTIONAL, Default: from Content Object) "description" : "This is an example NFT.", (OPTIONAL, Default: from Content Object) "rich_text" : "", (OPTIONAL, Default: from Content Object) "image": "https://image003", "embed_url":"https://videoURL003", "attributes:": [ { "trait_type":"trait01", "value": "test1", "rarity": 0.2 (OPTIONAL, If not present, it will be calculated) } ] }
The 'count' is an optional parameter to generate copies of this nft element inside the /public/nfts array
All other optional keys (name, display_name, description, etc) will override the NFT content object's value from /asset_metadata/nft if present.
The required key 'attributes' is an array of objects {"trait_type": "", "value": ""} and is used to calculate trait rarity. If rarity is already present in the attribute, it will be used instead.
Returns: The public/nft or public/nfts JSON
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
library | string | ✓ | ID |
hash | string | ✓ | The NFT Template hash or id |
nftDir | string | ✓ | Directory containing nft json file(s) for building nfts |
NftBurn
addr,
tokenId
}) → Promise.<Object>
Burn the specified NFT token as the owner
Returns: NFT info JSON
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | Local NFT contract address |
tokenId | integer | ✓ | External NFT token ID |
NftGetPolicyAndPermissions
Gets the nft policy and permissions for a given contract
Returns: object containing the policy string and the list of addresses from nft metadata
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
nftAddress | string | ✓ | The NFT contract address. Can also be iqXXX format. |
NftGetTransferFee
Gets the baseTransferFee of the NFT Contract
Returns: The fee as a big number sring
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
address | string | ✓ | The NFT contract address |
NFTIsOfferActive
addr,
offerId
})
Returns true if offer is active (has not been removed)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
offerId | string | ✓ | The Offer ID |
NFTIsOfferRedeemed
addr,
offerId
})
Returns true if offer is redeemed
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
offerId | string | ✓ | The Offer ID |
NftLookup
addr,
tokenId
}) → Promise.<Object>
Set the public/nft section based on asset metadata
Returns: NFT info JSON
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | Local NFT contract address |
tokenId | integer | ✓ | External NFT token ID |
NftMake
Make the public/nft section based on asset metadata Prerequisites:
- NFT contract set
Returns: The public/nft JSON
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
assetMetadata | Object | ✓ | The NFT Template asset metadata |
NftMakeGenerative
assetMetadata,
hash,
imagePath,
attrs,
rarity
}) → Promise.<Object>
Make a single element of the public/nfts section of a generative, multi image/video token based on asset metadata and input parameters. The public/nfts key is an array of objects, each equivalent to the single NFT public/nft section.
Prerequisites:
- NFT contract set
Returns: The public/nfts JSON array element
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
assetMetadata | Object | ✓ | The NFT Template asset metadata |
hash | string | ✓ | NFT Template hash |
imagePath | string | ✓ | Local file path to the image |
attrs | Object | ✓ | Extra attributes for this token |
rarity | Object | ✓ | Stats for each trait and value |
NftPackGetDist
Pack - retrieve pack spec and pack distribtion from an NFT Template using authd tenant-authenticated pack APIs. The spec and distribition are saved in JSON files.
Returns: file names where spec and dist are saved
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
versionHash | string | ✓ | NFT Template object hash |
NftPackSetDist
Pack - set a previously created pack distribution in pack object metadata
Returns: The new object info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
versionHash | string | ✓ | NFT Template content hash |
NftProxyBurn
addr,
tokenId
}) → Promise.<Object>
Burn the specified NFT token as a proxy owner
Returns: NFT info JSON
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | Local NFT contract address |
tokenId | integer | ✓ | External NFT token ID |
NftProxyTransferFrom
addr,
fromAddr,
toAddr,
tokenId
}) → Promise.<Object>
Transfer an NFT as a proxy owner.
Returns: ?
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
fromAddr | string | ✓ | The current owner of the token |
toAddr | string | ✓ | A user address to tranfer to |
tokenId | integer | ✓ | The token ID |
NFTRedeemOffer
addr,
offerId
})
Redeem an nft offer using the contract directly
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
offerId | string | ✓ | The Offer ID |
NFTRefresh
tenant,
maxNumber
}) → Promise.<Object>
Synchronize backend listings with fabric metadata for a specific tenant's NFT
Returns: The API Response containing list of Wallet Info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
maxNumber | integer | ✓ | The address to mint to |
NFTRemoveRedeemableOffer
Remove a redeemable offer from the NFT contract
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
NftSetPolicyAndPermissions
objectId,
policyPath,
addresses,
clearAddresses // optional
})
Sets the nft policy and permissions for a given object throws error if something goes wrong.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The NFT object ID |
policyPath | string | ✓ | Path to the policy file (eg. nft_owner_minter.yaml). Note that the policy must contain the minter address |
addresses | Array.<string> | ✓ | Array of addresses to set the policy permissions |
clearAddresses | boolean | Clear existing permissions by writing an empty address list before applying the new ones (default:false) |
NftSetPolicyAndPermissionsBatch
objectIds,
policyPath,
addresses,
clearAddresses // optional
}) → object
Batch version of NftSetPolicyAndPermissions.
Sets the same policy and permissions to a list of objects. Objects are processed in batches: within a batch all transactions are submitted sequentially (noce safety)
Returns: { succeeded: string[], failed: {objectId, error}[] }
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectIds | Array.<string> | ✓ | The NFT object IDs (iq__... or hex address) |
policyPath | string | ✓ | Path to the policy file (eg. nft_owner_minter.yaml). Note that the policy must contain the minter address |
addresses | Array.<string> | ✓ | Array of addresses to set the policy permissions |
clearAddresses | boolean | Clear existing permissions by writing an empty address list before applying the new ones (default:false) |
NftSetTransferFee
address,
fee
}) → Promise.<Object>
Sets the baseTransferFee of the NFT Contract
Returns: The Contract transaction logs
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
address | string | ✓ | The NFT contract address |
fee | string | ✓ | Fee in ETH to set as a big number string |
NftSetTransferProxy
addr,
proxyAddress
}) → Promise.<Object>
Set a TransferProxy for this NFT contract. If no proxy address is specified, create a new one. Must be run as the NFT contract owner.
Returns: New contract address
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT Transfer Proxy contract address |
proxyAddress | string | ✓ | The address of the proxy contract (optional) |
NftShow
addr,
mintHelper,
minter,
proxyAddr,
showOwners,
showOwnersViaContract,
includeEmail,
tokenId
}) → Promise.<Object>
Show info about this NFT
Returns: An object containing NFT info, including 'warnings'
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
mintHelper | string | ✓ | Warn if this is not a minter for the NFT contract (hex) |
minter | string | ✓ | Warn if this is not the owner of the mint helper contract (hex) |
proxyAddr | string | ✓ | proxy owner address |
showOwners | integer | ✓ | Enumerate all token owners using a fast indexed query. Only used if tokenId is undefined. |
showOwnersViaContract | integer | ✓ | Enumerate all token info up to the given amount. Only used if tokenId is undefined. |
includeEmail | string | ✓ | Include email address for owners, as bound to the given tenant ID. Only used if tokenId is undefined. |
tokenId | integer | ✓ | The token ID to show info for. This will take precedence over showOwners |
NftShowToken
addr,
tokenId
}) → Promise.<Object>
Show info on one token in the NFT contract
Returns: An object containing token info, including 'warnings'
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT contract address |
tokenId | integer | ✓ | The token ID |
NftTemplateAddNftContract
objectId,
nftAddr,
collectionName,
collectionSymbol,
hold,
contractUri,
totalSupply
}) → Promise.<Object>
Create a new NFT contract and set it in the NFT Template object's metadata.
Returns: An object containing info about the new NFT
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The ID of the NFT Template |
nftAddr | string | ✓ | The NFT contract address (optional; by default create one) |
collectionName | string | ✓ | Short name for the ERC-721 contract |
collectionSymbol | string | ✓ | Short string for the ERC-721 contract |
hold | string | ✓ | Hold period in seconds |
contractUri | string | ✓ | URI for the ERC-721 contract |
totalSupply | string | ✓ | the mint cap for this template (should be called 'cap') |
NftTransfer
addr,
tokenId
}) → Promise.<Object>
Transfer the specified NFT token as the owner through contract
Returns: NFT info JSON
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | Local NFT contract address |
tokenId | integer | ✓ | External NFT token ID |
readNftDir
Read image and attributes info from a directory
Required format:
- the directory should contain a list of '*.json' files (flat, not in a hierarchy) Returns an array of objects containing:
- imgFile - file name (no path)
- imgFilePath - full path to source file
- attrs - attributes object (optional)
Returns: The 'images' object and calculated rarity
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
nftDir | string | ✓ | the directory containing the nft json files |
RenounceMinter
Renounce the minter(msg.sender) from NFT or ElvToken
ShowMintHelper
Show NFT mint helper info
Returns: Mint helper info object
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The mint helper contract address |
ShowNftTransferProxy
Show NFT Transfer Proxy info
Returns: Proxy info object
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
addr | string | ✓ | The NFT Transfer Proxy contract address |
SiteSetDrop
libraryId,
objectId,
uuid,
start,
end,
endVote,
startMint,
newUuid,
update
}) → Promise.<Object>
Set start dates for a drop event (all stages)
Returns: An object containing new drop info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | The 'properties' library ID |
objectId | string | ✓ | The ID of the site object |
uuid | string | ✓ | UUID of the drop (a site may contain multiple) |
start | string | ✓ | the start date of the event |
end | string | ✓ | the end date of the event (optional) |
endVote | string | ✓ | the start date of the post vote stage (optional) |
startMint | string | ✓ | the start date of the mint stage (optional) |
newUuid | boolean | ✓ | create a new UUID for the drop (optional) |
update | string | ✓ | Tenant-level EluvioLive object ID, to update |
SiteShow
libraryId,
objectId
}) → Promise.<Object>
Show info about this site (event)
Returns: An object containing site info, including 'warnings'
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | The 'properties' library ID |
objectId | string | ✓ | The ID of the site object |
TenantAddNft
tenantId,
nftAddr
})
Add an NFT contract to the tenant's 'tenant_nfts' group
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
nftAddr | string | ✓ | = The address of the NFT contract (hex format) |
TenantBalanceOf
tenantId,
ownerAddr,
maxNumber
}) → Promise.<Object>
Get a list of the NFTs of this tenant owned by 'ownerAddr'
Returns: Number of tokens owned
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
ownerAddr | string | ✓ | A user address to check the balance of |
maxNumber | integer | ✓ | Max number of NFTs returned |
TenantCreateMinterConfig
Create minter configuration using the authority service
Returns: The API Response for the request
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
TenantDeleteMinterConfig
Delete minter configuration using the authority service
Returns: The API Response for the request
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
TenantDeployHelperContracts
Deploy minter helper contract using the authority service
Returns: The API Response for the request
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
TenantGetMinterConfig
Get minter configuration from authority service
Returns: The API Response for the tenant's minter configuration
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
TenantGroupInfo
Show group info about this tenant.
TenantHasNft
tenantId,
nftAddr
})
Returns true if an NFT contract is in the tenant's 'tenant_nfts' group
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
nftAddr | string | ✓ | = The address of the NFT contract (hex format) |
TenantMint
tenant,
marketplace,
sku,
addr
}) → Promise.<Object>
Mint an NFT using Tenant Auth
Returns: API Response Object
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
marketplace | string | ✓ | Marketplace ID of the NFT |
sku | string | ✓ | SKU of the NFTs |
addr | string | ✓ | The address to mint to |
TenantNftList
Returns list of NFT contracts in the tenant's 'tenant_nfts' group
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
TenantPathAuthServiceRequest
path,
method,
queryParams,
headers
}) → Promise.<Object>
Authority Service API request using path auth. Typically used for GET and DELETE
Returns: The API Response
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path | string | ✓ | The request endpoint |
method | string | ✓ | The rquest method |
queryParams | Object | ✓ | The query parameters |
headers | Object | ✓ | The headers |
TenantPrimarySales
tenant,
marketplace
}) → Promise.<Object>
Get primary sales history for the tenant
Returns: The API Response containing primary sales info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
marketplace | string | ✓ | The marketplace ID |
TenantPublishData
tenant,
host,
contentHash,
updateLinks,
env
}) → Promise.<Object>
Submits a new content version hash of this account's Tenant Object for updating to the Eluvio Live Tree.
Returns: The API Response for the request
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
host | string | ✓ | Authority Service url (Optional) |
contentHash | string | ✓ | Version hash of the new Tenant Object to submit |
updateLinks | boolean | ✓ | True to update links |
env | string | ✓ | Environment to update -- "production" or "staging", default production |
TenantPublishPrivate
tenant,
host,
env
}) → Promise.<Object>
Submits info to authd about the existence of a private (non-media-wallet-enabled) tenant. The key reason for this is to allow the tenant to get its DB tables initialized.
Returns: The API Response for the request
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
host | string | ✓ | Authority Service url (Optional) |
env | string | ✓ | Environment to update -- "production" or "staging", default production |
TenantRemoveNft
tenantId,
nftAddr
})
Remove an NFT contract from the tenant's 'tenant_nfts' group
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
nftAddr | string | ✓ | = The address of the NFT contract (hex format) |
TenantReplaceMinterConfig
Replaces minter configuration using the authority service
Returns: The API Response for the request
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
TenantSecondarySales
Get secondary sales history for the tenant
Returns: The API Response containing primary sales info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
TenantSessionsCsv
tenant,
start_ts,
end_ts
}) → Promise.<Object>
Fetch session data from the analytics API for a tenant
Returns: The API Response containing session csv info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
start_ts | int | ✓ | Start timestamp in seconds since epoch |
end_ts | int | ✓ | End timestamp in seconds since epoch |
TenantSetTokenURI
requestType,
tenantId,
contractAddress,
tokenURI,
tokenId,
host,
csv
}) → Promise.<Object>
Set the Token URI for an NFT. Currently only setting one and a time. Will support types, single, batch and all.
Returns: An object containing tenant info, including 'warnings'
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
requestType | string | ✓ | The type of request: single, batch, all |
tenantId | string | ✓ | The ID of the tenant (iten***) |
contractAddress | string | ✓ | The NFT contract address |
tokenURI | string | ✓ | The new token URI |
tokenId | int | ✓ | The NFT token ID |
host | string | ✓ | The host to use for the request, undefined to use config |
csv | string | ✓ | The CSV file to use for the request, undefined to use config |
TenantShow
Show info about this tenant. Currently only listing NFT marketplaces.
Returns: An object containing tenant info, including 'warnings'
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
TenantTicketsGenerate
tenant,
otp,
otpClass,
quantity,
emails,
embedUrlBase
}) → Promise.<Object>
Generate tickets (NTP) as a tenant.
Tickets may be bound to emails - in this case, the list of emails has to be supplied as an argument, and the 'quantity' is no longer allowed.
Note that technically tickets can be bound to any user identifier. Emails are the most common but other IDs such as usernames or oauth/openid subject IDs are also used, so there is no required format for the strings in the file.
Optionally creates embed URLs for each ticket code generated, based on a template URL that contains all required embed URL parameters except for the ticket and optionally email.
Returns: Tickets API Response Object
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
otp | string | ✓ | The OTP ID |
otpClass | integer | ✓ | The OTP class (4 or 5) (default 5) |
quantity | integer | ✓ | Number of tickets to generate |
emails | string | ✓ | File containing one email per line |
embedUrlBase | string | ✓ | Base embed URL, used to generate embed URLs for each ticket |
TenantTransferFailures
Get failed transfer report for the tenant. Used to identify payments collected on failed transfers.
Returns: The API Response containing the failed transfers report
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
TenantUnifiedSales
Get unified primary&secondary sales history for the tenant
Returns: The API Response containing primary sales info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
TenantUpdateTokenURI
tenantId,
contractAddress,
hash,
dryRun
}) → Promise.<Object>
Update all token URIs for a given contract to the new hash provided as argument.
Returns: An object containing operation result
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | Tenant ID (iten format) |
contractAddress | string | ✓ | The NFT contract address |
hash | string | ✓ | The new NFT template object hash |
dryRun | bool | ✓ | Dry run flag (default 'true') |
TenantWallets
tenant,
maxNumber
}) → Promise.<Object>
Get the list of wallets bound by the Tenant
Returns: The API Response containing list of Wallet Info
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant | string | ✓ | The Tenant ID |
maxNumber | integer | ✓ | The address to mint to |