@coinbase/cdp-sdk 1.27.0 → 1.28.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.
@@ -39,9 +39,9 @@ export const EvmAddressCriterionSchema = z.object({
39
39
  /**
40
40
  * Array of EVM addresses to compare against.
41
41
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
42
- * Limited to a maximum of 100 addresses per criterion.
42
+ * Limited to a maximum of 300 addresses per criterion.
43
43
  */
44
- addresses: z.array(Address).max(100),
44
+ addresses: z.array(Address).max(300),
45
45
  /**
46
46
  * The operator to use for evaluating transaction addresses.
47
47
  * "in" checks if an address is in the provided list.
@@ -90,9 +90,9 @@ export const EvmTypedAddressConditionSchema = z.object({
90
90
  /**
91
91
  * Array of EVM addresses to compare against.
92
92
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
93
- * Limited to a maximum of 100 addresses per condition.
93
+ * Limited to a maximum of 300 addresses per condition.
94
94
  */
95
- addresses: z.array(Address).max(100),
95
+ addresses: z.array(Address).max(300),
96
96
  /**
97
97
  * The operator to use for evaluating addresses.
98
98
  * "in" checks if an address is in the provided list.
@@ -183,9 +183,9 @@ export const SignEvmTypedDataVerifyingContractCriterionSchema = z.object({
183
183
  /**
184
184
  * Array of EVM addresses allowed or disallowed as verifying contracts.
185
185
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
186
- * Limited to a maximum of 100 addresses per criterion.
186
+ * Limited to a maximum of 300 addresses per criterion.
187
187
  */
188
- addresses: z.array(Address).max(100),
188
+ addresses: z.array(Address).max(300),
189
189
  /**
190
190
  * The operator to use for evaluating verifying contract addresses.
191
191
  * "in" checks if the verifying contract is in the provided list.
package/_esm/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = "1.27.0";
1
+ export const version = "1.28.0";
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toNetworkScopedEvmServerAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toNetworkScopedEvmServerAccount.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAkBlF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG;IACnD,kDAAkD;IAClD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,+BAA+B,CAAC,OAAO,SAAS,MAAM,EAC1E,OAAO,EAAE,sCAAsC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACrE,OAAO,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC,CA8IjD"}
1
+ {"version":3,"file":"toNetworkScopedEvmServerAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toNetworkScopedEvmServerAccount.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAkBlF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG;IACnD,kDAAkD;IAClD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,+BAA+B,CAAC,OAAO,SAAS,MAAM,EAC1E,OAAO,EAAE,sCAAsC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACrE,OAAO,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC,CAoJjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../../actions/solana/transfer.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,EAOX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAIL,KAAK,OAAO,EACb,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,eAAe,CAAC,CAoC1B"}
1
+ {"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../../actions/solana/transfer.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,EAKX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAIL,KAAK,OAAO,EACb,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,eAAe,CAAC,CA8B1B"}
@@ -1,5 +1,5 @@
1
1
  import { Connection } from "@solana/web3.js";
2
- export type Network = "mainnet" | "devnet" | "testnet";
2
+ export type Network = "mainnet" | "devnet";
3
3
  type GetOrCreateConnectionOptions = {
4
4
  networkOrConnection: Network | Connection;
5
5
  };
@@ -17,7 +17,7 @@ export declare function getOrCreateConnection({ networkOrConnection, }: GetOrCre
17
17
  * Get the network of the connected Solana node
18
18
  *
19
19
  * @param connection - The connection to the Solana network
20
- * @throws {Error} If the network is not mainnet, devnet, or testnet
20
+ * @throws {Error} If the network is not mainnet or devnet
21
21
  *
22
22
  * @returns The network of the connected Solana node
23
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../actions/solana/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAU7C,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvD,KAAK,4BAA4B,GAAG;IAClC,mBAAmB,EAAE,OAAO,GAAG,UAAU,CAAC;CAC3C,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,mBAAmB,GACpB,EAAE,4BAA4B,GAAG,UAAU,CAY3C;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAYlF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAQ3D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../actions/solana/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAS7C,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3C,KAAK,4BAA4B,GAAG;IAClC,mBAAmB,EAAE,OAAO,GAAG,UAAU,CAAC;CAC3C,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,mBAAmB,GACpB,EAAE,4BAA4B,GAAG,UAAU,CAU3C;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAUlF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAK3D"}
@@ -67,7 +67,7 @@ export declare const EvmAddressCriterionSchema: z.ZodObject<{
67
67
  /**
68
68
  * Array of EVM addresses to compare against.
69
69
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
70
- * Limited to a maximum of 100 addresses per criterion.
70
+ * Limited to a maximum of 300 addresses per criterion.
71
71
  */
72
72
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
73
73
  /**
@@ -147,7 +147,7 @@ export declare const EvmTypedAddressConditionSchema: z.ZodObject<{
147
147
  /**
148
148
  * Array of EVM addresses to compare against.
149
149
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
150
- * Limited to a maximum of 100 addresses per condition.
150
+ * Limited to a maximum of 300 addresses per condition.
151
151
  */
152
152
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
153
153
  /**
@@ -270,7 +270,7 @@ export declare const SignEvmTypedDataFieldCriterionSchema: z.ZodObject<{
270
270
  /**
271
271
  * Array of EVM addresses to compare against.
272
272
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
273
- * Limited to a maximum of 100 addresses per condition.
273
+ * Limited to a maximum of 300 addresses per condition.
274
274
  */
275
275
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
276
276
  /**
@@ -386,7 +386,7 @@ export declare const SignEvmTypedDataVerifyingContractCriterionSchema: z.ZodObje
386
386
  /**
387
387
  * Array of EVM addresses allowed or disallowed as verifying contracts.
388
388
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
389
- * Limited to a maximum of 100 addresses per criterion.
389
+ * Limited to a maximum of 300 addresses per criterion.
390
390
  */
391
391
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
392
392
  /**
@@ -454,7 +454,7 @@ export declare const SignEvmTypedDataCriteriaSchema: z.ZodArray<z.ZodDiscriminat
454
454
  /**
455
455
  * Array of EVM addresses to compare against.
456
456
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
457
- * Limited to a maximum of 100 addresses per condition.
457
+ * Limited to a maximum of 300 addresses per condition.
458
458
  */
459
459
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
460
460
  /**
@@ -565,7 +565,7 @@ export declare const SignEvmTypedDataCriteriaSchema: z.ZodArray<z.ZodDiscriminat
565
565
  /**
566
566
  * Array of EVM addresses allowed or disallowed as verifying contracts.
567
567
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
568
- * Limited to a maximum of 100 addresses per criterion.
568
+ * Limited to a maximum of 300 addresses per criterion.
569
569
  */
570
570
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
571
571
  /**
@@ -1059,7 +1059,7 @@ export declare const SignEvmTransactionCriteriaSchema: z.ZodArray<z.ZodDiscrimin
1059
1059
  /**
1060
1060
  * Array of EVM addresses to compare against.
1061
1061
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
1062
- * Limited to a maximum of 100 addresses per criterion.
1062
+ * Limited to a maximum of 300 addresses per criterion.
1063
1063
  */
1064
1064
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
1065
1065
  /**
@@ -1396,7 +1396,7 @@ export declare const SendEvmTransactionCriteriaSchema: z.ZodArray<z.ZodDiscrimin
1396
1396
  /**
1397
1397
  * Array of EVM addresses to compare against.
1398
1398
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
1399
- * Limited to a maximum of 100 addresses per criterion.
1399
+ * Limited to a maximum of 300 addresses per criterion.
1400
1400
  */
1401
1401
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
1402
1402
  /**
@@ -1759,7 +1759,7 @@ export declare const PrepareUserOperationCriteriaSchema: z.ZodArray<z.ZodDiscrim
1759
1759
  /**
1760
1760
  * Array of EVM addresses to compare against.
1761
1761
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
1762
- * Limited to a maximum of 100 addresses per criterion.
1762
+ * Limited to a maximum of 300 addresses per criterion.
1763
1763
  */
1764
1764
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
1765
1765
  /**
@@ -2095,7 +2095,7 @@ export declare const SendUserOperationCriteriaSchema: z.ZodArray<z.ZodDiscrimina
2095
2095
  /**
2096
2096
  * Array of EVM addresses to compare against.
2097
2097
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
2098
- * Limited to a maximum of 100 addresses per criterion.
2098
+ * Limited to a maximum of 300 addresses per criterion.
2099
2099
  */
2100
2100
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
2101
2101
  /**
@@ -2452,7 +2452,7 @@ export declare const SignEvmTransactionRuleSchema: z.ZodObject<{
2452
2452
  /**
2453
2453
  * Array of EVM addresses to compare against.
2454
2454
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
2455
- * Limited to a maximum of 100 addresses per criterion.
2455
+ * Limited to a maximum of 300 addresses per criterion.
2456
2456
  */
2457
2457
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
2458
2458
  /**
@@ -2958,7 +2958,7 @@ export declare const SignEvmTypedDataRuleSchema: z.ZodObject<{
2958
2958
  /**
2959
2959
  * Array of EVM addresses to compare against.
2960
2960
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
2961
- * Limited to a maximum of 100 addresses per condition.
2961
+ * Limited to a maximum of 300 addresses per condition.
2962
2962
  */
2963
2963
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
2964
2964
  /**
@@ -3069,7 +3069,7 @@ export declare const SignEvmTypedDataRuleSchema: z.ZodObject<{
3069
3069
  /**
3070
3070
  * Array of EVM addresses allowed or disallowed as verifying contracts.
3071
3071
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
3072
- * Limited to a maximum of 100 addresses per criterion.
3072
+ * Limited to a maximum of 300 addresses per criterion.
3073
3073
  */
3074
3074
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
3075
3075
  /**
@@ -3190,7 +3190,7 @@ export declare const SendEvmTransactionRuleSchema: z.ZodObject<{
3190
3190
  /**
3191
3191
  * Array of EVM addresses to compare against.
3192
3192
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
3193
- * Limited to a maximum of 100 addresses per criterion.
3193
+ * Limited to a maximum of 300 addresses per criterion.
3194
3194
  */
3195
3195
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
3196
3196
  /**
@@ -3691,7 +3691,7 @@ export declare const PrepareUserOperationRuleSchema: z.ZodObject<{
3691
3691
  /**
3692
3692
  * Array of EVM addresses to compare against.
3693
3693
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
3694
- * Limited to a maximum of 100 addresses per criterion.
3694
+ * Limited to a maximum of 300 addresses per criterion.
3695
3695
  */
3696
3696
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
3697
3697
  /**
@@ -4132,7 +4132,7 @@ export declare const SendUserOperationRuleSchema: z.ZodObject<{
4132
4132
  /**
4133
4133
  * Array of EVM addresses to compare against.
4134
4134
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
4135
- * Limited to a maximum of 100 addresses per criterion.
4135
+ * Limited to a maximum of 300 addresses per criterion.
4136
4136
  */
4137
4137
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
4138
4138
  /**
@@ -4542,7 +4542,7 @@ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObje
4542
4542
  /**
4543
4543
  * Array of EVM addresses to compare against.
4544
4544
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
4545
- * Limited to a maximum of 100 addresses per criterion.
4545
+ * Limited to a maximum of 300 addresses per criterion.
4546
4546
  */
4547
4547
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
4548
4548
  /**
@@ -5030,7 +5030,7 @@ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObje
5030
5030
  /**
5031
5031
  * Array of EVM addresses to compare against.
5032
5032
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
5033
- * Limited to a maximum of 100 addresses per condition.
5033
+ * Limited to a maximum of 300 addresses per condition.
5034
5034
  */
5035
5035
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
5036
5036
  /**
@@ -5141,7 +5141,7 @@ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObje
5141
5141
  /**
5142
5142
  * Array of EVM addresses allowed or disallowed as verifying contracts.
5143
5143
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
5144
- * Limited to a maximum of 100 addresses per criterion.
5144
+ * Limited to a maximum of 300 addresses per criterion.
5145
5145
  */
5146
5146
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
5147
5147
  /**
@@ -5256,7 +5256,7 @@ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObje
5256
5256
  /**
5257
5257
  * Array of EVM addresses to compare against.
5258
5258
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
5259
- * Limited to a maximum of 100 addresses per criterion.
5259
+ * Limited to a maximum of 300 addresses per criterion.
5260
5260
  */
5261
5261
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
5262
5262
  /**
@@ -5745,7 +5745,7 @@ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObje
5745
5745
  /**
5746
5746
  * Array of EVM addresses to compare against.
5747
5747
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
5748
- * Limited to a maximum of 100 addresses per criterion.
5748
+ * Limited to a maximum of 300 addresses per criterion.
5749
5749
  */
5750
5750
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
5751
5751
  /**
@@ -6180,7 +6180,7 @@ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObje
6180
6180
  /**
6181
6181
  * Array of EVM addresses to compare against.
6182
6182
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
6183
- * Limited to a maximum of 100 addresses per criterion.
6183
+ * Limited to a maximum of 300 addresses per criterion.
6184
6184
  */
6185
6185
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
6186
6186
  /**
@@ -6618,7 +6618,7 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
6618
6618
  /**
6619
6619
  * Array of EVM addresses to compare against.
6620
6620
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
6621
- * Limited to a maximum of 100 addresses per criterion.
6621
+ * Limited to a maximum of 300 addresses per criterion.
6622
6622
  */
6623
6623
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
6624
6624
  /**
@@ -7106,7 +7106,7 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
7106
7106
  /**
7107
7107
  * Array of EVM addresses to compare against.
7108
7108
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
7109
- * Limited to a maximum of 100 addresses per condition.
7109
+ * Limited to a maximum of 300 addresses per condition.
7110
7110
  */
7111
7111
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
7112
7112
  /**
@@ -7217,7 +7217,7 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
7217
7217
  /**
7218
7218
  * Array of EVM addresses allowed or disallowed as verifying contracts.
7219
7219
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
7220
- * Limited to a maximum of 100 addresses per criterion.
7220
+ * Limited to a maximum of 300 addresses per criterion.
7221
7221
  */
7222
7222
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
7223
7223
  /**
@@ -7332,7 +7332,7 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
7332
7332
  /**
7333
7333
  * Array of EVM addresses to compare against.
7334
7334
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
7335
- * Limited to a maximum of 100 addresses per criterion.
7335
+ * Limited to a maximum of 300 addresses per criterion.
7336
7336
  */
7337
7337
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
7338
7338
  /**
@@ -7821,7 +7821,7 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
7821
7821
  /**
7822
7822
  * Array of EVM addresses to compare against.
7823
7823
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
7824
- * Limited to a maximum of 100 addresses per criterion.
7824
+ * Limited to a maximum of 300 addresses per criterion.
7825
7825
  */
7826
7826
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
7827
7827
  /**
@@ -8256,7 +8256,7 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
8256
8256
  /**
8257
8257
  * Array of EVM addresses to compare against.
8258
8258
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
8259
- * Limited to a maximum of 100 addresses per criterion.
8259
+ * Limited to a maximum of 300 addresses per criterion.
8260
8260
  */
8261
8261
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
8262
8262
  /**
@@ -9132,7 +9132,7 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
9132
9132
  /**
9133
9133
  * Array of EVM addresses to compare against.
9134
9134
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
9135
- * Limited to a maximum of 100 addresses per criterion.
9135
+ * Limited to a maximum of 300 addresses per criterion.
9136
9136
  */
9137
9137
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
9138
9138
  /**
@@ -9620,7 +9620,7 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
9620
9620
  /**
9621
9621
  * Array of EVM addresses to compare against.
9622
9622
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
9623
- * Limited to a maximum of 100 addresses per condition.
9623
+ * Limited to a maximum of 300 addresses per condition.
9624
9624
  */
9625
9625
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
9626
9626
  /**
@@ -9731,7 +9731,7 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
9731
9731
  /**
9732
9732
  * Array of EVM addresses allowed or disallowed as verifying contracts.
9733
9733
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
9734
- * Limited to a maximum of 100 addresses per criterion.
9734
+ * Limited to a maximum of 300 addresses per criterion.
9735
9735
  */
9736
9736
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
9737
9737
  /**
@@ -9846,7 +9846,7 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
9846
9846
  /**
9847
9847
  * Array of EVM addresses to compare against.
9848
9848
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
9849
- * Limited to a maximum of 100 addresses per criterion.
9849
+ * Limited to a maximum of 300 addresses per criterion.
9850
9850
  */
9851
9851
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
9852
9852
  /**
@@ -10335,7 +10335,7 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
10335
10335
  /**
10336
10336
  * Array of EVM addresses to compare against.
10337
10337
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
10338
- * Limited to a maximum of 100 addresses per criterion.
10338
+ * Limited to a maximum of 300 addresses per criterion.
10339
10339
  */
10340
10340
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
10341
10341
  /**
@@ -10770,7 +10770,7 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
10770
10770
  /**
10771
10771
  * Array of EVM addresses to compare against.
10772
10772
  * Each address must be a 0x-prefixed 40-character hexadecimal string.
10773
- * Limited to a maximum of 100 addresses per criterion.
10773
+ * Limited to a maximum of 300 addresses per criterion.
10774
10774
  */
10775
10775
  addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
10776
10776
  /**
@@ -1,2 +1,2 @@
1
- export declare const version = "1.27.0";
1
+ export declare const version = "1.28.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -52,6 +52,12 @@ export async function toNetworkScopedEvmServerAccount<Network extends string>(
52
52
  account: options.account,
53
53
  });
54
54
 
55
+ /*
56
+ * Determine the actual network name from the resolved chain
57
+ * This handles cases where options.network is an RPC URL
58
+ */
59
+ const resolvedNetworkName = mapChainToNetwork(chain) ?? options.network;
60
+
55
61
  const shouldUseApiForSends =
56
62
  chain.id === base.id ||
57
63
  chain.id === baseSepolia.id ||
@@ -124,7 +130,7 @@ export async function toNetworkScopedEvmServerAccount<Network extends string>(
124
130
  },
125
131
  } as NetworkScopedEvmServerAccount<Network>;
126
132
 
127
- if (isMethodSupportedOnNetwork("listTokenBalances", options.network)) {
133
+ if (isMethodSupportedOnNetwork("listTokenBalances", resolvedNetworkName)) {
128
134
  Object.assign(account, {
129
135
  listTokenBalances: async (
130
136
  listTokenBalancesOptions: Omit<ListTokenBalancesOptions, "address" | "network">,
@@ -137,7 +143,7 @@ export async function toNetworkScopedEvmServerAccount<Network extends string>(
137
143
  });
138
144
  }
139
145
 
140
- if (isMethodSupportedOnNetwork("requestFaucet", options.network)) {
146
+ if (isMethodSupportedOnNetwork("requestFaucet", resolvedNetworkName)) {
141
147
  Object.assign(account, {
142
148
  requestFaucet: async (faucetOptions: Omit<RequestFaucetOptions, "address" | "network">) => {
143
149
  return options.account.requestFaucet({
@@ -148,7 +154,7 @@ export async function toNetworkScopedEvmServerAccount<Network extends string>(
148
154
  });
149
155
  }
150
156
 
151
- if (isMethodSupportedOnNetwork("quoteFund", options.network)) {
157
+ if (isMethodSupportedOnNetwork("quoteFund", resolvedNetworkName)) {
152
158
  Object.assign(account, {
153
159
  quoteFund: async (quoteFundOptions: Omit<QuoteFundOptions, "address">) => {
154
160
  return options.account.quoteFund({
@@ -158,7 +164,7 @@ export async function toNetworkScopedEvmServerAccount<Network extends string>(
158
164
  });
159
165
  }
160
166
 
161
- if (isMethodSupportedOnNetwork("fund", options.network)) {
167
+ if (isMethodSupportedOnNetwork("fund", resolvedNetworkName)) {
162
168
  Object.assign(account, {
163
169
  fund: async (fundOptions: Omit<FundOptions, "address">) => {
164
170
  return options.account.fund({
@@ -171,7 +177,7 @@ export async function toNetworkScopedEvmServerAccount<Network extends string>(
171
177
  });
172
178
  }
173
179
 
174
- if (isMethodSupportedOnNetwork("quoteSwap", options.network)) {
180
+ if (isMethodSupportedOnNetwork("quoteSwap", resolvedNetworkName)) {
175
181
  Object.assign(account, {
176
182
  quoteSwap: async (quoteSwapOptions: AccountQuoteSwapOptions) => {
177
183
  return options.account.quoteSwap(quoteSwapOptions);
@@ -179,7 +185,7 @@ export async function toNetworkScopedEvmServerAccount<Network extends string>(
179
185
  });
180
186
  }
181
187
 
182
- if (isMethodSupportedOnNetwork("swap", options.network)) {
188
+ if (isMethodSupportedOnNetwork("swap", resolvedNetworkName)) {
183
189
  Object.assign(account, {
184
190
  swap: async (swapOptions: AccountSwapOptions) => {
185
191
  return options.account.swap(swapOptions);
@@ -7,14 +7,13 @@ import {
7
7
  } from "@solana/spl-token";
8
8
  import {
9
9
  Connection,
10
- MessageV0,
11
10
  PublicKey,
12
11
  SystemProgram,
13
- TransactionInstruction,
14
- TransactionMessage,
15
- VersionedTransaction,
12
+ SYSVAR_RECENT_BLOCKHASHES_PUBKEY,
13
+ Transaction,
16
14
  } from "@solana/web3.js";
17
15
 
16
+ import { sendTransaction } from "./sendTransaction.js";
18
17
  import {
19
18
  getConnectedNetwork,
20
19
  getOrCreateConnection,
@@ -61,11 +60,11 @@ export async function transfer(
61
60
  options: TransferOptions,
62
61
  ): Promise<SignatureResult> {
63
62
  const connection = getOrCreateConnection({ networkOrConnection: options.network });
63
+ const connectedNetwork = await getConnectedNetwork(connection);
64
64
 
65
65
  const tx =
66
66
  options.token === "sol"
67
67
  ? await getNativeTransfer({
68
- connection,
69
68
  from: options.from,
70
69
  to: options.to,
71
70
  amount: options.amount,
@@ -75,41 +74,29 @@ export async function transfer(
75
74
  from: options.from,
76
75
  to: options.to,
77
76
  mintAddress:
78
- options.token === "usdc"
79
- ? getUsdcMintAddress(await getConnectedNetwork(connection))
80
- : options.token,
77
+ options.token === "usdc" ? getUsdcMintAddress(connectedNetwork) : options.token,
81
78
  amount: options.amount,
82
79
  });
83
80
 
84
- const serializedTx = Buffer.from(tx.serialize()).toString("base64");
81
+ const serializedTx = Buffer.from(tx.serialize({ requireAllSignatures: false })).toString(
82
+ "base64",
83
+ );
85
84
 
86
- const signedTxResponse = await apiClient.signSolanaTransaction(options.from, {
85
+ const signature = await sendTransaction(apiClient, {
86
+ network: connectedNetwork === "mainnet" ? "solana" : "solana-devnet",
87
87
  transaction: serializedTx,
88
88
  });
89
89
 
90
- const decodedSignedTx = Buffer.from(signedTxResponse.signedTransaction, "base64");
91
-
92
- const signature = await connection.sendRawTransaction(decodedSignedTx, {
93
- skipPreflight: false,
94
- maxRetries: 3,
95
- });
96
-
97
- return { signature };
90
+ return signature;
98
91
  }
99
92
 
100
- type GetNativeTransferOptions = Omit<TransferOptions, "token" | "network"> & {
101
- /**
102
- * The connection to the Solana network
103
- */
104
- connection: Connection;
105
- };
93
+ type GetNativeTransferOptions = Omit<TransferOptions, "token" | "network">;
106
94
 
107
95
  /**
108
- * Gets the instructions for a native SOL transfer
96
+ * Gets the transaction for a native SOL transfer
109
97
  *
110
98
  * @param options - The options for the native SOL transfer
111
99
  *
112
- * @param options.connection - The Solana connection
113
100
  * @param options.from - The source address
114
101
  * @param options.to - The destination address
115
102
  * @param options.amount - The amount to transfer
@@ -117,39 +104,37 @@ type GetNativeTransferOptions = Omit<TransferOptions, "token" | "network"> & {
117
104
  * @returns The native SOL transfer transaction
118
105
  */
119
106
  async function getNativeTransfer({
120
- connection,
121
107
  from,
122
108
  to,
123
109
  amount,
124
- }: GetNativeTransferOptions): Promise<VersionedTransaction> {
125
- const { blockhash } = await connection.getLatestBlockhash();
126
-
127
- const instructions = [
110
+ }: GetNativeTransferOptions): Promise<Transaction> {
111
+ const transaction = new Transaction();
112
+ transaction.add(
128
113
  SystemProgram.transfer({
129
114
  fromPubkey: new PublicKey(from),
130
115
  toPubkey: new PublicKey(to),
131
116
  lamports: amount,
132
117
  }),
133
- ];
134
-
135
- const messageV0 = new TransactionMessage({
136
- payerKey: new PublicKey(from),
137
- recentBlockhash: blockhash,
138
- instructions,
139
- }).compileToV0Message();
118
+ );
119
+ transaction.recentBlockhash = SYSVAR_RECENT_BLOCKHASHES_PUBKEY.toBase58();
120
+ transaction.feePayer = new PublicKey(from);
140
121
 
141
- return new VersionedTransaction(messageV0);
122
+ return transaction;
142
123
  }
143
124
 
144
- type GetSplTransferOptions = GetNativeTransferOptions & {
125
+ type GetSplTransferOptions = Omit<TransferOptions, "token" | "network"> & {
145
126
  /**
146
127
  * The mint address of the token
147
128
  */
148
129
  mintAddress: string;
130
+ /**
131
+ * The connection to the Solana network.
132
+ */
133
+ connection: Connection;
149
134
  };
150
135
 
151
136
  /**
152
- * Gets the instructions for a SPL token transfer
137
+ * Gets the transaction for a SPL token transfer
153
138
  *
154
139
  * @param options - The options for the SPL token transfer
155
140
  *
@@ -167,7 +152,7 @@ async function getSplTransfer({
167
152
  to,
168
153
  mintAddress,
169
154
  amount,
170
- }: GetSplTransferOptions): Promise<VersionedTransaction> {
155
+ }: GetSplTransferOptions): Promise<Transaction> {
171
156
  const fromPubkey = new PublicKey(from);
172
157
  const toPubkey = new PublicKey(to);
173
158
  const mintPubkey = new PublicKey(mintAddress);
@@ -182,7 +167,7 @@ async function getSplTransfer({
182
167
  const sourceAta = await getAssociatedTokenAddress(mintPubkey, fromPubkey);
183
168
  const destinationAta = await getAssociatedTokenAddress(mintPubkey, toPubkey);
184
169
 
185
- const instructions: TransactionInstruction[] = [];
170
+ const transaction = new Transaction();
186
171
 
187
172
  const sourceAccount = await getAccount(connection, sourceAta);
188
173
  if (sourceAccount.amount < amount) {
@@ -193,12 +178,12 @@ async function getSplTransfer({
193
178
  try {
194
179
  await getAccount(connection, destinationAta);
195
180
  } catch {
196
- instructions.push(
181
+ transaction.add(
197
182
  createAssociatedTokenAccountInstruction(fromPubkey, destinationAta, toPubkey, mintPubkey),
198
183
  );
199
184
  }
200
185
 
201
- instructions.push(
186
+ transaction.add(
202
187
  createTransferCheckedInstruction(
203
188
  sourceAta,
204
189
  mintPubkey,
@@ -208,12 +193,8 @@ async function getSplTransfer({
208
193
  mintInfo.decimals,
209
194
  ),
210
195
  );
196
+ transaction.recentBlockhash = SYSVAR_RECENT_BLOCKHASHES_PUBKEY.toBase58();
197
+ transaction.feePayer = new PublicKey(from);
211
198
 
212
- return new VersionedTransaction(
213
- MessageV0.compile({
214
- payerKey: fromPubkey,
215
- instructions: instructions,
216
- recentBlockhash: (await connection.getLatestBlockhash()).blockhash,
217
- }),
218
- );
199
+ return transaction;
219
200
  }