Files
nym/clients/validator
Fouad fcc5398aab Feature/node tester package (#3634)
* 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>
2023-07-03 16:53:39 +01:00
..
2023-03-01 10:22:35 +01:00
2023-03-01 10:22:35 +01:00
2023-07-03 16:53:39 +01:00
2021-12-16 15:35:30 +00:00
2021-03-24 11:49:58 +00:00
2023-03-01 10:22:35 +01:00

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' }]);

}