Asset
asset()
asset()
Creates an AssetBuilder
class instance, which provides methods to build transactions for AssetsExt Pallet on The Root Network. It expects four parameters:
api
: the trnApi to use for interaction.signer
: the signer to use for signing transactions.walletAddress
: the wallet address to use for interaction. Note: It should be the EOA address for the signer, not the FuturePass address.collectionId
: the Collection ID to target. Optional parameter.
Example:
The asset
method provides developers with the capability to perform extrinsic transfer
.
transfer()
transfer()
Sets the base extrinsic to an asset to a destination address. It expects two parameters:
destinationAddress
: the destination address wallet address to transfer to.amount
: the amount to transfer. The value can be a number, bigint or string but must be a valid number, including decimals. For example, if you are transferring1.3
tokens with a precision of 6 decimals, you should pass in1300000
as the amount.
Example:
Last updated