@kagamidigital/salt-sdk-mirror
    Preparing search index...

    Type Alias TransactionCeremonyEvents

    Lifecycle events emitted by a TransactionHostCeremony. Subscribe with .on() before calling wait() to drive a "what's happening now" status UI.

    type TransactionCeremonyEvents = {
        presence: (
            event: {
                joined: number;
                sessionId: string;
                signers: SignerStatus[];
                total: number;
            },
        ) => void;
        stateChanged: (
            event: { stage: TransactionStage; transactionId?: string },
        ) => void;
    }
    Index

    Properties

    presence: (
        event: {
            joined: number;
            sessionId: string;
            signers: SignerStatus[];
            total: number;
        },
    ) => void

    Fires on every change to the signing huddle's membership during the signing stage — each co-signer joining or leaving the MPC session. Drives a live "who's signing" view.

    signers is the set this ceremony actually engages: the proposing host plus the robos it nudges. This is exactly the threshold of parties needed to produce the signature — the account's other human signers are not invited to this ceremony and so are deliberately not listed here. total is therefore the number of expected signers for this ceremony, not the account's full signer count.

    ceremony.on('presence', ({ joined, total, signers }) => {
    console.log(`${joined} of ${total} signers present`);
    signers.forEach((s) => console.log(s.address, s.isOnline));
    });
    stateChanged: (
        event: { stage: TransactionStage; transactionId?: string },
    ) => void

    Fires on every transition through the transaction lifecycle, ending with a terminal success or failure stage.

    const ceremony = await salt.submitTx({
    accountId: '0a1b2c3d4e5f',
    to: '0xRecipientAddress',
    value: parseEther('0.1'),
    chainId: 11155111,
    userAddress: account.address,
    walletClient,
    publicClient,
    });
    ceremony.on('stateChanged', ({ stage, transactionId }) => {
    console.log(`tx ${transactionId ?? '(pending)'} is now ${stage}`);
    });
    const { transaction } = await ceremony.wait();