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

Add to Address Book

Developers can use the SDK to add addresses to the address book associated with a multisig wallet. This functionality simplifies the management of addresses and provides a convenient way to keep track of contacts.

const address = '...' // The address you want to add to your address book
const name = 'Mat' // The name you want to assign to the address
const { data, error } = await client.addToAddressBook(address, name);

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

Response Data

// updated addressbook
[
  {
    "address": "5FHLH4HkrsJ6QmNrQBYFkk3b73XhrfBXNSxnQrp2qsoNimak"
    "name": "Tom",
  },
  {
    "address": "5Fe8gVNXoNoB5tbTc2jtTPBi5VAoBaRmMcjqZGnSZSYtVXiL",
    "name": "Harry"
  },
  {
    "address": "5EF9om9xiFbRMgjPcrH9fc2G8QUUXF4iibnFoPW2PRTC2shS",
    "name": "Mat"
  },
]
PreviousCreate MultisigNextRemove from Address Book

Last updated 1 year ago

๐Ÿค
Generic Error