sdk-js

@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

Name Type
appId string
cap bigint
encryptionMethod EncryptionMethod
fulfillAccessTimelock number
fulfillAccessTimeout number
nft { amount: bigint ; duration: number = 0; isSubscription: boolean = false; maxCreditsToCharge: bigint ; minCreditsRequired: bigint ; minCreditsToCharge: bigint ; nftTransfer: boolean = true; serviceType: ServiceType ; tokenId: string = β€˜β€™ }
nft.amount bigint
nft.duration number
nft.isSubscription boolean
nft.maxCreditsToCharge bigint
nft.minCreditsRequired bigint
nft.minCreditsToCharge bigint
nft.nftTransfer boolean
nft.serviceType ServiceType
nft.tokenId string
nftMetadataUrl string
preMint boolean
predefinedAssetServices ServiceCommon[]
providers never[]
royaltyAttributes undefined
services { price: AssetPrice ; serviceType: ServiceType }[]

Overrides

AssetAttributes.defaultValues

Defined in

src/models/NFTAttributes.ts:215

Methods

getCreditsSubscriptionInstance

β–Έ getCreditsSubscriptionInstance(nftAttributes): Required<NFTAttributes>

Parameters

Name Type
nftAttributes Partial<NFTAttributes>

Returns

Required<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:246


getInstance

β–Έ getInstance(nftAttributes): Required<NFTAttributes>

Parameters

Name Type
nftAttributes Partial<NFTAttributes>

Returns

Required<NFTAttributes>

Overrides

AssetAttributes.getInstance

Defined in

src/models/NFTAttributes.ts:224


getNFT1155Instance

β–Έ getNFT1155Instance(nftAttributes): Required<NFTAttributes>

Parameters

Name Type
nftAttributes Partial<NFTAttributes>

Returns

Required<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:235


getNFT721Instance

β–Έ getNFT721Instance(nftAttributes): Required<NFTAttributes>

Parameters

Name Type
nftAttributes Partial<NFTAttributes>

Returns

Required<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:263


getPOAPInstance

β–Έ getPOAPInstance(nftAttributes): Required<NFTAttributes>

Parameters

Name Type
nftAttributes Partial<NFTAttributes>

Returns

Required<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:289


getSoulBoundInstance

β–Έ getSoulBoundInstance(nftAttributes): Required<NFTAttributes>

Parameters

Name Type
nftAttributes Partial<NFTAttributes>

Returns

Required<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:301


getSubscriptionInstance

β–Έ getSubscriptionInstance(nftAttributes): Required<NFTAttributes>

Parameters

Name Type
nftAttributes Partial<NFTAttributes>

Returns

Required<NFTAttributes>

Defined in

src/models/NFTAttributes.ts:274