fcc5398aab
* create node tester package dir * start building node tester package * refactor code + build updates * fix up types * add more methods and fix up types * use node tester sdk inside wallet * fix frontend state * Use Node 18 instead of 16 * Fix up dependencies and yarn workspace * Fix lint error * Try to fix up linting error * Remove explorer linting and move it to the existing action * Add wasm-pack build to linting GH Action * change lerna to use workspaces and fix linting errors * Fix up node versions in GitHub Actions and add wasm-pack * fix build:lint target in sdk * exclude all worker.js from eslint for sdk --------- Co-authored-by: Mark Sinclair <mmsinclair@users.noreply.github.com>
Nym Validator Client (Typescript)
A TypeScript client for interacting with CosmWasm smart contracts in Nym validators.
Include the Nym Validator in your project:
yarn add @nymproject/nym-validator-client
Connect to validator and make queries
import Validator from '@nymproject/nym-validator-client'
const main = async () => {
const client = await Validator.connectForQuery(rpcAddress, validatorAddress, prefix, mixnetContractAddress, vestingContractAddress, denom)
client.getBalance(address)
}
Connect to validator for performing actions
import Validator from '@nymproject/nym-validator-client'
const main = async () => {
const client = await Validator.connect(mnemonic, rpcAddress, validatorAddress, prefix, mixnetContractAddress, vestingContractAddress, denom)
const res = await client.send(address, [{ amount: '10000000', denom: 'unym' }]);
}