@charterlabs/rhinestone-sdk 0.1.13 → 0.2.1
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/README.md +181 -74
- package/dist/src/accounts/index.d.ts +8 -7
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +65 -210
- package/dist/src/accounts/index.test.js +2 -3
- 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 -12
- 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 +17 -17
- package/dist/src/accounts/nexus.test.js +11 -14
- 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 -7
- 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 -7
- 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 +37 -17
- package/dist/src/index.d.ts +9 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +92 -31
- package/dist/src/modules/index.d.ts +3 -8
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +26 -27
- package/dist/src/modules/index.test.js +1 -4
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +19 -14
- package/dist/src/modules/validators/core.test.js +4 -11
- package/dist/src/modules/validators/index.d.ts +1 -2
- package/dist/src/modules/validators/index.d.ts.map +1 -1
- package/dist/src/modules/validators/index.js +1 -13
- 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/dist/src/types.d.ts +2 -5
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -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,CA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AAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,GACX,CAAA;AACD,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,GACtB,CAAA"}
|
|
@@ -4,6 +4,8 @@ exports.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) {
|
|
@@ -193,7 +223,7 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
193
223
|
account: {
|
|
194
224
|
address: accountAddress,
|
|
195
225
|
accountType: 'ERC7579',
|
|
196
|
-
setupOps
|
|
226
|
+
setupOps,
|
|
197
227
|
delegations,
|
|
198
228
|
},
|
|
199
229
|
destinationExecutions: calls,
|
|
@@ -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) {
|
|
@@ -359,16 +388,7 @@ function getValidator(config, signers) {
|
|
|
359
388
|
}
|
|
360
389
|
// Multi-factor
|
|
361
390
|
if (withOwner.kind === 'multi-factor') {
|
|
362
|
-
|
|
363
|
-
const validators = withOwner.validators.map(validator => {
|
|
364
|
-
if (validator.type === 'ecdsa') {
|
|
365
|
-
return { type: 'ecdsa', accounts: validator.accounts, threshold: 1 };
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
return { type: 'passkey', account: validator.account, credentialIds: [] };
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
|
-
return (0, core_1.getMultiFactorValidator)(1, validators);
|
|
391
|
+
return (0, core_1.getMultiFactorValidator)(1, withOwner.validators);
|
|
372
392
|
}
|
|
373
393
|
}
|
|
374
394
|
// Smart sessions
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,15 +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
|
-
import { AccountError,
|
|
4
|
-
import { createTransport } from './accounts/utils';
|
|
3
|
+
import { AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, SmartSessionsNotEnabledError } from './accounts';
|
|
5
4
|
import { addOwner, changeMultiFactorThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, removeOwner, removeSubValidator, setSubValidator, setUpRecovery } from './actions';
|
|
6
|
-
import { addCredential, generateCredentialId, getCredentialIds, getCredentialInfo, getCredentials, getThreshold, hasCredential, hasCredentialById, removeCredential, setThreshold, WEBAUTHN_VALIDATOR_ABI } from './modules/validators';
|
|
7
5
|
import type { TransactionResult } from './execution';
|
|
8
6
|
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError } from './execution';
|
|
9
7
|
import { type SessionDetails } from './execution/smart-session';
|
|
10
8
|
import { type IntentData, type PreparedTransactionData, type SignedTransactionData } from './execution/utils';
|
|
11
|
-
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
|
|
12
|
-
import type { Call, RhinestoneAccountConfig, Session, Transaction } from './types';
|
|
9
|
+
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';
|
|
10
|
+
import type { Call, RhinestoneAccountConfig, Session, SignerSet, Transaction } from './types';
|
|
13
11
|
interface RhinestoneAccount {
|
|
14
12
|
config: RhinestoneAccountConfig;
|
|
15
13
|
deploy: (chain: Chain, session?: Session) => Promise<void>;
|
|
@@ -17,6 +15,8 @@ interface RhinestoneAccount {
|
|
|
17
15
|
prepareTransaction: (transaction: Transaction) => Promise<PreparedTransactionData>;
|
|
18
16
|
signTransaction: (preparedTransaction: PreparedTransactionData) => Promise<SignedTransactionData>;
|
|
19
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>;
|
|
20
20
|
submitTransaction: (signedTransaction: SignedTransactionData, authorizations?: SignedAuthorizationList) => Promise<TransactionResult>;
|
|
21
21
|
sendTransaction: (transaction: Transaction) => Promise<TransactionResult>;
|
|
22
22
|
waitForExecution: (result: TransactionResult, acceptsPreconfirmations?: boolean) => Promise<IntentOpStatus | UserOperationReceipt>;
|
|
@@ -37,6 +37,8 @@ interface RhinestoneAccount {
|
|
|
37
37
|
* @returns account
|
|
38
38
|
*/
|
|
39
39
|
declare function createRhinestoneAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
40
|
-
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, };
|
|
41
41
|
export type { RhinestoneAccount, Session, Call, IntentData, PreparedTransactionData, SignedTransactionData, TransactionResult, IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementSystem, SignedIntentOp, Portfolio, };
|
|
42
|
+
export { generateCredentialId, getCredentialIds, hasCredentialById, hasCredential, addCredential, removeCredential, setThreshold, getCredentialInfo, getThreshold, getCredentials, WEBAUTHN_VALIDATOR_ABI, } from './modules/validators/webauthn-contract';
|
|
43
|
+
export { getOrchestrator } from './orchestrator';
|
|
42
44
|
//# 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,wBAAwB,EACxB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAA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,YAAY,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,GACtB,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;AAGD,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,sBAAsB,GACvB,MAAM,wCAAwC,CAAA;AAG/C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.removeCredential = exports.addCredential = exports.hasCredential = exports.hasCredentialById = exports.getCredentialIds = exports.generateCredentialId = 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
|
+
exports.getOrchestrator = exports.WEBAUTHN_VALIDATOR_ABI = exports.getCredentials = exports.getThreshold = exports.getCredentialInfo = exports.setThreshold = void 0;
|
|
5
5
|
exports.createRhinestoneAccount = createRhinestoneAccount;
|
|
6
6
|
const accounts_1 = require("./accounts");
|
|
7
7
|
Object.defineProperty(exports, "AccountError", { enumerable: true, get: function () { return accounts_1.AccountError; } });
|
|
8
|
-
Object.defineProperty(exports, "deployStandaloneWithEoa", { enumerable: true, get: function () { return accounts_1.deployStandaloneWithEoa; } });
|
|
9
8
|
Object.defineProperty(exports, "Eip7702AccountMustHaveEoaError", { enumerable: true, get: function () { return accounts_1.Eip7702AccountMustHaveEoaError; } });
|
|
10
9
|
Object.defineProperty(exports, "Eip7702NotSupportedForAccountError", { enumerable: true, get: function () { return accounts_1.Eip7702NotSupportedForAccountError; } });
|
|
11
10
|
Object.defineProperty(exports, "ExistingEip7702AccountsNotSupportedError", { enumerable: true, get: function () { return accounts_1.ExistingEip7702AccountsNotSupportedError; } });
|
|
@@ -14,8 +13,6 @@ Object.defineProperty(exports, "isAccountError", { enumerable: true, get: functi
|
|
|
14
13
|
Object.defineProperty(exports, "SigningNotSupportedForAccountError", { enumerable: true, get: function () { return accounts_1.SigningNotSupportedForAccountError; } });
|
|
15
14
|
Object.defineProperty(exports, "SignMessageNotSupportedByAccountError", { enumerable: true, get: function () { return accounts_1.SignMessageNotSupportedByAccountError; } });
|
|
16
15
|
Object.defineProperty(exports, "SmartSessionsNotEnabledError", { enumerable: true, get: function () { return accounts_1.SmartSessionsNotEnabledError; } });
|
|
17
|
-
const utils_1 = require("./accounts/utils");
|
|
18
|
-
Object.defineProperty(exports, "createTransport", { enumerable: true, get: function () { return utils_1.createTransport; } });
|
|
19
16
|
const actions_1 = require("./actions");
|
|
20
17
|
Object.defineProperty(exports, "addOwner", { enumerable: true, get: function () { return actions_1.addOwner; } });
|
|
21
18
|
Object.defineProperty(exports, "changeMultiFactorThreshold", { enumerable: true, get: function () { return actions_1.changeMultiFactorThreshold; } });
|
|
@@ -32,18 +29,6 @@ Object.defineProperty(exports, "removeOwner", { enumerable: true, get: function
|
|
|
32
29
|
Object.defineProperty(exports, "removeSubValidator", { enumerable: true, get: function () { return actions_1.removeSubValidator; } });
|
|
33
30
|
Object.defineProperty(exports, "setSubValidator", { enumerable: true, get: function () { return actions_1.setSubValidator; } });
|
|
34
31
|
Object.defineProperty(exports, "setUpRecovery", { enumerable: true, get: function () { return actions_1.setUpRecovery; } });
|
|
35
|
-
const validators_1 = require("./modules/validators");
|
|
36
|
-
Object.defineProperty(exports, "addCredential", { enumerable: true, get: function () { return validators_1.addCredential; } });
|
|
37
|
-
Object.defineProperty(exports, "generateCredentialId", { enumerable: true, get: function () { return validators_1.generateCredentialId; } });
|
|
38
|
-
Object.defineProperty(exports, "getCredentialIds", { enumerable: true, get: function () { return validators_1.getCredentialIds; } });
|
|
39
|
-
Object.defineProperty(exports, "getCredentialInfo", { enumerable: true, get: function () { return validators_1.getCredentialInfo; } });
|
|
40
|
-
Object.defineProperty(exports, "getCredentials", { enumerable: true, get: function () { return validators_1.getCredentials; } });
|
|
41
|
-
Object.defineProperty(exports, "getThreshold", { enumerable: true, get: function () { return validators_1.getThreshold; } });
|
|
42
|
-
Object.defineProperty(exports, "hasCredential", { enumerable: true, get: function () { return validators_1.hasCredential; } });
|
|
43
|
-
Object.defineProperty(exports, "hasCredentialById", { enumerable: true, get: function () { return validators_1.hasCredentialById; } });
|
|
44
|
-
Object.defineProperty(exports, "removeCredential", { enumerable: true, get: function () { return validators_1.removeCredential; } });
|
|
45
|
-
Object.defineProperty(exports, "setThreshold", { enumerable: true, get: function () { return validators_1.setThreshold; } });
|
|
46
|
-
Object.defineProperty(exports, "WEBAUTHN_VALIDATOR_ABI", { enumerable: true, get: function () { return validators_1.WEBAUTHN_VALIDATOR_ABI; } });
|
|
47
32
|
const execution_1 = require("./execution");
|
|
48
33
|
Object.defineProperty(exports, "ExecutionError", { enumerable: true, get: function () { return execution_1.ExecutionError; } });
|
|
49
34
|
Object.defineProperty(exports, "IntentFailedError", { enumerable: true, get: function () { return execution_1.IntentFailedError; } });
|
|
@@ -53,7 +38,7 @@ Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true,
|
|
|
53
38
|
Object.defineProperty(exports, "SourceChainsNotAvailableForUserOpFlowError", { enumerable: true, get: function () { return execution_1.SourceChainsNotAvailableForUserOpFlowError; } });
|
|
54
39
|
Object.defineProperty(exports, "UserOperationRequiredForSmartSessionsError", { enumerable: true, get: function () { return execution_1.UserOperationRequiredForSmartSessionsError; } });
|
|
55
40
|
const smart_session_1 = require("./execution/smart-session");
|
|
56
|
-
const
|
|
41
|
+
const utils_1 = require("./execution/utils");
|
|
57
42
|
const modules_1 = require("./modules");
|
|
58
43
|
const orchestrator_1 = require("./orchestrator");
|
|
59
44
|
Object.defineProperty(exports, "AuthenticationRequiredError", { enumerable: true, get: function () { return orchestrator_1.AuthenticationRequiredError; } });
|
|
@@ -69,12 +54,6 @@ Object.defineProperty(exports, "TokenNotSupportedError", { enumerable: true, get
|
|
|
69
54
|
Object.defineProperty(exports, "UnsupportedChainError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedChainError; } });
|
|
70
55
|
Object.defineProperty(exports, "UnsupportedChainIdError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedChainIdError; } });
|
|
71
56
|
Object.defineProperty(exports, "UnsupportedTokenError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedTokenError; } });
|
|
72
|
-
Object.defineProperty(exports, "getTokenAddress", { enumerable: true, get: function () { return orchestrator_1.getTokenAddress; } });
|
|
73
|
-
Object.defineProperty(exports, "getTokenSymbol", { enumerable: true, get: function () { return orchestrator_1.getTokenSymbol; } });
|
|
74
|
-
Object.defineProperty(exports, "getWethAddress", { enumerable: true, get: function () { return orchestrator_1.getWethAddress; } });
|
|
75
|
-
Object.defineProperty(exports, "getSupportedTokens", { enumerable: true, get: function () { return orchestrator_1.getSupportedTokens; } });
|
|
76
|
-
Object.defineProperty(exports, "isTokenAddressSupported", { enumerable: true, get: function () { return orchestrator_1.isTokenAddressSupported; } });
|
|
77
|
-
Object.defineProperty(exports, "getOrchestrator", { enumerable: true, get: function () { return orchestrator_1.getOrchestrator; } });
|
|
78
57
|
/**
|
|
79
58
|
* Initialize a Rhinestone account
|
|
80
59
|
* Note: accounts are deployed onchain only when the first transaction is sent.
|
|
@@ -82,23 +61,77 @@ Object.defineProperty(exports, "getOrchestrator", { enumerable: true, get: funct
|
|
|
82
61
|
* @returns account
|
|
83
62
|
*/
|
|
84
63
|
async function createRhinestoneAccount(config) {
|
|
64
|
+
/**
|
|
65
|
+
* Deploys the account on a given chain
|
|
66
|
+
* @param chain Chain to deploy the account on
|
|
67
|
+
* @param session Session to deploy the account on (optional)
|
|
68
|
+
*/
|
|
85
69
|
function deploy(chain, session) {
|
|
86
70
|
return (0, accounts_1.deploy)(config, chain, session);
|
|
87
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Prepare and sign the EIP-7702 account initialization data
|
|
74
|
+
* @returns init data signature
|
|
75
|
+
*/
|
|
88
76
|
function signEip7702InitData() {
|
|
89
77
|
return (0, accounts_1.signEip7702InitData)(config);
|
|
90
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Prepare a transaction data
|
|
81
|
+
* @param transaction Transaction to prepare
|
|
82
|
+
* @returns prepared transaction data
|
|
83
|
+
*/
|
|
91
84
|
function prepareTransaction(transaction) {
|
|
92
|
-
return (0,
|
|
85
|
+
return (0, utils_1.prepareTransaction)(config, transaction);
|
|
93
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Sign a transaction
|
|
89
|
+
* @param preparedTransaction Prepared transaction data
|
|
90
|
+
* @returns signed transaction data
|
|
91
|
+
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
92
|
+
*/
|
|
94
93
|
function signTransaction(preparedTransaction) {
|
|
95
|
-
return (0,
|
|
94
|
+
return (0, utils_1.signTransaction)(config, preparedTransaction);
|
|
96
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Sign the required EIP-7702 authorizations for a transaction
|
|
98
|
+
* @param preparedTransaction Prepared transaction data
|
|
99
|
+
* @returns signed authorizations
|
|
100
|
+
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
101
|
+
*/
|
|
97
102
|
function signAuthorizations(preparedTransaction) {
|
|
98
|
-
return (0,
|
|
103
|
+
return (0, utils_1.signAuthorizations)(config, preparedTransaction);
|
|
99
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Sign a message (EIP-191)
|
|
107
|
+
* @param message Message to sign
|
|
108
|
+
* @param chain Chain to sign the message on
|
|
109
|
+
* @param signers Signers to use for signing
|
|
110
|
+
* @returns signature
|
|
111
|
+
*/
|
|
112
|
+
function signMessage(message, chain, signers) {
|
|
113
|
+
return (0, utils_1.signMessage)(config, message, chain, signers);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Sign a typed data (EIP-712)
|
|
117
|
+
* @param parameters Typed data parameters
|
|
118
|
+
* @param chain Chain to sign the typed data on
|
|
119
|
+
* @param signers Signers to use for signing
|
|
120
|
+
* @returns signature
|
|
121
|
+
*/
|
|
122
|
+
function signTypedData(parameters, chain, signers) {
|
|
123
|
+
return (0, utils_1.signTypedData)(config, parameters, chain, signers);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Submit a transaction
|
|
127
|
+
* @param signedTransaction Signed transaction data
|
|
128
|
+
* @param authorizations EIP-7702 authorizations to submit (optional)
|
|
129
|
+
* @returns transaction result object (an intent ID or a UserOp hash)
|
|
130
|
+
* @see {@link signTransaction} to sign the transaction data
|
|
131
|
+
* @see {@link signAuthorizations} to sign the required EIP-7702 authorizations
|
|
132
|
+
*/
|
|
100
133
|
function submitTransaction(signedTransaction, authorizations) {
|
|
101
|
-
return (0,
|
|
134
|
+
return (0, utils_1.submitTransaction)(config, signedTransaction, authorizations ?? []);
|
|
102
135
|
}
|
|
103
136
|
/**
|
|
104
137
|
* Sign and send a transaction
|
|
@@ -142,18 +175,28 @@ async function createRhinestoneAccount(config) {
|
|
|
142
175
|
function getMaxSpendableAmount(chain, tokenAddress, gasUnits) {
|
|
143
176
|
return (0, execution_1.getMaxSpendableAmount)(config, chain, tokenAddress, gasUnits);
|
|
144
177
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
178
|
+
/**
|
|
179
|
+
* Get account owners (ECDSA)
|
|
180
|
+
* @param chain Chain to get the owners on
|
|
181
|
+
* @returns Account owners
|
|
182
|
+
*/
|
|
148
183
|
function getOwners(chain) {
|
|
149
184
|
const account = getAddress();
|
|
150
185
|
return (0, modules_1.getOwners)(account, chain, config.provider);
|
|
151
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Get account validator modules
|
|
189
|
+
* @param chain Chain to get the validators on
|
|
190
|
+
* @returns List of account validators
|
|
191
|
+
*/
|
|
152
192
|
function getValidators(chain) {
|
|
153
193
|
const accountType = config.account?.type || 'nexus';
|
|
154
194
|
const account = getAddress();
|
|
155
195
|
return (0, modules_1.getValidators)(accountType, account, chain, config.provider);
|
|
156
196
|
}
|
|
197
|
+
function getSessionDetails(sessions, sessionIndex, signature) {
|
|
198
|
+
return (0, smart_session_1.getSessionDetails)(config, sessions, sessionIndex, signature);
|
|
199
|
+
}
|
|
157
200
|
return {
|
|
158
201
|
config,
|
|
159
202
|
deploy,
|
|
@@ -161,6 +204,8 @@ async function createRhinestoneAccount(config) {
|
|
|
161
204
|
prepareTransaction,
|
|
162
205
|
signTransaction,
|
|
163
206
|
signAuthorizations,
|
|
207
|
+
signMessage,
|
|
208
|
+
signTypedData,
|
|
164
209
|
submitTransaction,
|
|
165
210
|
sendTransaction,
|
|
166
211
|
waitForExecution,
|
|
@@ -172,3 +217,19 @@ async function createRhinestoneAccount(config) {
|
|
|
172
217
|
getValidators,
|
|
173
218
|
};
|
|
174
219
|
}
|
|
220
|
+
// WebAuthn Validator contract helpers
|
|
221
|
+
var webauthn_contract_1 = require("./modules/validators/webauthn-contract");
|
|
222
|
+
Object.defineProperty(exports, "generateCredentialId", { enumerable: true, get: function () { return webauthn_contract_1.generateCredentialId; } });
|
|
223
|
+
Object.defineProperty(exports, "getCredentialIds", { enumerable: true, get: function () { return webauthn_contract_1.getCredentialIds; } });
|
|
224
|
+
Object.defineProperty(exports, "hasCredentialById", { enumerable: true, get: function () { return webauthn_contract_1.hasCredentialById; } });
|
|
225
|
+
Object.defineProperty(exports, "hasCredential", { enumerable: true, get: function () { return webauthn_contract_1.hasCredential; } });
|
|
226
|
+
Object.defineProperty(exports, "addCredential", { enumerable: true, get: function () { return webauthn_contract_1.addCredential; } });
|
|
227
|
+
Object.defineProperty(exports, "removeCredential", { enumerable: true, get: function () { return webauthn_contract_1.removeCredential; } });
|
|
228
|
+
Object.defineProperty(exports, "setThreshold", { enumerable: true, get: function () { return webauthn_contract_1.setThreshold; } });
|
|
229
|
+
Object.defineProperty(exports, "getCredentialInfo", { enumerable: true, get: function () { return webauthn_contract_1.getCredentialInfo; } });
|
|
230
|
+
Object.defineProperty(exports, "getThreshold", { enumerable: true, get: function () { return webauthn_contract_1.getThreshold; } });
|
|
231
|
+
Object.defineProperty(exports, "getCredentials", { enumerable: true, get: function () { return webauthn_contract_1.getCredentials; } });
|
|
232
|
+
Object.defineProperty(exports, "WEBAUTHN_VALIDATOR_ABI", { enumerable: true, get: function () { return webauthn_contract_1.WEBAUTHN_VALIDATOR_ABI; } });
|
|
233
|
+
// Orchestrator helper
|
|
234
|
+
var orchestrator_2 = require("./orchestrator");
|
|
235
|
+
Object.defineProperty(exports, "getOrchestrator", { enumerable: true, get: function () { return orchestrator_2.getOrchestrator; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Chain, type Hex } from 'viem';
|
|
2
2
|
import type { RhinestoneAccountConfig } from '../types';
|
|
3
3
|
import { type Module } from './common';
|
|
4
4
|
import { HOOK_ADDRESS } from './omni-account';
|
|
@@ -7,14 +7,12 @@ import { getOwnerValidator } from './validators';
|
|
|
7
7
|
interface WebAuthnData {
|
|
8
8
|
authenticatorData: Hex;
|
|
9
9
|
clientDataJSON: string;
|
|
10
|
-
challengeIndex: number | bigint;
|
|
11
10
|
typeIndex: number | bigint;
|
|
12
11
|
}
|
|
13
12
|
interface WebauthnValidatorSignature {
|
|
14
|
-
credentialIds: Hex[];
|
|
15
|
-
usePrecompiled?: boolean;
|
|
16
13
|
webauthn: WebAuthnData;
|
|
17
14
|
signature: WebauthnSignature | Hex | Uint8Array;
|
|
15
|
+
usePrecompiled?: boolean;
|
|
18
16
|
}
|
|
19
17
|
interface WebauthnSignature {
|
|
20
18
|
r: bigint;
|
|
@@ -25,12 +23,9 @@ interface ModeleSetup {
|
|
|
25
23
|
executors: Module[];
|
|
26
24
|
fallbacks: Module[];
|
|
27
25
|
hooks: Module[];
|
|
28
|
-
registry: Address;
|
|
29
|
-
attesters: Address[];
|
|
30
|
-
threshold: number;
|
|
31
26
|
}
|
|
32
27
|
declare function getSetup(config: RhinestoneAccountConfig): ModeleSetup;
|
|
33
|
-
declare function getWebauthnValidatorSignature(
|
|
28
|
+
declare function getWebauthnValidatorSignature({ webauthn, signature, usePrecompiled, }: WebauthnValidatorSignature): `0x${string}`;
|
|
34
29
|
declare function isRip7212SupportedNetwork(chain: Chain): boolean;
|
|
35
30
|
export { HOOK_ADDRESS, getSetup, getOwnerValidator, getWebauthnValidatorSignature, getOwners, getValidators, isRip7212SupportedNetwork, };
|
|
36
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,KAAK,EAEV,KAAK,GAAG,EAET,MAAM,MAAM,CAAA;AAWb,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAEvD,OAAO,EAGL,KAAK,MAAM,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,YAAY,EAA2B,MAAM,gBAAgB,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAA4B,MAAM,cAAc,CAAA;AAM1E,UAAU,YAAY;IACpB,iBAAiB,EAAE,GAAG,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B;AAED,UAAU,0BAA0B;IAClC,QAAQ,EAAE,YAAY,CAAA;IACtB,SAAS,EAAE,i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