Prerequisites
- Node.js. The SDK currently supports NodeJS environments only.
- A running Canton validator. Splice LocalNet is convenient for development and testing, but DevNet, TestNet and MainNet validators work as well.
Install the SDK
The Wallet SDK is available as a package on the NPM registry. Install it with your preferred package manager.- npm
- yarn
- pnpm
Connect and create a party
Create the SDK with an auth configuration and the URL of the ledger API, generate a key pair, and create the party. An external party is controlled by a key pair: its ID is made of a hint and the fingerprint of the public key. The SDK creates the party’s topology transactions, signs them with the private key, and submits them.authtells the SDK how to get an access token.self_signedis for local development only. For a real validator use OAuth (client_credentials), as shown in the commented block and in Configuration.localNetStaticConfigholds the default endpoints of a Splice LocalNet.sdk.keys.generate()creates the key pair. Keep the private key safe: it signs everything the party does.- The
partyHintmakes the party easier to recognize. It is optional but recommended.
Next steps
- Creating an External Party: the same flow step by step, with key pairs, fingerprints and topology transactions.
- Configuration: connect to other environments and use other authentication methods.
- Preparing and Signing a Transaction: submit your first transaction.
- Transfer Types: one-step and two-step transfers.
- v0 to v1 Migration Guide: if you used the earlier controller-based SDK.