@coinbase/cdp-hooks 0.0.39 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { withResolvers as d } from "./index210.js";
1
+ import { withResolvers as d } from "./index208.js";
2
2
  const h = /* @__PURE__ */ new Map();
3
3
  function S({ fn: p, id: o, shouldSplitBatch: a, wait: g = 0, sort: l }) {
4
4
  const u = async () => {
@@ -8,7 +8,7 @@ import { isNullUniversalResolverError as y } from "./index212.js";
8
8
  import { localBatchGatewayUrl as x } from "./index163.js";
9
9
  import { namehash as i } from "./index112.js";
10
10
  import { packetToBytes as N } from "./index213.js";
11
- import { getAction as B } from "./index206.js";
11
+ import { getAction as B } from "./index209.js";
12
12
  import { readContract as T } from "./index55.js";
13
13
  async function J(a, o) {
14
14
  const { blockNumber: l, blockTag: m, coinType: t, name: e, gatewayUrls: f, strict: v } = o, { chain: n } = a, p = (() => {
@@ -1,5 +1,5 @@
1
1
  import { parseAvatarRecord as m } from "./index214.js";
2
- import { getAction as u } from "./index206.js";
2
+ import { getAction as u } from "./index209.js";
3
3
  import { getEnsText as f } from "./index23.js";
4
4
  async function y(t, { blockNumber: a, blockTag: e, assetGatewayUrls: n, name: o, gatewayUrls: c, strict: i, universalResolverAddress: s }) {
5
5
  const r = await u(t, f, "getEnsText")({
@@ -1,10 +1,39 @@
1
- function f(t, n, c) {
2
- const i = t[n.name];
3
- if (typeof i == "function")
4
- return i;
5
- const o = t[c];
6
- return typeof o == "function" ? o : (e) => n(t, e);
1
+ const f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
2
+ let w = 0;
3
+ function C(s, l, h) {
4
+ const i = ++w, c = () => f.get(s) || [], g = () => {
5
+ const n = c();
6
+ f.set(s, n.filter((e) => e.id !== i));
7
+ }, r = () => {
8
+ const n = c();
9
+ if (!n.some((t) => t.id === i))
10
+ return;
11
+ const e = p.get(s);
12
+ if (n.length === 1 && e) {
13
+ const t = e();
14
+ t instanceof Promise && t.catch(() => {
15
+ });
16
+ }
17
+ g();
18
+ }, o = c();
19
+ if (f.set(s, [
20
+ ...o,
21
+ { id: i, fns: l }
22
+ ]), o && o.length > 0)
23
+ return r;
24
+ const u = {};
25
+ for (const n in l)
26
+ u[n] = (...e) => {
27
+ const t = c();
28
+ if (t.length !== 0)
29
+ for (const m of t)
30
+ m.fns[n]?.(...e);
31
+ };
32
+ const a = h(u);
33
+ return typeof a == "function" && p.set(s, a), r;
7
34
  }
8
35
  export {
9
- f as getAction
36
+ p as cleanupCache,
37
+ f as listenersCache,
38
+ C as observe
10
39
  };
@@ -1,9 +1,18 @@
1
- function u(e, { method: r }) {
2
- const t = {};
3
- return e.transport.type === "fallback" && e.transport.onResponse?.(({ method: s, response: o, status: p, transport: n }) => {
4
- p === "success" && r === s && (t[o] = n.request);
5
- }), (s) => t[s] || e.request;
1
+ import { wait as l } from "./index176.js";
2
+ function p(a, { emitOnBegin: e, initialWaitTime: w, interval: i }) {
3
+ let n = !0;
4
+ const t = () => n = !1;
5
+ return (async () => {
6
+ let o;
7
+ e && (o = await a({ unpoll: t }));
8
+ const u = await w?.(o) ?? i;
9
+ await l(u);
10
+ const c = async () => {
11
+ n && (await a({ unpoll: t }), await l(i), c());
12
+ };
13
+ c();
14
+ })(), t;
6
15
  }
7
16
  export {
8
- u as createFilterRequestScope
17
+ p as poll
9
18
  };
@@ -1,39 +1,11 @@
1
- const f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
2
- let w = 0;
3
- function C(s, l, h) {
4
- const i = ++w, c = () => f.get(s) || [], g = () => {
5
- const n = c();
6
- f.set(s, n.filter((e) => e.id !== i));
7
- }, r = () => {
8
- const n = c();
9
- if (!n.some((t) => t.id === i))
10
- return;
11
- const e = p.get(s);
12
- if (n.length === 1 && e) {
13
- const t = e();
14
- t instanceof Promise && t.catch(() => {
15
- });
16
- }
17
- g();
18
- }, o = c();
19
- if (f.set(s, [
20
- ...o,
21
- { id: i, fns: l }
22
- ]), o && o.length > 0)
23
- return r;
24
- const u = {};
25
- for (const n in l)
26
- u[n] = (...e) => {
27
- const t = c();
28
- if (t.length !== 0)
29
- for (const m of t)
30
- m.fns[n]?.(...e);
31
- };
32
- const a = h(u);
33
- return typeof a == "function" && p.set(s, a), r;
1
+ function i() {
2
+ let e = () => {
3
+ }, n = () => {
4
+ };
5
+ return { promise: new Promise((r, o) => {
6
+ e = r, n = o;
7
+ }), resolve: e, reject: n };
34
8
  }
35
9
  export {
36
- p as cleanupCache,
37
- f as listenersCache,
38
- C as observe
10
+ i as withResolvers
39
11
  };
@@ -1,18 +1,10 @@
1
- import { wait as l } from "./index176.js";
2
- function p(a, { emitOnBegin: e, initialWaitTime: w, interval: i }) {
3
- let n = !0;
4
- const t = () => n = !1;
5
- return (async () => {
6
- let o;
7
- e && (o = await a({ unpoll: t }));
8
- const u = await w?.(o) ?? i;
9
- await l(u);
10
- const c = async () => {
11
- n && (await a({ unpoll: t }), await l(i), c());
12
- };
13
- c();
14
- })(), t;
1
+ function f(t, n, c) {
2
+ const i = t[n.name];
3
+ if (typeof i == "function")
4
+ return i;
5
+ const o = t[c];
6
+ return typeof o == "function" ? o : (e) => n(t, e);
15
7
  }
16
8
  export {
17
- p as poll
9
+ f as getAction
18
10
  };
@@ -3,7 +3,7 @@ import { getChainContractAddress as u } from "./index173.js";
3
3
  import { toHex as h } from "./index109.js";
4
4
  import { isNullUniversalResolverError as p } from "./index212.js";
5
5
  import { packetToBytes as C } from "./index213.js";
6
- import { getAction as w } from "./index206.js";
6
+ import { getAction as w } from "./index209.js";
7
7
  import { readContract as A } from "./index55.js";
8
8
  async function b(e, { address: t, blockNumber: s, blockTag: i, gatewayUrls: a, strict: c, universalResolverAddress: d }) {
9
9
  let o = d;
@@ -1,11 +1,9 @@
1
- function i() {
2
- let e = () => {
3
- }, n = () => {
4
- };
5
- return { promise: new Promise((r, o) => {
6
- e = r, n = o;
7
- }), resolve: e, reject: n };
1
+ function u(e, { method: r }) {
2
+ const t = {};
3
+ return e.transport.type === "fallback" && e.transport.onResponse?.(({ method: s, response: o, status: p, transport: n }) => {
4
+ p === "success" && r === s && (t[o] = n.request);
5
+ }), (s) => t[s] || e.request;
8
6
  }
9
7
  export {
10
- i as withResolvers
8
+ u as createFilterRequestScope
11
9
  };
@@ -1,7 +1,7 @@
1
1
  import { getChainContractAddress as l } from "./index173.js";
2
2
  import { toHex as u } from "./index109.js";
3
3
  import { packetToBytes as v } from "./index213.js";
4
- import { getAction as f } from "./index206.js";
4
+ import { getAction as f } from "./index209.js";
5
5
  import { readContract as m } from "./index55.js";
6
6
  async function A(o, r) {
7
7
  const { blockNumber: n, blockTag: i, name: s } = r, { chain: e } = o, a = (() => {
@@ -6,7 +6,7 @@ import { getAddress as S } from "./index119.js";
6
6
  import { isAddressEqual as h } from "./index141.js";
7
7
  import { isHex as v } from "./index145.js";
8
8
  import { bytesToHex as x } from "./index109.js";
9
- import { getAction as b } from "./index206.js";
9
+ import { getAction as b } from "./index209.js";
10
10
  import { isErc6492Signature as A } from "./index155.js";
11
11
  import { recoverAddress as w } from "./index149.js";
12
12
  import { serializeErc6492Signature as E } from "./index156.js";
@@ -7,7 +7,7 @@ import { isNullUniversalResolverError as g } from "./index212.js";
7
7
  import { localBatchGatewayUrl as w } from "./index163.js";
8
8
  import { namehash as x } from "./index112.js";
9
9
  import { packetToBytes as C } from "./index213.js";
10
- import { getAction as y } from "./index206.js";
10
+ import { getAction as y } from "./index209.js";
11
11
  import { readContract as N } from "./index55.js";
12
12
  async function j(n, e) {
13
13
  const { blockNumber: s, blockTag: m, key: d, name: t, gatewayUrls: u, strict: f } = e, { chain: o } = n, v = (() => {
@@ -1,4 +1,4 @@
1
- import { createFilterRequestScope as r } from "./index207.js";
1
+ import { createFilterRequestScope as r } from "./index210.js";
2
2
  async function i(e) {
3
3
  const o = r(e, {
4
4
  method: "eth_newBlockFilter"
@@ -1,6 +1,6 @@
1
1
  import { encodeEventTopics as l } from "./index136.js";
2
2
  import { numberToHex as s } from "./index109.js";
3
- import { createFilterRequestScope as u } from "./index207.js";
3
+ import { createFilterRequestScope as u } from "./index210.js";
4
4
  async function h(r, a) {
5
5
  const { address: m, abi: n, args: i, eventName: e, fromBlock: t, strict: p, toBlock: o } = a, f = u(r, {
6
6
  method: "eth_newFilter"
@@ -1,6 +1,6 @@
1
1
  import { encodeEventTopics as b } from "./index136.js";
2
2
  import { numberToHex as m } from "./index109.js";
3
- import { createFilterRequestScope as h } from "./index207.js";
3
+ import { createFilterRequestScope as h } from "./index210.js";
4
4
  async function l(r, { address: p, args: a, event: e, events: c, fromBlock: n, strict: f, toBlock: i } = {}) {
5
5
  const o = c ?? (e ? [e] : void 0), u = h(r, {
6
6
  method: "eth_newFilter"
@@ -1,4 +1,4 @@
1
- import { createFilterRequestScope as r } from "./index207.js";
1
+ import { createFilterRequestScope as r } from "./index210.js";
2
2
  async function a(e) {
3
3
  const n = r(e, {
4
4
  method: "eth_newPendingTransactionFilter"
@@ -1,4 +1,4 @@
1
- import { getAccessToken as A, sendUserOperation as y, signInWithEmail as O, signInWithSms as I, verifyEmailOTP as U, verifySmsOTP as P, signOut as x, signEvmHash as M, signEvmTransaction as k, sendEvmTransaction as C, signEvmMessage as W, signSolanaMessage as H, signEvmTypedData as b, exportEvmAccount as D, exportSolanaAccount as V, signSolanaTransaction as F, sendSolanaTransaction as z, getUserOperation as G } from "@coinbase/cdp-core";
1
+ import { getAccessToken as A, sendUserOperation as y, signInWithEmail as O, signInWithSms as U, verifyEmailOTP as I, verifySmsOTP as P, signOut as x, signEvmHash as M, signEvmTransaction as k, sendEvmTransaction as C, signEvmMessage as W, signSolanaMessage as H, signEvmTypedData as b, exportEvmAccount as D, exportSolanaAccount as V, signSolanaTransaction as F, sendSolanaTransaction as z, getUserOperation as G } from "@coinbase/cdp-core";
2
2
  import { useState as u, useEffect as f, useMemo as j, useCallback as h } from "react";
3
3
  import { useCDP as p } from "./index2.js";
4
4
  import { useAutoPolling as q } from "./index4.js";
@@ -9,13 +9,13 @@ const Y = () => {
9
9
  }, Z = () => {
10
10
  const { isInitialized: n } = p();
11
11
  return { isInitialized: n };
12
- }, _ = () => ({ signInWithEmail: g(O) }), $ = () => ({ signInWithSms: g(I) }), R = () => ({ verifyEmailOTP: g(U) }), nn = () => ({ verifySmsOTP: g(P) }), en = () => {
12
+ }, _ = () => ({ signInWithEmail: g(O) }), $ = () => ({ signInWithSms: g(U) }), R = () => ({ verifyEmailOTP: g(I) }), nn = () => ({ verifySmsOTP: g(P) }), en = () => {
13
13
  const { isSignedIn: n } = p();
14
14
  return { isSignedIn: n };
15
15
  }, w = () => {
16
16
  const { currentUser: n } = p();
17
17
  return { currentUser: n };
18
- }, tn = () => ({ signOut: o(x) }), sn = () => ({ getAccessToken: A }), rn = () => {
18
+ }, tn = () => ({ signOut: i(x) }), rn = () => ({ getAccessToken: A }), sn = () => {
19
19
  const { currentUser: n } = w();
20
20
  return {
21
21
  evmAddress: n?.evmSmartAccounts?.[0] ?? n?.evmAccounts?.[0] ?? null
@@ -25,11 +25,11 @@ const Y = () => {
25
25
  return {
26
26
  solanaAddress: n?.solanaAccounts?.[0] ?? null
27
27
  };
28
- }, on = () => ({ signEvmHash: o(M) }), cn = () => ({ signEvmTransaction: o(k) }), un = () => {
29
- const [n, e] = u(null), [r, t] = u(null), [c, S] = u(null), { config: a } = p(), d = o(
28
+ }, on = () => ({ signEvmHash: i(M) }), cn = () => ({ signEvmTransaction: i(k) }), un = () => {
29
+ const [n, e] = u(null), [s, r] = u(null), [c, S] = u(null), { config: a } = p(), d = i(
30
30
  async (m) => {
31
- const i = await C(m);
32
- return e({ hash: i.transactionHash, network: m.network }), S(null), t(null), i;
31
+ const o = await C(m);
32
+ return e({ hash: o.transactionHash, network: m.network }), S(null), r(null), o;
33
33
  }
34
34
  );
35
35
  f(() => {
@@ -39,43 +39,43 @@ const Y = () => {
39
39
  const E = await B(n.network, a).waitForTransactionReceipt({
40
40
  hash: n.hash
41
41
  });
42
- t(E);
43
- } catch (i) {
44
- S(i instanceof Error ? i : new Error(String(i)));
42
+ r(E);
43
+ } catch (o) {
44
+ S(o instanceof Error ? o : new Error(String(o)));
45
45
  }
46
46
  })();
47
47
  }, [n]);
48
- const l = j(() => n ? r ? { status: "success", receipt: r } : c ? { status: "error", error: c } : { status: "pending", hash: n.hash } : { status: "idle" }, [n, r, c]);
48
+ const l = j(() => n ? s ? { status: "success", receipt: s } : c ? { status: "error", error: c } : { status: "pending", hash: n.hash } : { status: "idle" }, [n, s, c]);
49
49
  return {
50
50
  sendEvmTransaction: d,
51
51
  data: l
52
52
  };
53
- }, pn = () => ({ signEvmMessage: o(W) }), dn = () => ({ signSolanaMessage: o(H) }), ln = () => ({ signEvmTypedData: o(b) }), Sn = () => ({ exportEvmAccount: o(D) }), mn = () => ({ exportSolanaAccount: o(V) }), gn = () => ({ signSolanaTransaction: o(F) }), En = () => ({
54
- sendSolanaTransaction: o(z)
55
- }), o = (n) => {
53
+ }, pn = () => ({ signEvmMessage: i(W) }), dn = () => ({ signSolanaMessage: i(H) }), ln = () => ({ signEvmTypedData: i(b) }), Sn = () => ({ exportEvmAccount: i(D) }), mn = () => ({ exportSolanaAccount: i(V) }), gn = () => ({ signSolanaTransaction: i(F) }), En = () => ({
54
+ sendSolanaTransaction: i(z)
55
+ }), i = (n) => {
56
56
  const { isSignedIn: e } = p();
57
57
  return h(
58
- async (...t) => {
58
+ async (...r) => {
59
59
  if (!e)
60
60
  throw new Error("User is not authenticated");
61
- return n(...t);
61
+ return n(...r);
62
62
  },
63
63
  [e, n]
64
64
  );
65
65
  }, g = (n) => {
66
66
  const { isSignedIn: e } = p();
67
67
  return h(
68
- async (...t) => {
68
+ async (...r) => {
69
69
  if (e)
70
70
  throw new Error("User is already authenticated. Please sign out first.");
71
- return n(...t);
71
+ return n(...r);
72
72
  },
73
73
  [e, n]
74
74
  );
75
75
  }, wn = () => {
76
- const [n, e] = u(void 0), { status: r, data: t, error: c } = J(n);
76
+ const [n, e] = u(void 0), { status: s, data: r, error: c } = J(n);
77
77
  return {
78
- sendUserOperation: o(
78
+ sendUserOperation: i(
79
79
  async (a) => {
80
80
  const d = await y(a);
81
81
  return e({
@@ -85,42 +85,41 @@ const Y = () => {
85
85
  }), d;
86
86
  }
87
87
  ),
88
- data: t,
88
+ data: r,
89
89
  error: c,
90
- status: r
90
+ status: s
91
91
  };
92
92
  }, J = (n = {}) => {
93
- const { userOperationHash: e, evmSmartAccount: r, network: t, enabled: c } = n, [S, a] = u("idle"), [d, l] = u(void 0), [m, i] = u(void 0), { currentUser: E } = w();
93
+ const { userOperationHash: e, evmSmartAccount: s, network: r, enabled: c } = n, [S, a] = u("idle"), [d, l] = u(void 0), [m, o] = u(void 0), { currentUser: E } = w();
94
94
  f(() => {
95
- e && r && t && (a(c !== !1 ? "pending" : "idle"), l(void 0), i(void 0));
96
- }, [e, r, t, c]);
97
- const v = c !== !1 && !!(e && r && t && E);
95
+ e && s && r && (a(c !== !1 ? "pending" : "idle"), l(void 0), o(void 0));
96
+ }, [e, s, r, c]);
97
+ const v = c !== !1 && !!(e && s && r && E);
98
98
  return q(
99
99
  {
100
100
  pollFn: async () => {
101
- const s = await G({
101
+ const t = await G({
102
102
  userOperationHash: e,
103
- evmSmartAccount: r,
104
- network: t
103
+ evmSmartAccount: s,
104
+ network: r
105
105
  });
106
- return l(s), s;
106
+ return l(t), t;
107
107
  },
108
- shouldStop: (s) => s.status === "complete" || s.status === "dropped" || s.status === "failed",
108
+ shouldStop: (t) => t.status === "complete" || t.status === "dropped" || t.status === "failed",
109
109
  enabled: v,
110
- onSuccess: (s) => {
111
- if (s.status === "complete")
112
- l(s), a("success");
113
- else if (s.status === "failed") {
114
- const T = s.receipts?.[0]?.revert?.message || "User operation failed";
115
- i(new Error(T)), a("error");
116
- } else
117
- l(s), a("error");
110
+ onSuccess: (t) => {
111
+ if (t.status === "complete")
112
+ l(t), a("success");
113
+ else if (t.status === "failed") {
114
+ const T = t.receipts?.[0]?.revert?.message || "User operation failed";
115
+ o(new Error(T)), a("error");
116
+ } else t.status === "dropped" ? (o(new Error('User operation failed with status: "dropped"')), a("error")) : (l(t), a("error"));
118
117
  },
119
- onError: (s) => {
120
- i(s), a("error");
118
+ onError: (t) => {
119
+ o(t), a("error");
121
120
  }
122
121
  },
123
- [e, r, t, v]
122
+ [e, s, r, v]
124
123
  ), {
125
124
  status: S,
126
125
  data: d,
@@ -130,12 +129,12 @@ const Y = () => {
130
129
  export {
131
130
  Y as useConfig,
132
131
  w as useCurrentUser,
133
- o as useEnforceAuthenticated,
132
+ i as useEnforceAuthenticated,
134
133
  g as useEnforceUnauthenticated,
135
- rn as useEvmAddress,
134
+ sn as useEvmAddress,
136
135
  Sn as useExportEvmAccount,
137
136
  mn as useExportSolanaAccount,
138
- sn as useGetAccessToken,
137
+ rn as useGetAccessToken,
139
138
  Z as useIsInitialized,
140
139
  en as useIsSignedIn,
141
140
  un as useSendEvmTransaction,
@@ -1,7 +1,7 @@
1
1
  import { parseAccount as u } from "./index11.js";
2
2
  import { encodeFunctionData as f } from "./index137.js";
3
3
  import { getContractError as p } from "./index180.js";
4
- import { getAction as g } from "./index206.js";
4
+ import { getAction as g } from "./index209.js";
5
5
  import { estimateGas as G } from "./index32.js";
6
6
  async function A(s, i) {
7
7
  const { abi: a, address: o, args: r, functionName: c, dataSuffix: e, ...t } = i, m = f({
@@ -1,5 +1,5 @@
1
1
  import { BaseFeeScalarError as p, Eip1559FeesNotSupportedError as F } from "./index95.js";
2
- import { getAction as l } from "./index206.js";
2
+ import { getAction as l } from "./index209.js";
3
3
  import { internal_estimateMaxPriorityFeePerGas as u } from "./index33.js";
4
4
  import { getBlock as G } from "./index36.js";
5
5
  import { getGasPrice as b } from "./index46.js";
@@ -1,6 +1,6 @@
1
1
  import { Eip1559FeesNotSupportedError as f } from "./index95.js";
2
2
  import { hexToBigInt as u } from "./index142.js";
3
- import { getAction as s } from "./index206.js";
3
+ import { getAction as s } from "./index209.js";
4
4
  import { getBlock as c } from "./index36.js";
5
5
  import { getGasPrice as y } from "./index46.js";
6
6
  async function h(e, o) {
@@ -1,5 +1,5 @@
1
1
  import { getAbiItem as p } from "./index89.js";
2
- import { getAction as v } from "./index206.js";
2
+ import { getAction as v } from "./index209.js";
3
3
  import { getLogs as l } from "./index47.js";
4
4
  async function y(n, r) {
5
5
  const { abi: t, address: s, args: c, blockHash: i, eventName: e, fromBlock: m, toBlock: a, strict: f } = r, o = e ? p({ abi: t, name: e }) : void 0, g = o ? void 0 : t.filter((d) => d.type === "event");
@@ -1,5 +1,5 @@
1
1
  import { Eip712DomainNotFoundError as u } from "./index222.js";
2
- import { getAction as d } from "./index206.js";
2
+ import { getAction as d } from "./index209.js";
3
3
  import { readContract as f } from "./index55.js";
4
4
  async function E(a, o) {
5
5
  const { address: e, factory: r, factoryData: i } = o;
@@ -1,4 +1,4 @@
1
- import { getAction as n } from "./index206.js";
1
+ import { getAction as n } from "./index209.js";
2
2
  import { getBlockNumber as a } from "./index37.js";
3
3
  import { getTransaction as m } from "./index50.js";
4
4
  async function f(o, { hash: r, transactionReceipt: e }) {
@@ -6,7 +6,7 @@ import { decodeFunctionResult as q } from "./index130.js";
6
6
  import { encodeFunctionData as B } from "./index137.js";
7
7
  import { getChainContractAddress as O } from "./index173.js";
8
8
  import { getContractError as E } from "./index180.js";
9
- import { getAction as T } from "./index206.js";
9
+ import { getAction as T } from "./index209.js";
10
10
  import { readContract as Z } from "./index55.js";
11
11
  async function W(n, w) {
12
12
  const { account: b, allowFailure: u = !0, batchSize: F, blockNumber: p, blockTag: j, multicallAddress: y, stateOverride: N } = w, d = w.contracts, C = F ?? (typeof n.batch?.multicall == "object" && n.batch.multicall.batchSize || 1024);
@@ -1,7 +1,7 @@
1
1
  import { decodeFunctionResult as m } from "./index130.js";
2
2
  import { encodeFunctionData as s } from "./index137.js";
3
3
  import { getContractError as f } from "./index180.js";
4
- import { getAction as l } from "./index206.js";
4
+ import { getAction as l } from "./index209.js";
5
5
  import { call as p } from "./index24.js";
6
6
  async function x(n, e) {
7
7
  const { abi: t, address: c, args: o, functionName: r, ...d } = e, i = s({
@@ -2,7 +2,7 @@ import { parseAccount as p } from "./index11.js";
2
2
  import { decodeFunctionResult as h } from "./index130.js";
3
3
  import { encodeFunctionData as x } from "./index137.js";
4
4
  import { getContractError as b } from "./index180.js";
5
- import { getAction as g } from "./index206.js";
5
+ import { getAction as g } from "./index209.js";
6
6
  import { call as A } from "./index24.js";
7
7
  async function R(s, m) {
8
8
  const { abi: t, address: r, args: o, dataSuffix: n, functionName: a, ...c } = m, e = c.account ? p(c.account) : s.account, d = x({ abi: t, args: o, functionName: a });
@@ -1,8 +1,8 @@
1
1
  import { BlockNotFoundError as D } from "./index84.js";
2
2
  import { WaitForTransactionReceiptTimeoutError as M, TransactionNotFoundError as O, TransactionReceiptNotFoundError as W } from "./index93.js";
3
- import { getAction as l } from "./index206.js";
4
- import { observe as q } from "./index208.js";
5
- import { withResolvers as z } from "./index210.js";
3
+ import { getAction as l } from "./index209.js";
4
+ import { observe as q } from "./index206.js";
5
+ import { withResolvers as z } from "./index208.js";
6
6
  import { withRetry as B } from "./index175.js";
7
7
  import { stringify as G } from "./index103.js";
8
8
  import { getBlock as H } from "./index36.js";
@@ -1,7 +1,7 @@
1
1
  import { hexToBigInt as w } from "./index142.js";
2
- import { getAction as g } from "./index206.js";
3
- import { observe as k } from "./index208.js";
4
- import { poll as h } from "./index209.js";
2
+ import { getAction as g } from "./index209.js";
3
+ import { observe as k } from "./index206.js";
4
+ import { poll as h } from "./index207.js";
5
5
  import { stringify as y } from "./index103.js";
6
6
  import { getBlockNumber as v } from "./index37.js";
7
7
  function H(r, { emitOnBegin: c = !1, emitMissed: a = !1, onBlockNumber: l, onError: b, poll: i, pollingInterval: m = r.pollingInterval }) {
@@ -1,6 +1,6 @@
1
- import { getAction as p } from "./index206.js";
2
- import { observe as h } from "./index208.js";
3
- import { poll as v } from "./index209.js";
1
+ import { getAction as p } from "./index209.js";
2
+ import { observe as h } from "./index206.js";
3
+ import { poll as v } from "./index207.js";
4
4
  import { stringify as S } from "./index103.js";
5
5
  import { getBlock as i } from "./index36.js";
6
6
  function P(r, { blockTag: l = r.experimental_blockTag ?? "latest", emitMissed: y = !1, emitOnBegin: m = !1, onBlock: k, onError: f, includeTransactions: B, poll: d, pollingInterval: w = r.pollingInterval }) {
@@ -3,9 +3,9 @@ import { InvalidInputRpcError as T } from "./index96.js";
3
3
  import { decodeEventLog as z } from "./index126.js";
4
4
  import { encodeEventTopics as A } from "./index136.js";
5
5
  import { formatLog as B } from "./index117.js";
6
- import { getAction as g } from "./index206.js";
7
- import { observe as F } from "./index208.js";
8
- import { poll as O } from "./index209.js";
6
+ import { getAction as g } from "./index209.js";
7
+ import { observe as F } from "./index206.js";
8
+ import { poll as O } from "./index207.js";
9
9
  import { stringify as D } from "./index103.js";
10
10
  import { createContractEventFilter as R } from "./index27.js";
11
11
  import { getBlockNumber as U } from "./index37.js";
@@ -1,12 +1,12 @@
1
1
  import { encodeEventTopics as S } from "./index136.js";
2
- import { observe as B } from "./index208.js";
3
- import { poll as C } from "./index209.js";
2
+ import { observe as B } from "./index206.js";
3
+ import { poll as C } from "./index207.js";
4
4
  import { stringify as T } from "./index103.js";
5
5
  import { DecodeLogDataMismatch as z, DecodeLogTopicsMismatch as A } from "./index79.js";
6
6
  import { InvalidInputRpcError as O } from "./index96.js";
7
7
  import { decodeEventLog as P } from "./index126.js";
8
8
  import { formatLog as I } from "./index117.js";
9
- import { getAction as u } from "./index206.js";
9
+ import { getAction as u } from "./index209.js";
10
10
  import { createEventFilter as R } from "./index28.js";
11
11
  import { getBlockNumber as U } from "./index37.js";
12
12
  import { getFilterChanges as j } from "./index44.js";
@@ -1,6 +1,6 @@
1
- import { getAction as c } from "./index206.js";
2
- import { observe as p } from "./index208.js";
3
- import { poll as b } from "./index209.js";
1
+ import { getAction as c } from "./index209.js";
2
+ import { observe as p } from "./index206.js";
3
+ import { poll as b } from "./index207.js";
4
4
  import { stringify as m } from "./index103.js";
5
5
  import { createPendingTransactionFilter as d } from "./index29.js";
6
6
  import { getFilterChanges as h } from "./index44.js";
@@ -8,7 +8,7 @@ import { blobsToCommitments as q } from "./index164.js";
8
8
  import { blobsToProofs as V } from "./index168.js";
9
9
  import { commitmentsToVersionedHashes as _ } from "./index167.js";
10
10
  import { toBlobSidecars as B } from "./index169.js";
11
- import { getAction as p } from "./index206.js";
11
+ import { getAction as p } from "./index209.js";
12
12
  import { assertRequest as E } from "./index157.js";
13
13
  import { getTransactionType as M } from "./index146.js";
14
14
  import { getChainId as N } from "./index39.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-hooks",
3
- "version": "0.0.39",
3
+ "version": "0.0.42",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "peerDependencies": {
16
16
  "react": ">=18.2.0",
17
- "@coinbase/cdp-core": "^0.0.39"
17
+ "@coinbase/cdp-core": "^0.0.42"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@testing-library/jest-dom": "^6.6.3",
@@ -29,7 +29,7 @@
29
29
  "@size-limit/webpack": "^11.2.0",
30
30
  "@size-limit/webpack-why": "^11.2.0",
31
31
  "size-limit": "^11.2.0",
32
- "@coinbase/cdp-core": "^0.0.39"
32
+ "@coinbase/cdp-core": "^0.0.42"
33
33
  },
34
34
  "size-limit": [
35
35
  {