- Defines a custom asset
An asset definition operation registers an asset with the Findora ledger. An asset is a digital resource that can be issued and transferred.
An asset has an issuer and a unique code. The DefineAsset operation must provide an unused token code. The transaction containing the DefineAsset operation will fail if there is already another asset on the ledger with the same code.
constwalletInfo=awaitKeypair.restoreFromPrivateKey(pkey, password);// First, we create a transaction builderconstassetBuilder=awaitAsset.defineAsset(walletInfo, assetCode);// Then, we submit a transactionconsthandle=awaitTransaction.submitTransaction(assetBuilder);
- Returns the pre-defined FRA asset code
FRA asset code can not be re-defined, as well as it can not be used in the DefineAset or IssueAsset operations.
This is the main asset code, which is used when user needs to create a transaction, or calculate the fee and so on.
- Issue some amount of a custom asset
Asset issuers can use the IssueAsset operation to mint units of an asset that they have created. Concretely, the IssueAsset operation creates asset records that represent ownership by a public key of a certain amount of an asset. These asset records are stored in a structure called a transaction output (TXO).