@coinbase/cdp-sdk 1.38.3 → 1.38.5

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 (195) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +24 -0
  3. package/_cjs/accounts/evm/toEvmServerAccount.js +0 -36
  4. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  5. package/_cjs/accounts/evm/toEvmSmartAccount.js +0 -36
  6. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  7. package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js +0 -42
  8. package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
  9. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +0 -42
  10. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  11. package/_cjs/accounts/solana/toSolanaAccount.js +0 -30
  12. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
  13. package/_cjs/actions/evm/sendUserOperation.js +2 -0
  14. package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
  15. package/_cjs/actions/solana/rpc.js +16 -0
  16. package/_cjs/actions/solana/rpc.js.map +1 -0
  17. package/_cjs/actions/solana/transfer.js +74 -48
  18. package/_cjs/actions/solana/transfer.js.map +1 -1
  19. package/_cjs/actions/solana/utils.js +4 -6
  20. package/_cjs/actions/solana/utils.js.map +1 -1
  21. package/_cjs/auth/utils/http.js +5 -2
  22. package/_cjs/auth/utils/http.js.map +1 -1
  23. package/_cjs/auth/utils/jwt.js +1 -1
  24. package/_cjs/auth/utils/jwt.js.map +1 -1
  25. package/_cjs/client/evm/evm.js +49 -0
  26. package/_cjs/client/evm/evm.js.map +1 -1
  27. package/_cjs/openapi-client/cdpApiClient.js +4 -0
  28. package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
  29. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +6 -41
  30. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  31. package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js +10 -1
  32. package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
  33. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +14 -1
  34. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  35. package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +14 -1
  36. package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +1 -1
  37. package/_cjs/openapi-client/index.js +0 -3
  38. package/_cjs/openapi-client/index.js.map +1 -1
  39. package/_cjs/version.js +1 -1
  40. package/_esm/accounts/evm/toEvmServerAccount.js +0 -36
  41. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  42. package/_esm/accounts/evm/toEvmSmartAccount.js +0 -36
  43. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  44. package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js +0 -42
  45. package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
  46. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +0 -42
  47. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  48. package/_esm/accounts/solana/toSolanaAccount.js +0 -30
  49. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
  50. package/_esm/actions/evm/sendUserOperation.js +2 -0
  51. package/_esm/actions/evm/sendUserOperation.js.map +1 -1
  52. package/_esm/actions/solana/rpc.js +13 -0
  53. package/_esm/actions/solana/rpc.js.map +1 -0
  54. package/_esm/actions/solana/transfer.js +72 -48
  55. package/_esm/actions/solana/transfer.js.map +1 -1
  56. package/_esm/actions/solana/utils.js +4 -6
  57. package/_esm/actions/solana/utils.js.map +1 -1
  58. package/_esm/auth/utils/http.js +5 -2
  59. package/_esm/auth/utils/http.js.map +1 -1
  60. package/_esm/auth/utils/jwt.js +1 -1
  61. package/_esm/auth/utils/jwt.js.map +1 -1
  62. package/_esm/client/evm/evm.js +49 -0
  63. package/_esm/client/evm/evm.js.map +1 -1
  64. package/_esm/openapi-client/cdpApiClient.js +4 -0
  65. package/_esm/openapi-client/cdpApiClient.js.map +1 -1
  66. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +5 -39
  67. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  68. package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js +8 -0
  69. package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
  70. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +12 -0
  71. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  72. package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +12 -0
  73. package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +1 -1
  74. package/_esm/openapi-client/index.js +0 -3
  75. package/_esm/openapi-client/index.js.map +1 -1
  76. package/_esm/version.js +1 -1
  77. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  78. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  79. package/_types/accounts/evm/toNetworkScopedEvmServerAccount.d.ts.map +1 -1
  80. package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
  81. package/_types/accounts/evm/types.d.ts +3 -18
  82. package/_types/accounts/evm/types.d.ts.map +1 -1
  83. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
  84. package/_types/actions/evm/sendUserOperation.d.ts +11 -0
  85. package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
  86. package/_types/actions/evm/types.d.ts +1 -66
  87. package/_types/actions/evm/types.d.ts.map +1 -1
  88. package/_types/actions/solana/rpc.d.ts +10 -0
  89. package/_types/actions/solana/rpc.d.ts.map +1 -0
  90. package/_types/actions/solana/transfer.d.ts +37 -1
  91. package/_types/actions/solana/transfer.d.ts.map +1 -1
  92. package/_types/actions/solana/types.d.ts +1 -62
  93. package/_types/actions/solana/types.d.ts.map +1 -1
  94. package/_types/actions/solana/utils.d.ts +4 -6
  95. package/_types/actions/solana/utils.d.ts.map +1 -1
  96. package/_types/auth/utils/http.d.ts.map +1 -1
  97. package/_types/client/evm/evm.d.ts +29 -2
  98. package/_types/client/evm/evm.d.ts.map +1 -1
  99. package/_types/client/evm/evm.types.d.ts +20 -2
  100. package/_types/client/evm/evm.types.d.ts.map +1 -1
  101. package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
  102. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +44 -246
  103. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  104. package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +8 -1
  105. package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
  106. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +7 -1
  107. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
  108. package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts +11 -0
  109. package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts.map +1 -1
  110. package/_types/openapi-client/index.d.ts +3 -6
  111. package/_types/openapi-client/index.d.ts.map +1 -1
  112. package/_types/types/calls.d.ts +1 -0
  113. package/_types/types/calls.d.ts.map +1 -1
  114. package/_types/version.d.ts +1 -1
  115. package/accounts/evm/toEvmServerAccount.ts +0 -47
  116. package/accounts/evm/toEvmSmartAccount.ts +0 -47
  117. package/accounts/evm/toNetworkScopedEvmServerAccount.ts +0 -50
  118. package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +0 -49
  119. package/accounts/evm/types.ts +5 -49
  120. package/accounts/solana/toSolanaAccount.ts +0 -41
  121. package/actions/evm/sendUserOperation.ts +14 -0
  122. package/actions/evm/types.ts +1 -74
  123. package/actions/solana/rpc.ts +17 -0
  124. package/actions/solana/transfer.ts +115 -84
  125. package/actions/solana/types.ts +1 -70
  126. package/actions/solana/utils.ts +4 -6
  127. package/auth/utils/http.ts +5 -2
  128. package/auth/utils/jwt.ts +1 -1
  129. package/client/evm/evm.ts +61 -0
  130. package/client/evm/evm.types.ts +23 -0
  131. package/openapi-client/cdpApiClient.ts +5 -0
  132. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +53 -289
  133. package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +14 -0
  134. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +23 -0
  135. package/openapi-client/generated/sql-api-alpha/sql-api-alpha.ts +13 -0
  136. package/openapi-client/index.ts +0 -3
  137. package/package.json +5 -6
  138. package/types/calls.ts +1 -0
  139. package/version.ts +1 -1
  140. package/_cjs/actions/Quote.js +0 -106
  141. package/_cjs/actions/Quote.js.map +0 -1
  142. package/_cjs/actions/evm/fund/fund.js +0 -50
  143. package/_cjs/actions/evm/fund/fund.js.map +0 -1
  144. package/_cjs/actions/evm/fund/quoteFund.js +0 -47
  145. package/_cjs/actions/evm/fund/quoteFund.js.map +0 -1
  146. package/_cjs/actions/solana/fund/fund.js +0 -50
  147. package/_cjs/actions/solana/fund/fund.js.map +0 -1
  148. package/_cjs/actions/solana/fund/quoteFund.js +0 -47
  149. package/_cjs/actions/solana/fund/quoteFund.js.map +0 -1
  150. package/_cjs/actions/types.js +0 -3
  151. package/_cjs/actions/types.js.map +0 -1
  152. package/_cjs/actions/waitForFundOperationReceipt.js +0 -64
  153. package/_cjs/actions/waitForFundOperationReceipt.js.map +0 -1
  154. package/_cjs/openapi-client/generated/payments-alpha/payments-alpha.js +0 -50
  155. package/_cjs/openapi-client/generated/payments-alpha/payments-alpha.js.map +0 -1
  156. package/_esm/actions/Quote.js +0 -101
  157. package/_esm/actions/Quote.js.map +0 -1
  158. package/_esm/actions/evm/fund/fund.js +0 -47
  159. package/_esm/actions/evm/fund/fund.js.map +0 -1
  160. package/_esm/actions/evm/fund/quoteFund.js +0 -44
  161. package/_esm/actions/evm/fund/quoteFund.js.map +0 -1
  162. package/_esm/actions/solana/fund/fund.js +0 -47
  163. package/_esm/actions/solana/fund/fund.js.map +0 -1
  164. package/_esm/actions/solana/fund/quoteFund.js +0 -44
  165. package/_esm/actions/solana/fund/quoteFund.js.map +0 -1
  166. package/_esm/actions/types.js +0 -2
  167. package/_esm/actions/types.js.map +0 -1
  168. package/_esm/actions/waitForFundOperationReceipt.js +0 -61
  169. package/_esm/actions/waitForFundOperationReceipt.js.map +0 -1
  170. package/_esm/openapi-client/generated/payments-alpha/payments-alpha.js +0 -42
  171. package/_esm/openapi-client/generated/payments-alpha/payments-alpha.js.map +0 -1
  172. package/_types/actions/Quote.d.ts +0 -97
  173. package/_types/actions/Quote.d.ts.map +0 -1
  174. package/_types/actions/evm/fund/fund.d.ts +0 -21
  175. package/_types/actions/evm/fund/fund.d.ts.map +0 -1
  176. package/_types/actions/evm/fund/quoteFund.d.ts +0 -22
  177. package/_types/actions/evm/fund/quoteFund.d.ts.map +0 -1
  178. package/_types/actions/solana/fund/fund.d.ts +0 -19
  179. package/_types/actions/solana/fund/fund.d.ts.map +0 -1
  180. package/_types/actions/solana/fund/quoteFund.d.ts +0 -20
  181. package/_types/actions/solana/fund/quoteFund.d.ts.map +0 -1
  182. package/_types/actions/types.d.ts +0 -37
  183. package/_types/actions/types.d.ts.map +0 -1
  184. package/_types/actions/waitForFundOperationReceipt.d.ts +0 -68
  185. package/_types/actions/waitForFundOperationReceipt.d.ts.map +0 -1
  186. package/_types/openapi-client/generated/payments-alpha/payments-alpha.d.ts +0 -42
  187. package/_types/openapi-client/generated/payments-alpha/payments-alpha.d.ts.map +0 -1
  188. package/actions/Quote.ts +0 -154
  189. package/actions/evm/fund/fund.ts +0 -73
  190. package/actions/evm/fund/quoteFund.ts +0 -79
  191. package/actions/solana/fund/fund.ts +0 -71
  192. package/actions/solana/fund/quoteFund.ts +0 -77
  193. package/actions/types.ts +0 -39
  194. package/actions/waitForFundOperationReceipt.ts +0 -118
  195. package/openapi-client/generated/payments-alpha/payments-alpha.ts +0 -96
