@coinbase/cdp-sdk 1.38.2 → 1.38.4
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 +12 -0
- package/_cjs/actions/evm/fund/fund.js +1 -0
- package/_cjs/actions/evm/fund/fund.js.map +1 -1
- package/_cjs/actions/evm/fund/quoteFund.js +1 -0
- package/_cjs/actions/evm/fund/quoteFund.js.map +1 -1
- package/_cjs/actions/solana/fund/fund.js +1 -0
- package/_cjs/actions/solana/fund/fund.js.map +1 -1
- package/_cjs/actions/solana/fund/quoteFund.js +1 -0
- package/_cjs/actions/solana/fund/quoteFund.js.map +1 -1
- package/_cjs/actions/solana/rpc.js +16 -0
- package/_cjs/actions/solana/rpc.js.map +1 -0
- package/_cjs/actions/solana/transfer.js +74 -48
- package/_cjs/actions/solana/transfer.js.map +1 -1
- package/_cjs/actions/solana/utils.js +4 -6
- package/_cjs/actions/solana/utils.js.map +1 -1
- package/_cjs/actions/waitForFundOperationReceipt.js +1 -0
- package/_cjs/actions/waitForFundOperationReceipt.js.map +1 -1
- package/_cjs/auth/utils/jwt.js +4 -1
- package/_cjs/auth/utils/jwt.js.map +1 -1
- package/_cjs/openapi-client/generated/faucets/faucets.js +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/actions/evm/fund/fund.js +1 -0
- package/_esm/actions/evm/fund/fund.js.map +1 -1
- package/_esm/actions/evm/fund/quoteFund.js +1 -0
- package/_esm/actions/evm/fund/quoteFund.js.map +1 -1
- package/_esm/actions/solana/fund/fund.js +1 -0
- package/_esm/actions/solana/fund/fund.js.map +1 -1
- package/_esm/actions/solana/fund/quoteFund.js +1 -0
- package/_esm/actions/solana/fund/quoteFund.js.map +1 -1
- package/_esm/actions/solana/rpc.js +13 -0
- package/_esm/actions/solana/rpc.js.map +1 -0
- package/_esm/actions/solana/transfer.js +72 -48
- package/_esm/actions/solana/transfer.js.map +1 -1
- package/_esm/actions/solana/utils.js +4 -6
- package/_esm/actions/solana/utils.js.map +1 -1
- package/_esm/actions/waitForFundOperationReceipt.js +1 -0
- package/_esm/actions/waitForFundOperationReceipt.js.map +1 -1
- package/_esm/auth/utils/jwt.js +4 -1
- package/_esm/auth/utils/jwt.js.map +1 -1
- package/_esm/openapi-client/generated/faucets/faucets.js +1 -1
- package/_esm/version.js +1 -1
- package/_types/actions/evm/fund/fund.d.ts +1 -0
- package/_types/actions/evm/fund/fund.d.ts.map +1 -1
- package/_types/actions/evm/fund/quoteFund.d.ts +1 -0
- package/_types/actions/evm/fund/quoteFund.d.ts.map +1 -1
- package/_types/actions/solana/fund/fund.d.ts +1 -0
- package/_types/actions/solana/fund/fund.d.ts.map +1 -1
- package/_types/actions/solana/fund/quoteFund.d.ts +1 -0
- package/_types/actions/solana/fund/quoteFund.d.ts.map +1 -1
- package/_types/actions/solana/rpc.d.ts +10 -0
- package/_types/actions/solana/rpc.d.ts.map +1 -0
- package/_types/actions/solana/transfer.d.ts +37 -1
- package/_types/actions/solana/transfer.d.ts.map +1 -1
- package/_types/actions/solana/utils.d.ts +4 -6
- package/_types/actions/solana/utils.d.ts.map +1 -1
- package/_types/actions/waitForFundOperationReceipt.d.ts +1 -0
- package/_types/actions/waitForFundOperationReceipt.d.ts.map +1 -1
- package/_types/auth/utils/jwt.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +6 -0
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/faucets/faucets.d.ts +1 -1
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/actions/evm/fund/fund.ts +1 -0
- package/actions/evm/fund/quoteFund.ts +1 -0
- package/actions/solana/fund/fund.ts +1 -0
- package/actions/solana/fund/quoteFund.ts +1 -0
- package/actions/solana/rpc.ts +17 -0
- package/actions/solana/transfer.ts +115 -84
- package/actions/solana/utils.ts +4 -6
- package/actions/waitForFundOperationReceipt.ts +1 -0
- package/auth/utils/jwt.ts +5 -1
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +6 -0
- package/openapi-client/generated/faucets/faucets.ts +1 -1
- package/package.json +5 -6
- package/version.ts +1 -1
package/auth/utils/jwt.ts
CHANGED
|
@@ -196,7 +196,11 @@ export async function generateWalletJwt(options: WalletJwtOptions): Promise<stri
|
|
|
196
196
|
uris: [uri],
|
|
197
197
|
};
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
const shouldIncludeReqHash =
|
|
200
|
+
typeof options.requestData === "object" &&
|
|
201
|
+
Object.keys(options.requestData).length > 0 &&
|
|
202
|
+
Object.values(options.requestData).some(value => value !== undefined);
|
|
203
|
+
if (shouldIncludeReqHash) {
|
|
200
204
|
const sortedData = sortKeys(options.requestData);
|
|
201
205
|
claims.reqHash = await authHash(Buffer.from(JSON.stringify(sortedData)));
|
|
202
206
|
}
|
|
@@ -3896,6 +3896,10 @@ Please refer to the [Onramp docs](https://docs.cdp.coinbase.com/onramp-&-offramp
|
|
|
3896
3896
|
|
|
3897
3897
|
Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported purchase currencies for your user's location. */
|
|
3898
3898
|
purchaseCurrency: string;
|
|
3899
|
+
/** The IP address of the end user requesting the onramp transaction. */
|
|
3900
|
+
clientIp?: string;
|
|
3901
|
+
/** The domain that the Apple Pay button will be rendered on. Required when using the `GUEST_CHECKOUT_APPLE_PAY` payment method and embedding the payment link in an iframe. */
|
|
3902
|
+
domain?: string;
|
|
3899
3903
|
};
|
|
3900
3904
|
|
|
3901
3905
|
export type CreateOnrampOrder201 = {
|
|
@@ -3929,6 +3933,8 @@ Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/res
|
|
|
3929
3933
|
subdivision?: string;
|
|
3930
3934
|
/** URL to redirect the user to when they successfully complete a transaction. This URL will be embedded in the returned onramp URL as a query parameter. */
|
|
3931
3935
|
redirectUrl?: string;
|
|
3936
|
+
/** The IP address of the end user requesting the onramp transaction. */
|
|
3937
|
+
clientIp?: string;
|
|
3932
3938
|
};
|
|
3933
3939
|
|
|
3934
3940
|
export type CreateOnrampSession201 = {
|
|
@@ -54,7 +54,7 @@ export const requestEvmFaucet = (
|
|
|
54
54
|
Faucets are available for SOL.
|
|
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
|
-
These limits are applied at both the CDP
|
|
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
60
|
| Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-sdk",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.4",
|
|
4
4
|
"description": "SDK for interacting with the Coinbase Developer Platform Wallet API",
|
|
5
5
|
"main": "./_cjs/index.js",
|
|
6
6
|
"module": "./_esm/index.js",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@solana/
|
|
21
|
+
"@solana/kit": "^3.0.3",
|
|
22
|
+
"@solana-program/token": "^0.6.0",
|
|
23
|
+
"@solana-program/system": "^0.8.0",
|
|
22
24
|
"@solana/web3.js": "^1.98.1",
|
|
23
25
|
"abitype": "1.0.6",
|
|
24
26
|
"axios": "^1.12.2",
|
|
@@ -43,8 +45,5 @@
|
|
|
43
45
|
"cdp sdk",
|
|
44
46
|
"sdk",
|
|
45
47
|
"api"
|
|
46
|
-
]
|
|
47
|
-
"overrides": {
|
|
48
|
-
"bigint-buffer": "npm:bigint-buffer-fixed@^1.1.6"
|
|
49
|
-
}
|
|
48
|
+
]
|
|
50
49
|
}
|
package/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "1.38.
|
|
1
|
+
export const version = "1.38.4";
|