@directcryptopay/sdk 0.2.3 → 0.3.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.
Files changed (127) hide show
  1. package/README.md +51 -87
  2. package/dist/core/config.d.ts +9 -46
  3. package/dist/core/iframe.d.ts +16 -0
  4. package/dist/dcp-sdk.umd.js +1 -12811
  5. package/dist/dcp.d.ts +12 -5
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +219 -2
  8. package/dist/types.d.ts +26 -164
  9. package/package.json +3 -13
  10. package/dist/ExchangeController-CPMQq6Q-.js +0 -217
  11. package/dist/HelpersUtil-DfMFC7Bf.js +0 -120
  12. package/dist/NavigationUtil-kj9LEOOd.js +0 -8
  13. package/dist/PhArrowCircleDown-lsK25DCk.js +0 -73
  14. package/dist/PhArrowClockwise-NeKHZ1co.js +0 -73
  15. package/dist/PhArrowDown-C9AkNvLs.js +0 -73
  16. package/dist/PhArrowLeft-RNfIQP1X.js +0 -73
  17. package/dist/PhArrowRight-DM1tna0G.js +0 -73
  18. package/dist/PhArrowSquareOut-S5XYbAZj.js +0 -73
  19. package/dist/PhArrowUp-DmktzOWy.js +0 -73
  20. package/dist/PhArrowUpRight-BkNeW_5i.js +0 -73
  21. package/dist/PhArrowsClockwise-CQ4pG76b.js +0 -73
  22. package/dist/PhArrowsDownUp-H6gxaNM6.js +0 -73
  23. package/dist/PhArrowsLeftRight-DZSsfMR6.js +0 -73
  24. package/dist/PhBank-4_9QzqIB.js +0 -73
  25. package/dist/PhBrowser-B-JSznId.js +0 -73
  26. package/dist/PhCaretDown-vV5oHMNi.js +0 -73
  27. package/dist/PhCaretLeft-BLo6Y_f4.js +0 -73
  28. package/dist/PhCaretRight-CqQN4TT3.js +0 -73
  29. package/dist/PhCaretUp-Df7UCAHy.js +0 -73
  30. package/dist/PhCheck-gtpfK4ed.js +0 -73
  31. package/dist/PhCircleHalf-Uq7dwDYw.js +0 -73
  32. package/dist/PhClock-SDCW-NmF.js +0 -73
  33. package/dist/PhCompass-B7hgtdx-.js +0 -73
  34. package/dist/PhCopy-BcnhyXCy.js +0 -73
  35. package/dist/PhCreditCard-BJjByVgu.js +0 -73
  36. package/dist/PhCurrencyDollar-B7ZXqXBy.js +0 -73
  37. package/dist/PhDesktop-B3VKPuJx.js +0 -73
  38. package/dist/PhDeviceMobile-Bnd0TYEH.js +0 -73
  39. package/dist/PhDotsThree-yyMWyZ-R.js +0 -73
  40. package/dist/PhEnvelope-67uzHbI9.js +0 -73
  41. package/dist/PhFunnelSimple-B-DCsloI.js +0 -73
  42. package/dist/PhGlobe-TMm_6qGk.js +0 -73
  43. package/dist/PhIdentificationCard-CePPD2xc.js +0 -73
  44. package/dist/PhImage-gY96WtHR.js +0 -73
  45. package/dist/PhInfo-DRQM_ZDP.js +0 -73
  46. package/dist/PhLightbulb-B0TxPfZ1.js +0 -73
  47. package/dist/PhMagnifyingGlass-B8si5_6W.js +0 -73
  48. package/dist/PhPaperPlaneRight-DVu5PLYd.js +0 -73
  49. package/dist/PhPlus-BfTsQnUz.js +0 -73
  50. package/dist/PhPower-CxYUGOWn.js +0 -73
  51. package/dist/PhPuzzlePiece-CQ4wh0gV.js +0 -73
  52. package/dist/PhQrCode-BuJ97NYJ.js +0 -73
  53. package/dist/PhQuestion-kJoP8Mja.js +0 -73
  54. package/dist/PhQuestionMark-C46ZkFpu.js +0 -73
  55. package/dist/PhSealCheck-Eh8jVqSN.js +0 -73
  56. package/dist/PhSignOut-jk97OSVt.js +0 -73
  57. package/dist/PhSpinner-CiYOhwMg.js +0 -73
  58. package/dist/PhTrash-pxerMqzd.js +0 -73
  59. package/dist/PhUser-BMg0VV4A.js +0 -73
  60. package/dist/PhVault-DYQvx5A-.js +0 -73
  61. package/dist/PhWarning-NLC5Mj87.js +0 -73
  62. package/dist/PhWarningCircle-Ch2jU9fA.js +0 -73
  63. package/dist/PhX-Bx4wpwm3.js +0 -73
  64. package/dist/SwapController-Cti0Cyxa.js +0 -457
  65. package/dist/ccip-CKZd2XJ7.js +0 -150
  66. package/dist/core/api.d.ts +0 -39
  67. package/dist/core/logic.d.ts +0 -2
  68. package/dist/core/wallet.d.ts +0 -55
  69. package/dist/data-capture-7D5CL385.js +0 -490
  70. package/dist/email-AmK0INbZ.js +0 -344
  71. package/dist/embedded-wallet-Pn0I_XLn.js +0 -820
  72. package/dist/features-x8XNprEe.js +0 -274
  73. package/dist/hashTypedData-B50-z0AA.js +0 -197
  74. package/dist/if-defined-CdZSZ6UL.js +0 -10
  75. package/dist/index-4ewUtPPp.js +0 -7981
  76. package/dist/index-51l86yqx.js +0 -276
  77. package/dist/index-B6K56LF_.js +0 -85
  78. package/dist/index-BAmv9PxJ.js +0 -257
  79. package/dist/index-BEswjY9r.js +0 -117
  80. package/dist/index-BSKRq56S.js +0 -355
  81. package/dist/index-BaygXQxx.js +0 -172
  82. package/dist/index-BcPxaHr5.js +0 -118
  83. package/dist/index-Bjt7nGaJ.js +0 -199
  84. package/dist/index-BkTSyAJb.js +0 -21991
  85. package/dist/index-Bmnl7l2U.js +0 -555
  86. package/dist/index-BvPvouSq.js +0 -56
  87. package/dist/index-C-6iznUO.js +0 -174
  88. package/dist/index-C1QEJL-2.js +0 -572
  89. package/dist/index-C4M5s_AM.js +0 -228
  90. package/dist/index-CEqcN8QP.js +0 -1175
  91. package/dist/index-CM3YaYca.js +0 -8189
  92. package/dist/index-CclBLA5r.js +0 -517
  93. package/dist/index-ChTxJOiF.js +0 -46
  94. package/dist/index-CmAv0Tzr.js +0 -86
  95. package/dist/index-CmvoKY4x.js +0 -125
  96. package/dist/index-D7PmdQ9B.js +0 -1750
  97. package/dist/index-D7k2Pc4e.js +0 -1083
  98. package/dist/index-D7lmgqUR.js +0 -153
  99. package/dist/index-DG_-qYze.js +0 -107
  100. package/dist/index-DHot9Fdb.js +0 -218
  101. package/dist/index-DV2LrPtU.js +0 -123
  102. package/dist/index-DYBaJQ2W.js +0 -65
  103. package/dist/index-D_8VUmn1.js +0 -41543
  104. package/dist/index-D_gLn3rT.js +0 -100
  105. package/dist/index-DqcVUSC9.js +0 -62
  106. package/dist/index-I7VDqINw.js +0 -128
  107. package/dist/index-Oz72I9VP.js +0 -209
  108. package/dist/index-UclsHkJ0.js +0 -118
  109. package/dist/index-X8zir_1j.js +0 -110
  110. package/dist/index-XvlWKGCu.js +0 -1281
  111. package/dist/index-dO97xPlt.js +0 -171
  112. package/dist/index-uBeF6OAB.js +0 -387
  113. package/dist/index-zeA_RiCV.js +0 -159
  114. package/dist/localBatchGatewayRequest-BUZHGdjw.js +0 -91
  115. package/dist/onramp-CdnBuF0r.js +0 -855
  116. package/dist/parseSignature-CcyTNGr4.js +0 -3304
  117. package/dist/pay-with-exchange-CSM6WCOV.js +0 -525
  118. package/dist/property-Bd8U3_QP.js +0 -618
  119. package/dist/receive-DooMu4Dx.js +0 -232
  120. package/dist/ref-CpgjXAw7.js +0 -107
  121. package/dist/send-3T7CyYic.js +0 -1166
  122. package/dist/socials-Dt-iHL17.js +0 -620
  123. package/dist/swaps-CjA9Es42.js +0 -1760
  124. package/dist/transactions-nRm9DVzn.js +0 -37
  125. package/dist/ui/Modal.d.ts +0 -9
  126. package/dist/ui/index.d.ts +0 -6
  127. package/dist/w3m-modal-NV25AXhM.js +0 -1706
