@directcryptopay/sdk 0.1.0
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 +357 -0
- package/dist/ConstantsUtil-B-_-u8aQ.js +6 -0
- package/dist/add-KF4m4jFK.js +19 -0
- package/dist/all-wallets-D6NAjQgX.js +10 -0
- package/dist/app-store-D7TTn-EO.js +21 -0
- package/dist/apple-DjX2E2hE.js +22 -0
- package/dist/arrow-bottom-C0YrNJYB.js +12 -0
- package/dist/arrow-bottom-circle-Dlxvx_XG.js +15 -0
- package/dist/arrow-left-x8_-lUyK.js +12 -0
- package/dist/arrow-right-BTZybj80.js +12 -0
- package/dist/arrow-top-LzH7iLCp.js +12 -0
- package/dist/bank-23jp-IV_.js +18 -0
- package/dist/browser-EjoorDid.js +18 -0
- package/dist/card-DGgWwtwC.js +18 -0
- package/dist/ccip-BMANewTU.js +150 -0
- package/dist/checkmark-B1qcQhBo.js +15 -0
- package/dist/checkmark-bold-Cyc4IEEJ.js +12 -0
- package/dist/chevron-bottom-ClHs08rB.js +12 -0
- package/dist/chevron-left-O8h_551_.js +12 -0
- package/dist/chevron-right-DP3xpyIA.js +12 -0
- package/dist/chevron-top-CuwkBUs9.js +12 -0
- package/dist/chrome-store-zfT_aJ3R.js +65 -0
- package/dist/clock-DHZqivIS.js +12 -0
- package/dist/close-Cp9rNAw4.js +12 -0
- package/dist/coinPlaceholder-U7-T1KKQ.js +12 -0
- package/dist/compass-Ds5-PRSR.js +12 -0
- package/dist/copy-Jg4HdIMf.js +19 -0
- package/dist/core/api.d.ts +30 -0
- package/dist/core/config.d.ts +59 -0
- package/dist/core/logic.d.ts +2 -0
- package/dist/core/wallet.d.ts +34 -0
- package/dist/cursor-DmMevduB.js +7 -0
- package/dist/cursor-transparent-Dn9-1SV8.js +16 -0
- package/dist/dcp-sdk.umd.js +12000 -0
- package/dist/dcp.d.ts +10 -0
- package/dist/desktop-C4udXXlZ.js +13 -0
- package/dist/disconnect-wd1BYLxt.js +12 -0
- package/dist/discord-DthxuCAP.js +21 -0
- package/dist/email-B3jSnUFE.js +696 -0
- package/dist/embedded-wallet-CJHmoBI2.js +468 -0
- package/dist/etherscan-Cjp4xfMW.js +10 -0
- package/dist/exclamation-triangle-CRNR5WOy.js +8 -0
- package/dist/extension-Cydk0mZt.js +12 -0
- package/dist/external-link-CuPTAoq9.js +12 -0
- package/dist/facebook-CghqXmdf.js +30 -0
- package/dist/farcaster-BREqMX4y.js +16 -0
- package/dist/filters-Dn_Ys7ew.js +12 -0
- package/dist/github-C-A7JmIY.js +22 -0
- package/dist/google-CCdM_naE.js +22 -0
- package/dist/hashTypedData-D2Qmzscs.js +197 -0
- package/dist/help-circle-DIH4vyj3.js +16 -0
- package/dist/id-DkJ0gBuy.js +16 -0
- package/dist/if-defined-BciplFKz.js +744 -0
- package/dist/image-qMjyiXM0.js +8 -0
- package/dist/index--3Zp0jAb.js +45 -0
- package/dist/index-1adX-Fit.js +65 -0
- package/dist/index-AvC0IGDl.js +7864 -0
- package/dist/index-B2-vKLd8.js +276 -0
- package/dist/index-B2iDt0TJ.js +146 -0
- package/dist/index-B5zkXsLJ.js +320 -0
- package/dist/index-B7K86vWu.js +1742 -0
- package/dist/index-BBkcvSiY.js +511 -0
- package/dist/index-BdjxQs66.js +181 -0
- package/dist/index-Bijd4_Ns.js +294 -0
- package/dist/index-BpXOsxzU.js +387 -0
- package/dist/index-C1QEJL-2.js +572 -0
- package/dist/index-C27dwOyE.js +243 -0
- package/dist/index-C4BX3QW8.js +58 -0
- package/dist/index-CMPIqsB1.js +170 -0
- package/dist/index-CTYngdl0.js +21991 -0
- package/dist/index-CUdQyyFn.js +51 -0
- package/dist/index-CX60z_g2.js +573 -0
- package/dist/index-CppCc1n8.js +65 -0
- package/dist/index-CqVegmN4.js +559 -0
- package/dist/index-CuiyMA8F.js +78 -0
- package/dist/index-CwB_qRfM.js +305 -0
- package/dist/index-CxOF7GqE.js +265 -0
- package/dist/index-D-IzHD_8.js +54 -0
- package/dist/index-DRNiFv9I.js +218 -0
- package/dist/index-Da8oZh8H.js +838 -0
- package/dist/index-DiHImG4L.js +44236 -0
- package/dist/index-DmOMXRG1.js +181 -0
- package/dist/index-DoSYqTQg.js +199 -0
- package/dist/index-DpHXq5_E.js +603 -0
- package/dist/index-DtCsAVBg.js +78 -0
- package/dist/index-Ij6XA6_4.js +77 -0
- package/dist/index-SzyBYfzA.js +8490 -0
- package/dist/index-eW8y-mXH.js +257 -0
- package/dist/index-fxzIDZsb.js +75 -0
- package/dist/index-lbhz9evJ.js +97 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/info-DMIGgjkL.js +7 -0
- package/dist/info-circle-CJuIKZSx.js +16 -0
- package/dist/lightbulb-qFT6WEWV.js +7 -0
- package/dist/localBatchGatewayRequest-CsMVMFBc.js +91 -0
- package/dist/mail-DoYgQvOt.js +12 -0
- package/dist/mobile-URtsh7o-.js +13 -0
- package/dist/more-DoQd10TF.js +15 -0
- package/dist/network-placeholder-BBA2Ue6C.js +18 -0
- package/dist/nftPlaceholder-C9RXWz9k.js +12 -0
- package/dist/off-YcuDQczT.js +12 -0
- package/dist/onramp-BfqDIx4o.js +1279 -0
- package/dist/parseSignature-280HB24T.js +3560 -0
- package/dist/play-store-sFaloG_r.js +36 -0
- package/dist/plus-l0wekSht.js +17 -0
- package/dist/qr-code-CihrUU4G.js +10 -0
- package/dist/receive-dfY1Cu-g.js +186 -0
- package/dist/recycle-horizontal-nXu6YaPw.js +13 -0
- package/dist/ref-huAzXCX0.js +41 -0
- package/dist/refresh-D2ZbVeNC.js +12 -0
- package/dist/reown-logo-BMaTMJmc.js +16 -0
- package/dist/search-YVM9q3J-.js +12 -0
- package/dist/secp256k1-BrysY3Sv.js +1302 -0
- package/dist/secp256k1-DPQgTBwQ.js +1510 -0
- package/dist/send-BwQZPKxI.js +19 -0
- package/dist/send-GyetMVu1.js +1038 -0
- package/dist/socials-B0W91J9k.js +574 -0
- package/dist/swapHorizontal-Dy_oQEkp.js +12 -0
- package/dist/swapHorizontalBold-C4JpaMpc.js +12 -0
- package/dist/swapHorizontalMedium-D5NuVZFh.js +20 -0
- package/dist/swapHorizontalRoundedBold-Bq4P2MCj.js +12 -0
- package/dist/swapVertical-CVQ8Mg03.js +12 -0
- package/dist/swaps-CA04SSdK.js +1637 -0
- package/dist/telegram-BP4SgW_L.js +20 -0
- package/dist/three-dots-BJYGJ-dQ.js +9 -0
- package/dist/transactions-Bq-98Tsg.js +37 -0
- package/dist/twitch-DTATWo9M.js +22 -0
- package/dist/twitterIcon-D5UWPInb.js +10 -0
- package/dist/types.d.ts +128 -0
- package/dist/ui/Modal.d.ts +9 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/verify-Byvj8Wi1.js +12 -0
- package/dist/verify-filled-B40taNm0.js +12 -0
- package/dist/w3m-modal-HV6SE74G.js +1037 -0
- package/dist/wallet-Cp-6Kk88.js +12 -0
- package/dist/wallet-placeholder-C3juwA9o.js +18 -0
- package/dist/walletconnect-CRkIiLCx.js +36 -0
- package/dist/warning-circle-DtvCLwG4.js +16 -0
- package/dist/x-Cqyx5eCt.js +16 -0
- package/package.json +70 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { c1 as l, b$ as $, bI as u, bB as m, cf as c, a1 as d, cq as z, da as k, c0 as H, bq as A, a0 as B, db as N, T as O, bi as I, c2 as T } from "./index-DiHImG4L.js";
|
|
2
|
+
const j = `Ethereum Signed Message:
|
|
3
|
+
`;
|
|
4
|
+
function C(e) {
|
|
5
|
+
const t = typeof e == "string" ? l(e) : typeof e.raw == "string" ? e.raw : $(e.raw), s = l(`${j}${u(t)}`);
|
|
6
|
+
return m([s, t]);
|
|
7
|
+
}
|
|
8
|
+
function U(e, t) {
|
|
9
|
+
return c(C(e), t);
|
|
10
|
+
}
|
|
11
|
+
class R extends d {
|
|
12
|
+
constructor({ domain: t }) {
|
|
13
|
+
super(`Invalid domain "${z(t)}".`, {
|
|
14
|
+
metaMessages: ["Must be a valid EIP-712 domain."]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
class W extends d {
|
|
19
|
+
constructor({ primaryType: t, types: s }) {
|
|
20
|
+
super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(s))}\`.`, {
|
|
21
|
+
docsPath: "/api/glossary/Errors#typeddatainvalidprimarytypeerror",
|
|
22
|
+
metaMessages: ["Check that the primary type is a key in `types`."]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
class q extends d {
|
|
27
|
+
constructor({ type: t }) {
|
|
28
|
+
super(`Struct type "${t}" is invalid.`, {
|
|
29
|
+
metaMessages: ["Struct type must not be a Solidity type."],
|
|
30
|
+
name: "InvalidStructTypeError"
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function F(e) {
|
|
35
|
+
const { domain: t, message: s, primaryType: r, types: n } = e, a = (i, p) => {
|
|
36
|
+
for (const D of i) {
|
|
37
|
+
const { name: P, type: f } = D, o = p[P], h = f.match(k);
|
|
38
|
+
if (h && (typeof o == "number" || typeof o == "bigint")) {
|
|
39
|
+
const [S, y, M] = h;
|
|
40
|
+
H(o, {
|
|
41
|
+
signed: y === "int",
|
|
42
|
+
size: Number.parseInt(M, 10) / 8
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (f === "address" && typeof o == "string" && !A(o))
|
|
46
|
+
throw new B({ address: o });
|
|
47
|
+
const b = f.match(N);
|
|
48
|
+
if (b) {
|
|
49
|
+
const [S, y] = b;
|
|
50
|
+
if (y && u(o) !== Number.parseInt(y, 10))
|
|
51
|
+
throw new O({
|
|
52
|
+
expectedSize: Number.parseInt(y, 10),
|
|
53
|
+
givenSize: u(o)
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const g = n[f];
|
|
57
|
+
g && (J(f), a(g, o));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
if (n.EIP712Domain && t) {
|
|
61
|
+
if (typeof t != "object")
|
|
62
|
+
throw new R({ domain: t });
|
|
63
|
+
a(n.EIP712Domain, t);
|
|
64
|
+
}
|
|
65
|
+
if (r !== "EIP712Domain")
|
|
66
|
+
if (n[r])
|
|
67
|
+
a(n[r], s);
|
|
68
|
+
else
|
|
69
|
+
throw new W({ primaryType: r, types: n });
|
|
70
|
+
}
|
|
71
|
+
function V({ domain: e }) {
|
|
72
|
+
return [
|
|
73
|
+
typeof (e == null ? void 0 : e.name) == "string" && { name: "name", type: "string" },
|
|
74
|
+
(e == null ? void 0 : e.version) && { name: "version", type: "string" },
|
|
75
|
+
(typeof (e == null ? void 0 : e.chainId) == "number" || typeof (e == null ? void 0 : e.chainId) == "bigint") && {
|
|
76
|
+
name: "chainId",
|
|
77
|
+
type: "uint256"
|
|
78
|
+
},
|
|
79
|
+
(e == null ? void 0 : e.verifyingContract) && {
|
|
80
|
+
name: "verifyingContract",
|
|
81
|
+
type: "address"
|
|
82
|
+
},
|
|
83
|
+
(e == null ? void 0 : e.salt) && { name: "salt", type: "bytes32" }
|
|
84
|
+
].filter(Boolean);
|
|
85
|
+
}
|
|
86
|
+
function J(e) {
|
|
87
|
+
if (e === "address" || e === "bool" || e === "string" || e.startsWith("bytes") || e.startsWith("uint") || e.startsWith("int"))
|
|
88
|
+
throw new q({ type: e });
|
|
89
|
+
}
|
|
90
|
+
function X(e) {
|
|
91
|
+
const { domain: t = {}, message: s, primaryType: r } = e, n = {
|
|
92
|
+
EIP712Domain: V({ domain: t }),
|
|
93
|
+
...e.types
|
|
94
|
+
};
|
|
95
|
+
F({
|
|
96
|
+
domain: t,
|
|
97
|
+
message: s,
|
|
98
|
+
primaryType: r,
|
|
99
|
+
types: n
|
|
100
|
+
});
|
|
101
|
+
const a = ["0x1901"];
|
|
102
|
+
return t && a.push(G({
|
|
103
|
+
domain: t,
|
|
104
|
+
types: n
|
|
105
|
+
})), r !== "EIP712Domain" && a.push(v({
|
|
106
|
+
data: s,
|
|
107
|
+
primaryType: r,
|
|
108
|
+
types: n
|
|
109
|
+
})), c(m(a));
|
|
110
|
+
}
|
|
111
|
+
function G({ domain: e, types: t }) {
|
|
112
|
+
return v({
|
|
113
|
+
data: e,
|
|
114
|
+
primaryType: "EIP712Domain",
|
|
115
|
+
types: t
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function v({ data: e, primaryType: t, types: s }) {
|
|
119
|
+
const r = x({
|
|
120
|
+
data: e,
|
|
121
|
+
primaryType: t,
|
|
122
|
+
types: s
|
|
123
|
+
});
|
|
124
|
+
return c(r);
|
|
125
|
+
}
|
|
126
|
+
function x({ data: e, primaryType: t, types: s }) {
|
|
127
|
+
const r = [{ type: "bytes32" }], n = [K({ primaryType: t, types: s })];
|
|
128
|
+
for (const a of s[t]) {
|
|
129
|
+
const [i, p] = w({
|
|
130
|
+
types: s,
|
|
131
|
+
name: a.name,
|
|
132
|
+
type: a.type,
|
|
133
|
+
value: e[a.name]
|
|
134
|
+
});
|
|
135
|
+
r.push(i), n.push(p);
|
|
136
|
+
}
|
|
137
|
+
return I(r, n);
|
|
138
|
+
}
|
|
139
|
+
function K({ primaryType: e, types: t }) {
|
|
140
|
+
const s = T(L({ primaryType: e, types: t }));
|
|
141
|
+
return c(s);
|
|
142
|
+
}
|
|
143
|
+
function L({ primaryType: e, types: t }) {
|
|
144
|
+
let s = "";
|
|
145
|
+
const r = E({ primaryType: e, types: t });
|
|
146
|
+
r.delete(e);
|
|
147
|
+
const n = [e, ...Array.from(r).sort()];
|
|
148
|
+
for (const a of n)
|
|
149
|
+
s += `${a}(${t[a].map(({ name: i, type: p }) => `${p} ${i}`).join(",")})`;
|
|
150
|
+
return s;
|
|
151
|
+
}
|
|
152
|
+
function E({ primaryType: e, types: t }, s = /* @__PURE__ */ new Set()) {
|
|
153
|
+
const r = e.match(/^\w*/u), n = r == null ? void 0 : r[0];
|
|
154
|
+
if (s.has(n) || t[n] === void 0)
|
|
155
|
+
return s;
|
|
156
|
+
s.add(n);
|
|
157
|
+
for (const a of t[n])
|
|
158
|
+
E({ primaryType: a.type, types: t }, s);
|
|
159
|
+
return s;
|
|
160
|
+
}
|
|
161
|
+
function w({ types: e, name: t, type: s, value: r }) {
|
|
162
|
+
if (e[s] !== void 0)
|
|
163
|
+
return [
|
|
164
|
+
{ type: "bytes32" },
|
|
165
|
+
c(x({ data: r, primaryType: s, types: e }))
|
|
166
|
+
];
|
|
167
|
+
if (s === "bytes")
|
|
168
|
+
return [{ type: "bytes32" }, c(r)];
|
|
169
|
+
if (s === "string")
|
|
170
|
+
return [{ type: "bytes32" }, c(T(r))];
|
|
171
|
+
if (s.lastIndexOf("]") === s.length - 1) {
|
|
172
|
+
const n = s.slice(0, s.lastIndexOf("[")), a = r.map((i) => w({
|
|
173
|
+
name: t,
|
|
174
|
+
type: n,
|
|
175
|
+
types: e,
|
|
176
|
+
value: i
|
|
177
|
+
}));
|
|
178
|
+
return [
|
|
179
|
+
{ type: "bytes32" },
|
|
180
|
+
c(I(a.map(([i]) => i), a.map(([, i]) => i)))
|
|
181
|
+
];
|
|
182
|
+
}
|
|
183
|
+
return [{ type: s }, r];
|
|
184
|
+
}
|
|
185
|
+
export {
|
|
186
|
+
R as I,
|
|
187
|
+
W as a,
|
|
188
|
+
q as b,
|
|
189
|
+
G as c,
|
|
190
|
+
v as d,
|
|
191
|
+
X as e,
|
|
192
|
+
V as g,
|
|
193
|
+
U as h,
|
|
194
|
+
j as p,
|
|
195
|
+
C as t,
|
|
196
|
+
F as v
|
|
197
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cy as l } from "./index-DiHImG4L.js";
|
|
2
|
+
const o = l`<svg fill="none" viewBox="0 0 16 16">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z"
|
|
6
|
+
/>
|
|
7
|
+
<path
|
|
8
|
+
fill="currentColor"
|
|
9
|
+
fill-rule="evenodd"
|
|
10
|
+
d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z"
|
|
11
|
+
clip-rule="evenodd"
|
|
12
|
+
/>
|
|
13
|
+
</svg>`;
|
|
14
|
+
export {
|
|
15
|
+
o as helpCircleSvg
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cy as c } from "./index-DiHImG4L.js";
|
|
2
|
+
const v = c`<svg
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
width="28"
|
|
5
|
+
height="28"
|
|
6
|
+
viewBox="0 0 28 28"
|
|
7
|
+
fill="none">
|
|
8
|
+
<path
|
|
9
|
+
fill="#949E9E"
|
|
10
|
+
fill-rule="evenodd"
|
|
11
|
+
d="M7.974 2.975h12.052c1.248 0 2.296 0 3.143.092.89.096 1.723.307 2.461.844a4.9 4.9 0 0 1 1.084 1.084c.537.738.748 1.57.844 2.461.092.847.092 1.895.092 3.143v6.802c0 1.248 0 2.296-.092 3.143-.096.89-.307 1.723-.844 2.461a4.9 4.9 0 0 1-1.084 1.084c-.738.537-1.57.748-2.461.844-.847.092-1.895.092-3.143.092H7.974c-1.247 0-2.296 0-3.143-.092-.89-.096-1.723-.307-2.461-.844a4.901 4.901 0 0 1-1.084-1.084c-.537-.738-.748-1.571-.844-2.461C.35 19.697.35 18.649.35 17.4v-6.802c0-1.248 0-2.296.092-3.143.096-.89.307-1.723.844-2.461A4.9 4.9 0 0 1 2.37 3.91c.738-.537 1.571-.748 2.461-.844.847-.092 1.895-.092 3.143-.092ZM5.133 5.85c-.652.071-.936.194-1.117.326a2.1 2.1 0 0 0-.465.465c-.132.181-.255.465-.325 1.117-.074.678-.076 1.573-.076 2.917v6.65c0 1.344.002 2.239.076 2.917.07.652.193.936.325 1.117a2.1 2.1 0 0 0 .465.465c.181.132.465.255 1.117.326.678.073 1.574.075 2.917.075h11.9c1.344 0 2.239-.002 2.917-.075.652-.071.936-.194 1.117-.326.179-.13.335-.286.465-.465.132-.181.255-.465.326-1.117.073-.678.075-1.573.075-2.917v-6.65c0-1.344-.002-2.239-.075-2.917-.071-.652-.194-.936-.326-1.117a2.1 2.1 0 0 0-.465-.465c-.181-.132-.465-.255-1.117-.326-.678-.073-1.573-.075-2.917-.075H8.05c-1.343 0-2.239.002-2.917.075Zm.467 7.275a3.15 3.15 0 1 1 6.3 0 3.15 3.15 0 0 1-6.3 0Zm8.75-1.75a1.4 1.4 0 0 1 1.4-1.4h3.5a1.4 1.4 0 0 1 0 2.8h-3.5a1.4 1.4 0 0 1-1.4-1.4Zm0 5.25a1.4 1.4 0 0 1 1.4-1.4H21a1.4 1.4 0 1 1 0 2.8h-5.25a1.4 1.4 0 0 1-1.4-1.4Z"
|
|
12
|
+
clip-rule="evenodd"/>
|
|
13
|
+
</svg>`;
|
|
14
|
+
export {
|
|
15
|
+
v as idSvg
|
|
16
|
+
};
|