@charterlabs/rhinestone-sdk 0.2.7-dev.3 → 0.2.8
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 +46 -8
- package/dist/src/accounts/error.d.ts +38 -3
- package/dist/src/accounts/error.d.ts.map +1 -1
- package/dist/src/accounts/error.js +55 -7
- package/dist/src/accounts/index.d.ts +31 -20
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +231 -25
- package/dist/src/accounts/index.test.js +2 -4
- package/dist/src/accounts/json-rpc/index.d.ts +5 -0
- package/dist/src/accounts/json-rpc/index.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/index.js +16 -0
- package/dist/src/accounts/json-rpc/providers.d.ts +4 -0
- package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/providers.js +52 -0
- package/dist/src/accounts/kernel.d.ts +1 -1
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +29 -1
- package/dist/src/accounts/kernel.test.js +35 -8
- package/dist/src/accounts/nexus.d.ts +4 -3
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +82 -14
- package/dist/src/accounts/nexus.test.js +33 -6
- package/dist/src/accounts/passport.d.ts +12 -0
- package/dist/src/accounts/passport.d.ts.map +1 -0
- package/dist/src/accounts/passport.js +173 -0
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +85 -53
- package/dist/src/accounts/safe.test.js +33 -6
- package/dist/src/accounts/signing/common.d.ts +4 -4
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +21 -9
- package/dist/src/accounts/signing/message.d.ts +1 -1
- package/dist/src/accounts/signing/message.d.ts.map +1 -1
- package/dist/src/accounts/signing/message.js +6 -6
- package/dist/src/accounts/signing/passkeys.d.ts +8 -1
- package/dist/src/accounts/signing/passkeys.d.ts.map +1 -1
- package/dist/src/accounts/signing/passkeys.js +35 -0
- package/dist/src/accounts/signing/passkeys.test.js +15 -0
- package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
- package/dist/src/accounts/signing/typedData.js +2 -2
- package/dist/src/accounts/startale.test.js +0 -4
- package/dist/src/accounts/utils.d.ts +4 -4
- package/dist/src/accounts/utils.d.ts.map +1 -1
- package/dist/src/accounts/utils.js +3 -40
- package/dist/src/accounts/walletClient.d.ts +7 -0
- package/dist/src/accounts/walletClient.d.ts.map +1 -0
- package/dist/src/accounts/walletClient.js +38 -0
- package/dist/src/actions/compact.d.ts +13 -0
- package/dist/src/actions/compact.d.ts.map +1 -0
- package/dist/src/actions/compact.js +210 -0
- package/dist/src/actions/ecdsa.d.ts +35 -0
- package/dist/src/actions/ecdsa.d.ts.map +1 -0
- package/dist/src/actions/ecdsa.js +114 -0
- package/dist/src/actions/ecdsa.test.d.ts +2 -0
- package/dist/src/actions/ecdsa.test.d.ts.map +1 -0
- package/dist/src/actions/ecdsa.test.js +99 -0
- package/dist/src/actions/index.d.ts +23 -166
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +25 -544
- package/dist/src/actions/mfa.d.ts +37 -0
- package/dist/src/actions/mfa.d.ts.map +1 -0
- package/dist/src/actions/mfa.js +133 -0
- package/dist/src/actions/passkeys.d.ts +37 -0
- package/dist/src/actions/passkeys.d.ts.map +1 -0
- package/dist/src/actions/passkeys.js +129 -0
- package/dist/src/actions/passkeys.test.d.ts +2 -0
- package/dist/src/actions/passkeys.test.d.ts.map +1 -0
- package/dist/src/actions/passkeys.test.js +54 -0
- package/dist/src/actions/recovery.d.ts +33 -0
- package/dist/src/actions/recovery.d.ts.map +1 -0
- package/dist/src/actions/recovery.js +193 -0
- package/dist/src/actions/recovery.test.d.ts +2 -0
- package/dist/src/actions/recovery.test.d.ts.map +1 -0
- package/dist/src/actions/recovery.test.js +168 -0
- package/dist/src/actions/smart-sessions.d.ts +23 -0
- package/dist/src/actions/smart-sessions.d.ts.map +1 -0
- package/dist/src/actions/{smart-session.js → smart-sessions.js} +13 -0
- package/dist/src/errors/index.d.ts +5 -0
- package/dist/src/errors/index.d.ts.map +1 -0
- package/dist/src/errors/index.js +50 -0
- package/dist/src/execution/compact.d.ts +25 -9
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +29 -103
- package/dist/src/execution/error.d.ts +6 -6
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +13 -13
- package/dist/src/execution/index.d.ts +34 -22
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +115 -46
- package/dist/src/execution/multiChainOps.d.ts +40 -0
- package/dist/src/execution/multiChainOps.d.ts.map +1 -0
- package/dist/src/execution/multiChainOps.js +39 -0
- package/dist/src/execution/permit2.d.ts +148 -0
- package/dist/src/execution/permit2.d.ts.map +1 -0
- package/dist/src/execution/permit2.js +291 -0
- package/dist/src/execution/smart-session.d.ts +3 -3
- package/dist/src/execution/smart-session.d.ts.map +1 -1
- package/dist/src/execution/smart-session.js +3 -3
- package/dist/src/execution/types.d.ts +36 -0
- package/dist/src/execution/types.d.ts.map +1 -0
- package/dist/src/execution/types.js +2 -0
- package/dist/src/execution/utils.d.ts +43 -28
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +269 -99
- package/dist/src/index.d.ts +38 -19
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +121 -69
- package/dist/src/modules/common.d.ts +10 -4
- package/dist/src/modules/common.d.ts.map +1 -1
- package/dist/src/modules/common.js +22 -1
- package/dist/src/modules/index.d.ts +3 -2
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +16 -13
- package/dist/src/modules/index.test.js +9 -12
- package/dist/src/modules/read.d.ts.map +1 -1
- package/dist/src/modules/read.js +5 -1
- package/dist/src/modules/validators/core.d.ts +5 -3
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +29 -10
- package/dist/src/modules/validators/core.test.js +4 -4
- package/dist/src/modules/validators/smart-sessions.d.ts +4 -4
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +10 -72
- package/dist/src/modules/validators/smart-sessions.test.js +4 -8
- package/dist/src/modules/validators/webauthn-contract.d.ts.map +1 -1
- package/dist/src/orchestrator/client.d.ts +4 -2
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +230 -162
- package/dist/src/orchestrator/consts.d.ts +1 -2
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +1 -3
- package/dist/src/orchestrator/error.d.ts +111 -1
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +128 -1
- package/dist/src/orchestrator/index.d.ts +4 -4
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +16 -1
- package/dist/src/orchestrator/registry.d.ts +3 -25
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +82 -46
- package/dist/src/orchestrator/registry.test.js +7 -7
- package/dist/src/orchestrator/types.d.ts +53 -43
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/types.d.ts +74 -9
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/index.js +5 -0
- package/package.json +73 -2
- package/dist/src/actions/index.test.d.ts +0 -2
- package/dist/src/actions/index.test.d.ts.map +0 -1
- package/dist/src/actions/index.test.js +0 -302
- package/dist/src/actions/smart-session.d.ts +0 -11
- package/dist/src/actions/smart-session.d.ts.map +0 -1
- package/dist/src/orchestrator/registry.json +0 -365
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
5
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
36
|
exports.getTokenSymbol = getTokenSymbol;
|
|
7
37
|
exports.getTokenAddress = getTokenAddress;
|
|
@@ -13,76 +43,78 @@ exports.isTestnet = isTestnet;
|
|
|
13
43
|
exports.isTokenAddressSupported = isTokenAddressSupported;
|
|
14
44
|
exports.getDefaultAccountAccessList = getDefaultAccountAccessList;
|
|
15
45
|
exports.resolveTokenAddress = resolveTokenAddress;
|
|
46
|
+
const shared = __importStar(require("@rhinestone/shared-configs"));
|
|
16
47
|
const viem_1 = require("viem");
|
|
17
48
|
const chains_1 = require("viem/chains");
|
|
18
|
-
const
|
|
19
|
-
const registry = registry_json_1.default;
|
|
49
|
+
const error_1 = require("./error");
|
|
20
50
|
function getSupportedChainIds() {
|
|
21
|
-
|
|
51
|
+
const arr = (shared.chains ?? []);
|
|
52
|
+
return arr.map((c) => c.id);
|
|
22
53
|
}
|
|
23
54
|
function getChainEntry(chainId) {
|
|
55
|
+
const registry = shared.chainRegistry || shared.ChainRegistry;
|
|
24
56
|
return registry[chainId.toString()];
|
|
25
57
|
}
|
|
26
58
|
function getWethAddress(chain) {
|
|
27
59
|
const chainEntry = getChainEntry(chain.id);
|
|
28
60
|
if (!chainEntry) {
|
|
29
|
-
throw new
|
|
61
|
+
throw new error_1.UnsupportedChainError(chain.id);
|
|
30
62
|
}
|
|
31
63
|
const wethToken = chainEntry.tokens.find((token) => token.symbol === 'WETH');
|
|
32
64
|
if (!wethToken) {
|
|
33
|
-
throw new
|
|
65
|
+
throw new error_1.UnsupportedTokenError('WETH', chain.id);
|
|
34
66
|
}
|
|
35
67
|
return wethToken.address;
|
|
36
68
|
}
|
|
37
69
|
function getTokenSymbol(tokenAddress, chainId) {
|
|
38
70
|
const chainEntry = getChainEntry(chainId);
|
|
39
71
|
if (!chainEntry) {
|
|
40
|
-
throw new
|
|
72
|
+
throw new error_1.UnsupportedChainError(chainId);
|
|
41
73
|
}
|
|
42
74
|
const token = chainEntry.tokens.find((t) => t.address.toLowerCase() === tokenAddress.toLowerCase());
|
|
43
75
|
if (!token) {
|
|
44
|
-
throw new
|
|
76
|
+
throw new error_1.UnsupportedTokenError(tokenAddress, chainId);
|
|
45
77
|
}
|
|
46
78
|
return token.symbol;
|
|
47
79
|
}
|
|
48
|
-
function getTokenAddress(
|
|
49
|
-
if (chainId
|
|
50
|
-
throw new
|
|
51
|
-
}
|
|
52
|
-
if (tokenSymbol === 'ETH') {
|
|
53
|
-
return viem_1.zeroAddress;
|
|
54
|
-
}
|
|
55
|
-
const chainEntry = getChainEntry(chainId);
|
|
56
|
-
if (!chainEntry) {
|
|
57
|
-
throw new Error(`Unsupported chain ${chainId}`);
|
|
58
|
-
}
|
|
59
|
-
const token = chainEntry.tokens.find((t) => t.symbol === tokenSymbol);
|
|
60
|
-
if (!token) {
|
|
61
|
-
throw new Error(`Unsupported token symbol ${tokenSymbol}`);
|
|
80
|
+
function getTokenAddress(token, chainId) {
|
|
81
|
+
if (!isChainIdSupported(chainId)) {
|
|
82
|
+
throw new error_1.UnsupportedChainError(chainId);
|
|
62
83
|
}
|
|
63
|
-
|
|
84
|
+
if (typeof token === 'string' && (0, viem_1.isAddress)(token))
|
|
85
|
+
return token;
|
|
86
|
+
const tokens = getSupportedTokens(chainId);
|
|
87
|
+
const found = tokens.find((x) => x.symbol === token);
|
|
88
|
+
if (!found)
|
|
89
|
+
throw new error_1.UnsupportedTokenError(token, chainId);
|
|
90
|
+
return found.address;
|
|
91
|
+
}
|
|
92
|
+
function isChainIdSupported(chainId) {
|
|
93
|
+
const arr = (shared.chains ?? []);
|
|
94
|
+
const chainIds = arr.map((c) => c.id);
|
|
95
|
+
return chainIds.includes(chainId);
|
|
64
96
|
}
|
|
65
97
|
function getChainById(chainId) {
|
|
66
|
-
const
|
|
67
|
-
chains_1.mainnet,
|
|
68
|
-
chains_1.sepolia,
|
|
69
|
-
chains_1.base,
|
|
70
|
-
chains_1.baseSepolia,
|
|
71
|
-
chains_1.arbitrum,
|
|
72
|
-
chains_1.arbitrumSepolia,
|
|
73
|
-
chains_1.optimism,
|
|
74
|
-
chains_1.optimismSepolia,
|
|
75
|
-
chains_1.polygon,
|
|
76
|
-
chains_1.
|
|
77
|
-
chains_1.
|
|
78
|
-
|
|
79
|
-
|
|
98
|
+
const map = {
|
|
99
|
+
[chains_1.mainnet.id]: chains_1.mainnet,
|
|
100
|
+
[chains_1.sepolia.id]: chains_1.sepolia,
|
|
101
|
+
[chains_1.base.id]: chains_1.base,
|
|
102
|
+
[chains_1.baseSepolia.id]: chains_1.baseSepolia,
|
|
103
|
+
[chains_1.arbitrum.id]: chains_1.arbitrum,
|
|
104
|
+
[chains_1.arbitrumSepolia.id]: chains_1.arbitrumSepolia,
|
|
105
|
+
[chains_1.optimism.id]: chains_1.optimism,
|
|
106
|
+
[chains_1.optimismSepolia.id]: chains_1.optimismSepolia,
|
|
107
|
+
[chains_1.polygon.id]: chains_1.polygon,
|
|
108
|
+
[chains_1.soneium.id]: chains_1.soneium,
|
|
109
|
+
[chains_1.sonic.id]: chains_1.sonic,
|
|
110
|
+
};
|
|
111
|
+
if (!isChainIdSupported(chainId)) {
|
|
112
|
+
throw new error_1.UnsupportedChainError(chainId);
|
|
113
|
+
}
|
|
114
|
+
return map[chainId];
|
|
80
115
|
}
|
|
81
116
|
function isTestnet(chainId) {
|
|
82
117
|
const chain = getChainById(chainId);
|
|
83
|
-
if (!chain) {
|
|
84
|
-
throw new Error(`Chain not supported: ${chainId}`);
|
|
85
|
-
}
|
|
86
118
|
return chain.testnet ?? false;
|
|
87
119
|
}
|
|
88
120
|
function isTokenAddressSupported(address, chainId) {
|
|
@@ -93,11 +125,15 @@ function isTokenAddressSupported(address, chainId) {
|
|
|
93
125
|
return chainEntry.tokens.some((token) => token.address.toLowerCase() === address.toLowerCase());
|
|
94
126
|
}
|
|
95
127
|
function getSupportedTokens(chainId) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
throw new Error(`Chain not supported: ${chainId}`);
|
|
128
|
+
if (!isChainIdSupported(chainId)) {
|
|
129
|
+
throw new error_1.UnsupportedChainError(chainId);
|
|
99
130
|
}
|
|
100
|
-
|
|
131
|
+
const entry = getChainEntry(chainId);
|
|
132
|
+
return entry.tokens.map((t) => ({
|
|
133
|
+
symbol: t.symbol,
|
|
134
|
+
address: t.address,
|
|
135
|
+
decimals: t.decimals,
|
|
136
|
+
}));
|
|
101
137
|
}
|
|
102
138
|
function getDefaultAccountAccessList(onTestnets) {
|
|
103
139
|
const supportedChainIds = getSupportedChainIds();
|
|
@@ -69,11 +69,11 @@ const UNSUPPORTED_TOKEN_ADDRESS = '0x1234567890123456789012345678901234567890';
|
|
|
69
69
|
(0, vitest_1.describe)('getChainById', () => {
|
|
70
70
|
(0, vitest_1.test)('returns correct chain for supported ID', () => {
|
|
71
71
|
const chain = (0, registry_1.getChainById)(chains_1.mainnet.id);
|
|
72
|
-
(0, vitest_1.expect)(chain
|
|
73
|
-
(0, vitest_1.expect)(chain
|
|
72
|
+
(0, vitest_1.expect)(chain.id).toBe(chains_1.mainnet.id);
|
|
73
|
+
(0, vitest_1.expect)(chain.name).toBe(chains_1.mainnet.name);
|
|
74
74
|
});
|
|
75
|
-
(0, vitest_1.test)('
|
|
76
|
-
(0, vitest_1.expect)((0, registry_1.getChainById)(UNSUPPORTED_CHAIN_ID)).
|
|
75
|
+
(0, vitest_1.test)('throws error for unsupported chain', () => {
|
|
76
|
+
(0, vitest_1.expect)(() => (0, registry_1.getChainById)(UNSUPPORTED_CHAIN_ID)).toThrow(`Unsupported chain ${UNSUPPORTED_CHAIN_ID}`);
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
79
|
(0, vitest_1.describe)('isTestnet', () => {
|
|
@@ -84,7 +84,7 @@ const UNSUPPORTED_TOKEN_ADDRESS = '0x1234567890123456789012345678901234567890';
|
|
|
84
84
|
(0, vitest_1.expect)((0, registry_1.isTestnet)(chains_1.sepolia.id)).toBe(true);
|
|
85
85
|
});
|
|
86
86
|
(0, vitest_1.test)('throws error for unsupported chain', () => {
|
|
87
|
-
(0, vitest_1.expect)(() => (0, registry_1.isTestnet)(UNSUPPORTED_CHAIN_ID)).toThrow(`
|
|
87
|
+
(0, vitest_1.expect)(() => (0, registry_1.isTestnet)(UNSUPPORTED_CHAIN_ID)).toThrow(`Unsupported chain ${UNSUPPORTED_CHAIN_ID}`);
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
(0, vitest_1.describe)('isTokenAddressSupported', () => {
|
|
@@ -104,7 +104,7 @@ const UNSUPPORTED_TOKEN_ADDRESS = '0x1234567890123456789012345678901234567890';
|
|
|
104
104
|
(0, vitest_1.expect)(tokens.find((t) => t.symbol === TOKEN_SYMBOLS.USDC)).toBeDefined();
|
|
105
105
|
});
|
|
106
106
|
(0, vitest_1.test)('throws error for unsupported chain', () => {
|
|
107
|
-
(0, vitest_1.expect)(() => (0, registry_1.getSupportedTokens)(UNSUPPORTED_CHAIN_ID)).toThrow(`
|
|
107
|
+
(0, vitest_1.expect)(() => (0, registry_1.getSupportedTokens)(UNSUPPORTED_CHAIN_ID)).toThrow(`Unsupported chain ${UNSUPPORTED_CHAIN_ID}`);
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
110
|
(0, vitest_1.describe)('getDefaultAccountAccessList', () => {
|
|
@@ -128,7 +128,7 @@ const UNSUPPORTED_TOKEN_ADDRESS = '0x1234567890123456789012345678901234567890';
|
|
|
128
128
|
(0, vitest_1.expect)(result).toBe(TOKEN_ADDRESSES.ETHEREUM_USDC);
|
|
129
129
|
});
|
|
130
130
|
(0, vitest_1.test)('throw error for unsupported token', () => {
|
|
131
|
-
(0, vitest_1.expect)(() => (0, registry_1.resolveTokenAddress)(TOKEN_SYMBOLS.USDT, chains_1.baseSepolia.id)).toThrow(`Unsupported token
|
|
131
|
+
(0, vitest_1.expect)(() => (0, registry_1.resolveTokenAddress)(TOKEN_SYMBOLS.USDT, chains_1.baseSepolia.id)).toThrow(`Unsupported token ${TOKEN_SYMBOLS.USDT} for chain ${chains_1.baseSepolia.id}`);
|
|
132
132
|
});
|
|
133
133
|
(0, vitest_1.test)('throws error for unsupported chain', () => {
|
|
134
134
|
(0, vitest_1.expect)(() => (0, registry_1.resolveTokenAddress)(TOKEN_SYMBOLS.USDC, UNSUPPORTED_CHAIN_ID)).toThrow(`Unsupported chain ${UNSUPPORTED_CHAIN_ID}`);
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
+
import type { SettlementLayer as CrossChainSettlementLayer, SupportedChain, SupportedMainnet, SupportedOPStackMainnet, SupportedOPStackTestnet, SupportedTestnet } from '@rhinestone/shared-configs';
|
|
1
2
|
import type { Address, Hex } from 'viem';
|
|
2
|
-
import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
|
-
import type { arbitrum, arbitrumSepolia, base, baseSepolia, mainnet, optimism, optimismSepolia, polygon, sepolia, soneium, zksync } from 'viem/chains';
|
|
4
|
-
type SupportedTestnet = typeof sepolia.id | typeof baseSepolia.id | typeof arbitrumSepolia.id | typeof optimismSepolia.id;
|
|
5
|
-
type SupportedMainnet = typeof mainnet.id | typeof base.id | typeof arbitrum.id | typeof optimism.id | typeof polygon.id | typeof zksync.id | typeof soneium.id;
|
|
6
|
-
type SupportedOPStackMainnet = typeof optimism.id | typeof base.id | typeof soneium.id;
|
|
7
|
-
type SupportedOPStackTestnet = typeof optimismSepolia.id | typeof baseSepolia.id;
|
|
8
|
-
type SupportedChain = SupportedMainnet | SupportedTestnet;
|
|
9
3
|
type SupportedTokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT';
|
|
10
4
|
type SupportedToken = SupportedTokenSymbol | Address;
|
|
11
|
-
type
|
|
12
|
-
type AccountStatus = 'NOT_DEPLOYED' | SmartAccountType;
|
|
5
|
+
type AccountType = 'GENERIC' | 'ERC7579' | 'EOA';
|
|
13
6
|
declare const INTENT_STATUS_PENDING = "PENDING";
|
|
14
7
|
declare const INTENT_STATUS_FAILED = "FAILED";
|
|
15
8
|
declare const INTENT_STATUS_EXPIRED = "EXPIRED";
|
|
@@ -43,12 +36,13 @@ interface Claim {
|
|
|
43
36
|
}
|
|
44
37
|
interface Execution {
|
|
45
38
|
to: Address;
|
|
46
|
-
value:
|
|
39
|
+
value: string;
|
|
47
40
|
data: Hex;
|
|
48
41
|
}
|
|
49
|
-
type SettlementLayer = 'SAME_CHAIN' | '
|
|
42
|
+
type SettlementLayer = 'SAME_CHAIN' | 'INTENT_EXECUTOR' | CrossChainSettlementLayer;
|
|
50
43
|
interface IntentOptions {
|
|
51
44
|
topupCompact: boolean;
|
|
45
|
+
feeToken?: Address | SupportedTokenSymbol;
|
|
52
46
|
sponsorSettings?: SponsorSettings;
|
|
53
47
|
settlementLayers?: SettlementLayer[];
|
|
54
48
|
}
|
|
@@ -77,7 +71,7 @@ type Portfolio = PortfolioToken[];
|
|
|
77
71
|
interface IntentInput {
|
|
78
72
|
account: {
|
|
79
73
|
address: Address;
|
|
80
|
-
accountType:
|
|
74
|
+
accountType: AccountType;
|
|
81
75
|
setupOps: {
|
|
82
76
|
to: Address;
|
|
83
77
|
data: Hex;
|
|
@@ -94,47 +88,59 @@ interface IntentInput {
|
|
|
94
88
|
amount?: bigint;
|
|
95
89
|
}[];
|
|
96
90
|
accountAccessList?: AccountAccessList;
|
|
97
|
-
options
|
|
91
|
+
options: IntentOptions;
|
|
98
92
|
}
|
|
99
|
-
type SettlementSystem = 'SAME_CHAIN' | 'ACROSS';
|
|
100
93
|
interface IntentCost {
|
|
101
94
|
hasFulfilledAll: boolean;
|
|
102
95
|
tokensReceived: [
|
|
103
96
|
{
|
|
104
97
|
tokenAddress: Address;
|
|
105
98
|
hasFulfilled: boolean;
|
|
106
|
-
amountSpent:
|
|
107
|
-
destinationAmount:
|
|
108
|
-
fee:
|
|
99
|
+
amountSpent: string;
|
|
100
|
+
destinationAmount: string;
|
|
101
|
+
fee: string;
|
|
109
102
|
}
|
|
110
103
|
];
|
|
104
|
+
sponsoredFee: {
|
|
105
|
+
relayer: number;
|
|
106
|
+
protocol: number;
|
|
107
|
+
};
|
|
111
108
|
tokensSpent: {
|
|
112
|
-
[chainId:
|
|
109
|
+
[chainId: string]: {
|
|
113
110
|
[tokenAddress: Address]: {
|
|
114
111
|
locked: string;
|
|
115
112
|
unlocked: string;
|
|
113
|
+
version: number;
|
|
116
114
|
};
|
|
117
115
|
};
|
|
118
116
|
};
|
|
119
117
|
}
|
|
118
|
+
interface IntentOpElementMandate {
|
|
119
|
+
recipient: Address;
|
|
120
|
+
tokenOut: [[string, string]];
|
|
121
|
+
destinationChainId: string;
|
|
122
|
+
fillDeadline: string;
|
|
123
|
+
destinationOps: Execution[];
|
|
124
|
+
preClaimOps: Execution[];
|
|
125
|
+
qualifier: {
|
|
126
|
+
settlementContext: {
|
|
127
|
+
settlementLayer: SettlementLayer;
|
|
128
|
+
usingJIT: boolean;
|
|
129
|
+
using7579: boolean;
|
|
130
|
+
};
|
|
131
|
+
encodedVal: Hex;
|
|
132
|
+
};
|
|
133
|
+
v: number;
|
|
134
|
+
minGas: string;
|
|
135
|
+
}
|
|
120
136
|
interface IntentOpElement {
|
|
121
137
|
arbiter: Address;
|
|
122
138
|
chainId: string;
|
|
123
139
|
idsAndAmounts: [[string, string]];
|
|
140
|
+
spendTokens: [[string, string]];
|
|
124
141
|
beforeFill: boolean;
|
|
125
|
-
smartAccountStatus:
|
|
126
|
-
mandate:
|
|
127
|
-
recipient: Address;
|
|
128
|
-
tokenOut: [[string, string]];
|
|
129
|
-
destinationChainId: string;
|
|
130
|
-
fillDeadline: string;
|
|
131
|
-
destinationOps: Execution[];
|
|
132
|
-
preClaimOps: Execution[];
|
|
133
|
-
qualifier: {
|
|
134
|
-
settlementSystem: SettlementSystem;
|
|
135
|
-
encodedVal: Hex;
|
|
136
|
-
};
|
|
137
|
-
};
|
|
142
|
+
smartAccountStatus: AccountContext;
|
|
143
|
+
mandate: IntentOpElementMandate;
|
|
138
144
|
}
|
|
139
145
|
interface IntentOp {
|
|
140
146
|
sponsor: Address;
|
|
@@ -143,6 +149,7 @@ interface IntentOp {
|
|
|
143
149
|
elements: IntentOpElement[];
|
|
144
150
|
serverSignature: string;
|
|
145
151
|
signedMetadata: {
|
|
152
|
+
fees: unknown;
|
|
146
153
|
quotes: Record<Address, unknown[]>;
|
|
147
154
|
tokenPrices: Record<string, number>;
|
|
148
155
|
opGasParams: Record<string, {
|
|
@@ -157,16 +164,23 @@ interface IntentOp {
|
|
|
157
164
|
account: AccountWithContext;
|
|
158
165
|
};
|
|
159
166
|
}
|
|
167
|
+
interface AccountContext {
|
|
168
|
+
accountType: 'smartAccount';
|
|
169
|
+
isDeployed: boolean;
|
|
170
|
+
isERC7579: boolean;
|
|
171
|
+
erc7579AccountType: string;
|
|
172
|
+
erc7579AccountVersion: string;
|
|
173
|
+
}
|
|
160
174
|
interface Account {
|
|
161
175
|
address: Address;
|
|
162
|
-
accountType:
|
|
176
|
+
accountType: AccountType;
|
|
163
177
|
setupOps: Pick<Execution, 'to' | 'data'>[];
|
|
164
178
|
delegations?: Delegations;
|
|
165
179
|
emissaryConfig?: EmissarySetupConfig;
|
|
166
180
|
}
|
|
167
181
|
type AccountWithContext = Omit<Account, 'delegations'> & {
|
|
168
182
|
accountContext: {
|
|
169
|
-
[chainId: number]:
|
|
183
|
+
[chainId: number]: AccountContext;
|
|
170
184
|
};
|
|
171
185
|
requiredDelegations?: Delegations;
|
|
172
186
|
};
|
|
@@ -241,19 +255,15 @@ export type OPNetworkParams = {
|
|
|
241
255
|
estimatedCalldataSize: number;
|
|
242
256
|
};
|
|
243
257
|
interface IntentOpStatus {
|
|
244
|
-
type: 'intent';
|
|
245
258
|
status: IntentStatus;
|
|
259
|
+
claims: Claim[];
|
|
260
|
+
destinationChainId: number;
|
|
261
|
+
userAddress: Address;
|
|
246
262
|
fillTimestamp?: number;
|
|
247
263
|
fillTransactionHash?: Hex;
|
|
248
|
-
claims: Claim[];
|
|
249
|
-
}
|
|
250
|
-
interface UserOpStatus {
|
|
251
|
-
type: 'userop';
|
|
252
|
-
receipt: UserOperationReceipt;
|
|
253
264
|
}
|
|
254
265
|
interface PortfolioTokenChainResponse {
|
|
255
266
|
chainId: number;
|
|
256
|
-
accountStatus: AccountStatus;
|
|
257
267
|
tokenAddress: Address;
|
|
258
268
|
balance: {
|
|
259
269
|
locked: string;
|
|
@@ -261,8 +271,8 @@ interface PortfolioTokenChainResponse {
|
|
|
261
271
|
};
|
|
262
272
|
}
|
|
263
273
|
interface PortfolioTokenResponse {
|
|
264
|
-
tokenName:
|
|
265
|
-
tokenDecimals:
|
|
274
|
+
tokenName: string;
|
|
275
|
+
tokenDecimals: number;
|
|
266
276
|
balance: {
|
|
267
277
|
locked: string;
|
|
268
278
|
unlocked: string;
|
|
@@ -270,6 +280,6 @@ interface PortfolioTokenResponse {
|
|
|
270
280
|
tokenChainBalance: PortfolioTokenChainResponse[];
|
|
271
281
|
}
|
|
272
282
|
type PortfolioResponse = PortfolioTokenResponse[];
|
|
273
|
-
export type { TokenConfig, SupportedChain,
|
|
283
|
+
export type { TokenConfig, SupportedChain, SettlementLayer, IntentInput, IntentCost, IntentRoute, IntentOp, IntentOpElement, IntentOpElementMandate, SignedIntentOp, IntentOpStatus, IntentResult, PortfolioTokenResponse, PortfolioResponse, Portfolio, PortfolioToken, MappedChainTokenAccessList, UnmappedChainTokenAccessList, };
|
|
274
284
|
export { INTENT_STATUS_PENDING, INTENT_STATUS_FAILED, INTENT_STATUS_EXPIRED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_COMPLETED, INTENT_STATUS_FILLED, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN, };
|
|
275
285
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../orchestrator/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../orchestrator/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,IAAI,yBAAyB,EAC5C,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AACn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YAAY,CAAA;IACpB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,kBAAkB,EAAE,MAAM,CAAA;IAC1B,WAAW,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,mBAAmB,CAAC,EAAE,GAAG,CAAA;CAC1B;AAED,UAAU,2BAA2B;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED,UAAU,sBAAsB;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,iBAAiB,EAAE,2BAA2B,EAAE,CAAA;CACjD;AAED,KAAK,iBAAiB,GAAG,sBAAsB,EAAE,CAAA;AAEjD,YAAY,EACV,WAAW,EACX,cAAc,EACd,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,0BAA0B,EAC1B,4BAA4B,GAC7B,CAAA;AACD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,iCAAiC,EACjC,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,GACtB,CAAA"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,24 +1,48 @@
|
|
|
1
1
|
import type { Account, Address, Chain, Hex } from 'viem';
|
|
2
2
|
import type { WebAuthnAccount } from 'viem/account-abstraction';
|
|
3
3
|
import type { EnableSessionData } from './modules/validators/smart-sessions';
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import type { SettlementLayer } from './orchestrator/types';
|
|
5
|
+
type AccountType = 'safe' | 'nexus' | 'kernel' | 'startale' | 'passport' | 'eoa';
|
|
6
|
+
interface SafeAccount {
|
|
7
|
+
type: 'safe';
|
|
8
|
+
version?: '1.4.1';
|
|
9
|
+
adapter?: '1.0.0' | '2.0.0';
|
|
7
10
|
}
|
|
11
|
+
interface NexusAccount {
|
|
12
|
+
type: 'nexus';
|
|
13
|
+
version?: '1.0.2' | '1.2.0' | 'rhinestone-1.0.0-beta' | 'rhinestone-1.0.0';
|
|
14
|
+
}
|
|
15
|
+
interface KernelAccount {
|
|
16
|
+
type: 'kernel';
|
|
17
|
+
version?: '3.1' | '3.2' | '3.3';
|
|
18
|
+
}
|
|
19
|
+
interface StartaleAccount {
|
|
20
|
+
type: 'startale';
|
|
21
|
+
}
|
|
22
|
+
interface PassportAccount {
|
|
23
|
+
type: 'passport';
|
|
24
|
+
}
|
|
25
|
+
interface EoaAccount {
|
|
26
|
+
type: 'eoa';
|
|
27
|
+
}
|
|
28
|
+
type AccountProviderConfig = SafeAccount | NexusAccount | KernelAccount | StartaleAccount | PassportAccount | EoaAccount;
|
|
8
29
|
interface OwnableValidatorConfig {
|
|
9
30
|
type: 'ecdsa';
|
|
10
31
|
accounts: Account[];
|
|
11
32
|
threshold?: number;
|
|
33
|
+
module?: Address;
|
|
12
34
|
}
|
|
13
35
|
interface WebauthnValidatorConfig {
|
|
14
36
|
type: 'passkey';
|
|
15
37
|
accounts: WebAuthnAccount[];
|
|
16
38
|
threshold?: number;
|
|
39
|
+
module?: Address;
|
|
17
40
|
}
|
|
18
41
|
interface MultiFactorValidatorConfig {
|
|
19
42
|
type: 'multi-factor';
|
|
20
43
|
validators: (OwnableValidatorConfig | WebauthnValidatorConfig)[];
|
|
21
44
|
threshold?: number;
|
|
45
|
+
module?: Address;
|
|
22
46
|
}
|
|
23
47
|
interface ProviderConfig {
|
|
24
48
|
type: 'alchemy';
|
|
@@ -87,26 +111,44 @@ interface Recovery {
|
|
|
87
111
|
}
|
|
88
112
|
interface RhinestoneAccountConfig {
|
|
89
113
|
account?: AccountProviderConfig;
|
|
90
|
-
owners
|
|
91
|
-
rhinestoneApiKey?: string;
|
|
114
|
+
owners?: OwnerSet;
|
|
92
115
|
sessions?: Session[];
|
|
93
116
|
recovery?: Recovery;
|
|
94
117
|
eoa?: Account;
|
|
118
|
+
initData?: {
|
|
119
|
+
address: Address;
|
|
120
|
+
factory: Address;
|
|
121
|
+
factoryData: Hex;
|
|
122
|
+
intentExecutorInstalled: boolean;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
interface RhinestoneSDKConfig {
|
|
126
|
+
apiKey?: string;
|
|
95
127
|
provider?: ProviderConfig;
|
|
96
128
|
bundler?: BundlerConfig;
|
|
97
129
|
paymaster?: PaymasterConfig;
|
|
98
130
|
/**
|
|
99
131
|
* @internal
|
|
100
|
-
*
|
|
132
|
+
* Optional orchestrator URL override for internal testing - do not use
|
|
101
133
|
*/
|
|
102
|
-
|
|
134
|
+
endpointUrl?: string;
|
|
103
135
|
}
|
|
136
|
+
type RhinestoneConfig = RhinestoneAccountConfig & RhinestoneSDKConfig;
|
|
104
137
|
type TokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT';
|
|
105
|
-
interface
|
|
138
|
+
interface CalldataInput {
|
|
106
139
|
to: Address | TokenSymbol;
|
|
107
140
|
data?: Hex;
|
|
108
141
|
value?: bigint;
|
|
109
142
|
}
|
|
143
|
+
interface CallResolveContext {
|
|
144
|
+
config: RhinestoneConfig;
|
|
145
|
+
chain: Chain;
|
|
146
|
+
accountAddress: Address;
|
|
147
|
+
}
|
|
148
|
+
interface LazyCallInput {
|
|
149
|
+
resolve: (context: CallResolveContext) => Promise<CalldataInput | CalldataInput[]>;
|
|
150
|
+
}
|
|
151
|
+
type CallInput = CalldataInput | LazyCallInput;
|
|
110
152
|
interface Call {
|
|
111
153
|
to: Address;
|
|
112
154
|
data: Hex;
|
|
@@ -116,14 +158,19 @@ interface TokenRequest {
|
|
|
116
158
|
address: Address | TokenSymbol;
|
|
117
159
|
amount: bigint;
|
|
118
160
|
}
|
|
161
|
+
type SourceAssetInput = (Address | TokenSymbol)[] | {
|
|
162
|
+
[chainId in number]?: (Address | TokenSymbol)[];
|
|
163
|
+
};
|
|
119
164
|
type OwnerSignerSet = {
|
|
120
165
|
type: 'owner';
|
|
121
166
|
kind: 'ecdsa';
|
|
122
167
|
accounts: Account[];
|
|
168
|
+
module?: Address;
|
|
123
169
|
} | {
|
|
124
170
|
type: 'owner';
|
|
125
171
|
kind: 'passkey';
|
|
126
172
|
accounts: WebAuthnAccount[];
|
|
173
|
+
module?: Address;
|
|
127
174
|
} | {
|
|
128
175
|
type: 'owner';
|
|
129
176
|
kind: 'multi-factor';
|
|
@@ -136,6 +183,7 @@ type OwnerSignerSet = {
|
|
|
136
183
|
id: number | Hex;
|
|
137
184
|
accounts: WebAuthnAccount[];
|
|
138
185
|
})[];
|
|
186
|
+
module?: Address;
|
|
139
187
|
};
|
|
140
188
|
interface SessionSignerSet {
|
|
141
189
|
type: 'session';
|
|
@@ -154,6 +202,17 @@ interface BaseTransaction {
|
|
|
154
202
|
signers?: SignerSet;
|
|
155
203
|
sponsored?: boolean;
|
|
156
204
|
eip7702InitSignature?: Hex;
|
|
205
|
+
sourceAssets?: SourceAssetInput;
|
|
206
|
+
feeAsset?: Address | TokenSymbol;
|
|
207
|
+
settlementLayers?: SettlementLayer[];
|
|
208
|
+
lockFunds?: boolean;
|
|
209
|
+
dryRun?: boolean;
|
|
210
|
+
experimental_accountOverride?: {
|
|
211
|
+
setupOps?: {
|
|
212
|
+
to: Address;
|
|
213
|
+
data: Hex;
|
|
214
|
+
}[];
|
|
215
|
+
};
|
|
157
216
|
}
|
|
158
217
|
interface SameChainTransaction extends BaseTransaction {
|
|
159
218
|
chain: Chain;
|
|
@@ -162,6 +221,12 @@ interface CrossChainTransaction extends BaseTransaction {
|
|
|
162
221
|
sourceChains?: Chain[];
|
|
163
222
|
targetChain: Chain;
|
|
164
223
|
}
|
|
224
|
+
interface UserOperationTransaction {
|
|
225
|
+
calls: CallInput[];
|
|
226
|
+
gasLimit?: bigint;
|
|
227
|
+
signers?: SignerSet;
|
|
228
|
+
chain: Chain;
|
|
229
|
+
}
|
|
165
230
|
type Transaction = SameChainTransaction | CrossChainTransaction;
|
|
166
|
-
export type { AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, Session, Recovery, Policy, UniversalActionPolicyParamCondition, };
|
|
231
|
+
export type { AccountType, RhinestoneAccountConfig, RhinestoneSDKConfig, RhinestoneConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, UserOperationTransaction, TokenSymbol, CalldataInput, LazyCallInput, CallInput, CallResolveContext, Call, TokenRequest, SourceAssetInput, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, Session, Recovery, Policy, UniversalActionPolicyParamCondition, };
|
|
167
232
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,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