SecretNET.Token Namespace

Snip20Querier Methods

The Snip20Querier type exposes the following members.

Methods


  Name Description
Public method GetAllowance
Gets the allowance (This query MUST be authenticated). This returns the available allowance that spender can access from the owner's account, along with the expiration info. Every account's viewing key MUST be given permissions to query the allowance of any pair of owner and spender, as long as that account is either the owner or the spender in the query. In other words, every account's viewing key can be used to find out how much allowance the account has given other accounts, and how much it has been given by other accounts. The expiration field of the response may be either null or unset if no expiration has been set.
Public method GetBalance
Gets the balance (This query MUST be authenticated). Returns the balance of the given address. Returns "0" if the address is unknown to the contract.
Public method GetExchangeRate
Gets information about the token exchange rate functionality that the contract provides (This query need not be authenticated). This query MUST return. - exchange rate, as an integer string. The amount of native coins that equal one token. - Denomination of native tokens which are acceptable, as a string OR a comma separated value.
Public method GetMinters
Returns the list of minters that have been configured in the contract (This query need not be authenticated).
Public method GetTokenInfo
Gets the token information (This query need not be authenticated). Returns the token info of the contract. The response MUST contain: token name, token symbol, and the number of decimals the token uses. The response MAY additionally contain the total-supply of tokens. This is to enable Layer-2 tokens which want to hide the amounts converted as well.
Public method GetTransactionHistory
The original TransferHistory query paints an incomplete picture of users' interactions with the token. It only records operations performed through Transfer, TransferFrom, Send, and SendFrom, while the other operations which move funds around - Mint, Burn, Deposit, Withdraw etc. are not recorded and can not be easily tracked by users after the fact. The following is the specification of the new TransactionHistory query, which aims to provide a complete description of the history of users' balances. This query MUST be authenticated.
Public method GetTransferHistory
Gets the transfer history (This query MUST be authenticated). This query SHOULD return a list of json objects describing the transactions made by the querying address, in newest-first order. The user may optionally specify a limit on the amount of information returned by paging the available items.