@gardenfi/utils 3.0.0-beta.2 → 3.0.0-beta.3
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/dist/index.cjs +1 -1
- package/dist/index.js +35 -36
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +4 -4
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +3 -3
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -2
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +1 -1
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +1 -1
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +5 -5
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +33 -13
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +9 -34
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +60 -55
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +17 -23
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +106 -6
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +78 -18
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +9 -15
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +71 -5
- package/dist/index146.cjs +2 -1
- package/dist/index146.js +3 -14
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +9 -11
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +13 -12
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +4 -11
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +12 -8
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +2 -4
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +32 -17
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +21 -5
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +5 -171
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +5 -103
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +5 -33
- package/dist/index157.cjs +9 -1
- package/dist/index157.js +34 -8
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +3 -61
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +18 -19
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +19 -105
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +27 -70
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +6 -7
- package/dist/index163.cjs +4 -1
- package/dist/index163.js +194 -71
- package/dist/index164.cjs +1 -2
- package/dist/index164.js +28 -3
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +162 -9
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +127 -13
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +27 -4
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +56 -2
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +191 -31
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +4 -22
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +20 -5
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +3 -6
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +16 -5
- package/dist/index174.cjs +1 -9
- package/dist/index174.js +11 -35
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +35 -3
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +3 -19
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +25 -18
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +8 -35
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +23 -6
- package/dist/index180.cjs +1 -4
- package/dist/index180.js +28 -194
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +3 -27
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +6 -161
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +6 -127
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +32 -27
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +5 -192
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +38 -4
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +43 -14
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +33 -3
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +16 -15
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +40 -32
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +105 -3
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +3 -28
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +5 -25
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +3 -28
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +17 -6
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +5 -6
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +8 -32
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +104 -5
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +5 -37
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +6 -49
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +25 -30
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +34 -17
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +13 -42
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +74 -100
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +2 -3
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +17 -4
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +171 -3
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +17 -17
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +10 -8
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +25 -5
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +18 -27
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +15 -78
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +6 -2
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +13 -18
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +10 -17
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +16 -10
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +8 -8
- package/dist/index220.cjs +2 -1
- package/dist/index220.js +40 -102
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +2 -17
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +5 -214
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +8 -106
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +17 -204
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +8 -42
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +62 -74
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +66 -2
- package/dist/index228.cjs +1 -2
- package/dist/index228.js +187 -40
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +29 -2
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +76 -5
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +39 -9
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +14 -17
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +13 -8
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +11 -66
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +11 -64
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +18 -187
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +106 -26
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +98 -71
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +6 -40
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +7 -17
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +25 -12
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +16 -11
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +212 -10
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +206 -6
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +43 -7
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +74 -22
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +2 -20
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +68 -657
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +634 -154
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +176 -67
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +4 -4
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +24 -41
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +6 -6
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +8 -8
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +2 -2
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +2 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -4
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +3 -3
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +6 -6
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +2 -2
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +2 -2
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +2 -2
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +1 -1
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +4 -4
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +3 -3
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +2 -2
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +1 -1
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +1 -1
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -2
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +1 -1
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +5 -5
- package/dist/src/lib/utils.d.ts +0 -15
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index2.cjs"),e=require("./index3.cjs"),t=require("./index4.cjs"),r=require("./index5.cjs"),i=require("./index6.cjs"),s=require("./index7.cjs"),n=require("./index8.cjs"),a=require("./index9.cjs"),c=require("./index10.cjs"),u=require("./index11.cjs"),y=require("./index12.cjs"),p=require("./index13.cjs"),h=require("./index14.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index2.cjs"),e=require("./index3.cjs"),t=require("./index4.cjs"),r=require("./index5.cjs"),i=require("./index6.cjs"),s=require("./index7.cjs"),n=require("./index8.cjs"),a=require("./index9.cjs"),c=require("./index10.cjs"),u=require("./index11.cjs"),y=require("./index12.cjs"),p=require("./index13.cjs"),h=require("./index14.cjs"),k=require("./index15.cjs"),q=require("./index16.cjs"),A=require("./index17.cjs");exports.ApiStatus=o.ApiStatus;exports.Authorization=e.Authorization;exports.Environment=e.Environment;exports.Network=e.Network;exports.add0x=e.add0x;exports.hasKeys=e.hasKeys;exports.hexToU32Array=e.hexToU32Array;exports.parseJwt=e.parseJwt;exports.sleep=e.sleep;exports.trim0x=e.trim0x;exports.with0x=e.with0x;exports.checkAllowanceAndApprove=t.checkAllowanceAndApprove;exports.waitForTransactionReceipt=t.waitForTransactionReceipt;exports.Err=r.Err;exports.Ok=r.Ok;exports.Void=r.Void;exports.DigestKey=i.DigestKey;exports.executeWithTryCatch=s.executeWithTryCatch;exports.Url=n.Url;exports.AuthHeaderEnum=a.AuthHeaderEnum;exports.Siwe=c.Siwe;exports.ApiKey=u.ApiKey;exports.Passkey=y.Passkey;exports.PasskeyLogin=p.PasskeyLogin;exports.MemoryStorage=h.MemoryStorage;exports.StoreKeys=k.StoreKeys;exports.EventBroker=q.EventBroker;exports.Fetcher=A.Fetcher;
|
package/dist/index.js
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
import { ApiStatus as o } from "./index2.js";
|
|
2
|
-
import { Authorization as p, Environment as x, Network as m, add0x as
|
|
3
|
-
import { checkAllowanceAndApprove as
|
|
4
|
-
import { Err as
|
|
5
|
-
import { DigestKey as
|
|
2
|
+
import { Authorization as p, Environment as x, Network as m, add0x as f, hasKeys as a, hexToU32Array as i, parseJwt as s, sleep as n, trim0x as h, with0x as y } from "./index3.js";
|
|
3
|
+
import { checkAllowanceAndApprove as A, waitForTransactionReceipt as k } from "./index4.js";
|
|
4
|
+
import { Err as d, Ok as u, Void as l } from "./index5.js";
|
|
5
|
+
import { DigestKey as K } from "./index6.js";
|
|
6
6
|
import { executeWithTryCatch as g } from "./index7.js";
|
|
7
|
-
import { Url as
|
|
7
|
+
import { Url as T } from "./index8.js";
|
|
8
8
|
import { AuthHeaderEnum as P } from "./index9.js";
|
|
9
|
-
import { Siwe as
|
|
10
|
-
import { ApiKey as
|
|
11
|
-
import { Passkey as
|
|
12
|
-
import { PasskeyLogin as
|
|
13
|
-
import { MemoryStorage as
|
|
14
|
-
import { StoreKeys as
|
|
15
|
-
import { EventBroker as
|
|
16
|
-
import { Fetcher as
|
|
9
|
+
import { Siwe as z } from "./index10.js";
|
|
10
|
+
import { ApiKey as C } from "./index11.js";
|
|
11
|
+
import { Passkey as H } from "./index12.js";
|
|
12
|
+
import { PasskeyLogin as L } from "./index13.js";
|
|
13
|
+
import { MemoryStorage as N } from "./index14.js";
|
|
14
|
+
import { StoreKeys as R } from "./index15.js";
|
|
15
|
+
import { EventBroker as W } from "./index16.js";
|
|
16
|
+
import { Fetcher as j } from "./index17.js";
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
C as ApiKey,
|
|
19
19
|
o as ApiStatus,
|
|
20
20
|
P as AuthHeaderEnum,
|
|
21
21
|
p as Authorization,
|
|
22
|
-
|
|
22
|
+
K as DigestKey,
|
|
23
23
|
x as Environment,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
d as Err,
|
|
25
|
+
W as EventBroker,
|
|
26
|
+
j as Fetcher,
|
|
27
|
+
N as MemoryStorage,
|
|
28
28
|
m as Network,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
u as Ok,
|
|
30
|
+
H as Passkey,
|
|
31
|
+
L as PasskeyLogin,
|
|
32
|
+
z as Siwe,
|
|
33
|
+
R as StoreKeys,
|
|
34
|
+
T as Url,
|
|
35
|
+
l as Void,
|
|
36
|
+
f as add0x,
|
|
37
|
+
A as checkAllowanceAndApprove,
|
|
38
38
|
g as executeWithTryCatch,
|
|
39
|
-
|
|
40
|
-
i as
|
|
41
|
-
s as
|
|
42
|
-
n as
|
|
43
|
-
h as
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
A as with0x
|
|
39
|
+
a as hasKeys,
|
|
40
|
+
i as hexToU32Array,
|
|
41
|
+
s as parseJwt,
|
|
42
|
+
n as sleep,
|
|
43
|
+
h as trim0x,
|
|
44
|
+
k as waitForTransactionReceipt,
|
|
45
|
+
y as with0x
|
|
47
46
|
};
|
package/dist/index102.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index150.cjs"),f=require("./index168.cjs"),a=require("./index178.cjs"),l=require("./index116.cjs"),A=require("./index174.cjs"),o=new l.LruMap(8192);function u(s,t){if(o.has(`${s}.${t}`))return o.get(`${s}.${t}`);const c=s.substring(2).toLowerCase(),n=a.keccak256(f.stringToBytes(c),"bytes"),r=c.split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&r[e]&&(r[e]=r[e].toUpperCase()),(n[e>>1]&15)>=8&&r[e+1]&&(r[e+1]=r[e+1].toUpperCase());const i=`0x${r.join("")}`;return o.set(`${s}.${t}`,i),i}function g(s,t){if(!A.isAddress(s,{strict:!1}))throw new d.InvalidAddressError({address:s});return u(s,t)}exports.checksumAddress=u;exports.getAddress=g;
|
package/dist/index102.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { InvalidAddressError as c } from "./
|
|
2
|
-
import { stringToBytes as m } from "./
|
|
3
|
-
import { keccak256 as p } from "./
|
|
1
|
+
import { InvalidAddressError as c } from "./index150.js";
|
|
2
|
+
import { stringToBytes as m } from "./index168.js";
|
|
3
|
+
import { keccak256 as p } from "./index178.js";
|
|
4
4
|
import { LruMap as u } from "./index116.js";
|
|
5
|
-
import { isAddress as $ } from "./
|
|
5
|
+
import { isAddress as $ } from "./index174.js";
|
|
6
6
|
const s = /* @__PURE__ */ new u(8192);
|
|
7
7
|
function h(t, o) {
|
|
8
8
|
if (s.has(`${t}.${o}`))
|
package/dist/index104.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index159.cjs"),O=require("./index181.cjs"),n=require("./index149.cjs");function p(i,e,s,{strict:f}={}){return O.isHex(i,{strict:!1})?l(i,e,s,{strict:f}):u(i,e,s,{strict:f})}function r(i,e){if(typeof e=="number"&&e>0&&e>n.size(i)-1)throw new t.SliceOffsetOutOfBoundsError({offset:e,position:"start",size:n.size(i)})}function c(i,e,s){if(typeof e=="number"&&typeof s=="number"&&n.size(i)!==s-e)throw new t.SliceOffsetOutOfBoundsError({offset:s,position:"end",size:n.size(i)})}function u(i,e,s,{strict:f}={}){r(i,e);const o=i.slice(e,s);return f&&c(o,e,s),o}function l(i,e,s,{strict:f}={}){r(i,e);const o=`0x${i.replace("0x","").slice((e??0)*2,(s??i.length)*2)}`;return f&&c(o,e,s),o}exports.slice=p;exports.sliceBytes=u;exports.sliceHex=l;
|
package/dist/index104.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SliceOffsetOutOfBoundsError as t } from "./
|
|
2
|
-
import { isHex as p } from "./
|
|
3
|
-
import { size as r } from "./
|
|
1
|
+
import { SliceOffsetOutOfBoundsError as t } from "./index159.js";
|
|
2
|
+
import { isHex as p } from "./index181.js";
|
|
3
|
+
import { size as r } from "./index149.js";
|
|
4
4
|
function w(e, f, i, { strict: o } = {}) {
|
|
5
5
|
return p(e, { strict: !1 }) ? u(e, f, i, {
|
|
6
6
|
strict: o
|
package/dist/index111.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index150.cjs"),d=require("./index174.cjs");function t(s,r){if(!d.isAddress(s,{strict:!1}))throw new e.InvalidAddressError({address:s});if(!d.isAddress(r,{strict:!1}))throw new e.InvalidAddressError({address:r});return s.toLowerCase()===r.toLowerCase()}exports.isAddressEqual=t;
|
package/dist/index111.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InvalidAddressError as e } from "./
|
|
2
|
-
import { isAddress as o } from "./
|
|
1
|
+
import { InvalidAddressError as e } from "./index150.js";
|
|
2
|
+
import { isAddress as o } from "./index174.js";
|
|
3
3
|
function i(r, s) {
|
|
4
4
|
if (!o(r, { strict: !1 }))
|
|
5
5
|
throw new e({ address: r });
|
package/dist/index112.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index168.cjs"),l=require("./index42.cjs");function c(o){const{kzg:s}=o,n=o.to??(typeof o.blobs[0]=="string"?"hex":"bytes"),e=typeof o.blobs[0]=="string"?o.blobs.map(t=>i.hexToBytes(t)):o.blobs,b=[];for(const t of e)b.push(Uint8Array.from(s.blobToKzgCommitment(t)));return n==="bytes"?b:b.map(t=>l.bytesToHex(t))}exports.blobsToCommitments=c;
|
package/dist/index112.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hexToBytes as i } from "./
|
|
1
|
+
import { hexToBytes as i } from "./index168.js";
|
|
2
2
|
import { bytesToHex as f } from "./index42.js";
|
|
3
3
|
function y(o) {
|
|
4
4
|
const { kzg: s } = o, n = o.to ?? (typeof o.blobs[0] == "string" ? "hex" : "bytes"), m = typeof o.blobs[0] == "string" ? o.blobs.map((t) => i(t)) : o.blobs, b = [];
|
package/dist/index113.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index168.cjs"),y=require("./index42.cjs");function f(t){const{kzg:c}=t,e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(o=>b.hexToBytes(o)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(o=>b.hexToBytes(o)):t.commitments,s=[];for(let o=0;o<n.length;o++){const l=n[o],m=i[o];s.push(Uint8Array.from(c.computeBlobKzgProof(l,m)))}return e==="bytes"?s:s.map(o=>y.bytesToHex(o))}exports.blobsToProofs=f;
|
package/dist/index113.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hexToBytes as b } from "./
|
|
1
|
+
import { hexToBytes as b } from "./index168.js";
|
|
2
2
|
import { bytesToHex as y } from "./index42.js";
|
|
3
3
|
function h(t) {
|
|
4
4
|
const { kzg: m } = t, c = t.to ?? (typeof t.blobs[0] == "string" ? "hex" : "bytes"), s = typeof t.blobs[0] == "string" ? t.blobs.map((o) => b(o)) : t.blobs, i = typeof t.commitments[0] == "string" ? t.commitments.map((o) => b(o)) : t.commitments, n = [];
|
package/dist/index114.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index182.cjs");function c(o){const{commitments:e,version:s}=o,n=o.to??(typeof e[0]=="string"?"hex":"bytes"),t=[];for(const m of e)t.push(i.commitmentToVersionedHash({commitment:m,to:n,version:s}));return t}exports.commitmentsToVersionedHashes=c;
|
package/dist/index114.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { commitmentToVersionedHash as i } from "./
|
|
1
|
+
import { commitmentToVersionedHash as i } from "./index182.js";
|
|
2
2
|
function r(o) {
|
|
3
3
|
const { commitments: t, version: n } = o, e = o.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), s = [];
|
|
4
4
|
for (const m of t)
|
package/dist/index115.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index112.cjs"),m=require("./index113.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index112.cjs"),m=require("./index113.cjs"),u=require("./index184.cjs");function f(t){const{data:i,kzg:n,to:b}=t,s=t.blobs??u.toBlobs({data:i,to:b}),e=t.commitments??r.blobsToCommitments({blobs:s,kzg:n,to:b}),l=t.proofs??m.blobsToProofs({blobs:s,commitments:e,kzg:n,to:b}),c=[];for(let o=0;o<s.length;o++)c.push({blob:s[o],commitment:e[o],proof:l[o]});return c}exports.toBlobSidecars=f;
|
package/dist/index115.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { blobsToCommitments as f } from "./index112.js";
|
|
2
2
|
import { blobsToProofs as l } from "./index113.js";
|
|
3
|
-
import { toBlobs as p } from "./
|
|
3
|
+
import { toBlobs as p } from "./index184.js";
|
|
4
4
|
function k(t) {
|
|
5
5
|
const { data: i, kzg: n, to: m } = t, s = t.blobs ?? p({ data: i, to: m }), b = t.commitments ?? f({ blobs: s, kzg: n, to: m }), r = t.proofs ?? l({ blobs: s, commitments: b, kzg: n, to: m }), c = [];
|
|
6
6
|
for (let o = 0; o < s.length; o++)
|
package/dist/index132.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index95.cjs"),E=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index95.cjs"),E=require("./index150.cjs"),b=require("./index164.cjs"),z=require("./index174.cjs"),d=require("./index149.cjs"),T=require("./index42.cjs"),h=require("./index176.cjs"),w=require("./index91.cjs");function P(e){const{domain:i,message:y,primaryType:n,types:t}=e,a=(g,l)=>{const s={...l};for(const r of g){const{name:o,type:f}=r;f==="address"&&(s[o]=s[o].toLowerCase())}return s},u=t.EIP712Domain?i?a(t.EIP712Domain,i):{}:{},p=(()=>{if(n!=="EIP712Domain")return a(t[n],y)})();return w.stringify({domain:u,message:p,primaryType:n,types:t})}function q(e){const{domain:i,message:y,primaryType:n,types:t}=e,a=(u,p)=>{for(const g of u){const{name:l,type:s}=g,r=p[l],o=s.match(h.integerRegex);if(o&&(typeof r=="number"||typeof r=="bigint")){const[D,c,v]=o;T.numberToHex(r,{signed:c==="int",size:Number.parseInt(v,10)/8})}if(s==="address"&&typeof r=="string"&&!z.isAddress(r))throw new E.InvalidAddressError({address:r});const f=s.match(h.bytesRegex);if(f){const[D,c]=f;if(c&&d.size(r)!==Number.parseInt(c,10))throw new m.BytesSizeMismatchError({expectedSize:Number.parseInt(c,10),givenSize:d.size(r)})}const I=t[s];I&&(S(s),a(I,r))}};if(t.EIP712Domain&&i){if(typeof i!="object")throw new b.InvalidDomainError({domain:i});a(t.EIP712Domain,i)}if(n!=="EIP712Domain")if(t[n])a(t[n],y);else throw new b.InvalidPrimaryTypeError({primaryType:n,types:t})}function x({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function S(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new b.InvalidStructTypeError({type:e})}exports.getTypesForEIP712Domain=x;exports.serializeTypedData=P;exports.validateTypedData=q;
|
package/dist/index132.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BytesSizeMismatchError as v } from "./index95.js";
|
|
2
|
-
import { InvalidAddressError as D } from "./
|
|
3
|
-
import { InvalidDomainError as E, InvalidPrimaryTypeError as w, InvalidStructTypeError as z } from "./
|
|
4
|
-
import { isAddress as P } from "./
|
|
5
|
-
import { size as h } from "./
|
|
2
|
+
import { InvalidAddressError as D } from "./index150.js";
|
|
3
|
+
import { InvalidDomainError as E, InvalidPrimaryTypeError as w, InvalidStructTypeError as z } from "./index164.js";
|
|
4
|
+
import { isAddress as P } from "./index174.js";
|
|
5
|
+
import { size as h } from "./index149.js";
|
|
6
6
|
import { numberToHex as T } from "./index42.js";
|
|
7
|
-
import { integerRegex as d, bytesRegex as _ } from "./
|
|
7
|
+
import { integerRegex as d, bytesRegex as _ } from "./index176.js";
|
|
8
8
|
import { stringify as x } from "./index91.js";
|
|
9
9
|
function F(e) {
|
|
10
10
|
const { domain: i, message: p, primaryType: n, types: t } = e, o = (u, g) => {
|
package/dist/index138.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index32.cjs"),j=require("./index139.cjs");function q(n){const{batch:a,chain:e,ccipRead:d,key:b="base",name:f="Base Client",type:g="base"}=n,o=n.experimental_blockTag??(typeof(e==null?void 0:e.experimental_preconfirmationTime)=="number"?"pending":void 0),m=(e==null?void 0:e.blockTime)??12e3,p=Math.min(Math.max(Math.floor(m/2),500),4e3),t=n.pollingInterval??p,x=n.cacheTime??t,i=n.account?h.parseAccount(n.account):void 0,{config:T,request:k,value:y}=n.transport({account:i,chain:e,pollingInterval:t}),v={...T,...y},c={account:i,batch:a,cacheTime:x,ccipRead:d,chain:e,key:b,name:f,pollingInterval:t,request:k,transport:v,type:g,uid:j.uid(),...o?{experimental_blockTag:o}:{}};function l(u){return _=>{const r=_(u);for(const M in c)delete r[M];const s={...u,...r};return Object.assign(s,{extend:l(s)})}}return Object.assign(c,{extend:l(c)})}exports.createClient=q;
|
package/dist/index138.js
CHANGED
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { parseAccount as I } from "./index32.js";
|
|
2
|
+
import { uid as M } from "./index139.js";
|
|
3
|
+
function O(e) {
|
|
4
|
+
const { batch: a, chain: n, ccipRead: d, key: f = "base", name: m = "Base Client", type: b = "base" } = e, c = e.experimental_blockTag ?? (typeof (n == null ? void 0 : n.experimental_preconfirmationTime) == "number" ? "pending" : void 0), p = (n == null ? void 0 : n.blockTime) ?? 12e3, g = Math.min(Math.max(Math.floor(p / 2), 500), 4e3), t = e.pollingInterval ?? g, x = e.cacheTime ?? t, i = e.account ? I(e.account) : void 0, { config: T, request: k, value: _ } = e.transport({
|
|
5
|
+
account: i,
|
|
6
|
+
chain: n,
|
|
7
|
+
pollingInterval: t
|
|
8
|
+
}), v = { ...T, ..._ }, o = {
|
|
9
|
+
account: i,
|
|
10
|
+
batch: a,
|
|
11
|
+
cacheTime: x,
|
|
12
|
+
ccipRead: d,
|
|
13
|
+
chain: n,
|
|
14
|
+
key: f,
|
|
15
|
+
name: m,
|
|
16
|
+
pollingInterval: t,
|
|
17
|
+
request: k,
|
|
18
|
+
transport: v,
|
|
19
|
+
type: b,
|
|
20
|
+
uid: M(),
|
|
21
|
+
...c ? { experimental_blockTag: c } : {}
|
|
22
|
+
};
|
|
23
|
+
function l(r) {
|
|
24
|
+
return (y) => {
|
|
25
|
+
const s = y(r);
|
|
26
|
+
for (const h in o)
|
|
27
|
+
delete s[h];
|
|
28
|
+
const u = { ...r, ...s };
|
|
29
|
+
return Object.assign(u, { extend: l(u) });
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return Object.assign(o, { extend: l(o) });
|
|
13
33
|
}
|
|
14
34
|
export {
|
|
15
|
-
|
|
35
|
+
O as createClient
|
|
16
36
|
};
|
package/dist/index139.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=256;let t=i,e;function u(r=11){if(!e||t+r>i*2){e="",t=0;for(let n=0;n<i;n++)e+=(256+Math.random()*256|0).toString(16).substring(1)}return e.substring(t,t+++r)}exports.uid=u;
|
package/dist/index139.js
CHANGED
|
@@ -1,37 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const f = q, e = BigInt(3), r = BigInt(6), B = BigInt(11), a = BigInt(22), s = BigInt(23), i = BigInt(44), g = BigInt(88), o = n * n * n % f, c = o * o * n % f, d = t(c, e, f) * c % f, b = t(d, e, f) * c % f, m = t(b, _, f) * o % f, I = t(m, B, f) * m % f, p = t(I, a, f) * I % f, x = t(p, i, f) * p % f, E = t(x, g, f) * x % f, F = t(E, i, f) * p % f, P = t(F, e, f) * c % f, S = t(P, s, f) * I % f, v = t(S, r, f) * o % f, u = t(v, _, f);
|
|
8
|
-
if (!l.eql(l.sqr(u), n))
|
|
9
|
-
throw new Error("Cannot find square root");
|
|
10
|
-
return u;
|
|
11
|
-
}
|
|
12
|
-
const l = N(q, void 0, void 0, { sqrt: W }), D = G({
|
|
13
|
-
a: M,
|
|
14
|
-
b: BigInt(7),
|
|
15
|
-
Fp: l,
|
|
16
|
-
n: w,
|
|
17
|
-
Gx: BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),
|
|
18
|
-
Gy: BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),
|
|
19
|
-
h: BigInt(1),
|
|
20
|
-
lowS: !0,
|
|
21
|
-
// Allow only low-S signatures by default in sign() and verify()
|
|
22
|
-
endo: {
|
|
23
|
-
// Endomorphism, see above
|
|
24
|
-
beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
|
|
25
|
-
splitScalar: (n) => {
|
|
26
|
-
const f = w, e = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), r = -O * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), B = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), a = e, s = BigInt("0x100000000000000000000000000000000"), i = h(a * n, f), g = h(-r * n, f);
|
|
27
|
-
let o = k(n - i * e - g * B, f), c = k(-i * r - g * a, f);
|
|
28
|
-
const d = o > s, b = c > s;
|
|
29
|
-
if (d && (o = f - o), b && (c = f - c), o > s || c > s)
|
|
30
|
-
throw new Error("splitScalar: Endomorphism failed, k=" + n);
|
|
31
|
-
return { k1neg: d, k1: o, k2neg: b, k2: c };
|
|
32
|
-
}
|
|
1
|
+
let i = 256, t;
|
|
2
|
+
function s(e = 11) {
|
|
3
|
+
if (!t || i + e > 256 * 2) {
|
|
4
|
+
t = "", i = 0;
|
|
5
|
+
for (let r = 0; r < 256; r++)
|
|
6
|
+
t += (256 + Math.random() * 256 | 0).toString(16).substring(1);
|
|
33
7
|
}
|
|
34
|
-
|
|
8
|
+
return t.substring(i, i++ + e);
|
|
9
|
+
}
|
|
35
10
|
export {
|
|
36
|
-
|
|
11
|
+
s as uid
|
|
37
12
|
};
|
package/dist/index140.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index66.cjs"),a=require("./index69.cjs"),t=require("./index98.cjs"),n=require("./index99.cjs"),i=require("./index101.cjs"),o=require("./index103.cjs"),u=require("./index107.cjs"),c=require("./index108.cjs"),d=require("./index109.cjs"),q=require("./index64.cjs"),C=require("./index118.cjs"),g=require("./index119.cjs"),w=require("./index106.cjs"),T=require("./index121.cjs"),h=require("./index123.cjs"),S=require("./index124.cjs"),l=require("./index100.cjs"),p=require("./index126.cjs"),y=require("./index127.cjs"),A=require("./index128.cjs"),R=require("./index129.cjs"),m=require("./index130.cjs"),P=require("./index131.cjs"),z=require("./index133.cjs"),b=require("./index122.cjs"),f=require("./index135.cjs"),M=require("./index136.cjs"),D=require("./index137.cjs");function F(e){return{addChain:s=>t.addChain(e,s),deployContract:s=>n.deployContract(e,s),fillTransaction:s=>r.fillTransaction(e,s),getAddresses:()=>i.getAddresses(e),getCallsStatus:s=>o.getCallsStatus(e,s),getCapabilities:s=>u.getCapabilities(e,s),getChainId:()=>a.getChainId(e),getPermissions:()=>c.getPermissions(e),prepareAuthorization:s=>d.prepareAuthorization(e,s),prepareTransactionRequest:s=>q.prepareTransactionRequest(e,s),requestAddresses:()=>C.requestAddresses(e),requestPermissions:s=>g.requestPermissions(e,s),sendCalls:s=>w.sendCalls(e,s),sendCallsSync:s=>T.sendCallsSync(e,s),sendRawTransaction:s=>h.sendRawTransaction(e,s),sendRawTransactionSync:s=>S.sendRawTransactionSync(e,s),sendTransaction:s=>l.sendTransaction(e,s),sendTransactionSync:s=>p.sendTransactionSync(e,s),showCallsStatus:s=>y.showCallsStatus(e,s),signAuthorization:s=>A.signAuthorization(e,s),signMessage:s=>R.signMessage(e,s),signTransaction:s=>m.signTransaction(e,s),signTypedData:s=>P.signTypedData(e,s),switchChain:s=>z.switchChain(e,s),waitForCallsStatus:s=>b.waitForCallsStatus(e,s),watchAsset:s=>f.watchAsset(e,s),writeContract:s=>M.writeContract(e,s),writeContractSync:s=>D.writeContractSync(e,s)}}exports.walletActions=F;
|
package/dist/index140.js
CHANGED
|
@@ -1,58 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
import { fillTransaction as s } from "./index66.js";
|
|
2
|
+
import { getChainId as a } from "./index69.js";
|
|
3
|
+
import { addChain as t } from "./index98.js";
|
|
4
|
+
import { deployContract as i } from "./index99.js";
|
|
5
|
+
import { getAddresses as m } from "./index101.js";
|
|
6
|
+
import { getCallsStatus as n } from "./index103.js";
|
|
7
|
+
import { getCapabilities as e } from "./index107.js";
|
|
8
|
+
import { getPermissions as p } from "./index108.js";
|
|
9
|
+
import { prepareAuthorization as f } from "./index109.js";
|
|
10
|
+
import { prepareTransactionRequest as d } from "./index64.js";
|
|
11
|
+
import { requestAddresses as C } from "./index118.js";
|
|
12
|
+
import { requestPermissions as g } from "./index119.js";
|
|
13
|
+
import { sendCalls as u } from "./index106.js";
|
|
14
|
+
import { sendCallsSync as w } from "./index121.js";
|
|
15
|
+
import { sendRawTransaction as h } from "./index123.js";
|
|
16
|
+
import { sendRawTransactionSync as T } from "./index124.js";
|
|
17
|
+
import { sendTransaction as S } from "./index100.js";
|
|
18
|
+
import { sendTransactionSync as y } from "./index126.js";
|
|
19
|
+
import { showCallsStatus as A } from "./index127.js";
|
|
20
|
+
import { signAuthorization as c } from "./index128.js";
|
|
21
|
+
import { signMessage as q } from "./index129.js";
|
|
22
|
+
import { signTransaction as R } from "./index130.js";
|
|
23
|
+
import { signTypedData as z } from "./index131.js";
|
|
24
|
+
import { switchChain as P } from "./index133.js";
|
|
25
|
+
import { waitForCallsStatus as l } from "./index122.js";
|
|
26
|
+
import { watchAsset as b } from "./index135.js";
|
|
27
|
+
import { writeContract as D } from "./index136.js";
|
|
28
|
+
import { writeContractSync as F } from "./index137.js";
|
|
29
|
+
function tr(o) {
|
|
30
|
+
return {
|
|
31
|
+
addChain: (r) => t(o, r),
|
|
32
|
+
deployContract: (r) => i(o, r),
|
|
33
|
+
fillTransaction: (r) => s(o, r),
|
|
34
|
+
getAddresses: () => m(o),
|
|
35
|
+
getCallsStatus: (r) => n(o, r),
|
|
36
|
+
getCapabilities: (r) => e(o, r),
|
|
37
|
+
getChainId: () => a(o),
|
|
38
|
+
getPermissions: () => p(o),
|
|
39
|
+
prepareAuthorization: (r) => f(o, r),
|
|
40
|
+
prepareTransactionRequest: (r) => d(o, r),
|
|
41
|
+
requestAddresses: () => C(o),
|
|
42
|
+
requestPermissions: (r) => g(o, r),
|
|
43
|
+
sendCalls: (r) => u(o, r),
|
|
44
|
+
sendCallsSync: (r) => w(o, r),
|
|
45
|
+
sendRawTransaction: (r) => h(o, r),
|
|
46
|
+
sendRawTransactionSync: (r) => T(o, r),
|
|
47
|
+
sendTransaction: (r) => S(o, r),
|
|
48
|
+
sendTransactionSync: (r) => y(o, r),
|
|
49
|
+
showCallsStatus: (r) => A(o, r),
|
|
50
|
+
signAuthorization: (r) => c(o, r),
|
|
51
|
+
signMessage: (r) => q(o, r),
|
|
52
|
+
signTransaction: (r) => R(o, r),
|
|
53
|
+
signTypedData: (r) => z(o, r),
|
|
54
|
+
switchChain: (r) => P(o, r),
|
|
55
|
+
waitForCallsStatus: (r) => l(o, r),
|
|
56
|
+
watchAsset: (r) => b(o, r),
|
|
57
|
+
writeContract: (r) => D(o, r),
|
|
58
|
+
writeContractSync: (r) => F(o, r)
|
|
59
|
+
};
|
|
51
60
|
}
|
|
52
61
|
export {
|
|
53
|
-
|
|
54
|
-
y as hexToBytes,
|
|
55
|
-
T as numberToBytes,
|
|
56
|
-
l as stringToBytes,
|
|
57
|
-
F as toBytes
|
|
62
|
+
tr as walletActions
|
|
58
63
|
};
|
package/dist/index141.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index142.cjs"),b=require("./index139.cjs");function l({key:r,methods:e,name:n,request:u,retryCount:i=3,retryDelay:t=150,timeout:c,type:o},s){const d=b.uid();return{config:{key:r,methods:e,name:n,request:u,retryCount:i,retryDelay:t,timeout:c,type:o},request:a.buildRequest(u,{methods:e,retryCount:i,retryDelay:t,uid:d}),value:s}}exports.createTransport=l;
|
package/dist/index141.js
CHANGED
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
if (!a(n, { strict: !1 }))
|
|
6
|
-
throw new s({ address: n });
|
|
7
|
-
return {
|
|
8
|
-
address: n,
|
|
9
|
-
type: "json-rpc"
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
if (!a(n.address, { strict: !1 }))
|
|
13
|
-
throw new s({ address: n.address });
|
|
1
|
+
import { buildRequest as m } from "./index142.js";
|
|
2
|
+
import { uid as e } from "./index139.js";
|
|
3
|
+
function b({ key: n, methods: i, name: t, request: o, retryCount: r = 3, retryDelay: u = 150, timeout: c, type: f }, p) {
|
|
4
|
+
const d = e();
|
|
14
5
|
return {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
config: {
|
|
7
|
+
key: n,
|
|
8
|
+
methods: i,
|
|
9
|
+
name: t,
|
|
10
|
+
request: o,
|
|
11
|
+
retryCount: r,
|
|
12
|
+
retryDelay: u,
|
|
13
|
+
timeout: c,
|
|
14
|
+
type: f
|
|
15
|
+
},
|
|
16
|
+
request: m(o, { methods: i, retryCount: r, retryDelay: u, uid: d }),
|
|
17
|
+
value: p
|
|
24
18
|
};
|
|
25
19
|
}
|
|
26
20
|
export {
|
|
27
|
-
|
|
21
|
+
b as createTransport
|
|
28
22
|
};
|
package/dist/index142.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("./index35.cjs"),p=require("./index143.cjs"),e=require("./index96.cjs"),I=require("./index42.cjs"),q=require("./index234.cjs"),m=require("./index90.cjs"),v=require("./index91.cjs");function N(t,E={}){return async(c,h={})=>{var i;const{dedupe:s=!1,methods:o,retryDelay:R=150,retryCount:l=3,uid:f}={...E,...h},{method:d}=c;if((i=o==null?void 0:o.exclude)!=null&&i.includes(d))throw new e.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});if(o!=null&&o.include&&!o.include.includes(d))throw new e.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});const y=s?I.stringToHex(`${f}.${v.stringify(c)}`):void 0;return q.withDedupe(()=>m.withRetry(async()=>{try{return await t(c)}catch(n){const r=n;switch(r.code){case e.ParseRpcError.code:throw new e.ParseRpcError(r);case e.InvalidRequestRpcError.code:throw new e.InvalidRequestRpcError(r);case e.MethodNotFoundRpcError.code:throw new e.MethodNotFoundRpcError(r,{method:c.method});case e.InvalidParamsRpcError.code:throw new e.InvalidParamsRpcError(r);case e.InternalRpcError.code:throw new e.InternalRpcError(r);case e.InvalidInputRpcError.code:throw new e.InvalidInputRpcError(r);case e.ResourceNotFoundRpcError.code:throw new e.ResourceNotFoundRpcError(r);case e.ResourceUnavailableRpcError.code:throw new e.ResourceUnavailableRpcError(r);case e.TransactionRejectedRpcError.code:throw new e.TransactionRejectedRpcError(r);case e.MethodNotSupportedRpcError.code:throw new e.MethodNotSupportedRpcError(r,{method:c.method});case e.LimitExceededRpcError.code:throw new e.LimitExceededRpcError(r);case e.JsonRpcVersionUnsupportedError.code:throw new e.JsonRpcVersionUnsupportedError(r);case e.UserRejectedRequestError.code:throw new e.UserRejectedRequestError(r);case e.UnauthorizedProviderError.code:throw new e.UnauthorizedProviderError(r);case e.UnsupportedProviderMethodError.code:throw new e.UnsupportedProviderMethodError(r);case e.ProviderDisconnectedError.code:throw new e.ProviderDisconnectedError(r);case e.ChainDisconnectedError.code:throw new e.ChainDisconnectedError(r);case e.SwitchChainError.code:throw new e.SwitchChainError(r);case e.UnsupportedNonOptionalCapabilityError.code:throw new e.UnsupportedNonOptionalCapabilityError(r);case e.UnsupportedChainIdError.code:throw new e.UnsupportedChainIdError(r);case e.DuplicateIdError.code:throw new e.DuplicateIdError(r);case e.UnknownBundleIdError.code:throw new e.UnknownBundleIdError(r);case e.BundleTooLargeError.code:throw new e.BundleTooLargeError(r);case e.AtomicReadyWalletRejectedUpgradeError.code:throw new e.AtomicReadyWalletRejectedUpgradeError(r);case e.AtomicityNotSupportedError.code:throw new e.AtomicityNotSupportedError(r);case 5e3:throw new e.UserRejectedRequestError(r);default:throw n instanceof U.BaseError?n:new e.UnknownRpcError(r)}}},{delay:({count:n,error:r})=>{var a;if(r&&r instanceof p.HttpRequestError){const u=(a=r==null?void 0:r.headers)==null?void 0:a.get("Retry-After");if(u!=null&&u.match(/\d/))return Number.parseInt(u,10)*1e3}return~~(1<<n)*R},retryCount:l,shouldRetry:({error:n})=>w(n)}),{enabled:s,id:y})}}function w(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===e.LimitExceededRpcError.code||t.code===e.InternalRpcError.code:t instanceof p.HttpRequestError&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}exports.buildRequest=N;exports.shouldRetry=w;
|