@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.
@@ -1,11 +1,11 @@
1
1
  (function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('ethers'),require('@polkadot/api')):typeof define==='function'&&define.amd?define(['exports','ethers','@polkadot/api'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f(g.EthereumUtils={},g.ethers,g.api));})(this,(function(exports,ethers,api){'use strict';/** @internal Last-resort "this", if it gets here it probably would fail anyway */
2
- function evaluateThis$3(fn) {
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$3 = (typeof globalThis !== 'undefined'
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$3(Function));
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$2(name, fallback) {
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$3[name] === 'undefined'
25
+ return typeof xglobal[name] === 'undefined'
26
26
  ? fallback
27
- : xglobal$3[name];
28
- }let TextEncoder$4=class TextEncoder {
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$3 = /*#__PURE__*/ extractGlobal$2('TextEncoder', TextEncoder$4);/**
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$2('BigInt', invalidFallback);const CHR$2 = '0123456789abcdef';
67
- const U8$3 = new Uint8Array(256);
68
- const U16$3 = new Uint8Array(256 * 256);
69
- for (let i = 0, count = CHR$2.length; i < count; i++) {
70
- U8$3[CHR$2[i].charCodeAt(0) | 0] = i | 0;
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$3[CHR$2[i].toUpperCase().charCodeAt(0) | 0] = i | 0;
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$3[s | j] = (U8$3[i] << 4) | U8$3[j];
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$1(value, bitLength = -1) {
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$3[(value.charCodeAt(s) << 8) | value.charCodeAt(s + 1)];
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
- if (this instanceof a) {
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$3.Buffer === 'function' && typeof xglobal$3.Buffer.isBuffer === 'function';
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$3.process === 'object';/**
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$3.Buffer.isBuffer(value);
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$1 = new TextEncoder$3();
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$1(value) {
3620
+ function stringToU8a(value) {
3605
3621
  return value
3606
- ? encoder$1.encode(value.toString())
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$1(value)
3648
+ ? hexToU8a(value)
3633
3649
  : Array.isArray(value)
3634
3650
  ? new Uint8Array(value)
3635
- : stringToU8a$1(value);
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$2 = new Array(256);
3682
- const U16$2 = new Array(256 * 256);
3697
+ }const U8 = new Array(256);
3698
+ const U16 = new Array(256 * 256);
3683
3699
  for (let n = 0; n < 256; n++) {
3684
- U8$2[n] = n.toString(16).padStart(2, '0');
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$2[s | j] = U8$2[i] + U8$2[j];
3705
+ U16[s | j] = U8[i] + U8[j];
3690
3706
  }
3691
3707
  }
3692
3708
  /** @internal */
3693
- function hex$1(value, result) {
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$2[(value[i] << 8) | value[i + 1]];
3713
+ result += U16[(value[i] << 8) | value[i + 1]];
3698
3714
  }
3699
3715
  if (mod) {
3700
- result += U8$2[value[length] | 0];
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$1(value, bitLength = -1, isPrefixed = true) {
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$1(value.subarray(0, length / 2), empty)}…${hex$1(value.subarray(value.length - length / 2), '')}`;
3745
+ return `${hex(value.subarray(0, length / 2), empty)}…${hex(value.subarray(value.length - length / 2), '')}`;
3730
3746
  }
3731
3747
  }
3732
- return hex$1(value, empty);
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
- }/** @internal Last-resort "this", if it gets here it probably would fail anyway */
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$1 = xglobal.crypto;
3899
+ }const crypto$1 = xglobal.crypto;
4098
3900
  function getRandomValues(arr) {
4099
3901
  return crypto$1.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$1('SS58PRE');
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$1(getH160(u8aAddress), -1, false);
10702
- const hash = u8aToHex$1(keccakAsU8a(address), -1, false);
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]}`;
@@ -10865,8 +10671,15 @@ function assert(condition, message) {
10865
10671
  },
10866
10672
  ],
10867
10673
  };
10868
- // using pallet_revive test chain ID for now.
10869
- const EIP712_DOMAIN_DEFAULT = {
10674
+ // using 2091 for mainnet
10675
+ const EIP712_DOMAIN_MAINNET = {
10676
+ name: 'Frequency',
10677
+ version: '1',
10678
+ chainId: '0x082B',
10679
+ verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
10680
+ };
10681
+ // using pallet_revive test chain ID for testnet/dev
10682
+ const EIP712_DOMAIN_TESTNET = {
10870
10683
  name: 'Frequency',
10871
10684
  version: '1',
10872
10685
  chainId: '0x190f1b44',
@@ -11024,22 +10837,21 @@ const SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION = {
11024
10837
  type: 'string',
11025
10838
  },
11026
10839
  ],
11027
- };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_DEFAULT:EIP712_DOMAIN_DEFAULT,EIP712_DOMAIN_DEFINITION:EIP712_DOMAIN_DEFINITION,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});/**
10840
+ };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});/**
11028
10841
  * Signing EIP-712 or ERC-191 compatible signature based on payload
11029
10842
  * @param secretKey
11030
10843
  * @param payload
11031
10844
  * @param chain
11032
10845
  */
11033
- async function sign(secretKey, payload, chain = 'Mainnet-Frequency') {
10846
+ async function sign(secretKey, payload, chain) {
11034
10847
  const signatureType = getSignatureType(payload.type);
11035
10848
  const normalizedPayload = normalizePayload(payload);
11036
10849
  const wallet = new ethers.ethers.Wallet(secretKey);
11037
10850
  let signature;
11038
10851
  switch (signatureType) {
11039
10852
  case 'EIP-712':
11040
- // TODO: use correct chainID for different networks
11041
10853
  // TODO: use correct contract address for different payloads
11042
- signature = await wallet.signTypedData(EIP712_DOMAIN_DEFAULT, getTypesFor(payload.type), normalizedPayload);
10854
+ signature = await wallet.signTypedData(chain === 'Mainnet-Frequency' ? EIP712_DOMAIN_MAINNET : EIP712_DOMAIN_TESTNET, getTypesFor(payload.type), normalizedPayload);
11043
10855
  break;
11044
10856
  case 'EIP-191':
11045
10857
  signature = await wallet.signMessage(payload.message);
@@ -11056,15 +10868,14 @@ async function sign(secretKey, payload, chain = 'Mainnet-Frequency') {
11056
10868
  * @param payload
11057
10869
  * @param chain
11058
10870
  */
11059
- function verifySignature(ethereumAddress, signature, payload, chain = 'Mainnet-Frequency') {
10871
+ function verifySignature(ethereumAddress, signature, payload, chain) {
11060
10872
  const signatureType = getSignatureType(payload.type);
11061
10873
  const normalizedPayload = normalizePayload(payload);
11062
10874
  let recoveredAddress;
11063
10875
  switch (signatureType) {
11064
10876
  case 'EIP-712':
11065
- // TODO: use correct chainID for different networks
11066
10877
  // TODO: use correct contract address for different payloads
11067
- recoveredAddress = ethers.ethers.verifyTypedData(EIP712_DOMAIN_DEFAULT, getTypesFor(payload.type), normalizedPayload, signature);
10878
+ recoveredAddress = ethers.ethers.verifyTypedData(chain === 'Mainnet-Frequency' ? EIP712_DOMAIN_MAINNET : EIP712_DOMAIN_TESTNET, getTypesFor(payload.type), normalizedPayload, signature);
11068
10879
  break;
11069
10880
  case 'EIP-191':
11070
10881
  recoveredAddress = ethers.ethers.verifyMessage(payload.message, signature);
@@ -11337,7 +11148,7 @@ function createSiwfLoginRequestPayload(message) {
11337
11148
  * @param expirationBlock Block number after which this payload is invalid
11338
11149
  * @param domain
11339
11150
  */
11340
- function getEip712BrowserRequestAddKeyData(msaId, newPublicKey, expirationBlock, domain = EIP712_DOMAIN_DEFAULT) {
11151
+ function getEip712BrowserRequestAddKeyData(msaId, newPublicKey, expirationBlock, domain = EIP712_DOMAIN_MAINNET) {
11341
11152
  const message = createAddKeyData(msaId, newPublicKey, expirationBlock);
11342
11153
  const normalized = normalizePayload(message);
11343
11154
  return createEip712Payload(ADD_KEY_DATA_DEFINITION, message.type, domain, normalized);
@@ -11350,7 +11161,7 @@ function getEip712BrowserRequestAddKeyData(msaId, newPublicKey, expirationBlock,
11350
11161
  * @param expirationBlock Block number after which this payload is invalid
11351
11162
  * @param domain
11352
11163
  */
11353
- function getEip712BrowserRequestAuthorizedKeyData(msaId, authorizedPublicKey, expirationBlock, domain = EIP712_DOMAIN_DEFAULT) {
11164
+ function getEip712BrowserRequestAuthorizedKeyData(msaId, authorizedPublicKey, expirationBlock, domain = EIP712_DOMAIN_MAINNET) {
11354
11165
  const message = createAuthorizedKeyData(msaId, authorizedPublicKey, expirationBlock);
11355
11166
  const normalized = normalizePayload(message);
11356
11167
  return createEip712Payload(AUTHORIZED_KEY_DATA_DEFINITION, message.type, domain, normalized);
@@ -11363,7 +11174,7 @@ function getEip712BrowserRequestAuthorizedKeyData(msaId, authorizedPublicKey, ex
11363
11174
  * @param expirationBlock Block number after which this payload is invalid
11364
11175
  * @param domain
11365
11176
  */
11366
- function getEip712BrowserRequestAddProvider(authorizedMsaId, schemaIds, expirationBlock, domain = EIP712_DOMAIN_DEFAULT) {
11177
+ function getEip712BrowserRequestAddProvider(authorizedMsaId, schemaIds, expirationBlock, domain = EIP712_DOMAIN_MAINNET) {
11367
11178
  const message = createAddProvider(authorizedMsaId, schemaIds, expirationBlock);
11368
11179
  const normalized = normalizePayload(message);
11369
11180
  return createEip712Payload(ADD_PROVIDER_DEFINITION, message.type, domain, normalized);
@@ -11378,7 +11189,7 @@ function getEip712BrowserRequestAddProvider(authorizedMsaId, schemaIds, expirati
11378
11189
  * @param payload HexString or Uint8Array data to upsert
11379
11190
  * @param domain
11380
11191
  */
11381
- function getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2(schemaId, pageId, targetHash, expiration, payload, domain = EIP712_DOMAIN_DEFAULT) {
11192
+ function getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2(schemaId, pageId, targetHash, expiration, payload, domain = EIP712_DOMAIN_MAINNET) {
11382
11193
  const message = createPaginatedUpsertSignaturePayloadV2(schemaId, pageId, targetHash, expiration, payload);
11383
11194
  const normalized = normalizePayload(message);
11384
11195
  return createEip712Payload(PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2, message.type, domain, normalized);
@@ -11392,7 +11203,7 @@ function getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2(schemaId, page
11392
11203
  * @param expiration uint32 expiration block
11393
11204
  * @param domain
11394
11205
  */
11395
- function getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2(schemaId, pageId, targetHash, expiration, domain = EIP712_DOMAIN_DEFAULT) {
11206
+ function getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2(schemaId, pageId, targetHash, expiration, domain = EIP712_DOMAIN_MAINNET) {
11396
11207
  const message = createPaginatedDeleteSignaturePayloadV2(schemaId, pageId, targetHash, expiration);
11397
11208
  const normalized = normalizePayload(message);
11398
11209
  return createEip712Payload(PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2, message.type, domain, normalized);
@@ -11406,7 +11217,7 @@ function getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2(schemaId, page
11406
11217
  * @param actions Array of Add/Delete itemized actions
11407
11218
  * @param domain
11408
11219
  */
11409
- function getEip712BrowserRequestItemizedSignaturePayloadV2(schemaId, targetHash, expiration, actions, domain = EIP712_DOMAIN_DEFAULT) {
11220
+ function getEip712BrowserRequestItemizedSignaturePayloadV2(schemaId, targetHash, expiration, actions, domain = EIP712_DOMAIN_MAINNET) {
11410
11221
  const message = createItemizedSignaturePayloadV2(schemaId, targetHash, expiration, actions);
11411
11222
  const normalized = normalizePayload(message);
11412
11223
  return createEip712Payload(ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2, message.type, domain, normalized);
@@ -11418,7 +11229,7 @@ function getEip712BrowserRequestItemizedSignaturePayloadV2(schemaId, targetHash,
11418
11229
  * @param expirationBlock Block number after which this payload is invalid
11419
11230
  * @param domain
11420
11231
  */
11421
- function getEip712BrowserRequestClaimHandlePayload(handle, expirationBlock, domain = EIP712_DOMAIN_DEFAULT) {
11232
+ function getEip712BrowserRequestClaimHandlePayload(handle, expirationBlock, domain = EIP712_DOMAIN_MAINNET) {
11422
11233
  const message = createClaimHandlePayload(handle, expirationBlock);
11423
11234
  const normalized = normalizePayload(message);
11424
11235
  return createEip712Payload(CLAIM_HANDLE_PAYLOAD_DEFINITION, message.type, domain, normalized);
@@ -11429,7 +11240,7 @@ function getEip712BrowserRequestClaimHandlePayload(handle, expirationBlock, doma
11429
11240
  * @param publicKey The passkey’s public key (hex string or raw bytes)
11430
11241
  * @param domain
11431
11242
  */
11432
- function getEip712BrowserRequestPasskeyPublicKey(publicKey, domain = EIP712_DOMAIN_DEFAULT) {
11243
+ function getEip712BrowserRequestPasskeyPublicKey(publicKey, domain = EIP712_DOMAIN_MAINNET) {
11433
11244
  const message = createPasskeyPublicKey(publicKey);
11434
11245
  const normalized = normalizePayload(message);
11435
11246
  return createEip712Payload(PASSKEY_PUBLIC_KEY_DEFINITION, message.type, domain, normalized);
@@ -11442,7 +11253,7 @@ function getEip712BrowserRequestPasskeyPublicKey(publicKey, domain = EIP712_DOMA
11442
11253
  * @param userIdentifierAdminUrl Only used for custom integration situations.
11443
11254
  * @param domain
11444
11255
  */
11445
- function getEip712BrowserRequestSiwfSignedRequestPayload(callback, permissions, userIdentifierAdminUrl, domain = EIP712_DOMAIN_DEFAULT) {
11256
+ function getEip712BrowserRequestSiwfSignedRequestPayload(callback, permissions, userIdentifierAdminUrl, domain = EIP712_DOMAIN_MAINNET) {
11446
11257
  const message = createSiwfSignedRequestPayload(callback, permissions, userIdentifierAdminUrl);
11447
11258
  const normalized = normalizePayload(message);
11448
11259
  return createEip712Payload(SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION, message.type, domain, normalized);
@@ -11503,4 +11314,4 @@ function prefixEthereumTags(hexPayload) {
11503
11314
  const wrapped = `\x19Ethereum Signed Message:\n${hexPayload.length}${hexPayload}`;
11504
11315
  const buffer = Buffer.from(wrapped, 'utf-8');
11505
11316
  return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);
11506
- }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 };exports.ADD_KEY_DATA_DEFINITION=ADD_KEY_DATA_DEFINITION;exports.ADD_PROVIDER_DEFINITION=ADD_PROVIDER_DEFINITION;exports.AUTHORIZED_KEY_DATA_DEFINITION=AUTHORIZED_KEY_DATA_DEFINITION;exports.CLAIM_HANDLE_PAYLOAD_DEFINITION=CLAIM_HANDLE_PAYLOAD_DEFINITION;exports.EIP712_DOMAIN_DEFAULT=EIP712_DOMAIN_DEFAULT;exports.EIP712_DOMAIN_DEFINITION=EIP712_DOMAIN_DEFINITION;exports.ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2=ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2;exports.PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2=PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2;exports.PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2=PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2;exports.PASSKEY_PUBLIC_KEY_DEFINITION=PASSKEY_PUBLIC_KEY_DEFINITION;exports.SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION=SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION;exports.createAddKeyData=createAddKeyData;exports.createAddProvider=createAddProvider;exports.createAuthorizedKeyData=createAuthorizedKeyData;exports.createClaimHandlePayload=createClaimHandlePayload;exports.createItemizedAddAction=createItemizedAddAction;exports.createItemizedDeleteAction=createItemizedDeleteAction;exports.createItemizedSignaturePayloadV2=createItemizedSignaturePayloadV2;exports.createPaginatedDeleteSignaturePayloadV2=createPaginatedDeleteSignaturePayloadV2;exports.createPaginatedUpsertSignaturePayloadV2=createPaginatedUpsertSignaturePayloadV2;exports.createPasskeyPublicKey=createPasskeyPublicKey;exports.createRandomKey=createRandomKey;exports.createSiwfLoginRequestPayload=createSiwfLoginRequestPayload;exports.createSiwfSignedRequestPayload=createSiwfSignedRequestPayload;exports.default=index;exports.ethereumAddressToKeyringPair=ethereumAddressToKeyringPair;exports.getAccountId20MultiAddress=getAccountId20MultiAddress;exports.getEip712BrowserRequestAddKeyData=getEip712BrowserRequestAddKeyData;exports.getEip712BrowserRequestAddProvider=getEip712BrowserRequestAddProvider;exports.getEip712BrowserRequestAuthorizedKeyData=getEip712BrowserRequestAuthorizedKeyData;exports.getEip712BrowserRequestClaimHandlePayload=getEip712BrowserRequestClaimHandlePayload;exports.getEip712BrowserRequestItemizedSignaturePayloadV2=getEip712BrowserRequestItemizedSignaturePayloadV2;exports.getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2=getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2;exports.getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2=getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2;exports.getEip712BrowserRequestPasskeyPublicKey=getEip712BrowserRequestPasskeyPublicKey;exports.getEip712BrowserRequestSiwfSignedRequestPayload=getEip712BrowserRequestSiwfSignedRequestPayload;exports.getEthereumMessageSigner=getEthereumMessageSigner;exports.getEthereumRegularSigner=getEthereumRegularSigner;exports.getKeyringPairFromSecp256k1PrivateKey=getKeyringPairFromSecp256k1PrivateKey;exports.getSS58AccountFromEthereumAccount=getSS58AccountFromEthereumAccount;exports.getUnifiedAddress=getUnifiedAddress;exports.getUnifiedPublicKey=getUnifiedPublicKey;exports.reverseUnifiedAddressToEthereumAddress=reverseUnifiedAddressToEthereumAddress;exports.sign=sign;exports.verifySignature=verifySignature;Object.defineProperty(exports,'__esModule',{value:true});}));
11317
+ }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 };exports.ADD_KEY_DATA_DEFINITION=ADD_KEY_DATA_DEFINITION;exports.ADD_PROVIDER_DEFINITION=ADD_PROVIDER_DEFINITION;exports.AUTHORIZED_KEY_DATA_DEFINITION=AUTHORIZED_KEY_DATA_DEFINITION;exports.CLAIM_HANDLE_PAYLOAD_DEFINITION=CLAIM_HANDLE_PAYLOAD_DEFINITION;exports.EIP712_DOMAIN_DEFINITION=EIP712_DOMAIN_DEFINITION;exports.EIP712_DOMAIN_MAINNET=EIP712_DOMAIN_MAINNET;exports.EIP712_DOMAIN_TESTNET=EIP712_DOMAIN_TESTNET;exports.ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2=ITEMIZED_SIGNATURE_PAYLOAD_DEFINITION_V2;exports.PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2=PAGINATED_DELETE_SIGNATURE_PAYLOAD_DEFINITION_V2;exports.PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2=PAGINATED_UPSERT_SIGNATURE_PAYLOAD_DEFINITION_V2;exports.PASSKEY_PUBLIC_KEY_DEFINITION=PASSKEY_PUBLIC_KEY_DEFINITION;exports.SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION=SIWF_SIGNED_REQUEST_PAYLOAD_DEFINITION;exports.createAddKeyData=createAddKeyData;exports.createAddProvider=createAddProvider;exports.createAuthorizedKeyData=createAuthorizedKeyData;exports.createClaimHandlePayload=createClaimHandlePayload;exports.createItemizedAddAction=createItemizedAddAction;exports.createItemizedDeleteAction=createItemizedDeleteAction;exports.createItemizedSignaturePayloadV2=createItemizedSignaturePayloadV2;exports.createPaginatedDeleteSignaturePayloadV2=createPaginatedDeleteSignaturePayloadV2;exports.createPaginatedUpsertSignaturePayloadV2=createPaginatedUpsertSignaturePayloadV2;exports.createPasskeyPublicKey=createPasskeyPublicKey;exports.createRandomKey=createRandomKey;exports.createSiwfLoginRequestPayload=createSiwfLoginRequestPayload;exports.createSiwfSignedRequestPayload=createSiwfSignedRequestPayload;exports.default=index;exports.ethereumAddressToKeyringPair=ethereumAddressToKeyringPair;exports.getAccountId20MultiAddress=getAccountId20MultiAddress;exports.getEip712BrowserRequestAddKeyData=getEip712BrowserRequestAddKeyData;exports.getEip712BrowserRequestAddProvider=getEip712BrowserRequestAddProvider;exports.getEip712BrowserRequestAuthorizedKeyData=getEip712BrowserRequestAuthorizedKeyData;exports.getEip712BrowserRequestClaimHandlePayload=getEip712BrowserRequestClaimHandlePayload;exports.getEip712BrowserRequestItemizedSignaturePayloadV2=getEip712BrowserRequestItemizedSignaturePayloadV2;exports.getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2=getEip712BrowserRequestPaginatedDeleteSignaturePayloadV2;exports.getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2=getEip712BrowserRequestPaginatedUpsertSignaturePayloadV2;exports.getEip712BrowserRequestPasskeyPublicKey=getEip712BrowserRequestPasskeyPublicKey;exports.getEip712BrowserRequestSiwfSignedRequestPayload=getEip712BrowserRequestSiwfSignedRequestPayload;exports.getEthereumMessageSigner=getEthereumMessageSigner;exports.getEthereumRegularSigner=getEthereumRegularSigner;exports.getKeyringPairFromSecp256k1PrivateKey=getKeyringPairFromSecp256k1PrivateKey;exports.getSS58AccountFromEthereumAccount=getSS58AccountFromEthereumAccount;exports.getUnifiedAddress=getUnifiedAddress;exports.getUnifiedPublicKey=getUnifiedPublicKey;exports.reverseUnifiedAddressToEthereumAddress=reverseUnifiedAddressToEthereumAddress;exports.sign=sign;exports.verifySignature=verifySignature;Object.defineProperty(exports,'__esModule',{value:true});}));