πConnect Address
The SDK allows developers to connect to a specific address, enabling them to interact with the associated address.
NOTE: Connecting with polkasafe is essential. Before using any functions, use connect function to set the network, address, and injector.
import Polkasafe from 'polkasafe';
const client = new Polkasafe();
client.connect(network, address, injector);
//You need to provide your substrate address to connect the polkasafe SDK
const { data, error } = await client.connectAddress(substrateAddress);
if (data){
// Use your data
console.log(data.multisigAddresses)
}
else if(error){
console.log(error)
}Response Data
{
"address": "14XoE2TiRHxD6nY5LSiSVuMWVXRgNHovkEeKESK8Jducmjh4",
"email": null,
"created_at": "2023-04-27T09:02:44.206Z",
"addressBook": [
{
"address": "14XoE2TiRHxD6nY5LSiSVuMWVXRgNHovkEeKESK8Jducmjh4",
"name": "Tom"
},
{
"address": "14DdRPYpieZZrJPNMpbFttsjxfXMYxjfSwhGa9oPPxptu2nS",
"name": "Harry"
}
],
"multisigAddresses": [
{
"signatories": [
"14XoE2TiRHxD6nY5LSiSVuMWVXRgNHovkEeKESK8Jducmjh4",
"15mRD99sUWKZLoXM8hfakXceWbBqwwsRkayNUQ5Xu1iZ3gh6"
],
"address": "15aVHqroZpeRqCtdmB5TsgBg6d41MreToip4f5gpv6NsZwdk",
"updated_at": "2023-05-04T15:01:57.179Z",
"name": "Multi-test",
"created_at": "2023-05-04T15:01:57.179Z",
"disabled": false,
"threshold": 2,
"network": "polkadot"
}
],
"multisigSettings": {
"15LFPgXducxgriD5zWwiqrBeNATYqSonMa9r13EWcWRZtG3H": {
"deleted": false,
"name": "Testing Wallet"
}
}
} Last updated