@coinbase/cdp-sdk 1.15.0 → 1.17.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 +20 -0
- package/README.md +82 -20
- package/_cjs/accounts/evm/toEvmServerAccount.js +20 -7
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +26 -0
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js +28 -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/actions/evm/signAndWrapTypedDataForSmartAccount.js +186 -0
- package/_cjs/actions/evm/signAndWrapTypedDataForSmartAccount.js.map +1 -0
- package/_cjs/actions/evm/swap/createSwapQuote.js +26 -8
- package/_cjs/actions/evm/swap/createSwapQuote.js.map +1 -1
- package/_cjs/actions/evm/swap/getSwapPrice.js +3 -2
- package/_cjs/actions/evm/swap/getSwapPrice.js.map +1 -1
- package/_cjs/actions/evm/swap/sendSwapOperation.js +153 -0
- package/_cjs/actions/evm/swap/sendSwapOperation.js.map +1 -0
- package/_cjs/actions/evm/swap/sendSwapTransaction.js +16 -2
- package/_cjs/actions/evm/swap/sendSwapTransaction.js.map +1 -1
- package/_cjs/client/evm/evm.js +13 -6
- package/_cjs/client/evm/evm.js.map +1 -1
- 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/utils/uuidV4.js +26 -0
- package/_cjs/utils/uuidV4.js.map +1 -0
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js +21 -8
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +26 -0
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js +25 -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/actions/evm/signAndWrapTypedDataForSmartAccount.js +181 -0
- package/_esm/actions/evm/signAndWrapTypedDataForSmartAccount.js.map +1 -0
- package/_esm/actions/evm/swap/createSwapQuote.js +26 -8
- package/_esm/actions/evm/swap/createSwapQuote.js.map +1 -1
- package/_esm/actions/evm/swap/getSwapPrice.js +3 -2
- package/_esm/actions/evm/swap/getSwapPrice.js.map +1 -1
- package/_esm/actions/evm/swap/sendSwapOperation.js +150 -0
- package/_esm/actions/evm/swap/sendSwapOperation.js.map +1 -0
- package/_esm/actions/evm/swap/sendSwapTransaction.js +16 -2
- package/_esm/actions/evm/swap/sendSwapTransaction.js.map +1 -1
- package/_esm/client/evm/evm.js +14 -7
- package/_esm/client/evm/evm.js.map +1 -1
- 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/utils/uuidV4.js +23 -0
- package/_esm/utils/uuidV4.js.map +1 -0
- package/_esm/version.js +1 -1
- 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 +26 -9
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/actions/evm/signAndWrapTypedDataForSmartAccount.d.ts +133 -0
- package/_types/actions/evm/signAndWrapTypedDataForSmartAccount.d.ts.map +1 -0
- package/_types/actions/evm/swap/createSwapQuote.d.ts.map +1 -1
- package/_types/actions/evm/swap/getSwapPrice.d.ts +2 -1
- package/_types/actions/evm/swap/getSwapPrice.d.ts.map +1 -1
- package/_types/actions/evm/swap/sendSwapOperation.d.ts +64 -0
- package/_types/actions/evm/swap/sendSwapOperation.d.ts.map +1 -0
- package/_types/actions/evm/swap/sendSwapTransaction.d.ts.map +1 -1
- package/_types/actions/evm/swap/types.d.ts +131 -5
- package/_types/actions/evm/swap/types.d.ts.map +1 -1
- package/_types/actions/evm/types.d.ts +112 -21
- package/_types/actions/evm/types.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +33 -7
- 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/utils/uuidV4.d.ts +10 -0
- package/_types/utils/uuidV4.d.ts.map +1 -0
- package/_types/version.d.ts +1 -1
- package/accounts/evm/toEvmServerAccount.ts +40 -15
- package/accounts/evm/toEvmSmartAccount.ts +33 -0
- package/accounts/evm/toNetworkScopedEvmServerAccount.ts +42 -0
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +41 -0
- package/accounts/evm/types.ts +46 -17
- package/actions/evm/signAndWrapTypedDataForSmartAccount.ts +246 -0
- package/actions/evm/swap/createSwapQuote.ts +42 -17
- package/actions/evm/swap/getSwapPrice.ts +15 -11
- package/actions/evm/swap/sendSwapOperation.ts +182 -0
- package/actions/evm/swap/sendSwapTransaction.ts +18 -2
- package/actions/evm/swap/types.ts +154 -5
- package/actions/evm/types.ts +123 -21
- package/client/evm/evm.ts +19 -8
- package/client/evm/evm.types.ts +34 -7
- 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/utils/uuidV4.ts +23 -0
- package/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../policies/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,oBAAoB,yCAAuC,CAAC;AACzE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,sBAAsB,6BAA2B,CAAC;AAC/D;;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;;eAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsRH,CAAC;AACH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministically generates a UUIDv4 from a given input string.
|
|
3
|
+
* This is necessary when we need to generate downstream idempotency keys for operations that have multiple calls.
|
|
4
|
+
*
|
|
5
|
+
* @param input - The input string to derive from
|
|
6
|
+
* @param salt - Optional salt to append to the input (defaults to "salt")
|
|
7
|
+
* @returns A UUIDv4 formatted string
|
|
8
|
+
*/
|
|
9
|
+
export declare function createDeterministicUuidV4(input: string, salt?: string): string;
|
|
10
|
+
//# sourceMappingURL=uuidV4.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuidV4.d.ts","sourceRoot":"","sources":["../../utils/uuidV4.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,SAAS,GAAG,MAAM,CAY9E"}
|
package/_types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.
|
|
1
|
+
export declare const version = "1.17.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type TransactionSerializable,
|
|
3
|
+
type TypedDataDefinition,
|
|
4
|
+
type TypedData,
|
|
5
|
+
type HashTypedDataParameters,
|
|
6
|
+
getTypesForEIP712Domain,
|
|
7
|
+
serializeTransaction,
|
|
8
|
+
} from "viem";
|
|
2
9
|
|
|
10
|
+
import { toNetworkScopedEvmServerAccount } from "./toNetworkScopedEvmServerAccount.js";
|
|
3
11
|
import { FundOptions, fund } from "../../actions/evm/fund/fund.js";
|
|
4
12
|
import { Quote } from "../../actions/evm/fund/Quote.js";
|
|
5
13
|
import { QuoteFundOptions, quoteFund } from "../../actions/evm/fund/quoteFund.js";
|
|
@@ -31,13 +39,13 @@ import type {
|
|
|
31
39
|
TransactionResult,
|
|
32
40
|
} from "../../actions/evm/sendTransaction.js";
|
|
33
41
|
import type {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
AccountSwapOptions,
|
|
43
|
+
AccountSwapResult,
|
|
44
|
+
AccountQuoteSwapOptions,
|
|
45
|
+
AccountQuoteSwapResult,
|
|
38
46
|
} from "../../actions/evm/swap/types.js";
|
|
39
47
|
import type { CdpOpenApiClientType, EvmAccount } from "../../openapi-client/index.js";
|
|
40
|
-
import type { Address,
|
|
48
|
+
import type { Address, EIP712Domain, Hash, Hex } from "../../types/misc.js";
|
|
41
49
|
|
|
42
50
|
/**
|
|
43
51
|
* Options for converting a pre-existing EvmAccount to a EvmServerAccount.
|
|
@@ -83,13 +91,24 @@ export function toEvmServerAccount(
|
|
|
83
91
|
return result.signedTransaction as Hex;
|
|
84
92
|
},
|
|
85
93
|
|
|
86
|
-
async signTypedData
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
async signTypedData<
|
|
95
|
+
const typedData extends TypedData | Record<string, unknown>,
|
|
96
|
+
primaryType extends keyof typedData | "EIP712Domain" = keyof typedData,
|
|
97
|
+
>(parameters: TypedDataDefinition<typedData, primaryType>) {
|
|
98
|
+
const { domain = {}, message, primaryType } = parameters as HashTypedDataParameters;
|
|
99
|
+
const types = {
|
|
100
|
+
EIP712Domain: getTypesForEIP712Domain({ domain }),
|
|
101
|
+
...parameters.types,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const openApiMessage = {
|
|
105
|
+
domain: domain as EIP712Domain,
|
|
106
|
+
types,
|
|
107
|
+
primaryType,
|
|
108
|
+
message,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const result = await apiClient.signEvmTypedData(options.account.address, openApiMessage);
|
|
93
112
|
return result.signature as Hex;
|
|
94
113
|
},
|
|
95
114
|
async transfer(transferArgs): Promise<TransactionResult> {
|
|
@@ -134,13 +153,13 @@ export function toEvmServerAccount(
|
|
|
134
153
|
): Promise<WaitForFundOperationResult> {
|
|
135
154
|
return waitForFundOperationReceipt(apiClient, options);
|
|
136
155
|
},
|
|
137
|
-
async quoteSwap(options:
|
|
156
|
+
async quoteSwap(options: AccountQuoteSwapOptions): Promise<AccountQuoteSwapResult> {
|
|
138
157
|
return createSwapQuote(apiClient, {
|
|
139
158
|
...options,
|
|
140
159
|
taker: this.address,
|
|
141
160
|
});
|
|
142
161
|
},
|
|
143
|
-
async swap(options:
|
|
162
|
+
async swap(options: AccountSwapOptions): Promise<AccountSwapResult> {
|
|
144
163
|
return sendSwapTransaction(apiClient, {
|
|
145
164
|
...options,
|
|
146
165
|
address: this.address,
|
|
@@ -150,6 +169,12 @@ export function toEvmServerAccount(
|
|
|
150
169
|
name: options.account.name,
|
|
151
170
|
type: "evm-server",
|
|
152
171
|
policies: options.account.policies,
|
|
172
|
+
__experimental_useNetwork: async (networkOrRpcUrl: string) => {
|
|
173
|
+
return toNetworkScopedEvmServerAccount(apiClient, {
|
|
174
|
+
account,
|
|
175
|
+
network: networkOrRpcUrl,
|
|
176
|
+
});
|
|
177
|
+
},
|
|
153
178
|
};
|
|
154
179
|
|
|
155
180
|
return account;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toNetworkScopedEvmSmartAccount } from "./toNetworkScopedEvmSmartAccount.js";
|
|
1
2
|
import { fund, FundOptions } from "../../actions/evm/fund/fund.js";
|
|
2
3
|
import { Quote } from "../../actions/evm/fund/Quote.js";
|
|
3
4
|
import { quoteFund, QuoteFundOptions } from "../../actions/evm/fund/quoteFund.js";
|
|
@@ -23,6 +24,8 @@ import {
|
|
|
23
24
|
type SendUserOperationReturnType,
|
|
24
25
|
sendUserOperation,
|
|
25
26
|
} from "../../actions/evm/sendUserOperation.js";
|
|
27
|
+
import { createSwapQuote } from "../../actions/evm/swap/createSwapQuote.js";
|
|
28
|
+
import { sendSwapOperation } from "../../actions/evm/swap/sendSwapOperation.js";
|
|
26
29
|
import { smartAccountTransferStrategy } from "../../actions/evm/transfer/smartAccountTransferStrategy.js";
|
|
27
30
|
import { transfer } from "../../actions/evm/transfer/transfer.js";
|
|
28
31
|
import {
|
|
@@ -33,6 +36,12 @@ import {
|
|
|
33
36
|
import { GetUserOperationOptions, UserOperation } from "../../client/evm/evm.types.js";
|
|
34
37
|
|
|
35
38
|
import type { EvmAccount, EvmSmartAccount } from "./types.js";
|
|
39
|
+
import type {
|
|
40
|
+
SmartAccountQuoteSwapOptions,
|
|
41
|
+
SmartAccountQuoteSwapResult,
|
|
42
|
+
SmartAccountSwapOptions,
|
|
43
|
+
SmartAccountSwapResult,
|
|
44
|
+
} from "../../actions/evm/swap/types.js";
|
|
36
45
|
import type {
|
|
37
46
|
CdpOpenApiClientType,
|
|
38
47
|
EvmSmartAccount as EvmSmartAccountModel,
|
|
@@ -128,8 +137,32 @@ export function toEvmSmartAccount(
|
|
|
128
137
|
): Promise<WaitForFundOperationResult> {
|
|
129
138
|
return waitForFundOperationReceipt(apiClient, options);
|
|
130
139
|
},
|
|
140
|
+
async quoteSwap(options: SmartAccountQuoteSwapOptions): Promise<SmartAccountQuoteSwapResult> {
|
|
141
|
+
return createSwapQuote(apiClient, {
|
|
142
|
+
...options,
|
|
143
|
+
taker: this.address, // Always use smart account's address as taker
|
|
144
|
+
signerAddress: this.owners[0].address, // Always use owner's address as signer
|
|
145
|
+
smartAccount: account, // Pass smart account for execute method support
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
async swap(options: SmartAccountSwapOptions): Promise<SmartAccountSwapResult> {
|
|
149
|
+
return sendSwapOperation(apiClient, {
|
|
150
|
+
...options,
|
|
151
|
+
smartAccount: account,
|
|
152
|
+
taker: this.address, // Always use smart account's address as taker
|
|
153
|
+
signerAddress: this.owners[0].address, // Always use owner's address as signer
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
|
|
131
157
|
name: options.smartAccount.name,
|
|
132
158
|
type: "evm-smart",
|
|
159
|
+
__experimental_useNetwork: async (networkOrRpcUrl: string) => {
|
|
160
|
+
return toNetworkScopedEvmSmartAccount(apiClient, {
|
|
161
|
+
smartAccount: account,
|
|
162
|
+
owner: options.owner,
|
|
163
|
+
network: networkOrRpcUrl,
|
|
164
|
+
});
|
|
165
|
+
},
|
|
133
166
|
};
|
|
134
167
|
|
|
135
168
|
return account;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { EvmServerAccount, NetworkScopedEvmServerAccount } from "./types.js";
|
|
2
|
+
import type { CdpOpenApiClientType } from "../../openapi-client/index.js";
|
|
3
|
+
import type { Address } from "../../types/misc.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Options for converting a pre-existing EvmAccount to a NetworkScopedEvmServerAccount.
|
|
7
|
+
*/
|
|
8
|
+
export type ToNetworkScopedEvmServerAccountOptions = {
|
|
9
|
+
/** The EvmAccount that was previously created. */
|
|
10
|
+
account: EvmServerAccount;
|
|
11
|
+
/** The network to scope the account to. */
|
|
12
|
+
network: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Creates a Network-scoped Server-managed EvmAccount instance from an existing EvmAccount.
|
|
17
|
+
* Use this to interact with previously deployed EvmAccounts on a specific network.
|
|
18
|
+
*
|
|
19
|
+
* @param {CdpOpenApiClientType} apiClient - The API client.
|
|
20
|
+
* @param {ToNetworkScopedEvmServerAccountOptions} options - Configuration options.
|
|
21
|
+
* @param {EvmServerAccount} options.account - The EvmServerAccount that was previously created.
|
|
22
|
+
* @param {string} options.network - The network to scope the account to.
|
|
23
|
+
* @returns {NetworkScopedEvmServerAccount} A configured NetworkScopedEvmServerAccount instance ready for signing.
|
|
24
|
+
*/
|
|
25
|
+
export function toNetworkScopedEvmServerAccount(
|
|
26
|
+
apiClient: CdpOpenApiClientType,
|
|
27
|
+
options: ToNetworkScopedEvmServerAccountOptions,
|
|
28
|
+
): NetworkScopedEvmServerAccount {
|
|
29
|
+
const account: NetworkScopedEvmServerAccount = {
|
|
30
|
+
address: options.account.address as Address,
|
|
31
|
+
network: options.network,
|
|
32
|
+
signMessage: options.account.signMessage,
|
|
33
|
+
sign: options.account.sign,
|
|
34
|
+
signTransaction: options.account.signTransaction,
|
|
35
|
+
signTypedData: options.account.signTypedData,
|
|
36
|
+
name: options.account.name,
|
|
37
|
+
type: "evm-server",
|
|
38
|
+
policies: options.account.policies,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return account;
|
|
42
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { EvmAccount, EvmSmartAccount, NetworkScopedEvmSmartAccount } from "./types.js";
|
|
2
|
+
import type { CdpOpenApiClientType } from "../../openapi-client/index.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Options for converting a pre-existing EvmSmartAccount and owner to a EvmSmartAccount
|
|
6
|
+
*/
|
|
7
|
+
export type ToEvmSmartAccountOptions = {
|
|
8
|
+
/** The pre-existing EvmSmartAccount. */
|
|
9
|
+
smartAccount: EvmSmartAccount;
|
|
10
|
+
/** The network to scope the smart account object to. */
|
|
11
|
+
network: string;
|
|
12
|
+
/** The owner of the smart account. */
|
|
13
|
+
owner: EvmAccount;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Creates a NetworkScopedEvmSmartAccount instance from an existing EvmSmartAccount and owner.
|
|
18
|
+
* Use this to interact with previously deployed EvmSmartAccounts, rather than creating new ones.
|
|
19
|
+
*
|
|
20
|
+
* The owner must be the original owner of the evm smart account.
|
|
21
|
+
*
|
|
22
|
+
* @param {CdpOpenApiClientType} apiClient - The API client.
|
|
23
|
+
* @param {ToEvmSmartAccountOptions} options - Configuration options.
|
|
24
|
+
* @param {EvmSmartAccount} options.smartAccount - The deployed evm smart account.
|
|
25
|
+
* @param {EvmAccount} options.owner - The owner which signs for the smart account.
|
|
26
|
+
* @returns {NetworkScopedEvmSmartAccount} A configured NetworkScopedEvmSmartAccount instance ready for user operation submission.
|
|
27
|
+
*/
|
|
28
|
+
export function toNetworkScopedEvmSmartAccount(
|
|
29
|
+
apiClient: CdpOpenApiClientType,
|
|
30
|
+
options: ToEvmSmartAccountOptions,
|
|
31
|
+
): NetworkScopedEvmSmartAccount {
|
|
32
|
+
const account: NetworkScopedEvmSmartAccount = {
|
|
33
|
+
address: options.smartAccount.address,
|
|
34
|
+
network: options.network,
|
|
35
|
+
owners: [options.owner],
|
|
36
|
+
name: options.smartAccount.name,
|
|
37
|
+
type: "evm-smart",
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return account;
|
|
41
|
+
}
|
package/accounts/evm/types.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { SignableMessage, TransactionSerializable } from "viem";
|
|
2
|
-
|
|
3
|
-
import { Prettify } from "../../types/utils.js";
|
|
4
|
-
|
|
5
1
|
import type { AccountActions, SmartAccountActions } from "../../actions/evm/types.js";
|
|
6
|
-
import type { Address,
|
|
2
|
+
import type { Address, Hash, Hex } from "../../types/misc.js";
|
|
3
|
+
import type { Prettify } from "../../types/utils.js";
|
|
4
|
+
import type {
|
|
5
|
+
SignableMessage,
|
|
6
|
+
TransactionSerializable,
|
|
7
|
+
TypedData,
|
|
8
|
+
TypedDataDefinition,
|
|
9
|
+
} from "viem";
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* Base type for any Ethereum account with signing capabilities.
|
|
@@ -19,7 +22,12 @@ export type EvmAccount = {
|
|
|
19
22
|
/** Signs a transaction and returns the signed transaction as a hex string. */
|
|
20
23
|
signTransaction: (transaction: TransactionSerializable) => Promise<Hex>;
|
|
21
24
|
/** Signs a typed data and returns the signature as a hex string. */
|
|
22
|
-
signTypedData:
|
|
25
|
+
signTypedData: <
|
|
26
|
+
const typedData extends TypedData | Record<string, unknown>,
|
|
27
|
+
primaryType extends keyof typedData | "EIP712Domain" = keyof typedData,
|
|
28
|
+
>(
|
|
29
|
+
parameters: TypedDataDefinition<typedData, primaryType>,
|
|
30
|
+
) => Promise<Hex>;
|
|
23
31
|
/** A list of Policy ID's that apply to the account. */
|
|
24
32
|
policies?: string[];
|
|
25
33
|
};
|
|
@@ -34,21 +42,42 @@ export type EvmServerAccount = Prettify<
|
|
|
34
42
|
name?: string;
|
|
35
43
|
/** Indicates this is a server-managed account. */
|
|
36
44
|
type: "evm-server";
|
|
45
|
+
/** Subject to breaking changes. A function that returns a network-scoped server-managed account. */
|
|
46
|
+
__experimental_useNetwork: (network: string) => Promise<NetworkScopedEvmServerAccount>;
|
|
37
47
|
}
|
|
38
48
|
>;
|
|
39
49
|
|
|
50
|
+
type EvmSmartAccountProperties = {
|
|
51
|
+
/** The smart account's address. */
|
|
52
|
+
address: Address;
|
|
53
|
+
/** The name of the smart account. */
|
|
54
|
+
name?: string;
|
|
55
|
+
/** Array of accounts that own and can sign for the smart account (currently only supports one owner but will be extended to support multiple owners in the future). */
|
|
56
|
+
owners: EvmAccount[];
|
|
57
|
+
/** Identifier for the smart account type. */
|
|
58
|
+
type: "evm-smart";
|
|
59
|
+
/** Subject to breaking changes. A function that returns a network-scoped smart account. */
|
|
60
|
+
__experimental_useNetwork: (network: string) => Promise<NetworkScopedEvmSmartAccount>;
|
|
61
|
+
};
|
|
62
|
+
|
|
40
63
|
/**
|
|
41
64
|
* Ethereum smart account which supports account abstraction features like user operations, batch transactions, and paymaster.
|
|
42
65
|
*/
|
|
43
|
-
export type EvmSmartAccount = Prettify<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/** The
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
66
|
+
export type EvmSmartAccount = Prettify<EvmSmartAccountProperties & SmartAccountActions>;
|
|
67
|
+
|
|
68
|
+
export type NetworkScopedEvmSmartAccount = Prettify<
|
|
69
|
+
Omit<EvmSmartAccountProperties, "__experimental_useNetwork"> & {
|
|
70
|
+
/** The network to scope the smart account object to. */
|
|
71
|
+
network: string;
|
|
72
|
+
}
|
|
73
|
+
>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A network-scoped server-managed ethereum account
|
|
77
|
+
*/
|
|
78
|
+
export type NetworkScopedEvmServerAccount = Prettify<
|
|
79
|
+
Omit<EvmServerAccount, keyof AccountActions | "__experimental_useNetwork"> & {
|
|
80
|
+
/** The network this account is scoped to */
|
|
81
|
+
network: string;
|
|
82
|
+
}
|
|
54
83
|
>;
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { encodeAbiParameters, encodePacked, hashTypedData, sliceHex } from "viem";
|
|
2
|
+
|
|
3
|
+
import type { EvmSmartAccount } from "../../accounts/evm/types.js";
|
|
4
|
+
import type {
|
|
5
|
+
CdpOpenApiClientType,
|
|
6
|
+
EIP712Message as OpenApiEIP712Message,
|
|
7
|
+
} from "../../openapi-client/index.js";
|
|
8
|
+
import type { EIP712Message, Hex } from "../../types/misc.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Options for signing and wrapping EIP-712 typed data with a smart account.
|
|
12
|
+
*/
|
|
13
|
+
export interface SignAndWrapTypedDataForSmartAccountOptions {
|
|
14
|
+
/** The smart account to sign with. */
|
|
15
|
+
smartAccount: EvmSmartAccount;
|
|
16
|
+
/** The chain ID for the signature (used for replay protection). */
|
|
17
|
+
chainId: bigint;
|
|
18
|
+
/** The EIP-712 typed data message to sign. */
|
|
19
|
+
typedData: EIP712Message;
|
|
20
|
+
/** The index of the owner to sign with (defaults to 0). */
|
|
21
|
+
ownerIndex?: bigint;
|
|
22
|
+
/** Optional idempotency key for the signing request. */
|
|
23
|
+
idempotencyKey?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Result of signing and wrapping typed data for a smart account.
|
|
28
|
+
*/
|
|
29
|
+
export interface SignAndWrapTypedDataForSmartAccountResult {
|
|
30
|
+
/** The signature ready for smart contract use. */
|
|
31
|
+
signature: Hex;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Signs and wraps an EIP-712 message for a smart account using the required Coinbase Smart Wallet signature format.
|
|
36
|
+
*
|
|
37
|
+
* **Important: Coinbase Smart Wallet Contract Requirements**
|
|
38
|
+
*
|
|
39
|
+
* Due to the Coinbase Smart Wallet contract implementation (ERC-1271), CDP Smart Wallets have
|
|
40
|
+
* specific requirements for EIP-712 message signing:
|
|
41
|
+
*
|
|
42
|
+
* 1. **Replay-Safe Hashing**: All typed messages must be wrapped in a replay-safe hash that
|
|
43
|
+
* includes the chain ID and smart account address. This prevents the same signature from
|
|
44
|
+
* being valid across different chains or accounts.
|
|
45
|
+
*
|
|
46
|
+
* 2. **Signature Wrapping**: The resulting signature must be wrapped in a `SignatureWrapper`
|
|
47
|
+
* struct that identifies which owner signed and contains the signature data in the format
|
|
48
|
+
* expected by the smart contract's `isValidSignature()` method.
|
|
49
|
+
*
|
|
50
|
+
* This function handles both requirements automatically, making it safe and convenient for
|
|
51
|
+
* developers to sign EIP-712 messages with CDP Smart Wallets.
|
|
52
|
+
*
|
|
53
|
+
* @param {CdpOpenApiClientType} client - The CDP API client
|
|
54
|
+
* @param {SignAndWrapTypedDataForSmartAccountOptions} options - Parameters for signing and wrapping the EIP-712 message.
|
|
55
|
+
* @returns A promise that resolves to the signature that can be used with smart contracts.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const result = await signAndWrapTypedDataForSmartAccount(client, {
|
|
60
|
+
* smartAccount: smartAccount,
|
|
61
|
+
* chainId: 1n,
|
|
62
|
+
* typedData: {
|
|
63
|
+
* domain: {
|
|
64
|
+
* name: "Permit2",
|
|
65
|
+
* chainId: 1,
|
|
66
|
+
* verifyingContract: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
67
|
+
* },
|
|
68
|
+
* types: {
|
|
69
|
+
* EIP712Domain: [
|
|
70
|
+
* { name: "name", type: "string" },
|
|
71
|
+
* { name: "chainId", type: "uint256" },
|
|
72
|
+
* { name: "verifyingContract", type: "address" },
|
|
73
|
+
* ],
|
|
74
|
+
* PermitTransferFrom: [
|
|
75
|
+
* { name: "permitted", type: "TokenPermissions" },
|
|
76
|
+
* { name: "spender", type: "address" },
|
|
77
|
+
* { name: "nonce", type: "uint256" },
|
|
78
|
+
* { name: "deadline", type: "uint256" },
|
|
79
|
+
* ],
|
|
80
|
+
* TokenPermissions: [
|
|
81
|
+
* { name: "token", type: "address" },
|
|
82
|
+
* { name: "amount", type: "uint256" },
|
|
83
|
+
* ],
|
|
84
|
+
* },
|
|
85
|
+
* primaryType: "PermitTransferFrom",
|
|
86
|
+
* message: {
|
|
87
|
+
* permitted: {
|
|
88
|
+
* token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
89
|
+
* amount: "1000000",
|
|
90
|
+
* },
|
|
91
|
+
* spender: "0xFfFfFfFFfFFfFFfFFfFFFFFffFFFffffFfFFFfFf",
|
|
92
|
+
* nonce: "0",
|
|
93
|
+
* deadline: "1717123200",
|
|
94
|
+
* },
|
|
95
|
+
* },
|
|
96
|
+
* });
|
|
97
|
+
*
|
|
98
|
+
* // Use result.signature for smart contract calls
|
|
99
|
+
* console.log(`Signature: ${result.signature}`);
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export async function signAndWrapTypedDataForSmartAccount(
|
|
103
|
+
client: CdpOpenApiClientType,
|
|
104
|
+
options: SignAndWrapTypedDataForSmartAccountOptions,
|
|
105
|
+
): Promise<SignAndWrapTypedDataForSmartAccountResult> {
|
|
106
|
+
const { smartAccount, chainId, typedData, ownerIndex = 0n } = options;
|
|
107
|
+
|
|
108
|
+
// Create the replay-safe typed data
|
|
109
|
+
const replaySafeTypedData = createReplaySafeTypedData({
|
|
110
|
+
typedData,
|
|
111
|
+
chainId,
|
|
112
|
+
smartAccountAddress: smartAccount.address as Hex,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// Sign the replay-safe typed data with the smart account owner
|
|
116
|
+
const owner = smartAccount.owners[Number(ownerIndex)];
|
|
117
|
+
const signature = await client.signEvmTypedData(
|
|
118
|
+
owner.address,
|
|
119
|
+
replaySafeTypedData,
|
|
120
|
+
options.idempotencyKey,
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
// Wrap the signature in the format expected by the smart contract
|
|
124
|
+
const wrappedSignature = createSmartAccountSignatureWrapper({
|
|
125
|
+
signatureHex: signature.signature as Hex,
|
|
126
|
+
ownerIndex,
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
signature: wrappedSignature as Hex,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Creates a replay-safe EIP-712 typed data structure by wrapping the original typed data with
|
|
136
|
+
* chain ID and smart account address.
|
|
137
|
+
*
|
|
138
|
+
* **Coinbase Smart Wallet Requirement**: Due to the Coinbase Smart Wallet contract's ERC-1271
|
|
139
|
+
* implementation, all EIP-712 messages must be wrapped in a replay-safe hash before signing.
|
|
140
|
+
* This prevents signature replay attacks across different chains or smart account addresses.
|
|
141
|
+
*
|
|
142
|
+
* The smart contract's `isValidSignature()` method expects signatures to be validated against
|
|
143
|
+
* this replay-safe hash, not the original message hash.
|
|
144
|
+
*
|
|
145
|
+
* @param params - The replay-safe hash parameters
|
|
146
|
+
* @param params.typedData - The original EIP-712 typed data to make replay-safe
|
|
147
|
+
* @param params.chainId - The chain ID for replay protection
|
|
148
|
+
* @param params.smartAccountAddress - The smart account address for additional context
|
|
149
|
+
* @returns The EIP-712 typed data structure for the replay-safe hash
|
|
150
|
+
*/
|
|
151
|
+
export function createReplaySafeTypedData({
|
|
152
|
+
typedData,
|
|
153
|
+
chainId,
|
|
154
|
+
smartAccountAddress,
|
|
155
|
+
}: {
|
|
156
|
+
typedData: EIP712Message;
|
|
157
|
+
chainId: bigint;
|
|
158
|
+
smartAccountAddress: Hex;
|
|
159
|
+
}): OpenApiEIP712Message {
|
|
160
|
+
// First hash the original typed data
|
|
161
|
+
const originalHash = hashTypedData(typedData);
|
|
162
|
+
|
|
163
|
+
// Create and return the replay-safe typed data structure
|
|
164
|
+
return {
|
|
165
|
+
domain: {
|
|
166
|
+
name: "Coinbase Smart Wallet",
|
|
167
|
+
version: "1",
|
|
168
|
+
chainId: Number(chainId),
|
|
169
|
+
verifyingContract: smartAccountAddress,
|
|
170
|
+
},
|
|
171
|
+
types: {
|
|
172
|
+
EIP712Domain: [
|
|
173
|
+
{ name: "name", type: "string" },
|
|
174
|
+
{ name: "version", type: "string" },
|
|
175
|
+
{ name: "chainId", type: "uint256" },
|
|
176
|
+
{ name: "verifyingContract", type: "address" },
|
|
177
|
+
],
|
|
178
|
+
CoinbaseSmartWalletMessage: [{ name: "hash", type: "bytes32" }],
|
|
179
|
+
},
|
|
180
|
+
primaryType: "CoinbaseSmartWalletMessage" as const,
|
|
181
|
+
message: {
|
|
182
|
+
hash: originalHash,
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Builds a signature wrapper for Coinbase Smart Wallets by decomposing a hex signature
|
|
189
|
+
* into r, s, v components and encoding them in the format expected by the smart contract.
|
|
190
|
+
*
|
|
191
|
+
* All signatures on Coinbase Smart Wallets must be wrapped in this format to identify
|
|
192
|
+
* which owner signed and provide the signature data.
|
|
193
|
+
*
|
|
194
|
+
* @param params - The signature parameters
|
|
195
|
+
* @param params.signatureHex - The hex signature to wrap (65 bytes: r + s + v)
|
|
196
|
+
* @param params.ownerIndex - The index of the owner that signed (from MultiOwnable.ownerAtIndex)
|
|
197
|
+
* @returns The encoded signature wrapper in the format expected by the smart contract
|
|
198
|
+
*/
|
|
199
|
+
export function createSmartAccountSignatureWrapper({
|
|
200
|
+
signatureHex,
|
|
201
|
+
ownerIndex,
|
|
202
|
+
}: {
|
|
203
|
+
signatureHex: Hex;
|
|
204
|
+
ownerIndex: bigint;
|
|
205
|
+
}): Hex {
|
|
206
|
+
// Decompose 65-byte hex signature into r (32 bytes), s (32 bytes), v (1 byte)
|
|
207
|
+
const r = sliceHex(signatureHex, 0, 32);
|
|
208
|
+
const s = sliceHex(signatureHex, 32, 64);
|
|
209
|
+
const v = Number(`0x${signatureHex.slice(130, 132)}`); // 130 = 2 + 64 + 64
|
|
210
|
+
|
|
211
|
+
const signatureData = encodePacked(["bytes32", "bytes32", "uint8"], [r, s, v]);
|
|
212
|
+
|
|
213
|
+
return encodeAbiParameters(
|
|
214
|
+
[SignatureWrapperStruct],
|
|
215
|
+
[
|
|
216
|
+
{
|
|
217
|
+
ownerIndex: Number(ownerIndex),
|
|
218
|
+
signatureData,
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
) as Hex;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The ABI structure for the SignatureWrapper struct expected by Coinbase Smart Wallets.
|
|
226
|
+
* This matches the struct defined in the smart contract:
|
|
227
|
+
*
|
|
228
|
+
* struct SignatureWrapper {
|
|
229
|
+
* uint256 ownerIndex;
|
|
230
|
+
* bytes signatureData;
|
|
231
|
+
* }
|
|
232
|
+
*/
|
|
233
|
+
const SignatureWrapperStruct = {
|
|
234
|
+
components: [
|
|
235
|
+
{
|
|
236
|
+
name: "ownerIndex",
|
|
237
|
+
type: "uint8",
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: "signatureData",
|
|
241
|
+
type: "bytes",
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
name: "SignatureWrapper",
|
|
245
|
+
type: "tuple",
|
|
246
|
+
} as const;
|