@directcryptopay/sdk 0.2.4 → 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-CbO41bcH.js +0 -217
  11. package/dist/HelpersUtil-DHm6EVSE.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-Ch0FFTEt.js +0 -457
  65. package/dist/ccip-BrGhNXIM.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-CpafmuCb.js +0 -490
  70. package/dist/email-Dcg4jlai.js +0 -344
  71. package/dist/embedded-wallet-DeoRdAPw.js +0 -820
  72. package/dist/features-B9Nde43h.js +0 -274
  73. package/dist/hashTypedData-a7b8tdkO.js +0 -197
  74. package/dist/if-defined-k21LutCn.js +0 -10
  75. package/dist/index-9vLw53Xl.js +0 -228
  76. package/dist/index-B5wUyynz.js +0 -107
  77. package/dist/index-B8LkUrww.js +0 -86
  78. package/dist/index-BA0VwKg0.js +0 -8189
  79. package/dist/index-BB9JJ24N.js +0 -125
  80. package/dist/index-BCkEvPQ6.js +0 -172
  81. package/dist/index-BDeO_csr.js +0 -171
  82. package/dist/index-Bb7babLF.js +0 -1281
  83. package/dist/index-BjOhprVS.js +0 -199
  84. package/dist/index-BjyMgZsf.js +0 -218
  85. package/dist/index-BkThIDLX.js +0 -159
  86. package/dist/index-BmFs6nb7.js +0 -209
  87. package/dist/index-C1QEJL-2.js +0 -572
  88. package/dist/index-C4qc4PdD.js +0 -387
  89. package/dist/index-CAPvUh14.js +0 -1750
  90. package/dist/index-CBMU3PTE.js +0 -65
  91. package/dist/index-CGwPkJLF.js +0 -355
  92. package/dist/index-CNGEqX3D.js +0 -153
  93. package/dist/index-CRlCq6IB.js +0 -7981
  94. package/dist/index-Cg_o-i9X.js +0 -118
  95. package/dist/index-D1BvhCbI.js +0 -62
  96. package/dist/index-DFi8TiHc.js +0 -128
  97. package/dist/index-DLwuveL9.js +0 -555
  98. package/dist/index-DMn7ktUQ.js +0 -56
  99. package/dist/index-DOXwtuwa.js +0 -117
  100. package/dist/index-DPPOW_Tp.js +0 -118
  101. package/dist/index-DQpzHpW-.js +0 -517
  102. package/dist/index-DXHg5C-W.js +0 -276
  103. package/dist/index-DcYjZV4H.js +0 -110
  104. package/dist/index-DeL88Lwc.js +0 -41655
  105. package/dist/index-DrWVlf8b.js +0 -46
  106. package/dist/index-Dsfuc4rB.js +0 -123
  107. package/dist/index-DuTny38n.js +0 -1175
  108. package/dist/index-Nfjb6bV0.js +0 -21991
  109. package/dist/index-WwwdQSN2.js +0 -85
  110. package/dist/index-Yha9Afch.js +0 -174
  111. package/dist/index-cbQHN7GC.js +0 -100
  112. package/dist/index-hyG3cYsv.js +0 -1083
  113. package/dist/index-qLxmmPaL.js +0 -257
  114. package/dist/localBatchGatewayRequest-vfcvRH0G.js +0 -91
  115. package/dist/onramp-BSiyOX4L.js +0 -855
  116. package/dist/parseSignature-CdCMAPZN.js +0 -3304
  117. package/dist/pay-with-exchange-CduNoMEz.js +0 -525
  118. package/dist/property-Bd8U3_QP.js +0 -618
  119. package/dist/receive-CrmptJlq.js +0 -232
  120. package/dist/ref-SOwYtCZb.js +0 -107
  121. package/dist/send-oMcHMEr6.js +0 -1166
  122. package/dist/socials-C0A4-FbY.js +0 -620
  123. package/dist/swaps-CbJJ9Ciu.js +0 -1760
  124. package/dist/transactions-BDfCoBS5.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-BjsTkny7.js +0 -1706
