salt-sdk
    Preparing search index...

    salt-sdk

    Salt SDK NPM Version

    TypeScript client for Salt, an open MPC self-custodial infrastructure for organisations. With Salt, anyone can spin up a system of self-sovereignty for self-custodial wealth management, including delegations to 3rd parties such as asset managers, robo-advisors or agents.

    You will need an existing Salt organisation to make use of the SDK. Visit https://testnet.salt.space to set up a test account.

    import { Salt, TransferType } from 'salt-sdk';
    import { Wallet } from 'ethers';

    // Create an instance of Salt SDK - https://developer.salt.space/sdk/classes/Salt.html#constructor
    const salt = new Salt({
    environment: 'TESTNET',
    });

    // Substitute this with a proper signer creation
    const signer = Wallet.createRandom();

    // Authenticate with SIWE - https://developer.salt.space/sdk/classes/Salt.html#authenticate
    await salt.authenticate(signer);

    // Transfer funds - https://developer.salt.space/sdk/classes/Salt.html#transfer
    await salt.transfer({
    type: TransferType.Native,
    accountId: '0123456', // Salt account ID - https://developer.salt.space/classes/Salt.html#getAccounts
    to: '0x000000000000000000000000000000000000dEaD',
    value: '1',
    decimals: 18,
    chainId: 1,
    signer: signer,
    });

    Examples and a full list of available functionality are available at https://developer.salt.space/sdk.

    Development

    See ARCHITECTURE.md for more details.

    NPM Type Definitions