1.2.0 • Published 2 years ago

terra-clients v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Terra Clients

Autogenerated TypeScript clients for common CosmWasm smart contracts on Terra.

Usage

  1. Install terra-clients
npm install terra-clients
  1. Import your desired client
import { Cw721MetadataOnchainClient } from 'terra-clients'
  1. Initialize and use client
const cw721 = new Cw721MetadataOnchainClient(
  lcd, // LCDClient
  wallet, // Wallet or ConnectedWallet
  'terra1qxhz7qr8389gtpjx0tqr2t63mk55072mzrxnpgupv8uj3mk2qclq0cpjy5', // Contract address
);

await cw721.transferNft({
  recipient: 'address',
  tokenId: '0',
});

Documentation

terra-clients exports two types of clients for each contract, a query client and a write client. The query client includes all of the exposed query methods and is read-only, the write client extends the query client to add exposed execute methods.

You can find typedoc generated documentation here.

License

MIT