@cerc-io/registry-sdk (0.2.0)

Published 2024-03-14 09:29:30 +00:00 by cerccicd in cerc-io/registry-sdk

Installation

@cerc-io:registry=
npm install @cerc-io/registry-sdk@0.2.0
"@cerc-io/registry-sdk": "0.2.0"

About this package

registry-sdk

Client library used by TS/JS applications to communicate with laconic2d.

Tests

Follow these steps to run the tests:

  • After cloning this repo run:

    yarn
    
  • Copy .env.example file and create a .env file.

    cp .env.example .env
    
  • Clone the laconic2d repo and change to repo directory.

  • Run the chain using ./scripts/init.sh.

  • Export the private key using:

    laconic2d keys export alice --keyring-backend test  --unarmored-hex --unsafe
    
  • Copy the private key and assign it to variable PRIVATE_KEY in the .env file.

  • Run the tests in registry-sdk repo:

    yarn test
    
  • Run the tests with auctions enabled

    • In laconic2d repo run:

      TEST_AUCTION_ENABLED=true ./scripts/init.sh clean
      
    • Export the private key and change it in .env file again using:

      laconic2d keys export alice --keyring-backend test  --unarmored-hex --unsafe
      
    • Run tests:

      yarn test:auctions
      
  • Run the tests for record and authority expiry

    • In laconic2d repo run:

      TEST_REGISTRY_EXPIRY=true ./scripts/init.sh clean
      
    • Export the private key and change it in .env file again using:

      laconic2d keys export alice --keyring-backend test  --unarmored-hex --unsafe
      
    • Run tests:

      yarn test:nameservice-expiry
      

Development

README

Known Issues

  • Passing a float type value in watcher attributes throws error when sending setRecord message.

    failed to execute message; message index: 0: Invalid signature.: unauthorized
    
  • When sending setRecord message, an integer value passed in watcher attributes is parsed as float type in laconic2d while unmarshalling json.

  • setRecord message throws error when fileds in Record message are not assigned.

    failed to pack and hash typedData primary type: provided data '<nil>' doesn't match type 'string' [tharsis/ethermint/ethereum/eip712/eip712.go:33]
    

    Passing dummy values to work around issue.

Dependencies

Dependencies

ID Version
@cosmjs/amino ^0.28.1
@cosmjs/crypto ^0.28.1
@cosmjs/encoding ^0.28.1
@cosmjs/launchpad ^0.27.1
@cosmjs/proto-signing ^0.32.2
@cosmjs/stargate ^0.32.2
@cosmjs/tendermint-rpc ^0.32.2
@ipld/dag-cbor ^7.0.1
@ipld/dag-json ^8.0.9
@metamask/eth-sig-util ^4.0.0
@tharsis/address-converter ^0.1.7
@tharsis/eip712 ^0.2.1
@tharsis/proto ^0.1.16
@tharsis/provider ^0.2.4
@tharsis/transactions ^0.2.2
axios ^0.26.1
bip32 3.0.1
bip39 ^3.0.4
canonical-json ^0.0.4
ethers ^5.6.2
graphql.js ^0.6.8
js-sha256 ^0.9.0
js-yaml ^3.14.1
lodash ^4.17.21
multiformats ^9.5.4
node-yaml ^4.0.1
secp256k1 ^4.0.1
semver ^7.3.5
tiny-secp256k1 ^1.1.6

Development Dependencies

ID Version
@types/jest ^27.4.1
@types/lodash ^4.14.181
@types/semver ^7.3.9
@types/tiny-secp256k1 1.0.0
@typescript-eslint/eslint-plugin ^5.47.1
@typescript-eslint/parser ^5.47.1
depcheck ^1.4.7
dotenv ^16.0.0
eslint ^8.35.0
eslint-config-semistandard ^15.0.1
eslint-config-standard ^16.0.3
eslint-plugin-import ^2.27.5
eslint-plugin-node ^11.1.0
eslint-plugin-promise ^5.1.0
eslint-plugin-standard ^5.0.0
google-protobuf ^3.21.0
husky ^9.0.11
jest 29.0.0
ts-jest ^29.0.2
ts-proto 1.121.6
typescript ^4.6.2
Details
npm
2024-03-14 09:29:30 +00:00
48
UNLICENSED
478 KiB
Assets (1)
Versions (11) View all
0.2.10 2024-09-25
0.2.9 2024-09-06
0.2.8 2024-09-05
0.2.7 2024-08-28
0.2.6 2024-08-05