@cerc-io/laconic-sdk (0.1.12)

Published 2023-12-13 21:09:26 +00:00 by cerccicd in cerc-io/laconic-sdk

Installation

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

About this package

laconic-sdk

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

Tests

Follow these steps to run the tests:

  • After cloning this repo run:

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

  • Clone the laconicd repo and change to repo directory.

  • Run the chain using ./init.sh.

  • Export the private key using:

    laconicd keys export mykey --unarmored-hex --unsafe
    
  • Copy the private key and assign it to variable PRIVATE_KEY in the .env file.

  • Run the tests in laconic-sdk repo:

    yarn test
    
  • Run the tests with auctions enabled

    • In laconicd repo run:

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

      laconicd keys export mykey --unarmored-hex --unsafe
      
    • Run tests:

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

    • In laconicd repo run:

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

      laconicd keys export mykey --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 laconicd 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
@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
evmosjs ^0.2.5
graphql.js ^0.6.8
js-sha256 ^0.9.0
js-yaml ^3.14.1
jsonschema ^1.4.0
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
dotenv ^16.0.0
google-protobuf ^3.21.0
jest 29.0.0
protoc-gen-ts ^0.8.7
ts-jest ^29.0.2
typescript ^4.6.2
Details
npm
2023-12-13 21:09:26 +00:00
37
UNLICENSED
190 KiB
Assets (1)
Versions (9) View all
0.1.16 2024-04-02
0.1.15 2024-02-08
0.1.14 2024-01-15
0.1.13 2023-12-21
0.1.12 2023-12-13