0
    at Function.setOptions (C:\Users\user\Desktop\multisig\node_modules\stellar-base\lib\operations\set_options.js:137:13)
    at setMultisigOnEmekaAccount (C:\Users\user\Desktop\multisig\multisig.js:30:33)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)``

here is my code

```const { Server, Networks, TransactionBuilder, Operation, Keypair } = require('stellar-sdk');
const { emeka, ade} = require("./accounts.json");

const server = new Server("https://horizon-testnet.stellar.org");

const setMultisigOnEmekaAccount = async () => {
    const extraSigner = {
        signer: {
            ed2551PublicKey: ade.publicKey,
            weight: 1
        }
    };

    const thresholds = {
        masterWeight: 2,
        lowThreshold: 2,
        medThreshold: 3,
        highThreshold: 3,
    };

    const txOptions ={
        fee: await server.fetchBaseFee(),
        networkPassphrase: Networks.TESTNET
    };

    const emekaAccount = await server.loadAccount(emeka.publicKey);

    const multiSigTx = new TransactionBuilder(emekaAccount, txOptions)
        .addOperation(Operation.setOptions(thresholds))
        .addOperation(Operation.setOptions(extraSigner))
        .setTimeout(0)
        .build();
    
    multiSigTx.sign(Keypair.fromSecret(emeka.secret));

    await server.submitTransaction(multiSigTx);
};

setMultisigOnEmekaAccount()
    .then(() => {
        console.log("Signed");
    })
    .catch(e => {
        console.log(e)
    });```
1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    May 16, 2022 at 6:27

1 Answer 1

0

Probably because of the typo in the signer object: signer.ed25519PublicKey

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.