@cosmos-registry/wasm-registry
v0.1.1
Published
TypeScript client for Cosm Registry CosmWasm contract
Readme
cosmjs-registry
A TypeScript client for querying the Cosm Registry (CosmWasm) contract via CosmJS.
Installation
npm installBuild
npm run buildSynchronize V1 Schemas
npm run sync:schemasThe script copies the JSON schemas from the contract repository to schemas/raw/.
You can override the source with CONTRACT_REPO=/path/to/Cosm-registry.
Tests
npm testAPI
getChain(chainId)getChains({ startAfter, limit })getEndpoints({ chainId, kind, includeInactive })exportChainJson(chainId)getOwner()getParams()
Write API
Use SigningCosmRegistryClient to execute the following messages:
createChain(chainMeta)createEndpoint(chainId, endpointInput)addToken(chainId, asset)updateChainMeta(chainId, update)topUpEndpoint(chainId, endpointId, amount)removeEndpoint(chainId, endpointId)setParams(params)setEndpointFlags(chainId, endpointId, { verified, preferred })
All type definitions are aligned with the V1 schemas generated in the contract repository.
