salt-sdk - v0.0.45
    Preparing search index...

    Type Alias CreateAccountParams

    Parameters for Salt.createAccount.

    type CreateAccountParams = {
        name: string;
        onPaymentRequired?: OnPaymentRequired;
        organisationId: string;
        payer?: ViemTypedDataSignerLike;
        payment?: SignedPayment;
        signer: ViemWalletClientLike;
        signers: string[];
        timeoutMs?: number;
    }
    Index
    name: string

    Display name for the account

    onPaymentRequired?: OnPaymentRequired

    Called with the terms the 402 asked for, once they're chosen and before anything is signed. The wallet paying must be on FeeTerms.chainId — it refuses typed data whose domain names a chain it isn't on — and this is the only point at which that chain is known and still switchable. Throw to abort the payment. Ignored without a payer.

    organisationId: string

    The organisation this account belongs to

    Signer for the x402 payment that gates POST /accounts. Needn't be signer; any wallet that can sign an EIP-3009 TransferWithAuthorization may pay on the creator's behalf. Omit when supplying a payment signed ahead of time, or when the backend doesn't charge for account creation; a 402 with neither surfaces as PaymentRequiredError.

    Fees

    payment?: SignedPayment

    A payment signed ahead of time with Salt.signPayment, so creation costs one request instead of a 402 and a retry. Supply a payer as well to fall back to signing reactively if this one is refused — it expires, and the price it quotes can move.

    Fees

    Viem WalletClient for the account creator; its attached account participates in the keygen ceremony.

    signers: string[]

    Proposer addresses, including the creator. Robos will be automatically added

    timeoutMs?: number

    Per-round keygen timeout in milliseconds. Defaults to the underlying KeygenSession default (currently 2 minutes).