@@ -1,107 +0,0 @@
1
- import { cU as p, cV as f, cW as h, cX as b, cN as d, cY as m } from "./index-DeL88Lwc.js";
2
- import { n as i, c as w } from "./index-DuTny38n.js";
3
- import "./index-DFi8TiHc.js";
4
- const g = p`
5
- :host {
6
- width: 100%;
7
- }
8
-
9
- button {
10
- padding: ${({ spacing: e }) => e[3]};
11
- display: flex;
12
- justify-content: space-between;
13
- width: 100%;
14
- border-radius: ${({ borderRadius: e }) => e[4]};
15
- background-color: transparent;
16
- }
17
-
18
- @media (hover: hover) {
19
- button:hover:enabled {
20
- background-color: ${({ tokens: e }) => e.theme.foregroundSecondary};
21
- }
22
- }
23
-
24
- button:focus-visible:enabled {
25
- background-color: ${({ tokens: e }) => e.theme.foregroundSecondary};
26
- box-shadow: 0 0 0 4px ${({ tokens: e }) => e.core.foregroundAccent040};
27
- }
28
-
29
- button[data-clickable='false'] {
30
- pointer-events: none;
31
- background-color: transparent;
32
- }
33
-
34
- wui-image,
35
- wui-icon {
36
- width: ${({ spacing: e }) => e[10]};
37
- height: ${({ spacing: e }) => e[10]};
38
- }
39
-
40
- wui-image {
41
- border-radius: ${({ borderRadius: e }) => e[16]};
42
- }
43
- `;
44
- var n = function(e, r, a, u) {
45
- var l = arguments.length, o = l < 3 ? r : u === null ? u = Object.getOwnPropertyDescriptor(r, a) : u, c;
46
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, r, a, u);
47
- else for (var s = e.length - 1; s >= 0; s--) (c = e[s]) && (o = (l < 3 ? c(o) : l > 3 ? c(r, a, o) : c(r, a)) || o);
48
- return l > 3 && o && Object.defineProperty(r, a, o), o;
49
- };
50
- let t = class extends b {
51
- constructor() {
52
- super(...arguments), this.tokenName = "", this.tokenImageUrl = "", this.tokenValue = 0, this.tokenAmount = "0.0", this.tokenCurrency = "", this.clickable = !1;
53
- }
54
- render() {
55
- return m`
56
- <button data-clickable=${String(this.clickable)}>
57
- <wui-flex gap="2" alignItems="center">
58
- ${this.visualTemplate()}
59
- <wui-flex flexDirection="column" justifyContent="space-between" gap="1">
60
- <wui-text variant="md-regular" color="primary">${this.tokenName}</wui-text>
61
- <wui-text variant="sm-regular-mono" color="secondary">
62
- ${d.formatNumberToLocalString(this.tokenAmount, 4)} ${this.tokenCurrency}
63
- </wui-text>
64
- </wui-flex>
65
- </wui-flex>
66
- <wui-flex
67
- flexDirection="column"
68
- justifyContent="space-between"
69
- gap="1"
70
- alignItems="flex-end"
71
- >
72
- <wui-text variant="md-regular-mono" color="primary"
73
- >$${this.tokenValue.toFixed(2)}</wui-text
74
- >
75
- <wui-text variant="sm-regular-mono" color="secondary">
76
- ${d.formatNumberToLocalString(this.tokenAmount, 4)}
77
- </wui-text>
78
- </wui-flex>
79
- </button>
80
- `;
81
- }
82
- visualTemplate() {
83
- return this.tokenName && this.tokenImageUrl ? m`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>` : m`<wui-icon name="coinPlaceholder" color="default"></wui-icon>`;
84
- }
85
- };
86
- t.styles = [f, h, g];
87
- n([
88
- i()
89
- ], t.prototype, "tokenName", void 0);
90
- n([
91
- i()
92
- ], t.prototype, "tokenImageUrl", void 0);
93
- n([
94
- i({ type: Number })
95
- ], t.prototype, "tokenValue", void 0);
96
- n([
97
- i()
98
- ], t.prototype, "tokenAmount", void 0);
99
- n([
100
- i()
101
- ], t.prototype, "tokenCurrency", void 0);
102
- n([
103
- i({ type: Boolean })
104
- ], t.prototype, "clickable", void 0);
105
- t = n([
106
- w("wui-list-token")
107
- ], t);
@@ -1,86 +0,0 @@
1
- import { c_ as d, cV as p, cX as m, cZ as r, cY as x } from "./index-DeL88Lwc.js";
2
- import { n as h, c as f } from "./index-DuTny38n.js";
3
- const g = d`
4
- :host {
5
- display: flex;
6
- }
7
-
8
- :host([data-size='sm']) > svg {
9
- width: 12px;
10
- height: 12px;
11
- }
12
-
13
- :host([data-size='md']) > svg {
14
- width: 16px;
15
- height: 16px;
16
- }
17
-
18
- :host([data-size='lg']) > svg {
19
- width: 24px;
20
- height: 24px;
21
- }
22
-
23
- :host([data-size='xl']) > svg {
24
- width: 32px;
25
- height: 32px;
26
- }
27
-
28
- svg {
29
- animation: rotate 1.4s linear infinite;
30
- color: var(--local-color);
31
- }
32
-
33
- :host([data-size='md']) > svg > circle {
34
- stroke-width: 6px;
35
- }
36
-
37
- :host([data-size='sm']) > svg > circle {
38
- stroke-width: 8px;
39
- }
40
-
41
- @keyframes rotate {
42
- 100% {
43
- transform: rotate(360deg);
44
- }
45
- }
46
- `;
47
- var l = function(s, t, o, C) {
48
- var n = arguments.length, e = n < 3 ? t : C === null ? C = Object.getOwnPropertyDescriptor(t, o) : C, a;
49
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") e = Reflect.decorate(s, t, o, C);
50
- else for (var c = s.length - 1; c >= 0; c--) (a = s[c]) && (e = (n < 3 ? a(e) : n > 3 ? a(t, o, e) : a(t, o)) || e);
51
- return n > 3 && e && Object.defineProperty(t, o, e), e;
52
- };
53
- let i = class extends m {
54
- constructor() {
55
- super(...arguments), this.color = "primary", this.size = "lg";
56
- }
57
- render() {
58
- const t = {
59
- primary: r.tokens.theme.textPrimary,
60
- secondary: r.tokens.theme.textSecondary,
61
- tertiary: r.tokens.theme.textTertiary,
62
- invert: r.tokens.theme.textInvert,
63
- error: r.tokens.core.textError,
64
- warning: r.tokens.core.textWarning,
65
- "accent-primary": r.tokens.core.textAccentPrimary
66
- };
67
- return this.style.cssText = `
68
- --local-color: ${this.color === "inherit" ? "inherit" : t[this.color]};
69
- `, this.dataset.size = this.size, x`<svg viewBox="0 0 16 17" fill="none">
70
- <path
71
- d="M8.75 2.65625V4.65625C8.75 4.85516 8.67098 5.04593 8.53033 5.18658C8.38968 5.32723 8.19891 5.40625 8 5.40625C7.80109 5.40625 7.61032 5.32723 7.46967 5.18658C7.32902 5.04593 7.25 4.85516 7.25 4.65625V2.65625C7.25 2.45734 7.32902 2.26657 7.46967 2.12592C7.61032 1.98527 7.80109 1.90625 8 1.90625C8.19891 1.90625 8.38968 1.98527 8.53033 2.12592C8.67098 2.26657 8.75 2.45734 8.75 2.65625ZM14 7.90625H12C11.8011 7.90625 11.6103 7.98527 11.4697 8.12592C11.329 8.26657 11.25 8.45734 11.25 8.65625C11.25 8.85516 11.329 9.04593 11.4697 9.18658C11.6103 9.32723 11.8011 9.40625 12 9.40625H14C14.1989 9.40625 14.3897 9.32723 14.5303 9.18658C14.671 9.04593 14.75 8.85516 14.75 8.65625C14.75 8.45734 14.671 8.26657 14.5303 8.12592C14.3897 7.98527 14.1989 7.90625 14 7.90625ZM11.3588 10.9544C11.289 10.8846 11.2062 10.8293 11.115 10.7915C11.0239 10.7538 10.9262 10.7343 10.8275 10.7343C10.7288 10.7343 10.6311 10.7538 10.54 10.7915C10.4488 10.8293 10.366 10.8846 10.2963 10.9544C10.2265 11.0241 10.1711 11.107 10.1334 11.1981C10.0956 11.2893 10.0762 11.387 10.0762 11.4856C10.0762 11.5843 10.0956 11.682 10.1334 11.7731C10.1711 11.8643 10.2265 11.9471 10.2963 12.0169L11.7106 13.4312C11.8515 13.5721 12.0426 13.6513 12.2419 13.6513C12.4411 13.6513 12.6322 13.5721 12.7731 13.4312C12.914 13.2904 12.9932 13.0993 12.9932 12.9C12.9932 12.7007 12.914 12.5096 12.7731 12.3687L11.3588 10.9544ZM8 11.9062C7.80109 11.9062 7.61032 11.9853 7.46967 12.1259C7.32902 12.2666 7.25 12.4573 7.25 12.6562V14.6562C7.25 14.8552 7.32902 15.0459 7.46967 15.1866C7.61032 15.3272 7.80109 15.4062 8 15.4062C8.19891 15.4062 8.38968 15.3272 8.53033 15.1866C8.67098 15.0459 8.75 14.8552 8.75 14.6562V12.6562C8.75 12.4573 8.67098 12.2666 8.53033 12.1259C8.38968 11.9853 8.19891 11.9062 8 11.9062ZM4.64125 10.9544L3.22688 12.3687C3.08598 12.5096 3.00682 12.7007 3.00682 12.9C3.00682 13.0993 3.08598 13.2904 3.22688 13.4312C3.36777 13.5721 3.55887 13.6513 3.75813 13.6513C3.95738 13.6513 4.14848 13.5721 4.28937 13.4312L5.70375 12.0169C5.84465 11.876 5.9238 11.6849 5.9238 11.4856C5.9238 11.2864 5.84465 11.0953 5.70375 10.9544C5.56285 10.8135 5.37176 10.7343 5.1725 10.7343C4.97324 10.7343 4.78215 10.8135 4.64125 10.9544ZM4.75 8.65625C4.75 8.45734 4.67098 8.26657 4.53033 8.12592C4.38968 7.98527 4.19891 7.90625 4 7.90625H2C1.80109 7.90625 1.61032 7.98527 1.46967 8.12592C1.32902 8.26657 1.25 8.45734 1.25 8.65625C1.25 8.85516 1.32902 9.04593 1.46967 9.18658C1.61032 9.32723 1.80109 9.40625 2 9.40625H4C4.19891 9.40625 4.38968 9.32723 4.53033 9.18658C4.67098 9.04593 4.75 8.85516 4.75 8.65625ZM4.2875 3.88313C4.1466 3.74223 3.95551 3.66307 3.75625 3.66307C3.55699 3.66307 3.3659 3.74223 3.225 3.88313C3.0841 4.02402 3.00495 4.21512 3.00495 4.41438C3.00495 4.61363 3.0841 4.80473 3.225 4.94562L4.64125 6.35813C4.78215 6.49902 4.97324 6.57818 5.1725 6.57818C5.37176 6.57818 5.56285 6.49902 5.70375 6.35813C5.84465 6.21723 5.9238 6.02613 5.9238 5.82688C5.9238 5.62762 5.84465 5.43652 5.70375 5.29563L4.2875 3.88313Z"
72
- fill="currentColor"
73
- />
74
- </svg>`;
75
- }
76
- };
77
- i.styles = [p, g];
78
- l([
79
- h()
80
- ], i.prototype, "color", void 0);
81
- l([
82
- h()
83
- ], i.prototype, "size", void 0);
84
- i = l([
85
- f("wui-loading-spinner")
86
- ], i);