@coinbase/cdp-core 0.0.56 → 0.0.57
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/esm/index.native103.js +1 -1
- package/dist/esm/index.native115.js +1 -1
- package/dist/esm/index.native119.js +6 -6
- package/dist/esm/index.native127.js +1 -1
- package/dist/esm/index.native131.js +1 -1
- package/dist/esm/index.native134.js +19 -77
- package/dist/esm/index.native135.js +10 -47
- package/dist/esm/index.native136.js +20 -4
- package/dist/esm/index.native137.js +93 -20
- package/dist/esm/index.native138.js +20 -9
- package/dist/esm/index.native139.js +114 -16
- package/dist/esm/index.native140.js +44 -91
- package/dist/esm/index.native141.js +78 -20
- package/dist/esm/index.native142.js +4 -118
- package/dist/esm/index.native156.js +17 -14
- package/dist/esm/index.native157.js +28 -18
- package/dist/esm/index.native158.js +6 -26
- package/dist/esm/index.native159.js +9 -6
- package/dist/esm/index.native160.js +13 -11
- package/dist/esm/index.native161.js +8 -11
- package/dist/esm/index.native162.js +14 -7
- package/dist/esm/index.native163.js +80 -16
- package/dist/esm/index.native164.js +14 -80
- package/dist/esm/index.native45.js +1 -1
- package/dist/esm/index.native46.js +1 -1
- package/dist/esm/index.native48.js +3 -3
- package/dist/esm/index.native54.js +2 -4
- package/dist/esm/index.native55.js +66 -2
- package/dist/esm/index.native56.js +367 -2
- package/dist/esm/index.native57.js +2 -66
- package/dist/esm/index.native58.js +2 -365
- package/dist/esm/index.web103.js +2 -5
- package/dist/esm/index.web104.js +4 -18
- package/dist/esm/index.web105.js +18 -7
- package/dist/esm/index.web106.js +7 -3
- package/dist/esm/index.web107.js +3 -19
- package/dist/esm/index.web108.js +19 -8
- package/dist/esm/index.web109.js +8 -7
- package/dist/esm/index.web110.js +7 -71
- package/dist/esm/index.web111.js +70 -17
- package/dist/esm/index.web112.js +18 -3
- package/dist/esm/index.web113.js +3 -4
- package/dist/esm/index.web114.js +4 -4
- package/dist/esm/index.web115.js +4 -4
- package/dist/esm/index.web116.js +4 -19
- package/dist/esm/index.web117.js +15 -48
- package/dist/esm/index.web118.js +52 -17
- package/dist/esm/index.web119.js +17 -20
- package/dist/esm/index.web120.js +20 -8
- package/dist/esm/index.web121.js +8 -30
- package/dist/esm/index.web122.js +30 -7
- package/dist/esm/index.web123.js +7 -20
- package/dist/esm/index.web124.js +21 -2
- package/dist/esm/index.web144.js +1 -1
- package/dist/esm/index.web40.js +1 -1
- package/dist/esm/index.web41.js +3 -3
- package/dist/esm/index.web46.js +2 -377
- package/dist/esm/index.web47.js +379 -2
- package/dist/esm/index.web48.js +28 -65
- package/dist/esm/index.web49.js +28 -364
- package/dist/esm/index.web50.js +2 -4
- package/dist/esm/index.web51.js +65 -28
- package/dist/esm/index.web52.js +364 -28
- package/dist/esm/index.web73.js +1 -1
- package/dist/native/index.native103.js +1 -1
- package/dist/native/index.native115.js +1 -1
- package/dist/native/index.native119.js +6 -6
- package/dist/native/index.native127.js +1 -1
- package/dist/native/index.native131.js +1 -1
- package/dist/native/index.native134.js +19 -77
- package/dist/native/index.native135.js +10 -47
- package/dist/native/index.native136.js +20 -4
- package/dist/native/index.native137.js +93 -20
- package/dist/native/index.native138.js +20 -9
- package/dist/native/index.native139.js +114 -16
- package/dist/native/index.native140.js +44 -91
- package/dist/native/index.native141.js +78 -20
- package/dist/native/index.native142.js +4 -118
- package/dist/native/index.native156.js +17 -14
- package/dist/native/index.native157.js +28 -18
- package/dist/native/index.native158.js +6 -26
- package/dist/native/index.native159.js +9 -6
- package/dist/native/index.native160.js +13 -11
- package/dist/native/index.native161.js +8 -11
- package/dist/native/index.native162.js +14 -7
- package/dist/native/index.native163.js +80 -16
- package/dist/native/index.native164.js +14 -80
- package/dist/native/index.native45.js +1 -1
- package/dist/native/index.native46.js +1 -1
- package/dist/native/index.native48.js +3 -3
- package/dist/native/index.native54.js +2 -4
- package/dist/native/index.native55.js +66 -2
- package/dist/native/index.native56.js +367 -2
- package/dist/native/index.native57.js +2 -66
- package/dist/native/index.native58.js +2 -365
- package/dist/web/index.web103.js +2 -5
- package/dist/web/index.web104.js +4 -18
- package/dist/web/index.web105.js +18 -7
- package/dist/web/index.web106.js +7 -3
- package/dist/web/index.web107.js +3 -19
- package/dist/web/index.web108.js +19 -8
- package/dist/web/index.web109.js +8 -7
- package/dist/web/index.web110.js +7 -71
- package/dist/web/index.web111.js +70 -17
- package/dist/web/index.web112.js +18 -3
- package/dist/web/index.web113.js +3 -4
- package/dist/web/index.web114.js +4 -4
- package/dist/web/index.web115.js +4 -4
- package/dist/web/index.web116.js +4 -19
- package/dist/web/index.web117.js +15 -48
- package/dist/web/index.web118.js +52 -17
- package/dist/web/index.web119.js +17 -20
- package/dist/web/index.web120.js +20 -8
- package/dist/web/index.web121.js +8 -30
- package/dist/web/index.web122.js +30 -7
- package/dist/web/index.web123.js +7 -20
- package/dist/web/index.web124.js +21 -2
- package/dist/web/index.web144.js +1 -1
- package/dist/web/index.web40.js +1 -1
- package/dist/web/index.web41.js +3 -3
- package/dist/web/index.web46.js +2 -377
- package/dist/web/index.web47.js +379 -2
- package/dist/web/index.web48.js +28 -65
- package/dist/web/index.web49.js +28 -364
- package/dist/web/index.web50.js +2 -4
- package/dist/web/index.web51.js +65 -28
- package/dist/web/index.web52.js +364 -28
- package/dist/web/index.web73.js +1 -1
- package/package.json +3 -3
package/dist/web/index.web112.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { signEvmTypedData as n } from "./index.web6.js";
|
|
2
|
+
import { validateUserOwnsEOA as o, EIP1193ProviderError as i, STANDARD_ERROR_CODES as s } from "./index.web19.js";
|
|
3
|
+
async function p(t) {
|
|
4
|
+
const [r, a] = t;
|
|
5
|
+
await o(r);
|
|
6
|
+
try {
|
|
7
|
+
const { signature: e } = await n({
|
|
8
|
+
evmAccount: r,
|
|
9
|
+
typedData: JSON.parse(a)
|
|
10
|
+
});
|
|
11
|
+
return e;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw new i(
|
|
14
|
+
s.provider.userRejectedRequest,
|
|
15
|
+
e instanceof Error ? e.message : "Signing failed"
|
|
16
|
+
);
|
|
17
|
+
}
|
|
3
18
|
}
|
|
4
19
|
export {
|
|
5
|
-
|
|
20
|
+
p as handleSignTypedData
|
|
6
21
|
};
|
package/dist/web/index.web113.js
CHANGED
package/dist/web/index.web114.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { getCurrentUser as t, signOut as n } from "./index.web6.js";
|
|
2
|
+
async function i() {
|
|
3
|
+
await t() && await n();
|
|
4
4
|
}
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as handleDisconnect
|
|
7
7
|
};
|
package/dist/web/index.web115.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
function a(t, e) {
|
|
2
|
+
const n = Number.parseInt(t[0].chainId, 16);
|
|
3
|
+
e.getState().setChainId(n);
|
|
4
4
|
}
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as handleSwitchEthereumChain
|
|
7
7
|
};
|
package/dist/web/index.web116.js
CHANGED
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const [a, t] = e, o = await c(t);
|
|
5
|
-
try {
|
|
6
|
-
const { signature: r } = await s({
|
|
7
|
-
smartAccount: t,
|
|
8
|
-
ownerAddress: o.evmAccounts[0],
|
|
9
|
-
hash: a,
|
|
10
|
-
chainId: n.getState().chainId
|
|
11
|
-
});
|
|
12
|
-
return r;
|
|
13
|
-
} catch (r) {
|
|
14
|
-
throw new i(
|
|
15
|
-
d.provider.userRejectedRequest,
|
|
16
|
-
r instanceof Error ? r.message : "Signing failed"
|
|
17
|
-
);
|
|
18
|
-
}
|
|
1
|
+
import { getCurrentUser as r } from "./index.web6.js";
|
|
2
|
+
async function n() {
|
|
3
|
+
return (await r())?.evmSmartAccounts || [];
|
|
19
4
|
}
|
|
20
5
|
export {
|
|
21
|
-
|
|
6
|
+
n as handleAccounts
|
|
22
7
|
};
|
package/dist/web/index.web117.js
CHANGED
|
@@ -1,55 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const i = t[0], c = (await d()).evmSmartAccounts?.[0], a = s.getState().chainId;
|
|
6
|
-
if (!p(a) || !r[a])
|
|
7
|
-
throw new o(
|
|
8
|
-
n.rpc.invalidParams,
|
|
9
|
-
"Chain ID is not supported for user operations"
|
|
10
|
-
);
|
|
1
|
+
import { signAndWrapTypedDataForSmartAccount as s } from "./index.web36.js";
|
|
2
|
+
import { validateUserOwnsSmartAccount as c, EIP1193ProviderError as i, STANDARD_ERROR_CODES as d } from "./index.web19.js";
|
|
3
|
+
async function h(e, n) {
|
|
4
|
+
const [a, t] = e, o = await c(t);
|
|
11
5
|
try {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
const { signature: r } = await s({
|
|
7
|
+
smartAccount: t,
|
|
8
|
+
ownerAddress: o.evmAccounts[0],
|
|
9
|
+
hash: a,
|
|
10
|
+
chainId: n.getState().chainId
|
|
16
11
|
});
|
|
17
|
-
return
|
|
18
|
-
} catch (
|
|
19
|
-
throw
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
return r;
|
|
13
|
+
} catch (r) {
|
|
14
|
+
throw new i(
|
|
15
|
+
d.provider.userRejectedRequest,
|
|
16
|
+
r instanceof Error ? r.message : "Signing failed"
|
|
22
17
|
);
|
|
23
18
|
}
|
|
24
19
|
}
|
|
25
|
-
function l(t) {
|
|
26
|
-
return {
|
|
27
|
-
atomic: !0,
|
|
28
|
-
chainId: m[t.network] ?? 0,
|
|
29
|
-
receipts: t.receipts?.map((s) => ({
|
|
30
|
-
transactionHash: s.transactionHash,
|
|
31
|
-
blockHash: s.blockHash,
|
|
32
|
-
blockNumber: BigInt(s.blockNumber ?? 0),
|
|
33
|
-
gasUsed: BigInt(s.gasUsed ?? 0),
|
|
34
|
-
logs: [],
|
|
35
|
-
status: ""
|
|
36
|
-
})),
|
|
37
|
-
id: t.userOpHash,
|
|
38
|
-
status: h(t.status),
|
|
39
|
-
version: "1"
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function h(t) {
|
|
43
|
-
switch (t) {
|
|
44
|
-
case "dropped":
|
|
45
|
-
case "failed":
|
|
46
|
-
return 400;
|
|
47
|
-
case "complete":
|
|
48
|
-
return 200;
|
|
49
|
-
default:
|
|
50
|
-
return 100;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
20
|
export {
|
|
54
|
-
|
|
21
|
+
h as handleEthSign
|
|
55
22
|
};
|
package/dist/web/index.web118.js
CHANGED
|
@@ -1,20 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { userOperationChainIdToNameMapping as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { getUserOperation as u } from "./index.web6.js";
|
|
2
|
+
import { isChainIdSupportedForCDPUserOps as p, userOperationChainIdToNameMapping as r, userOperationNameToChainIdMapping as m } from "./index.web30.js";
|
|
3
|
+
import { validateUserHasEvmSmartAccount as d, RPCRequestError as o, STANDARD_ERROR_CODES as n } from "./index.web19.js";
|
|
4
|
+
async function I(t, s) {
|
|
5
|
+
const i = t[0], c = (await d()).evmSmartAccounts?.[0], a = s.getState().chainId;
|
|
6
|
+
if (!p(a) || !r[a])
|
|
7
|
+
throw new o(
|
|
8
|
+
n.rpc.invalidParams,
|
|
9
|
+
"Chain ID is not supported for user operations"
|
|
10
|
+
);
|
|
11
|
+
try {
|
|
12
|
+
const e = await u({
|
|
13
|
+
userOperationHash: i,
|
|
14
|
+
evmSmartAccount: c,
|
|
15
|
+
network: r[a]
|
|
16
|
+
});
|
|
17
|
+
return l(e);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw console.log("Failed to get user operation status", e), new o(
|
|
20
|
+
n.rpc.internal,
|
|
21
|
+
"Failed to get user operation status"
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function l(t) {
|
|
26
|
+
return {
|
|
27
|
+
atomic: !0,
|
|
28
|
+
chainId: m[t.network] ?? 0,
|
|
29
|
+
receipts: t.receipts?.map((s) => ({
|
|
30
|
+
transactionHash: s.transactionHash,
|
|
31
|
+
blockHash: s.blockHash,
|
|
32
|
+
blockNumber: BigInt(s.blockNumber ?? 0),
|
|
33
|
+
gasUsed: BigInt(s.gasUsed ?? 0),
|
|
34
|
+
logs: [],
|
|
35
|
+
status: ""
|
|
36
|
+
})),
|
|
37
|
+
id: t.userOpHash,
|
|
38
|
+
status: h(t.status),
|
|
39
|
+
version: "1"
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function h(t) {
|
|
43
|
+
switch (t) {
|
|
44
|
+
case "dropped":
|
|
45
|
+
case "failed":
|
|
46
|
+
return 400;
|
|
47
|
+
case "complete":
|
|
48
|
+
return 200;
|
|
49
|
+
default:
|
|
50
|
+
return 100;
|
|
51
|
+
}
|
|
17
52
|
}
|
|
18
53
|
export {
|
|
19
|
-
|
|
54
|
+
I as handleGetCallsStatus
|
|
20
55
|
};
|
package/dist/web/index.web119.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
r instanceof Error ? r.message : "Signing failed"
|
|
18
|
-
);
|
|
19
|
-
}
|
|
1
|
+
import { toHex as a } from "viem";
|
|
2
|
+
import { userOperationChainIdToNameMapping as o } from "./index.web30.js";
|
|
3
|
+
import { validateUserConnected as i } from "./index.web19.js";
|
|
4
|
+
import "zustand";
|
|
5
|
+
import "@coinbase/cdp-api-client";
|
|
6
|
+
async function l() {
|
|
7
|
+
return !(await i()).evmSmartAccounts?.length ? {} : Object.keys(o).reduce(
|
|
8
|
+
(t, e) => {
|
|
9
|
+
const r = a(Number(e));
|
|
10
|
+
return t[r] = {
|
|
11
|
+
atomic: { status: "supported" },
|
|
12
|
+
paymasterService: { supported: !0 }
|
|
13
|
+
}, t;
|
|
14
|
+
},
|
|
15
|
+
{}
|
|
16
|
+
);
|
|
20
17
|
}
|
|
21
18
|
export {
|
|
22
|
-
|
|
19
|
+
l as handleGetCapabilities
|
|
23
20
|
};
|
package/dist/web/index.web120.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { hashMessage as o, hexToString as c } from "viem";
|
|
2
|
+
import { signAndWrapTypedDataForSmartAccount as i } from "./index.web36.js";
|
|
3
|
+
import { validateUserOwnsSmartAccount as d, EIP1193ProviderError as m, STANDARD_ERROR_CODES as g } from "./index.web19.js";
|
|
4
|
+
async function S(t, a) {
|
|
5
|
+
const [n, e] = t, s = await d(e);
|
|
6
|
+
try {
|
|
7
|
+
const { signature: r } = await i({
|
|
8
|
+
smartAccount: e,
|
|
9
|
+
ownerAddress: s.evmAccounts[0],
|
|
10
|
+
hash: o(c(n)),
|
|
11
|
+
chainId: a.getState().chainId
|
|
12
|
+
});
|
|
13
|
+
return r;
|
|
14
|
+
} catch (r) {
|
|
15
|
+
throw new m(
|
|
16
|
+
g.provider.userRejectedRequest,
|
|
17
|
+
r instanceof Error ? r.message : "Signing failed"
|
|
18
|
+
);
|
|
19
|
+
}
|
|
8
20
|
}
|
|
9
21
|
export {
|
|
10
|
-
|
|
22
|
+
S as handlePersonalSign
|
|
11
23
|
};
|
package/dist/web/index.web121.js
CHANGED
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
s.rpc.invalidParams,
|
|
9
|
-
"Chain ID is not supported for user operations"
|
|
10
|
-
);
|
|
11
|
-
try {
|
|
12
|
-
return (await c({
|
|
13
|
-
evmSmartAccount: i,
|
|
14
|
-
calls: m(n),
|
|
15
|
-
network: p[a]
|
|
16
|
-
})).userOperationHash;
|
|
17
|
-
} catch (e) {
|
|
18
|
-
throw new o(
|
|
19
|
-
s.rpc.transactionRejected,
|
|
20
|
-
e instanceof Error ? e.message : "User operation failed"
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function m(r) {
|
|
25
|
-
return r.map((t) => ({
|
|
26
|
-
to: t.to,
|
|
27
|
-
data: t.data,
|
|
28
|
-
value: t.value ? BigInt(t.value) : void 0
|
|
29
|
-
}));
|
|
1
|
+
import { fromNumber as c } from "./index.web144.js";
|
|
2
|
+
import { validateUserConnected as o } from "./index.web19.js";
|
|
3
|
+
async function m(t, e) {
|
|
4
|
+
const n = await o();
|
|
5
|
+
return t.emit("connect", {
|
|
6
|
+
chainId: c(e.getState().chainId)
|
|
7
|
+
}), n.evmSmartAccounts || [];
|
|
30
8
|
}
|
|
31
9
|
export {
|
|
32
|
-
|
|
10
|
+
m as handleRequestAccounts
|
|
33
11
|
};
|
package/dist/web/index.web122.js
CHANGED
|
@@ -1,10 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
)
|
|
1
|
+
import { sendUserOperation as c } from "./index.web6.js";
|
|
2
|
+
import { isChainIdSupportedForCDPUserOps as u, userOperationChainIdToNameMapping as p } from "./index.web30.js";
|
|
3
|
+
import { validateUserHasEvmSmartAccount as d, RPCRequestError as o, STANDARD_ERROR_CODES as s } from "./index.web19.js";
|
|
4
|
+
async function R(r, t) {
|
|
5
|
+
const [{ calls: n }] = r, i = (await d()).evmSmartAccounts[0], a = t.getState().chainId;
|
|
6
|
+
if (!u(a))
|
|
7
|
+
throw new o(
|
|
8
|
+
s.rpc.invalidParams,
|
|
9
|
+
"Chain ID is not supported for user operations"
|
|
10
|
+
);
|
|
11
|
+
try {
|
|
12
|
+
return (await c({
|
|
13
|
+
evmSmartAccount: i,
|
|
14
|
+
calls: m(n),
|
|
15
|
+
network: p[a]
|
|
16
|
+
})).userOperationHash;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
throw new o(
|
|
19
|
+
s.rpc.transactionRejected,
|
|
20
|
+
e instanceof Error ? e.message : "User operation failed"
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function m(r) {
|
|
25
|
+
return r.map((t) => ({
|
|
26
|
+
to: t.to,
|
|
27
|
+
data: t.data,
|
|
28
|
+
value: t.value ? BigInt(t.value) : void 0
|
|
29
|
+
}));
|
|
7
30
|
}
|
|
8
31
|
export {
|
|
9
|
-
|
|
32
|
+
R as handleSendCalls
|
|
10
33
|
};
|
package/dist/web/index.web123.js
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const { signature: r } = await c({
|
|
8
|
-
smartAccount: t,
|
|
9
|
-
ownerAddress: o.evmAccounts[0],
|
|
10
|
-
hash: s(JSON.parse(n)),
|
|
11
|
-
chainId: e.getState().chainId
|
|
12
|
-
});
|
|
13
|
-
return r;
|
|
14
|
-
} catch (r) {
|
|
15
|
-
throw new d(
|
|
16
|
-
m.provider.userRejectedRequest,
|
|
17
|
-
r instanceof Error ? r.message : "Signing failed"
|
|
18
|
-
);
|
|
19
|
-
}
|
|
1
|
+
import { EIP1193ProviderError as r, STANDARD_ERROR_CODES as t } from "./index.web19.js";
|
|
2
|
+
async function a(n, o, s) {
|
|
3
|
+
throw new r(
|
|
4
|
+
t.provider.unsupportedMethod,
|
|
5
|
+
"eth_sendTransaction is not supported with smart accounts. Use wallet_sendCalls instead."
|
|
6
|
+
);
|
|
20
7
|
}
|
|
21
8
|
export {
|
|
22
|
-
|
|
9
|
+
a as handleSendTransaction
|
|
23
10
|
};
|
package/dist/web/index.web124.js
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { hashTypedData as s } from "viem";
|
|
2
|
+
import { signAndWrapTypedDataForSmartAccount as c } from "./index.web36.js";
|
|
3
|
+
import { validateUserOwnsSmartAccount as i, EIP1193ProviderError as d, STANDARD_ERROR_CODES as m } from "./index.web19.js";
|
|
4
|
+
async function A(a, e) {
|
|
5
|
+
const [t, n] = a, o = await i(t);
|
|
6
|
+
try {
|
|
7
|
+
const { signature: r } = await c({
|
|
8
|
+
smartAccount: t,
|
|
9
|
+
ownerAddress: o.evmAccounts[0],
|
|
10
|
+
hash: s(JSON.parse(n)),
|
|
11
|
+
chainId: e.getState().chainId
|
|
12
|
+
});
|
|
13
|
+
return r;
|
|
14
|
+
} catch (r) {
|
|
15
|
+
throw new d(
|
|
16
|
+
m.provider.userRejectedRequest,
|
|
17
|
+
r instanceof Error ? r.message : "Signing failed"
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
2
21
|
export {
|
|
3
|
-
|
|
22
|
+
A as handleSignTypedData
|
|
4
23
|
};
|
package/dist/web/index.web144.js
CHANGED
package/dist/web/index.web40.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Analytics as r } from "./index.web22.js";
|
|
2
2
|
import "./index.web23.js";
|
|
3
|
-
import { VERSION as o } from "./index.
|
|
3
|
+
import { VERSION as o } from "./index.web46.js";
|
|
4
4
|
import "./index.web21.js";
|
|
5
5
|
import { APIError as y, ErrorType as A, HttpErrorType as T, OAuth2ProviderType as S, SendEvmTransactionWithEndUserAccountBodyNetwork as f, SendSolanaTransactionWithEndUserAccountBodyNetwork as h } from "@coinbase/cdp-api-client";
|
|
6
6
|
import "@solana/web3.js";
|
package/dist/web/index.web41.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DisconnectedError as l, from as d } from "./index.
|
|
1
|
+
import { DisconnectedError as l, from as d } from "./index.web47.js";
|
|
2
2
|
import { validateRequest as h, EIP1193ProviderError as m, STANDARD_ERROR_CODES as _ } from "./index.web19.js";
|
|
3
|
-
import { createEOAHandlers as p } from "./index.
|
|
4
|
-
import { createSmartAccountHandlers as g } from "./index.
|
|
3
|
+
import { createEOAHandlers as p } from "./index.web48.js";
|
|
4
|
+
import { createSmartAccountHandlers as g } from "./index.web49.js";
|
|
5
5
|
import "viem";
|
|
6
6
|
import "zustand";
|
|
7
7
|
import "@coinbase/cdp-api-client";
|