Polkasafe SDK
  • ๐Ÿ›…Polkasafe SDK
  • ๐Ÿ“”What is polkadot.JS?
  • Getting started
    • ๐Ÿ”ƒInstallation
    • ๐Ÿ‘จโ€๐ŸซUsage Guide
  • Guides and tutorials
    • ๐Ÿ”—Connect Address
    • ๐Ÿ‘ฅCreate Multisig
    • ๐ŸคAdd to Address Book
    • โŽRemove from Address Book
    • ๐Ÿ“ŠGet Multisig Data by Address
    • ๐ŸงพGet Transactions for Multisig
    • ๐Ÿ’ธGet Assets for Multisig Address
    • ๐Ÿ“ฅGet Multisig Queue
    • โœ๏ธRename Multisig
    • โŒDelete Multisig
    • โœจCreate Proxy
    • ๐Ÿ“Edit Multisig
    • ๐Ÿ’ฐTransfer Funds
    • ๐Ÿ—ณ๏ธApprove Transaction
    • โ›”Cancel Transaction
    • ๐ŸˆบCustom Transaction
    • โ‰๏ธGeneric Errors
  • ๐Ÿ“งSupport and Contact
Powered by GitBook
On this page
  1. Guides and tutorials

Create Multisig

Developers can create multisig wallets using the SDK. This functionality enables the setup of wallets with multiple signatories, enhancing the security and decentralization of fund management.

Note: createMultisig will only create a multisig you need to do a existential deposite to onchain your multisig wallet

// To create a multisig wallet, a minimum of two signatories and a threshold of two are required.
// The signatories can be other user addresses participating in the multisig setup.
// Threshold represents the minimum number of approvals required from the signatories to send a transaction

const signatories = ['...', '...', '...'] // Array of substrate address
const threshold = 2 // number
const multisigName = 'Polka Multisig'

const { data, error } = await client.createMultisig(signatories, threshold, multisigName);

if (data){
    console.log(data)
    // use your data
}
else if(error){
    console.log(error)
}

Response Data

{
  "address": "5Hq6ZUJQi5PeRNVxXgi8tgjnuLdok2fyCXske1GixE5vZZ4X",
  "created_at": "2023-05-16T12:36:39.240Z",
  "updated_at": "2023-05-16T12:36:39.240Z",
  "disabled": false,
  "name": "Doc Test",
  "signatories": [
    "5CFSybkjCJsddmUoYpCuobzcZntmDqbnNBxknpn8rTRwt7DC",
    "5DZeMuT9k1NhaZHH9unxNakK4sGPpkXaV4x6zKmPuUMyxn83",
    "5EF9om9xiFbRMgjPcrH9fc2G8QUUXF4iibnFoPW2PRTC2shS",
  ],
  "network": "rococo",
  "threshold": 3
}
PreviousConnect AddressNextAdd to Address Book

Last updated 1 year ago

๐Ÿ‘ฅ
Generic Error