TransactionHistoryqueries, aimed at enriching SNIP-20 (and SNIP-721) tokens usage and onset for new users.
(alice,password)matches what's in storage, the contract returns Alice's balance to the querier.
query("balance")answer but can't authenticate the querier because the node still didn't catch up with the
StdSignDocwith some constraints.
ChainIDcan be just a free-form string, but Keplr enforces that it's the current chain-id. The contract doesn't care about chain-id and it just checks that the signature is correct. In practice a user can sign a permit on chain-id
secret-3and later on send it on chain-id
secret-4and it will be validated correctly (and that's okay!).
PermitMsgis the only message allowed in
typeis always the string
value.permit_nameis a free-form string. The user can later revoke this permit using this name.
value.allowed_tokensis a list of token addresses to which this permit applies.
value.permissionsis an array that may contain
balance- gives permission to query the
balanceof the permit signer.
history- gives permission to query the
transaction_historyof the permit signer.
allowance- gives permission to query the
allowanceof the permit signer as an
ownerand as a
secretd tx sign-doc, and represents a signature on the permit's content with the secp256k1 private key of the account.
WithPermitwraps all the queries that support permits.
expirationfield of the response may be either
nullor unset if no expiration has been set.