Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ERR_TX_MINTED = errors.New("err_tx_minted") ERR_NIL_AMOUNT = errors.New("err_nil_amount") ERR_NEGATIVE_AMOUNT = errors.New("err_negative_amount") ERR_NEGATIVE_FEE = errors.New("err_negative_fee") ERR_LARGER_AMOUNT = errors.New("err_larger_amount") ERR_INSUFFICIENT_BALANCE = errors.New("err_insufficient_balance") ERR_INSUFFICIENT_TOTALSUPPLY = errors.New("err_insufficient_totalsupply") ERR_INVALID_ACTION = errors.New("err_invalid_action") ERR_INVALID_MINT_TX = errors.New("err_invalid_mint_tx") ERR_INVALID_BURN_TX = errors.New("err_invalid_burn_tx") ERR_INVALID_TOKEN = errors.New("err_invalid_token") ERR_NOT_FOUND_TARGET_INFO = errors.New("err_not_found_target_chain_info") )
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct { ID string // On Native-Chain tokenId; Special AR token: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,0xcc9141efa8c20c7df0778748255b1487957811be" Symbol string Decimals int // On everPay decimals ChainType string // On everPay chainType; Special AR token: "arweave,ethereum" ChainID string // On everPay chainId; Special AR token: "0,1"(mainnet) or "0,42"(testnet) TotalSupply *big.Int Balances map[string]*big.Int // account id -> balance Minted map[string]bool // chainHash -> bool // contains filtered or unexported fields }
func New ¶
func New(tokenId, symbol, chainType, chainID string, everDecimals int, targetChainArr []schema.TargetChain) *Token
func (*Token) GetTargetChain ¶
func (t *Token) GetTargetChain(targetChainType string) (res schema.TargetChain, exist bool)
func (*Token) GetTargetChains ¶
func (t *Token) GetTargetChains() map[string]schema.TargetChain
Click to show internal directories.
Click to hide internal directories.