Update pairing process
This commit is contained in:
parent
5be3395154
commit
2a1bf902a5
@ -302,25 +302,22 @@ export default class Services {
|
|||||||
}
|
}
|
||||||
const myAddress: string = this.sdkClient.get_address();
|
const myAddress: string = this.sdkClient.get_address();
|
||||||
pairWith.push(myAddress);
|
pairWith.push(myAddress);
|
||||||
const newKey = this.sdkClient.get_new_keypair();
|
|
||||||
const pairingTemplate = {
|
const pairingTemplate = {
|
||||||
description: 'pairing',
|
description: 'pairing',
|
||||||
|
counter: 0,
|
||||||
roles: {
|
roles: {
|
||||||
owner: {
|
pairing: {
|
||||||
members: [{ sp_addresses: pairWith }],
|
members: [{ sp_addresses: pairWith }],
|
||||||
validation_rules: [
|
validation_rules: [
|
||||||
{
|
{
|
||||||
quorum: 1.0,
|
quorum: 1.0,
|
||||||
fields: ['description', 'roles', 'session_privkey', 'session_pubkey', 'key_parity'],
|
fields: ['description', 'roles', 'counter'],
|
||||||
min_sig_member: 1.0,
|
min_sig_member: 1.0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
storages: [storageUrl]
|
storages: [storageUrl]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
session_privkey: newKey['private_key'],
|
|
||||||
session_pubkey: newKey['x_only_public_key'],
|
|
||||||
key_parity: newKey['key_parity'],
|
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
return this.sdkClient.create_new_process(JSON.stringify(pairingTemplate), null, relayAddress, feeRate);
|
return this.sdkClient.create_new_process(JSON.stringify(pairingTemplate), null, relayAddress, feeRate);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user