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. Getting started

Installation

Setting up the Polkasafe SDK is a straightforward process.

Here's a step-by-step guide to installing and using the SDK:

NOTE: Polkasafe is built on top of the Polkadot.js API, so make sure you have also installed the required packages: @polkadot/api and @polkadot/extension-dapp.

// npm
npm install polkasafe bn.js dayjs 

Creating an Instance

import { Polkasafe } from 'polkasafe';
const client = new Polkasafe();

NOTE: Connecting with polkasafe is essential. Before using any functions, use connect function to set the network, address, and injector.

/**
 * @param {string} network
 * @param {string} address
 * @param {Injected} injector
 */
// injector: Simplify transaction signing and submission using the injector parameter
client.connect(network, address, injector)

Replace network, address, and injector with your specific values. That's it! You have now set up the Polkasafe SDK and you are ready to start using it in your application.

PreviousWhat is polkadot.JS?NextUsage Guide

Last updated 1 year ago

๐Ÿ”ƒ