Skip to content

PHOL-DA/wallet-sdk-testing

Repository files navigation

Setup

  1. yarn install
  2. yarn build ^--- this might return some errors

How to use to support clients

copy the script most relevant for the client into script.ts from: https://github.com/hyperledger-labs/splice-wallet-kernel/tree/main/docs/wallet-integration-guide/examples/scripts

adjust and adapt based on client usage or flow.

it is recommended to have a local net running, especially from the splice wallet kernel.

to setup localnet go to splice wallet kernel repo root and run:

yarn run script:fetch:localnet (if it returns a hash mismatch then update it in the scripts/utils.ts) yarn start:localnet this will spin up a localnet docker compose

to run your script:

yarn run-1

cheat sheet and good to use

validating user ports and urls

(validating grpc admin api at 127.0.0.1:2902)
grpcurl -plaintext 127.0.0.1:2902 list
this should include topology write and topology read

(validate json api at 127.0.0.1:2975)
curl http://127.0.0.1:2975/v2/version

(validate scan api at scan.localhost:4000)
curl http://scan.localhost:4000/api/scan/version

(validate validator api at http://wallet.localhost:2000/api/validator)
curl http://wallet.localhost:4000/api/validator/version

common pitfalls that they might run into in the code

  1. forget to call sdk.connect(), sdk.connectTopology() etc.
  2. forget to set userParty sdk.ledger.setPartyId(sender.partyId)
  3. they are using localNet...Default while having a custom or special setup

in both of the above cases they might be needed for every component used.

About

a small script library for testing with wallet sdk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published