@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.
Files changed (76) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/_cjs/actions/evm/fund/fund.js +1 -0
  3. package/_cjs/actions/evm/fund/fund.js.map +1 -1
  4. package/_cjs/actions/evm/fund/quoteFund.js +1 -0
  5. package/_cjs/actions/evm/fund/quoteFund.js.map +1 -1
  6. package/_cjs/actions/solana/fund/fund.js +1 -0
  7. package/_cjs/actions/solana/fund/fund.js.map +1 -1
  8. package/_cjs/actions/solana/fund/quoteFund.js +1 -0
  9. package/_cjs/actions/solana/fund/quoteFund.js.map +1 -1
  10. package/_cjs/actions/solana/rpc.js +16 -0
  11. package/_cjs/actions/solana/rpc.js.map +1 -0
  12. package/_cjs/actions/solana/transfer.js +74 -48
  13. package/_cjs/actions/solana/transfer.js.map +1 -1
  14. package/_cjs/actions/solana/utils.js +4 -6
  15. package/_cjs/actions/solana/utils.js.map +1 -1
  16. package/_cjs/actions/waitForFundOperationReceipt.js +1 -0
  17. package/_cjs/actions/waitForFundOperationReceipt.js.map +1 -1
  18. package/_cjs/auth/utils/jwt.js +4 -1
  19. package/_cjs/auth/utils/jwt.js.map +1 -1
  20. package/_cjs/openapi-client/generated/faucets/faucets.js +1 -1
  21. package/_cjs/version.js +1 -1
  22. package/_esm/actions/evm/fund/fund.js +1 -0
  23. package/_esm/actions/evm/fund/fund.js.map +1 -1
  24. package/_esm/actions/evm/fund/quoteFund.js +1 -0
  25. package/_esm/actions/evm/fund/quoteFund.js.map +1 -1
  26. package/_esm/actions/solana/fund/fund.js +1 -0
  27. package/_esm/actions/solana/fund/fund.js.map +1 -1
  28. package/_esm/actions/solana/fund/quoteFund.js +1 -0
  29. package/_esm/actions/solana/fund/quoteFund.js.map +1 -1
  30. package/_esm/actions/solana/rpc.js +13 -0
  31. package/_esm/actions/solana/rpc.js.map +1 -0
  32. package/_esm/actions/solana/transfer.js +72 -48
  33. package/_esm/actions/solana/transfer.js.map +1 -1
  34. package/_esm/actions/solana/utils.js +4 -6
  35. package/_esm/actions/solana/utils.js.map +1 -1
  36. package/_esm/actions/waitForFundOperationReceipt.js +1 -0
  37. package/_esm/actions/waitForFundOperationReceipt.js.map +1 -1
  38. package/_esm/auth/utils/jwt.js +4 -1
  39. package/_esm/auth/utils/jwt.js.map +1 -1
  40. package/_esm/openapi-client/generated/faucets/faucets.js +1 -1
  41. package/_esm/version.js +1 -1
  42. package/_types/actions/evm/fund/fund.d.ts +1 -0
  43. package/_types/actions/evm/fund/fund.d.ts.map +1 -1
  44. package/_types/actions/evm/fund/quoteFund.d.ts +1 -0
  45. package/_types/actions/evm/fund/quoteFund.d.ts.map +1 -1
  46. package/_types/actions/solana/fund/fund.d.ts +1 -0
  47. package/_types/actions/solana/fund/fund.d.ts.map +1 -1
  48. package/_types/actions/solana/fund/quoteFund.d.ts +1 -0
  49. package/_types/actions/solana/fund/quoteFund.d.ts.map +1 -1
  50. package/_types/actions/solana/rpc.d.ts +10 -0
  51. package/_types/actions/solana/rpc.d.ts.map +1 -0
  52. package/_types/actions/solana/transfer.d.ts +37 -1
  53. package/_types/actions/solana/transfer.d.ts.map +1 -1
  54. package/_types/actions/solana/utils.d.ts +4 -6
  55. package/_types/actions/solana/utils.d.ts.map +1 -1
  56. package/_types/actions/waitForFundOperationReceipt.d.ts +1 -0
  57. package/_types/actions/waitForFundOperationReceipt.d.ts.map +1 -1
  58. package/_types/auth/utils/jwt.d.ts.map +1 -1
  59. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +6 -0
  60. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  61. package/_types/openapi-client/generated/faucets/faucets.d.ts +1 -1
  62. package/_types/openapi-client/index.d.ts.map +1 -1
  63. package/_types/version.d.ts +1 -1
  64. package/actions/evm/fund/fund.ts +1 -0
  65. package/actions/evm/fund/quoteFund.ts +1 -0
  66. package/actions/solana/fund/fund.ts +1 -0
  67. package/actions/solana/fund/quoteFund.ts +1 -0
  68. package/actions/solana/rpc.ts +17 -0
  69. package/actions/solana/transfer.ts +115 -84
  70. package/actions/solana/utils.ts +4 -6
  71. package/actions/waitForFundOperationReceipt.ts +1 -0
  72. package/auth/utils/jwt.ts +5 -1
  73. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +6 -0
  74. package/openapi-client/generated/faucets/faucets.ts +1 -1
  75. package/package.json +5 -6
  76. 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
- if (Object.keys(options.requestData).length > 0) {
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 User level and the blockchain address level.
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.2",
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/spl-token": "^0.4.13",
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.2";
1
+ export const version = "1.38.4";