@coinbase/cdp-hooks 0.0.65 → 0.0.66
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/README.md +1 -1
- package/dist/esm/index204.js +3 -3
- package/dist/esm/index207.js +1 -1
- package/dist/esm/index260.js +13 -2
- package/dist/esm/index261.js +35 -12
- package/dist/esm/index262.js +41 -35
- package/dist/esm/index263.js +2 -42
- package/dist/esm/index3.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1554,7 +1554,7 @@ function X402SmartAccountExample() {
|
|
|
1554
1554
|
|
|
1555
1555
|
#### Solana Support
|
|
1556
1556
|
|
|
1557
|
-
Solana support is supported out of the box with `useX402`. If your end user has both an EVM and Solana account, the EVM account will be used by
|
|
1557
|
+
Solana support is supported out of the box with `useX402`. If your end user has both an EVM and Solana account, the EVM account will be used by default. You can pass a Solana address to `useX402` to use the Solana account instead.
|
|
1558
1558
|
|
|
1559
1559
|
```tsx lines
|
|
1560
1560
|
import { useX402, useCurrentUser } from "@coinbase/cdp-hooks";
|
package/dist/esm/index204.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { contracts as o } from "./
|
|
2
|
-
import { formatters as r } from "./
|
|
3
|
-
import { serializers as t } from "./
|
|
1
|
+
import { contracts as o } from "./index260.js";
|
|
2
|
+
import { formatters as r } from "./index261.js";
|
|
3
|
+
import { serializers as t } from "./index262.js";
|
|
4
4
|
const e = {
|
|
5
5
|
blockTime: 2e3,
|
|
6
6
|
contracts: o,
|
package/dist/esm/index207.js
CHANGED
package/dist/esm/index260.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
const s = {
|
|
2
|
+
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
3
|
+
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
4
|
+
l2CrossDomainMessenger: {
|
|
5
|
+
address: "0x4200000000000000000000000000000000000007"
|
|
6
|
+
},
|
|
7
|
+
l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
|
|
8
|
+
l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
|
|
9
|
+
l2ToL1MessagePasser: {
|
|
10
|
+
address: "0x4200000000000000000000000000000000000016"
|
|
11
|
+
}
|
|
12
|
+
};
|
|
2
13
|
export {
|
|
3
|
-
|
|
14
|
+
s as contracts
|
|
4
15
|
};
|
package/dist/esm/index261.js
CHANGED
|
@@ -1,15 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { hexToBigInt as n } from "./index157.js";
|
|
2
|
+
import { defineBlock as r } from "./index129.js";
|
|
3
|
+
import { defineTransaction as s, formatTransaction as m } from "./index131.js";
|
|
4
|
+
import { defineTransactionReceipt as l } from "./index158.js";
|
|
5
|
+
const p = {
|
|
6
|
+
block: /* @__PURE__ */ r({
|
|
7
|
+
format(e) {
|
|
8
|
+
return {
|
|
9
|
+
transactions: e.transactions?.map((t) => {
|
|
10
|
+
if (typeof t == "string")
|
|
11
|
+
return t;
|
|
12
|
+
const i = m(t);
|
|
13
|
+
return i.typeHex === "0x7e" && (i.isSystemTx = t.isSystemTx, i.mint = t.mint ? n(t.mint) : void 0, i.sourceHash = t.sourceHash, i.type = "deposit"), i;
|
|
14
|
+
}),
|
|
15
|
+
stateRoot: e.stateRoot
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
transaction: /* @__PURE__ */ s({
|
|
20
|
+
format(e) {
|
|
21
|
+
const o = {};
|
|
22
|
+
return e.type === "0x7e" && (o.isSystemTx = e.isSystemTx, o.mint = e.mint ? n(e.mint) : void 0, o.sourceHash = e.sourceHash, o.type = "deposit"), o;
|
|
23
|
+
}
|
|
24
|
+
}),
|
|
25
|
+
transactionReceipt: /* @__PURE__ */ l({
|
|
26
|
+
format(e) {
|
|
27
|
+
return {
|
|
28
|
+
l1GasPrice: e.l1GasPrice ? n(e.l1GasPrice) : null,
|
|
29
|
+
l1GasUsed: e.l1GasUsed ? n(e.l1GasUsed) : null,
|
|
30
|
+
l1Fee: e.l1Fee ? n(e.l1Fee) : null,
|
|
31
|
+
l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
})
|
|
12
35
|
};
|
|
13
36
|
export {
|
|
14
|
-
|
|
37
|
+
p as formatters
|
|
15
38
|
};
|
package/dist/esm/index262.js
CHANGED
|
@@ -1,38 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const i = m(t);
|
|
13
|
-
return i.typeHex === "0x7e" && (i.isSystemTx = t.isSystemTx, i.mint = t.mint ? n(t.mint) : void 0, i.sourceHash = t.sourceHash, i.type = "deposit"), i;
|
|
14
|
-
}),
|
|
15
|
-
stateRoot: e.stateRoot
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}),
|
|
19
|
-
transaction: /* @__PURE__ */ s({
|
|
20
|
-
format(e) {
|
|
21
|
-
const o = {};
|
|
22
|
-
return e.type === "0x7e" && (o.isSystemTx = e.isSystemTx, o.mint = e.mint ? n(e.mint) : void 0, o.sourceHash = e.sourceHash, o.type = "deposit"), o;
|
|
23
|
-
}
|
|
24
|
-
}),
|
|
25
|
-
transactionReceipt: /* @__PURE__ */ l({
|
|
26
|
-
format(e) {
|
|
27
|
-
return {
|
|
28
|
-
l1GasPrice: e.l1GasPrice ? n(e.l1GasPrice) : null,
|
|
29
|
-
l1GasUsed: e.l1GasUsed ? n(e.l1GasUsed) : null,
|
|
30
|
-
l1Fee: e.l1Fee ? n(e.l1Fee) : null,
|
|
31
|
-
l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
})
|
|
1
|
+
import { InvalidAddressError as a } from "./index119.js";
|
|
2
|
+
import { isAddress as f } from "./index146.js";
|
|
3
|
+
import { concatHex as p } from "./index128.js";
|
|
4
|
+
import { toHex as i } from "./index124.js";
|
|
5
|
+
import { toRlp as x } from "./index169.js";
|
|
6
|
+
import { serializeTransaction as l } from "./index202.js";
|
|
7
|
+
function T(r, e) {
|
|
8
|
+
return h(r) ? z(r) : l(r, e);
|
|
9
|
+
}
|
|
10
|
+
const E = {
|
|
11
|
+
transaction: T
|
|
35
12
|
};
|
|
13
|
+
function z(r) {
|
|
14
|
+
w(r);
|
|
15
|
+
const { sourceHash: e, data: o, from: m, gas: t, isSystemTx: u, mint: s, to: c, value: n } = r, d = [
|
|
16
|
+
e,
|
|
17
|
+
m,
|
|
18
|
+
c ?? "0x",
|
|
19
|
+
s ? i(s) : "0x",
|
|
20
|
+
n ? i(n) : "0x",
|
|
21
|
+
t ? i(t) : "0x",
|
|
22
|
+
u ? "0x1" : "0x",
|
|
23
|
+
o ?? "0x"
|
|
24
|
+
];
|
|
25
|
+
return p([
|
|
26
|
+
"0x7e",
|
|
27
|
+
x(d)
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
function h(r) {
|
|
31
|
+
return r.type === "deposit" || typeof r.sourceHash < "u";
|
|
32
|
+
}
|
|
33
|
+
function w(r) {
|
|
34
|
+
const { from: e, to: o } = r;
|
|
35
|
+
if (e && !f(e))
|
|
36
|
+
throw new a({ address: e });
|
|
37
|
+
if (o && !f(o))
|
|
38
|
+
throw new a({ address: o });
|
|
39
|
+
}
|
|
36
40
|
export {
|
|
37
|
-
|
|
41
|
+
w as assertTransactionDeposit,
|
|
42
|
+
T as serializeTransaction,
|
|
43
|
+
E as serializers
|
|
38
44
|
};
|
package/dist/esm/index263.js
CHANGED
|
@@ -1,44 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { isAddress as f } from "./index146.js";
|
|
3
|
-
import { concatHex as p } from "./index128.js";
|
|
4
|
-
import { toHex as i } from "./index124.js";
|
|
5
|
-
import { toRlp as x } from "./index169.js";
|
|
6
|
-
import { serializeTransaction as l } from "./index202.js";
|
|
7
|
-
function T(r, e) {
|
|
8
|
-
return h(r) ? z(r) : l(r, e);
|
|
9
|
-
}
|
|
10
|
-
const E = {
|
|
11
|
-
transaction: T
|
|
12
|
-
};
|
|
13
|
-
function z(r) {
|
|
14
|
-
w(r);
|
|
15
|
-
const { sourceHash: e, data: o, from: m, gas: t, isSystemTx: u, mint: s, to: c, value: n } = r, d = [
|
|
16
|
-
e,
|
|
17
|
-
m,
|
|
18
|
-
c ?? "0x",
|
|
19
|
-
s ? i(s) : "0x",
|
|
20
|
-
n ? i(n) : "0x",
|
|
21
|
-
t ? i(t) : "0x",
|
|
22
|
-
u ? "0x1" : "0x",
|
|
23
|
-
o ?? "0x"
|
|
24
|
-
];
|
|
25
|
-
return p([
|
|
26
|
-
"0x7e",
|
|
27
|
-
x(d)
|
|
28
|
-
]);
|
|
29
|
-
}
|
|
30
|
-
function h(r) {
|
|
31
|
-
return r.type === "deposit" || typeof r.sourceHash < "u";
|
|
32
|
-
}
|
|
33
|
-
function w(r) {
|
|
34
|
-
const { from: e, to: o } = r;
|
|
35
|
-
if (e && !f(e))
|
|
36
|
-
throw new a({ address: e });
|
|
37
|
-
if (o && !f(o))
|
|
38
|
-
throw new a({ address: o });
|
|
39
|
-
}
|
|
1
|
+
var r = { exports: {} };
|
|
40
2
|
export {
|
|
41
|
-
|
|
42
|
-
T as serializeTransaction,
|
|
43
|
-
E as serializers
|
|
3
|
+
r as __module
|
|
44
4
|
};
|
package/dist/esm/index3.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-hooks",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.66",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=18.2.0",
|
|
18
|
-
"@coinbase/cdp-core": "^0.0.
|
|
18
|
+
"@coinbase/cdp-core": "^0.0.66"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@testing-library/jest-dom": "^6.6.3",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@size-limit/webpack": "^11.2.0",
|
|
31
31
|
"@size-limit/webpack-why": "^11.2.0",
|
|
32
32
|
"size-limit": "^11.2.0",
|
|
33
|
-
"@coinbase/cdp-core": "^0.0.
|
|
33
|
+
"@coinbase/cdp-core": "^0.0.66"
|
|
34
34
|
},
|
|
35
35
|
"size-limit": [
|
|
36
36
|
{
|