@@ -1,159 +0,0 @@
1
- import { c$ as d, cC as h, cR as f, cS as g, cU as w, cX as b, cY as y } from "./index-D_8VUmn1.js";
2
- import { r as m, c as x } from "./index-CEqcN8QP.js";
3
- const o = h({
4
- message: "",
5
- open: !1,
6
- triggerRect: {
7
- width: 0,
8
- height: 0,
9
- top: 0,
10
- left: 0
11
- },
12
- variant: "shade"
13
- }), v = {
14
- state: o,
15
- subscribe(t) {
16
- return g(o, () => t(o));
17
- },
18
- subscribeKey(t, e) {
19
- return f(o, t, e);
20
- },
21
- showTooltip({ message: t, triggerRect: e, variant: i }) {
22
- o.open = !0, o.message = t, o.triggerRect = e, o.variant = i;
23
- },
24
- hide() {
25
- o.open = !1, o.message = "", o.triggerRect = {
26
- width: 0,
27
- height: 0,
28
- top: 0,
29
- left: 0
30
- };
31
- }
32
- }, s = d(v), $ = w`
33
- :host {
34
- pointer-events: none;
35
- }
36
-
37
- :host > wui-flex {
38
- display: var(--w3m-tooltip-display);
39
- opacity: var(--w3m-tooltip-opacity);
40
- padding: 9px ${({ spacing: t }) => t[3]} 10px ${({ spacing: t }) => t[3]};
41
- border-radius: ${({ borderRadius: t }) => t[3]};
42
- color: ${({ tokens: t }) => t.theme.backgroundPrimary};
43
- position: absolute;
44
- top: var(--w3m-tooltip-top);
45
- left: var(--w3m-tooltip-left);
46
- transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px));
47
- max-width: calc(var(--apkt-modal-width) - ${({ spacing: t }) => t[5]});
48
- transition: opacity ${({ durations: t }) => t.lg}
49
- ${({ easings: t }) => t["ease-out-power-2"]};
50
- will-change: opacity;
51
- opacity: 0;
52
- animation-duration: ${({ durations: t }) => t.xl};
53
- animation-timing-function: ${({ easings: t }) => t["ease-out-power-2"]};
54
- animation-name: fade-in;
55
- animation-fill-mode: forwards;
56
- }
57
-
58
- :host([data-variant='shade']) > wui-flex {
59
- background-color: ${({ tokens: t }) => t.theme.foregroundPrimary};
60
- }
61
-
62
- :host([data-variant='shade']) > wui-flex > wui-text {
63
- color: ${({ tokens: t }) => t.theme.textSecondary};
64
- }
65
-
66
- :host([data-variant='fill']) > wui-flex {
67
- background-color: ${({ tokens: t }) => t.theme.textPrimary};
68
- border: none;
69
- }
70
-
71
- wui-icon {
72
- position: absolute;
73
- width: 12px !important;
74
- height: 4px !important;
75
- color: ${({ tokens: t }) => t.theme.foregroundPrimary};
76
- }
77
-
78
- wui-icon[data-placement='top'] {
79
- bottom: 0px;
80
- left: 50%;
81
- transform: translate(-50%, 95%);
82
- }
83
-
84
- wui-icon[data-placement='bottom'] {
85
- top: 0;
86
- left: 50%;
87
- transform: translate(-50%, -95%) rotate(180deg);
88
- }
89
-
90
- wui-icon[data-placement='right'] {
91
- top: 50%;
92
- left: 0;
93
- transform: translate(-65%, -50%) rotate(90deg);
94
- }
95
-
96
- wui-icon[data-placement='left'] {
97
- top: 50%;
98
- right: 0%;
99
- transform: translate(65%, -50%) rotate(270deg);
100
- }
101
-
102
- @keyframes fade-in {
103
- from {
104
- opacity: 0;
105
- }
106
- to {
107
- opacity: 1;
108
- }
109
- }
110
- `;
111
- var n = function(t, e, i, p) {
112
- var c = arguments.length, a = c < 3 ? e : p === null ? p = Object.getOwnPropertyDescriptor(e, i) : p, l;
113
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(t, e, i, p);
114
- else for (var u = t.length - 1; u >= 0; u--) (l = t[u]) && (a = (c < 3 ? l(a) : c > 3 ? l(e, i, a) : l(e, i)) || a);
115
- return c > 3 && a && Object.defineProperty(e, i, a), a;
116
- };
117
- let r = class extends b {
118
- constructor() {
119
- super(), this.unsubscribe = [], this.open = s.state.open, this.message = s.state.message, this.triggerRect = s.state.triggerRect, this.variant = s.state.variant, this.unsubscribe.push(s.subscribe((e) => {
120
- this.open = e.open, this.message = e.message, this.triggerRect = e.triggerRect, this.variant = e.variant;
121
- }));
122
- }
123
- disconnectedCallback() {
124
- this.unsubscribe.forEach((e) => e());
125
- }
126
- render() {
127
- this.dataset.variant = this.variant;
128
- const e = this.triggerRect.top, i = this.triggerRect.left;
129
- return this.style.cssText = `
130
- --w3m-tooltip-top: ${e}px;
131
- --w3m-tooltip-left: ${i}px;
132
- --w3m-tooltip-parent-width: ${this.triggerRect.width / 2}px;
133
- --w3m-tooltip-display: ${this.open ? "flex" : "none"};
134
- --w3m-tooltip-opacity: ${this.open ? 1 : 0};
135
- `, y`<wui-flex>
136
- <wui-icon data-placement="top" size="inherit" name="cursor"></wui-icon>
137
- <wui-text color="primary" variant="sm-regular">${this.message}</wui-text>
138
- </wui-flex>`;
139
- }
140
- };
141
- r.styles = [$];
142
- n([
143
- m()
144
- ], r.prototype, "open", void 0);
145
- n([
146
- m()
147
- ], r.prototype, "message", void 0);
148
- n([
149
- m()
150
- ], r.prototype, "triggerRect", void 0);
151
- n([
152
- m()
153
- ], r.prototype, "variant", void 0);
154
- r = n([
155
- x("w3m-tooltip")
156
- ], r);
157
- export {
158
- s as T
159
- };
@@ -1,91 +0,0 @@
1
- import { bJ as l, ck as p, dj as w, R as y, be as A, bl as g, K as b, J as F, bi as E, bD as N, P as h, Q as P, Z as R, dk as f, dl as I } from "./index-D_8VUmn1.js";
2
- function q(n) {
3
- const { abi: r, data: a } = n, e = l(a, 0, 4), t = r.find((o) => o.type === "function" && e === p(w(o)));
4
- if (!t)
5
- throw new y(e, {
6
- docsPath: "/docs/contract/decodeFunctionData"
7
- });
8
- return {
9
- functionName: t.name,
10
- args: "inputs" in t && t.inputs && t.inputs.length > 0 ? A(t.inputs, l(a, 4)) : void 0
11
- };
12
- }
13
- const u = "/docs/contract/encodeErrorResult";
14
- function m(n) {
15
- const { abi: r, errorName: a, args: e } = n;
16
- let t = r[0];
17
- if (a) {
18
- const c = g({ abi: r, args: e, name: a });
19
- if (!c)
20
- throw new b(a, { docsPath: u });
21
- t = c;
22
- }
23
- if (t.type !== "error")
24
- throw new b(void 0, { docsPath: u });
25
- const o = w(t), s = p(o);
26
- let i = "0x";
27
- if (e && e.length > 0) {
28
- if (!t.inputs)
29
- throw new F(t.name, { docsPath: u });
30
- i = E(t.inputs, e);
31
- }
32
- return N([s, i]);
33
- }
34
- const d = "/docs/contract/encodeFunctionResult";
35
- function x(n) {
36
- const { abi: r, functionName: a, result: e } = n;
37
- let t = r[0];
38
- if (a) {
39
- const s = g({ abi: r, name: a });
40
- if (!s)
41
- throw new h(a, { docsPath: d });
42
- t = s;
43
- }
44
- if (t.type !== "function")
45
- throw new h(void 0, { docsPath: d });
46
- if (!t.outputs)
47
- throw new P(t.name, { docsPath: d });
48
- const o = (() => {
49
- if (t.outputs.length === 0)
50
- return [];
51
- if (t.outputs.length === 1)
52
- return [e];
53
- if (Array.isArray(e))
54
- return e;
55
- throw new R(e);
56
- })();
57
- return E(t.outputs, o);
58
- }
59
- const D = "x-batch-gateway:true";
60
- async function G(n) {
61
- const { data: r, ccipRequest: a } = n, { args: [e] } = q({ abi: f, data: r }), t = [], o = [];
62
- return await Promise.all(e.map(async (s, i) => {
63
- try {
64
- o[i] = s.urls.includes(D) ? await G({ data: s.data, ccipRequest: a }) : await a(s), t[i] = !1;
65
- } catch (c) {
66
- t[i] = !0, o[i] = H(c);
67
- }
68
- })), x({
69
- abi: f,
70
- functionName: "query",
71
- result: [t, o]
72
- });
73
- }
74
- function H(n) {
75
- return n.name === "HttpRequestError" && n.status ? m({
76
- abi: f,
77
- errorName: "HttpError",
78
- args: [n.status, n.shortMessage]
79
- }) : m({
80
- abi: [I],
81
- errorName: "Error",
82
- args: ["shortMessage" in n ? n.shortMessage : n.message]
83
- });
84
- }
85
- export {
86
- x as a,
87
- G as b,
88
- q as d,
89
- m as e,
90
- D as l
91
- };