@pryzm-finance/pryzm-fairdrop-option-js
v0.1.2
Published
Javascript SDK for Pryzm fairdrop Option Contract
Readme
PRYZM Fairdrop Option JS
This package provides a javascript SDK to interact with the PRYZM Fairdrop Option contracts.
Installation
npm install @pryzm-finance/pryzm-fairdrop-option-js Usage
import { contracts } from "@pryzm-finance/pryzm-fairdrop-option-js";
const signingClient = await SigningCosmWasmClient.connectWithSigner(rpc, signer);
const msgClient = new contracts.PryzmFairdropOption.PryzmFairdropOptionClient(signingClient, walletAddress, contractAddress);
await msgClient.fund("auto", memo, []);
await msgClient.claim("auto", memo, []);
const cosmWasmClient = await CosmWasmClient.connect(rpc);
const queryClient = new contracts.PryzmFairdropOption.PryzmFairdropOptionQueryClient(cosmWasmClient, contractAddress)
await queryClient.params()Development
This project uses @cosmwasm/ts-codegen tool to generate the typescript code from the contract schema files. The schema
json files are located in the schema directory. To generate the typescript code from the schema files, follow this:
- Install the dependencies:
pnpm install - Run the codegen script:
pnpm run codegen
Publishing
Compile the project and publish it to npm registry:
pnpm publish