@directcryptopay/sdk 0.1.0 → 0.2.1

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 (138) hide show
  1. package/README.md +202 -256
  2. package/dist/{add-KF4m4jFK.js → add-sji6scSD.js} +1 -1
  3. package/dist/{all-wallets-D6NAjQgX.js → all-wallets-B4H-890E.js} +1 -1
  4. package/dist/{app-store-D7TTn-EO.js → app-store-Z433s97G.js} +1 -1
  5. package/dist/{apple-DjX2E2hE.js → apple-b8Lxj7nb.js} +1 -1
  6. package/dist/{arrow-bottom-C0YrNJYB.js → arrow-bottom-M9oWWo_9.js} +1 -1
  7. package/dist/{arrow-bottom-circle-Dlxvx_XG.js → arrow-bottom-circle-N9c4CXY1.js} +1 -1
  8. package/dist/{arrow-left-x8_-lUyK.js → arrow-left-Dw8AKfwf.js} +1 -1
  9. package/dist/{arrow-right-BTZybj80.js → arrow-right-DwLQZSC_.js} +1 -1
  10. package/dist/{arrow-top-LzH7iLCp.js → arrow-top-zhUjkBe1.js} +1 -1
  11. package/dist/{bank-23jp-IV_.js → bank-CbQdnILK.js} +1 -1
  12. package/dist/{browser-EjoorDid.js → browser-xAqNwt7z.js} +1 -1
  13. package/dist/{card-DGgWwtwC.js → card-Dr1QBmWp.js} +1 -1
  14. package/dist/{ccip-BMANewTU.js → ccip-BIGqktC1.js} +6 -6
  15. package/dist/{checkmark-B1qcQhBo.js → checkmark-BhT1dTgG.js} +1 -1
  16. package/dist/{checkmark-bold-Cyc4IEEJ.js → checkmark-bold-CPB29wqQ.js} +1 -1
  17. package/dist/{chevron-bottom-ClHs08rB.js → chevron-bottom-BhNyx2II.js} +1 -1
  18. package/dist/{chevron-left-O8h_551_.js → chevron-left-CGuEjQlY.js} +1 -1
  19. package/dist/{chevron-right-DP3xpyIA.js → chevron-right-CvIRRsqZ.js} +1 -1
  20. package/dist/{chevron-top-CuwkBUs9.js → chevron-top-RSzCqjBd.js} +1 -1
  21. package/dist/{chrome-store-zfT_aJ3R.js → chrome-store-Cs8dAgs0.js} +1 -1
  22. package/dist/{clock-DHZqivIS.js → clock-fhZO5otC.js} +1 -1
  23. package/dist/{close-Cp9rNAw4.js → close-BPuztrdR.js} +1 -1
  24. package/dist/{coinPlaceholder-U7-T1KKQ.js → coinPlaceholder-C8X2i7Kh.js} +1 -1
  25. package/dist/{compass-Ds5-PRSR.js → compass-WMc5huk0.js} +1 -1
  26. package/dist/{copy-Jg4HdIMf.js → copy-DVAeT17y.js} +1 -1
  27. package/dist/core/api.d.ts +10 -1
  28. package/dist/core/wallet.d.ts +23 -2
  29. package/dist/{cursor-DmMevduB.js → cursor-BJ4YLXfy.js} +1 -1
  30. package/dist/{cursor-transparent-Dn9-1SV8.js → cursor-transparent-DN2fLQN4.js} +1 -1
  31. package/dist/dcp-sdk.umd.js +603 -603
  32. package/dist/dcp.d.ts +11 -1
  33. package/dist/{desktop-C4udXXlZ.js → desktop-6avxisBw.js} +1 -1
  34. package/dist/{disconnect-wd1BYLxt.js → disconnect-AReVI8Gk.js} +1 -1
  35. package/dist/{discord-DthxuCAP.js → discord-CxrI30BZ.js} +1 -1
  36. package/dist/{email-B3jSnUFE.js → email-B8dIIaay.js} +24 -24
  37. package/dist/{embedded-wallet-CJHmoBI2.js → embedded-wallet-C_5hF7rM.js} +24 -24
  38. package/dist/{etherscan-Cjp4xfMW.js → etherscan-BnAy8cIF.js} +1 -1
  39. package/dist/{exclamation-triangle-CRNR5WOy.js → exclamation-triangle-Bu7nHwx9.js} +1 -1
  40. package/dist/{extension-Cydk0mZt.js → extension-F0LIhvcf.js} +1 -1
  41. package/dist/{external-link-CuPTAoq9.js → external-link-CP6phyaM.js} +1 -1
  42. package/dist/{facebook-CghqXmdf.js → facebook-BtQ-Io2y.js} +1 -1
  43. package/dist/{farcaster-BREqMX4y.js → farcaster-BmaN1ugd.js} +1 -1
  44. package/dist/{filters-Dn_Ys7ew.js → filters-DpEwoOmy.js} +1 -1
  45. package/dist/{github-C-A7JmIY.js → github-q7qO9V-b.js} +1 -1
  46. package/dist/{google-CCdM_naE.js → google-DH_ZE8bW.js} +1 -1
  47. package/dist/{hashTypedData-D2Qmzscs.js → hashTypedData-ZH9ZnWu3.js} +6 -6
  48. package/dist/{help-circle-DIH4vyj3.js → help-circle-BAQVmKas.js} +1 -1
  49. package/dist/{id-DkJ0gBuy.js → id-Cj68Zwgo.js} +1 -1
  50. package/dist/{if-defined-BciplFKz.js → if-defined-CNte9B3N.js} +89 -89
  51. package/dist/{image-qMjyiXM0.js → image-BKJDw6N-.js} +1 -1
  52. package/dist/{index-BpXOsxzU.js → index-5mp7WkhV.js} +2 -2
  53. package/dist/{index-CX60z_g2.js → index-7toZMdtG.js} +32 -32
  54. package/dist/{index-CMPIqsB1.js → index-B1uKzdvN.js} +3 -3
  55. package/dist/{index-eW8y-mXH.js → index-BHFZVF-b.js} +3 -3
  56. package/dist/{index-DiHImG4L.js → index-BJ7cbG3N.js} +12400 -11573
  57. package/dist/{index-CqVegmN4.js → index-BKwa5JSA.js} +10 -10
  58. package/dist/{index-D-IzHD_8.js → index-BP4B9VUt.js} +2 -2
  59. package/dist/{index-DmOMXRG1.js → index-BVdzXHpO.js} +11 -11
  60. package/dist/{index-B2iDt0TJ.js → index-BYND0GJ9.js} +2 -2
  61. package/dist/{index-lbhz9evJ.js → index-BaJ0zEbh.js} +2 -2
  62. package/dist/{index-B7K86vWu.js → index-BdSIrl-R.js} +38 -38
  63. package/dist/{index-C4BX3QW8.js → index-Bh0MPFwP.js} +3 -3
  64. package/dist/{index-BBkcvSiY.js → index-Bsh7_qTp.js} +53 -53
  65. package/dist/{index-DoSYqTQg.js → index-BwnXTNNg.js} +3 -3
  66. package/dist/{index-Ij6XA6_4.js → index-C0kPDbg_.js} +2 -2
  67. package/dist/{index-fxzIDZsb.js → index-CKikVKe2.js} +2 -2
  68. package/dist/{index-SzyBYfzA.js → index-CPTcEPbD.js} +1582 -1881
  69. package/dist/{index-C27dwOyE.js → index-ChVh0Hkp.js} +3 -3
  70. package/dist/{index-CwB_qRfM.js → index-Cle_NnnS.js} +6 -6
  71. package/dist/{index-CUdQyyFn.js → index-CmWdvIFT.js} +2 -2
  72. package/dist/{index-1adX-Fit.js → index-D2AMA8Bu.js} +2 -2
  73. package/dist/{index-CTYngdl0.js → index-D5r0iSq4.js} +1 -1
  74. package/dist/index-D6h-qfpt.js +276 -0
  75. package/dist/{index-CppCc1n8.js → index-DAUM8CO4.js} +2 -2
  76. package/dist/{index-DtCsAVBg.js → index-DGjZW6uR.js} +2 -2
  77. package/dist/{index-CxOF7GqE.js → index-DQe94z7X.js} +3 -3
  78. package/dist/{index-AvC0IGDl.js → index-DTo6w99t.js} +101 -101
  79. package/dist/{index-B5zkXsLJ.js → index-DYdXjap2.js} +9 -9
  80. package/dist/{index-BdjxQs66.js → index-DceCxNV5.js} +5 -5
  81. package/dist/{index-Da8oZh8H.js → index-DobBVPe4.js} +14 -14
  82. package/dist/{index-DRNiFv9I.js → index-Dy4NyE6l.js} +7 -7
  83. package/dist/{index-Bijd4_Ns.js → index-Uw9cSw0q.js} +3 -3
  84. package/dist/{index-DpHXq5_E.js → index-f3LXSfM5.js} +6 -6
  85. package/dist/{index--3Zp0jAb.js → index-qiuyrukh.js} +2 -2
  86. package/dist/{index-CuiyMA8F.js → index-zddvaohA.js} +3 -3
  87. package/dist/index.d.ts +1 -1
  88. package/dist/index.js +1 -1
  89. package/dist/{info-DMIGgjkL.js → info-RfPsmroW.js} +1 -1
  90. package/dist/{info-circle-CJuIKZSx.js → info-circle-DFKHB_ZN.js} +1 -1
  91. package/dist/{lightbulb-qFT6WEWV.js → lightbulb-B-Bykj9X.js} +1 -1
  92. package/dist/{localBatchGatewayRequest-CsMVMFBc.js → localBatchGatewayRequest-CjGcn5nM.js} +1 -1
  93. package/dist/{mail-DoYgQvOt.js → mail-mBAgGuw5.js} +1 -1
  94. package/dist/{mobile-URtsh7o-.js → mobile-Dhh3ndkf.js} +1 -1
  95. package/dist/{more-DoQd10TF.js → more-D1h7UTvg.js} +1 -1
  96. package/dist/{network-placeholder-BBA2Ue6C.js → network-placeholder-Dqynvc-t.js} +1 -1
  97. package/dist/{nftPlaceholder-C9RXWz9k.js → nftPlaceholder-Df7MW4MM.js} +1 -1
  98. package/dist/{off-YcuDQczT.js → off-BmG3cHTX.js} +1 -1
  99. package/dist/{onramp-BfqDIx4o.js → onramp-C401Aenb.js} +46 -46
  100. package/dist/{parseSignature-280HB24T.js → parseSignature-S8VEpRHC.js} +967 -1222
  101. package/dist/{play-store-sFaloG_r.js → play-store-4q1fzL_P.js} +1 -1
  102. package/dist/{plus-l0wekSht.js → plus-603Gs3yG.js} +1 -1
  103. package/dist/{qr-code-CihrUU4G.js → qr-code-Dgwhf6M1.js} +1 -1
  104. package/dist/{receive-dfY1Cu-g.js → receive-CYXbbEUR.js} +10 -10
  105. package/dist/{recycle-horizontal-nXu6YaPw.js → recycle-horizontal-Bu8zZ563.js} +1 -1
  106. package/dist/{ref-huAzXCX0.js → ref-DpmKRWBK.js} +2 -2
  107. package/dist/{refresh-D2ZbVeNC.js → refresh-BMZFu0mu.js} +1 -1
  108. package/dist/{reown-logo-BMaTMJmc.js → reown-logo-BXph7ThY.js} +1 -1
  109. package/dist/{search-YVM9q3J-.js → search-Cm_V42Y_.js} +1 -1
  110. package/dist/{secp256k1-DPQgTBwQ.js → secp256k1-C0iX1TUr.js} +19 -19
  111. package/dist/{secp256k1-BrysY3Sv.js → secp256k1-DOQBqE4Z.js} +1 -1
  112. package/dist/{send-BwQZPKxI.js → send-BSMYxDuP.js} +1 -1
  113. package/dist/{send-GyetMVu1.js → send-C8EeIzRB.js} +20 -20
  114. package/dist/{socials-B0W91J9k.js → socials-DQrHQajs.js} +15 -15
  115. package/dist/{swapHorizontal-Dy_oQEkp.js → swapHorizontal-98rnJewS.js} +1 -1
  116. package/dist/{swapHorizontalBold-C4JpaMpc.js → swapHorizontalBold-C299FjEt.js} +1 -1
  117. package/dist/{swapHorizontalMedium-D5NuVZFh.js → swapHorizontalMedium-Cqm6i4WJ.js} +1 -1
  118. package/dist/{swapHorizontalRoundedBold-Bq4P2MCj.js → swapHorizontalRoundedBold-De7hFfqZ.js} +1 -1
  119. package/dist/{swapVertical-CVQ8Mg03.js → swapVertical-DSL75l8L.js} +1 -1
  120. package/dist/{swaps-CA04SSdK.js → swaps-BuTNp65Y.js} +24 -24
  121. package/dist/{telegram-BP4SgW_L.js → telegram-cJP7hgUb.js} +1 -1
  122. package/dist/{three-dots-BJYGJ-dQ.js → three-dots-DHnEh28O.js} +1 -1
  123. package/dist/{transactions-Bq-98Tsg.js → transactions-DujFkB-M.js} +3 -3
  124. package/dist/{twitch-DTATWo9M.js → twitch-CR2iGcBo.js} +1 -1
  125. package/dist/{twitterIcon-D5UWPInb.js → twitterIcon-E5TAQjOn.js} +1 -1
  126. package/dist/types.d.ts +60 -0
  127. package/dist/ui/Modal.d.ts +3 -3
  128. package/dist/ui/index.d.ts +2 -2
  129. package/dist/{verify-Byvj8Wi1.js → verify-DEukUJp0.js} +1 -1
  130. package/dist/{verify-filled-B40taNm0.js → verify-filled-BXsx1i_p.js} +1 -1
  131. package/dist/{w3m-modal-HV6SE74G.js → w3m-modal-Bm7BqVng.js} +40 -40
  132. package/dist/{wallet-Cp-6Kk88.js → wallet-CzyyvdrT.js} +1 -1
  133. package/dist/{wallet-placeholder-C3juwA9o.js → wallet-placeholder-BrcmyGEe.js} +1 -1
  134. package/dist/{walletconnect-CRkIiLCx.js → walletconnect-BSYogWiE.js} +1 -1
  135. package/dist/{warning-circle-DtvCLwG4.js → warning-circle-Cgp2BW3m.js} +1 -1
  136. package/dist/{x-Cqyx5eCt.js → x-BJinLpTw.js} +1 -1
  137. package/package.json +1 -1
  138. package/dist/index-B2-vKLd8.js +0 -276
@@ -1,5 +1,5 @@
1
- import { a1 as p, cL as y, cq as w, bf as g, br as k, cM as L, bB as E, bi as O, aA as m, bE as x } from "./index-DiHImG4L.js";
2
- import { l as R, b as M } from "./localBatchGatewayRequest-CsMVMFBc.js";
1
+ import { a1 as p, cQ as y, cq as w, bf as g, br as k, cR as E, bB as L, bi as O, aA as m, bE as R } from "./index-BJ7cbG3N.js";
2
+ import { l as x, b as M } from "./localBatchGatewayRequest-CjGcn5nM.js";
3
3
  class q extends p {
4
4
  constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
5
5
  var o;
@@ -78,13 +78,13 @@ async function B(c, { blockNumber: r, blockTag: a, data: n, to: i }) {
78
78
  try {
79
79
  if (!k(i, t))
80
80
  throw new $({ sender: t, to: i });
81
- const u = o.includes(R) ? await M({
81
+ const u = o.includes(x) ? await M({
82
82
  data: d,
83
83
  ccipRequest: h
84
- }) : await h({ data: d, sender: t, urls: o }), { data: b } = await L(c, {
84
+ }) : await h({ data: d, sender: t, urls: o }), { data: b } = await E(c, {
85
85
  blockNumber: r,
86
86
  blockTag: a,
87
- data: E([
87
+ data: L([
88
88
  l,
89
89
  O([{ type: "bytes" }, { type: "bytes" }], [u, s])
90
90
  ]),
@@ -124,7 +124,7 @@ async function A({ data: c, sender: r, urls: a }) {
124
124
  });
125
125
  continue;
126
126
  }
127
- if (!x(e)) {
127
+ if (!R(e)) {
128
128
  n = new S({
129
129
  result: e,
130
130
  url: t
@@ -1,4 +1,4 @@
1
- import { cy as e } from "./index-DiHImG4L.js";
1
+ import { cD as e } from "./index-BJ7cbG3N.js";
2
2
  const o = e`<svg
3
3
  width="28"
4
4
  height="28"
@@ -1,4 +1,4 @@
1
- import { cy as e } from "./index-DiHImG4L.js";
1
+ import { cD as e } from "./index-BJ7cbG3N.js";
2
2
  const o = e`<svg fill="none" viewBox="0 0 14 14">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { cy as o } from "./index-DiHImG4L.js";
1
+ import { cD as o } from "./index-BJ7cbG3N.js";
2
2
  const e = o`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { cy as e } from "./index-DiHImG4L.js";
1
+ import { cD as e } from "./index-BJ7cbG3N.js";
2
2
  const o = e`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { cy as l } from "./index-DiHImG4L.js";
1
+ import { cD as l } from "./index-BJ7cbG3N.js";
2
2
  const o = l`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { cy as l } from "./index-DiHImG4L.js";
1
+ import { cD as l } from "./index-BJ7cbG3N.js";
2
2
  const e = l`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { cy as t } from "./index-DiHImG4L.js";
1
+ import { cD as t } from "./index-BJ7cbG3N.js";
2
2
  const o = t`<svg width="36" height="36" fill="none">
3
3
  <path
4
4
  fill="#fff"
@@ -1,4 +1,4 @@
1
- import { cy as C } from "./index-DiHImG4L.js";
1
+ import { cD as C } from "./index-BJ7cbG3N.js";
2
2
  const l = C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
3
3
  <path
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import { cy as l } from "./index-DiHImG4L.js";
1
+ import { cD as l } from "./index-BJ7cbG3N.js";
2
2
  const o = l`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { cy as l } from "./index-DiHImG4L.js";
1
+ import { cD as l } from "./index-BJ7cbG3N.js";
2
2
  const o = l`<svg fill="none" viewBox="0 0 20 20">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { cy as l } from "./index-DiHImG4L.js";
1
+ import { cD as l } from "./index-BJ7cbG3N.js";
2
2
  const e = l`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { cy as C } from "./index-DiHImG4L.js";
1
+ import { cD as C } from "./index-BJ7cbG3N.js";
2
2
  const o = C`<svg
3
3
  xmlns="http://www.w3.org/2000/svg"
4
4
  width="16"
@@ -1,4 +1,4 @@
1
- import type { ToolData, BackendIntentResponse } from '../types';
1
+ import type { ToolData, BackendIntentResponse, IntegrationConfig, IntegrationIntentResponse } from '../types';
2
2
  export interface SubmitPaymentRequest {
3
3
  tx_hash: string;
4
4
  chain_id: number;
@@ -26,5 +26,14 @@ export declare class API {
26
26
  createIntent(toolId: string, tokenSymbol: string): Promise<BackendIntentResponse>;
27
27
  submitPayment(request: SubmitPaymentRequest, toolId?: string): Promise<SubmitPaymentResponse>;
28
28
  getPaymentStatus(paymentId: string, toolId?: string): Promise<PaymentStatusResponse>;
29
+ fetchIntegrationConfig(integrationId: string): Promise<IntegrationConfig>;
30
+ createIntegrationIntent(integrationId: string, data: {
31
+ amount?: string | number;
32
+ amount_usd?: string;
33
+ currency: string;
34
+ chainId: number;
35
+ metadata?: Record<string, any>;
36
+ }): Promise<IntegrationIntentResponse>;
37
+ declareIntegrationTx(integrationId: string, intentId: string, txHash: string): Promise<any>;
29
38
  }
30
39
  export declare const api: API;
@@ -1,11 +1,30 @@
1
1
  import { type Config as WagmiConfig } from '@wagmi/core';
2
+ interface AccountState {
3
+ address: `0x${string}`;
4
+ chainId: number;
5
+ isConnected: boolean;
6
+ }
2
7
  export declare class WalletManager {
3
8
  private adapter;
4
9
  private kit;
5
10
  wagmiConfig: WagmiConfig | null;
11
+ private currentAccount;
12
+ private unwatchAccount;
13
+ private connectionListeners;
6
14
  init(projectId: string): void;
7
- connect(): Promise<void>;
8
- getAccount(): import("@wagmi/core").GetAccountReturnType<WagmiConfig, import("viem").Chain>;
15
+ /**
16
+ * Connect wallet via AppKit modal.
17
+ * Returns a Promise that resolves when the user actually connects
18
+ * (not just when the modal opens).
19
+ */
20
+ connect(): Promise<AccountState>;
21
+ /**
22
+ * Get current account state (reactively tracked).
23
+ */
24
+ getAccount(): AccountState;
25
+ /**
26
+ * Switch network with verification that the switch actually succeeded.
27
+ */
9
28
  switchNetwork(chainId: number): Promise<void>;
10
29
  sendTransaction(tx: any): Promise<`0x${string}`>;
11
30
  waitForReceipt(hash: `0x${string}`): Promise<{
@@ -30,5 +49,7 @@ export declare class WalletManager {
30
49
  }>;
31
50
  isConnected(): boolean;
32
51
  disconnect(): void;
52
+ destroy(): void;
33
53
  }
34
54
  export declare const walletManager: WalletManager;
55
+ export {};
@@ -1,4 +1,4 @@
1
- import { cy as o } from "./index-DiHImG4L.js";
1
+ import { cD as o } from "./index-BJ7cbG3N.js";
2
2
  const l = o` <svg fill="none" viewBox="0 0 13 4">
3
3
  <path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" />
4
4
  </svg>`;
@@ -1,4 +1,4 @@
1
- import { cy as o } from "./index-DiHImG4L.js";
1
+ import { cD as o } from "./index-BJ7cbG3N.js";
2
2
  const l = o`<svg fill="none" viewBox="0 0 14 6">
3
3
  <path style="fill: var(--wui-color-bg-150);" d="M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z" />
4
4
  <path