Skip to main content

NFTAttributes

@nevermined-io/sdk - v3.0.44 / NFTAttributes

Class: NFTAttributes

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NFTAttributes(): NFTAttributes

Returns

NFTAttributes

Inherited from

AssetAttributes.constructor

Properties

appId

Optional appId: string

Unique identifier of the application/domain/vertical where the asset belong to. That asset association typically helps to search and filter between assets part of a domain via Marketplace API

Inherited from

AssetAttributes.appId

Defined in

src/models/AssetAttributes.ts:48


cap

Optional cap: bigint

Max number of nfts that can be minted, 0 means uncapped

Defined in

src/models/NFTAttributes.ts:213


encryptionMethod

Optional encryptionMethod: EncryptionMethod

When an asset is published in a Nevermined network, some internal Metadata attributes are encrypted so they can't be accessed. This method allows to specify the encryption method to be used.

See

EncryptionMethod

Inherited from

AssetAttributes.encryptionMethod

Defined in

src/models/AssetAttributes.ts:21


ercType

ercType: ERCType

The type of ERC used (721 or 1155)

See

Defined in

src/models/NFTAttributes.ts:176


fulfillAccessTimelock

Optional fulfillAccessTimelock: number

An asset can offer different services. Each service can have different conditions that need to be fulfilled to provide that service. These conditions can expire if they are not fulfilled in a certain period of time. This attribute allows to specify a period of time the condition can not be fullfilled Setting up a timelock of 0 means that the condition can be fulfilled at any time. Setting a timelock greater than 0 means that the condition can not be fulfilled until that number of blocks after the agreement is created are mined. This would allow to create an agreement that can not fulfilled until certain period of time.

Inherited from

AssetAttributes.fulfillAccessTimelock

Defined in

src/models/AssetAttributes.ts:68


fulfillAccessTimeout

Optional fulfillAccessTimeout: number

An asset can offer different services. Each service can have different conditions that need to be fulfilled to provide that service. These conditions can expire if they are not fulfilled in a certain period of time. This attribute allows to specify the timeouts for the access condition associated to the service. Setting up a timeout of 0 means that the condition will never expire. Setting a timeout greater than 0 means that the condition will expire after that number of blocks after the agreement is created. This would allow to create an agreement that is not fulfilled after a certain period of time, the user can claim back funds locked if the condition is any.

Inherited from

AssetAttributes.fulfillAccessTimeout

Defined in

src/models/AssetAttributes.ts:58


metadata

metadata: MetaData

Metadata describing the asset

See

MetaData

Inherited from

AssetAttributes.metadata

Defined in

src/models/AssetAttributes.ts:14


nft

Optional nft: NFTServiceAttributes

Attributes related with the NFT service (access or sales)

Defined in

src/models/NFTAttributes.ts:193


nftContractAddress

nftContractAddress: string

The address of the deployed NFT Contract

Defined in

src/models/NFTAttributes.ts:188


nftMetadataUrl

Optional nftMetadataUrl: string

URL to the metadata definition of the NFT contract

Defined in

src/models/NFTAttributes.ts:208


nftType

nftType: NeverminedNFTType

The Nevermined implementation of the NFT used. A part of what type of ERC is based, Nevermined provides different NFT implementations to fit in different scenarios. This attribute allow to specify between the different Nevermined NFT types

Defined in

src/models/NFTAttributes.ts:183


preMint

Optional preMint: boolean

If the asset is pre-minted

Defined in

src/models/NFTAttributes.ts:203


predefinedAssetServices

Optional predefinedAssetServices: ServiceCommon[]

List of additional asset services to be included as part of an asset

See

Service

Inherited from

AssetAttributes.predefinedAssetServices

Defined in

src/models/AssetAttributes.ts:33


providers

Optional providers: string[]

A provider of an asset identify the public address of an account with some privileges over that asset. Typically these permissions are granted to Nevermined Nodes to allow them to give access to some services without the direct interaction of the final user. Here a user publishing an asset can define a list of all the addresses with these permissions. Typically just the address of one Nevermined Node trusted by the user.

Inherited from

AssetAttributes.providers

Defined in

src/models/AssetAttributes.ts:42


royaltyAttributes

Optional royaltyAttributes: RoyaltyAttributes

Attributes describing the royalties attached to the NFT in the secondary market

Defined in

src/models/NFTAttributes.ts:198


services

Optional services: ServiceAttributes[]

List of services and their attributes offered by an asset.

See

ServiceAttributes

Inherited from

AssetAttributes.services

Defined in

src/models/AssetAttributes.ts:27


defaultValues

Static defaultValues: Object

Type declaration

NameType
appIdstring
capbigint
encryptionMethodEncryptionMethod
fulfillAccessTimelocknumber
fulfillAccessTimeoutnumber
nft{ amount: bigint ; duration: number = 0; isSubscription: boolean = false; maxCreditsToCharge: bigint ; minCreditsRequired: bigint ; minCreditsToCharge: bigint ; nftTransfer: boolean = true; serviceType: ServiceType ; tokenId: string = '' }
nft.amountbigint
nft.durationnumber
nft.isSubscriptionboolean
nft.maxCreditsToChargebigint
nft.minCreditsRequiredbigint
nft.minCreditsToChargebigint
nft.nftTransferboolean
nft.serviceTypeServiceType
nft.tokenIdstring
nftMetadataUrlstring
preMintboolean
predefinedAssetServicesServiceCommon[]
providersnever[]
royaltyAttributesundefined
services{ price: AssetPrice ; serviceType: ServiceType }[]

Overrides

AssetAttributes.defaultValues

Defined in

src/models/NFTAttributes.ts:215

Methods

getCreditsSubscriptionInstance

getCreditsSubscriptionInstance(nftAttributes): Required\<NFTAttributes>

Parameters

NameType
nftAttributesPartial\<NFTAttributes>

Returns

Required\<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:246


getInstance

getInstance(nftAttributes): Required\<NFTAttributes>

Parameters

NameType
nftAttributesPartial\<NFTAttributes>

Returns

Required\<NFTAttributes>

Overrides

AssetAttributes.getInstance

Defined in

src/models/NFTAttributes.ts:224


getNFT1155Instance

getNFT1155Instance(nftAttributes): Required\<NFTAttributes>

Parameters

NameType
nftAttributesPartial\<NFTAttributes>

Returns

Required\<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:235


getNFT721Instance

getNFT721Instance(nftAttributes): Required\<NFTAttributes>

Parameters

NameType
nftAttributesPartial\<NFTAttributes>

Returns

Required\<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:263


getPOAPInstance

getPOAPInstance(nftAttributes): Required\<NFTAttributes>

Parameters

NameType
nftAttributesPartial\<NFTAttributes>

Returns

Required\<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:289


getSoulBoundInstance

getSoulBoundInstance(nftAttributes): Required\<NFTAttributes>

Parameters

NameType
nftAttributesPartial\<NFTAttributes>

Returns

Required\<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:301


getSubscriptionInstance

getSubscriptionInstance(nftAttributes): Required\<NFTAttributes>

Parameters

NameType
nftAttributesPartial\<NFTAttributes>

Returns

Required\<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:274