@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,174 +0,0 @@
1
- import { cE as l, cF as g, d0 as h, d8 as m, cH as w, cG as s, dm as E, dn as _, d2 as R, cU as y, cV as b, cX as v, cY as C, cW as O } from "./index-D_8VUmn1.js";
2
- import { n as d, c as x } from "./index-CEqcN8QP.js";
3
- import { o as $ } from "./if-defined-CdZSZ6UL.js";
4
- function U() {
5
- try {
6
- return s.returnOpenHref(`${R.SECURE_SITE_SDK_ORIGIN}/loading`, "popupWindow", "width=600,height=800,scrollbars=yes");
7
- } catch {
8
- throw new Error("Could not open social popup");
9
- }
10
- }
11
- async function I() {
12
- h.push("ConnectingFarcaster");
13
- const e = m.getAuthConnector();
14
- if (e) {
15
- const o = l.getAccountData();
16
- if (!(o != null && o.farcasterUrl))
17
- try {
18
- const { url: t } = await e.provider.getFarcasterUri();
19
- l.setAccountProp("farcasterUrl", t, l.state.activeChain);
20
- } catch (t) {
21
- h.goBack(), w.showError(t);
22
- }
23
- }
24
- }
25
- async function L(e) {
26
- h.push("ConnectingSocial");
27
- const o = m.getAuthConnector();
28
- let t = null;
29
- try {
30
- const i = setTimeout(() => {
31
- throw new Error("Social login timed out. Please try again.");
32
- }, 45e3);
33
- if (o && e) {
34
- if (s.isTelegram() || (t = U()), t)
35
- l.setAccountProp("socialWindow", E(t), l.state.activeChain);
36
- else if (!s.isTelegram())
37
- throw new Error("Could not create social popup");
38
- const { uri: n } = await o.provider.getSocialRedirectUri({
39
- provider: e
40
- });
41
- if (!n)
42
- throw t == null || t.close(), new Error("Could not fetch the social redirect uri");
43
- if (t && (t.location.href = n), s.isTelegram()) {
44
- _.setTelegramSocialProvider(e);
45
- const r = s.formatTelegramSocialLoginUrl(n);
46
- s.openHref(r, "_top");
47
- }
48
- clearTimeout(i);
49
- }
50
- } catch (i) {
51
- t == null || t.close();
52
- const n = s.parseError(i);
53
- w.showError(n), g.sendEvent({
54
- type: "track",
55
- event: "SOCIAL_LOGIN_ERROR",
56
- properties: { provider: e, message: n }
57
- });
58
- }
59
- }
60
- async function D(e) {
61
- l.setAccountProp("socialProvider", e, l.state.activeChain), g.sendEvent({
62
- type: "track",
63
- event: "SOCIAL_LOGIN_STARTED",
64
- properties: { provider: e }
65
- }), e === "farcaster" ? await I() : await L(e);
66
- }
67
- const T = y`
68
- :host {
69
- display: flex;
70
- justify-content: center;
71
- align-items: center;
72
- width: 40px;
73
- height: 40px;
74
- border-radius: ${({ borderRadius: e }) => e[20]};
75
- overflow: hidden;
76
- }
77
-
78
- wui-icon {
79
- width: 100%;
80
- height: 100%;
81
- }
82
- `;
83
- var S = function(e, o, t, i) {
84
- var n = arguments.length, r = n < 3 ? o : i === null ? i = Object.getOwnPropertyDescriptor(o, t) : i, a;
85
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(e, o, t, i);
86
- else for (var c = e.length - 1; c >= 0; c--) (a = e[c]) && (r = (n < 3 ? a(r) : n > 3 ? a(o, t, r) : a(o, t)) || r);
87
- return n > 3 && r && Object.defineProperty(o, t, r), r;
88
- };
89
- let p = class extends v {
90
- constructor() {
91
- super(...arguments), this.logo = "google";
92
- }
93
- render() {
94
- return C`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `;
95
- }
96
- };
97
- p.styles = [b, T];
98
- S([
99
- d()
100
- ], p.prototype, "logo", void 0);
101
- p = S([
102
- x("wui-logo")
103
- ], p);
104
- const A = y`
105
- :host {
106
- width: 100%;
107
- }
108
-
109
- button {
110
- display: flex;
111
- align-items: center;
112
- justify-content: space-between;
113
- padding: ${({ spacing: e }) => e[3]};
114
- width: 100%;
115
- background-color: transparent;
116
- border-radius: ${({ borderRadius: e }) => e[4]};
117
- }
118
-
119
- wui-text {
120
- text-transform: capitalize;
121
- }
122
-
123
- @media (hover: hover) {
124
- button:hover:enabled {
125
- background-color: ${({ tokens: e }) => e.theme.foregroundPrimary};
126
- }
127
- }
128
-
129
- button:disabled {
130
- opacity: 0.5;
131
- cursor: not-allowed;
132
- }
133
- `;
134
- var f = function(e, o, t, i) {
135
- var n = arguments.length, r = n < 3 ? o : i === null ? i = Object.getOwnPropertyDescriptor(o, t) : i, a;
136
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(e, o, t, i);
137
- else for (var c = e.length - 1; c >= 0; c--) (a = e[c]) && (r = (n < 3 ? a(r) : n > 3 ? a(o, t, r) : a(o, t)) || r);
138
- return n > 3 && r && Object.defineProperty(o, t, r), r;
139
- };
140
- let u = class extends v {
141
- constructor() {
142
- super(...arguments), this.logo = "google", this.name = "Continue with google", this.disabled = !1;
143
- }
144
- render() {
145
- return C`
146
- <button ?disabled=${this.disabled} tabindex=${$(this.tabIdx)}>
147
- <wui-flex gap="2" alignItems="center">
148
- <wui-image ?boxed=${!0} logo=${this.logo}></wui-image>
149
- <wui-text variant="lg-regular" color="primary">${this.name}</wui-text>
150
- </wui-flex>
151
- <wui-icon name="chevronRight" size="lg" color="default"></wui-icon>
152
- </button>
153
- `;
154
- }
155
- };
156
- u.styles = [b, O, A];
157
- f([
158
- d()
159
- ], u.prototype, "logo", void 0);
160
- f([
161
- d()
162
- ], u.prototype, "name", void 0);
163
- f([
164
- d()
165
- ], u.prototype, "tabIdx", void 0);
166
- f([
167
- d({ type: Boolean })
168
- ], u.prototype, "disabled", void 0);
169
- u = f([
170
- x("wui-list-social")
171
- ], u);
172
- export {
173
- D as e
174
- };