@coinbase/cdp-sdk 1.38.4 → 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.
- package/CHANGELOG.md +7 -0
- package/README.md +24 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js +0 -36
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +0 -36
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js +0 -42
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +0 -42
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/solana/toSolanaAccount.js +0 -30
- package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_cjs/actions/evm/sendUserOperation.js +2 -0
- package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
- package/_cjs/auth/utils/http.js +5 -2
- package/_cjs/auth/utils/http.js.map +1 -1
- package/_cjs/auth/utils/jwt.js +1 -1
- package/_cjs/auth/utils/jwt.js.map +1 -1
- package/_cjs/client/evm/evm.js +49 -0
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/openapi-client/cdpApiClient.js +4 -0
- package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +6 -41
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js +10 -1
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +14 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +14 -1
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +1 -1
- package/_cjs/openapi-client/index.js +0 -3
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js +0 -36
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +0 -36
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js +0 -42
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +0 -42
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/solana/toSolanaAccount.js +0 -30
- package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_esm/actions/evm/sendUserOperation.js +2 -0
- package/_esm/actions/evm/sendUserOperation.js.map +1 -1
- package/_esm/auth/utils/http.js +5 -2
- package/_esm/auth/utils/http.js.map +1 -1
- package/_esm/auth/utils/jwt.js +1 -1
- package/_esm/auth/utils/jwt.js.map +1 -1
- package/_esm/client/evm/evm.js +49 -0
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/openapi-client/cdpApiClient.js +4 -0
- package/_esm/openapi-client/cdpApiClient.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +5 -39
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js +8 -0
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +12 -0
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +12 -0
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +1 -1
- package/_esm/openapi-client/index.js +0 -3
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toNetworkScopedEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/types.d.ts +3 -18
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
- package/_types/actions/evm/sendUserOperation.d.ts +11 -0
- package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
- package/_types/actions/evm/types.d.ts +1 -66
- package/_types/actions/evm/types.d.ts.map +1 -1
- package/_types/actions/solana/types.d.ts +1 -62
- package/_types/actions/solana/types.d.ts.map +1 -1
- package/_types/auth/utils/http.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts +29 -2
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +20 -2
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +44 -246
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +8 -1
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +7 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts +11 -0
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +3 -6
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/types/calls.d.ts +1 -0
- package/_types/types/calls.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/toEvmServerAccount.ts +0 -47
- package/accounts/evm/toEvmSmartAccount.ts +0 -47
- package/accounts/evm/toNetworkScopedEvmServerAccount.ts +0 -50
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +0 -49
- package/accounts/evm/types.ts +5 -49
- package/accounts/solana/toSolanaAccount.ts +0 -41
- package/actions/evm/sendUserOperation.ts +14 -0
- package/actions/evm/types.ts +1 -74
- package/actions/solana/types.ts +1 -70
- package/auth/utils/http.ts +5 -2
- package/auth/utils/jwt.ts +1 -1
- package/client/evm/evm.ts +61 -0
- package/client/evm/evm.types.ts +23 -0
- package/openapi-client/cdpApiClient.ts +5 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +53 -289
- package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +14 -0
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +23 -0
- package/openapi-client/generated/sql-api-alpha/sql-api-alpha.ts +13 -0
- package/openapi-client/index.ts +0 -3
- package/package.json +1 -1
- package/types/calls.ts +1 -0
- package/version.ts +1 -1
- package/_cjs/actions/Quote.js +0 -106
- package/_cjs/actions/Quote.js.map +0 -1
- package/_cjs/actions/evm/fund/fund.js +0 -51
- package/_cjs/actions/evm/fund/fund.js.map +0 -1
- package/_cjs/actions/evm/fund/quoteFund.js +0 -48
- package/_cjs/actions/evm/fund/quoteFund.js.map +0 -1
- package/_cjs/actions/solana/fund/fund.js +0 -51
- package/_cjs/actions/solana/fund/fund.js.map +0 -1
- package/_cjs/actions/solana/fund/quoteFund.js +0 -48
- package/_cjs/actions/solana/fund/quoteFund.js.map +0 -1
- package/_cjs/actions/types.js +0 -3
- package/_cjs/actions/types.js.map +0 -1
- package/_cjs/actions/waitForFundOperationReceipt.js +0 -65
- package/_cjs/actions/waitForFundOperationReceipt.js.map +0 -1
- package/_cjs/openapi-client/generated/payments-alpha/payments-alpha.js +0 -50
- package/_cjs/openapi-client/generated/payments-alpha/payments-alpha.js.map +0 -1
- package/_esm/actions/Quote.js +0 -101
- package/_esm/actions/Quote.js.map +0 -1
- package/_esm/actions/evm/fund/fund.js +0 -48
- package/_esm/actions/evm/fund/fund.js.map +0 -1
- package/_esm/actions/evm/fund/quoteFund.js +0 -45
- package/_esm/actions/evm/fund/quoteFund.js.map +0 -1
- package/_esm/actions/solana/fund/fund.js +0 -48
- package/_esm/actions/solana/fund/fund.js.map +0 -1
- package/_esm/actions/solana/fund/quoteFund.js +0 -45
- package/_esm/actions/solana/fund/quoteFund.js.map +0 -1
- package/_esm/actions/types.js +0 -2
- package/_esm/actions/types.js.map +0 -1
- package/_esm/actions/waitForFundOperationReceipt.js +0 -62
- package/_esm/actions/waitForFundOperationReceipt.js.map +0 -1
- package/_esm/openapi-client/generated/payments-alpha/payments-alpha.js +0 -42
- package/_esm/openapi-client/generated/payments-alpha/payments-alpha.js.map +0 -1
- package/_types/actions/Quote.d.ts +0 -97
- package/_types/actions/Quote.d.ts.map +0 -1
- package/_types/actions/evm/fund/fund.d.ts +0 -22
- package/_types/actions/evm/fund/fund.d.ts.map +0 -1
- package/_types/actions/evm/fund/quoteFund.d.ts +0 -23
- package/_types/actions/evm/fund/quoteFund.d.ts.map +0 -1
- package/_types/actions/solana/fund/fund.d.ts +0 -20
- package/_types/actions/solana/fund/fund.d.ts.map +0 -1
- package/_types/actions/solana/fund/quoteFund.d.ts +0 -21
- package/_types/actions/solana/fund/quoteFund.d.ts.map +0 -1
- package/_types/actions/types.d.ts +0 -37
- package/_types/actions/types.d.ts.map +0 -1
- package/_types/actions/waitForFundOperationReceipt.d.ts +0 -69
- package/_types/actions/waitForFundOperationReceipt.d.ts.map +0 -1
- package/_types/openapi-client/generated/payments-alpha/payments-alpha.d.ts +0 -42
- package/_types/openapi-client/generated/payments-alpha/payments-alpha.d.ts.map +0 -1
- package/actions/Quote.ts +0 -154
- package/actions/evm/fund/fund.ts +0 -74
- package/actions/evm/fund/quoteFund.ts +0 -80
- package/actions/solana/fund/fund.ts +0 -72
- package/actions/solana/fund/quoteFund.ts +0 -78
- package/actions/types.ts +0 -39
- package/actions/waitForFundOperationReceipt.ts +0 -119
- package/openapi-client/generated/payments-alpha/payments-alpha.ts +0 -96
|
@@ -1,96 +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 {
|
|
9
|
-
CreatePaymentTransferQuote201,
|
|
10
|
-
CreatePaymentTransferQuoteBody,
|
|
11
|
-
CryptoRail,
|
|
12
|
-
GetCryptoRailsParams,
|
|
13
|
-
PaymentMethod,
|
|
14
|
-
Transfer,
|
|
15
|
-
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
16
|
-
|
|
17
|
-
import { cdpApiClient } from "../../cdpApiClient.js";
|
|
18
|
-
|
|
19
|
-
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 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.
|
|
23
|
-
* @summary Get the fiat payment methods
|
|
24
|
-
*/
|
|
25
|
-
export const getPaymentMethods = (options?: SecondParameter<typeof cdpApiClient>) => {
|
|
26
|
-
return cdpApiClient<PaymentMethod[]>(
|
|
27
|
-
{ url: `/v2/payments/rails/payment-methods`, method: "GET" },
|
|
28
|
-
options,
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Gets the crypto rails that can be used to send funds or receive funds.
|
|
33
|
-
* @summary Get the crypto rails
|
|
34
|
-
*/
|
|
35
|
-
export const getCryptoRails = (
|
|
36
|
-
params?: GetCryptoRailsParams,
|
|
37
|
-
options?: SecondParameter<typeof cdpApiClient>,
|
|
38
|
-
) => {
|
|
39
|
-
return cdpApiClient<CryptoRail[]>(
|
|
40
|
-
{ url: `/v2/payments/rails/crypto`, method: "GET", params },
|
|
41
|
-
options,
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* 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.
|
|
46
|
-
* @summary Create a transfer quote
|
|
47
|
-
*/
|
|
48
|
-
export const createPaymentTransferQuote = (
|
|
49
|
-
createPaymentTransferQuoteBody: CreatePaymentTransferQuoteBody,
|
|
50
|
-
options?: SecondParameter<typeof cdpApiClient>,
|
|
51
|
-
) => {
|
|
52
|
-
return cdpApiClient<CreatePaymentTransferQuote201>(
|
|
53
|
-
{
|
|
54
|
-
url: `/v2/payments/transfers`,
|
|
55
|
-
method: "POST",
|
|
56
|
-
headers: { "Content-Type": "application/json" },
|
|
57
|
-
data: createPaymentTransferQuoteBody,
|
|
58
|
-
},
|
|
59
|
-
options,
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Executes a transfer quote which was created using the Create a transfer quote endpoint.
|
|
64
|
-
* @summary Execute a transfer quote
|
|
65
|
-
*/
|
|
66
|
-
export const executePaymentTransferQuote = (
|
|
67
|
-
transferId: string,
|
|
68
|
-
options?: SecondParameter<typeof cdpApiClient>,
|
|
69
|
-
) => {
|
|
70
|
-
return cdpApiClient<Transfer>(
|
|
71
|
-
{ url: `/v2/payments/transfers/${transferId}/execute`, method: "POST" },
|
|
72
|
-
options,
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Gets a transfer by ID.
|
|
77
|
-
* @summary Get a transfer by ID
|
|
78
|
-
*/
|
|
79
|
-
export const getPaymentTransfer = (
|
|
80
|
-
transferId: string,
|
|
81
|
-
options?: SecondParameter<typeof cdpApiClient>,
|
|
82
|
-
) => {
|
|
83
|
-
return cdpApiClient<Transfer>(
|
|
84
|
-
{ url: `/v2/payments/transfers/${transferId}`, method: "GET" },
|
|
85
|
-
options,
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
export type GetPaymentMethodsResult = NonNullable<Awaited<ReturnType<typeof getPaymentMethods>>>;
|
|
89
|
-
export type GetCryptoRailsResult = NonNullable<Awaited<ReturnType<typeof getCryptoRails>>>;
|
|
90
|
-
export type CreatePaymentTransferQuoteResult = NonNullable<
|
|
91
|
-
Awaited<ReturnType<typeof createPaymentTransferQuote>>
|
|
92
|
-
>;
|
|
93
|
-
export type ExecutePaymentTransferQuoteResult = NonNullable<
|
|
94
|
-
Awaited<ReturnType<typeof executePaymentTransferQuote>>
|
|
95
|
-
>;
|
|
96
|
-
export type GetPaymentTransferResult = NonNullable<Awaited<ReturnType<typeof getPaymentTransfer>>>;
|