siennajs v0.1.0
SiennaJS
Client library to interact with smart contracts on Sienna Network
Usage
All smart contract interfaces are created with the following parameters.
- The address of the contract.
- An instance of
SigningCosmWasmClientfromsecretjs(Optional). An instance of
CosmWasmClientfromsecretjs(Optional).At least one type of client is required. Depending on the type of client provided you will get access to different functionalities:
SigningCosmWasmClient- both executing transactions and queriesCosmWasmClient- queries only
If both instances are passed it will use SigningCosmWasmClient for executing and CosmWasmClient for queries.
Example - Query SIENNA token info:
const query_client = new CosmWasmClient('API_URL_HERE')
const sienna_token = new Snip20Contract(
'secret1rgm2m5t530tdzyd99775n6vzumxa5luxcllml4',
undefined, // We don't pass a SigningCosmWasmClient as we don't need it for queries
query_client
)
const token_info = await sienna_token.query().get_token_info()Querying with permits
SiennaJS exposes the Signer interface which must implement an offline signing method. See the SNIP-24 spec for more info.
An implementation for the Keplr wallet is provided by the library - KeplrSigner
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago