TokenClient class
Class for creating, minting and managing minting NFT collections and tokens.
Constructors
- TokenClient(AptosClient client)
Properties
- aptosClient ↔ AptosClient
-
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transactionBuilder ↔ TransactionBuilderABI
-
latefinal
Methods
-
burnByCreator(
AptosAccount creator, String ownerAddress, String collection, String name, BigInt propertyVersion, BigInt amount, {BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - BurnToken by Creator
-
burnByOwner(
AptosAccount owner, String creatorAddress, String collection, String name, BigInt propertyVersion, BigInt amount, {BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - BurnToken by Owner
-
cancelTokenOffer(
AptosAccount account, String receiver, String creator, String collectionName, String name, {int? propertyVersion, BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - Removes a token from pending claims list and return the hash of the transaction submitted to the API.
-
claimToken(
AptosAccount account, String sender, String creator, String collectionName, String name, {int? propertyVersion, BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - Claims a token on specified account and return the hash of the transaction submitted to the API.
-
createCollection(
AptosAccount account, String name, String description, String uri, {BigInt? maxAmount, BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - Creates a new NFT collection within the specified account and return the hash of the transaction submitted to the API.
-
createToken(
AptosAccount account, String collectionName, String name, String description, int supply, String uri, {BigInt? max, String? royaltyPayeeAddress, int? royaltyPointsDenominator, int? royaltyPointsNumerator, List< String> ? propertyKeys, List<String> ? propertyValues, List<String> ? propertyTypes, BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future<String> - Creates a new NFT within the specified account and return the hash of the transaction submitted to the API.
-
createTokenWithMutabilityConfig(
AptosAccount account, String collectionName, String name, String description, int supply, String uri, {BigInt? max, String? royaltyPayeeAddress, int? royaltyPointsDenominator, int? royaltyPointsNumerator, List< String> ? propertyKeys, List<Uint8List> ? propertyValues, List<String> ? propertyTypes, List<bool> ? mutabilityConfig, BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future<String> - Creates a new NFT within the specified account and return the hash of the transaction submitted to the API.
-
directTransferToken(
AptosAccount sender, AptosAccount receiver, String creator, String collectionName, String name, int amount, {int? propertyVersion, BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - Directly transfer the specified amount of tokens from account to receiver using a single multi signature transaction. And return the hash of the transaction submitted to the API.
-
getCollectionData(
String creator, String collectionName) → Future - Queries collection data.
-
getToken(
String creator, String collectionName, String tokenName, {int? propertyVersion = 0}) → Future< Token> - Queries token balance for the token creator.
-
getTokenData(
String creator, String collectionName, String tokenName) → Future< TokenData> - Queries token data from collection.
-
getTokenForAccount(
String account, TokenId tokenId) → Future< Token> - Queries token balance for a token account.
-
mutateTokenProperties(
AptosAccount account, String tokenOwner, String creator, String collectionName, String tokenName, BigInt propertyVersion, BigInt amount, List< String> keys, List<Uint8List> values, List<String> types, {BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future<String> -
account
creator mutates the properties of the tokens own bytokenOwner
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offerToken(
AptosAccount account, String receiver, String creator, String collectionName, String name, int amount, {int? propertyVersion, BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - Transfers specified amount of tokens from account to receiver and return the hash of the transaction submitted to the API.
-
optInTokenTransfer(
AptosAccount sender, bool optIn, {BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - User opt-in or out direct transfer through a boolean flag, return the hash of the transaction submitted to the API.
-
toString(
) → String -
A string representation of this object.
inherited
-
transferWithOptIn(
AptosAccount sender, String creator, String collectionName, String tokenName, BigInt propertyVersion, String receiver, BigInt amount, {BigInt? maxGasAmount, BigInt? gasUnitPrice, BigInt? expireTimestamp}) → Future< String> - Directly transfer token from sender to a receiver. The receiver should have opted in to direct transfer.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited