@directcryptopay/sdk 0.1.0 → 0.2.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 (137) hide show
  1. package/README.md +202 -256
  2. package/dist/{add-KF4m4jFK.js → add-DuP4WhxV.js} +1 -1
  3. package/dist/{all-wallets-D6NAjQgX.js → all-wallets-5JBV4CZN.js} +1 -1
  4. package/dist/{app-store-D7TTn-EO.js → app-store-C_iLeXrh.js} +1 -1
  5. package/dist/{apple-DjX2E2hE.js → apple-BXgQe_w8.js} +1 -1
  6. package/dist/{arrow-bottom-C0YrNJYB.js → arrow-bottom-B4Vsa9wq.js} +1 -1
  7. package/dist/{arrow-bottom-circle-Dlxvx_XG.js → arrow-bottom-circle-C1QSwRIp.js} +1 -1
  8. package/dist/{arrow-left-x8_-lUyK.js → arrow-left-pxwCvXD9.js} +1 -1
  9. package/dist/{arrow-right-BTZybj80.js → arrow-right-B8Av1oDN.js} +1 -1
  10. package/dist/{arrow-top-LzH7iLCp.js → arrow-top-DbPtAeXG.js} +1 -1
  11. package/dist/{bank-23jp-IV_.js → bank-De2PNeXL.js} +1 -1
  12. package/dist/{browser-EjoorDid.js → browser-Ds4DBQOP.js} +1 -1
  13. package/dist/{card-DGgWwtwC.js → card-BcxTMuEn.js} +1 -1
  14. package/dist/{ccip-BMANewTU.js → ccip-B4sn4c5Q.js} +2 -2
  15. package/dist/{checkmark-B1qcQhBo.js → checkmark-Cvkmx-sx.js} +1 -1
  16. package/dist/{checkmark-bold-Cyc4IEEJ.js → checkmark-bold-JHvEtJRZ.js} +1 -1
  17. package/dist/{chevron-bottom-ClHs08rB.js → chevron-bottom-lAad_zie.js} +1 -1
  18. package/dist/{chevron-left-O8h_551_.js → chevron-left-Ck9W-Hsf.js} +1 -1
  19. package/dist/{chevron-right-DP3xpyIA.js → chevron-right-DsNh648f.js} +1 -1
  20. package/dist/{chevron-top-CuwkBUs9.js → chevron-top-L90lwzG3.js} +1 -1
  21. package/dist/{chrome-store-zfT_aJ3R.js → chrome-store-DsXX7iqA.js} +1 -1
  22. package/dist/{clock-DHZqivIS.js → clock-DeilmpSa.js} +1 -1
  23. package/dist/{close-Cp9rNAw4.js → close-D4gsZqfR.js} +1 -1
  24. package/dist/{coinPlaceholder-U7-T1KKQ.js → coinPlaceholder-B0Kg8woL.js} +1 -1
  25. package/dist/{compass-Ds5-PRSR.js → compass-BDc1Htlg.js} +1 -1
  26. package/dist/{copy-Jg4HdIMf.js → copy-Ddroiv6f.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-DIunlIJp.js} +1 -1
  30. package/dist/{cursor-transparent-Dn9-1SV8.js → cursor-transparent-CXfl0bNj.js} +1 -1
  31. package/dist/dcp-sdk.umd.js +478 -478
  32. package/dist/dcp.d.ts +11 -1
  33. package/dist/{desktop-C4udXXlZ.js → desktop-CDp5ghZ6.js} +1 -1
  34. package/dist/{disconnect-wd1BYLxt.js → disconnect-DUI9ddIg.js} +1 -1
  35. package/dist/{discord-DthxuCAP.js → discord-D_apxuxu.js} +1 -1
  36. package/dist/{email-B3jSnUFE.js → email-DCvzZXYk.js} +8 -8
  37. package/dist/{embedded-wallet-CJHmoBI2.js → embedded-wallet-CHAaqj_k.js} +11 -11
  38. package/dist/{etherscan-Cjp4xfMW.js → etherscan-BYrw6lJt.js} +1 -1
  39. package/dist/{exclamation-triangle-CRNR5WOy.js → exclamation-triangle-C31EobMQ.js} +1 -1
  40. package/dist/{extension-Cydk0mZt.js → extension-CchWONzJ.js} +1 -1
  41. package/dist/{external-link-CuPTAoq9.js → external-link-CebHOeWd.js} +1 -1
  42. package/dist/{facebook-CghqXmdf.js → facebook-CD3lppZ5.js} +1 -1
  43. package/dist/{farcaster-BREqMX4y.js → farcaster-lZUkqUmB.js} +1 -1
  44. package/dist/{filters-Dn_Ys7ew.js → filters-D3KWfhyO.js} +1 -1
  45. package/dist/{github-C-A7JmIY.js → github-Cvv_sOWq.js} +1 -1
  46. package/dist/{google-CCdM_naE.js → google-DoFICkCj.js} +1 -1
  47. package/dist/{hashTypedData-D2Qmzscs.js → hashTypedData-BHHGGXNO.js} +1 -1
  48. package/dist/{help-circle-DIH4vyj3.js → help-circle-CiSClrc6.js} +1 -1
  49. package/dist/{id-DkJ0gBuy.js → id-mmauIL1Q.js} +1 -1
  50. package/dist/{if-defined-BciplFKz.js → if-defined-B9A-SuEH.js} +78 -78
  51. package/dist/{image-qMjyiXM0.js → image-CPddwR98.js} +1 -1
  52. package/dist/{index-Da8oZh8H.js → index--wY2C4T3.js} +10 -10
  53. package/dist/{index-B2-vKLd8.js → index-0UuJZssH.js} +5 -5
  54. package/dist/{index-CTYngdl0.js → index-1E6II94R.js} +1 -1
  55. package/dist/{index-BdjxQs66.js → index-5QBTZwil.js} +5 -5
  56. package/dist/{index-Ij6XA6_4.js → index-8MHsCmjw.js} +2 -2
  57. package/dist/{index-DmOMXRG1.js → index-B-EQbBE1.js} +2 -2
  58. package/dist/{index-BpXOsxzU.js → index-B7MBnU8U.js} +2 -2
  59. package/dist/{index-AvC0IGDl.js → index-B8WZTprM.js} +28 -28
  60. package/dist/{index-eW8y-mXH.js → index-BGf41hyR.js} +3 -3
  61. package/dist/{index-D-IzHD_8.js → index-BR3OZ5tY.js} +2 -2
  62. package/dist/{index-B2iDt0TJ.js → index-BZlEkYh1.js} +2 -2
  63. package/dist/{index-B5zkXsLJ.js → index-BbwmpqkC.js} +4 -4
  64. package/dist/{index-fxzIDZsb.js → index-BflWdkJX.js} +2 -2
  65. package/dist/{index-B7K86vWu.js → index-Bm_umjg-.js} +3 -3
  66. package/dist/{index-BBkcvSiY.js → index-BwZg5eKW.js} +3 -3
  67. package/dist/{index-CwB_qRfM.js → index-BziWxDLL.js} +3 -3
  68. package/dist/{index-DRNiFv9I.js → index-C21v4yzv.js} +5 -5
  69. package/dist/{index-C27dwOyE.js → index-CKt3c7vP.js} +3 -3
  70. package/dist/{index-CqVegmN4.js → index-CcxAAnYa.js} +6 -6
  71. package/dist/{index-lbhz9evJ.js → index-ChHzzHKf.js} +2 -2
  72. package/dist/{index-CuiyMA8F.js → index-CqJkW7ok.js} +3 -3
  73. package/dist/{index-CUdQyyFn.js → index-DPQg2zed.js} +2 -2
  74. package/dist/{index--3Zp0jAb.js → index-DQvOQPAe.js} +2 -2
  75. package/dist/{index-C4BX3QW8.js → index-DVrXX4wp.js} +3 -3
  76. package/dist/{index-Bijd4_Ns.js → index-Da-qfVsI.js} +3 -3
  77. package/dist/{index-CxOF7GqE.js → index-DiGq7Twa.js} +3 -3
  78. package/dist/{index-CppCc1n8.js → index-Dn2u8IZ4.js} +2 -2
  79. package/dist/{index-CMPIqsB1.js → index-Dz5Y9DG0.js} +3 -3
  80. package/dist/{index-DoSYqTQg.js → index-K-vs5VBY.js} +3 -3
  81. package/dist/{index-DtCsAVBg.js → index-K3CyIFHA.js} +2 -2
  82. package/dist/{index-DpHXq5_E.js → index-Qo-WDoO6.js} +2 -2
  83. package/dist/{index-CX60z_g2.js → index-UdoiPkDs.js} +4 -4
  84. package/dist/{index-DiHImG4L.js → index-ZbZVGyW9.js} +9678 -9430
  85. package/dist/{index-1adX-Fit.js → index-lUi7mcYP.js} +2 -2
  86. package/dist/{index-SzyBYfzA.js → index-ypbesXfX.js} +5 -5
  87. package/dist/index.d.ts +1 -1
  88. package/dist/index.js +1 -1
  89. package/dist/{info-DMIGgjkL.js → info-DUUpq3A8.js} +1 -1
  90. package/dist/{info-circle-CJuIKZSx.js → info-circle-71ComNpv.js} +1 -1
  91. package/dist/{lightbulb-qFT6WEWV.js → lightbulb-Dn8yehyg.js} +1 -1
  92. package/dist/{localBatchGatewayRequest-CsMVMFBc.js → localBatchGatewayRequest-22JZkkT_.js} +1 -1
  93. package/dist/{mail-DoYgQvOt.js → mail-CsDptbSx.js} +1 -1
  94. package/dist/{mobile-URtsh7o-.js → mobile-CPJuZx44.js} +1 -1
  95. package/dist/{more-DoQd10TF.js → more-BOYxX2nP.js} +1 -1
  96. package/dist/{network-placeholder-BBA2Ue6C.js → network-placeholder-VYjYxNG4.js} +1 -1
  97. package/dist/{nftPlaceholder-C9RXWz9k.js → nftPlaceholder-CG0quU6c.js} +1 -1
  98. package/dist/{off-YcuDQczT.js → off-Bx28ns6u.js} +1 -1
  99. package/dist/{onramp-BfqDIx4o.js → onramp-BBC60CcF.js} +13 -13
  100. package/dist/{parseSignature-280HB24T.js → parseSignature-8IN1QgOo.js} +4 -4
  101. package/dist/{play-store-sFaloG_r.js → play-store-CNp25d_w.js} +1 -1
  102. package/dist/{plus-l0wekSht.js → plus-CQaRn4R3.js} +1 -1
  103. package/dist/{qr-code-CihrUU4G.js → qr-code-QBtVvbvs.js} +1 -1
  104. package/dist/{receive-dfY1Cu-g.js → receive-DXWRBTEQ.js} +5 -5
  105. package/dist/{recycle-horizontal-nXu6YaPw.js → recycle-horizontal-CpnSrRdg.js} +1 -1
  106. package/dist/{ref-huAzXCX0.js → ref-C6IIbwxq.js} +2 -2
  107. package/dist/{refresh-D2ZbVeNC.js → refresh-DY_Dx78p.js} +1 -1
  108. package/dist/{reown-logo-BMaTMJmc.js → reown-logo-DVm_TEc7.js} +1 -1
  109. package/dist/{search-YVM9q3J-.js → search-ClJskXVW.js} +1 -1
  110. package/dist/{secp256k1-DPQgTBwQ.js → secp256k1-CQ19DtRL.js} +1 -1
  111. package/dist/{secp256k1-BrysY3Sv.js → secp256k1-X5XIlSn6.js} +1 -1
  112. package/dist/{send-GyetMVu1.js → send-P3r6OIjm.js} +11 -11
  113. package/dist/{send-BwQZPKxI.js → send-TqSroVbV.js} +1 -1
  114. package/dist/{socials-B0W91J9k.js → socials-4JUgml5Z.js} +10 -10
  115. package/dist/{swapHorizontal-Dy_oQEkp.js → swapHorizontal-8KilA_OC.js} +1 -1
  116. package/dist/{swapHorizontalBold-C4JpaMpc.js → swapHorizontalBold-Bl9gJ64j.js} +1 -1
  117. package/dist/{swapHorizontalMedium-D5NuVZFh.js → swapHorizontalMedium-DDyLmVwC.js} +1 -1
  118. package/dist/{swapHorizontalRoundedBold-Bq4P2MCj.js → swapHorizontalRoundedBold-6ZYHYdUX.js} +1 -1
  119. package/dist/{swapVertical-CVQ8Mg03.js → swapVertical-BRgBuh_B.js} +1 -1
  120. package/dist/{swaps-CA04SSdK.js → swaps-CxJvguLy.js} +9 -9
  121. package/dist/{telegram-BP4SgW_L.js → telegram-OC2IKNlW.js} +1 -1
  122. package/dist/{three-dots-BJYGJ-dQ.js → three-dots-CYzCkBQ2.js} +1 -1
  123. package/dist/{transactions-Bq-98Tsg.js → transactions-CwFjYgL1.js} +3 -3
  124. package/dist/{twitch-DTATWo9M.js → twitch-CDW38k5a.js} +1 -1
  125. package/dist/{twitterIcon-D5UWPInb.js → twitterIcon-D6-ODkwM.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-VZiPZ9WI.js} +1 -1
  130. package/dist/{verify-filled-B40taNm0.js → verify-filled-BpF4F1jG.js} +1 -1
  131. package/dist/{w3m-modal-HV6SE74G.js → w3m-modal-DZu8ry9r.js} +9 -9
  132. package/dist/{wallet-Cp-6Kk88.js → wallet-CvQjQVxz.js} +1 -1
  133. package/dist/{wallet-placeholder-C3juwA9o.js → wallet-placeholder-B1BHI_2j.js} +1 -1
  134. package/dist/{walletconnect-CRkIiLCx.js → walletconnect-Cnjk-qmM.js} +1 -1
  135. package/dist/{warning-circle-DtvCLwG4.js → warning-circle-DvWTcM8j.js} +1 -1
  136. package/dist/{x-Cqyx5eCt.js → x-BCQWBooq.js} +1 -1
  137. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { cy as o } from "./index-DiHImG4L.js";
1
+ import { cy as o } from "./index-ZbZVGyW9.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 { cy as e } from "./index-ZbZVGyW9.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 { cy as l } from "./index-ZbZVGyW9.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 { cy as l } from "./index-ZbZVGyW9.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 { cy as t } from "./index-ZbZVGyW9.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 { cy as C } from "./index-ZbZVGyW9.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 { cy as l } from "./index-ZbZVGyW9.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 { cy as l } from "./index-ZbZVGyW9.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 { cy as l } from "./index-ZbZVGyW9.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 { cy as C } from "./index-ZbZVGyW9.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 { cy as o } from "./index-ZbZVGyW9.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 { cy as o } from "./index-ZbZVGyW9.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