@frequency-chain/ethereum-utils 1.17.0-rc6 → 1.17.0-rc7
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.
- package/browser/frequency-ethereum-utils.esm.min.js +103 -292
- package/browser/frequency-ethereum-utils.umd.min.js +103 -292
- package/cjs/signature.definitions.js +10 -3
- package/cjs/signature.js +13 -15
- package/esm/signature.definitions.js +9 -2
- package/esm/signature.js +14 -16
- package/index.d.ts +4 -3
- package/package.json +3 -3
- package/signature.d.ts +2 -2
- package/signature.definitions.d.ts +2 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {Keyring}from'@polkadot/api';/** @internal Last-resort "this", if it gets here it probably would fail anyway */
|
|
2
|
-
function evaluateThis
|
|
2
|
+
function evaluateThis(fn) {
|
|
3
3
|
return fn('return this');
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* A cross-environment implementation for globalThis
|
|
7
7
|
*/
|
|
8
|
-
const xglobal
|
|
8
|
+
const xglobal = (typeof globalThis !== 'undefined'
|
|
9
9
|
? globalThis
|
|
10
10
|
: typeof global !== 'undefined'
|
|
11
11
|
? global
|
|
@@ -13,19 +13,31 @@ const xglobal$3 = (typeof globalThis !== 'undefined'
|
|
|
13
13
|
? self
|
|
14
14
|
: typeof window !== 'undefined'
|
|
15
15
|
? window
|
|
16
|
-
: evaluateThis
|
|
16
|
+
: evaluateThis(Function));
|
|
17
17
|
/**
|
|
18
18
|
* Extracts a known global from the environment, applying a fallback if not found
|
|
19
19
|
*/
|
|
20
|
-
function extractGlobal
|
|
20
|
+
function extractGlobal(name, fallback) {
|
|
21
21
|
// Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea
|
|
22
22
|
// (as of now) as to why this looks like an "any" when we do cast it to a T
|
|
23
23
|
//
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
25
|
-
return typeof xglobal
|
|
25
|
+
return typeof xglobal[name] === 'undefined'
|
|
26
26
|
? fallback
|
|
27
|
-
: xglobal
|
|
28
|
-
}let
|
|
27
|
+
: xglobal[name];
|
|
28
|
+
}let TextDecoder$1=class TextDecoder {
|
|
29
|
+
__encoding;
|
|
30
|
+
constructor(encoding) {
|
|
31
|
+
this.__encoding = encoding;
|
|
32
|
+
}
|
|
33
|
+
decode(value) {
|
|
34
|
+
let result = '';
|
|
35
|
+
for (let i = 0, count = value.length; i < count; i++) {
|
|
36
|
+
result += String.fromCharCode(value[i]);
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
};const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', TextDecoder$1);let TextEncoder$2=class TextEncoder {
|
|
29
41
|
encode(value) {
|
|
30
42
|
const count = value.length;
|
|
31
43
|
const u8a = new Uint8Array(count);
|
|
@@ -34,7 +46,7 @@ function extractGlobal$2(name, fallback) {
|
|
|
34
46
|
}
|
|
35
47
|
return u8a;
|
|
36
48
|
}
|
|
37
|
-
};const TextEncoder$
|
|
49
|
+
};const TextEncoder$1 = /*#__PURE__*/ extractGlobal('TextEncoder', TextEncoder$2);/**
|
|
38
50
|
* @name isFunction
|
|
39
51
|
* @summary Tests for a `function`.
|
|
40
52
|
* @description
|
|
@@ -63,19 +75,19 @@ function isFunction(value) {
|
|
|
63
75
|
function invalidFallback() {
|
|
64
76
|
return Number.NaN;
|
|
65
77
|
}
|
|
66
|
-
const BigInt$1 = /*#__PURE__*/ extractGlobal
|
|
67
|
-
const U8$
|
|
68
|
-
const U16$
|
|
69
|
-
for (let i = 0, count = CHR$
|
|
70
|
-
U8$
|
|
78
|
+
const BigInt$1 = /*#__PURE__*/ extractGlobal('BigInt', invalidFallback);const CHR$1 = '0123456789abcdef';
|
|
79
|
+
const U8$1 = new Uint8Array(256);
|
|
80
|
+
const U16$1 = new Uint8Array(256 * 256);
|
|
81
|
+
for (let i = 0, count = CHR$1.length; i < count; i++) {
|
|
82
|
+
U8$1[CHR$1[i].charCodeAt(0) | 0] = i | 0;
|
|
71
83
|
if (i > 9) {
|
|
72
|
-
U8$
|
|
84
|
+
U8$1[CHR$1[i].toUpperCase().charCodeAt(0) | 0] = i | 0;
|
|
73
85
|
}
|
|
74
86
|
}
|
|
75
87
|
for (let i = 0; i < 256; i++) {
|
|
76
88
|
const s = i << 8;
|
|
77
89
|
for (let j = 0; j < 256; j++) {
|
|
78
|
-
U16$
|
|
90
|
+
U16$1[s | j] = (U8$1[i] << 4) | U8$1[j];
|
|
79
91
|
}
|
|
80
92
|
}
|
|
81
93
|
/**
|
|
@@ -93,7 +105,7 @@ for (let i = 0; i < 256; i++) {
|
|
|
93
105
|
* hexToU8a('0x80001f', 32); // Uint8Array([0x00, 0x80, 0x00, 0x1f])
|
|
94
106
|
* ```
|
|
95
107
|
*/
|
|
96
|
-
function hexToU8a
|
|
108
|
+
function hexToU8a(value, bitLength = -1) {
|
|
97
109
|
if (!value) {
|
|
98
110
|
return new Uint8Array();
|
|
99
111
|
}
|
|
@@ -113,7 +125,7 @@ function hexToU8a$1(value, bitLength = -1) {
|
|
|
113
125
|
// HEX_TO_U16[value.substring()] we get an 10x slowdown. In the
|
|
114
126
|
// same vein using charCodeAt (as opposed to value[s] or value.charAt(s)) is
|
|
115
127
|
// also the faster operation by at least 2x with the character map above
|
|
116
|
-
result[i] = U16$
|
|
128
|
+
result[i] = U16$1[(value.charCodeAt(s) << 8) | value.charCodeAt(s + 1)];
|
|
117
129
|
}
|
|
118
130
|
return result;
|
|
119
131
|
}function getDefaultExportFromCjs (x) {
|
|
@@ -125,7 +137,11 @@ function getAugmentedNamespace(n) {
|
|
|
125
137
|
var f = n.default;
|
|
126
138
|
if (typeof f == "function") {
|
|
127
139
|
var a = function a () {
|
|
128
|
-
|
|
140
|
+
var isInstance = false;
|
|
141
|
+
try {
|
|
142
|
+
isInstance = this instanceof a;
|
|
143
|
+
} catch {}
|
|
144
|
+
if (isInstance) {
|
|
129
145
|
return Reflect.construct(f, arguments, this.constructor);
|
|
130
146
|
}
|
|
131
147
|
return f.apply(this, arguments);
|
|
@@ -3548,9 +3564,9 @@ function isObject(value) {
|
|
|
3548
3564
|
}const isToBigInt = /*#__PURE__*/ isOn('toBigInt');const isToBn = /*#__PURE__*/ isOn('toBn');/** true if the environment has proper BigInt support */
|
|
3549
3565
|
const hasBigInt = typeof BigInt$1 === 'function' && typeof BigInt$1.asIntN === 'function';
|
|
3550
3566
|
/** true if the environment has support for Buffer (typically Node.js) */
|
|
3551
|
-
const hasBuffer = typeof xglobal
|
|
3567
|
+
const hasBuffer = typeof xglobal.Buffer === 'function' && typeof xglobal.Buffer.isBuffer === 'function';
|
|
3552
3568
|
/** true if the environment has process available (typically Node.js) */
|
|
3553
|
-
typeof xglobal
|
|
3569
|
+
typeof xglobal.process === 'object';/**
|
|
3554
3570
|
* @name isBuffer
|
|
3555
3571
|
* @summary Tests for a `Buffer` object instance.
|
|
3556
3572
|
* @description
|
|
@@ -3566,7 +3582,7 @@ typeof xglobal$3.process === 'object';/**
|
|
|
3566
3582
|
*/
|
|
3567
3583
|
function isBuffer(value) {
|
|
3568
3584
|
// we do check a function first, since it is slightly faster than isBuffer itself
|
|
3569
|
-
return hasBuffer && !!value && isFunction(value.readDoubleLE) && xglobal
|
|
3585
|
+
return hasBuffer && !!value && isFunction(value.readDoubleLE) && xglobal.Buffer.isBuffer(value);
|
|
3570
3586
|
}/**
|
|
3571
3587
|
* @name isU8a
|
|
3572
3588
|
* @summary Tests for a `Uint8Array` object instance.
|
|
@@ -3586,7 +3602,7 @@ function isU8a(value) {
|
|
|
3586
3602
|
// slower than just checking the constrctor (direct instances)
|
|
3587
3603
|
return (((value && value.constructor) === Uint8Array) ||
|
|
3588
3604
|
value instanceof Uint8Array);
|
|
3589
|
-
}const encoder
|
|
3605
|
+
}const encoder = new TextEncoder$1();
|
|
3590
3606
|
/**
|
|
3591
3607
|
* @name stringToU8a
|
|
3592
3608
|
* @summary Creates a Uint8Array object from a utf-8 string.
|
|
@@ -3601,9 +3617,9 @@ function isU8a(value) {
|
|
|
3601
3617
|
* stringToU8a('hello'); // [0x68, 0x65, 0x6c, 0x6c, 0x6f]
|
|
3602
3618
|
* ```
|
|
3603
3619
|
*/
|
|
3604
|
-
function stringToU8a
|
|
3620
|
+
function stringToU8a(value) {
|
|
3605
3621
|
return value
|
|
3606
|
-
? encoder
|
|
3622
|
+
? encoder.encode(value.toString())
|
|
3607
3623
|
: new Uint8Array();
|
|
3608
3624
|
}/**
|
|
3609
3625
|
* @name u8aToU8a
|
|
@@ -3629,10 +3645,10 @@ function u8aToU8a(value) {
|
|
|
3629
3645
|
? new Uint8Array(value)
|
|
3630
3646
|
: value
|
|
3631
3647
|
: isHex(value)
|
|
3632
|
-
? hexToU8a
|
|
3648
|
+
? hexToU8a(value)
|
|
3633
3649
|
: Array.isArray(value)
|
|
3634
3650
|
? new Uint8Array(value)
|
|
3635
|
-
: stringToU8a
|
|
3651
|
+
: stringToU8a(value);
|
|
3636
3652
|
}/**
|
|
3637
3653
|
* @name u8aConcat
|
|
3638
3654
|
* @summary Creates a concatenated Uint8Array from the inputs.
|
|
@@ -3678,26 +3694,26 @@ function u8aConcatStrict(u8as, length = 0) {
|
|
|
3678
3694
|
offset += u8as[i].length;
|
|
3679
3695
|
}
|
|
3680
3696
|
return result;
|
|
3681
|
-
}const U8
|
|
3682
|
-
const U16
|
|
3697
|
+
}const U8 = new Array(256);
|
|
3698
|
+
const U16 = new Array(256 * 256);
|
|
3683
3699
|
for (let n = 0; n < 256; n++) {
|
|
3684
|
-
U8
|
|
3700
|
+
U8[n] = n.toString(16).padStart(2, '0');
|
|
3685
3701
|
}
|
|
3686
3702
|
for (let i = 0; i < 256; i++) {
|
|
3687
3703
|
const s = i << 8;
|
|
3688
3704
|
for (let j = 0; j < 256; j++) {
|
|
3689
|
-
U16
|
|
3705
|
+
U16[s | j] = U8[i] + U8[j];
|
|
3690
3706
|
}
|
|
3691
3707
|
}
|
|
3692
3708
|
/** @internal */
|
|
3693
|
-
function hex
|
|
3709
|
+
function hex(value, result) {
|
|
3694
3710
|
const mod = (value.length % 2) | 0;
|
|
3695
3711
|
const length = (value.length - mod) | 0;
|
|
3696
3712
|
for (let i = 0; i < length; i += 2) {
|
|
3697
|
-
result += U16
|
|
3713
|
+
result += U16[(value[i] << 8) | value[i + 1]];
|
|
3698
3714
|
}
|
|
3699
3715
|
if (mod) {
|
|
3700
|
-
result += U8
|
|
3716
|
+
result += U8[value[length] | 0];
|
|
3701
3717
|
}
|
|
3702
3718
|
return result;
|
|
3703
3719
|
}
|
|
@@ -3715,7 +3731,7 @@ function hex$1(value, result) {
|
|
|
3715
3731
|
* u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f
|
|
3716
3732
|
* ```
|
|
3717
3733
|
*/
|
|
3718
|
-
function u8aToHex
|
|
3734
|
+
function u8aToHex(value, bitLength = -1, isPrefixed = true) {
|
|
3719
3735
|
// this is not 100% correct sinmce we support isPrefixed = false....
|
|
3720
3736
|
const empty = isPrefixed
|
|
3721
3737
|
? '0x'
|
|
@@ -3726,10 +3742,29 @@ function u8aToHex$1(value, bitLength = -1, isPrefixed = true) {
|
|
|
3726
3742
|
else if (bitLength > 0) {
|
|
3727
3743
|
const length = Math.ceil(bitLength / 8);
|
|
3728
3744
|
if (value.length > length) {
|
|
3729
|
-
return `${hex
|
|
3745
|
+
return `${hex(value.subarray(0, length / 2), empty)}…${hex(value.subarray(value.length - length / 2), '')}`;
|
|
3730
3746
|
}
|
|
3731
3747
|
}
|
|
3732
|
-
return hex
|
|
3748
|
+
return hex(value, empty);
|
|
3749
|
+
}const decoder = new TextDecoder('utf-8');
|
|
3750
|
+
/**
|
|
3751
|
+
* @name u8aToString
|
|
3752
|
+
* @summary Creates a utf-8 string from a Uint8Array object.
|
|
3753
|
+
* @description
|
|
3754
|
+
* `UInt8Array` input values return the actual decoded utf-8 string. `null` or `undefined` values returns an empty string.
|
|
3755
|
+
* @example
|
|
3756
|
+
* <BR>
|
|
3757
|
+
*
|
|
3758
|
+
* ```javascript
|
|
3759
|
+
* import { u8aToString } from '@polkadot/util';
|
|
3760
|
+
*
|
|
3761
|
+
* u8aToString(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f])); // hello
|
|
3762
|
+
* ```
|
|
3763
|
+
*/
|
|
3764
|
+
function u8aToString(value) {
|
|
3765
|
+
return value
|
|
3766
|
+
? decoder.decode(value)
|
|
3767
|
+
: '';
|
|
3733
3768
|
}/**
|
|
3734
3769
|
* @name hexStripPrefix
|
|
3735
3770
|
* @summary Strips any leading `0x` prefix.
|
|
@@ -3861,240 +3896,7 @@ function bnToU8a(value, { bitLength = -1, isLe = true, isNegative = false } = DE
|
|
|
3861
3896
|
: valueBn;
|
|
3862
3897
|
output.set(bn.toArray(isLe ? 'le' : 'be', byteLength), 0);
|
|
3863
3898
|
return output;
|
|
3864
|
-
}
|
|
3865
|
-
function evaluateThis$2(fn) {
|
|
3866
|
-
return fn('return this');
|
|
3867
|
-
}
|
|
3868
|
-
/**
|
|
3869
|
-
* A cross-environment implementation for globalThis
|
|
3870
|
-
*/
|
|
3871
|
-
const xglobal$2 = (typeof globalThis !== 'undefined'
|
|
3872
|
-
? globalThis
|
|
3873
|
-
: typeof global !== 'undefined'
|
|
3874
|
-
? global
|
|
3875
|
-
: typeof self !== 'undefined'
|
|
3876
|
-
? self
|
|
3877
|
-
: typeof window !== 'undefined'
|
|
3878
|
-
? window
|
|
3879
|
-
: evaluateThis$2(Function));
|
|
3880
|
-
/**
|
|
3881
|
-
* Extracts a known global from the environment, applying a fallback if not found
|
|
3882
|
-
*/
|
|
3883
|
-
function extractGlobal$1(name, fallback) {
|
|
3884
|
-
// Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea
|
|
3885
|
-
// (as of now) as to why this looks like an "any" when we do cast it to a T
|
|
3886
|
-
//
|
|
3887
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
3888
|
-
return typeof xglobal$2[name] === 'undefined'
|
|
3889
|
-
? fallback
|
|
3890
|
-
: xglobal$2[name];
|
|
3891
|
-
}let TextDecoder$1=class TextDecoder {
|
|
3892
|
-
__encoding;
|
|
3893
|
-
constructor(encoding) {
|
|
3894
|
-
this.__encoding = encoding;
|
|
3895
|
-
}
|
|
3896
|
-
decode(value) {
|
|
3897
|
-
let result = '';
|
|
3898
|
-
for (let i = 0, count = value.length; i < count; i++) {
|
|
3899
|
-
result += String.fromCharCode(value[i]);
|
|
3900
|
-
}
|
|
3901
|
-
return result;
|
|
3902
|
-
}
|
|
3903
|
-
};const TextDecoder = /*#__PURE__*/ extractGlobal$1('TextDecoder', TextDecoder$1);/** @internal Last-resort "this", if it gets here it probably would fail anyway */
|
|
3904
|
-
function evaluateThis$1(fn) {
|
|
3905
|
-
return fn('return this');
|
|
3906
|
-
}
|
|
3907
|
-
/**
|
|
3908
|
-
* A cross-environment implementation for globalThis
|
|
3909
|
-
*/
|
|
3910
|
-
const xglobal$1 = (typeof globalThis !== 'undefined'
|
|
3911
|
-
? globalThis
|
|
3912
|
-
: typeof global !== 'undefined'
|
|
3913
|
-
? global
|
|
3914
|
-
: typeof self !== 'undefined'
|
|
3915
|
-
? self
|
|
3916
|
-
: typeof window !== 'undefined'
|
|
3917
|
-
? window
|
|
3918
|
-
: evaluateThis$1(Function));
|
|
3919
|
-
/**
|
|
3920
|
-
* Extracts a known global from the environment, applying a fallback if not found
|
|
3921
|
-
*/
|
|
3922
|
-
function extractGlobal(name, fallback) {
|
|
3923
|
-
// Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea
|
|
3924
|
-
// (as of now) as to why this looks like an "any" when we do cast it to a T
|
|
3925
|
-
//
|
|
3926
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
3927
|
-
return typeof xglobal$1[name] === 'undefined'
|
|
3928
|
-
? fallback
|
|
3929
|
-
: xglobal$1[name];
|
|
3930
|
-
}let TextEncoder$2=class TextEncoder {
|
|
3931
|
-
encode(value) {
|
|
3932
|
-
const count = value.length;
|
|
3933
|
-
const u8a = new Uint8Array(count);
|
|
3934
|
-
for (let i = 0; i < count; i++) {
|
|
3935
|
-
u8a[i] = value.charCodeAt(i);
|
|
3936
|
-
}
|
|
3937
|
-
return u8a;
|
|
3938
|
-
}
|
|
3939
|
-
};const TextEncoder$1 = /*#__PURE__*/ extractGlobal('TextEncoder', TextEncoder$2);const CHR$1 = '0123456789abcdef';
|
|
3940
|
-
const U8$1 = new Uint8Array(256);
|
|
3941
|
-
const U16$1 = new Uint8Array(256 * 256);
|
|
3942
|
-
for (let i = 0, count = CHR$1.length; i < count; i++) {
|
|
3943
|
-
U8$1[CHR$1[i].charCodeAt(0) | 0] = i | 0;
|
|
3944
|
-
if (i > 9) {
|
|
3945
|
-
U8$1[CHR$1[i].toUpperCase().charCodeAt(0) | 0] = i | 0;
|
|
3946
|
-
}
|
|
3947
|
-
}
|
|
3948
|
-
for (let i = 0; i < 256; i++) {
|
|
3949
|
-
const s = i << 8;
|
|
3950
|
-
for (let j = 0; j < 256; j++) {
|
|
3951
|
-
U16$1[s | j] = (U8$1[i] << 4) | U8$1[j];
|
|
3952
|
-
}
|
|
3953
|
-
}
|
|
3954
|
-
/**
|
|
3955
|
-
* @name hexToU8a
|
|
3956
|
-
* @summary Creates a Uint8Array object from a hex string.
|
|
3957
|
-
* @description
|
|
3958
|
-
* `null` inputs returns an empty `Uint8Array` result. Hex input values return the actual bytes value converted to a Uint8Array. Anything that is not a hex string (including the `0x` prefix) throws an error.
|
|
3959
|
-
* @example
|
|
3960
|
-
* <BR>
|
|
3961
|
-
*
|
|
3962
|
-
* ```javascript
|
|
3963
|
-
* import { hexToU8a } from '@polkadot/util';
|
|
3964
|
-
*
|
|
3965
|
-
* hexToU8a('0x80001f'); // Uint8Array([0x80, 0x00, 0x1f])
|
|
3966
|
-
* hexToU8a('0x80001f', 32); // Uint8Array([0x00, 0x80, 0x00, 0x1f])
|
|
3967
|
-
* ```
|
|
3968
|
-
*/
|
|
3969
|
-
function hexToU8a(value, bitLength = -1) {
|
|
3970
|
-
if (!value) {
|
|
3971
|
-
return new Uint8Array();
|
|
3972
|
-
}
|
|
3973
|
-
let s = value.startsWith('0x')
|
|
3974
|
-
? 2
|
|
3975
|
-
: 0;
|
|
3976
|
-
const decLength = Math.ceil((value.length - s) / 2);
|
|
3977
|
-
const endLength = Math.ceil(bitLength === -1
|
|
3978
|
-
? decLength
|
|
3979
|
-
: bitLength / 8);
|
|
3980
|
-
const result = new Uint8Array(endLength);
|
|
3981
|
-
const offset = endLength > decLength
|
|
3982
|
-
? endLength - decLength
|
|
3983
|
-
: 0;
|
|
3984
|
-
for (let i = offset; i < endLength; i++, s += 2) {
|
|
3985
|
-
// The big factor here is actually the string lookups. If we do
|
|
3986
|
-
// HEX_TO_U16[value.substring()] we get an 10x slowdown. In the
|
|
3987
|
-
// same vein using charCodeAt (as opposed to value[s] or value.charAt(s)) is
|
|
3988
|
-
// also the faster operation by at least 2x with the character map above
|
|
3989
|
-
result[i] = U16$1[(value.charCodeAt(s) << 8) | value.charCodeAt(s + 1)];
|
|
3990
|
-
}
|
|
3991
|
-
return result;
|
|
3992
|
-
}const encoder = new TextEncoder$1();
|
|
3993
|
-
/**
|
|
3994
|
-
* @name stringToU8a
|
|
3995
|
-
* @summary Creates a Uint8Array object from a utf-8 string.
|
|
3996
|
-
* @description
|
|
3997
|
-
* String input values return the actual encoded `UInt8Array`. `null` or `undefined` values returns an empty encoded array.
|
|
3998
|
-
* @example
|
|
3999
|
-
* <BR>
|
|
4000
|
-
*
|
|
4001
|
-
* ```javascript
|
|
4002
|
-
* import { stringToU8a } from '@polkadot/util';
|
|
4003
|
-
*
|
|
4004
|
-
* stringToU8a('hello'); // [0x68, 0x65, 0x6c, 0x6c, 0x6f]
|
|
4005
|
-
* ```
|
|
4006
|
-
*/
|
|
4007
|
-
function stringToU8a(value) {
|
|
4008
|
-
return value
|
|
4009
|
-
? encoder.encode(value.toString())
|
|
4010
|
-
: new Uint8Array();
|
|
4011
|
-
}const U8 = new Array(256);
|
|
4012
|
-
const U16 = new Array(256 * 256);
|
|
4013
|
-
for (let n = 0; n < 256; n++) {
|
|
4014
|
-
U8[n] = n.toString(16).padStart(2, '0');
|
|
4015
|
-
}
|
|
4016
|
-
for (let i = 0; i < 256; i++) {
|
|
4017
|
-
const s = i << 8;
|
|
4018
|
-
for (let j = 0; j < 256; j++) {
|
|
4019
|
-
U16[s | j] = U8[i] + U8[j];
|
|
4020
|
-
}
|
|
4021
|
-
}
|
|
4022
|
-
/** @internal */
|
|
4023
|
-
function hex(value, result) {
|
|
4024
|
-
const mod = (value.length % 2) | 0;
|
|
4025
|
-
const length = (value.length - mod) | 0;
|
|
4026
|
-
for (let i = 0; i < length; i += 2) {
|
|
4027
|
-
result += U16[(value[i] << 8) | value[i + 1]];
|
|
4028
|
-
}
|
|
4029
|
-
if (mod) {
|
|
4030
|
-
result += U8[value[length] | 0];
|
|
4031
|
-
}
|
|
4032
|
-
return result;
|
|
4033
|
-
}
|
|
4034
|
-
/**
|
|
4035
|
-
* @name u8aToHex
|
|
4036
|
-
* @summary Creates a hex string from a Uint8Array object.
|
|
4037
|
-
* @description
|
|
4038
|
-
* `UInt8Array` input values return the actual hex string. `null` or `undefined` values returns an `0x` string.
|
|
4039
|
-
* @example
|
|
4040
|
-
* <BR>
|
|
4041
|
-
*
|
|
4042
|
-
* ```javascript
|
|
4043
|
-
* import { u8aToHex } from '@polkadot/util';
|
|
4044
|
-
*
|
|
4045
|
-
* u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f
|
|
4046
|
-
* ```
|
|
4047
|
-
*/
|
|
4048
|
-
function u8aToHex(value, bitLength = -1, isPrefixed = true) {
|
|
4049
|
-
// this is not 100% correct sinmce we support isPrefixed = false....
|
|
4050
|
-
const empty = isPrefixed
|
|
4051
|
-
? '0x'
|
|
4052
|
-
: '';
|
|
4053
|
-
if (!value?.length) {
|
|
4054
|
-
return empty;
|
|
4055
|
-
}
|
|
4056
|
-
else if (bitLength > 0) {
|
|
4057
|
-
const length = Math.ceil(bitLength / 8);
|
|
4058
|
-
if (value.length > length) {
|
|
4059
|
-
return `${hex(value.subarray(0, length / 2), empty)}…${hex(value.subarray(value.length - length / 2), '')}`;
|
|
4060
|
-
}
|
|
4061
|
-
}
|
|
4062
|
-
return hex(value, empty);
|
|
4063
|
-
}const decoder = new TextDecoder('utf-8');
|
|
4064
|
-
/**
|
|
4065
|
-
* @name u8aToString
|
|
4066
|
-
* @summary Creates a utf-8 string from a Uint8Array object.
|
|
4067
|
-
* @description
|
|
4068
|
-
* `UInt8Array` input values return the actual decoded utf-8 string. `null` or `undefined` values returns an empty string.
|
|
4069
|
-
* @example
|
|
4070
|
-
* <BR>
|
|
4071
|
-
*
|
|
4072
|
-
* ```javascript
|
|
4073
|
-
* import { u8aToString } from '@polkadot/util';
|
|
4074
|
-
*
|
|
4075
|
-
* u8aToString(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f])); // hello
|
|
4076
|
-
* ```
|
|
4077
|
-
*/
|
|
4078
|
-
function u8aToString(value) {
|
|
4079
|
-
return value
|
|
4080
|
-
? decoder.decode(value)
|
|
4081
|
-
: '';
|
|
4082
|
-
}/** @internal Last-resort "this", if it gets here it probably would fail anyway */
|
|
4083
|
-
function evaluateThis(fn) {
|
|
4084
|
-
return fn('return this');
|
|
4085
|
-
}
|
|
4086
|
-
/**
|
|
4087
|
-
* A cross-environment implementation for globalThis
|
|
4088
|
-
*/
|
|
4089
|
-
const xglobal = (typeof globalThis !== 'undefined'
|
|
4090
|
-
? globalThis
|
|
4091
|
-
: typeof global !== 'undefined'
|
|
4092
|
-
? global
|
|
4093
|
-
: typeof self !== 'undefined'
|
|
4094
|
-
? self
|
|
4095
|
-
: typeof window !== 'undefined'
|
|
4096
|
-
? window
|
|
4097
|
-
: evaluateThis(Function));const crypto$3 = xglobal.crypto;
|
|
3899
|
+
}const crypto$3 = xglobal.crypto;
|
|
4098
3900
|
function getRandomValues(arr) {
|
|
4099
3901
|
return crypto$3.getRandomValues(arr);
|
|
4100
3902
|
}const DEFAULT_CRYPTO = { getRandomValues };
|
|
@@ -5767,7 +5569,7 @@ function blake2AsU8a(data, bitLength = 256, key, onlyJs) {
|
|
|
5767
5569
|
: key
|
|
5768
5570
|
? blake2b(u8a, { dkLen: byteLength, key })
|
|
5769
5571
|
: blake2b(u8a, { dkLen: byteLength });
|
|
5770
|
-
}const SS58_PREFIX = stringToU8a
|
|
5572
|
+
}const SS58_PREFIX = stringToU8a('SS58PRE');
|
|
5771
5573
|
function sshash(key) {
|
|
5772
5574
|
return blake2AsU8a(u8aConcat(SS58_PREFIX, key), 512);
|
|
5773
5575
|
}function checkAddressChecksum(decoded) {
|
|
@@ -7791,6 +7593,9 @@ var knownSubstrate = [
|
|
|
7791
7593
|
'0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636', // Kusama CC2
|
|
7792
7594
|
'0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf' // Kusama CC1
|
|
7793
7595
|
],
|
|
7596
|
+
liberland: [
|
|
7597
|
+
'0x6bd89e052d67a45bb60a9a23e8581053d5e0d619f15cb9865946937e690c42d6'
|
|
7598
|
+
],
|
|
7794
7599
|
matrixchain: [
|
|
7795
7600
|
'0x3af4ff48ec76d2efc8476730f423ac07e25ad48f5f4c9dc39c778b164d808615'
|
|
7796
7601
|
],
|
|
@@ -7917,6 +7722,7 @@ var knownSubstrate = [
|
|
|
7917
7722
|
karura: 0x000002ae,
|
|
7918
7723
|
khala: 0x000001b2,
|
|
7919
7724
|
kusama: 0x000001b2,
|
|
7725
|
+
liberland: 0x000002ff,
|
|
7920
7726
|
matrixchain: 0x00000483,
|
|
7921
7727
|
nodle: 0x000003eb,
|
|
7922
7728
|
origintrail: 0x00000162,
|
|
@@ -10698,8 +10504,8 @@ function ethereumEncode(addressOrPublic) {
|
|
|
10698
10504
|
if (![20, 32, 33, 65].includes(u8aAddress.length)) {
|
|
10699
10505
|
throw new Error(`Invalid address or publicKey provided, received ${u8aAddress.length} bytes input`);
|
|
10700
10506
|
}
|
|
10701
|
-
const address = u8aToHex
|
|
10702
|
-
const hash = u8aToHex
|
|
10507
|
+
const address = u8aToHex(getH160(u8aAddress), -1, false);
|
|
10508
|
+
const hash = u8aToHex(keccakAsU8a(address), -1, false);
|
|
10703
10509
|
let result = '';
|
|
10704
10510
|
for (let i = 0; i < 40; i++) {
|
|
10705
10511
|
result = `${result}${parseInt(hash[i], 16) > 7 ? address[i].toUpperCase() : address[i]}`;
|
|
@@ -19605,8 +19411,15 @@ function assert(condition, message) {
|
|
|
19605
19411
|
},
|
|
19606
19412
|
],
|
|
19607
19413
|
};
|
|
19608
|
-
// using
|
|
19609
|
-
const
|
|
19414
|
+
// using 2091 for mainnet
|
|
19415
|
+
const EIP712_DOMAIN_MAINNET = {
|
|
19416
|
+
name: 'Frequency',
|
|
19417
|
+
version: '1',
|
|
19418
|
+
chainId: '0x082B',
|
|
19419
|
+
verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
|
19420
|
+
};
|
|
19421
|
+
// using pallet_revive test chain ID for testnet/dev
|
|
19422
|
+
const EIP712_DOMAIN_TESTNET = {
|
|
19610
19423
|
name: 'Frequency',
|
|
19611
19424
|
version: '1',
|
|
19612
19425
|
chainId: '0x190f1b44',
|
|
@@ -19764,22 +19577,21 @@ const SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION = {
|
|
|
19764
19577
|
type: 'string',
|
|
19765
19578
|
},
|
|
19766
19579
|
],
|
|
19767
|
-
};var signatureDefinitions=/*#__PURE__*/Object.freeze({__proto__:null,ADD_KEY_DATA_DEFINITION:ADD_KEY_DATA_DEFINITION,ADD_PROVIDER_DEFINITION:ADD_PROVIDER_DEFINITION,AUTHORIZED_KEY_DATA_DEFINITION:AUTHORIZED_KEY_DATA_DEFINITION,CLAIM_HANDLE_PAYLOAD_DEFINITION:CLAIM_HANDLE_PAYLOAD_DEFINITION,
|
|
19580
|
+
};var signatureDefinitions=/*#__PURE__*/Object.freeze({__proto__:null,ADD_KEY_DATA_DEFINITION:ADD_KEY_DATA_DEFINITION,ADD_PROVIDER_DEFINITION:ADD_PROVIDER_DEFINITION,AUTHORIZED_KEY_DATA_DEFINITION:AUTHORIZED_KEY_DATA_DEFINITION,CLAIM_HANDLE_PAYLOAD_DEFINITION:CLAIM_HANDLE_PAYLOAD_DEFINITION,EIP712_DOMAIN_DEFINITION:EIP712_DOMAIN_DEFINITION,EIP712_DOMAIN_MAINNET:EIP712_DOMAIN_MAINNET,EIP712_DOMAIN_TESTNET:EIP712_DOMAIN_TESTNET,ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2:ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2,PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2:PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2,PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2:PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2,PASSKEY_PUBLIC_KEY_DEFINITION:PASSKEY_PUBLIC_KEY_DEFINITION,SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION:SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION});/**
|
|
19768
19581
|
* Signing EIP-712 or ERC-191 compatible signature based on payload
|
|
19769
19582
|
* @param secretKey
|
|
19770
19583
|
* @param payload
|
|
19771
19584
|
* @param chain
|
|
19772
19585
|
*/
|
|
19773
|
-
async function sign(secretKey, payload, chain
|
|
19586
|
+
async function sign(secretKey, payload, chain) {
|
|
19774
19587
|
const signatureType = getSignatureType(payload.type);
|
|
19775
19588
|
const normalizedPayload = normalizePayload(payload);
|
|
19776
19589
|
const wallet = new Wallet(secretKey);
|
|
19777
19590
|
let signature;
|
|
19778
19591
|
switch (signatureType) {
|
|
19779
19592
|
case 'EIP-712':
|
|
19780
|
-
// TODO: use correct chainID for different networks
|
|
19781
19593
|
// TODO: use correct contract address for different payloads
|
|
19782
|
-
signature = await wallet.signTypedData(
|
|
19594
|
+
signature = await wallet.signTypedData(chain === 'Mainnet-Frequency' ? EIP712_DOMAIN_MAINNET : EIP712_DOMAIN_TESTNET, getTypesFor(payload.type), normalizedPayload);
|
|
19783
19595
|
break;
|
|
19784
19596
|
case 'EIP-191':
|
|
19785
19597
|
signature = await wallet.signMessage(payload.message);
|
|
@@ -19796,15 +19608,14 @@ async function sign(secretKey, payload, chain = 'Mainnet-Frequency') {
|
|
|
19796
19608
|
* @param payload
|
|
19797
19609
|
* @param chain
|
|
19798
19610
|
*/
|
|
19799
|
-
function verifySignature(ethereumAddress, signature, payload, chain
|
|
19611
|
+
function verifySignature(ethereumAddress, signature, payload, chain) {
|
|
19800
19612
|
const signatureType = getSignatureType(payload.type);
|
|
19801
19613
|
const normalizedPayload = normalizePayload(payload);
|
|
19802
19614
|
let recoveredAddress;
|
|
19803
19615
|
switch (signatureType) {
|
|
19804
19616
|
case 'EIP-712':
|
|
19805
|
-
// TODO: use correct chainID for different networks
|
|
19806
19617
|
// TODO: use correct contract address for different payloads
|
|
19807
|
-
recoveredAddress = verifyTypedData(
|
|
19618
|
+
recoveredAddress = verifyTypedData(chain === 'Mainnet-Frequency' ? EIP712_DOMAIN_MAINNET : EIP712_DOMAIN_TESTNET, getTypesFor(payload.type), normalizedPayload, signature);
|
|
19808
19619
|
break;
|
|
19809
19620
|
case 'EIP-191':
|
|
19810
19621
|
recoveredAddress = verifyMessage(payload.message, signature);
|
|
@@ -20077,7 +19888,7 @@ function createSiwfLoginRequestPayload(message) {
|
|
|
20077
19888
|
* @param expirationBlock Block number after which this payload is invalid
|
|
20078
19889
|
* @param domain
|
|
20079
19890
|
*/
|
|
20080
|
-
function getEip712BrowserRequestAddKeyData(msaId, newPublicKey, expirationBlock, domain =
|
|
19891
|
+
function getEip712BrowserRequestAddKeyData(msaId, newPublicKey, expirationBlock, domain = EIP712_DOMAIN_MAINNET) {
|
|
20081
19892
|
const message = createAddKeyData(msaId, newPublicKey, expirationBlock);
|
|
20082
19893
|
const normalized = normalizePayload(message);
|
|
20083
19894
|
return createEip712Payload(ADD_KEY_DATA_DEFINITION, message.type, domain, normalized);
|
|
@@ -20090,7 +19901,7 @@ function getEip712BrowserRequestAddKeyData(msaId, newPublicKey, expirationBlock,
|
|
|
20090
19901
|
* @param expirationBlock Block number after which this payload is invalid
|
|
20091
19902
|
* @param domain
|
|
20092
19903
|
*/
|
|
20093
|
-
function getEip712BrowserRequestAuthorizedKeyData(msaId, authorizedPublicKey, expirationBlock, domain =
|
|
19904
|
+
function getEip712BrowserRequestAuthorizedKeyData(msaId, authorizedPublicKey, expirationBlock, domain = EIP712_DOMAIN_MAINNET) {
|
|
20094
19905
|
const message = createAuthorizedKeyData(msaId, authorizedPublicKey, expirationBlock);
|
|
20095
19906
|
const normalized = normalizePayload(message);
|
|
20096
19907
|
return createEip712Payload(AUTHORIZED_KEY_DATA_DEFINITION, message.type, domain, normalized);
|
|
@@ -20103,7 +19914,7 @@ function getEip712BrowserRequestAuthorizedKeyData(msaId, authorizedPublicKey, ex
|
|
|
20103
19914
|
* @param expirationBlock Block number after which this payload is invalid
|
|
20104
19915
|
* @param domain
|
|
20105
19916
|
*/
|
|
20106
|
-
function getEip712BrowserRequestAddProvider(authorizedMsaId, schemaIds, expirationBlock, domain =
|
|
19917
|
+
function getEip712BrowserRequestAddProvider(authorizedMsaId, schemaIds, expirationBlock, domain = EIP712_DOMAIN_MAINNET) {
|
|
20107
19918
|
const message = createAddProvider(authorizedMsaId, schemaIds, expirationBlock);
|
|
20108
19919
|
const normalized = normalizePayload(message);
|
|
20109
19920
|
return createEip712Payload(ADD_PROVIDER_DEFINITION, message.type, domain, normalized);
|
|
@@ -20118,7 +19929,7 @@ function getEip712BrowserRequestAddProvider(authorizedMsaId, schemaIds, expirati
|
|
|
20118
19929
|
* @param payload HexString or Uint8Array data to upsert
|
|
20119
19930
|
* @param domain
|
|
20120
19931
|
*/
|
|
20121
|
-
function getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2(schemaId, pageId, targetHash, expiration, payload, domain =
|
|
19932
|
+
function getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2(schemaId, pageId, targetHash, expiration, payload, domain = EIP712_DOMAIN_MAINNET) {
|
|
20122
19933
|
const message = createPaginatedUpsertSignaturePayloadV2(schemaId, pageId, targetHash, expiration, payload);
|
|
20123
19934
|
const normalized = normalizePayload(message);
|
|
20124
19935
|
return createEip712Payload(PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2, message.type, domain, normalized);
|
|
@@ -20132,7 +19943,7 @@ function getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2(schemaId, page
|
|
|
20132
19943
|
* @param expiration uint32 expiration block
|
|
20133
19944
|
* @param domain
|
|
20134
19945
|
*/
|
|
20135
|
-
function getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2(schemaId, pageId, targetHash, expiration, domain =
|
|
19946
|
+
function getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2(schemaId, pageId, targetHash, expiration, domain = EIP712_DOMAIN_MAINNET) {
|
|
20136
19947
|
const message = createPaginatedDeleteSignaturePayloadV2(schemaId, pageId, targetHash, expiration);
|
|
20137
19948
|
const normalized = normalizePayload(message);
|
|
20138
19949
|
return createEip712Payload(PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2, message.type, domain, normalized);
|
|
@@ -20146,7 +19957,7 @@ function getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2(schemaId, page
|
|
|
20146
19957
|
* @param actions Array of Add/Delete itemized actions
|
|
20147
19958
|
* @param domain
|
|
20148
19959
|
*/
|
|
20149
|
-
function getEip712BrowserRequestItemizedSignaturePayloadV2(schemaId, targetHash, expiration, actions, domain =
|
|
19960
|
+
function getEip712BrowserRequestItemizedSignaturePayloadV2(schemaId, targetHash, expiration, actions, domain = EIP712_DOMAIN_MAINNET) {
|
|
20150
19961
|
const message = createItemizedSignaturePayloadV2(schemaId, targetHash, expiration, actions);
|
|
20151
19962
|
const normalized = normalizePayload(message);
|
|
20152
19963
|
return createEip712Payload(ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2, message.type, domain, normalized);
|
|
@@ -20158,7 +19969,7 @@ function getEip712BrowserRequestItemizedSignaturePayloadV2(schemaId, targetHash,
|
|
|
20158
19969
|
* @param expirationBlock Block number after which this payload is invalid
|
|
20159
19970
|
* @param domain
|
|
20160
19971
|
*/
|
|
20161
|
-
function getEip712BrowserRequestClaimHandlePayload(handle, expirationBlock, domain =
|
|
19972
|
+
function getEip712BrowserRequestClaimHandlePayload(handle, expirationBlock, domain = EIP712_DOMAIN_MAINNET) {
|
|
20162
19973
|
const message = createClaimHandlePayload(handle, expirationBlock);
|
|
20163
19974
|
const normalized = normalizePayload(message);
|
|
20164
19975
|
return createEip712Payload(CLAIM_HANDLE_PAYLOAD_DEFINITION, message.type, domain, normalized);
|
|
@@ -20169,7 +19980,7 @@ function getEip712BrowserRequestClaimHandlePayload(handle, expirationBlock, doma
|
|
|
20169
19980
|
* @param publicKey The passkey’s public key (hex string or raw bytes)
|
|
20170
19981
|
* @param domain
|
|
20171
19982
|
*/
|
|
20172
|
-
function getEip712BrowserRequestPasskeyPublicKey(publicKey, domain =
|
|
19983
|
+
function getEip712BrowserRequestPasskeyPublicKey(publicKey, domain = EIP712_DOMAIN_MAINNET) {
|
|
20173
19984
|
const message = createPasskeyPublicKey(publicKey);
|
|
20174
19985
|
const normalized = normalizePayload(message);
|
|
20175
19986
|
return createEip712Payload(PASSKEY_PUBLIC_KEY_DEFINITION, message.type, domain, normalized);
|
|
@@ -20182,7 +19993,7 @@ function getEip712BrowserRequestPasskeyPublicKey(publicKey, domain = EIP712_DOMA
|
|
|
20182
19993
|
* @param userIdentifierAdminUrl Only used for custom integration situations.
|
|
20183
19994
|
* @param domain
|
|
20184
19995
|
*/
|
|
20185
|
-
function getEip712BrowserRequestSiwfSignedRequestPayload(callback, permissions, userIdentifierAdminUrl, domain =
|
|
19996
|
+
function getEip712BrowserRequestSiwfSignedRequestPayload(callback, permissions, userIdentifierAdminUrl, domain = EIP712_DOMAIN_MAINNET) {
|
|
20186
19997
|
const message = createSiwfSignedRequestPayload(callback, permissions, userIdentifierAdminUrl);
|
|
20187
19998
|
const normalized = normalizePayload(message);
|
|
20188
19999
|
return createEip712Payload(SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION, message.type, domain, normalized);
|
|
@@ -20243,4 +20054,4 @@ function prefixEthereumTags(hexPayload) {
|
|
|
20243
20054
|
const wrapped = `\x19Ethereum Signed Message:\n${hexPayload.length}${hexPayload}`;
|
|
20244
20055
|
const buffer = Buffer.from(wrapped, 'utf-8');
|
|
20245
20056
|
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);
|
|
20246
|
-
}var signature=/*#__PURE__*/Object.freeze({__proto__:null,createAddKeyData:createAddKeyData,createAddProvider:createAddProvider,createAuthorizedKeyData:createAuthorizedKeyData,createClaimHandlePayload:createClaimHandlePayload,createItemizedAddAction:createItemizedAddAction,createItemizedDeleteAction:createItemizedDeleteAction,createItemizedSignaturePayloadV2:createItemizedSignaturePayloadV2,createPaginatedDeleteSignaturePayloadV2:createPaginatedDeleteSignaturePayloadV2,createPaginatedUpsertSignaturePayloadV2:createPaginatedUpsertSignaturePayloadV2,createPasskeyPublicKey:createPasskeyPublicKey,createSiwfLoginRequestPayload:createSiwfLoginRequestPayload,createSiwfSignedRequestPayload:createSiwfSignedRequestPayload,getEip712BrowserRequestAddKeyData:getEip712BrowserRequestAddKeyData,getEip712BrowserRequestAddProvider:getEip712BrowserRequestAddProvider,getEip712BrowserRequestAuthorizedKeyData:getEip712BrowserRequestAuthorizedKeyData,getEip712BrowserRequestClaimHandlePayload:getEip712BrowserRequestClaimHandlePayload,getEip712BrowserRequestItemizedSignaturePayloadV2:getEip712BrowserRequestItemizedSignaturePayloadV2,getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2:getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2,getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2:getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2,getEip712BrowserRequestPasskeyPublicKey:getEip712BrowserRequestPasskeyPublicKey,getEip712BrowserRequestSiwfSignedRequestPayload:getEip712BrowserRequestSiwfSignedRequestPayload,getEthereumMessageSigner:getEthereumMessageSigner,getEthereumRegularSigner:getEthereumRegularSigner,sign:sign,verifySignature:verifySignature});var index = { ...payloads, ...address, ...signatureDefinitions, ...signature };export{ADD_KEY_DATA_DEFINITION,ADD_PROVIDER_DEFINITION,AUTHORIZED_KEY_DATA_DEFINITION,CLAIM_HANDLE_PAYLOAD_DEFINITION,
|
|
20057
|
+
}var signature=/*#__PURE__*/Object.freeze({__proto__:null,createAddKeyData:createAddKeyData,createAddProvider:createAddProvider,createAuthorizedKeyData:createAuthorizedKeyData,createClaimHandlePayload:createClaimHandlePayload,createItemizedAddAction:createItemizedAddAction,createItemizedDeleteAction:createItemizedDeleteAction,createItemizedSignaturePayloadV2:createItemizedSignaturePayloadV2,createPaginatedDeleteSignaturePayloadV2:createPaginatedDeleteSignaturePayloadV2,createPaginatedUpsertSignaturePayloadV2:createPaginatedUpsertSignaturePayloadV2,createPasskeyPublicKey:createPasskeyPublicKey,createSiwfLoginRequestPayload:createSiwfLoginRequestPayload,createSiwfSignedRequestPayload:createSiwfSignedRequestPayload,getEip712BrowserRequestAddKeyData:getEip712BrowserRequestAddKeyData,getEip712BrowserRequestAddProvider:getEip712BrowserRequestAddProvider,getEip712BrowserRequestAuthorizedKeyData:getEip712BrowserRequestAuthorizedKeyData,getEip712BrowserRequestClaimHandlePayload:getEip712BrowserRequestClaimHandlePayload,getEip712BrowserRequestItemizedSignaturePayloadV2:getEip712BrowserRequestItemizedSignaturePayloadV2,getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2:getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2,getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2:getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2,getEip712BrowserRequestPasskeyPublicKey:getEip712BrowserRequestPasskeyPublicKey,getEip712BrowserRequestSiwfSignedRequestPayload:getEip712BrowserRequestSiwfSignedRequestPayload,getEthereumMessageSigner:getEthereumMessageSigner,getEthereumRegularSigner:getEthereumRegularSigner,sign:sign,verifySignature:verifySignature});var index = { ...payloads, ...address, ...signatureDefinitions, ...signature };export{ADD_KEY_DATA_DEFINITION,ADD_PROVIDER_DEFINITION,AUTHORIZED_KEY_DATA_DEFINITION,CLAIM_HANDLE_PAYLOAD_DEFINITION,EIP712_DOMAIN_DEFINITION,EIP712_DOMAIN_MAINNET,EIP712_DOMAIN_TESTNET,ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2,PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2,PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2,PASSKEY_PUBLIC_KEY_DEFINITION,SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION,createAddKeyData,createAddProvider,createAuthorizedKeyData,createClaimHandlePayload,createItemizedAddAction,createItemizedDeleteAction,createItemizedSignaturePayloadV2,createPaginatedDeleteSignaturePayloadV2,createPaginatedUpsertSignaturePayloadV2,createPasskeyPublicKey,createRandomKey,createSiwfLoginRequestPayload,createSiwfSignedRequestPayload,index as default,ethereumAddressToKeyringPair,getAccountId20MultiAddress,getEip712BrowserRequestAddKeyData,getEip712BrowserRequestAddProvider,getEip712BrowserRequestAuthorizedKeyData,getEip712BrowserRequestClaimHandlePayload,getEip712BrowserRequestItemizedSignaturePayloadV2,getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2,getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2,getEip712BrowserRequestPasskeyPublicKey,getEip712BrowserRequestSiwfSignedRequestPayload,getEthereumMessageSigner,getEthereumRegularSigner,getKeyringPairFromSecp256k1PrivateKey,getSS58AccountFromEthereumAccount,getUnifiedAddress,getUnifiedPublicKey,reverseUnifiedAddressToEthereumAddress,sign,verifySignature};
|