@coinbase/cdp-sdk 1.44.1 → 1.46.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.
- package/CHANGELOG.md +28 -2
- package/README.md +164 -43
- package/_cjs/accounts/evm/eip6492.js +49 -0
- package/_cjs/accounts/evm/eip6492.js.map +1 -0
- package/_cjs/accounts/evm/toEvmDelegatedAccount.js +27 -0
- package/_cjs/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js +127 -55
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +115 -45
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +31 -0
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/solana/toSolanaAccount.js +49 -19
- package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js +37 -0
- package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
- package/_cjs/actions/solana/transfer.js.map +1 -1
- package/_cjs/actions/solana/utils.js +9 -9
- package/_cjs/actions/solana/utils.js.map +1 -1
- package/_cjs/analytics.js +10 -228
- package/_cjs/analytics.js.map +1 -1
- package/_cjs/auth/utils/http.js +1 -0
- package/_cjs/auth/utils/http.js.map +1 -1
- package/_cjs/client/cdp.js +4 -7
- package/_cjs/client/cdp.js.map +1 -1
- package/_cjs/client/end-user/endUser.js +385 -4
- package/_cjs/client/end-user/endUser.js.map +1 -1
- package/_cjs/client/end-user/toEndUserAccount.js +201 -23
- package/_cjs/client/end-user/toEndUserAccount.js.map +1 -1
- package/_cjs/client/evm/evm.js +482 -227
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/client/policies/policies.js +41 -11
- package/_cjs/client/policies/policies.js.map +1 -1
- package/_cjs/client/solana/solana.js +215 -118
- package/_cjs/client/solana/solana.js.map +1 -1
- package/_cjs/index.js +3 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/cdpApiClient.js +32 -0
- package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +178 -9
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js +261 -0
- package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +1 -0
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +30 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
- package/_cjs/openapi-client/generated/faucets/faucets.js +6 -5
- package/_cjs/openapi-client/generated/faucets/faucets.js.map +1 -1
- package/_cjs/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js +15 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
- package/_cjs/openapi-client/generated/sql-api/sql-api.js +75 -0
- package/_cjs/openapi-client/generated/sql-api/sql-api.js.map +1 -0
- package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -1
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
- package/_cjs/openapi-client/index.js +4 -1
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/policies/evmSchema.js +127 -1
- package/_cjs/policies/evmSchema.js.map +1 -1
- package/_cjs/policies/solanaSchema.js +102 -1
- package/_cjs/policies/solanaSchema.js.map +1 -1
- package/_cjs/policies/types.js +7 -0
- package/_cjs/policies/types.js.map +1 -1
- package/_cjs/utils/export.js +6 -5
- package/_cjs/utils/export.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/eip6492.js +46 -0
- package/_esm/accounts/evm/eip6492.js.map +1 -0
- package/_esm/accounts/evm/toEvmDelegatedAccount.js +24 -0
- package/_esm/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
- package/_esm/accounts/evm/toEvmServerAccount.js +127 -55
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +115 -45
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +31 -0
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/solana/toSolanaAccount.js +49 -19
- package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js +34 -0
- package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
- package/_esm/actions/solana/transfer.js.map +1 -1
- package/_esm/actions/solana/utils.js +9 -9
- package/_esm/actions/solana/utils.js.map +1 -1
- package/_esm/analytics.js +9 -227
- package/_esm/analytics.js.map +1 -1
- package/_esm/auth/utils/http.js +1 -0
- package/_esm/auth/utils/http.js.map +1 -1
- package/_esm/client/cdp.js +4 -7
- package/_esm/client/cdp.js.map +1 -1
- package/_esm/client/end-user/endUser.js +385 -4
- package/_esm/client/end-user/endUser.js.map +1 -1
- package/_esm/client/end-user/toEndUserAccount.js +201 -23
- package/_esm/client/end-user/toEndUserAccount.js.map +1 -1
- package/_esm/client/evm/evm.js +482 -227
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/client/policies/policies.js +41 -11
- package/_esm/client/policies/policies.js.map +1 -1
- package/_esm/client/solana/solana.js +215 -118
- package/_esm/client/solana/solana.js.map +1 -1
- package/_esm/index.js +1 -0
- package/_esm/index.js.map +1 -1
- package/_esm/openapi-client/cdpApiClient.js +32 -0
- package/_esm/openapi-client/cdpApiClient.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +175 -7
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js +243 -0
- package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +1 -0
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +27 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
- package/_esm/openapi-client/generated/faucets/faucets.js +6 -5
- package/_esm/openapi-client/generated/faucets/faucets.js.map +1 -1
- package/_esm/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
- package/_esm/openapi-client/generated/onramp/onramp.js +13 -0
- package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_esm/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
- package/_esm/openapi-client/generated/sql-api/sql-api.js +70 -0
- package/_esm/openapi-client/generated/sql-api/sql-api.js.map +1 -0
- package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -1
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
- package/_esm/openapi-client/index.js +4 -1
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/policies/evmSchema.js +126 -0
- package/_esm/policies/evmSchema.js.map +1 -1
- package/_esm/policies/solanaSchema.js +101 -0
- package/_esm/policies/solanaSchema.js.map +1 -1
- package/_esm/policies/types.js +9 -2
- package/_esm/policies/types.js.map +1 -1
- package/_esm/utils/export.js +6 -5
- package/_esm/utils/export.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/eip6492.d.ts +17 -0
- package/_types/accounts/evm/eip6492.d.ts.map +1 -0
- package/_types/accounts/evm/toEvmDelegatedAccount.d.ts +13 -0
- package/_types/accounts/evm/toEvmDelegatedAccount.d.ts.map +1 -0
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts +4 -4
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/types.d.ts +3 -2
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
- package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts +32 -0
- package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts.map +1 -0
- package/_types/actions/solana/transfer.d.ts +3 -4
- package/_types/actions/solana/transfer.d.ts.map +1 -1
- package/_types/actions/solana/types.d.ts +79 -29
- package/_types/actions/solana/types.d.ts.map +1 -1
- package/_types/actions/solana/utils.d.ts +10 -9
- package/_types/actions/solana/utils.d.ts.map +1 -1
- package/_types/analytics.d.ts +5 -38
- package/_types/analytics.d.ts.map +1 -1
- package/_types/auth/utils/http.d.ts.map +1 -1
- package/_types/client/cdp.d.ts +4 -0
- package/_types/client/cdp.d.ts.map +1 -1
- package/_types/client/end-user/endUser.d.ts +272 -1
- package/_types/client/end-user/endUser.d.ts.map +1 -1
- package/_types/client/end-user/endUser.types.d.ts +491 -1
- package/_types/client/end-user/endUser.types.d.ts.map +1 -1
- package/_types/client/end-user/toEndUserAccount.d.ts +4 -1
- package/_types/client/end-user/toEndUserAccount.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts +54 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +29 -2
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/client/policies/policies.d.ts.map +1 -1
- package/_types/client/solana/solana.d.ts +38 -12
- package/_types/client/solana/solana.d.ts.map +1 -1
- package/_types/index.d.ts +3 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +884 -90
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts +163 -0
- package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts.map +1 -0
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +9 -9
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +35 -15
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +14 -14
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts +3 -3
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts +2 -2
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -1
- package/_types/openapi-client/generated/faucets/faucets.d.ts +9 -8
- package/_types/openapi-client/generated/faucets/faucets.d.ts.map +1 -1
- package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts +3 -3
- package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts.map +1 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts +12 -5
- package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts +6 -6
- package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts +12 -12
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts +2 -2
- package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts.map +1 -1
- package/_types/openapi-client/generated/sql-api/sql-api.d.ts +73 -0
- package/_types/openapi-client/generated/sql-api/sql-api.d.ts.map +1 -0
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts +6 -6
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -1
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts +4 -4
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +23 -3
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/evmSchema.d.ts +3128 -1064
- package/_types/policies/evmSchema.d.ts.map +1 -1
- package/_types/policies/solanaSchema.d.ts +1411 -47
- package/_types/policies/solanaSchema.d.ts.map +1 -1
- package/_types/policies/types.d.ts +8427 -2942
- package/_types/policies/types.d.ts.map +1 -1
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/utils/export.d.ts +1 -1
- package/_types/utils/export.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/eip6492.ts +60 -0
- package/accounts/evm/toEvmDelegatedAccount.ts +26 -0
- package/accounts/evm/toEvmServerAccount.ts +115 -67
- package/accounts/evm/toEvmSmartAccount.ts +114 -57
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +44 -5
- package/accounts/evm/types.ts +8 -3
- package/accounts/solana/toSolanaAccount.ts +44 -24
- package/actions/evm/waitForEvmEip7702DelegationStatus.ts +57 -0
- package/actions/solana/transfer.ts +3 -3
- package/actions/solana/types.ts +79 -29
- package/actions/solana/utils.ts +13 -11
- package/analytics.ts +8 -294
- package/auth/utils/http.ts +1 -0
- package/client/cdp.ts +6 -8
- package/client/end-user/endUser.ts +513 -4
- package/client/end-user/endUser.types.ts +598 -0
- package/client/end-user/toEndUserAccount.ts +330 -26
- package/client/evm/evm.ts +517 -282
- package/client/evm/evm.types.ts +45 -2
- package/client/policies/policies.ts +41 -16
- package/client/solana/solana.ts +233 -153
- package/index.ts +36 -1
- package/openapi-client/cdpApiClient.ts +34 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +1155 -172
- package/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.ts +455 -0
- package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +12 -9
- package/openapi-client/generated/evm-accounts/evm-accounts.ts +66 -14
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +16 -16
- package/openapi-client/generated/evm-swaps/evm-swaps.ts +3 -3
- package/openapi-client/generated/evm-token-balances/evm-token-balances.ts +2 -2
- package/openapi-client/generated/faucets/faucets.ts +9 -8
- package/openapi-client/generated/onchain-data/onchain-data.ts +3 -3
- package/openapi-client/generated/onramp/onramp.ts +28 -4
- package/openapi-client/generated/policy-engine/policy-engine.ts +12 -6
- package/openapi-client/generated/solana-accounts/solana-accounts.ts +12 -12
- package/openapi-client/generated/solana-token-balances/solana-token-balances.ts +2 -2
- package/openapi-client/generated/sql-api/sql-api.ts +92 -0
- package/openapi-client/generated/webhooks/webhooks.ts +6 -6
- package/openapi-client/generated/x402-facilitator/x402-facilitator.ts +6 -4
- package/openapi-client/index.ts +4 -1
- package/package.json +7 -8
- package/policies/evmSchema.ts +164 -0
- package/policies/solanaSchema.ts +130 -0
- package/policies/types.ts +14 -0
- package/types/contract.ts +2 -4
- package/utils/export.ts +6 -5
- package/version.ts +1 -1
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +0 -55
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +0 -1
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +0 -50
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +0 -1
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts +0 -53
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts.map +0 -1
- package/openapi-client/generated/sql-api-alpha/sql-api-alpha.ts +0 -72
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type {
|
|
9
9
|
CreateEvmAccountBody,
|
|
10
|
+
CreateEvmEip7702Delegation201,
|
|
11
|
+
CreateEvmEip7702DelegationBody,
|
|
10
12
|
EIP712Message,
|
|
11
13
|
EvmAccount,
|
|
14
|
+
EvmEip7702DelegationOperation,
|
|
12
15
|
ExportEvmAccount200,
|
|
13
16
|
ExportEvmAccountBody,
|
|
14
17
|
ExportEvmAccountByName200,
|
|
@@ -39,7 +42,7 @@ The response is paginated, and by default, returns 20 accounts per page.
|
|
|
39
42
|
*/
|
|
40
43
|
export const listEvmAccounts = (
|
|
41
44
|
params?: ListEvmAccountsParams,
|
|
42
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
45
|
+
options?: SecondParameter<typeof cdpApiClient<ListEvmAccounts200>>,
|
|
43
46
|
) => {
|
|
44
47
|
return cdpApiClient<ListEvmAccounts200>(
|
|
45
48
|
{ url: `/v2/evm/accounts`, method: "GET", params },
|
|
@@ -52,7 +55,7 @@ export const listEvmAccounts = (
|
|
|
52
55
|
*/
|
|
53
56
|
export const createEvmAccount = (
|
|
54
57
|
createEvmAccountBody?: CreateEvmAccountBody,
|
|
55
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
58
|
+
options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
|
|
56
59
|
) => {
|
|
57
60
|
return cdpApiClient<EvmAccount>(
|
|
58
61
|
{
|
|
@@ -68,7 +71,10 @@ export const createEvmAccount = (
|
|
|
68
71
|
* Gets an EVM account by its address.
|
|
69
72
|
* @summary Get an EVM account by address
|
|
70
73
|
*/
|
|
71
|
-
export const getEvmAccount = (
|
|
74
|
+
export const getEvmAccount = (
|
|
75
|
+
address: string,
|
|
76
|
+
options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
|
|
77
|
+
) => {
|
|
72
78
|
return cdpApiClient<EvmAccount>({ url: `/v2/evm/accounts/${address}`, method: "GET" }, options);
|
|
73
79
|
};
|
|
74
80
|
/**
|
|
@@ -78,7 +84,7 @@ export const getEvmAccount = (address: string, options?: SecondParameter<typeof
|
|
|
78
84
|
export const updateEvmAccount = (
|
|
79
85
|
address: string,
|
|
80
86
|
updateEvmAccountBody: UpdateEvmAccountBody,
|
|
81
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
87
|
+
options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
|
|
82
88
|
) => {
|
|
83
89
|
return cdpApiClient<EvmAccount>(
|
|
84
90
|
{
|
|
@@ -96,7 +102,7 @@ export const updateEvmAccount = (
|
|
|
96
102
|
*/
|
|
97
103
|
export const getEvmAccountByName = (
|
|
98
104
|
name: string,
|
|
99
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
105
|
+
options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
|
|
100
106
|
) => {
|
|
101
107
|
return cdpApiClient<EvmAccount>(
|
|
102
108
|
{ url: `/v2/evm/accounts/by-name/${name}`, method: "GET" },
|
|
@@ -135,7 +141,7 @@ The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com
|
|
|
135
141
|
export const sendEvmTransaction = (
|
|
136
142
|
address: string,
|
|
137
143
|
sendEvmTransactionBody: SendEvmTransactionBody,
|
|
138
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
144
|
+
options?: SecondParameter<typeof cdpApiClient<SendEvmTransaction200>>,
|
|
139
145
|
) => {
|
|
140
146
|
return cdpApiClient<SendEvmTransaction200>(
|
|
141
147
|
{
|
|
@@ -157,7 +163,7 @@ The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com
|
|
|
157
163
|
export const signEvmTransaction = (
|
|
158
164
|
address: string,
|
|
159
165
|
signEvmTransactionBody: SignEvmTransactionBody,
|
|
160
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
166
|
+
options?: SecondParameter<typeof cdpApiClient<SignEvmTransaction200>>,
|
|
161
167
|
) => {
|
|
162
168
|
return cdpApiClient<SignEvmTransaction200>(
|
|
163
169
|
{
|
|
@@ -176,7 +182,7 @@ export const signEvmTransaction = (
|
|
|
176
182
|
export const signEvmHash = (
|
|
177
183
|
address: string,
|
|
178
184
|
signEvmHashBody: SignEvmHashBody,
|
|
179
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
185
|
+
options?: SecondParameter<typeof cdpApiClient<SignEvmHash200>>,
|
|
180
186
|
) => {
|
|
181
187
|
return cdpApiClient<SignEvmHash200>(
|
|
182
188
|
{
|
|
@@ -197,7 +203,7 @@ Per the specification, the message in the request body is prepended with `0x19 <
|
|
|
197
203
|
export const signEvmMessage = (
|
|
198
204
|
address: string,
|
|
199
205
|
signEvmMessageBody: SignEvmMessageBody,
|
|
200
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
206
|
+
options?: SecondParameter<typeof cdpApiClient<SignEvmMessage200>>,
|
|
201
207
|
) => {
|
|
202
208
|
return cdpApiClient<SignEvmMessage200>(
|
|
203
209
|
{
|
|
@@ -216,7 +222,7 @@ export const signEvmMessage = (
|
|
|
216
222
|
export const signEvmTypedData = (
|
|
217
223
|
address: string,
|
|
218
224
|
eIP712Message: EIP712Message,
|
|
219
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
225
|
+
options?: SecondParameter<typeof cdpApiClient<SignEvmTypedData200>>,
|
|
220
226
|
) => {
|
|
221
227
|
return cdpApiClient<SignEvmTypedData200>(
|
|
222
228
|
{
|
|
@@ -228,13 +234,53 @@ export const signEvmTypedData = (
|
|
|
228
234
|
options,
|
|
229
235
|
);
|
|
230
236
|
};
|
|
237
|
+
/**
|
|
238
|
+
* Creates an EIP-7702 delegation for an EVM EOA account, upgrading it with smart account capabilities.
|
|
239
|
+
|
|
240
|
+
This endpoint:
|
|
241
|
+
- Retrieves delegation artifacts from onchain
|
|
242
|
+
- Signs the EIP-7702 authorization for delegation
|
|
243
|
+
- Assembles and submits a Type 4 transaction
|
|
244
|
+
- Creates an associated smart account object
|
|
245
|
+
|
|
246
|
+
The delegation allows the EVM EOA to be used as a smart account, which enables batched transactions and gas sponsorship via paymaster.
|
|
247
|
+
* @summary Create EIP-7702 delegation
|
|
248
|
+
*/
|
|
249
|
+
export const createEvmEip7702Delegation = (
|
|
250
|
+
address: string,
|
|
251
|
+
createEvmEip7702DelegationBody: CreateEvmEip7702DelegationBody,
|
|
252
|
+
options?: SecondParameter<typeof cdpApiClient<CreateEvmEip7702Delegation201>>,
|
|
253
|
+
) => {
|
|
254
|
+
return cdpApiClient<CreateEvmEip7702Delegation201>(
|
|
255
|
+
{
|
|
256
|
+
url: `/v2/evm/accounts/${address}/eip7702/delegation`,
|
|
257
|
+
method: "POST",
|
|
258
|
+
headers: { "Content-Type": "application/json" },
|
|
259
|
+
data: createEvmEip7702DelegationBody,
|
|
260
|
+
},
|
|
261
|
+
options,
|
|
262
|
+
);
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* Returns the EIP-7702 delegation operation. Use the delegationOperationId returned by the Create EIP-7702 delegation endpoint to poll for operation completion.
|
|
266
|
+
* @summary Get EIP-7702 delegation operation for an operationID
|
|
267
|
+
*/
|
|
268
|
+
export const getEvmEip7702DelegationOperationById = (
|
|
269
|
+
delegationOperationId: string,
|
|
270
|
+
options?: SecondParameter<typeof cdpApiClient<EvmEip7702DelegationOperation>>,
|
|
271
|
+
) => {
|
|
272
|
+
return cdpApiClient<EvmEip7702DelegationOperation>(
|
|
273
|
+
{ url: `/v2/evm/eip7702/delegation-operations/${delegationOperationId}`, method: "GET" },
|
|
274
|
+
options,
|
|
275
|
+
);
|
|
276
|
+
};
|
|
231
277
|
/**
|
|
232
278
|
* Import an existing EVM account into the developer's CDP Project. This API should be called from the [CDP SDK](https://github.com/coinbase/cdp-sdk) to ensure that the associated private key is properly encrypted.
|
|
233
279
|
* @summary Import an EVM account
|
|
234
280
|
*/
|
|
235
281
|
export const importEvmAccount = (
|
|
236
282
|
importEvmAccountBody: ImportEvmAccountBody,
|
|
237
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
283
|
+
options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
|
|
238
284
|
) => {
|
|
239
285
|
return cdpApiClient<EvmAccount>(
|
|
240
286
|
{
|
|
@@ -253,7 +299,7 @@ export const importEvmAccount = (
|
|
|
253
299
|
export const exportEvmAccount = (
|
|
254
300
|
address: string,
|
|
255
301
|
exportEvmAccountBody: ExportEvmAccountBody,
|
|
256
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
302
|
+
options?: SecondParameter<typeof cdpApiClient<ExportEvmAccount200>>,
|
|
257
303
|
) => {
|
|
258
304
|
return cdpApiClient<ExportEvmAccount200>(
|
|
259
305
|
{
|
|
@@ -272,7 +318,7 @@ export const exportEvmAccount = (
|
|
|
272
318
|
export const exportEvmAccountByName = (
|
|
273
319
|
name: string,
|
|
274
320
|
exportEvmAccountByNameBody: ExportEvmAccountByNameBody,
|
|
275
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
321
|
+
options?: SecondParameter<typeof cdpApiClient<ExportEvmAccountByName200>>,
|
|
276
322
|
) => {
|
|
277
323
|
return cdpApiClient<ExportEvmAccountByName200>(
|
|
278
324
|
{
|
|
@@ -296,6 +342,12 @@ export type SignEvmTransactionResult = NonNullable<Awaited<ReturnType<typeof sig
|
|
|
296
342
|
export type SignEvmHashResult = NonNullable<Awaited<ReturnType<typeof signEvmHash>>>;
|
|
297
343
|
export type SignEvmMessageResult = NonNullable<Awaited<ReturnType<typeof signEvmMessage>>>;
|
|
298
344
|
export type SignEvmTypedDataResult = NonNullable<Awaited<ReturnType<typeof signEvmTypedData>>>;
|
|
345
|
+
export type CreateEvmEip7702DelegationResult = NonNullable<
|
|
346
|
+
Awaited<ReturnType<typeof createEvmEip7702Delegation>>
|
|
347
|
+
>;
|
|
348
|
+
export type GetEvmEip7702DelegationOperationByIdResult = NonNullable<
|
|
349
|
+
Awaited<ReturnType<typeof getEvmEip7702DelegationOperationById>>
|
|
350
|
+
>;
|
|
299
351
|
export type ImportEvmAccountResult = NonNullable<Awaited<ReturnType<typeof importEvmAccount>>>;
|
|
300
352
|
export type ExportEvmAccountResult = NonNullable<Awaited<ReturnType<typeof exportEvmAccount>>>;
|
|
301
353
|
export type ExportEvmAccountByNameResult = NonNullable<
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
CreateEvmSmartAccountBody,
|
|
10
10
|
CreateSpendPermissionRequest,
|
|
11
11
|
EvmSmartAccount,
|
|
12
|
+
EvmSpendPermissionsRevokeSpendPermissionRequest,
|
|
12
13
|
EvmUserOperation,
|
|
13
14
|
ListEvmSmartAccounts200,
|
|
14
15
|
ListEvmSmartAccountsParams,
|
|
@@ -16,7 +17,6 @@ import type {
|
|
|
16
17
|
ListSpendPermissionsParams,
|
|
17
18
|
PrepareAndSendUserOperationBody,
|
|
18
19
|
PrepareUserOperationBody,
|
|
19
|
-
RevokeSpendPermissionRequest,
|
|
20
20
|
SendUserOperationBody,
|
|
21
21
|
UpdateEvmSmartAccountBody,
|
|
22
22
|
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
@@ -32,7 +32,7 @@ The response is paginated, and by default, returns 20 accounts per page.
|
|
|
32
32
|
*/
|
|
33
33
|
export const listEvmSmartAccounts = (
|
|
34
34
|
params?: ListEvmSmartAccountsParams,
|
|
35
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
35
|
+
options?: SecondParameter<typeof cdpApiClient<ListEvmSmartAccounts200>>,
|
|
36
36
|
) => {
|
|
37
37
|
return cdpApiClient<ListEvmSmartAccounts200>(
|
|
38
38
|
{ url: `/v2/evm/smart-accounts`, method: "GET", params },
|
|
@@ -45,7 +45,7 @@ export const listEvmSmartAccounts = (
|
|
|
45
45
|
*/
|
|
46
46
|
export const createEvmSmartAccount = (
|
|
47
47
|
createEvmSmartAccountBody: CreateEvmSmartAccountBody,
|
|
48
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
48
|
+
options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
|
|
49
49
|
) => {
|
|
50
50
|
return cdpApiClient<EvmSmartAccount>(
|
|
51
51
|
{
|
|
@@ -63,7 +63,7 @@ export const createEvmSmartAccount = (
|
|
|
63
63
|
*/
|
|
64
64
|
export const getEvmSmartAccountByName = (
|
|
65
65
|
name: string,
|
|
66
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
66
|
+
options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
|
|
67
67
|
) => {
|
|
68
68
|
return cdpApiClient<EvmSmartAccount>(
|
|
69
69
|
{ url: `/v2/evm/smart-accounts/by-name/${name}`, method: "GET" },
|
|
@@ -76,7 +76,7 @@ export const getEvmSmartAccountByName = (
|
|
|
76
76
|
*/
|
|
77
77
|
export const getEvmSmartAccount = (
|
|
78
78
|
address: string,
|
|
79
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
79
|
+
options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
|
|
80
80
|
) => {
|
|
81
81
|
return cdpApiClient<EvmSmartAccount>(
|
|
82
82
|
{ url: `/v2/evm/smart-accounts/${address}`, method: "GET" },
|
|
@@ -90,7 +90,7 @@ export const getEvmSmartAccount = (
|
|
|
90
90
|
export const updateEvmSmartAccount = (
|
|
91
91
|
address: string,
|
|
92
92
|
updateEvmSmartAccountBody: UpdateEvmSmartAccountBody,
|
|
93
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
93
|
+
options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
|
|
94
94
|
) => {
|
|
95
95
|
return cdpApiClient<EvmSmartAccount>(
|
|
96
96
|
{
|
|
@@ -109,7 +109,7 @@ export const updateEvmSmartAccount = (
|
|
|
109
109
|
export const prepareUserOperation = (
|
|
110
110
|
address: string,
|
|
111
111
|
prepareUserOperationBody: PrepareUserOperationBody,
|
|
112
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
112
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
113
113
|
) => {
|
|
114
114
|
return cdpApiClient<EvmUserOperation>(
|
|
115
115
|
{
|
|
@@ -128,7 +128,7 @@ export const prepareUserOperation = (
|
|
|
128
128
|
export const prepareAndSendUserOperation = (
|
|
129
129
|
address: string,
|
|
130
130
|
prepareAndSendUserOperationBody: PrepareAndSendUserOperationBody,
|
|
131
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
131
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
132
132
|
) => {
|
|
133
133
|
return cdpApiClient<EvmUserOperation>(
|
|
134
134
|
{
|
|
@@ -147,7 +147,7 @@ export const prepareAndSendUserOperation = (
|
|
|
147
147
|
export const getUserOperation = (
|
|
148
148
|
address: string,
|
|
149
149
|
userOpHash: string,
|
|
150
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
150
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
151
151
|
) => {
|
|
152
152
|
return cdpApiClient<EvmUserOperation>(
|
|
153
153
|
{ url: `/v2/evm/smart-accounts/${address}/user-operations/${userOpHash}`, method: "GET" },
|
|
@@ -165,7 +165,7 @@ export const sendUserOperation = (
|
|
|
165
165
|
address: string,
|
|
166
166
|
userOpHash: string,
|
|
167
167
|
sendUserOperationBody: SendUserOperationBody,
|
|
168
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
168
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
169
169
|
) => {
|
|
170
170
|
return cdpApiClient<EvmUserOperation>(
|
|
171
171
|
{
|
|
@@ -184,7 +184,7 @@ export const sendUserOperation = (
|
|
|
184
184
|
export const createSpendPermission = (
|
|
185
185
|
address: string,
|
|
186
186
|
createSpendPermissionRequest: CreateSpendPermissionRequest,
|
|
187
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
187
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
188
188
|
) => {
|
|
189
189
|
return cdpApiClient<EvmUserOperation>(
|
|
190
190
|
{
|
|
@@ -203,7 +203,7 @@ export const createSpendPermission = (
|
|
|
203
203
|
export const listSpendPermissions = (
|
|
204
204
|
address: string,
|
|
205
205
|
params?: ListSpendPermissionsParams,
|
|
206
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
206
|
+
options?: SecondParameter<typeof cdpApiClient<ListSpendPermissions200>>,
|
|
207
207
|
) => {
|
|
208
208
|
return cdpApiClient<ListSpendPermissions200>(
|
|
209
209
|
{ url: `/v2/evm/smart-accounts/${address}/spend-permissions/list`, method: "GET", params },
|
|
@@ -216,15 +216,15 @@ export const listSpendPermissions = (
|
|
|
216
216
|
*/
|
|
217
217
|
export const revokeSpendPermission = (
|
|
218
218
|
address: string,
|
|
219
|
-
|
|
220
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
219
|
+
evmSpendPermissionsRevokeSpendPermissionRequest: EvmSpendPermissionsRevokeSpendPermissionRequest,
|
|
220
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
221
221
|
) => {
|
|
222
222
|
return cdpApiClient<EvmUserOperation>(
|
|
223
223
|
{
|
|
224
224
|
url: `/v2/evm/smart-accounts/${address}/spend-permissions/revoke`,
|
|
225
225
|
method: "POST",
|
|
226
226
|
headers: { "Content-Type": "application/json" },
|
|
227
|
-
data:
|
|
227
|
+
data: evmSpendPermissionsRevokeSpendPermissionRequest,
|
|
228
228
|
},
|
|
229
229
|
options,
|
|
230
230
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -22,7 +22,7 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
|
22
22
|
*/
|
|
23
23
|
export const getEvmSwapPrice = (
|
|
24
24
|
params: GetEvmSwapPriceParams,
|
|
25
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
25
|
+
options?: SecondParameter<typeof cdpApiClient<GetSwapPriceResponseWrapper>>,
|
|
26
26
|
) => {
|
|
27
27
|
return cdpApiClient<GetSwapPriceResponseWrapper>(
|
|
28
28
|
{ url: `/v2/evm/swaps/quote`, method: "GET", params },
|
|
@@ -35,7 +35,7 @@ export const getEvmSwapPrice = (
|
|
|
35
35
|
*/
|
|
36
36
|
export const createEvmSwapQuote = (
|
|
37
37
|
createEvmSwapQuoteBody: CreateEvmSwapQuoteBody,
|
|
38
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
38
|
+
options?: SecondParameter<typeof cdpApiClient<CreateSwapQuoteResponseWrapper>>,
|
|
39
39
|
) => {
|
|
40
40
|
return cdpApiClient<CreateSwapQuoteResponseWrapper>(
|
|
41
41
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -24,7 +24,7 @@ export const listEvmTokenBalances = (
|
|
|
24
24
|
network: ListEvmTokenBalancesNetwork,
|
|
25
25
|
address: string,
|
|
26
26
|
params?: ListEvmTokenBalancesParams,
|
|
27
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
27
|
+
options?: SecondParameter<typeof cdpApiClient<ListEvmTokenBalances200>>,
|
|
28
28
|
) => {
|
|
29
29
|
return cdpApiClient<ListEvmTokenBalances200>(
|
|
30
30
|
{ url: `/v2/evm/token-balances/${network}/${address}`, method: "GET", params },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -36,7 +36,7 @@ A single blockchain address cannot exceed the specified limits, even if multiple
|
|
|
36
36
|
*/
|
|
37
37
|
export const requestEvmFaucet = (
|
|
38
38
|
requestEvmFaucetBody: RequestEvmFaucetBody,
|
|
39
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
39
|
+
options?: SecondParameter<typeof cdpApiClient<RequestEvmFaucet200>>,
|
|
40
40
|
) => {
|
|
41
41
|
return cdpApiClient<RequestEvmFaucet200>(
|
|
42
42
|
{
|
|
@@ -51,22 +51,23 @@ export const requestEvmFaucet = (
|
|
|
51
51
|
/**
|
|
52
52
|
* Request funds from the CDP Faucet on Solana devnet.
|
|
53
53
|
|
|
54
|
-
Faucets are available for SOL.
|
|
54
|
+
Faucets are available for SOL, USDC, and CBTUSD.
|
|
55
55
|
|
|
56
56
|
To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
|
|
57
57
|
These limits are applied at both the CDP Project level and the blockchain address level.
|
|
58
58
|
A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
|
|
59
59
|
|
|
60
|
-
| Token
|
|
61
|
-
|
|
62
|
-
| SOL
|
|
63
|
-
| USDC
|
|
60
|
+
| Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
|
|
61
|
+
|:-----: |:-------------------------:|:--------------------------------:|
|
|
62
|
+
| SOL | 0.00125 SOL | 0.0125 SOL |
|
|
63
|
+
| USDC | 1 USDC | 10 USDC |
|
|
64
|
+
| CBTUSD | 1 CBTUSD | 10 CBTUSD |
|
|
64
65
|
|
|
65
66
|
* @summary Request funds on Solana devnet
|
|
66
67
|
*/
|
|
67
68
|
export const requestSolanaFaucet = (
|
|
68
69
|
requestSolanaFaucetBody: RequestSolanaFaucetBody,
|
|
69
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
70
|
+
options?: SecondParameter<typeof cdpApiClient<RequestSolanaFaucet200>>,
|
|
70
71
|
) => {
|
|
71
72
|
return cdpApiClient<RequestSolanaFaucet200>(
|
|
72
73
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -25,7 +25,7 @@ Analyzes transaction history to discover token interactions.
|
|
|
25
25
|
export const listTokensForAccount = (
|
|
26
26
|
network: "base" | "base-sepolia",
|
|
27
27
|
address: string,
|
|
28
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
28
|
+
options?: SecondParameter<typeof cdpApiClient<AccountTokenAddressesResponse>>,
|
|
29
29
|
) => {
|
|
30
30
|
return cdpApiClient<AccountTokenAddressesResponse>(
|
|
31
31
|
{ url: `/v2/data/evm/token-ownership/${network}/${address}`, method: "GET" },
|
|
@@ -42,7 +42,7 @@ export const listDataTokenBalances = (
|
|
|
42
42
|
network: ListEvmTokenBalancesNetwork,
|
|
43
43
|
address: string,
|
|
44
44
|
params?: ListDataTokenBalancesParams,
|
|
45
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
45
|
+
options?: SecondParameter<typeof cdpApiClient<ListDataTokenBalances200>>,
|
|
46
46
|
) => {
|
|
47
47
|
return cdpApiClient<ListDataTokenBalances200>(
|
|
48
48
|
{ url: `/v2/data/evm/token-balances/${network}/${address}`, method: "GET", params },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -11,6 +11,8 @@ import type {
|
|
|
11
11
|
CreateOnrampSession201,
|
|
12
12
|
CreateOnrampSessionBody,
|
|
13
13
|
GetOnrampOrderById200,
|
|
14
|
+
GetOnrampUserLimits200,
|
|
15
|
+
GetOnrampUserLimitsBody,
|
|
14
16
|
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
15
17
|
|
|
16
18
|
import { cdpApiClient } from "../../cdpApiClient.js";
|
|
@@ -27,7 +29,7 @@ For detailed integration instructions and to get access to this API, refer to th
|
|
|
27
29
|
*/
|
|
28
30
|
export const createOnrampOrder = (
|
|
29
31
|
createOnrampOrderBody: CreateOnrampOrderBody,
|
|
30
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
32
|
+
options?: SecondParameter<typeof cdpApiClient<CreateOnrampOrder201>>,
|
|
31
33
|
) => {
|
|
32
34
|
return cdpApiClient<CreateOnrampOrder201>(
|
|
33
35
|
{
|
|
@@ -45,7 +47,7 @@ export const createOnrampOrder = (
|
|
|
45
47
|
*/
|
|
46
48
|
export const getOnrampOrderById = (
|
|
47
49
|
orderId: string,
|
|
48
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
50
|
+
options?: SecondParameter<typeof cdpApiClient<GetOnrampOrderById200>>,
|
|
49
51
|
) => {
|
|
50
52
|
return cdpApiClient<GetOnrampOrderById200>(
|
|
51
53
|
{ url: `/v2/onramp/orders/${orderId}`, method: "GET" },
|
|
@@ -75,7 +77,7 @@ export const getOnrampOrderById = (
|
|
|
75
77
|
*/
|
|
76
78
|
export const createOnrampSession = (
|
|
77
79
|
createOnrampSessionBody: CreateOnrampSessionBody,
|
|
78
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
80
|
+
options?: SecondParameter<typeof cdpApiClient<CreateOnrampSession201>>,
|
|
79
81
|
) => {
|
|
80
82
|
return cdpApiClient<CreateOnrampSession201>(
|
|
81
83
|
{
|
|
@@ -87,8 +89,30 @@ export const createOnrampSession = (
|
|
|
87
89
|
options,
|
|
88
90
|
);
|
|
89
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* Returns the transaction limits for an onramp user based on their payment method and user identifier. Use this API to show users their remaining purchase capacity before initiating an onramp transaction.
|
|
94
|
+
Currently supports `GUEST_CHECKOUT_APPLE_PAY` payment method with phone number identification. The phone number must have been previously verified via OTP.
|
|
95
|
+
* @summary Get onramp user limits
|
|
96
|
+
*/
|
|
97
|
+
export const getOnrampUserLimits = (
|
|
98
|
+
getOnrampUserLimitsBody: GetOnrampUserLimitsBody,
|
|
99
|
+
options?: SecondParameter<typeof cdpApiClient<GetOnrampUserLimits200>>,
|
|
100
|
+
) => {
|
|
101
|
+
return cdpApiClient<GetOnrampUserLimits200>(
|
|
102
|
+
{
|
|
103
|
+
url: `/v2/onramp/limits`,
|
|
104
|
+
method: "POST",
|
|
105
|
+
headers: { "Content-Type": "application/json" },
|
|
106
|
+
data: getOnrampUserLimitsBody,
|
|
107
|
+
},
|
|
108
|
+
options,
|
|
109
|
+
);
|
|
110
|
+
};
|
|
90
111
|
export type CreateOnrampOrderResult = NonNullable<Awaited<ReturnType<typeof createOnrampOrder>>>;
|
|
91
112
|
export type GetOnrampOrderByIdResult = NonNullable<Awaited<ReturnType<typeof getOnrampOrderById>>>;
|
|
92
113
|
export type CreateOnrampSessionResult = NonNullable<
|
|
93
114
|
Awaited<ReturnType<typeof createOnrampSession>>
|
|
94
115
|
>;
|
|
116
|
+
export type GetOnrampUserLimitsResult = NonNullable<
|
|
117
|
+
Awaited<ReturnType<typeof getOnrampUserLimits>>
|
|
118
|
+
>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -24,7 +24,7 @@ The response is paginated, and by default, returns 20 policies per page.
|
|
|
24
24
|
*/
|
|
25
25
|
export const listPolicies = (
|
|
26
26
|
params?: ListPoliciesParams,
|
|
27
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
27
|
+
options?: SecondParameter<typeof cdpApiClient<ListPolicies200>>,
|
|
28
28
|
) => {
|
|
29
29
|
return cdpApiClient<ListPolicies200>(
|
|
30
30
|
{ url: `/v2/policy-engine/policies`, method: "GET", params },
|
|
@@ -37,7 +37,7 @@ export const listPolicies = (
|
|
|
37
37
|
*/
|
|
38
38
|
export const createPolicy = (
|
|
39
39
|
createPolicyBody: CreatePolicyBody,
|
|
40
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
40
|
+
options?: SecondParameter<typeof cdpApiClient<Policy>>,
|
|
41
41
|
) => {
|
|
42
42
|
return cdpApiClient<Policy>(
|
|
43
43
|
{
|
|
@@ -53,7 +53,10 @@ export const createPolicy = (
|
|
|
53
53
|
* Get a policy by its ID.
|
|
54
54
|
* @summary Get a policy by ID
|
|
55
55
|
*/
|
|
56
|
-
export const getPolicyById = (
|
|
56
|
+
export const getPolicyById = (
|
|
57
|
+
policyId: string,
|
|
58
|
+
options?: SecondParameter<typeof cdpApiClient<Policy>>,
|
|
59
|
+
) => {
|
|
57
60
|
return cdpApiClient<Policy>(
|
|
58
61
|
{ url: `/v2/policy-engine/policies/${policyId}`, method: "GET" },
|
|
59
62
|
options,
|
|
@@ -63,7 +66,10 @@ export const getPolicyById = (policyId: string, options?: SecondParameter<typeof
|
|
|
63
66
|
* Delete a policy by its ID. This will have the effect of removing the policy from all accounts that are currently using it.
|
|
64
67
|
* @summary Delete a policy
|
|
65
68
|
*/
|
|
66
|
-
export const deletePolicy = (
|
|
69
|
+
export const deletePolicy = (
|
|
70
|
+
policyId: string,
|
|
71
|
+
options?: SecondParameter<typeof cdpApiClient<void>>,
|
|
72
|
+
) => {
|
|
67
73
|
return cdpApiClient<void>(
|
|
68
74
|
{ url: `/v2/policy-engine/policies/${policyId}`, method: "DELETE" },
|
|
69
75
|
options,
|
|
@@ -76,7 +82,7 @@ export const deletePolicy = (policyId: string, options?: SecondParameter<typeof
|
|
|
76
82
|
export const updatePolicy = (
|
|
77
83
|
policyId: string,
|
|
78
84
|
updatePolicyBody: UpdatePolicyBody,
|
|
79
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
85
|
+
options?: SecondParameter<typeof cdpApiClient<Policy>>,
|
|
80
86
|
) => {
|
|
81
87
|
return cdpApiClient<Policy>(
|
|
82
88
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -37,7 +37,7 @@ If a name is provided, the response will contain only the account with that name
|
|
|
37
37
|
*/
|
|
38
38
|
export const listSolanaAccounts = (
|
|
39
39
|
params?: ListSolanaAccountsParams,
|
|
40
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
40
|
+
options?: SecondParameter<typeof cdpApiClient<ListSolanaAccounts200>>,
|
|
41
41
|
) => {
|
|
42
42
|
return cdpApiClient<ListSolanaAccounts200>(
|
|
43
43
|
{ url: `/v2/solana/accounts`, method: "GET", params },
|
|
@@ -50,7 +50,7 @@ export const listSolanaAccounts = (
|
|
|
50
50
|
*/
|
|
51
51
|
export const createSolanaAccount = (
|
|
52
52
|
createSolanaAccountBody?: CreateSolanaAccountBody,
|
|
53
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
53
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
54
54
|
) => {
|
|
55
55
|
return cdpApiClient<SolanaAccount>(
|
|
56
56
|
{
|
|
@@ -68,7 +68,7 @@ export const createSolanaAccount = (
|
|
|
68
68
|
*/
|
|
69
69
|
export const getSolanaAccount = (
|
|
70
70
|
address: string,
|
|
71
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
71
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
72
72
|
) => {
|
|
73
73
|
return cdpApiClient<SolanaAccount>(
|
|
74
74
|
{ url: `/v2/solana/accounts/${address}`, method: "GET" },
|
|
@@ -82,7 +82,7 @@ export const getSolanaAccount = (
|
|
|
82
82
|
export const updateSolanaAccount = (
|
|
83
83
|
address: string,
|
|
84
84
|
updateSolanaAccountBody: UpdateSolanaAccountBody,
|
|
85
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
85
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
86
86
|
) => {
|
|
87
87
|
return cdpApiClient<SolanaAccount>(
|
|
88
88
|
{
|
|
@@ -100,7 +100,7 @@ export const updateSolanaAccount = (
|
|
|
100
100
|
*/
|
|
101
101
|
export const getSolanaAccountByName = (
|
|
102
102
|
name: string,
|
|
103
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
103
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
104
104
|
) => {
|
|
105
105
|
return cdpApiClient<SolanaAccount>(
|
|
106
106
|
{ url: `/v2/solana/accounts/by-name/${name}`, method: "GET" },
|
|
@@ -113,7 +113,7 @@ export const getSolanaAccountByName = (
|
|
|
113
113
|
*/
|
|
114
114
|
export const importSolanaAccount = (
|
|
115
115
|
importSolanaAccountBody: ImportSolanaAccountBody,
|
|
116
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
116
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
117
117
|
) => {
|
|
118
118
|
return cdpApiClient<SolanaAccount>(
|
|
119
119
|
{
|
|
@@ -132,7 +132,7 @@ export const importSolanaAccount = (
|
|
|
132
132
|
export const exportSolanaAccount = (
|
|
133
133
|
address: string,
|
|
134
134
|
exportSolanaAccountBody: ExportSolanaAccountBody,
|
|
135
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
135
|
+
options?: SecondParameter<typeof cdpApiClient<ExportSolanaAccount200>>,
|
|
136
136
|
) => {
|
|
137
137
|
return cdpApiClient<ExportSolanaAccount200>(
|
|
138
138
|
{
|
|
@@ -151,7 +151,7 @@ export const exportSolanaAccount = (
|
|
|
151
151
|
export const exportSolanaAccountByName = (
|
|
152
152
|
name: string,
|
|
153
153
|
exportSolanaAccountByNameBody: ExportSolanaAccountByNameBody,
|
|
154
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
154
|
+
options?: SecondParameter<typeof cdpApiClient<ExportSolanaAccountByName200>>,
|
|
155
155
|
) => {
|
|
156
156
|
return cdpApiClient<ExportSolanaAccountByName200>(
|
|
157
157
|
{
|
|
@@ -179,7 +179,7 @@ The developer is responsible for ensuring that the unsigned transaction is valid
|
|
|
179
179
|
export const signSolanaTransaction = (
|
|
180
180
|
address: string,
|
|
181
181
|
signSolanaTransactionBody: SignSolanaTransactionBody,
|
|
182
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
182
|
+
options?: SecondParameter<typeof cdpApiClient<SignSolanaTransaction200>>,
|
|
183
183
|
) => {
|
|
184
184
|
return cdpApiClient<SignSolanaTransaction200>(
|
|
185
185
|
{
|
|
@@ -200,7 +200,7 @@ export const signSolanaTransaction = (
|
|
|
200
200
|
export const signSolanaMessage = (
|
|
201
201
|
address: string,
|
|
202
202
|
signSolanaMessageBody: SignSolanaMessageBody,
|
|
203
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
203
|
+
options?: SecondParameter<typeof cdpApiClient<SignSolanaMessage200>>,
|
|
204
204
|
) => {
|
|
205
205
|
return cdpApiClient<SignSolanaMessage200>(
|
|
206
206
|
{
|
|
@@ -238,7 +238,7 @@ The developer is responsible for ensuring that the unsigned transaction is valid
|
|
|
238
238
|
*/
|
|
239
239
|
export const sendSolanaTransaction = (
|
|
240
240
|
sendSolanaTransactionBody: SendSolanaTransactionBody,
|
|
241
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
241
|
+
options?: SecondParameter<typeof cdpApiClient<SendSolanaTransaction200>>,
|
|
242
242
|
) => {
|
|
243
243
|
return cdpApiClient<SendSolanaTransaction200>(
|
|
244
244
|
{
|