import { MoveStructId } from '../types/index.mjs'; import { AccountAddressInput, AccountAddress } from '../core/accountAddress.mjs'; import { EndlessConfig } from './endlessConfig.mjs'; import { A as Account } from '../Ed25519Account-JTDdDAW6.mjs'; import { InputGenerateTransactionOptions } from '../transactions/types.mjs'; import { CreateCollectionOptions, PropertyType, PropertyValue } from '../internal/digitalAsset.mjs'; import { SimpleTransaction } from '../transactions/instances/simpleTransaction.mjs'; import '../utils/apiEndpoints.mjs'; import '../types/indexer.mjs'; import '../bcs/serializer.mjs'; import '../core/hex.mjs'; import '../core/common.mjs'; import '../bcs/deserializer.mjs'; import '../transactions/instances/transactionArgument.mjs'; import '../utils/const.mjs'; import '../transactions/authenticator/account.mjs'; import '../core/crypto/ed25519.mjs'; import '../authenticationKey-BaHTUD3k.mjs'; import '../core/crypto/signature.mjs'; import '../core/crypto/privateKey.mjs'; import '../core/crypto/multiEd25519.mjs'; import '../core/crypto/multiKey.mjs'; import '../core/crypto/singleKey.mjs'; import '../core/crypto/bls12381.mjs'; import '../core/crypto/multiAuthKey.mjs'; import '../bcs/serializable/moveStructs.mjs'; import '../bcs/serializable/movePrimitives.mjs'; import '../bcs/serializable/fixedBytes.mjs'; import '../transactions/instances/rawTransaction.mjs'; import '../transactions/instances/chainId.mjs'; import '../transactions/instances/transactionPayload.mjs'; import '../transactions/instances/identifier.mjs'; import '../transactions/instances/moduleId.mjs'; import '../transactions/typeTag/index.mjs'; import '../transactions/instances/multiAgentTransaction.mjs'; /** * A class to query all `DigitalAsset` related queries on Endless. */ declare class DigitalAsset { readonly config: EndlessConfig; constructor(config: EndlessConfig); /** * Creates a new collection within the specified account * * @example * const transaction = await endless.createCollectionTransaction({ * creator: alice, * description: "collectionDescription", * name: "collectionName", * uri: "collection-uri.com", * }); * * @param args.creator the account of the collection's creator * @param args.description the description of the collection * @param args.name the name of the collection * @param args.uri the URI to additional info about the collection * * The parameters below are optional. * @param args.maxSupply controls the max supply of the digital assets - defaults MAX_U64_BIG_INT * @param args.mutableDescription controls mutability of the collection's description - defaults true * @param args.mutableRoyalty controls mutability of the collection's description - defaults true * @param args.mutableUri controls mutability of the collection's URI - defaults true * @param args.mutableTokenDescription controls mutability of the digital asset's description - defaults true * @param args.mutableTokenName controls mutability of the digital asset's name - defaults true * @param args.mutableTokenProperties controls mutability of digital asset's properties - defaults true * @param args.mutableTokenUri controls mutability of the digital asset's URI - defaults true * @param args.tokensBurnableByCreator controls whether digital assets can be burnable by the creator - defaults true * @param args.tokensFreezableByCreator controls whether digital assets can be frozen by the creator - defaults true * @param args.royaltyNumerator the numerator of the royalty to be paid to the creator when * a digital asset is transferred - defaults 0 * @param args.royaltyDenominator the denominator of the royalty to be paid to the creator * when a digital asset is transferred - defaults 1 * * @returns A SimpleTransaction that when submitted will create the collection. */ createCollectionTransaction(args: { creator: Account; description: string; name: string; uri: string; options?: InputGenerateTransactionOptions; } & CreateCollectionOptions): Promise; /** * Create a transaction to mint a digital asset into the creators account within an existing collection. * * @example * const transaction = await endless.mintDigitalAssetTransaction({ * creator: alice, * description: "collectionDescription", * collection: "collectionName", * name: "digitalAssetName", * uri: "digital-asset-uri.com", * }); * * @param args.creator the creator of the collection * @param args.collection the name of the collection the digital asset belongs to * @param args.description the description of the digital asset * @param args.name the name of the digital asset * @param args.uri the URI to additional info about the digital asset * * @returns A SimpleTransaction that can be simulated or submitted to chain */ mintDigitalAssetTransaction(args: { creator: Account; collection: string; description: string; name: string; uri: string; propertyKeys?: Array; propertyTypes?: Array; propertyValues?: Array; options?: InputGenerateTransactionOptions; }): Promise; /** * Transfer a digital asset (non fungible digital asset) ownership. * * We can transfer a digital asset only when the digital asset is not frozen * (i.e. owner transfer is not disabled such as for soul bound digital assets) * * @example * const transaction = await endless.transferDigitalAssetTransaction({ * sender: alice, * digitalAssetAddress: "0x123", * recipient: "0x456", * }); * * @param args.sender The sender account of the current digital asset owner * @param args.digitalAssetAddress The digital asset address * @param args.recipient The recipient account address * @param args.digitalAssetType optional. The digital asset type, default to "0x4::token::Token" * * @returns A SimpleTransaction that can be simulated or submitted to chain */ transferDigitalAssetTransaction(args: { sender: Account; digitalAssetAddress: AccountAddressInput; recipient: AccountAddress; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Mint a soul bound digital asset into a recipient's account * * @example * const transaction = await endless.mintSoulBoundTransaction({ * account: alice, * collection: "collectionName", * description: "collectionDescription", * name: "digitalAssetName", * uri: "digital-asset-uri.com", * recipient: "0x123" * }); * * @param args.account The account that mints the digital asset * @param args.collection The collection name that the digital asset belongs to * @param args.description The digital asset description * @param args.name The digital asset name * @param args.uri The digital asset URL * @param args.recipient The account address where the digital asset will be created * @param args.propertyKeys The property keys for storing on-chain properties * @param args.propertyTypes The type of property values * @param args.propertyValues The property values to be stored on-chain * * @returns A SimpleTransaction that can be simulated or submitted to chain */ mintSoulBoundTransaction(args: { account: Account; collection: string; description: string; name: string; uri: string; recipient: AccountAddressInput; propertyKeys?: Array; propertyTypes?: Array; propertyValues?: Array; options?: InputGenerateTransactionOptions; }): Promise; /** * Burn a digital asset by its creator * * @example * const transaction = await endless.burnDigitalAssetTransaction({ * creator: alice, * digitalAssetAddress: "0x123", * }); * * @param args.creator The creator account * @param args.digitalAssetAddress The digital asset address * * @returns A SimpleTransaction that can be simulated or submitted to chain */ burnDigitalAssetTransaction(args: { creator: Account; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Freeze digital asset transfer ability * * @example * const transaction = await endless.freezeDigitalAssetTransaferTransaction({ * creator: alice, * digitalAssetAddress: "0x123", * }); * * @param args.creator The creator account * @param args.digitalAssetAddress The digital asset address * * @returns A SimpleTransaction that can be simulated or submitted to chain */ freezeDigitalAssetTransaferTransaction(args: { creator: Account; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Unfreeze digital asset transfer ability * * @example * const transaction = await endless.unfreezeDigitalAssetTransaferTransaction({ * creator: alice, * digitalAssetAddress: "0x123", * }); * * @param args.creator The creator account * @param args.digitalAssetAddress The digital asset address * * @returns A SimpleTransaction that can be simulated or submitted to chain */ unfreezeDigitalAssetTransaferTransaction(args: { creator: Account; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Set the digital asset description * * @example * const transaction = await endless.setDigitalAssetDescriptionTransaction({ * creator: alice, * description: "digitalAssetDescription", * digitalAssetAddress: "0x123", * }); * * @param args.creator The creator account * @param args.description The digital asset description * @param args.digitalAssetAddress The digital asset address * * @returns A SimpleTransaction that can be simulated or submitted to chain */ setDigitalAssetDescriptionTransaction(args: { creator: Account; description: string; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Set the digital asset name * * @example * const transaction = await endless.setDigitalAssetNameTransaction({ * creator: alice, * name: "digitalAssetName", * digitalAssetAddress: "0x123", * }); * * @param args.creator The creator account * @param args.name The digital asset name * @param args.digitalAssetAddress The digital asset address * * @returns A SimpleTransaction that can be simulated or submitted to chain */ setDigitalAssetNameTransaction(args: { creator: Account; name: string; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Set the digital asset name * * @example * const transaction = await endless.setDigitalAssetURITransaction({ * creator: alice, * uri: "digital-asset-uri.com", * digitalAssetAddress: "0x123", * }); * * @param args.creator The creator account * @param args.uri The digital asset uri * @param args.digitalAssetAddress The digital asset address * * @returns A SimpleTransaction that can be simulated or submitted to chain */ setDigitalAssetURITransaction(args: { creator: Account; uri: string; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Add a digital asset property * * @example * const transaction = await endless.addDigitalAssetPropertyTransaction({ * creator: alice, * propertyKey: "newKey", * propertyType: "BOOLEAN", * propertyValue: true, * digitalAssetAddress: "0x123", * }); * * @param args.account The account that mints the digital asset * @param args.digitalAssetAddress The digital asset address * @param args.propertyKey The property key for storing on-chain properties * @param args.propertyType The type of property value * @param args.propertyValue The property value to be stored on-chain * * @returns A SimpleTransaction that can be simulated or submitted to chain */ addDigitalAssetPropertyTransaction(args: { creator: Account; propertyKey: string; propertyType: PropertyType; propertyValue: PropertyValue; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Remove a digital asset property * * @example * const transaction = await endless.removeDigitalAssetPropertyTransaction({ * creator: alice, * propertyKey: "newKey", * propertyType: "BOOLEAN", * propertyValue: true, * digitalAssetAddress: "0x123", * }); * * @param args.account The account that mints the digital asset * @param args.digitalAssetAddress The digital asset address * @param args.propertyKey The property key for storing on-chain properties * @param args.propertyType The type of property value * @param args.propertyValue The property value to be stored on-chain * * @returns A SimpleTransaction that can be simulated or submitted to chain */ removeDigitalAssetPropertyTransaction(args: { creator: Account; propertyKey: string; propertyType: PropertyType; propertyValue: PropertyValue; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Update a digital asset property * * @example * const transaction = await endless.updateDigitalAssetPropertyTransaction({ * creator: alice, * propertyKey: "newKey", * propertyType: "BOOLEAN", * propertyValue: false, * digitalAssetAddress: "0x123", * }); * * @param args.account The account that mints the digital asset * @param args.digitalAssetAddress The digital asset address * @param args.propertyKey The property key for storing on-chain properties * @param args.propertyType The type of property value * @param args.propertyValue The property value to be stored on-chain * * @returns A SimpleTransaction that can be simulated or submitted to chain */ updateDigitalAssetPropertyTransaction(args: { creator: Account; propertyKey: string; propertyType: PropertyType; propertyValue: PropertyValue; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Add a typed digital asset property * * @example * const transaction = await endless.addDigitalAssetTypedPropertyTransaction({ * creator: alice, * propertyKey: "typedKey", * propertyType: "STRING", * propertyValue: "hello", * digitalAssetAddress: "0x123", * }); * * @param args.account The account that mints the digital asset * @param args.digitalAssetAddress The digital asset address * @param args.propertyKey The property key for storing on-chain properties * @param args.propertyType The type of property value * @param args.propertyValue The property value to be stored on-chain * * @returns A SimpleTransaction that can be simulated or submitted to chain */ addDigitalAssetTypedPropertyTransaction(args: { creator: Account; propertyKey: string; propertyType: PropertyType; propertyValue: PropertyValue; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; /** * Update a typed digital asset property * * @example * const transaction = await endless.updateDigitalAssetTypedPropertyTransaction({ * creator: alice, * propertyKey: "typedKey", * propertyType: "U8", * propertyValue: 2, * digitalAssetAddress: "0x123", * }); * * @param args.account The account that mints the digital asset * @param args.digitalAssetAddress The digital asset address * @param args.propertyKey The property key for storing on-chain properties * @param args.propertyType The type of property value * @param args.propertyValue The property value to be stored on-chain * * @returns A SimpleTransaction that can be simulated or submitted to chain */ updateDigitalAssetTypedPropertyTransaction(args: { creator: Account; propertyKey: string; propertyType: PropertyType; propertyValue: PropertyValue; digitalAssetAddress: AccountAddressInput; digitalAssetType?: MoveStructId; options?: InputGenerateTransactionOptions; }): Promise; } export { DigitalAsset };