yarn installyarn build^--- this might return some errors
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
yarn run-1
(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
- forget to call
sdk.connect(),sdk.connectTopology()etc. - forget to set userParty
sdk.ledger.setPartyId(sender.partyId) - they are using
localNet...Defaultwhile having a custom or special setup
in both of the above cases they might be needed for every component used.