Remove Spending Limit

Disclaimer: This function can only be used by controlled multisigs, meaning the multisig has a config authority. If you have an autonomous multisig, you should create a Config Transaction.

Typescript

import * as multisig from "@sqds/multisig";

// Cluster Connection
const connection = new Connection( < your rpc url > );

// Fee payer is the a signer that pays the transaction fees
const feePayer = Keypair.generate();

// Derive the multisig PDA
const multisigPda = multisig.getMultisigPda({
    // The createKey has to be a Public Key, see accounts reference for more info
    createKey,
})[0];

const spendingLimitPda = multisig.getSpendingLimitPda({
    multisigPda
    createKey: spendingLimitCreateKey,
})[0];

await multisig.rpc.multisigRemoveSpendingLimit({
    connection,
    multisigPda,
    spendingLimit: spendingLimitPda,
    configAuthority: null,
    feePayer: feePayer,
    rentCollector: feePayer.publicKey,
});

Last updated