@rhinestone/sdk 1.0.0-alpha.11 → 1.0.0-alpha.13
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/dist/src/accounts/index.d.ts +8 -6
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +69 -134
- package/dist/src/accounts/index.test.js +2 -2
- package/dist/src/accounts/kernel.d.ts +3 -2
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +3 -5
- package/dist/src/accounts/kernel.test.js +5 -10
- package/dist/src/accounts/nexus.d.ts +2 -2
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +5 -6
- package/dist/src/accounts/nexus.test.js +11 -12
- package/dist/src/accounts/safe.d.ts +2 -2
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +3 -5
- package/dist/src/accounts/safe.test.js +4 -5
- package/dist/src/accounts/signing/common.d.ts +23 -0
- package/dist/src/accounts/signing/common.d.ts.map +1 -0
- package/dist/src/accounts/signing/common.js +113 -0
- package/dist/src/accounts/signing/message.d.ts +5 -0
- package/dist/src/accounts/signing/message.d.ts.map +1 -0
- package/dist/src/accounts/signing/message.js +51 -0
- package/dist/src/accounts/signing/typedData.d.ts +5 -0
- package/dist/src/accounts/signing/typedData.d.ts.map +1 -0
- package/dist/src/accounts/signing/typedData.js +39 -0
- package/dist/src/accounts/startale.d.ts +2 -2
- package/dist/src/accounts/startale.d.ts.map +1 -1
- package/dist/src/accounts/startale.js +3 -3
- package/dist/src/accounts/startale.test.js +4 -5
- package/dist/src/actions/index.d.ts +84 -0
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +92 -0
- package/dist/src/actions/index.test.js +15 -15
- package/dist/src/actions/smart-session.d.ts +6 -0
- package/dist/src/actions/smart-session.d.ts.map +1 -1
- package/dist/src/actions/smart-session.js +6 -0
- package/dist/src/execution/compact.d.ts +128 -1
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +91 -0
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +2 -3
- package/dist/src/execution/utils.d.ts +6 -5
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +35 -6
- package/dist/src/index.d.ts +6 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +77 -11
- package/dist/src/modules/index.test.js +1 -1
- package/dist/src/modules/validators/core.js +1 -1
- package/dist/src/modules/validators/core.test.js +3 -3
- package/dist/src/modules/validators/smart-sessions.js +3 -3
- package/dist/src/modules/validators/smart-sessions.test.js +4 -4
- package/dist/src/orchestrator/index.d.ts +1 -2
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +1 -3
- package/dist/src/orchestrator/utils.d.ts +1 -3
- package/dist/src/orchestrator/utils.d.ts.map +1 -1
- package/dist/src/orchestrator/utils.js +0 -102
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ exports.COMPACT_ADDRESS = void 0;
|
|
|
4
4
|
exports.getDepositEtherCall = getDepositEtherCall;
|
|
5
5
|
exports.getDepositErc20Call = getDepositErc20Call;
|
|
6
6
|
exports.getApproveErc20Call = getApproveErc20Call;
|
|
7
|
+
exports.getIntentData = getIntentData;
|
|
7
8
|
const viem_1 = require("viem");
|
|
8
9
|
const COMPACT_ADDRESS = '0xa2E6C7Ba8613E1534dCB990e7e4962216C0a5d58';
|
|
9
10
|
exports.COMPACT_ADDRESS = COMPACT_ADDRESS;
|
|
@@ -103,3 +104,93 @@ function lockTag() {
|
|
|
103
104
|
const hex = tagBig.toString(16).slice(0, 24);
|
|
104
105
|
return `0x${hex}`;
|
|
105
106
|
}
|
|
107
|
+
// Define the typed data structure as const to preserve type safety
|
|
108
|
+
const COMPACT_TYPED_DATA_TYPES = {
|
|
109
|
+
MultichainCompact: [
|
|
110
|
+
{ name: 'sponsor', type: 'address' },
|
|
111
|
+
{ name: 'nonce', type: 'uint256' },
|
|
112
|
+
{ name: 'expires', type: 'uint256' },
|
|
113
|
+
{ name: 'elements', type: 'Element[]' },
|
|
114
|
+
],
|
|
115
|
+
Element: [
|
|
116
|
+
{ name: 'arbiter', type: 'address' },
|
|
117
|
+
{ name: 'chainId', type: 'uint256' },
|
|
118
|
+
{ name: 'commitments', type: 'Lock[]' },
|
|
119
|
+
{ name: 'mandate', type: 'Mandate' },
|
|
120
|
+
],
|
|
121
|
+
Lock: [
|
|
122
|
+
{ name: 'lockTag', type: 'bytes12' },
|
|
123
|
+
{ name: 'token', type: 'address' },
|
|
124
|
+
{ name: 'amount', type: 'uint256' },
|
|
125
|
+
],
|
|
126
|
+
Mandate: [
|
|
127
|
+
{ name: 'target', type: 'Target' },
|
|
128
|
+
{ name: 'originOps', type: 'Op[]' },
|
|
129
|
+
{ name: 'destOps', type: 'Op[]' },
|
|
130
|
+
{ name: 'q', type: 'bytes32' },
|
|
131
|
+
],
|
|
132
|
+
Target: [
|
|
133
|
+
{ name: 'recipient', type: 'address' },
|
|
134
|
+
{ name: 'tokenOut', type: 'Token[]' },
|
|
135
|
+
{ name: 'targetChain', type: 'uint256' },
|
|
136
|
+
{ name: 'fillExpiry', type: 'uint256' },
|
|
137
|
+
],
|
|
138
|
+
Token: [
|
|
139
|
+
{ name: 'token', type: 'address' },
|
|
140
|
+
{ name: 'amount', type: 'uint256' },
|
|
141
|
+
],
|
|
142
|
+
Op: [
|
|
143
|
+
{ name: 'to', type: 'address' },
|
|
144
|
+
{ name: 'value', type: 'uint256' },
|
|
145
|
+
{ name: 'data', type: 'bytes' },
|
|
146
|
+
],
|
|
147
|
+
};
|
|
148
|
+
function getIntentData(intentOp) {
|
|
149
|
+
const typedData = {
|
|
150
|
+
domain: {
|
|
151
|
+
name: 'The Compact',
|
|
152
|
+
version: '1',
|
|
153
|
+
chainId: BigInt(intentOp.elements[0].chainId),
|
|
154
|
+
verifyingContract: '0x73d2dc0c21fca4ec1601895d50df7f5624f07d3f',
|
|
155
|
+
},
|
|
156
|
+
types: COMPACT_TYPED_DATA_TYPES,
|
|
157
|
+
primaryType: 'MultichainCompact',
|
|
158
|
+
message: {
|
|
159
|
+
sponsor: intentOp.sponsor,
|
|
160
|
+
nonce: BigInt(intentOp.nonce),
|
|
161
|
+
expires: BigInt(intentOp.expires),
|
|
162
|
+
elements: intentOp.elements.map((element) => ({
|
|
163
|
+
arbiter: element.arbiter,
|
|
164
|
+
chainId: BigInt(element.chainId),
|
|
165
|
+
commitments: element.idsAndAmounts.map((token) => ({
|
|
166
|
+
lockTag: (0, viem_1.slice)((0, viem_1.toHex)(BigInt(token[0])), 0, 12),
|
|
167
|
+
token: (0, viem_1.slice)((0, viem_1.toHex)(BigInt(token[0])), 12, 32),
|
|
168
|
+
amount: BigInt(token[1]),
|
|
169
|
+
})),
|
|
170
|
+
mandate: {
|
|
171
|
+
target: {
|
|
172
|
+
recipient: element.mandate.recipient,
|
|
173
|
+
tokenOut: element.mandate.tokenOut.map((token) => ({
|
|
174
|
+
token: (0, viem_1.slice)((0, viem_1.toHex)(BigInt(token[0])), 12, 32),
|
|
175
|
+
amount: BigInt(token[1]),
|
|
176
|
+
})),
|
|
177
|
+
targetChain: BigInt(element.mandate.destinationChainId),
|
|
178
|
+
fillExpiry: BigInt(element.mandate.fillDeadline),
|
|
179
|
+
},
|
|
180
|
+
originOps: element.mandate.preClaimOps.map((op) => ({
|
|
181
|
+
to: op.to,
|
|
182
|
+
value: BigInt(op.value),
|
|
183
|
+
data: op.data,
|
|
184
|
+
})),
|
|
185
|
+
destOps: element.mandate.destinationOps.map((op) => ({
|
|
186
|
+
to: op.to,
|
|
187
|
+
value: BigInt(op.value),
|
|
188
|
+
data: op.data,
|
|
189
|
+
})),
|
|
190
|
+
q: (0, viem_1.keccak256)(element.mandate.qualifier?.encodedVal ?? '0x'),
|
|
191
|
+
},
|
|
192
|
+
})),
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
return typedData;
|
|
196
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAmC,MAAM,MAAM,CAAA;AAKhF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAQrD,OAAO,KAAK,EAEV,uBAAuB,EAGvB,WAAW,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,0CAA0C,EAC1C,0CAA0C,EAC3C,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAa5D,iBAAe,eAAe,CAC5B,MAAM,EAAE,uBAAuB,EAC/B,WAAW,EAAE,WAAW,8BA2BzB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAmC,MAAM,MAAM,CAAA;AAKhF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAQrD,OAAO,KAAK,EAEV,uBAAuB,EAGvB,WAAW,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,0CAA0C,EAC1C,0CAA0C,EAC3C,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAa5D,iBAAe,eAAe,CAC5B,MAAM,EAAE,uBAAuB,EAC/B,WAAW,EAAE,WAAW,8BA2BzB;AAyID,iBAAe,gBAAgB,CAC7B,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,iBAAiB,EACzB,uBAAuB,EAAE,OAAO;;;;;;;;;;;;GA2CjC;AAED,iBAAe,qBAAqB,CAClC,MAAM,EAAE,uBAAuB,EAC/B,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,iBAAe,YAAY,CACzB,MAAM,EAAE,uBAAuB,EAC/B,UAAU,EAAE,OAAO,gDAMpB;AAED,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EAEZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,0CAA0C,EAC1C,0CAA0C,EAC1C,gCAAgC,EAChC,yBAAyB,GAC1B,CAAA;AACD,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -84,16 +84,15 @@ async function sendTransactionAsUserOp(config, chain, callInputs, signers) {
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
async function sendTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, accountAddress, signers, sponsored) {
|
|
87
|
-
const { intentRoute
|
|
87
|
+
const { intentRoute } = await (0, utils_2.prepareTransactionAsIntent)(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, accountAddress, sponsored ?? false);
|
|
88
88
|
if (!intentRoute) {
|
|
89
89
|
throw new error_1.OrderPathRequiredForIntentsError();
|
|
90
90
|
}
|
|
91
|
-
const signature = await (0, utils_2.signIntent)(config, targetChain,
|
|
91
|
+
const signature = await (0, utils_2.signIntent)(config, targetChain, intentRoute.intentOp, signers);
|
|
92
92
|
const authorizations = config.eoa
|
|
93
93
|
? await (0, utils_2.signAuthorizationsInternal)(config, {
|
|
94
94
|
type: 'intent',
|
|
95
95
|
intentRoute,
|
|
96
|
-
hash: intentHash,
|
|
97
96
|
})
|
|
98
97
|
: [];
|
|
99
98
|
return await (0, utils_2.submitIntentInternal)(config, sourceChains, targetChain, intentRoute.intentOp, signature, authorizations);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Address, type Chain, type Hex, type PublicClient, type SignedAuthorization, type SignedAuthorizationList } from 'viem';
|
|
1
|
+
import { type Address, type Chain, type HashTypedDataParameters, type Hex, type PublicClient, type SignableMessage, type SignedAuthorization, type SignedAuthorizationList, type TypedData } from 'viem';
|
|
2
2
|
import { type UserOperation } from 'viem/account-abstraction';
|
|
3
3
|
import { type IntentOp, type IntentRoute } from '../orchestrator';
|
|
4
4
|
import type { Call, CallInput, RhinestoneAccountConfig, SignerSet, TokenRequest, Transaction } from '../types';
|
|
@@ -9,12 +9,11 @@ type TransactionResult = {
|
|
|
9
9
|
} | {
|
|
10
10
|
type: 'intent';
|
|
11
11
|
id: bigint;
|
|
12
|
-
|
|
12
|
+
sourceChains?: number[];
|
|
13
13
|
targetChain: number;
|
|
14
14
|
};
|
|
15
15
|
interface IntentData {
|
|
16
16
|
type: 'intent';
|
|
17
|
-
hash: Hex;
|
|
18
17
|
intentRoute: IntentRoute;
|
|
19
18
|
}
|
|
20
19
|
interface UserOpData {
|
|
@@ -32,14 +31,16 @@ interface SignedTransactionData extends PreparedTransactionData {
|
|
|
32
31
|
declare function prepareTransaction(config: RhinestoneAccountConfig, transaction: Transaction): Promise<PreparedTransactionData>;
|
|
33
32
|
declare function signTransaction(config: RhinestoneAccountConfig, preparedTransaction: PreparedTransactionData): Promise<SignedTransactionData>;
|
|
34
33
|
declare function signAuthorizations(config: RhinestoneAccountConfig, preparedTransaction: PreparedTransactionData): Promise<SignedAuthorization[]>;
|
|
34
|
+
declare function signMessage(config: RhinestoneAccountConfig, message: SignableMessage, chain: Chain, signers: SignerSet | undefined): Promise<`0x${string}`>;
|
|
35
|
+
declare function signTypedData<typedData extends TypedData | Record<string, unknown> = TypedData, primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData>(config: RhinestoneAccountConfig, parameters: HashTypedDataParameters<typedData, primaryType>, chain: Chain, signers: SignerSet | undefined): Promise<`0x${string}`>;
|
|
35
36
|
declare function signAuthorizationsInternal(config: RhinestoneAccountConfig, data: IntentData | UserOpData): Promise<SignedAuthorization[]>;
|
|
36
37
|
declare function submitTransaction(config: RhinestoneAccountConfig, signedTransaction: SignedTransactionData, authorizations: SignedAuthorizationList): Promise<TransactionResult>;
|
|
37
38
|
declare function prepareTransactionAsIntent(config: RhinestoneAccountConfig, sourceChains: Chain[] | undefined, targetChain: Chain, callInputs: CallInput[], gasLimit: bigint | undefined, tokenRequests: TokenRequest[], accountAddress: Address, isSponsored: boolean, eip7702InitSignature?: Hex): Promise<IntentData>;
|
|
38
|
-
declare function signIntent(config: RhinestoneAccountConfig, targetChain: Chain,
|
|
39
|
+
declare function signIntent(config: RhinestoneAccountConfig, targetChain: Chain, intentOp: IntentOp, signers?: SignerSet): Promise<`0x${string}`>;
|
|
39
40
|
declare function getOrchestratorByChain(chainId: number, apiKey: string): import("../orchestrator").Orchestrator;
|
|
40
41
|
declare function submitIntentInternal(config: RhinestoneAccountConfig, sourceChains: Chain[] | undefined, targetChain: Chain, intentOp: IntentOp, signature: Hex, authorizations: SignedAuthorizationList): Promise<TransactionResult>;
|
|
41
42
|
declare function getValidatorAccount(config: RhinestoneAccountConfig, signers: SignerSet | undefined, publicClient: PublicClient, chain: Chain): Promise<import("viem/account-abstraction").SmartAccount<import("viem/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">> | null | undefined>;
|
|
42
43
|
declare function parseCalls(calls: CallInput[], chainId: number): Call[];
|
|
43
|
-
export { prepareTransaction, signTransaction, signAuthorizations, signAuthorizationsInternal, submitTransaction, getOrchestratorByChain, signIntent, prepareTransactionAsIntent, submitIntentInternal, getValidatorAccount, parseCalls, };
|
|
44
|
+
export { prepareTransaction, signTransaction, signAuthorizations, signAuthorizationsInternal, signMessage, signTypedData, submitTransaction, getOrchestratorByChain, signIntent, prepareTransactionAsIntent, submitIntentInternal, getValidatorAccount, parseCalls, };
|
|
44
45
|
export type { IntentData, TransactionResult, PreparedTransactionData, SignedTransactionData, };
|
|
45
46
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAIV,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAIV,KAAK,uBAAuB,EAC5B,KAAK,GAAG,EAER,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EAGf,MAAM,MAAM,CAAA;AACb,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAA;AAuBjC,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,WAAW,EAGjB,MAAM,iBAAiB,CAAA;AAUxB,OAAO,KAAK,EACV,IAAI,EACJ,SAAS,EACT,uBAAuB,EACvB,SAAS,EACT,YAAY,EACZ,WAAW,EACZ,MAAM,UAAU,CAAA;AAQjB,KAAK,iBAAiB,GAClB;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,GAAG,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;CACd,GACD;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAEL,UAAU,UAAU;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,WAAW,EAAE,WAAW,CAAA;CACzB;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,GAAG,CAAA;IACT,MAAM,EAAE,a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ports.prepareTransaction = prepareTransaction;
|
|
|
4
4
|
exports.signTransaction = signTransaction;
|
|
5
5
|
exports.signAuthorizations = signAuthorizations;
|
|
6
6
|
exports.signAuthorizationsInternal = signAuthorizationsInternal;
|
|
7
|
+
exports.signMessage = signMessage;
|
|
8
|
+
exports.signTypedData = signTypedData;
|
|
7
9
|
exports.submitTransaction = submitTransaction;
|
|
8
10
|
exports.getOrchestratorByChain = getOrchestratorByChain;
|
|
9
11
|
exports.signIntent = signIntent;
|
|
@@ -20,6 +22,7 @@ const core_1 = require("../modules/validators/core");
|
|
|
20
22
|
const orchestrator_1 = require("../orchestrator");
|
|
21
23
|
const consts_1 = require("../orchestrator/consts");
|
|
22
24
|
const registry_1 = require("../orchestrator/registry");
|
|
25
|
+
const compact_1 = require("./compact");
|
|
23
26
|
const error_1 = require("./error");
|
|
24
27
|
async function prepareTransaction(config, transaction) {
|
|
25
28
|
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, } = getTransactionParams(transaction);
|
|
@@ -56,7 +59,7 @@ async function signTransaction(config, preparedTransaction) {
|
|
|
56
59
|
signature = await signUserOp(config, chain, signers, userOp);
|
|
57
60
|
}
|
|
58
61
|
else {
|
|
59
|
-
signature = await signIntent(config, targetChain, data.
|
|
62
|
+
signature = await signIntent(config, targetChain, data.intentRoute.intentOp, signers);
|
|
60
63
|
}
|
|
61
64
|
return {
|
|
62
65
|
data,
|
|
@@ -67,6 +70,33 @@ async function signTransaction(config, preparedTransaction) {
|
|
|
67
70
|
async function signAuthorizations(config, preparedTransaction) {
|
|
68
71
|
return await signAuthorizationsInternal(config, preparedTransaction.data);
|
|
69
72
|
}
|
|
73
|
+
async function signMessage(config, message, chain, signers) {
|
|
74
|
+
const validator = getValidator(config, signers);
|
|
75
|
+
if (!validator) {
|
|
76
|
+
throw new Error('Validator not available');
|
|
77
|
+
}
|
|
78
|
+
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
79
|
+
const isRoot = validator.address === ownerValidator.address;
|
|
80
|
+
const hash = (0, viem_1.hashMessage)(message);
|
|
81
|
+
const signature = await (0, accounts_1.getPackedSignature)(config, signers, chain, {
|
|
82
|
+
address: validator.address,
|
|
83
|
+
isRoot,
|
|
84
|
+
}, hash);
|
|
85
|
+
return await (0, accounts_1.toErc6492Signature)(config, signature, chain);
|
|
86
|
+
}
|
|
87
|
+
async function signTypedData(config, parameters, chain, signers) {
|
|
88
|
+
const validator = getValidator(config, signers);
|
|
89
|
+
if (!validator) {
|
|
90
|
+
throw new Error('Validator not available');
|
|
91
|
+
}
|
|
92
|
+
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
93
|
+
const isRoot = validator.address === ownerValidator.address;
|
|
94
|
+
const signature = await (0, accounts_1.getTypedDataPackedSignature)(config, signers, chain, {
|
|
95
|
+
address: validator.address,
|
|
96
|
+
isRoot,
|
|
97
|
+
}, parameters);
|
|
98
|
+
return await (0, accounts_1.toErc6492Signature)(config, signature, chain);
|
|
99
|
+
}
|
|
70
100
|
async function signAuthorizationsInternal(config, data) {
|
|
71
101
|
const eoa = config.eoa;
|
|
72
102
|
if (!eoa) {
|
|
@@ -210,24 +240,23 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
210
240
|
};
|
|
211
241
|
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey);
|
|
212
242
|
const intentRoute = await orchestrator.getIntentRoute(metaIntent);
|
|
213
|
-
const intentHash = (0, orchestrator_1.getIntentOpHash)(intentRoute.intentOp);
|
|
214
243
|
return {
|
|
215
244
|
type: 'intent',
|
|
216
245
|
intentRoute,
|
|
217
|
-
hash: intentHash,
|
|
218
246
|
};
|
|
219
247
|
}
|
|
220
|
-
async function signIntent(config, targetChain,
|
|
248
|
+
async function signIntent(config, targetChain, intentOp, signers) {
|
|
221
249
|
const validator = getValidator(config, signers);
|
|
222
250
|
if (!validator) {
|
|
223
251
|
throw new Error('Validator not available');
|
|
224
252
|
}
|
|
225
253
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
226
254
|
const isRoot = validator.address === ownerValidator.address;
|
|
227
|
-
const
|
|
255
|
+
const typedData = (0, compact_1.getIntentData)(intentOp);
|
|
256
|
+
const signature = await (0, accounts_1.getTypedDataPackedSignature)(config, signers, targetChain, {
|
|
228
257
|
address: validator.address,
|
|
229
258
|
isRoot,
|
|
230
|
-
},
|
|
259
|
+
}, typedData);
|
|
231
260
|
return signature;
|
|
232
261
|
}
|
|
233
262
|
async function signUserOp(config, chain, signers, userOp) {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type { Address, Chain, Hex, SignedAuthorizationList } from 'viem';
|
|
1
|
+
import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData } from 'viem';
|
|
2
2
|
import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
3
|
import { AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, SmartSessionsNotEnabledError } from './accounts';
|
|
4
|
-
import { createTransport } from './accounts/utils';
|
|
5
4
|
import { addOwner, changeMultiFactorThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, removeOwner, removeSubValidator, setSubValidator, setUpRecovery } from './actions';
|
|
6
5
|
import type { TransactionResult } from './execution';
|
|
7
6
|
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError } from './execution';
|
|
8
7
|
import { type SessionDetails } from './execution/smart-session';
|
|
9
8
|
import { type IntentData, type PreparedTransactionData, type SignedTransactionData } from './execution/utils';
|
|
10
|
-
import { AuthenticationRequiredError, InsufficientBalanceError, type IntentCost, type IntentInput, IntentNotFoundError, type IntentOp, type IntentOpStatus, type IntentResult, type IntentRoute, InvalidApiKeyError, InvalidIntentSignatureError, isOrchestratorError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, type Portfolio, type SettlementSystem, type SignedIntentOp, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './orchestrator';
|
|
11
|
-
import type { Call, RhinestoneAccountConfig, Session, Transaction } from './types';
|
|
9
|
+
import { AuthenticationRequiredError, getSupportedTokens, getTokenAddress, InsufficientBalanceError, type IntentCost, type IntentInput, IntentNotFoundError, type IntentOp, type IntentOpStatus, type IntentResult, type IntentRoute, InvalidApiKeyError, InvalidIntentSignatureError, isOrchestratorError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, type Portfolio, type SettlementSystem, type SignedIntentOp, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './orchestrator';
|
|
10
|
+
import type { Call, RhinestoneAccountConfig, Session, SignerSet, Transaction } from './types';
|
|
12
11
|
interface RhinestoneAccount {
|
|
13
12
|
config: RhinestoneAccountConfig;
|
|
14
13
|
deploy: (chain: Chain, session?: Session) => Promise<void>;
|
|
@@ -16,6 +15,8 @@ interface RhinestoneAccount {
|
|
|
16
15
|
prepareTransaction: (transaction: Transaction) => Promise<PreparedTransactionData>;
|
|
17
16
|
signTransaction: (preparedTransaction: PreparedTransactionData) => Promise<SignedTransactionData>;
|
|
18
17
|
signAuthorizations: (preparedTransaction: PreparedTransactionData) => Promise<SignedAuthorizationList>;
|
|
18
|
+
signMessage: (message: SignableMessage, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
|
|
19
|
+
signTypedData: <typedData extends TypedData | Record<string, unknown> = TypedData, primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData>(parameters: HashTypedDataParameters<typedData, primaryType>, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
|
|
19
20
|
submitTransaction: (signedTransaction: SignedTransactionData, authorizations?: SignedAuthorizationList) => Promise<TransactionResult>;
|
|
20
21
|
sendTransaction: (transaction: Transaction) => Promise<TransactionResult>;
|
|
21
22
|
waitForExecution: (result: TransactionResult, acceptsPreconfirmations?: boolean) => Promise<IntentOpStatus | UserOperationReceipt>;
|
|
@@ -36,6 +37,6 @@ interface RhinestoneAccount {
|
|
|
36
37
|
* @returns account
|
|
37
38
|
*/
|
|
38
39
|
declare function createRhinestoneAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
39
|
-
export { createRhinestoneAccount,
|
|
40
|
+
export { createRhinestoneAccount, addOwner, changeMultiFactorThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, removeOwner, removeSubValidator, setSubValidator, setUpRecovery, isAccountError, AccountError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, Eip7702NotSupportedForAccountError, isExecutionError, IntentFailedError, ExecutionError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, isOrchestratorError, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getSupportedTokens, getTokenAddress, };
|
|
40
41
|
export type { RhinestoneAccount, Session, Call, IntentData, PreparedTransactionData, SignedTransactionData, TransactionResult, IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementSystem, SignedIntentOp, Portfolio, };
|
|
41
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,GAAG,EACH,eAAe,EACf,uBAAuB,EACvB,SAAS,EACV,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EACL,YAAY,EAEZ,8BAA8B,EAC9B,kCAAkC,EAClC,wCAAwC,EACxC,4BAA4B,EAE5B,cAAc,EACd,kCAAkC,EAClC,qCAAqC,EACrC,4BAA4B,EAE7B,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,QAAQ,EACR,0BAA0B,EAC1B,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,2BAA2B,EAC3B,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,aAAa,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EACL,cAAc,EAGd,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,0CAA0C,EAE1C,0CAA0C,EAE3C,MAAM,aAAa,CAAA;AACpB,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,uBAAuB,EAE5B,KAAK,qBAAqB,EAM3B,MAAM,mBAAmB,CAAA;AAK1B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAAK,QAAQ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EACZ,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,2BAA2B,EAC3B,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,aAAa,EAEb,cAAc,EACd,YAAY,EACZ,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAElC,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,0CAA0C,EAC1C,0CAA0C,EAC1C,gCAAgC,EAChC,yBAAyB,EAEzB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EAErB,kBAAkB,EAClB,eAAe,GAChB,CAAA;AACD,YAAY,EACV,iBAAiB,EACjB,OAAO,EACP,IAAI,EACJ,UAAU,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.isOrchestratorError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.ExecutionError = exports.IntentFailedError = exports.isExecutionError = exports.Eip7702NotSupportedForAccountError = exports.SignMessageNotSupportedByAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountError = exports.isAccountError = exports.setUpRecovery = exports.setSubValidator = exports.removeSubValidator = exports.removeOwner = exports.recover = exports.encodeSmartSessionSignature = exports.enablePasskeys = exports.enableMultiFactor = exports.enableEcdsa = exports.disablePasskeys = exports.disableMultiFactor = exports.disableEcdsa = exports.changeThreshold = exports.changeMultiFactorThreshold = exports.addOwner =
|
|
3
|
+
exports.getTokenAddress = exports.getSupportedTokens = exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.isOrchestratorError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.ExecutionError = exports.IntentFailedError = exports.isExecutionError = exports.Eip7702NotSupportedForAccountError = exports.SignMessageNotSupportedByAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountError = exports.isAccountError = exports.setUpRecovery = exports.setSubValidator = exports.removeSubValidator = exports.removeOwner = exports.recover = exports.encodeSmartSessionSignature = exports.enablePasskeys = exports.enableMultiFactor = exports.enableEcdsa = exports.disablePasskeys = exports.disableMultiFactor = exports.disableEcdsa = exports.changeThreshold = exports.changeMultiFactorThreshold = exports.addOwner = void 0;
|
|
4
4
|
exports.createRhinestoneAccount = createRhinestoneAccount;
|
|
5
5
|
const accounts_1 = require("./accounts");
|
|
6
6
|
Object.defineProperty(exports, "AccountError", { enumerable: true, get: function () { return accounts_1.AccountError; } });
|
|
@@ -12,8 +12,6 @@ Object.defineProperty(exports, "isAccountError", { enumerable: true, get: functi
|
|
|
12
12
|
Object.defineProperty(exports, "SigningNotSupportedForAccountError", { enumerable: true, get: function () { return accounts_1.SigningNotSupportedForAccountError; } });
|
|
13
13
|
Object.defineProperty(exports, "SignMessageNotSupportedByAccountError", { enumerable: true, get: function () { return accounts_1.SignMessageNotSupportedByAccountError; } });
|
|
14
14
|
Object.defineProperty(exports, "SmartSessionsNotEnabledError", { enumerable: true, get: function () { return accounts_1.SmartSessionsNotEnabledError; } });
|
|
15
|
-
const utils_1 = require("./accounts/utils");
|
|
16
|
-
Object.defineProperty(exports, "createTransport", { enumerable: true, get: function () { return utils_1.createTransport; } });
|
|
17
15
|
const actions_1 = require("./actions");
|
|
18
16
|
Object.defineProperty(exports, "addOwner", { enumerable: true, get: function () { return actions_1.addOwner; } });
|
|
19
17
|
Object.defineProperty(exports, "changeMultiFactorThreshold", { enumerable: true, get: function () { return actions_1.changeMultiFactorThreshold; } });
|
|
@@ -39,10 +37,12 @@ Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true,
|
|
|
39
37
|
Object.defineProperty(exports, "SourceChainsNotAvailableForUserOpFlowError", { enumerable: true, get: function () { return execution_1.SourceChainsNotAvailableForUserOpFlowError; } });
|
|
40
38
|
Object.defineProperty(exports, "UserOperationRequiredForSmartSessionsError", { enumerable: true, get: function () { return execution_1.UserOperationRequiredForSmartSessionsError; } });
|
|
41
39
|
const smart_session_1 = require("./execution/smart-session");
|
|
42
|
-
const
|
|
40
|
+
const utils_1 = require("./execution/utils");
|
|
43
41
|
const modules_1 = require("./modules");
|
|
44
42
|
const orchestrator_1 = require("./orchestrator");
|
|
45
43
|
Object.defineProperty(exports, "AuthenticationRequiredError", { enumerable: true, get: function () { return orchestrator_1.AuthenticationRequiredError; } });
|
|
44
|
+
Object.defineProperty(exports, "getSupportedTokens", { enumerable: true, get: function () { return orchestrator_1.getSupportedTokens; } });
|
|
45
|
+
Object.defineProperty(exports, "getTokenAddress", { enumerable: true, get: function () { return orchestrator_1.getTokenAddress; } });
|
|
46
46
|
Object.defineProperty(exports, "InsufficientBalanceError", { enumerable: true, get: function () { return orchestrator_1.InsufficientBalanceError; } });
|
|
47
47
|
Object.defineProperty(exports, "IntentNotFoundError", { enumerable: true, get: function () { return orchestrator_1.IntentNotFoundError; } });
|
|
48
48
|
Object.defineProperty(exports, "InvalidApiKeyError", { enumerable: true, get: function () { return orchestrator_1.InvalidApiKeyError; } });
|
|
@@ -62,23 +62,77 @@ Object.defineProperty(exports, "UnsupportedTokenError", { enumerable: true, get:
|
|
|
62
62
|
* @returns account
|
|
63
63
|
*/
|
|
64
64
|
async function createRhinestoneAccount(config) {
|
|
65
|
+
/**
|
|
66
|
+
* Deploys the account on a given chain
|
|
67
|
+
* @param chain Chain to deploy the account on
|
|
68
|
+
* @param session Session to deploy the account on (optional)
|
|
69
|
+
*/
|
|
65
70
|
function deploy(chain, session) {
|
|
66
71
|
return (0, accounts_1.deploy)(config, chain, session);
|
|
67
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Prepare and sign the EIP-7702 account initialization data
|
|
75
|
+
* @returns init data signature
|
|
76
|
+
*/
|
|
68
77
|
function signEip7702InitData() {
|
|
69
78
|
return (0, accounts_1.signEip7702InitData)(config);
|
|
70
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Prepare a transaction data
|
|
82
|
+
* @param transaction Transaction to prepare
|
|
83
|
+
* @returns prepared transaction data
|
|
84
|
+
*/
|
|
71
85
|
function prepareTransaction(transaction) {
|
|
72
|
-
return (0,
|
|
86
|
+
return (0, utils_1.prepareTransaction)(config, transaction);
|
|
73
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Sign a transaction
|
|
90
|
+
* @param preparedTransaction Prepared transaction data
|
|
91
|
+
* @returns signed transaction data
|
|
92
|
+
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
93
|
+
*/
|
|
74
94
|
function signTransaction(preparedTransaction) {
|
|
75
|
-
return (0,
|
|
95
|
+
return (0, utils_1.signTransaction)(config, preparedTransaction);
|
|
76
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Sign the required EIP-7702 authorizations for a transaction
|
|
99
|
+
* @param preparedTransaction Prepared transaction data
|
|
100
|
+
* @returns signed authorizations
|
|
101
|
+
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
102
|
+
*/
|
|
77
103
|
function signAuthorizations(preparedTransaction) {
|
|
78
|
-
return (0,
|
|
104
|
+
return (0, utils_1.signAuthorizations)(config, preparedTransaction);
|
|
79
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Sign a message (EIP-191)
|
|
108
|
+
* @param message Message to sign
|
|
109
|
+
* @param chain Chain to sign the message on
|
|
110
|
+
* @param signers Signers to use for signing
|
|
111
|
+
* @returns signature
|
|
112
|
+
*/
|
|
113
|
+
function signMessage(message, chain, signers) {
|
|
114
|
+
return (0, utils_1.signMessage)(config, message, chain, signers);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Sign a typed data (EIP-712)
|
|
118
|
+
* @param parameters Typed data parameters
|
|
119
|
+
* @param chain Chain to sign the typed data on
|
|
120
|
+
* @param signers Signers to use for signing
|
|
121
|
+
* @returns signature
|
|
122
|
+
*/
|
|
123
|
+
function signTypedData(parameters, chain, signers) {
|
|
124
|
+
return (0, utils_1.signTypedData)(config, parameters, chain, signers);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Submit a transaction
|
|
128
|
+
* @param signedTransaction Signed transaction data
|
|
129
|
+
* @param authorizations EIP-7702 authorizations to submit (optional)
|
|
130
|
+
* @returns transaction result object (an intent ID or a UserOp hash)
|
|
131
|
+
* @see {@link signTransaction} to sign the transaction data
|
|
132
|
+
* @see {@link signAuthorizations} to sign the required EIP-7702 authorizations
|
|
133
|
+
*/
|
|
80
134
|
function submitTransaction(signedTransaction, authorizations) {
|
|
81
|
-
return (0,
|
|
135
|
+
return (0, utils_1.submitTransaction)(config, signedTransaction, authorizations ?? []);
|
|
82
136
|
}
|
|
83
137
|
/**
|
|
84
138
|
* Sign and send a transaction
|
|
@@ -122,18 +176,28 @@ async function createRhinestoneAccount(config) {
|
|
|
122
176
|
function getMaxSpendableAmount(chain, tokenAddress, gasUnits) {
|
|
123
177
|
return (0, execution_1.getMaxSpendableAmount)(config, chain, tokenAddress, gasUnits);
|
|
124
178
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
179
|
+
/**
|
|
180
|
+
* Get account owners (ECDSA)
|
|
181
|
+
* @param chain Chain to get the owners on
|
|
182
|
+
* @returns Account owners
|
|
183
|
+
*/
|
|
128
184
|
function getOwners(chain) {
|
|
129
185
|
const account = getAddress();
|
|
130
186
|
return (0, modules_1.getOwners)(account, chain, config.provider);
|
|
131
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* Get account validator modules
|
|
190
|
+
* @param chain Chain to get the validators on
|
|
191
|
+
* @returns List of account validators
|
|
192
|
+
*/
|
|
132
193
|
function getValidators(chain) {
|
|
133
194
|
const accountType = config.account?.type || 'nexus';
|
|
134
195
|
const account = getAddress();
|
|
135
196
|
return (0, modules_1.getValidators)(accountType, account, chain, config.provider);
|
|
136
197
|
}
|
|
198
|
+
function getSessionDetails(sessions, sessionIndex, signature) {
|
|
199
|
+
return (0, smart_session_1.getSessionDetails)(config, sessions, sessionIndex, signature);
|
|
200
|
+
}
|
|
137
201
|
return {
|
|
138
202
|
config,
|
|
139
203
|
deploy,
|
|
@@ -141,6 +205,8 @@ async function createRhinestoneAccount(config) {
|
|
|
141
205
|
prepareTransaction,
|
|
142
206
|
signTransaction,
|
|
143
207
|
signAuthorizations,
|
|
208
|
+
signMessage,
|
|
209
|
+
signTypedData,
|
|
144
210
|
submitTransaction,
|
|
145
211
|
sendTransaction,
|
|
146
212
|
waitForExecution,
|
|
@@ -15,7 +15,7 @@ const index_1 = require("./index");
|
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
17
|
const setup = (0, index_1.getSetup)(config);
|
|
18
|
-
(0, vitest_1.expect)(setup.validators[0].address).toBe('
|
|
18
|
+
(0, vitest_1.expect)(setup.validators[0].address).toBe('0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5');
|
|
19
19
|
(0, vitest_1.expect)(setup.validators[0].type).toBe(1n);
|
|
20
20
|
});
|
|
21
21
|
(0, vitest_1.test)('should use webauthn validator for passkey owners', () => {
|
|
@@ -10,7 +10,7 @@ exports.getValidator = getValidator;
|
|
|
10
10
|
exports.getMockSignature = getMockSignature;
|
|
11
11
|
const viem_1 = require("viem");
|
|
12
12
|
const common_1 = require("../common");
|
|
13
|
-
const OWNABLE_VALIDATOR_ADDRESS = '
|
|
13
|
+
const OWNABLE_VALIDATOR_ADDRESS = '0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5';
|
|
14
14
|
exports.OWNABLE_VALIDATOR_ADDRESS = OWNABLE_VALIDATOR_ADDRESS;
|
|
15
15
|
const WEBAUTHN_VALIDATOR_ADDRESS = '0x0000000000578c4cB0e472a5462da43C495C3F33';
|
|
16
16
|
exports.WEBAUTHN_VALIDATOR_ADDRESS = WEBAUTHN_VALIDATOR_ADDRESS;
|
|
@@ -14,7 +14,7 @@ const core_1 = require("./core");
|
|
|
14
14
|
});
|
|
15
15
|
(0, vitest_1.expect)(validator.type).toEqual(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
16
16
|
(0, vitest_1.expect)((0, viem_1.isAddress)(validator.address)).toEqual(true);
|
|
17
|
-
(0, vitest_1.expect)(validator.address).toEqual('
|
|
17
|
+
(0, vitest_1.expect)(validator.address).toEqual('0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5');
|
|
18
18
|
(0, vitest_1.expect)(validator.initData).toEqual('0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936');
|
|
19
19
|
});
|
|
20
20
|
(0, vitest_1.test)('ECDSA: two addresses', () => {
|
|
@@ -24,7 +24,7 @@ const core_1 = require("./core");
|
|
|
24
24
|
});
|
|
25
25
|
(0, vitest_1.expect)(validator.type).toEqual(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
26
26
|
(0, vitest_1.expect)((0, viem_1.isAddress)(validator.address)).toEqual(true);
|
|
27
|
-
(0, vitest_1.expect)(validator.address).toEqual('
|
|
27
|
+
(0, vitest_1.expect)(validator.address).toEqual('0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5');
|
|
28
28
|
(0, vitest_1.expect)(validator.initData).toEqual('0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936');
|
|
29
29
|
});
|
|
30
30
|
(0, vitest_1.test)('ECDSA: three addresses, custom threshold', () => {
|
|
@@ -35,7 +35,7 @@ const core_1 = require("./core");
|
|
|
35
35
|
});
|
|
36
36
|
(0, vitest_1.expect)(validator.type).toEqual(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
37
37
|
(0, vitest_1.expect)((0, viem_1.isAddress)(validator.address)).toEqual(true);
|
|
38
|
-
(0, vitest_1.expect)(validator.address).toEqual('
|
|
38
|
+
(0, vitest_1.expect)(validator.address).toEqual('0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5');
|
|
39
39
|
(0, vitest_1.expect)(validator.initData).toEqual('0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000030000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000c27b7578151c5ef713c62c65db09763d57ac3596000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936');
|
|
40
40
|
});
|
|
41
41
|
(0, vitest_1.test)('Passkey', () => {
|
|
@@ -294,9 +294,9 @@ function getPolicyData(policy) {
|
|
|
294
294
|
case 'time-frame': {
|
|
295
295
|
return {
|
|
296
296
|
policy: TIME_FRAME_POLICY_ADDRESS,
|
|
297
|
-
initData: (0, viem_1.encodePacked)(['
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
initData: (0, viem_1.encodePacked)(['uint48', 'uint48'], [
|
|
298
|
+
Math.floor(policy.validUntil / 1000),
|
|
299
|
+
Math.floor(policy.validAfter / 1000),
|
|
300
300
|
]),
|
|
301
301
|
};
|
|
302
302
|
}
|
|
@@ -15,7 +15,7 @@ const smart_sessions_2 = require("./smart-sessions");
|
|
|
15
15
|
type: 'ecdsa',
|
|
16
16
|
accounts: [consts_1.accountA, consts_1.accountB],
|
|
17
17
|
},
|
|
18
|
-
})).toBe('
|
|
18
|
+
})).toBe('0xf24845e5da40837f1dc8f1d6ce3d2fd64e96b35e9c9eccf614ed2c4e3be70e9f');
|
|
19
19
|
});
|
|
20
20
|
(0, vitest_1.test)('with salt', () => {
|
|
21
21
|
(0, vitest_1.expect)((0, smart_sessions_2.getPermissionId)({
|
|
@@ -24,7 +24,7 @@ const smart_sessions_2 = require("./smart-sessions");
|
|
|
24
24
|
accounts: [consts_1.accountA, consts_1.accountB],
|
|
25
25
|
},
|
|
26
26
|
salt: '0x97340e1cfff3319c76ef22b2bc9d3231071d550125d68c9d4a8972823f166320',
|
|
27
|
-
})).toBe('
|
|
27
|
+
})).toBe('0xee8658aa7297fb41dc2658545e3c99eb2173085b4c982b9ab3802af86b3adf54');
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
(0, vitest_1.describe)('Smart Session Validator', () => {
|
|
@@ -217,10 +217,10 @@ const smart_sessions_2 = require("./smart-sessions");
|
|
|
217
217
|
});
|
|
218
218
|
(0, vitest_1.describe)('Encode Smart Session Signature', () => {
|
|
219
219
|
(0, vitest_1.test)('use mode', () => {
|
|
220
|
-
const permissionId = '
|
|
220
|
+
const permissionId = '0xf24845e5da40837f1dc8f1d6ce3d2fd64e96b35e9c9eccf614ed2c4e3be70e9f';
|
|
221
221
|
const signature = '0xabcdef';
|
|
222
222
|
const sessionSignature = (0, smart_sessions_2.encodeSmartSessionSignature)(smart_sessions_2.SMART_SESSION_MODE_USE, permissionId, signature);
|
|
223
|
-
(0, vitest_1.expect)(sessionSignature).toEqual('
|
|
223
|
+
(0, vitest_1.expect)(sessionSignature).toEqual('0x00f24845e5da40837f1dc8f1d6ce3d2fd64e96b35e9c9eccf614ed2c4e3be70e9fabcdef');
|
|
224
224
|
});
|
|
225
225
|
});
|
|
226
226
|
});
|
|
@@ -4,8 +4,7 @@ import { AuthenticationRequiredError, InsufficientBalanceError, IntentNotFoundEr
|
|
|
4
4
|
import { getSupportedTokens, getTokenAddress, getTokenSymbol, getWethAddress, isTokenAddressSupported } from './registry';
|
|
5
5
|
import type { IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, Portfolio, SettlementSystem, SignedIntentOp, SupportedChain, TokenConfig } from './types';
|
|
6
6
|
import { INTENT_STATUS_COMPLETED, INTENT_STATUS_EXPIRED, INTENT_STATUS_FAILED, INTENT_STATUS_FILLED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_PENDING, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN } from './types';
|
|
7
|
-
import { getIntentOpHash } from './utils';
|
|
8
7
|
declare function getOrchestrator(apiKey: string, orchestratorUrl?: string): Orchestrator;
|
|
9
8
|
export type { IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementSystem, SignedIntentOp, SupportedChain, TokenConfig, Portfolio, };
|
|
10
|
-
export { INTENT_STATUS_PENDING, INTENT_STATUS_EXPIRED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_COMPLETED, INTENT_STATUS_FILLED, INTENT_STATUS_FAILED, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getOrchestrator,
|
|
9
|
+
export { INTENT_STATUS_PENDING, INTENT_STATUS_EXPIRED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_COMPLETED, INTENT_STATUS_FILLED, INTENT_STATUS_FAILED, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getOrchestrator, getWethAddress, getTokenSymbol, getTokenAddress, getSupportedTokens, isOrchestratorError, isTokenAddressSupported, };
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iCAAiC,EACjC,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iCAAiC,EACjC,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB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