@coinbase/cdp-sdk 1.16.0 → 1.18.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 +12 -0
- package/_cjs/accounts/evm/resolveViemClients.js +204 -0
- package/_cjs/accounts/evm/resolveViemClients.js.map +1 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js +7 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +8 -0
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js +59 -0
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -0
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +26 -0
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -0
- package/_cjs/client/policies/policies.js +6 -2
- package/_cjs/client/policies/policies.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +45 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js +48 -0
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +35 -0
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/index.msw.js +5 -5
- package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +342 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.msw.js +40 -0
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.msw.js.map +1 -1
- package/_cjs/policies/schema.js +83 -2
- package/_cjs/policies/schema.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/resolveViemClients.js +168 -0
- package/_esm/accounts/evm/resolveViemClients.js.map +1 -0
- package/_esm/accounts/evm/toEvmServerAccount.js +7 -0
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +8 -0
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js +56 -0
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -0
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +23 -0
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -0
- package/_esm/client/policies/policies.js +7 -3
- package/_esm/client/policies/policies.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +44 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js +48 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +35 -0
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -1
- package/_esm/openapi-client/generated/index.msw.js +5 -5
- package/_esm/openapi-client/generated/index.msw.js.map +1 -1
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +321 -0
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.msw.js +40 -0
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.msw.js.map +1 -1
- package/_esm/policies/schema.js +83 -2
- package/_esm/policies/schema.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/resolveViemClients.d.ts +47 -0
- package/_types/accounts/evm/resolveViemClients.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/toNetworkScopedEvmServerAccount.d.ts +23 -0
- package/_types/accounts/evm/toNetworkScopedEvmServerAccount.d.ts.map +1 -0
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts +27 -0
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -0
- package/_types/accounts/evm/types.d.ts +30 -6
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +1 -1
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/client/policies/policies.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +182 -2
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/index.msw.d.ts +5 -5
- package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts +21 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.msw.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/schema.d.ts +3780 -7
- package/_types/policies/schema.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/resolveViemClients.ts +215 -0
- package/accounts/evm/toEvmServerAccount.ts +7 -0
- package/accounts/evm/toEvmSmartAccount.ts +8 -0
- package/accounts/evm/toNetworkScopedEvmServerAccount.ts +82 -0
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +41 -0
- package/accounts/evm/types.ts +50 -11
- package/client/evm/evm.types.ts +1 -1
- package/client/policies/policies.ts +12 -3
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +221 -2
- package/openapi-client/generated/evm-accounts/evm-accounts.msw.ts +48 -0
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.ts +35 -0
- package/openapi-client/generated/faucets/faucets.ts +4 -4
- package/openapi-client/generated/index.msw.ts +5 -5
- package/openapi-client/generated/policy-engine/policy-engine.msw.ts +434 -0
- package/openapi-client/generated/solana-accounts/solana-accounts.msw.ts +40 -0
- package/package.json +1 -1
- package/policies/schema.ts +94 -6
- package/version.ts +1 -1
|
@@ -20,6 +20,10 @@ Account names are guaranteed to be unique across all EVM accounts in the develop
|
|
|
20
20
|
name?: string;
|
|
21
21
|
/** The list of policy IDs that apply to the account. This will include both the project-level policy and the account-level policy, if one exists. */
|
|
22
22
|
policies?: string[];
|
|
23
|
+
/** The UTC ISO 8601 timestamp at which the account was created. */
|
|
24
|
+
createdAt?: string;
|
|
25
|
+
/** The UTC ISO 8601 timestamp at which the account was last updated. */
|
|
26
|
+
updatedAt?: string;
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
export interface ListResponse {
|
|
@@ -44,6 +48,7 @@ export const ErrorType = {
|
|
|
44
48
|
invalid_signature: "invalid_signature",
|
|
45
49
|
malformed_transaction: "malformed_transaction",
|
|
46
50
|
not_found: "not_found",
|
|
51
|
+
payment_method_required: "payment_method_required",
|
|
47
52
|
rate_limit_exceeded: "rate_limit_exceeded",
|
|
48
53
|
request_canceled: "request_canceled",
|
|
49
54
|
service_unavailable: "service_unavailable",
|
|
@@ -129,6 +134,10 @@ Account names are guaranteed to be unique across all Smart Accounts in the devel
|
|
|
129
134
|
* @pattern ^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
130
135
|
*/
|
|
131
136
|
name?: string;
|
|
137
|
+
/** The UTC ISO 8601 timestamp at which the account was created. */
|
|
138
|
+
createdAt?: string;
|
|
139
|
+
/** The UTC ISO 8601 timestamp at which the account was last updated. */
|
|
140
|
+
updatedAt?: string;
|
|
132
141
|
}
|
|
133
142
|
|
|
134
143
|
export interface EvmCall {
|
|
@@ -170,6 +179,7 @@ export const EvmUserOperationStatus = {
|
|
|
170
179
|
signed: "signed",
|
|
171
180
|
broadcast: "broadcast",
|
|
172
181
|
complete: "complete",
|
|
182
|
+
dropped: "dropped",
|
|
173
183
|
failed: "failed",
|
|
174
184
|
} as const;
|
|
175
185
|
|
|
@@ -601,7 +611,201 @@ export interface EvmAddressCriterion {
|
|
|
601
611
|
operator: EvmAddressCriterionOperator;
|
|
602
612
|
}
|
|
603
613
|
|
|
604
|
-
|
|
614
|
+
/**
|
|
615
|
+
* A reference to an established EIP standard. When referencing a `KnownAbiType` within a policy rule configuring an `EvmDataCriterion`, criteria will only decode function data officially documented in the standard. For more information on supported token standards, see the links below.
|
|
616
|
+
- [erc20 - Token Standard](https://eips.ethereum.org/EIPS/eip-20).
|
|
617
|
+
- [erc721 - Non-Fungible Token Standard](https://eips.ethereum.org/EIPS/eip-721).
|
|
618
|
+
- [erc1155 - Multi Token Standard](https://eips.ethereum.org/EIPS/eip-1155).
|
|
619
|
+
*/
|
|
620
|
+
export type KnownAbiType = (typeof KnownAbiType)[keyof typeof KnownAbiType];
|
|
621
|
+
|
|
622
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
623
|
+
export const KnownAbiType = {
|
|
624
|
+
erc20: "erc20",
|
|
625
|
+
erc721: "erc721",
|
|
626
|
+
erc1155: "erc1155",
|
|
627
|
+
} as const;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Parameter definition for ABI functions, errors, and constructors.
|
|
631
|
+
*/
|
|
632
|
+
export interface AbiParameter {
|
|
633
|
+
/** The name of the parameter. */
|
|
634
|
+
name?: string;
|
|
635
|
+
/** The canonical type of the parameter. */
|
|
636
|
+
type: string;
|
|
637
|
+
/** The internal Solidity type used by the compiler. */
|
|
638
|
+
internalType?: string;
|
|
639
|
+
/** Used for tuple types. */
|
|
640
|
+
components?: AbiParameter[];
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* State mutability of a function in Solidity.
|
|
645
|
+
*/
|
|
646
|
+
export type AbiStateMutability = (typeof AbiStateMutability)[keyof typeof AbiStateMutability];
|
|
647
|
+
|
|
648
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
649
|
+
export const AbiStateMutability = {
|
|
650
|
+
pure: "pure",
|
|
651
|
+
view: "view",
|
|
652
|
+
nonpayable: "nonpayable",
|
|
653
|
+
payable: "payable",
|
|
654
|
+
} as const;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* The type of the ABI item, must be `function`.
|
|
658
|
+
*/
|
|
659
|
+
export type AbiFunctionType = (typeof AbiFunctionType)[keyof typeof AbiFunctionType];
|
|
660
|
+
|
|
661
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
662
|
+
export const AbiFunctionType = {
|
|
663
|
+
function: "function",
|
|
664
|
+
} as const;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* ABI function type for contract functions.
|
|
668
|
+
*/
|
|
669
|
+
export interface AbiFunction {
|
|
670
|
+
/** The type of the ABI item, must be `function`. */
|
|
671
|
+
type: AbiFunctionType;
|
|
672
|
+
/** The name of the ABI function. */
|
|
673
|
+
name: string;
|
|
674
|
+
/** The list of ABI parameters used for this function. */
|
|
675
|
+
inputs: AbiParameter[];
|
|
676
|
+
/** The values returned by this function. */
|
|
677
|
+
outputs: AbiParameter[];
|
|
678
|
+
/** Deprecated. Use pure or view from stateMutability instead. */
|
|
679
|
+
constant?: boolean;
|
|
680
|
+
/** Deprecated. Use payable or nonpayable from `stateMutability` instead. */
|
|
681
|
+
payable?: boolean;
|
|
682
|
+
stateMutability: AbiStateMutability;
|
|
683
|
+
/** Deprecated. Vyper used to provide gas estimates. */
|
|
684
|
+
gas?: number;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* The type of the ABI item.
|
|
689
|
+
*/
|
|
690
|
+
export type AbiInputType = (typeof AbiInputType)[keyof typeof AbiInputType];
|
|
691
|
+
|
|
692
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
693
|
+
export const AbiInputType = {
|
|
694
|
+
constructor: "constructor",
|
|
695
|
+
error: "error",
|
|
696
|
+
event: "event",
|
|
697
|
+
fallback: "fallback",
|
|
698
|
+
receive: "receive",
|
|
699
|
+
} as const;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Generic ABI item type encapsulating all other types besides `function`.
|
|
703
|
+
*/
|
|
704
|
+
export interface AbiInput {
|
|
705
|
+
/** The type of the ABI item. */
|
|
706
|
+
type: AbiInputType;
|
|
707
|
+
/** For additional information on the ABI JSON specification, see [the Solidity documentation](https://docs.soliditylang.org/en/latest/abi-spec.html#json). */
|
|
708
|
+
additionalProperties?: unknown;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export type AbiItem = AbiFunction | AbiInput;
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Contract ABI Specification following Solidity's external JSON interface format.
|
|
715
|
+
*/
|
|
716
|
+
export type Abi = AbiItem[];
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
720
|
+
*/
|
|
721
|
+
export type EvmDataParameterConditionOperator =
|
|
722
|
+
(typeof EvmDataParameterConditionOperator)[keyof typeof EvmDataParameterConditionOperator];
|
|
723
|
+
|
|
724
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
725
|
+
export const EvmDataParameterConditionOperator = {
|
|
726
|
+
">": ">",
|
|
727
|
+
">=": ">=",
|
|
728
|
+
"<": "<",
|
|
729
|
+
"<=": "<=",
|
|
730
|
+
"==": "==",
|
|
731
|
+
} as const;
|
|
732
|
+
|
|
733
|
+
export interface EvmDataParameterCondition {
|
|
734
|
+
/** The name of the parameter to check against a transaction's calldata. If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter. */
|
|
735
|
+
name: string;
|
|
736
|
+
/** The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side. */
|
|
737
|
+
operator: EvmDataParameterConditionOperator;
|
|
738
|
+
/** A single value to compare the value resolved at `name` to. All values are encoded as strings. Refer to the table in the documentation for how values should be encoded, and which operators are supported for each type. */
|
|
739
|
+
value: string;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
744
|
+
*/
|
|
745
|
+
export type EvmDataParameterConditionListOperator =
|
|
746
|
+
(typeof EvmDataParameterConditionListOperator)[keyof typeof EvmDataParameterConditionListOperator];
|
|
747
|
+
|
|
748
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
749
|
+
export const EvmDataParameterConditionListOperator = {
|
|
750
|
+
in: "in",
|
|
751
|
+
not_in: "not in",
|
|
752
|
+
} as const;
|
|
753
|
+
|
|
754
|
+
export interface EvmDataParameterConditionList {
|
|
755
|
+
/** The name of the parameter to check against a transaction's calldata. If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter. */
|
|
756
|
+
name: string;
|
|
757
|
+
/** The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `values` field will be on the right-hand side. */
|
|
758
|
+
operator: EvmDataParameterConditionListOperator;
|
|
759
|
+
/** Values to compare against the resolved `name` value. All values are encoded as strings. Refer to the table in the documentation for how values should be encoded, and which operators are supported for each type. */
|
|
760
|
+
values: string[];
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* A list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
765
|
+
*/
|
|
766
|
+
export type EvmDataConditionParamsItem = EvmDataParameterCondition | EvmDataParameterConditionList;
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* A single condition to apply against the function and encoded arguments in the transaction's `data` field. Each `parameter` configuration must be successfully evaluated against the corresponding function argument in order for a policy to be accepted.
|
|
770
|
+
*/
|
|
771
|
+
export interface EvmDataCondition {
|
|
772
|
+
/** The name of a smart contract function being called. */
|
|
773
|
+
function: string;
|
|
774
|
+
/** An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field. */
|
|
775
|
+
params?: EvmDataConditionParamsItem[];
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* The type of criterion to use. This should be `evmData`.
|
|
780
|
+
*/
|
|
781
|
+
export type EvmDataCriterionType = (typeof EvmDataCriterionType)[keyof typeof EvmDataCriterionType];
|
|
782
|
+
|
|
783
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
784
|
+
export const EvmDataCriterionType = {
|
|
785
|
+
evmData: "evmData",
|
|
786
|
+
} as const;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
790
|
+
*/
|
|
791
|
+
export type EvmDataCriterionAbi = KnownAbiType | Abi;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* A schema for specifying a criterion for the `data` field of an EVM transaction.
|
|
795
|
+
*/
|
|
796
|
+
export interface EvmDataCriterion {
|
|
797
|
+
/** The type of criterion to use. This should be `evmData`. */
|
|
798
|
+
type: EvmDataCriterionType;
|
|
799
|
+
/** The ABI of the smart contract being called. This can be a partial structure with only specific functions. */
|
|
800
|
+
abi: EvmDataCriterionAbi;
|
|
801
|
+
/** A list of conditions to apply against the function and encoded arguments in the transaction's `data` field. Each condition must be met in order for this policy to be accepted or rejected. */
|
|
802
|
+
conditions: EvmDataCondition[];
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
export type SignEvmTransactionCriteriaItem =
|
|
806
|
+
| EthValueCriterion
|
|
807
|
+
| EvmAddressCriterion
|
|
808
|
+
| EvmDataCriterion;
|
|
605
809
|
|
|
606
810
|
/**
|
|
607
811
|
* A schema for specifying criteria for the SignEvmTransaction operation.
|
|
@@ -689,7 +893,8 @@ export interface EvmNetworkCriterion {
|
|
|
689
893
|
export type SendEvmTransactionCriteriaItem =
|
|
690
894
|
| EthValueCriterion
|
|
691
895
|
| EvmAddressCriterion
|
|
692
|
-
| EvmNetworkCriterion
|
|
896
|
+
| EvmNetworkCriterion
|
|
897
|
+
| EvmDataCriterion;
|
|
693
898
|
|
|
694
899
|
/**
|
|
695
900
|
* A schema for specifying criteria for the SignEvmTransaction operation.
|
|
@@ -943,6 +1148,10 @@ Account names are guaranteed to be unique across all Solana accounts in the deve
|
|
|
943
1148
|
name?: string;
|
|
944
1149
|
/** The list of policy IDs that apply to the account. This will include both the project-level policy and the account-level policy, if one exists. */
|
|
945
1150
|
policies?: string[];
|
|
1151
|
+
/** The ISO 8601 UTC timestamp at which the account was created. */
|
|
1152
|
+
createdAt?: string;
|
|
1153
|
+
/** The ISO 8601 UTC timestamp at which the account was last updated. */
|
|
1154
|
+
updatedAt?: string;
|
|
946
1155
|
}
|
|
947
1156
|
|
|
948
1157
|
/**
|
|
@@ -1190,6 +1399,11 @@ export type BadGatewayErrorResponse = Error;
|
|
|
1190
1399
|
*/
|
|
1191
1400
|
export type ServiceUnavailableErrorResponse = Error;
|
|
1192
1401
|
|
|
1402
|
+
/**
|
|
1403
|
+
* A payment method is required to complete this operation.
|
|
1404
|
+
*/
|
|
1405
|
+
export type PaymentMethodRequiredErrorResponse = Error;
|
|
1406
|
+
|
|
1193
1407
|
/**
|
|
1194
1408
|
* Idempotency key conflict.
|
|
1195
1409
|
*/
|
|
@@ -1363,6 +1577,11 @@ Account names must be unique across all EVM accounts in the developer's CDP Proj
|
|
|
1363
1577
|
* @pattern ^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
1364
1578
|
*/
|
|
1365
1579
|
name?: string;
|
|
1580
|
+
/**
|
|
1581
|
+
* The ID of the account-level policy to apply to the account.
|
|
1582
|
+
* @pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
|
|
1583
|
+
*/
|
|
1584
|
+
accountPolicy?: string;
|
|
1366
1585
|
};
|
|
1367
1586
|
|
|
1368
1587
|
export type ExportEvmAccountBody = {
|
|
@@ -38,6 +38,14 @@ export const getListEvmAccountsResponseMock = (): ListEvmAccounts200 => ({
|
|
|
38
38
|
),
|
|
39
39
|
undefined,
|
|
40
40
|
]),
|
|
41
|
+
createdAt: faker.helpers.arrayElement([
|
|
42
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
43
|
+
undefined,
|
|
44
|
+
]),
|
|
45
|
+
updatedAt: faker.helpers.arrayElement([
|
|
46
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
47
|
+
undefined,
|
|
48
|
+
]),
|
|
41
49
|
}),
|
|
42
50
|
),
|
|
43
51
|
},
|
|
@@ -60,6 +68,14 @@ export const getCreateEvmAccountResponseMock = (
|
|
|
60
68
|
),
|
|
61
69
|
undefined,
|
|
62
70
|
]),
|
|
71
|
+
createdAt: faker.helpers.arrayElement([
|
|
72
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
73
|
+
undefined,
|
|
74
|
+
]),
|
|
75
|
+
updatedAt: faker.helpers.arrayElement([
|
|
76
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
77
|
+
undefined,
|
|
78
|
+
]),
|
|
63
79
|
...overrideResponse,
|
|
64
80
|
});
|
|
65
81
|
|
|
@@ -79,6 +95,14 @@ export const getGetEvmAccountResponseMock = (
|
|
|
79
95
|
),
|
|
80
96
|
undefined,
|
|
81
97
|
]),
|
|
98
|
+
createdAt: faker.helpers.arrayElement([
|
|
99
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
100
|
+
undefined,
|
|
101
|
+
]),
|
|
102
|
+
updatedAt: faker.helpers.arrayElement([
|
|
103
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
104
|
+
undefined,
|
|
105
|
+
]),
|
|
82
106
|
...overrideResponse,
|
|
83
107
|
});
|
|
84
108
|
|
|
@@ -98,6 +122,14 @@ export const getUpdateEvmAccountResponseMock = (
|
|
|
98
122
|
),
|
|
99
123
|
undefined,
|
|
100
124
|
]),
|
|
125
|
+
createdAt: faker.helpers.arrayElement([
|
|
126
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
127
|
+
undefined,
|
|
128
|
+
]),
|
|
129
|
+
updatedAt: faker.helpers.arrayElement([
|
|
130
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
131
|
+
undefined,
|
|
132
|
+
]),
|
|
101
133
|
...overrideResponse,
|
|
102
134
|
});
|
|
103
135
|
|
|
@@ -117,6 +149,14 @@ export const getGetEvmAccountByNameResponseMock = (
|
|
|
117
149
|
),
|
|
118
150
|
undefined,
|
|
119
151
|
]),
|
|
152
|
+
createdAt: faker.helpers.arrayElement([
|
|
153
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
154
|
+
undefined,
|
|
155
|
+
]),
|
|
156
|
+
updatedAt: faker.helpers.arrayElement([
|
|
157
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
158
|
+
undefined,
|
|
159
|
+
]),
|
|
120
160
|
...overrideResponse,
|
|
121
161
|
});
|
|
122
162
|
|
|
@@ -156,6 +196,14 @@ export const getImportEvmAccountResponseMock = (
|
|
|
156
196
|
),
|
|
157
197
|
undefined,
|
|
158
198
|
]),
|
|
199
|
+
createdAt: faker.helpers.arrayElement([
|
|
200
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
201
|
+
undefined,
|
|
202
|
+
]),
|
|
203
|
+
updatedAt: faker.helpers.arrayElement([
|
|
204
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
205
|
+
undefined,
|
|
206
|
+
]),
|
|
159
207
|
...overrideResponse,
|
|
160
208
|
});
|
|
161
209
|
|
|
@@ -27,6 +27,14 @@ export const getListEvmSmartAccountsResponseMock = (): ListEvmSmartAccounts200 =
|
|
|
27
27
|
faker.helpers.fromRegExp("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"),
|
|
28
28
|
undefined,
|
|
29
29
|
]),
|
|
30
|
+
createdAt: faker.helpers.arrayElement([
|
|
31
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
32
|
+
undefined,
|
|
33
|
+
]),
|
|
34
|
+
updatedAt: faker.helpers.arrayElement([
|
|
35
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
36
|
+
undefined,
|
|
37
|
+
]),
|
|
30
38
|
}),
|
|
31
39
|
),
|
|
32
40
|
},
|
|
@@ -44,6 +52,14 @@ export const getCreateEvmSmartAccountResponseMock = (
|
|
|
44
52
|
faker.helpers.fromRegExp("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"),
|
|
45
53
|
undefined,
|
|
46
54
|
]),
|
|
55
|
+
createdAt: faker.helpers.arrayElement([
|
|
56
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
57
|
+
undefined,
|
|
58
|
+
]),
|
|
59
|
+
updatedAt: faker.helpers.arrayElement([
|
|
60
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
61
|
+
undefined,
|
|
62
|
+
]),
|
|
47
63
|
...overrideResponse,
|
|
48
64
|
});
|
|
49
65
|
|
|
@@ -58,6 +74,14 @@ export const getGetEvmSmartAccountByNameResponseMock = (
|
|
|
58
74
|
faker.helpers.fromRegExp("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"),
|
|
59
75
|
undefined,
|
|
60
76
|
]),
|
|
77
|
+
createdAt: faker.helpers.arrayElement([
|
|
78
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
79
|
+
undefined,
|
|
80
|
+
]),
|
|
81
|
+
updatedAt: faker.helpers.arrayElement([
|
|
82
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
83
|
+
undefined,
|
|
84
|
+
]),
|
|
61
85
|
...overrideResponse,
|
|
62
86
|
});
|
|
63
87
|
|
|
@@ -72,6 +96,14 @@ export const getGetEvmSmartAccountResponseMock = (
|
|
|
72
96
|
faker.helpers.fromRegExp("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"),
|
|
73
97
|
undefined,
|
|
74
98
|
]),
|
|
99
|
+
createdAt: faker.helpers.arrayElement([
|
|
100
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
101
|
+
undefined,
|
|
102
|
+
]),
|
|
103
|
+
updatedAt: faker.helpers.arrayElement([
|
|
104
|
+
`${faker.date.past().toISOString().split(".")[0]}Z`,
|
|
105
|
+
undefined,
|
|
106
|
+
]),
|
|
75
107
|
...overrideResponse,
|
|
76
108
|
});
|
|
77
109
|
|
|
@@ -90,6 +122,7 @@ export const getPrepareUserOperationResponseMock = (
|
|
|
90
122
|
"signed",
|
|
91
123
|
"broadcast",
|
|
92
124
|
"complete",
|
|
125
|
+
"dropped",
|
|
93
126
|
"failed",
|
|
94
127
|
] as const),
|
|
95
128
|
transactionHash: faker.helpers.arrayElement([
|
|
@@ -114,6 +147,7 @@ export const getGetUserOperationResponseMock = (
|
|
|
114
147
|
"signed",
|
|
115
148
|
"broadcast",
|
|
116
149
|
"complete",
|
|
150
|
+
"dropped",
|
|
117
151
|
"failed",
|
|
118
152
|
] as const),
|
|
119
153
|
transactionHash: faker.helpers.arrayElement([
|
|
@@ -138,6 +172,7 @@ export const getSendUserOperationResponseMock = (
|
|
|
138
172
|
"signed",
|
|
139
173
|
"broadcast",
|
|
140
174
|
"complete",
|
|
175
|
+
"dropped",
|
|
141
176
|
"failed",
|
|
142
177
|
] as const),
|
|
143
178
|
transactionHash: faker.helpers.arrayElement([
|
|
@@ -21,8 +21,8 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
|
21
21
|
|
|
22
22
|
Faucets are available for ETH, USDC, EURC, and cbBTC on Base Sepolia and Ethereum Sepolia, and for ETH only on Ethereum Hoodi.
|
|
23
23
|
|
|
24
|
-
To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
|
|
25
|
-
These limits are applied at both the CDP User level and the blockchain address level.
|
|
24
|
+
To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
|
|
25
|
+
These limits are applied at both the CDP User level and the blockchain address level.
|
|
26
26
|
A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
|
|
27
27
|
|
|
28
28
|
| Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
|
|
@@ -53,8 +53,8 @@ export const requestEvmFaucet = (
|
|
|
53
53
|
|
|
54
54
|
Faucets are available for SOL.
|
|
55
55
|
|
|
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.
|
|
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.
|
|
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|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./evm-accounts/evm-accounts.msw.js";
|
|
2
|
-
export * from "./evm-swaps/evm-swaps.msw.js";
|
|
3
|
-
export * from "./solana-accounts/solana-accounts.msw.js";
|
|
4
|
-
export * from "./policy-engine/policy-engine.msw.js";
|
|
5
1
|
export * from "./evm-token-balances/evm-token-balances.msw.js";
|
|
2
|
+
export * from "./evm-accounts/evm-accounts.msw.js";
|
|
3
|
+
export * from "./evm-smart-accounts/evm-smart-accounts.msw.js";
|
|
6
4
|
export * from "./faucets/faucets.msw.js";
|
|
5
|
+
export * from "./evm-swaps/evm-swaps.msw.js";
|
|
7
6
|
export * from "./payments-alpha/payments-alpha.msw.js";
|
|
8
|
-
export * from "./
|
|
7
|
+
export * from "./policy-engine/policy-engine.msw.js";
|
|
8
|
+
export * from "./solana-accounts/solana-accounts.msw.js";
|