Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicToken ¶
type BasicToken interface {
contractapi.ContractInterface
// CreateWallet to create new wallet. Each wallet belong to token type
CreateWallet(ctx contractapi.TransactionContextInterface, createWallet dto.CreateWallet) (string, error)
// UpdateWallet to update status of wallet. Active or InActive
UpdateWallet(ctx contractapi.TransactionContextInterface, updateWallet dto.UpdateWallet) error
// GetBalance return balance of wallet
GetBalance(ctx contractapi.TransactionContextInterface, balance dto.Balance) (string, error)
// Mint to init base token in the system
Mint(ctx contractapi.TransactionContextInterface, mintDto dto.MintToken) error
// Burn to delete token in the system
Burn(ctx contractapi.TransactionContextInterface, burnDto dto.BurnToken) error
// Transfers amount of tokens from address FromWalletId to address ToWalletId
Transfer(ctx contractapi.TransactionContextInterface, transferDto dto.TransferToken) error
// CreateTokenType to create new token type in the system
CreateTokenType(ctx contractapi.TransactionContextInterface, createTokenTypeDto dto.CreateTokenType) (string, error)
// CreateHealthCheck check system ready to use
CreateHealthCheck(ctx contractapi.TransactionContextInterface, arg string) (string, error)
// GetAccountingTx return list id transaction that have status pending
GetAccountingTx(ctx contractapi.TransactionContextInterface) ([]string, error)
// CalculateBalance update balance of wallet. Accounting job will call this
CalculateBalance(ctx contractapi.TransactionContextInterface, accountingDto dto.AccountingBalance) error
// Swap to swap between token type. Example from Stable token to X token
Swap(ctx contractapi.TransactionContextInterface, swapDto dto.SwapToken) error
// Issue to issue new token from stable token
Issue(ctx contractapi.TransactionContextInterface, issueDto dto.IssueToken) error
// EnrollToken to register wallet policy use to issue new token
EnrollToken(ctx contractapi.TransactionContextInterface, enrollmentDto dto.Enrollment) error
// Exchange to exchange token between two user have diff token type
Exchange(ctx contractapi.TransactionContextInterface, exchangeToken dto.ExchangeToken) error
}
type Erc721 ¶
type Erc721 interface {
contractapi.ContractInterface
// Mint to generate new NFT with GS1 number
Mint(ctx contractapi.TransactionContextInterface, mintNFT dto.MintNFT) (string, error)
// OwnerOf to find the owner of an NFT
OwnerOf(ctx contractapi.TransactionContextInterface, ownerNFT dto.OwnerNFT) (string, error)
// BalanceOf to count all NFTs assigned to an owner
BalanceOf(ctx contractapi.TransactionContextInterface, balanceOfNFT dto.BalanceOfNFT) (int, error)
// TransferFrom to transfers the ownership of an NFT from one wallet to another wallet
TransferFrom(ctx contractapi.TransactionContextInterface, transferNFT dto.TransferNFT) error
}
Click to show internal directories.
Click to hide internal directories.