@@ -1,44 +0,0 @@
1
- import { formatUnits } from "viem";
2
- import { UserInputValidationError } from "../../../errors.js";
3
- import { CreatePaymentTransferQuoteBodySourceType, CreatePaymentTransferQuoteBodyTargetType, } from "../../../openapi-client/index.js";
4
- import { SolanaQuote } from "../../Quote.js";
5
- /**
6
- * Gets a quote to fund a Solana account.
7
- *
8
- * @param apiClient - The API client.
9
- * @param options - The options for getting a quote to fund a Solana account.
10
- *
11
- * @returns A promise that resolves to the quote.
12
- */
13
- export async function quoteFund(apiClient, options) {
14
- if (options.token !== "sol" && options.token !== "usdc") {
15
- throw new UserInputValidationError("Invalid token, must be sol or usdc");
16
- }
17
- const decimals = options.token === "sol" ? 9 : 6;
18
- const amount = formatUnits(options.amount, decimals);
19
- const paymentMethods = await apiClient.getPaymentMethods();
20
- const cardPaymentMethod = paymentMethods.find(method => method.type === "card" && method.actions.includes("source"));
21
- if (!cardPaymentMethod) {
22
- throw new Error("No card found to fund account");
23
- }
24
- const response = await apiClient.createPaymentTransferQuote({
25
- sourceType: CreatePaymentTransferQuoteBodySourceType.payment_method,
26
- source: {
27
- id: cardPaymentMethod.id,
28
- },
29
- targetType: CreatePaymentTransferQuoteBodyTargetType.crypto_rail,
30
- target: {
31
- currency: options.token,
32
- network: "solana",
33
- address: options.address,
34
- },
35
- amount,
36
- currency: options.token,
37
- });
38
- return new SolanaQuote(apiClient, response.transfer.id, "solana", response.transfer.sourceAmount, response.transfer.sourceCurrency, response.transfer.targetAmount, response.transfer.targetCurrency, response.transfer.fees.map(fee => ({
39
- type: fee.type,
40
- amount: fee.amount,
41
- currency: fee.currency,
42
- })));
43
- }
44
- //# sourceMappingURL=quoteFund.js.map
@@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,EAAE;SACzB;QACD,UAAU,EAAE,wCAAwC,CAAC,WAAW;QAChE,MAAM,EAAE;YACN,QAAQ,EAAE,OAAO,CAAC,KAAK;YACvB,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB;QACD,MAAM;QACN,QAAQ,EAAE,OAAO,CAAC,KAAK;KACxB,CAAC,CAAC;IAEH,OAAO,IAAI,WAAW,CACpB,SAAS,EACT,QAAQ,CAAC,QAAQ,CAAC,EAAE,EACpB,QAAQ,EACR,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAC9B,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAChC,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAC9B,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAChC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACjC,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;KACvB,CAAC,CAAC,CACJ,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../actions/types.ts"],"names":[],"mappings":""}
@@ -1,61 +0,0 @@
1
- import { TransferStatus } from "../openapi-client/index.js";
2
- import { wait } from "../utils/wait.js";
3
- /**
4
- * Waits for a fund operation to complete or fail.
5
- *
6
- * @example
7
- * ```ts
8
- * import { waitForFundOperation } from "@coinbase/cdp-sdk";
9
- *
10
- * const result = await waitForFundOperation(client, {
11
- * transferId: "0x1234567890123456789012345678901234567890",
12
- * waitOptions: {
13
- * timeoutSeconds: 30,
14
- * },
15
- * });
16
- * ```
17
- *
18
- * @param {CdpOpenApiClientType} client - The client to use to wait for the fund operation.
19
- * @param {WaitForFundOperationOptions} options - The options for the wait operation.
20
- * @returns {Promise<WaitForFundOperationResult>} The result of the fund operation.
21
- */
22
- export async function waitForFundOperationReceipt(client, options) {
23
- const { transferId } = options;
24
- const reload = async () => {
25
- const response = await client.getPaymentTransfer(transferId);
26
- return response;
27
- };
28
- const transform = (operation) => {
29
- if (operation.status === TransferStatus.failed) {
30
- return {
31
- id: operation.id,
32
- network: operation.target.network,
33
- targetAmount: operation.targetAmount,
34
- targetCurrency: operation.targetCurrency,
35
- status: operation.status,
36
- };
37
- }
38
- else if (operation.status === TransferStatus.completed) {
39
- return {
40
- id: operation.id,
41
- network: operation.target.network,
42
- targetAmount: operation.targetAmount,
43
- targetCurrency: operation.targetCurrency,
44
- status: operation.status,
45
- transactionHash: operation.transactionHash,
46
- };
47
- }
48
- else {
49
- throw new Error("Transfer is not terminal");
50
- }
51
- };
52
- const waitOptions = options.waitOptions || {
53
- timeoutSeconds: 900,
54
- intervalSeconds: 1,
55
- };
56
- return await wait(reload, isTerminal, transform, waitOptions);
57
- }
58
- const isTerminal = (operation) => {
59
- return (operation.status === TransferStatus.completed || operation.status === TransferStatus.failed);
60
- };
61
- //# sourceMappingURL=waitForFundOperationReceipt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waitForFundOperationReceipt.js","sourceRoot":"","sources":["../../actions/waitForFundOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,IAAI,EAAe,MAAM,kBAAkB,CAAC;AAmDrD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAA4B,EAC5B,OAAoC;IAEpC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAE/B,MAAM,MAAM,GAAG,KAAK,IAAI,EAAE;QACxB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAC7D,OAAO,QAAQ,CAAC;IACl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Client.js";
2
- /**
3
- * Gets the fiat payment methods that can be used to send funds or receive funds. This is the list of payment methods configured for your account.
4
- * @summary Get the fiat payment methods
5
- */
6
- export const getPaymentMethods = (options) => {
7
- return cdpApiClient({ url: `/v2/payments/rails/payment-methods`, method: "GET" }, options);
8
- };
9
- /**
10
- * Gets the crypto rails that can be used to send funds or receive funds.
11
- * @summary Get the crypto rails
12
- */
13
- export const getCryptoRails = (params, options) => {
14
- return cdpApiClient({ url: `/v2/payments/rails/crypto`, method: "GET", params }, options);
15
- };
16
- /**
17
- * Creates a new transfer quote, which can then be executed using the Execute a transfer quote endpoint. If you want to automatically execute the transfer without needing to confirm, specify execute as true.
18
- * @summary Create a transfer quote
19
- */
20
- export const createPaymentTransferQuote = (createPaymentTransferQuoteBody, options) => {
21
- return cdpApiClient({
22
- url: `/v2/payments/transfers`,
23
- method: "POST",
24
- headers: { "Content-Type": "application/json" },
25
- data: createPaymentTransferQuoteBody,
26
- }, options);
27
- };
28
- /**
29
- * Executes a transfer quote which was created using the Create a transfer quote endpoint.
30
- * @summary Execute a transfer quote
31
- */
32
- export const executePaymentTransferQuote = (transferId, options) => {
33
- return cdpApiClient({ url: `/v2/payments/transfers/${transferId}/execute`, method: "POST" }, options);
34
- };
35
- /**
36
- * Gets a transfer by ID.
37
- * @summary Get a transfer by ID
38
- */
39
- export const getPaymentTransfer = (transferId, options) => {
40
- return cdpApiClient({ url: `/v2/payments/transfers/${transferId}`, method: "GET" }, options);
41
- };
42
- //# sourceMappingURL=payments-alpha.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payments-alpha.js","sourceRoot":"","sources":["../../../../openapi-client/generated/payments-alpha/payments-alpha.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAA8C,EAAE,EAAE;IAClF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,oCAAoC,EAAE,MAAM,EAAE,KAAK,EAAE,EAC5D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,MAA6B,EAC7B,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,2BAA2B,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAC3D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,8BAA8D,EAC9D,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,wBAAwB;QAC7B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,8BAA8B;KACrC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,UAAkB,EAClB,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,0BAA0B,UAAU,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,EACvE,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,UAAkB,EAClB,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,0BAA0B,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAC9D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -1,97 +0,0 @@
1
- import { FundOperationResult } from "./types.js";
2
- import { CdpOpenApiClientType } from "../openapi-client/index.js";
3
- /**
4
- * Base class representing a funding quote that can be executed.
5
- */
6
- declare abstract class BaseQuote {
7
- /** Quote for the transfer. */
8
- quoteId: string;
9
- /** The amount in fiat currency. */
10
- fiatAmount: string;
11
- /** The fiat currency. */
12
- fiatCurrency: string;
13
- /** The amount in the token to transfer. */
14
- tokenAmount: string;
15
- /** The token to transfer. */
16
- token: string;
17
- /** Fees in the token to transfer. */
18
- fees: {
19
- /** The type of fee. */
20
- type: "exchange_fee" | "network_fee";
21
- amount: string;
22
- currency: string;
23
- }[];
24
- protected apiClient: CdpOpenApiClientType;
25
- /**
26
- * Creates a new BaseQuote instance.
27
- *
28
- * @param apiClient - The API client.
29
- * @param quoteId - The quote ID.
30
- * @param fiatAmount - The amount in fiat currency.
31
- * @param fiatCurrency - The fiat currency.
32
- * @param tokenAmount - The amount in the token to transfer.
33
- * @param token - The token to transfer.
34
- * @param fees - Fees for the transfer.
35
- */
36
- constructor(apiClient: CdpOpenApiClientType, quoteId: string, fiatAmount: string, fiatCurrency: string, tokenAmount: string, token: string, fees: {
37
- type: "exchange_fee" | "network_fee";
38
- amount: string;
39
- currency: string;
40
- }[]);
41
- /**
42
- * Executes the quote to perform the actual fund transfer.
43
- *
44
- * @returns A promise that resolves to the result of the executed quote.
45
- */
46
- execute(): Promise<FundOperationResult>;
47
- }
48
- /**
49
- * A class representing an EVM funding quote that can be executed.
50
- */
51
- export declare class EvmQuote extends BaseQuote {
52
- /** Network to transfer the funds to (EVM networks). */
53
- network: "base" | "ethereum";
54
- /**
55
- * Creates a new EvmQuote instance.
56
- *
57
- * @param apiClient - The API client.
58
- * @param quoteId - The quote ID.
59
- * @param network - The EVM network to transfer funds to.
60
- * @param fiatAmount - The amount in fiat currency.
61
- * @param fiatCurrency - The fiat currency.
62
- * @param tokenAmount - The amount in the token to transfer.
63
- * @param token - The token to transfer.
64
- * @param fees - Fees for the transfer.
65
- */
66
- constructor(apiClient: CdpOpenApiClientType, quoteId: string, network: "base" | "ethereum", fiatAmount: string, fiatCurrency: string, tokenAmount: string, token: string, fees: {
67
- type: "exchange_fee" | "network_fee";
68
- amount: string;
69
- currency: string;
70
- }[]);
71
- }
72
- /**
73
- * A class representing a Solana funding quote that can be executed.
74
- */
75
- export declare class SolanaQuote extends BaseQuote {
76
- /** Network to transfer the funds to (Solana). */
77
- network: "solana";
78
- /**
79
- * Creates a new SolanaQuote instance.
80
- *
81
- * @param apiClient - The API client.
82
- * @param quoteId - The quote ID.
83
- * @param network - The Solana network to transfer funds to.
84
- * @param fiatAmount - The amount in fiat currency.
85
- * @param fiatCurrency - The fiat currency.
86
- * @param tokenAmount - The amount in the token to transfer.
87
- * @param token - The token to transfer.
88
- * @param fees - Fees for the transfer.
89
- */
90
- constructor(apiClient: CdpOpenApiClientType, quoteId: string, network: "solana", fiatAmount: string, fiatCurrency: string, tokenAmount: string, token: string, fees: {
91
- type: "exchange_fee" | "network_fee";
92
- amount: string;
93
- currency: string;
94
- }[]);
95
- }
96
- export {};
97
- //# sourceMappingURL=Quote.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Quote.d.ts","sourceRoot":"","sources":["../../actions/Quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE;;GAEG;AACH,uBAAe,SAAS;IACtB,8BAA8B;IACvB,OAAO,EAAE,MAAM,CAAC;IACvB,mCAAmC;IAC5B,UAAU,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IAClB,YAAY,EAAE,MAAM,CAAC;IAC5B,2CAA2C;IACpC,WAAW,EAAE,MAAM,CAAC;IAC3B,6BAA6B;IACtB,KAAK,EAAE,MAAM,CAAC;IACrB,qCAAqC;IAC9B,IAAI,EAAE;QACX,uBAAuB;QACvB,IAAI,EAAE,cAAc,GAAG,aAAa,CAAC;QACrC,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,EAAE,CAAC;IAEJ,SAAS,CAAC,SAAS,EAAE,oBAAoB,CAAC;IAE1C;;;;;;;;;;OAUG;gBAED,SAAS,EAAE,oBAAoB,EAC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../../openapi-client/index.js";
2
- import { BaseFundOptions, FundOperationResult } from "../../types.js";
3
- /**
4
- * Options for funding an EVM account.
5
- */
6
- export interface EvmFundOptions extends BaseFundOptions {
7
- /** The network to request funds from. */
8
- network: "base" | "ethereum";
9
- /** The token to request funds for. */
10
- token: "eth" | "usdc";
11
- }
12
- /**
13
- * Funds an EVM account.
14
- *
15
- * @param apiClient - The API client.
16
- * @param options - The options for funding an EVM account.
17
- *
18
- * @returns A promise that resolves to the fund operation result.
19
- */
20
- export declare function fund(apiClient: CdpOpenApiClientType, options: EvmFundOptions): Promise<FundOperationResult>;
21
- //# sourceMappingURL=fund.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fund.d.ts","sourceRoot":"","sources":["../../../../actions/evm/fund/fund.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,yCAAyC;IACzC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,sCAAsC;IACtC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,IAAI,CACxB,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,mBAAmB,CAAC,CAyC9B"}
@@ -1,22 +0,0 @@
1
- import { type CdpOpenApiClientType } from "../../../openapi-client/index.js";
2
- import { EvmQuote } from "../../Quote.js";
3
- import { BaseQuoteFundOptions } from "../../types.js";
4
- /**
5
- * Options for getting a quote to fund an EVM account.
6
- */
7
- export interface EvmQuoteFundOptions extends BaseQuoteFundOptions {
8
- /** The network to request funds from. */
9
- network: "base" | "ethereum";
10
- /** The token to request funds for. */
11
- token: "eth" | "usdc";
12
- }
13
- /**
14
- * Gets a quote to fund an EVM account.
15
- *
16
- * @param apiClient - The API client.
17
- * @param options - The options for getting a quote to fund an EVM account.
18
- *
19
- * @returns A promise that resolves to the quote.
20
- */
21
- export declare function quoteFund(apiClient: CdpOpenApiClientType, options: EvmQuoteFundOptions): Promise<EvmQuote>;
22
- //# sourceMappingURL=quoteFund.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quoteFund.d.ts","sourceRoot":"","sources":["../../../../actions/evm/fund/quoteFund.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,yCAAyC;IACzC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,sCAAsC;IACtC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,QAAQ,CAAC,CA8CnB"}
@@ -1,19 +0,0 @@
1
- import { type CdpOpenApiClientType } from "../../../openapi-client/index.js";
2
- import { BaseFundOptions, FundOperationResult } from "../../types.js";
3
- /**
4
- * Options for funding a Solana account.
5
- */
6
- export interface SolanaFundOptions extends BaseFundOptions {
7
- /** The token to request funds for. */
8
- token: "sol" | "usdc";
9
- }
10
- /**
11
- * Funds a Solana account.
12
- *
13
- * @param apiClient - The API client.
14
- * @param options - The options for funding a Solana account.
15
- *
16
- * @returns A promise that resolves to the fund operation result.
17
- */
18
- export declare function fund(apiClient: CdpOpenApiClientType, options: SolanaFundOptions): Promise<FundOperationResult>;
19
- //# sourceMappingURL=fund.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fund.d.ts","sourceRoot":"","sources":["../../../../actions/solana/fund/fund.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,sCAAsC;IACtC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,IAAI,CACxB,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,mBAAmB,CAAC,CAyC9B"}
@@ -1,20 +0,0 @@
1
- import { CdpOpenApiClientType } from "../../../openapi-client/index.js";
2
- import { SolanaQuote } from "../../Quote.js";
3
- import { BaseQuoteFundOptions } from "../../types.js";
4
- /**
5
- * Options for getting a quote to fund a Solana account.
6
- */
7
- export interface SolanaQuoteFundOptions extends BaseQuoteFundOptions {
8
- /** The token to request funds for. */
9
- token: "sol" | "usdc";
10
- }
11
- /**
12
- * Gets a quote to fund a Solana account.
13
- *
14
- * @param apiClient - The API client.
15
- * @param options - The options for getting a quote to fund a Solana account.
16
- *
17
- * @returns A promise that resolves to the quote.
18
- */
19
- export declare function quoteFund(apiClient: CdpOpenApiClientType, options: SolanaQuoteFundOptions): Promise<SolanaQuote>;
20
- //# sourceMappingURL=quoteFund.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quoteFund.d.ts","sourceRoot":"","sources":["../../../../actions/solana/fund/quoteFund.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAGrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE,sCAAsC;IACtC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,WAAW,CAAC,CA8CtB"}
@@ -1,37 +0,0 @@
1
- import { TransferStatus } from "../openapi-client/index.js";
2
- /**
3
- * Base options for getting a quote to fund an account.
4
- */
5
- export interface BaseQuoteFundOptions {
6
- /** The address of the account. */
7
- address: string;
8
- /** The amount to fund the account with, in atomic units (e.g. wei for ETH, lamports for SOL) of the token. */
9
- amount: bigint;
10
- }
11
- /**
12
- * Base options for funding an account.
13
- */
14
- export interface BaseFundOptions {
15
- /** The address of the account. */
16
- address: string;
17
- /** The amount to fund the account with, in atomic units (e.g. wei for ETH, lamports for SOL) of the token. */
18
- amount: bigint;
19
- }
20
- /**
21
- * The result of a fund operation.
22
- */
23
- export type FundOperationResult = {
24
- /** The transfer that was created to fund the account. */
25
- id: string;
26
- /** The network that the transfer was created on. */
27
- network: string;
28
- /** The target amount that will be received. */
29
- targetAmount: string;
30
- /** The currency that will be received. */
31
- targetCurrency: string;
32
- /** The status of the fund operation. */
33
- status: TransferStatus;
34
- /** The transaction hash of the transfer. */
35
- transactionHash?: string;
36
- };
37
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,8GAA8G;IAC9G,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,8GAA8G;IAC9G,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,MAAM,EAAE,cAAc,CAAC;IACvB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
@@ -1,68 +0,0 @@
1
- import { CdpOpenApiClientType, TransferStatus } from "../openapi-client/index.js";
2
- import { WaitOptions } from "../utils/wait.js";
3
- /**
4
- * Options for waiting for a fund operation.
5
- */
6
- export type WaitForFundOperationOptions = {
7
- /** The ID of the transfer to wait for. */
8
- transferId: string;
9
- /** Optional options for the wait operation. */
10
- waitOptions?: WaitOptions;
11
- };
12
- /**
13
- * Represents a failed fund operation.
14
- */
15
- export type FailedFundOperation = {
16
- /** The ID of the transfer. */
17
- id: string;
18
- /** The network that the transfer was created on. */
19
- network: string;
20
- /** The target amount that will be received. */
21
- targetAmount: string;
22
- /** The currency that will be received. */
23
- targetCurrency: string;
24
- /** The status of the transfer. */
25
- status: typeof TransferStatus.failed;
26
- };
27
- /**
28
- * Represents a completed fund operation.
29
- */
30
- export type CompletedFundOperation = {
31
- /** The ID of the transfer. */
32
- id: string;
33
- /** The network that the transfer was created on. */
34
- network: string;
35
- /** The target amount that will be received. */
36
- targetAmount: string;
37
- /** The currency that will be received. */
38
- targetCurrency: string;
39
- /** The status of the transfer. */
40
- status: typeof TransferStatus.completed;
41
- /** The transaction hash of the transfer. */
42
- transactionHash: string;
43
- };
44
- /**
45
- * Represents the return type of the waitForFundOperation function.
46
- */
47
- export type WaitForFundOperationResult = FailedFundOperation | CompletedFundOperation;
48
- /**
49
- * Waits for a fund operation to complete or fail.
50
- *
51
- * @example
52
- * ```ts
53
- * import { waitForFundOperation } from "@coinbase/cdp-sdk";
54
- *
55
- * const result = await waitForFundOperation(client, {
56
- * transferId: "0x1234567890123456789012345678901234567890",
57
- * waitOptions: {
58
- * timeoutSeconds: 30,
59
- * },
60
- * });
61
- * ```
62
- *
63
- * @param {CdpOpenApiClientType} client - The client to use to wait for the fund operation.
64
- * @param {WaitForFundOperationOptions} options - The options for the wait operation.
65
- * @returns {Promise<WaitForFundOperationResult>} The result of the fund operation.
66
- */
67
- export declare function waitForFundOperationReceipt(client: CdpOpenApiClientType, options: WaitForFundOperationOptions): Promise<WaitForFundOperationResult>;
68
- //# sourceMappingURL=waitForFundOperationReceipt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waitForFundOperationReceipt.d.ts","sourceRoot":"","sources":["../../actions/waitForFundOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAY,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAQ,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,kCAAkC;IAClC,MAAM,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC;CACtC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,kCAAkC;IAClC,MAAM,EAAE,OAAO,cAAc,CAAC,SAAS,CAAC;IACxC,4CAA4C;IAC5C,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AAEtF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CAqCrC"}
@@ -1,42 +0,0 @@
1
- /**
2
- * Generated by orval v7.6.0 🍺
3
- * Do not edit manually.
4
- * Coinbase Developer Platform APIs
5
- * The Coinbase Developer Platform APIs - leading the world's transition onchain.
6
- * OpenAPI spec version: 2.0.0
7
- */
8
- import type { CreatePaymentTransferQuote201, CreatePaymentTransferQuoteBody, CryptoRail, GetCryptoRailsParams, PaymentMethod, Transfer } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
9
- import { cdpApiClient } from "../../cdpApiClient.js";
10
- type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
11
- /**
12
- * Gets the fiat payment methods that can be used to send funds or receive funds. This is the list of payment methods configured for your account.
13
- * @summary Get the fiat payment methods
14
- */
15
- export declare const getPaymentMethods: (options?: SecondParameter<typeof cdpApiClient>) => Promise<PaymentMethod[]>;
16
- /**
17
- * Gets the crypto rails that can be used to send funds or receive funds.
18
- * @summary Get the crypto rails
19
- */
20
- export declare const getCryptoRails: (params?: GetCryptoRailsParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<CryptoRail[]>;
21
- /**
22
- * Creates a new transfer quote, which can then be executed using the Execute a transfer quote endpoint. If you want to automatically execute the transfer without needing to confirm, specify execute as true.
23
- * @summary Create a transfer quote
24
- */
25
- export declare const createPaymentTransferQuote: (createPaymentTransferQuoteBody: CreatePaymentTransferQuoteBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<CreatePaymentTransferQuote201>;
26
- /**
27
- * Executes a transfer quote which was created using the Create a transfer quote endpoint.
28
- * @summary Execute a transfer quote
29
- */
30
- export declare const executePaymentTransferQuote: (transferId: string, options?: SecondParameter<typeof cdpApiClient>) => Promise<Transfer>;
31
- /**
32
- * Gets a transfer by ID.
33
- * @summary Get a transfer by ID
34
- */
35
- export declare const getPaymentTransfer: (transferId: string, options?: SecondParameter<typeof cdpApiClient>) => Promise<Transfer>;
36
- export type GetPaymentMethodsResult = NonNullable<Awaited<ReturnType<typeof getPaymentMethods>>>;
37
- export type GetCryptoRailsResult = NonNullable<Awaited<ReturnType<typeof getCryptoRails>>>;
38
- export type CreatePaymentTransferQuoteResult = NonNullable<Awaited<ReturnType<typeof createPaymentTransferQuote>>>;
39
- export type ExecutePaymentTransferQuoteResult = NonNullable<Awaited<ReturnType<typeof executePaymentTransferQuote>>>;
40
- export type GetPaymentTransferResult = NonNullable<Awaited<ReturnType<typeof getPaymentTransfer>>>;
41
- export {};
42
- //# sourceMappingURL=payments-alpha.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payments-alpha.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/payments-alpha/payments-alpha.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,QAAQ,EACT,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,eAAe,CAAC,OAAO,YAAY,CAA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