aftermath-ts-sdk 1.3.30-temp.18 → 1.3.30-temp.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multisigApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/multisig/api/multisigApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErE,qBAAa,WAAW;IAWX,OAAO,CAAC,QAAQ,CAAC,QAAQ;IANrC,SAAgB,sBAAsB,EAAE,sBAAsB,CAAC;gBAMlC,QAAQ,EAAE,YAAY;IAc5C,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY;
|
|
1
|
+
{"version":3,"file":"multisigApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/multisig/api/multisigApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErE,qBAAa,WAAW;IAWX,OAAO,CAAC,QAAQ,CAAC,QAAQ;IANrC,SAAgB,sBAAsB,EAAE,sBAAsB,CAAC;gBAMlC,QAAQ,EAAE,YAAY;IAc5C,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY;CA+BpE"}
|
|
@@ -19,10 +19,14 @@ class MultisigApi {
|
|
|
19
19
|
// =========================================================================
|
|
20
20
|
getMultisigForUser(inputs) {
|
|
21
21
|
const afPublicKeyBuffer = Buffer.from(this.sharedCustodyAddresses.publicKey || "", "base64");
|
|
22
|
-
// MARK: Shifting the first byte
|
|
22
|
+
// MARK: Shifting the first byte (scheme flag)
|
|
23
23
|
const afPublicKeyArray = new Uint8Array(afPublicKeyBuffer).subarray(1);
|
|
24
24
|
const afPK = new ed25519_1.Ed25519PublicKey(afPublicKeyArray);
|
|
25
|
-
|
|
25
|
+
// MARK: Strip the scheme flag byte from user key if present
|
|
26
|
+
const userPublicKeyArray = new Uint8Array(inputs.userPublicKey);
|
|
27
|
+
const userPK = new ed25519_1.Ed25519PublicKey(userPublicKeyArray.length === 33
|
|
28
|
+
? userPublicKeyArray.subarray(1)
|
|
29
|
+
: userPublicKeyArray);
|
|
26
30
|
const newMultiSigPublicKey = multisig_1.MultiSigPublicKey.fromPublicKeys({
|
|
27
31
|
threshold: 1,
|
|
28
32
|
publicKeys: [
|