@gardenfi/utils 2.1.3-beta.2 → 2.1.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/index102.cjs +1 -1
- package/dist/index102.js +8 -12
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +1 -1
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +26 -38
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +43 -45
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- 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/index125.cjs +1 -1
- package/dist/index125.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +4 -4
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +2 -2
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +15 -19
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +6 -6
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +13 -31
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +10 -25
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +16 -13
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +21 -14
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +2 -6
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +12 -12
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +12 -10
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +46 -15
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +11 -10
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +7 -16
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +8 -21
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +58 -32
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +13 -30
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +15 -2
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +9 -13
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +30 -12
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +24 -47
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +12 -11
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +24 -7
- package/dist/index247.cjs +2 -1
- package/dist/index247.js +24 -9
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +10 -10
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +15 -14
- package/dist/index25.cjs +16 -1
- package/dist/index25.js +113 -11
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +52 -9
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +25 -24
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +13 -12
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +15 -24
- package/dist/index254.cjs +1 -2
- package/dist/index254.js +5 -24
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +12 -12
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +10 -15
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +16 -52
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +32 -58
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +1 -1
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +31 -13
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +6 -7
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +2 -2
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +1 -1
- package/dist/index28.cjs +1 -16
- package/dist/index28.js +11 -113
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +1 -1
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +3 -40
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +141 -2
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +148 -199
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +9 -3
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +103 -130
- package/dist/index291.cjs +2 -1
- package/dist/index291.js +102 -123
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +11 -9
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +18 -112
- package/dist/index294.cjs +1 -2
- package/dist/index294.js +24 -130
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +37 -10
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +68 -19
- package/dist/index297.cjs +1 -1
- package/dist/index297.js +2 -69
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +39 -641
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +620 -150
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +1 -1
- package/dist/index300.cjs +1 -2
- package/dist/index300.js +203 -63
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +172 -4
- package/dist/index302.cjs +2 -1
- package/dist/index302.js +65 -39
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +4 -7
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +38 -60
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +7 -77
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +63 -4
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +64 -181
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +4 -64
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +194 -44
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +18 -4
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +58 -99
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +45 -5
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +5 -2
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +103 -18
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +5 -72
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +2 -22
- package/dist/index317.cjs +1 -0
- package/dist/index317.js +24 -0
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +1 -1
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +2 -2
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -1
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +2 -2
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +2 -2
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +111 -114
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +11 -11
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +26 -26
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +3 -3
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +8 -8
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +3 -8
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +19 -19
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +2 -2
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +1 -1
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +4 -4
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +27 -27
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +1 -1
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +1 -1
- package/dist/src/lib/utils.d.ts +1 -2
- package/package.json +1 -1
package/dist/index102.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("./index45.cjs");async function b(a,c={}){const{account:i=a.account,chainId:s}=c,e=i?u.parseAccount(i):void 0,n=await a.request({method:"wallet_getCapabilities",params:[e==null?void 0:e.address]}),t={};for(const[o,r]of Object.entries(n))t[Number(o)]=r;return typeof s=="number"?t[s]:t}exports.getCapabilities=b;
|
package/dist/index102.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { parseAccount as p } from "./index45.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const { account: o = s.account, chainId: t } = n, e = o ? p(o) : void 0, c = t ? [e == null ? void 0 : e.address, [f(t)]] : [e == null ? void 0 : e.address], b = await s.request({
|
|
2
|
+
async function b(a, n = {}) {
|
|
3
|
+
const { account: i = a.account, chainId: s } = n, e = i ? p(i) : void 0, o = await a.request({
|
|
5
4
|
method: "wallet_getCapabilities",
|
|
6
|
-
params:
|
|
7
|
-
}),
|
|
8
|
-
for (const [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
i === "addSubAccount" && (i = "unstable_addSubAccount"), a[Number(r)][i] = d;
|
|
12
|
-
}
|
|
13
|
-
return typeof t == "number" ? a[t] : a;
|
|
5
|
+
params: [e == null ? void 0 : e.address]
|
|
6
|
+
}), t = {};
|
|
7
|
+
for (const [c, r] of Object.entries(o))
|
|
8
|
+
t[Number(c)] = r;
|
|
9
|
+
return typeof s == "number" ? t[s] : t;
|
|
14
10
|
}
|
|
15
11
|
export {
|
|
16
|
-
|
|
12
|
+
b as getCapabilities
|
|
17
13
|
};
|
package/dist/index104.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index45.cjs"),f=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index45.cjs"),f=require("./index247.cjs"),g=require("./index181.cjs"),s=require("./index29.cjs"),h=require("./index71.cjs"),A=require("./index83.cjs");async function p(o,n){var i;const{account:c=o.account,chainId:u,nonce:a}=n;if(!c)throw new f.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const r=d.parseAccount(c),t=(()=>{if(n.executor)return n.executor==="self"?n.executor:d.parseAccount(n.executor)})(),e={address:n.contractAddress??n.address,chainId:u,nonce:a};return typeof e.chainId>"u"&&(e.chainId=((i=o.chain)==null?void 0:i.id)??await s.getAction(o,h.getChainId,"getChainId")({})),typeof e.nonce>"u"&&(e.nonce=await s.getAction(o,A.getTransactionCount,"getTransactionCount")({address:r.address,blockTag:"pending"}),(t==="self"||t!=null&&t.address&&g.isAddressEqual(t.address,r.address))&&(e.nonce+=1)),e}exports.prepareAuthorization=p;
|
package/dist/index104.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseAccount as e } from "./index45.js";
|
|
2
|
-
import { AccountNotFoundError as f } from "./
|
|
2
|
+
import { AccountNotFoundError as f } from "./index247.js";
|
|
3
3
|
import { isAddressEqual as h } from "./index181.js";
|
|
4
4
|
import { getAction as a } from "./index29.js";
|
|
5
5
|
import { getChainId as p } from "./index71.js";
|
package/dist/index107.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("./index45.cjs"),m=require("./index247.cjs"),b=require("./index177.cjs"),r=require("./index150.cjs"),p=require("./index248.cjs");async function g(a,t){const{account:c=a.account,capabilities:i,chain:s=a.chain,forceAtomic:u=!1,id:d,version:l="2.0.0"}=t;if(typeof c>"u")throw new m.AccountNotFoundError({docsPath:"/experimental/eip5792/sendCalls"});const o=c?h.parseAccount(c):null,f=t.calls.map(e=>{const n=e;return{data:n.abi?b.encodeFunctionData({abi:n.abi,functionName:n.functionName,args:n.args}):n.data,to:n.to,value:n.value?r.numberToHex(n.value):void 0}});try{const e=await a.request({method:"wallet_sendCalls",params:[{atomicRequired:u,calls:f,capabilities:i,chainId:r.numberToHex(s.id),from:o==null?void 0:o.address,id:d,version:l}]},{retryCount:0});return typeof e=="string"?{id:e}:e}catch(e){throw p.getTransactionError(e,{...t,account:o,chain:t.chain})}}exports.sendCalls=g;
|
package/dist/index107.js
CHANGED
|
@@ -1,62 +1,50 @@
|
|
|
1
1
|
import { parseAccount as m } from "./index45.js";
|
|
2
|
-
import { AccountNotFoundError as
|
|
2
|
+
import { AccountNotFoundError as p } from "./index247.js";
|
|
3
3
|
import { encodeFunctionData as h } from "./index177.js";
|
|
4
|
-
import { numberToHex as
|
|
5
|
-
import { getTransactionError as
|
|
6
|
-
async function
|
|
7
|
-
const { account: e =
|
|
4
|
+
import { numberToHex as c } from "./index150.js";
|
|
5
|
+
import { getTransactionError as b } from "./index248.js";
|
|
6
|
+
async function A(r, n) {
|
|
7
|
+
const { account: e = r.account, capabilities: i, chain: s = r.chain, forceAtomic: u = !1, id: d, version: l = "2.0.0" } = n;
|
|
8
8
|
if (typeof e > "u")
|
|
9
|
-
throw new
|
|
10
|
-
docsPath: "/
|
|
9
|
+
throw new p({
|
|
10
|
+
docsPath: "/experimental/eip5792/sendCalls"
|
|
11
11
|
});
|
|
12
|
-
const a = e ? m(e) : null, f = n.calls.map((
|
|
13
|
-
const
|
|
12
|
+
const a = e ? m(e) : null, f = n.calls.map((t) => {
|
|
13
|
+
const o = t;
|
|
14
14
|
return {
|
|
15
|
-
data:
|
|
16
|
-
abi:
|
|
17
|
-
functionName:
|
|
18
|
-
args:
|
|
19
|
-
}) :
|
|
20
|
-
to:
|
|
21
|
-
value:
|
|
15
|
+
data: o.abi ? h({
|
|
16
|
+
abi: o.abi,
|
|
17
|
+
functionName: o.functionName,
|
|
18
|
+
args: o.args
|
|
19
|
+
}) : o.data,
|
|
20
|
+
to: o.to,
|
|
21
|
+
value: o.value ? c(o.value) : void 0
|
|
22
22
|
};
|
|
23
23
|
});
|
|
24
24
|
try {
|
|
25
|
-
const
|
|
25
|
+
const t = await r.request({
|
|
26
26
|
method: "wallet_sendCalls",
|
|
27
27
|
params: [
|
|
28
28
|
{
|
|
29
|
-
atomicRequired:
|
|
29
|
+
atomicRequired: u,
|
|
30
30
|
calls: f,
|
|
31
|
-
capabilities:
|
|
32
|
-
chainId:
|
|
31
|
+
capabilities: i,
|
|
32
|
+
chainId: c(s.id),
|
|
33
33
|
from: a == null ? void 0 : a.address,
|
|
34
|
-
id:
|
|
35
|
-
version:
|
|
34
|
+
id: d,
|
|
35
|
+
version: l
|
|
36
36
|
}
|
|
37
37
|
]
|
|
38
38
|
}, { retryCount: 0 });
|
|
39
|
-
return typeof
|
|
40
|
-
} catch (
|
|
41
|
-
throw
|
|
39
|
+
return typeof t == "string" ? { id: t } : t;
|
|
40
|
+
} catch (t) {
|
|
41
|
+
throw b(t, {
|
|
42
42
|
...n,
|
|
43
43
|
account: a,
|
|
44
44
|
chain: n.chain
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function y(o) {
|
|
49
|
-
const n = o != null && o.paymasterService ? Object.entries(o.paymasterService).reduce((e, [c, s]) => ({
|
|
50
|
-
...e ?? {},
|
|
51
|
-
[u(Number(c))]: s
|
|
52
|
-
}), {}) : void 0;
|
|
53
|
-
return {
|
|
54
|
-
...o,
|
|
55
|
-
...n ? {
|
|
56
|
-
paymasterService: n
|
|
57
|
-
} : {}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
48
|
export {
|
|
61
|
-
|
|
49
|
+
A as sendCalls
|
|
62
50
|
};
|
package/dist/index108.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 _=require("./index45.cjs"),u=require("./index247.cjs"),G=require("./index38.cjs"),O=require("./index239.cjs"),j=require("./index212.cjs"),B=require("./index248.cjs"),U=require("./index235.cjs"),W=require("./index184.cjs"),l=require("./index29.cjs"),k=require("./index220.cjs"),D=require("./index197.cjs"),H=require("./index71.cjs"),x=require("./index96.cjs"),J=require("./index97.cjs"),f=new k.LruMap(128);async function K(t,e){var P,M,z,I;const{account:d=t.account,chain:n=t.chain,accessList:w,authorizationList:s,blobs:q,data:m,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,value:C,...N}=e;if(typeof d>"u")throw new u.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const r=d?_.parseAccount(d):null;try{D.assertRequest(e);const a=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await O.recoverAuthorizationAddress({authorization:s[0]}).catch(()=>{throw new G.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((r==null?void 0:r.type)==="json-rpc"||r===null){let i;n!==null&&(i=await l.getAction(t,H.getChainId,"getChainId")({}),j.assertCurrentChain({currentChainId:i,chain:n}));const c=(z=(M=(P=t.chain)==null?void 0:P.formatters)==null?void 0:M.transactionRequest)==null?void 0:z.format,b=(c||W.formatTransactionRequest)({...U.extract(N,{format:c}),accessList:w,authorizationList:s,blobs:q,chainId:i,data:m,from:r==null?void 0:r.address,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,to:a,value:C}),F=f.get(t.uid),L=F?"wallet_sendTransaction":"eth_sendTransaction";try{return await t.request({method:L,params:[b]},{retryCount:0})}catch(v){if(F===!1)throw v;const o=v;if(o.name==="InvalidInputRpcError"||o.name==="InvalidParamsRpcError"||o.name==="MethodNotFoundRpcError"||o.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[b]},{retryCount:0}).then(p=>(f.set(t.uid,!0),p)).catch(p=>{const h=p;throw h.name==="MethodNotFoundRpcError"||h.name==="MethodNotSupportedRpcError"?(f.set(t.uid,!1),o):h});throw o}}if((r==null?void 0:r.type)==="local"){const i=await l.getAction(t,x.prepareTransactionRequest,"prepareTransactionRequest")({account:r,accessList:w,authorizationList:s,blobs:q,chain:n,data:m,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,nonceManager:r.nonceManager,parameters:[...x.defaultParameters,"sidecars"],value:C,...N,to:a}),c=(I=n==null?void 0:n.serializers)==null?void 0:I.transaction,S=await r.signTransaction(i,{serializer:c});return await l.getAction(t,J.sendRawTransaction,"sendRawTransaction")({serializedTransaction:S})}throw(r==null?void 0:r.type)==="smart"?new u.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new u.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:r==null?void 0:r.type})}catch(a){throw a instanceof u.AccountTypeNotSupportedError?a:B.getTransactionError(a,{...e,account:r,chain:e.chain||void 0})}}exports.sendTransaction=K;
|
package/dist/index108.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { parseAccount as
|
|
2
|
-
import { AccountNotFoundError as
|
|
3
|
-
import { BaseError as
|
|
4
|
-
import { recoverAuthorizationAddress as
|
|
5
|
-
import { assertCurrentChain as
|
|
6
|
-
import { getTransactionError as
|
|
7
|
-
import { extract as
|
|
8
|
-
import { formatTransactionRequest as
|
|
1
|
+
import { parseAccount as S } from "./index45.js";
|
|
2
|
+
import { AccountNotFoundError as _, AccountTypeNotSupportedError as p } from "./index247.js";
|
|
3
|
+
import { BaseError as G } from "./index38.js";
|
|
4
|
+
import { recoverAuthorizationAddress as B } from "./index239.js";
|
|
5
|
+
import { assertCurrentChain as O } from "./index212.js";
|
|
6
|
+
import { getTransactionError as U } from "./index248.js";
|
|
7
|
+
import { extract as W } from "./index235.js";
|
|
8
|
+
import { formatTransactionRequest as j } from "./index184.js";
|
|
9
9
|
import { getAction as f } from "./index29.js";
|
|
10
|
-
import { LruMap as
|
|
11
|
-
import { assertRequest as
|
|
12
|
-
import { getChainId as
|
|
13
|
-
import { prepareTransactionRequest as
|
|
14
|
-
import { sendRawTransaction as
|
|
15
|
-
const h = new
|
|
16
|
-
async function
|
|
17
|
-
var z, A, F
|
|
18
|
-
const { account: d = t.account, chain: e = t.chain, accessList: w, authorizationList: s, blobs: l, data: y, gas: T, gasPrice: g, maxFeePerBlobGas: R, maxFeePerGas: E, maxPriorityFeePerGas: q, nonce: P,
|
|
10
|
+
import { LruMap as k } from "./index220.js";
|
|
11
|
+
import { assertRequest as D } from "./index197.js";
|
|
12
|
+
import { getChainId as H } from "./index71.js";
|
|
13
|
+
import { prepareTransactionRequest as J, defaultParameters as K } from "./index96.js";
|
|
14
|
+
import { sendRawTransaction as Q } from "./index97.js";
|
|
15
|
+
const h = new k(128);
|
|
16
|
+
async function dr(t, o) {
|
|
17
|
+
var M, z, A, F;
|
|
18
|
+
const { account: d = t.account, chain: e = t.chain, accessList: w, authorizationList: s, blobs: l, data: y, gas: T, gasPrice: g, maxFeePerBlobGas: R, maxFeePerGas: E, maxPriorityFeePerGas: q, nonce: P, value: C, ...N } = o;
|
|
19
19
|
if (typeof d > "u")
|
|
20
|
-
throw new
|
|
20
|
+
throw new _({
|
|
21
21
|
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
22
22
|
});
|
|
23
|
-
const r = d ?
|
|
23
|
+
const r = d ? S(d) : null;
|
|
24
24
|
try {
|
|
25
|
-
|
|
25
|
+
D(o);
|
|
26
26
|
const a = await (async () => {
|
|
27
27
|
if (o.to)
|
|
28
28
|
return o.to;
|
|
29
29
|
if (o.to !== null && s && s.length > 0)
|
|
30
|
-
return await
|
|
30
|
+
return await B({
|
|
31
31
|
authorization: s[0]
|
|
32
32
|
}).catch(() => {
|
|
33
|
-
throw new
|
|
33
|
+
throw new G("`to` is required. Could not infer from `authorizationList`.");
|
|
34
34
|
});
|
|
35
35
|
})();
|
|
36
36
|
if ((r == null ? void 0 : r.type) === "json-rpc" || r === null) {
|
|
37
37
|
let i;
|
|
38
|
-
e !== null && (i = await f(t,
|
|
38
|
+
e !== null && (i = await f(t, H, "getChainId")({}), O({
|
|
39
39
|
currentChainId: i,
|
|
40
40
|
chain: e
|
|
41
41
|
}));
|
|
42
|
-
const c = (
|
|
42
|
+
const c = (A = (z = (M = t.chain) == null ? void 0 : M.formatters) == null ? void 0 : z.transactionRequest) == null ? void 0 : A.format, x = (c || j)({
|
|
43
43
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
44
|
-
...
|
|
44
|
+
...W(N, { format: c }),
|
|
45
45
|
accessList: w,
|
|
46
46
|
authorizationList: s,
|
|
47
47
|
blobs: l,
|
|
@@ -55,22 +55,21 @@ async function mr(t, o) {
|
|
|
55
55
|
maxPriorityFeePerGas: q,
|
|
56
56
|
nonce: P,
|
|
57
57
|
to: a,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}), v = h.get(t.uid), S = v ? "wallet_sendTransaction" : "eth_sendTransaction";
|
|
58
|
+
value: C
|
|
59
|
+
}), b = h.get(t.uid), L = b ? "wallet_sendTransaction" : "eth_sendTransaction";
|
|
61
60
|
try {
|
|
62
61
|
return await t.request({
|
|
63
|
-
method:
|
|
64
|
-
params: [
|
|
62
|
+
method: L,
|
|
63
|
+
params: [x]
|
|
65
64
|
}, { retryCount: 0 });
|
|
66
|
-
} catch (
|
|
67
|
-
if (
|
|
68
|
-
throw
|
|
69
|
-
const n =
|
|
65
|
+
} catch (v) {
|
|
66
|
+
if (b === !1)
|
|
67
|
+
throw v;
|
|
68
|
+
const n = v;
|
|
70
69
|
if (n.name === "InvalidInputRpcError" || n.name === "InvalidParamsRpcError" || n.name === "MethodNotFoundRpcError" || n.name === "MethodNotSupportedRpcError")
|
|
71
70
|
return await t.request({
|
|
72
71
|
method: "wallet_sendTransaction",
|
|
73
|
-
params: [
|
|
72
|
+
params: [x]
|
|
74
73
|
}, { retryCount: 0 }).then((m) => (h.set(t.uid, !0), m)).catch((m) => {
|
|
75
74
|
const u = m;
|
|
76
75
|
throw u.name === "MethodNotFoundRpcError" || u.name === "MethodNotSupportedRpcError" ? (h.set(t.uid, !1), n) : u;
|
|
@@ -79,7 +78,7 @@ async function mr(t, o) {
|
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
if ((r == null ? void 0 : r.type) === "local") {
|
|
82
|
-
const i = await f(t,
|
|
81
|
+
const i = await f(t, J, "prepareTransactionRequest")({
|
|
83
82
|
account: r,
|
|
84
83
|
accessList: w,
|
|
85
84
|
authorizationList: s,
|
|
@@ -93,16 +92,15 @@ async function mr(t, o) {
|
|
|
93
92
|
maxPriorityFeePerGas: q,
|
|
94
93
|
nonce: P,
|
|
95
94
|
nonceManager: r.nonceManager,
|
|
96
|
-
parameters: [...
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
...M,
|
|
95
|
+
parameters: [...K, "sidecars"],
|
|
96
|
+
value: C,
|
|
97
|
+
...N,
|
|
100
98
|
to: a
|
|
101
|
-
}), c = (
|
|
99
|
+
}), c = (F = e == null ? void 0 : e.serializers) == null ? void 0 : F.transaction, I = await r.signTransaction(i, {
|
|
102
100
|
serializer: c
|
|
103
101
|
});
|
|
104
|
-
return await f(t,
|
|
105
|
-
serializedTransaction:
|
|
102
|
+
return await f(t, Q, "sendRawTransaction")({
|
|
103
|
+
serializedTransaction: I
|
|
106
104
|
});
|
|
107
105
|
}
|
|
108
106
|
throw (r == null ? void 0 : r.type) === "smart" ? new p({
|
|
@@ -116,7 +114,7 @@ async function mr(t, o) {
|
|
|
116
114
|
type: r == null ? void 0 : r.type
|
|
117
115
|
});
|
|
118
116
|
} catch (a) {
|
|
119
|
-
throw a instanceof p ? a :
|
|
117
|
+
throw a instanceof p ? a : U(a, {
|
|
120
118
|
...o,
|
|
121
119
|
account: r,
|
|
122
120
|
chain: o.chain || void 0
|
|
@@ -124,5 +122,5 @@ async function mr(t, o) {
|
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
export {
|
|
127
|
-
|
|
125
|
+
dr as sendTransaction
|
|
128
126
|
};
|
package/dist/index110.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index45.cjs"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index45.cjs"),r=require("./index247.cjs"),e=require("./index104.cjs");async function a(t,n){const{account:i=t.account}=n;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const o=u.parseAccount(i);if(!o.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:o.type});const c=await e.prepareAuthorization(t,n);return o.signAuthorization(c)}exports.signAuthorization=a;
|
package/dist/index110.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseAccount as c } from "./index45.js";
|
|
2
|
-
import { AccountNotFoundError as u, AccountTypeNotSupportedError as a } from "./
|
|
2
|
+
import { AccountNotFoundError as u, AccountTypeNotSupportedError as a } from "./index247.js";
|
|
3
3
|
import { prepareAuthorization as s } from "./index104.js";
|
|
4
4
|
async function A(t, n) {
|
|
5
5
|
const { account: i = t.account } = n;
|
package/dist/index111.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index45.cjs"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index45.cjs"),a=require("./index247.cjs"),o=require("./index150.cjs");async function i(n,{account:e=n.account,message:r}){if(!e)throw new a.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const t=c.parseAccount(e);if(t.signMessage)return t.signMessage({message:r});const s=typeof r=="string"?o.stringToHex(r):r.raw instanceof Uint8Array?o.toHex(r.raw):r.raw;return n.request({method:"personal_sign",params:[s,t.address]},{retryCount:0})}exports.signMessage=i;
|
package/dist/index111.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseAccount as e } from "./index45.js";
|
|
2
|
-
import { AccountNotFoundError as i } from "./
|
|
2
|
+
import { AccountNotFoundError as i } from "./index247.js";
|
|
3
3
|
import { stringToHex as a, toHex as c } from "./index150.js";
|
|
4
4
|
async function g(n, { account: o = n.account, message: r }) {
|
|
5
5
|
if (!o)
|
package/dist/index112.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index45.cjs"),f=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index45.cjs"),f=require("./index247.cjs"),C=require("./index212.cjs"),T=require("./index150.cjs"),m=require("./index184.cjs"),I=require("./index29.cjs"),w=require("./index197.cjs"),A=require("./index71.cjs");async function R(t,s){var i,u,d,h;const{account:o=t.account,chain:n=t.chain,...c}=s;if(!o)throw new f.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const r=g.parseAccount(o);w.assertRequest({account:r,...s});const a=await I.getAction(t,A.getChainId,"getChainId")({});n!==null&&C.assertCurrentChain({currentChainId:a,chain:n});const e=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),q=((u=e==null?void 0:e.transactionRequest)==null?void 0:u.format)||m.formatTransactionRequest;return r.signTransaction?r.signTransaction({...c,chainId:a},{serializer:(h=(d=t.chain)==null?void 0:d.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...q(c),chainId:T.numberToHex(a),from:r.address}]},{retryCount:0})}exports.signTransaction=R;
|
package/dist/index112.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseAccount as d } from "./index45.js";
|
|
2
|
-
import { AccountNotFoundError as p } from "./
|
|
2
|
+
import { AccountNotFoundError as p } from "./index247.js";
|
|
3
3
|
import { assertCurrentChain as g } from "./index212.js";
|
|
4
4
|
import { numberToHex as T } from "./index150.js";
|
|
5
5
|
import { formatTransactionRequest as C } from "./index184.js";
|
package/dist/index113.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index45.cjs"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index45.cjs"),y=require("./index247.cjs"),s=require("./index188.cjs");async function p(c,r){const{account:i=c.account,domain:t,message:a,primaryType:e}=r;if(!i)throw new y.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const n=u.parseAccount(i),o={EIP712Domain:s.getTypesForEIP712Domain({domain:t}),...r.types};if(s.validateTypedData({domain:t,message:a,primaryType:e,types:o}),n.signTypedData)return n.signTypedData({domain:t,message:a,primaryType:e,types:o});const d=s.serializeTypedData({domain:t,message:a,primaryType:e,types:o});return c.request({method:"eth_signTypedData_v4",params:[n.address,d]},{retryCount:0})}exports.signTypedData=p;
|
package/dist/index113.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseAccount as p } from "./index45.js";
|
|
2
|
-
import { AccountNotFoundError as d } from "./
|
|
2
|
+
import { AccountNotFoundError as d } from "./index247.js";
|
|
3
3
|
import { getTypesForEIP712Domain as y, validateTypedData as m, serializeTypedData as u } from "./index188.js";
|
|
4
4
|
async function f(r, s) {
|
|
5
5
|
const { account: c = r.account, domain: t, message: a, primaryType: o } = s;
|
package/dist/index125.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="2.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="2.28.0";exports.version=e;
|
package/dist/index125.js
CHANGED
package/dist/index15.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index17.cjs"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index17.cjs"),a=require("./index27.cjs"),s=require("./index26.cjs"),l=require("./index28.cjs"),b=require("./index24.cjs"),n={42161:s.mainnet,421614:a.sepolia},h=async e=>{const{chain:t}=e;if(!t)return r.Err("No chain found");const o=(u=>u in n)(t.id)?n[t.id]:t;return await i(o)},i=async e=>{const t=l.createPublicClient({chain:e,transport:b.http()});try{const c=await t.getBlockNumber();return r.Ok(Number(c))}catch(c){return r.Err("Failed to fetch evm block number",c)}},m=async e=>{try{const t=await e.getLatestTip();return r.Ok(t)}catch(t){return r.Err("Failed to fetch bitcoin block number",t)}};exports._fetchEVMBlockNumber=i;exports.fetchBitcoinBlockNumber=m;exports.fetchEVMBlockNumber=h;
|
package/dist/index15.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Ok as n, Err as c } from "./index17.js";
|
|
2
|
-
import { sepolia as m } from "./
|
|
3
|
-
import { mainnet as s } from "./
|
|
4
|
-
import { createPublicClient as u } from "./
|
|
5
|
-
import { http as b } from "./
|
|
2
|
+
import { sepolia as m } from "./index27.js";
|
|
3
|
+
import { mainnet as s } from "./index26.js";
|
|
4
|
+
import { createPublicClient as u } from "./index28.js";
|
|
5
|
+
import { http as b } from "./index24.js";
|
|
6
6
|
const e = {
|
|
7
7
|
42161: s,
|
|
8
8
|
421614: m
|
package/dist/index189.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index190.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index190.cjs"),s=require("./index191.cjs");async function o({hash:e,signature:r}){return c.publicKeyToAddress(await s.recoverPublicKey({hash:e,signature:r}))}exports.recoverAddress=o;
|
package/dist/index189.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { publicKeyToAddress as o } from "./index190.js";
|
|
2
2
|
import { recoverPublicKey as c } from "./index191.js";
|
|
3
|
-
async function
|
|
3
|
+
async function t({ hash: r, signature: e }) {
|
|
4
4
|
return o(await c({ hash: r, signature: e }));
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
t as recoverAddress
|
|
8
8
|
};
|
package/dist/index191.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=require("./index185.cjs"),t=require("./index182.cjs"),n=require("./index150.cjs");async function d({hash:e,signature:r}){const u=i.isHex(e)?e:n.toHex(e),{secp256k1:o}=await Promise.resolve().then(()=>require("./index192.cjs"));return`0x${(()=>{if(typeof r=="object"&&"r"in r&&"s"in r){const{r:l,s:v,v:b,yParity:f}=r,H=Number(f??b),a=s(H);return new o.Signature(t.hexToBigInt(l),t.hexToBigInt(v)).addRecoveryBit(a)}const c=i.isHex(r)?r:n.toHex(r),x=t.hexToNumber(`0x${c.slice(130)}`),y=s(x);return o.Signature.fromCompact(c.substring(2,130)).addRecoveryBit(y)})().recoverPublicKey(u.substring(2)).toHex(!1)}`}function s(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}exports.recoverPublicKey=d;
|
package/dist/index191.js
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import { isHex as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const u = i(r) ? r : c(r), { secp256k1: t } = await import("./index192.js");
|
|
1
|
+
import { isHex as c } from "./index185.js";
|
|
2
|
+
import { hexToBigInt as n, hexToNumber as a } from "./index182.js";
|
|
3
|
+
import { toHex as i } from "./index150.js";
|
|
4
|
+
async function R({ hash: e, signature: r }) {
|
|
5
|
+
const u = c(e) ? e : i(e), { secp256k1: o } = await import("./index192.js");
|
|
7
6
|
return `0x${(() => {
|
|
8
|
-
if (typeof
|
|
9
|
-
const { r:
|
|
10
|
-
return new
|
|
7
|
+
if (typeof r == "object" && "r" in r && "s" in r) {
|
|
8
|
+
const { r: y, s: p, v, yParity: x } = r, b = Number(x ?? v), l = s(b);
|
|
9
|
+
return new o.Signature(n(y), n(p)).addRecoveryBit(l);
|
|
11
10
|
}
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
throw new Error("invalid signature length");
|
|
15
|
-
const f = d(`0x${o.slice(130)}`), m = s(f);
|
|
16
|
-
return t.Signature.fromCompact(o.substring(2, 130)).addRecoveryBit(m);
|
|
11
|
+
const t = c(r) ? r : i(r), f = a(`0x${t.slice(130)}`), m = s(f);
|
|
12
|
+
return o.Signature.fromCompact(t.substring(2, 130)).addRecoveryBit(m);
|
|
17
13
|
})().recoverPublicKey(u.substring(2)).toHex(!1)}`;
|
|
18
14
|
}
|
|
19
|
-
function s(
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
22
|
-
if (
|
|
15
|
+
function s(e) {
|
|
16
|
+
if (e === 0 || e === 1)
|
|
17
|
+
return e;
|
|
18
|
+
if (e === 27)
|
|
23
19
|
return 0;
|
|
24
|
-
if (
|
|
20
|
+
if (e === 28)
|
|
25
21
|
return 1;
|
|
26
22
|
throw new Error("Invalid yParityOrV value");
|
|
27
23
|
}
|
package/dist/index22.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index192.cjs"),u=require("./index150.cjs"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index192.cjs"),u=require("./index150.cjs"),a=require("./index251.cjs"),g=require("./index190.cjs"),y=require("./index252.cjs"),d=require("./index253.cjs"),T=require("./index254.cjs"),l=require("./index255.cjs"),q=require("./index256.cjs");function A(s,t={}){const{nonceManager:c}=t,e=u.toHex(i.secp256k1.getPublicKey(s.slice(2),!1)),o=g.publicKeyToAddress(e);return{...a.toAccount({address:o,nonceManager:c,async sign({hash:n}){return y.sign({hash:n,privateKey:s,to:"hex"})},async signAuthorization(n){return d.signAuthorization({...n,privateKey:s})},async signMessage({message:n}){return T.signMessage({message:n,privateKey:s})},async signTransaction(n,{serializer:r}={}){return l.signTransaction({privateKey:s,transaction:n,serializer:r})},async signTypedData(n){return q.signTypedData({...n,privateKey:s})}}),publicKey:e,source:"privateKey"}}exports.privateKeyToAccount=A;
|
package/dist/index22.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { secp256k1 as e } from "./index192.js";
|
|
2
2
|
import { toHex as a } from "./index150.js";
|
|
3
|
-
import { toAccount as m } from "./
|
|
3
|
+
import { toAccount as m } from "./index251.js";
|
|
4
4
|
import { publicKeyToAddress as u } from "./index190.js";
|
|
5
|
-
import { sign as g } from "./
|
|
6
|
-
import { signAuthorization as p } from "./
|
|
7
|
-
import { signMessage as f } from "./
|
|
8
|
-
import { signTransaction as y } from "./
|
|
9
|
-
import { signTypedData as d } from "./
|
|
5
|
+
import { sign as g } from "./index252.js";
|
|
6
|
+
import { signAuthorization as p } from "./index253.js";
|
|
7
|
+
import { signMessage as f } from "./index254.js";
|
|
8
|
+
import { signTransaction as y } from "./index255.js";
|
|
9
|
+
import { signTypedData as d } from "./index256.js";
|
|
10
10
|
function H(n, t = {}) {
|
|
11
11
|
const { nonceManager: s } = t, r = a(e.getPublicKey(n.slice(2), !1)), c = u(r);
|
|
12
12
|
return {
|
package/dist/index23.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=require("./index44.cjs"),c=require("./index98.cjs");function r(e){const{key:t="wallet",name:l="Wallet Client",transport:n}=e;return i.createClient({...e,key:t,name:l,transport:n,type:"walletClient"}).extend(c.walletActions)}exports.createWalletClient=r;
|
package/dist/index23.js
CHANGED
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
name: "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
name: "Etherscan",
|
|
14
|
-
url: "https://sepolia.etherscan.io",
|
|
15
|
-
apiUrl: "https://api-sepolia.etherscan.io/api"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
contracts: {
|
|
19
|
-
multicall3: {
|
|
20
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
21
|
-
blockCreated: 751532
|
|
22
|
-
},
|
|
23
|
-
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
24
|
-
ensUniversalResolver: {
|
|
25
|
-
address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
|
|
26
|
-
blockCreated: 5317080
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
testnet: !0
|
|
30
|
-
});
|
|
1
|
+
import { createClient as i } from "./index44.js";
|
|
2
|
+
import { walletActions as o } from "./index98.js";
|
|
3
|
+
function m(t) {
|
|
4
|
+
const { key: e = "wallet", name: l = "Wallet Client", transport: n } = t;
|
|
5
|
+
return i({
|
|
6
|
+
...t,
|
|
7
|
+
key: e,
|
|
8
|
+
name: l,
|
|
9
|
+
transport: n,
|
|
10
|
+
type: "walletClient"
|
|
11
|
+
}).extend(o);
|
|
12
|
+
}
|
|
31
13
|
export {
|
|
32
|
-
|
|
14
|
+
m as createWalletClient
|
|
33
15
|
};
|
package/dist/index230.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 d=require("./index128.cjs"),f=require("./index38.cjs"),i=require("./index127.cjs");function v(e,l){var t,o,n,a,s,u;if(!(e instanceof f.BaseError))return!1;const r=e.walk(c=>c instanceof i.ContractFunctionRevertedError);return r instanceof i.ContractFunctionRevertedError?!!(((t=r.data)==null?void 0:t.errorName)==="ResolverNotFound"||((o=r.data)==null?void 0:o.errorName)==="ResolverWildcardNotSupported"||((n=r.data)==null?void 0:n.errorName)==="ResolverNotContract"||((a=r.data)==null?void 0:a.errorName)==="ResolverError"||((s=r.data)==null?void 0:s.errorName)==="HttpError"||(u=r.reason)!=null&&u.includes("Wildcard on non-extended resolvers is not supported")||l==="reverse"&&r.reason===d.panicReasons[50]):!1}exports.isNullUniversalResolverError=v;
|