@rhinestone/sdk 1.0.42 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/accounts/index.d.ts +2 -5
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +0 -37
- package/dist/src/accounts/kernel.d.ts +2 -4
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +0 -16
- package/dist/src/accounts/nexus.d.ts +2 -4
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +0 -16
- package/dist/src/accounts/passport.d.ts +4 -7
- package/dist/src/accounts/passport.d.ts.map +1 -1
- package/dist/src/accounts/passport.js +0 -91
- package/dist/src/accounts/safe.d.ts +2 -4
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +0 -16
- package/dist/src/accounts/signing/common.d.ts +3 -3
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +18 -2
- package/dist/src/accounts/signing/message.js +2 -2
- package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
- package/dist/src/accounts/signing/typedData.js +3 -3
- package/dist/src/accounts/startale.d.ts +2 -4
- package/dist/src/accounts/startale.d.ts.map +1 -1
- package/dist/src/accounts/startale.js +0 -4
- package/dist/src/actions/compact.d.ts +3 -2
- package/dist/src/actions/compact.d.ts.map +1 -1
- package/dist/src/actions/compact.js +1 -0
- package/dist/src/actions/smart-sessions.d.ts +7 -8
- package/dist/src/actions/smart-sessions.d.ts.map +1 -1
- package/dist/src/actions/smart-sessions.js +7 -4
- package/dist/src/execution/compact.d.ts +11 -16
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +8 -14
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +3 -12
- package/dist/src/execution/permit2.d.ts +12 -17
- package/dist/src/execution/permit2.d.ts.map +1 -1
- package/dist/src/execution/permit2.js +9 -15
- package/dist/src/execution/singleChainOps.d.ts +15 -3
- package/dist/src/execution/singleChainOps.d.ts.map +1 -1
- package/dist/src/execution/singleChainOps.js +17 -3
- package/dist/src/execution/utils.d.ts +1 -1
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +10 -17
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -4
- package/dist/src/modules/abi/smart-session-emissary.d.ts +696 -0
- package/dist/src/modules/abi/smart-session-emissary.d.ts.map +1 -0
- package/dist/src/modules/abi/smart-session-emissary.js +565 -0
- package/dist/src/modules/index.d.ts +2 -1
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +3 -1
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +2 -0
- package/dist/src/modules/validators/index.d.ts +2 -2
- package/dist/src/modules/validators/index.d.ts.map +1 -1
- package/dist/src/modules/validators/index.js +1 -6
- package/dist/src/modules/validators/smart-sessions.d.ts +105 -20
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +199 -439
- package/dist/src/orchestrator/types.d.ts +7 -4
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/types.d.ts +8 -15
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/execution/smart-session.d.ts +0 -13
- package/dist/src/execution/smart-session.d.ts.map +0 -1
- package/dist/src/execution/smart-session.js +0 -178
- package/dist/src/modules/validators/smart-sessions.test.d.ts +0 -2
- package/dist/src/modules/validators/smart-sessions.test.d.ts.map +0 -1
- package/dist/src/modules/validators/smart-sessions.test.js +0 -219
|
@@ -9,6 +9,7 @@ exports.enableErc20Withdrawal = enableErc20Withdrawal;
|
|
|
9
9
|
exports.disableErc20Withdrawal = disableErc20Withdrawal;
|
|
10
10
|
exports.withdrawErc20 = withdrawErc20;
|
|
11
11
|
exports.approveErc20 = approveErc20;
|
|
12
|
+
exports.lockTag = lockTag;
|
|
12
13
|
const viem_1 = require("viem");
|
|
13
14
|
const compact_1 = require("../execution/compact");
|
|
14
15
|
const ALLOCATOR_ADDRESS = '0xd93ed1dd9f1f0b523e4d77233809dc2ee22928c6';
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Hex } from 'viem';
|
|
2
|
+
import type { LazyCallInput, SessionInput } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Enable a smart session
|
|
4
5
|
* @param session session to enable
|
|
5
6
|
* @returns Calls to enable the smart session
|
|
6
7
|
*/
|
|
7
|
-
declare function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export { enableSession };
|
|
8
|
+
declare function experimental_enableSession(session: SessionInput, enableSessionSignature: Hex, hashesAndChainIds: {
|
|
9
|
+
chainId: bigint;
|
|
10
|
+
sessionDigest: Hex;
|
|
11
|
+
}[], sessionToEnableIndex: number): LazyCallInput;
|
|
12
|
+
export { experimental_enableSession };
|
|
14
13
|
//# sourceMappingURL=smart-sessions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-sessions.d.ts","sourceRoot":"","sources":["../../../actions/smart-sessions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"smart-sessions.d.ts","sourceRoot":"","sources":["../../../actions/smart-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE3D;;;;GAIG;AACH,iBAAS,0BAA0B,CACjC,OAAO,EAAE,YAAY,EACrB,sBAAsB,EAAE,GAAG,EAC3B,iBAAiB,EAAE;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,GAAG,CAAA;CACnB,EAAE,EACH,oBAAoB,EAAE,MAAM,GAC3B,aAAa,CAef;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAA"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.experimental_enableSession = experimental_enableSession;
|
|
4
4
|
const smart_sessions_1 = require("../modules/validators/smart-sessions");
|
|
5
5
|
/**
|
|
6
6
|
* Enable a smart session
|
|
7
7
|
* @param session session to enable
|
|
8
8
|
* @returns Calls to enable the smart session
|
|
9
9
|
*/
|
|
10
|
-
function
|
|
10
|
+
function experimental_enableSession(session, enableSessionSignature, hashesAndChainIds, sessionToEnableIndex) {
|
|
11
11
|
return {
|
|
12
|
-
async resolve() {
|
|
13
|
-
return (0, smart_sessions_1.getEnableSessionCall)(
|
|
12
|
+
async resolve({ accountAddress, chain }) {
|
|
13
|
+
return (0, smart_sessions_1.getEnableSessionCall)(accountAddress, {
|
|
14
|
+
...session,
|
|
15
|
+
chain,
|
|
16
|
+
}, enableSessionSignature, hashesAndChainIds, sessionToEnableIndex);
|
|
14
17
|
},
|
|
15
18
|
};
|
|
16
19
|
}
|
|
@@ -48,18 +48,15 @@ declare function getCompactTypedData(intentOp: IntentOp): {
|
|
|
48
48
|
readonly Mandate: readonly [{
|
|
49
49
|
readonly name: "target";
|
|
50
50
|
readonly type: "Target";
|
|
51
|
-
}, {
|
|
52
|
-
readonly name: "v";
|
|
53
|
-
readonly type: "uint8";
|
|
54
51
|
}, {
|
|
55
52
|
readonly name: "minGas";
|
|
56
53
|
readonly type: "uint128";
|
|
57
54
|
}, {
|
|
58
55
|
readonly name: "originOps";
|
|
59
|
-
readonly type: "Op
|
|
56
|
+
readonly type: "Op";
|
|
60
57
|
}, {
|
|
61
58
|
readonly name: "destOps";
|
|
62
|
-
readonly type: "Op
|
|
59
|
+
readonly type: "Op";
|
|
63
60
|
}, {
|
|
64
61
|
readonly name: "q";
|
|
65
62
|
readonly type: "bytes32";
|
|
@@ -85,6 +82,13 @@ declare function getCompactTypedData(intentOp: IntentOp): {
|
|
|
85
82
|
readonly type: "uint256";
|
|
86
83
|
}];
|
|
87
84
|
readonly Op: readonly [{
|
|
85
|
+
readonly name: "vt";
|
|
86
|
+
readonly type: "bytes32";
|
|
87
|
+
}, {
|
|
88
|
+
readonly name: "ops";
|
|
89
|
+
readonly type: "Ops[]";
|
|
90
|
+
}];
|
|
91
|
+
readonly Ops: readonly [{
|
|
88
92
|
readonly name: "to";
|
|
89
93
|
readonly type: "address";
|
|
90
94
|
}, {
|
|
@@ -118,18 +122,9 @@ declare function getCompactTypedData(intentOp: IntentOp): {
|
|
|
118
122
|
targetChain: bigint;
|
|
119
123
|
fillExpiry: bigint;
|
|
120
124
|
};
|
|
121
|
-
v: number;
|
|
122
125
|
minGas: bigint;
|
|
123
|
-
originOps:
|
|
124
|
-
|
|
125
|
-
value: bigint;
|
|
126
|
-
data: `0x${string}`;
|
|
127
|
-
}[];
|
|
128
|
-
destOps: {
|
|
129
|
-
to: `0x${string}`;
|
|
130
|
-
value: bigint;
|
|
131
|
-
data: `0x${string}`;
|
|
132
|
-
}[];
|
|
126
|
+
originOps: import("../orchestrator/types").Op;
|
|
127
|
+
destOps: import("../orchestrator/types").Op;
|
|
133
128
|
q: `0x${string}`;
|
|
134
129
|
};
|
|
135
130
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../execution/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA0C,MAAM,MAAM,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGtE,QAAA,MAAM,eAAe,+CAA+C,CAAA;
|
|
1
|
+
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../execution/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA0C,MAAM,MAAM,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGtE,QAAA,MAAM,eAAe,+CAA+C,CAAA;AAiDpE,iBAAS,mBAAmB,CAAC,QAAQ,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0C9C;AAED;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,GAAG,CAGjD;AAED;;;;GAIG;AACH,iBAAS,gBAAgB,CACvB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd,GAAG,CAGL;AAED,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,CAAA"}
|
|
@@ -29,10 +29,9 @@ const COMPACT_TYPED_DATA_TYPES = {
|
|
|
29
29
|
],
|
|
30
30
|
Mandate: [
|
|
31
31
|
{ name: 'target', type: 'Target' },
|
|
32
|
-
{ name: 'v', type: 'uint8' },
|
|
33
32
|
{ name: 'minGas', type: 'uint128' },
|
|
34
|
-
{ name: 'originOps', type: 'Op
|
|
35
|
-
{ name: 'destOps', type: 'Op
|
|
33
|
+
{ name: 'originOps', type: 'Op' },
|
|
34
|
+
{ name: 'destOps', type: 'Op' },
|
|
36
35
|
{ name: 'q', type: 'bytes32' },
|
|
37
36
|
],
|
|
38
37
|
Target: [
|
|
@@ -46,6 +45,10 @@ const COMPACT_TYPED_DATA_TYPES = {
|
|
|
46
45
|
{ name: 'amount', type: 'uint256' },
|
|
47
46
|
],
|
|
48
47
|
Op: [
|
|
48
|
+
{ name: 'vt', type: 'bytes32' },
|
|
49
|
+
{ name: 'ops', type: 'Ops[]' },
|
|
50
|
+
],
|
|
51
|
+
Ops: [
|
|
49
52
|
{ name: 'to', type: 'address' },
|
|
50
53
|
{ name: 'value', type: 'uint256' },
|
|
51
54
|
{ name: 'data', type: 'bytes' },
|
|
@@ -83,18 +86,9 @@ function getCompactTypedData(intentOp) {
|
|
|
83
86
|
targetChain: BigInt(element.mandate.destinationChainId),
|
|
84
87
|
fillExpiry: BigInt(element.mandate.fillDeadline),
|
|
85
88
|
},
|
|
86
|
-
v: element.mandate.v,
|
|
87
89
|
minGas: BigInt(element.mandate.minGas),
|
|
88
|
-
originOps: element.mandate.preClaimOps
|
|
89
|
-
|
|
90
|
-
value: BigInt(op.value),
|
|
91
|
-
data: op.data,
|
|
92
|
-
})),
|
|
93
|
-
destOps: element.mandate.destinationOps.map((op) => ({
|
|
94
|
-
to: op.to,
|
|
95
|
-
value: BigInt(op.value),
|
|
96
|
-
data: op.data,
|
|
97
|
-
})),
|
|
90
|
+
originOps: element.mandate.preClaimOps,
|
|
91
|
+
destOps: element.mandate.destinationOps,
|
|
98
92
|
q: (0, viem_1.keccak256)(element.mandate.qualifier.encodedVal),
|
|
99
93
|
},
|
|
100
94
|
})),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAsB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAI3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAUrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,WAAW,EACX,wBAAwB,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AE,MAAM,GAAG,SAAS,EAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,QAAQ,EAAE,MAAM,GACf,OAAO,CACR,iBAAiB,GAAG;IAClB,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAA;CACjC,CACF,CAgBA;AAED,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,eAAe,EAEf,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,gCAAgC,EAChC,yBAAyB,EACzB,uBAAuB,GACxB,CAAA;AACD,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -23,7 +23,6 @@ Object.defineProperty(exports, "isExecutionError", { enumerable: true, get: func
|
|
|
23
23
|
Object.defineProperty(exports, "OrderPathRequiredForIntentsError", { enumerable: true, get: function () { return error_1.OrderPathRequiredForIntentsError; } });
|
|
24
24
|
Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true, get: function () { return error_1.SessionChainRequiredError; } });
|
|
25
25
|
Object.defineProperty(exports, "SignerNotSupportedError", { enumerable: true, get: function () { return error_1.SignerNotSupportedError; } });
|
|
26
|
-
const smart_session_1 = require("./smart-session");
|
|
27
26
|
const utils_2 = require("./utils");
|
|
28
27
|
const POLL_INITIAL_MS = 500;
|
|
29
28
|
const POLL_SLOW_AFTER_MS = 15000;
|
|
@@ -35,7 +34,7 @@ async function sendTransaction(config, transaction) {
|
|
|
35
34
|
const sourceChains = 'chain' in transaction ? [transaction.chain] : transaction.sourceChains;
|
|
36
35
|
const targetChain = 'chain' in transaction ? transaction.chain : transaction.targetChain;
|
|
37
36
|
const { calls, gasLimit, tokenRequests, recipient, signers, sponsored, settlementLayers, sourceAssets, feeAsset, } = transaction;
|
|
38
|
-
const isUserOpSigner = signers?.type === 'guardians'
|
|
37
|
+
const isUserOpSigner = signers?.type === 'guardians';
|
|
39
38
|
if (isUserOpSigner) {
|
|
40
39
|
throw new error_1.SignerNotSupportedError();
|
|
41
40
|
}
|
|
@@ -54,18 +53,14 @@ async function sendTransaction(config, transaction) {
|
|
|
54
53
|
async function sendUserOperation(config, transaction) {
|
|
55
54
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
56
55
|
const resolvedCalls = await (0, utils_2.resolveCallInputs)(transaction.calls, config, transaction.chain, accountAddress);
|
|
57
|
-
const userOpSigner = transaction.signers?.type === 'session' ? transaction.signers.session : null;
|
|
58
|
-
if (userOpSigner) {
|
|
59
|
-
await (0, smart_session_1.enableSmartSession)(transaction.chain, config, userOpSigner);
|
|
60
|
-
}
|
|
61
|
-
// Smart sessions require a UserOp flow
|
|
62
56
|
return await sendUserOperationInternal(config, transaction.chain, resolvedCalls, transaction.signers);
|
|
63
57
|
}
|
|
64
58
|
async function sendTransactionInternal(config, sourceChains, targetChain, options) {
|
|
65
59
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
66
60
|
const resolvedCalls = await (0, utils_2.resolveCallInputs)(options.callInputs, config, targetChain, accountAddress);
|
|
67
61
|
const tokenRequests = (0, utils_2.getTokenRequests)(sourceChains, targetChain, options.initialTokenRequests, options.settlementLayers);
|
|
68
|
-
const sendAsUserOp = options.signers?.type === 'guardians' ||
|
|
62
|
+
const sendAsUserOp = options.signers?.type === 'guardians' ||
|
|
63
|
+
options.signers?.type === 'experimental_session';
|
|
69
64
|
if (sendAsUserOp) {
|
|
70
65
|
throw new error_1.SignerNotSupportedError();
|
|
71
66
|
}
|
|
@@ -76,7 +71,6 @@ async function sendTransactionInternal(config, sourceChains, targetChain, option
|
|
|
76
71
|
async function sendUserOperationInternal(config, chain, callInputs, signers) {
|
|
77
72
|
// Make sure the account is deployed
|
|
78
73
|
await (0, accounts_1.deploy)(config, chain);
|
|
79
|
-
const withSession = signers?.type === 'session' ? signers.session : null;
|
|
80
74
|
const publicClient = (0, viem_1.createPublicClient)({
|
|
81
75
|
chain,
|
|
82
76
|
transport: (0, utils_1.createTransport)(chain, config.provider),
|
|
@@ -86,9 +80,6 @@ async function sendUserOperationInternal(config, chain, callInputs, signers) {
|
|
|
86
80
|
throw new Error('No validator account found');
|
|
87
81
|
}
|
|
88
82
|
const bundlerClient = (0, utils_1.getBundlerClient)(config, publicClient);
|
|
89
|
-
if (withSession) {
|
|
90
|
-
await (0, smart_session_1.enableSmartSession)(chain, config, withSession);
|
|
91
|
-
}
|
|
92
83
|
const calls = (0, utils_2.parseCalls)(callInputs, chain.id);
|
|
93
84
|
const hash = await bundlerClient.sendUserOperation({
|
|
94
85
|
account: validatorAccount,
|
|
@@ -36,7 +36,7 @@ declare function getTypedData(element: IntentOpElement, nonce: bigint, expires:
|
|
|
36
36
|
readonly name: "fillExpiry";
|
|
37
37
|
readonly type: "uint256";
|
|
38
38
|
}];
|
|
39
|
-
readonly
|
|
39
|
+
readonly Ops: readonly [{
|
|
40
40
|
readonly name: "to";
|
|
41
41
|
readonly type: "address";
|
|
42
42
|
}, {
|
|
@@ -46,21 +46,25 @@ declare function getTypedData(element: IntentOpElement, nonce: bigint, expires:
|
|
|
46
46
|
readonly name: "data";
|
|
47
47
|
readonly type: "bytes";
|
|
48
48
|
}];
|
|
49
|
+
readonly Op: readonly [{
|
|
50
|
+
readonly name: "vt";
|
|
51
|
+
readonly type: "bytes32";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "ops";
|
|
54
|
+
readonly type: "Ops[]";
|
|
55
|
+
}];
|
|
49
56
|
readonly Mandate: readonly [{
|
|
50
57
|
readonly name: "target";
|
|
51
58
|
readonly type: "Target";
|
|
52
|
-
}, {
|
|
53
|
-
readonly name: "v";
|
|
54
|
-
readonly type: "uint8";
|
|
55
59
|
}, {
|
|
56
60
|
readonly name: "minGas";
|
|
57
61
|
readonly type: "uint128";
|
|
58
62
|
}, {
|
|
59
63
|
readonly name: "originOps";
|
|
60
|
-
readonly type: "Op
|
|
64
|
+
readonly type: "Op";
|
|
61
65
|
}, {
|
|
62
66
|
readonly name: "destOps";
|
|
63
|
-
readonly type: "Op
|
|
67
|
+
readonly type: "Op";
|
|
64
68
|
}, {
|
|
65
69
|
readonly name: "q";
|
|
66
70
|
readonly type: "bytes32";
|
|
@@ -98,18 +102,9 @@ declare function getTypedData(element: IntentOpElement, nonce: bigint, expires:
|
|
|
98
102
|
readonly targetChain: bigint;
|
|
99
103
|
readonly fillExpiry: bigint;
|
|
100
104
|
};
|
|
101
|
-
readonly v: number;
|
|
102
105
|
readonly minGas: bigint;
|
|
103
|
-
readonly originOps:
|
|
104
|
-
|
|
105
|
-
value: bigint;
|
|
106
|
-
data: `0x${string}`;
|
|
107
|
-
}[];
|
|
108
|
-
readonly destOps: {
|
|
109
|
-
to: `0x${string}`;
|
|
110
|
-
value: bigint;
|
|
111
|
-
data: `0x${string}`;
|
|
112
|
-
}[];
|
|
106
|
+
readonly originOps: import("../orchestrator/types").Op;
|
|
107
|
+
readonly destOps: import("../orchestrator/types").Op;
|
|
113
108
|
readonly q: `0x${string}`;
|
|
114
109
|
};
|
|
115
110
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permit2.d.ts","sourceRoot":"","sources":["../../../execution/permit2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAIX,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAQhB,iBAAS,YAAY,CACnB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"permit2.d.ts","sourceRoot":"","sources":["../../../execution/permit2.ts"],"names":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B,EACnB,yBAAyB,EACzB,iBAAiB,EAEjB,gBAAgB,EAChB,qBAAqB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,CAAA"}
|
|
@@ -47,17 +47,20 @@ function getTypedData(element, nonce, expires) {
|
|
|
47
47
|
{ name: 'targetChain', type: 'uint256' },
|
|
48
48
|
{ name: 'fillExpiry', type: 'uint256' },
|
|
49
49
|
],
|
|
50
|
-
|
|
50
|
+
Ops: [
|
|
51
51
|
{ name: 'to', type: 'address' },
|
|
52
52
|
{ name: 'value', type: 'uint256' },
|
|
53
53
|
{ name: 'data', type: 'bytes' },
|
|
54
54
|
],
|
|
55
|
+
Op: [
|
|
56
|
+
{ name: 'vt', type: 'bytes32' },
|
|
57
|
+
{ name: 'ops', type: 'Ops[]' },
|
|
58
|
+
],
|
|
55
59
|
Mandate: [
|
|
56
60
|
{ name: 'target', type: 'Target' },
|
|
57
|
-
{ name: 'v', type: 'uint8' },
|
|
58
61
|
{ name: 'minGas', type: 'uint128' },
|
|
59
|
-
{ name: 'originOps', type: 'Op
|
|
60
|
-
{ name: 'destOps', type: 'Op
|
|
62
|
+
{ name: 'originOps', type: 'Op' },
|
|
63
|
+
{ name: 'destOps', type: 'Op' },
|
|
61
64
|
{ name: 'q', type: 'bytes32' },
|
|
62
65
|
],
|
|
63
66
|
PermitBatchWitnessTransferFrom: [
|
|
@@ -84,18 +87,9 @@ function getTypedData(element, nonce, expires) {
|
|
|
84
87
|
targetChain: BigInt(mandate.destinationChainId),
|
|
85
88
|
fillExpiry: BigInt(mandate.fillDeadline),
|
|
86
89
|
},
|
|
87
|
-
v: mandate.v,
|
|
88
90
|
minGas: BigInt(mandate.minGas),
|
|
89
|
-
originOps: mandate.preClaimOps
|
|
90
|
-
|
|
91
|
-
value: BigInt(op.value),
|
|
92
|
-
data: op.data,
|
|
93
|
-
})),
|
|
94
|
-
destOps: mandate.destinationOps.map((op) => ({
|
|
95
|
-
to: op.to,
|
|
96
|
-
value: BigInt(op.value),
|
|
97
|
-
data: op.data,
|
|
98
|
-
})),
|
|
91
|
+
originOps: mandate.preClaimOps,
|
|
92
|
+
destOps: mandate.destinationOps,
|
|
99
93
|
q: (0, viem_1.keccak256)(mandate.qualifier.encodedVal),
|
|
100
94
|
},
|
|
101
95
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
1
|
+
import { type Address } from 'viem';
|
|
2
|
+
import type { IntentOpElement } from '../orchestrator/types';
|
|
3
3
|
declare function getTypedData(account: Address, intentExecutorAddress: Address, element: IntentOpElement, nonce: bigint): {
|
|
4
4
|
domain: {
|
|
5
5
|
name: string;
|
|
@@ -16,12 +16,24 @@ declare function getTypedData(account: Address, intentExecutorAddress: Address,
|
|
|
16
16
|
name: string;
|
|
17
17
|
type: string;
|
|
18
18
|
}[];
|
|
19
|
+
GasRefund: {
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
}[];
|
|
23
|
+
Ops: {
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
}[];
|
|
19
27
|
};
|
|
20
28
|
primaryType: "SingleChainOps";
|
|
21
29
|
message: {
|
|
22
30
|
account: `0x${string}`;
|
|
23
31
|
nonce: bigint;
|
|
24
|
-
|
|
32
|
+
op: import("../orchestrator/types").Op;
|
|
33
|
+
gasRefund: {
|
|
34
|
+
token: "0x0000000000000000000000000000000000000000";
|
|
35
|
+
exchangeRate: bigint;
|
|
36
|
+
};
|
|
25
37
|
};
|
|
26
38
|
};
|
|
27
39
|
export { getTypedData };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleChainOps.d.ts","sourceRoot":"","sources":["../../../execution/singleChainOps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"singleChainOps.d.ts","sourceRoot":"","sources":["../../../execution/singleChainOps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,MAAM,CAAA;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,iBAAS,YAAY,CACnB,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,OAAO,EAC9B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0Cd;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTypedData = getTypedData;
|
|
4
|
+
const viem_1 = require("viem");
|
|
4
5
|
function getTypedData(account, intentExecutorAddress, element, nonce) {
|
|
5
|
-
const ops = element.mandate.destinationOps;
|
|
6
6
|
return {
|
|
7
7
|
domain: {
|
|
8
8
|
name: 'IntentExecutor',
|
|
@@ -14,9 +14,18 @@ function getTypedData(account, intentExecutorAddress, element, nonce) {
|
|
|
14
14
|
SingleChainOps: [
|
|
15
15
|
{ name: 'account', type: 'address' },
|
|
16
16
|
{ name: 'nonce', type: 'uint256' },
|
|
17
|
-
{ name: '
|
|
17
|
+
{ name: 'op', type: 'Op' },
|
|
18
|
+
{ name: 'gasRefund', type: 'GasRefund' },
|
|
18
19
|
],
|
|
19
20
|
Op: [
|
|
21
|
+
{ name: 'vt', type: 'bytes32' },
|
|
22
|
+
{ name: 'ops', type: 'Ops[]' },
|
|
23
|
+
],
|
|
24
|
+
GasRefund: [
|
|
25
|
+
{ name: 'token', type: 'address' },
|
|
26
|
+
{ name: 'exchangeRate', type: 'uint256' },
|
|
27
|
+
],
|
|
28
|
+
Ops: [
|
|
20
29
|
{ name: 'to', type: 'address' },
|
|
21
30
|
{ name: 'value', type: 'uint256' },
|
|
22
31
|
{ name: 'data', type: 'bytes' },
|
|
@@ -26,7 +35,12 @@ function getTypedData(account, intentExecutorAddress, element, nonce) {
|
|
|
26
35
|
message: {
|
|
27
36
|
account,
|
|
28
37
|
nonce,
|
|
29
|
-
|
|
38
|
+
op: element.mandate.destinationOps,
|
|
39
|
+
// todo
|
|
40
|
+
gasRefund: {
|
|
41
|
+
token: viem_1.zeroAddress,
|
|
42
|
+
exchangeRate: 0n,
|
|
43
|
+
},
|
|
30
44
|
},
|
|
31
45
|
};
|
|
32
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAKV,KAAK,uBAAuB,EAC5B,KAAK,GAAG,EAIR,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,mBAAmB,EAIzB,MAAM,MAAM,CAAA;AACb,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAKV,KAAK,uBAAuB,EAC5B,KAAK,GAAG,EAIR,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,mBAAmB,EAIzB,MAAM,MAAM,CAAA;AACb,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAA;AAmCjC,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,WAAW,EAEjB,MAAM,iBAAiB,CAAA;AAWxB,OAAO,KAAK,EAGV,eAAe,EAGhB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAEV,IAAI,EACJ,aAAa,EACb,SAAS,EACT,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,g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,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,eAAe,CAAC,EAAE,MAAM,0CAUzB;AA0BD,iBAAe,oBAAoB,CACjC,MAAM,EAAE,gBAAgB,EACxB,YAAY,EAAE,KAAK,EAAE,GAAG,SAAS,EACjC,WAAW,EAAE,KAAK,EAClB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,GAAG,EAAE,EACvB,oBAAoB,EAAE,GAAG,EACzB,cAAc,EAAE,uBAAuB,EACvC,MAAM,EAAE,OAAO,8BAoBhB;AAED,iBAAe,mBAAmB,CAChC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,SAAS,GAAG,SAAS,EAC9B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,yKAoBb;AAkDD,iBAAS,UAAU,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,CAMnE;AAqGD,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,CAAA;AACD,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,CAAA"}
|
|
@@ -38,7 +38,7 @@ const singleChainOps_1 = require("./singleChainOps");
|
|
|
38
38
|
async function prepareTransaction(config, transaction) {
|
|
39
39
|
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, lockFunds, account, recipient, } = getTransactionParams(transaction);
|
|
40
40
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
41
|
-
const isUserOpSigner = signers?.type === 'guardians'
|
|
41
|
+
const isUserOpSigner = signers?.type === 'guardians';
|
|
42
42
|
if (isUserOpSigner) {
|
|
43
43
|
throw new error_1.SignerNotSupportedError();
|
|
44
44
|
}
|
|
@@ -131,7 +131,7 @@ async function signTypedData(config, parameters, chain, signers) {
|
|
|
131
131
|
}
|
|
132
132
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
133
133
|
const isRoot = validator.address === ownerValidator.address;
|
|
134
|
-
if (signers?.type === '
|
|
134
|
+
if (signers?.type === 'experimental_session') {
|
|
135
135
|
return await signTypedDataWithSession(config, chain, {
|
|
136
136
|
address: validator.address,
|
|
137
137
|
isRoot,
|
|
@@ -354,11 +354,7 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
354
354
|
})),
|
|
355
355
|
recipient,
|
|
356
356
|
account: intentAccount,
|
|
357
|
-
destinationExecutions: calls
|
|
358
|
-
to: call.to,
|
|
359
|
-
value: call.value.toString(),
|
|
360
|
-
data: call.data,
|
|
361
|
-
})),
|
|
357
|
+
destinationExecutions: calls,
|
|
362
358
|
destinationGasUnits: gasLimit,
|
|
363
359
|
accountAccessList,
|
|
364
360
|
options: {
|
|
@@ -568,16 +564,13 @@ async function getValidatorAccount(config, signers, publicClient, chain) {
|
|
|
568
564
|
if (withOwner) {
|
|
569
565
|
return (0, accounts_1.getSmartAccount)(config, publicClient, chain);
|
|
570
566
|
}
|
|
571
|
-
const withSession = signers.type === 'session' ? signers : null;
|
|
572
567
|
const withGuardians = signers.type === 'guardians' ? signers : null;
|
|
573
|
-
return
|
|
574
|
-
? await (0, accounts_1.
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
})
|
|
580
|
-
: null;
|
|
568
|
+
return withGuardians
|
|
569
|
+
? await (0, accounts_1.getGuardianSmartAccount)(config, publicClient, chain, {
|
|
570
|
+
type: 'ecdsa',
|
|
571
|
+
accounts: withGuardians.guardians,
|
|
572
|
+
})
|
|
573
|
+
: null;
|
|
581
574
|
}
|
|
582
575
|
function getValidator(config, signers) {
|
|
583
576
|
if (!signers) {
|
|
@@ -604,7 +597,7 @@ function getValidator(config, signers) {
|
|
|
604
597
|
}
|
|
605
598
|
}
|
|
606
599
|
// Smart sessions
|
|
607
|
-
const withSession = signers.type === '
|
|
600
|
+
const withSession = signers.type === 'experimental_session' ? signers.session : null;
|
|
608
601
|
if (withSession) {
|
|
609
602
|
return (0, validators_1.getSmartSessionValidator)(config);
|
|
610
603
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { walletClientToAccount, wrapParaAccount } from './accounts/walletClient'
|
|
|
4
4
|
import { deployAccountsForOwners } from './actions/deployment';
|
|
5
5
|
import { type TransactionResult, type TransactionStatus, type UserOperationResult } from './execution';
|
|
6
6
|
import { type BatchPermit2Result, checkERC20AllowanceDirect, getPermit2Address, type MultiChainPermit2Config, type MultiChainPermit2Result, signPermit2Batch, signPermit2Sequential } from './execution/permit2';
|
|
7
|
-
import { type SessionDetails } from './execution/smart-session';
|
|
8
7
|
import { type IntentRoute, type PreparedTransactionData, type PreparedUserOperationData, type SignedTransactionData, type SignedUserOperationData } from './execution/utils';
|
|
8
|
+
import type { SessionDetails } from './modules/validators/smart-sessions';
|
|
9
9
|
import { type ApprovalRequired, getAllSupportedChainsAndTokens, getSupportedTokens, getTokenAddress, getTokenDecimals, type IntentCost, type IntentInput, type IntentOp, type IntentOpStatus, type Portfolio, type SettlementLayer, type SignedIntentOp, type TokenRequirements, type WrapRequired } from './orchestrator';
|
|
10
10
|
import type { AccountProviderConfig, AccountType, BundlerConfig, Call, CallInput, MultiFactorValidatorConfig, OwnableValidatorConfig, OwnerSet, PaymasterConfig, Policy, ProviderConfig, Recovery, RhinestoneAccountConfig, RhinestoneConfig, RhinestoneSDKConfig, Session, SignerSet, TokenRequest, TokenSymbol, Transaction, UniversalActionPolicyParamCondition, UserOperationTransaction, WebauthnValidatorConfig } from './types';
|
|
11
11
|
interface RhinestoneAccount {
|
|
@@ -41,7 +41,7 @@ interface RhinestoneAccount {
|
|
|
41
41
|
getAddress: () => Address;
|
|
42
42
|
getPortfolio: (onTestnets?: boolean) => Promise<Portfolio>;
|
|
43
43
|
getMaxSpendableAmount: (chain: Chain, tokenAddress: Address | TokenSymbol, gasUnits: bigint, sponsored?: boolean) => Promise<bigint>;
|
|
44
|
-
|
|
44
|
+
experimental_getSessionDetails: (sessions: Session[]) => Promise<SessionDetails>;
|
|
45
45
|
getOwners: (chain: Chain) => Promise<{
|
|
46
46
|
accounts: Address[];
|
|
47
47
|
threshold: number;
|
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,EACV,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,GAAG,EACH,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,mBAAmB,EACpB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAapE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAEzB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,KAAK,kBAAkB,EACvB,yBAAyB,EAEzB,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAEL,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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,qBAAqB,GACtB,CAAA;AACD,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,mCAAmC,EACnC,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,WAAW,EACX,eAAe,EACf,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAEhB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,GACnB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -14,7 +14,6 @@ Object.defineProperty(exports, "checkERC20AllowanceDirect", { enumerable: true,
|
|
|
14
14
|
Object.defineProperty(exports, "getPermit2Address", { enumerable: true, get: function () { return permit2_1.getPermit2Address; } });
|
|
15
15
|
Object.defineProperty(exports, "signPermit2Batch", { enumerable: true, get: function () { return permit2_1.signPermit2Batch; } });
|
|
16
16
|
Object.defineProperty(exports, "signPermit2Sequential", { enumerable: true, get: function () { return permit2_1.signPermit2Sequential; } });
|
|
17
|
-
const smart_session_1 = require("./execution/smart-session");
|
|
18
17
|
const utils_1 = require("./execution/utils");
|
|
19
18
|
const modules_1 = require("./modules");
|
|
20
19
|
const orchestrator_1 = require("./orchestrator");
|
|
@@ -239,8 +238,9 @@ async function createRhinestoneAccount(config) {
|
|
|
239
238
|
const account = getAddress();
|
|
240
239
|
return (0, modules_1.getValidators)(accountType, account, chain, config.provider);
|
|
241
240
|
}
|
|
242
|
-
function
|
|
243
|
-
|
|
241
|
+
function experimental_getSessionDetails(sessions) {
|
|
242
|
+
const account = getAddress();
|
|
243
|
+
return (0, modules_1.getSessionDetails)(account, sessions);
|
|
244
244
|
}
|
|
245
245
|
/**
|
|
246
246
|
* Check ERC20 allowance for the account owner and token (using Permit2 as spender)
|
|
@@ -276,9 +276,9 @@ async function createRhinestoneAccount(config) {
|
|
|
276
276
|
getAddress,
|
|
277
277
|
getPortfolio,
|
|
278
278
|
getMaxSpendableAmount,
|
|
279
|
-
getSessionDetails,
|
|
280
279
|
getOwners,
|
|
281
280
|
getValidators,
|
|
281
|
+
experimental_getSessionDetails,
|
|
282
282
|
checkERC20Allowance,
|
|
283
283
|
getInitData,
|
|
284
284
|
};
|