@charterlabs/rhinestone-sdk 0.1.0 → 0.1.2
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 +74 -181
- package/dist/src/accounts/error.d.ts +69 -0
- package/dist/src/accounts/error.d.ts.map +1 -0
- package/dist/src/accounts/error.js +109 -0
- package/dist/{accounts → src/accounts}/index.d.ts +14 -21
- package/dist/src/accounts/index.d.ts.map +1 -0
- package/dist/src/accounts/index.js +469 -0
- package/dist/src/accounts/index.test.d.ts +2 -0
- package/dist/src/accounts/index.test.d.ts.map +1 -0
- package/dist/src/accounts/index.test.js +36 -0
- package/dist/{accounts → src/accounts}/kernel.d.ts +7 -9
- package/dist/src/accounts/kernel.d.ts.map +1 -0
- package/dist/{accounts → src/accounts}/kernel.js +0 -8
- package/dist/src/accounts/kernel.test.d.ts +2 -0
- package/dist/src/accounts/kernel.test.d.ts.map +1 -0
- package/dist/src/accounts/kernel.test.js +105 -0
- package/dist/{accounts → src/accounts}/nexus.d.ts +14 -13
- package/dist/src/accounts/nexus.d.ts.map +1 -0
- package/dist/{accounts → src/accounts}/nexus.js +92 -88
- package/dist/src/accounts/nexus.test.d.ts +2 -0
- package/dist/src/accounts/nexus.test.d.ts.map +1 -0
- package/dist/src/accounts/nexus.test.js +87 -0
- package/dist/{accounts → src/accounts}/safe.d.ts +4 -6
- package/dist/src/accounts/safe.d.ts.map +1 -0
- package/dist/{accounts → src/accounts}/safe.js +20 -29
- package/dist/src/accounts/safe.test.d.ts +2 -0
- package/dist/src/accounts/safe.test.d.ts.map +1 -0
- package/dist/src/accounts/safe.test.js +87 -0
- package/dist/src/accounts/startale.d.ts +20 -0
- package/dist/src/accounts/startale.d.ts.map +1 -0
- package/dist/src/accounts/startale.js +100 -0
- package/dist/src/accounts/startale.test.d.ts +2 -0
- package/dist/src/accounts/startale.test.d.ts.map +1 -0
- package/dist/src/accounts/startale.test.js +99 -0
- package/dist/{accounts → src/accounts}/utils.d.ts +4 -3
- package/dist/src/accounts/utils.d.ts.map +1 -0
- package/dist/{accounts → src/accounts}/utils.js +44 -0
- package/dist/src/accounts/utils.test.d.ts +2 -0
- package/dist/src/accounts/utils.test.d.ts.map +1 -0
- package/dist/src/accounts/utils.test.js +49 -0
- package/dist/src/actions/index.d.ts +39 -0
- package/dist/src/actions/index.d.ts.map +1 -0
- package/dist/{actions → src/actions}/index.js +108 -15
- package/dist/src/actions/index.test.d.ts +2 -0
- package/dist/src/actions/index.test.d.ts.map +1 -0
- package/dist/src/actions/index.test.js +302 -0
- package/dist/{actions → src/actions}/smart-session.d.ts +2 -2
- package/dist/src/actions/smart-session.d.ts.map +1 -0
- package/dist/src/execution/compact.d.ts +8 -0
- package/dist/src/execution/compact.d.ts.map +1 -0
- package/dist/src/execution/compact.js +105 -0
- package/dist/src/execution/error.d.ts +54 -0
- package/dist/src/execution/error.d.ts.map +1 -0
- package/dist/src/execution/error.js +78 -0
- package/dist/{execution → src/execution}/index.d.ts +7 -6
- package/dist/src/execution/index.d.ts.map +1 -0
- package/dist/src/execution/index.js +150 -0
- package/dist/src/execution/smart-session.d.ts +15 -0
- package/dist/src/execution/smart-session.d.ts.map +1 -0
- package/dist/{execution → src/execution}/smart-session.js +16 -77
- package/dist/src/execution/smart-session.test.d.ts +2 -0
- package/dist/src/execution/smart-session.test.d.ts.map +1 -0
- package/dist/src/execution/smart-session.test.js +34 -0
- package/dist/src/execution/utils.d.ts +45 -0
- package/dist/src/execution/utils.d.ts.map +1 -0
- package/dist/src/execution/utils.js +433 -0
- package/dist/src/index.d.ts +41 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +154 -0
- package/dist/src/modules/abi/smart-sessions.d.ts.map +1 -0
- package/dist/src/modules/common.d.ts.map +1 -0
- package/dist/{modules → src/modules}/index.d.ts +3 -11
- package/dist/src/modules/index.d.ts.map +1 -0
- package/dist/{modules → src/modules}/index.js +3 -45
- package/dist/src/modules/index.test.d.ts +2 -0
- package/dist/src/modules/index.test.d.ts.map +1 -0
- package/dist/src/modules/index.test.js +107 -0
- package/dist/src/modules/omni-account.d.ts +7 -0
- package/dist/src/modules/omni-account.d.ts.map +1 -0
- package/dist/src/modules/omni-account.js +11 -0
- package/dist/src/modules/read.d.ts +9 -0
- package/dist/src/modules/read.d.ts.map +1 -0
- package/dist/{modules → src/modules}/read.js +6 -37
- package/dist/{modules → src/modules}/validators/core.d.ts +6 -7
- package/dist/src/modules/validators/core.d.ts.map +1 -0
- package/dist/{modules → src/modules}/validators/core.js +83 -8
- package/dist/src/modules/validators/core.test.d.ts +2 -0
- package/dist/src/modules/validators/core.test.d.ts.map +1 -0
- package/dist/src/modules/validators/core.test.js +108 -0
- package/dist/src/modules/validators/index.d.ts +4 -0
- package/dist/src/modules/validators/index.d.ts.map +1 -0
- package/dist/{modules → src/modules}/validators/index.js +1 -3
- package/dist/{modules → src/modules}/validators/smart-sessions.d.ts +4 -15
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -0
- package/dist/{modules → src/modules}/validators/smart-sessions.js +7 -61
- package/dist/src/modules/validators/smart-sessions.test.d.ts +2 -0
- package/dist/src/modules/validators/smart-sessions.test.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions.test.js +226 -0
- package/dist/src/orchestrator/client.d.ts +21 -0
- package/dist/src/orchestrator/client.d.ts.map +1 -0
- package/dist/src/orchestrator/client.js +284 -0
- package/dist/src/orchestrator/consts.d.ts +5 -0
- package/dist/src/orchestrator/consts.d.ts.map +1 -0
- package/dist/src/orchestrator/consts.js +9 -0
- package/dist/src/orchestrator/error.d.ts +96 -0
- package/dist/src/orchestrator/error.d.ts.map +1 -0
- package/dist/src/orchestrator/error.js +132 -0
- package/dist/src/orchestrator/index.d.ts +11 -0
- package/dist/src/orchestrator/index.d.ts.map +1 -0
- package/dist/src/orchestrator/index.js +42 -0
- package/dist/src/orchestrator/registry.d.ts +39 -0
- package/dist/src/orchestrator/registry.d.ts.map +1 -0
- package/dist/src/orchestrator/registry.js +121 -0
- package/dist/src/orchestrator/registry.json +365 -0
- package/dist/src/orchestrator/registry.test.d.ts +2 -0
- package/dist/src/orchestrator/registry.test.d.ts.map +1 -0
- package/dist/src/orchestrator/registry.test.js +137 -0
- package/dist/src/orchestrator/types.d.ts +275 -0
- package/dist/src/orchestrator/types.d.ts.map +1 -0
- package/dist/src/orchestrator/types.js +19 -0
- package/dist/src/orchestrator/utils.d.ts +5 -0
- package/dist/src/orchestrator/utils.d.ts.map +1 -0
- package/dist/src/orchestrator/utils.js +126 -0
- package/dist/{types.d.ts → src/types.d.ts} +42 -21
- package/dist/src/types.d.ts.map +1 -0
- package/dist/test/consts.d.ts +10 -0
- package/dist/test/consts.d.ts.map +1 -0
- package/dist/test/consts.js +22 -0
- package/package.json +11 -20
- package/dist/accounts/index.d.ts.map +0 -1
- package/dist/accounts/index.js +0 -419
- package/dist/accounts/kernel.d.ts.map +0 -1
- package/dist/accounts/nexus.d.ts.map +0 -1
- package/dist/accounts/safe.d.ts.map +0 -1
- package/dist/accounts/utils.d.ts.map +0 -1
- package/dist/actions/index.d.ts +0 -29
- package/dist/actions/index.d.ts.map +0 -1
- package/dist/actions/registry.d.ts +0 -7
- package/dist/actions/registry.d.ts.map +0 -1
- package/dist/actions/registry.js +0 -7
- package/dist/actions/smart-session.d.ts.map +0 -1
- package/dist/execution/index.d.ts.map +0 -1
- package/dist/execution/index.js +0 -149
- package/dist/execution/smart-session.d.ts +0 -23
- package/dist/execution/smart-session.d.ts.map +0 -1
- package/dist/execution/utils.d.ts +0 -68
- package/dist/execution/utils.d.ts.map +0 -1
- package/dist/execution/utils.js +0 -482
- package/dist/index.d.ts +0 -38
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -119
- package/dist/modules/abi/smart-sessions.d.ts.map +0 -1
- package/dist/modules/common.d.ts.map +0 -1
- package/dist/modules/index.d.ts.map +0 -1
- package/dist/modules/omni-account.d.ts +0 -9
- package/dist/modules/omni-account.d.ts.map +0 -1
- package/dist/modules/omni-account.js +0 -15
- package/dist/modules/read.d.ts +0 -10
- package/dist/modules/read.d.ts.map +0 -1
- package/dist/modules/registry.d.ts +0 -9
- package/dist/modules/registry.d.ts.map +0 -1
- package/dist/modules/registry.js +0 -60
- package/dist/modules/validators/core.d.ts.map +0 -1
- package/dist/modules/validators/index.d.ts +0 -4
- package/dist/modules/validators/index.d.ts.map +0 -1
- package/dist/modules/validators/smart-sessions.d.ts.map +0 -1
- package/dist/orchestrator/client.d.ts +0 -29
- package/dist/orchestrator/client.d.ts.map +0 -1
- package/dist/orchestrator/client.js +0 -250
- package/dist/orchestrator/consts.d.ts +0 -5
- package/dist/orchestrator/consts.d.ts.map +0 -1
- package/dist/orchestrator/consts.js +0 -9
- package/dist/orchestrator/error.d.ts +0 -18
- package/dist/orchestrator/error.d.ts.map +0 -1
- package/dist/orchestrator/error.js +0 -33
- package/dist/orchestrator/index.d.ts +0 -11
- package/dist/orchestrator/index.d.ts.map +0 -1
- package/dist/orchestrator/index.js +0 -40
- package/dist/orchestrator/registry.d.ts +0 -20
- package/dist/orchestrator/registry.d.ts.map +0 -1
- package/dist/orchestrator/registry.js +0 -444
- package/dist/orchestrator/types.d.ts +0 -242
- package/dist/orchestrator/types.d.ts.map +0 -1
- package/dist/orchestrator/types.js +0 -19
- package/dist/orchestrator/utils.d.ts +0 -29
- package/dist/orchestrator/utils.d.ts.map +0 -1
- package/dist/orchestrator/utils.js +0 -319
- package/dist/types.d.ts.map +0 -1
- /package/dist/{actions → src/actions}/smart-session.js +0 -0
- /package/dist/{modules → src/modules}/abi/smart-sessions.d.ts +0 -0
- /package/dist/{modules → src/modules}/abi/smart-sessions.js +0 -0
- /package/dist/{modules → src/modules}/common.d.ts +0 -0
- /package/dist/{modules → src/modules}/common.js +0 -0
- /package/dist/{types.js → src/types.js} +0 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
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
|
+
type SupportedTokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT';
|
|
10
|
+
type SupportedToken = SupportedTokenSymbol | Address;
|
|
11
|
+
type SmartAccountType = 'GENERIC' | 'ERC7579';
|
|
12
|
+
type AccountStatus = 'NOT_DEPLOYED' | SmartAccountType;
|
|
13
|
+
declare const INTENT_STATUS_PENDING = "PENDING";
|
|
14
|
+
declare const INTENT_STATUS_FAILED = "FAILED";
|
|
15
|
+
declare const INTENT_STATUS_EXPIRED = "EXPIRED";
|
|
16
|
+
declare const INTENT_STATUS_PARTIALLY_COMPLETED = "PARTIALLY_COMPLETED";
|
|
17
|
+
declare const INTENT_STATUS_COMPLETED = "COMPLETED";
|
|
18
|
+
declare const INTENT_STATUS_FILLED = "FILLED";
|
|
19
|
+
declare const INTENT_STATUS_PRECONFIRMED = "PRECONFIRMED";
|
|
20
|
+
declare const INTENT_STATUS_UNKNOWN = "UNKNOWN";
|
|
21
|
+
type IntentStatus = typeof INTENT_STATUS_PENDING | typeof INTENT_STATUS_EXPIRED | typeof INTENT_STATUS_PARTIALLY_COMPLETED | typeof INTENT_STATUS_COMPLETED | typeof INTENT_STATUS_FILLED | typeof INTENT_STATUS_PRECONFIRMED | typeof INTENT_STATUS_FAILED | typeof INTENT_STATUS_UNKNOWN;
|
|
22
|
+
type AccountAccessListLegacy = {
|
|
23
|
+
chainId: number;
|
|
24
|
+
tokenAddress: Address;
|
|
25
|
+
}[];
|
|
26
|
+
type MappedChainTokenAccessList = {
|
|
27
|
+
chainTokens?: {
|
|
28
|
+
[chainId in SupportedChain]?: SupportedToken[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type UnmappedChainTokenAccessList = {
|
|
32
|
+
chainIds?: SupportedChain[];
|
|
33
|
+
tokens?: SupportedToken[];
|
|
34
|
+
};
|
|
35
|
+
type AccountAccessList = AccountAccessListLegacy | MappedChainTokenAccessList | UnmappedChainTokenAccessList;
|
|
36
|
+
type ClaimStatus = 'PENDING' | 'EXPIRED' | 'CLAIMED';
|
|
37
|
+
interface Claim {
|
|
38
|
+
depositId: bigint;
|
|
39
|
+
chainId: number;
|
|
40
|
+
status: ClaimStatus;
|
|
41
|
+
claimTimestamp?: number;
|
|
42
|
+
claimTransactionHash?: Hex;
|
|
43
|
+
}
|
|
44
|
+
interface Execution {
|
|
45
|
+
to: Address;
|
|
46
|
+
value: bigint;
|
|
47
|
+
data: Hex;
|
|
48
|
+
}
|
|
49
|
+
type SettlementLayer = 'SAME_CHAIN' | 'ACROSS' | 'ECO';
|
|
50
|
+
interface IntentOptions {
|
|
51
|
+
topupCompact: boolean;
|
|
52
|
+
sponsorSettings?: SponsorSettings;
|
|
53
|
+
settlementLayers?: SettlementLayer[];
|
|
54
|
+
}
|
|
55
|
+
interface SponsorSettings {
|
|
56
|
+
gasSponsored: boolean;
|
|
57
|
+
bridgeFeesSponsored: boolean;
|
|
58
|
+
swapFeesSponsored: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface PortfolioToken {
|
|
61
|
+
symbol: string;
|
|
62
|
+
decimals: number;
|
|
63
|
+
balances: {
|
|
64
|
+
locked: bigint;
|
|
65
|
+
unlocked: bigint;
|
|
66
|
+
};
|
|
67
|
+
chains: [
|
|
68
|
+
{
|
|
69
|
+
chain: number;
|
|
70
|
+
address: Address;
|
|
71
|
+
locked: bigint;
|
|
72
|
+
unlocked: bigint;
|
|
73
|
+
}
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
type Portfolio = PortfolioToken[];
|
|
77
|
+
interface IntentInput {
|
|
78
|
+
account: {
|
|
79
|
+
address: Address;
|
|
80
|
+
accountType: SmartAccountType;
|
|
81
|
+
setupOps: {
|
|
82
|
+
to: Address;
|
|
83
|
+
data: Hex;
|
|
84
|
+
}[];
|
|
85
|
+
delegations?: Record<number, {
|
|
86
|
+
contract: Address;
|
|
87
|
+
}>;
|
|
88
|
+
};
|
|
89
|
+
destinationChainId: number;
|
|
90
|
+
destinationExecutions: Execution[];
|
|
91
|
+
destinationGasUnits?: bigint;
|
|
92
|
+
tokenTransfers: {
|
|
93
|
+
tokenAddress: Address;
|
|
94
|
+
amount?: bigint;
|
|
95
|
+
}[];
|
|
96
|
+
accountAccessList?: AccountAccessList;
|
|
97
|
+
options?: IntentOptions;
|
|
98
|
+
}
|
|
99
|
+
type SettlementSystem = 'SAME_CHAIN' | 'ACROSS';
|
|
100
|
+
interface IntentCost {
|
|
101
|
+
hasFulfilledAll: boolean;
|
|
102
|
+
tokensReceived: [
|
|
103
|
+
{
|
|
104
|
+
tokenAddress: Address;
|
|
105
|
+
hasFulfilled: boolean;
|
|
106
|
+
amountSpent: bigint;
|
|
107
|
+
destinationAmount: bigint;
|
|
108
|
+
fee: bigint;
|
|
109
|
+
}
|
|
110
|
+
];
|
|
111
|
+
tokensSpent: {
|
|
112
|
+
[chainId: number]: {
|
|
113
|
+
[tokenAddress: Address]: {
|
|
114
|
+
locked: string;
|
|
115
|
+
unlocked: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
interface IntentOpElement {
|
|
121
|
+
arbiter: Address;
|
|
122
|
+
chainId: string;
|
|
123
|
+
idsAndAmounts: [[string, string]];
|
|
124
|
+
beforeFill: boolean;
|
|
125
|
+
smartAccountStatus: SmartAccountType;
|
|
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
|
+
};
|
|
138
|
+
}
|
|
139
|
+
interface IntentOp {
|
|
140
|
+
sponsor: Address;
|
|
141
|
+
nonce: string;
|
|
142
|
+
expires: string;
|
|
143
|
+
elements: IntentOpElement[];
|
|
144
|
+
serverSignature: string;
|
|
145
|
+
signedMetadata: {
|
|
146
|
+
quotes: Record<Address, unknown[]>;
|
|
147
|
+
tokenPrices: Record<string, number>;
|
|
148
|
+
opGasParams: Record<string, {
|
|
149
|
+
l1BaseFee: string;
|
|
150
|
+
l1BlobBaseFee: string;
|
|
151
|
+
baseFeeScalar: string;
|
|
152
|
+
blobFeeScalar: string;
|
|
153
|
+
}> & {
|
|
154
|
+
estimatedCalldataSize: number;
|
|
155
|
+
};
|
|
156
|
+
gasPrices: Record<string, string>;
|
|
157
|
+
account: AccountWithContext;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
interface Account {
|
|
161
|
+
address: Address;
|
|
162
|
+
accountType: SmartAccountType;
|
|
163
|
+
setupOps: Pick<Execution, 'to' | 'data'>[];
|
|
164
|
+
delegations?: Delegations;
|
|
165
|
+
emissaryConfig?: EmissarySetupConfig;
|
|
166
|
+
}
|
|
167
|
+
type AccountWithContext = Omit<Account, 'delegations'> & {
|
|
168
|
+
accountContext: {
|
|
169
|
+
[chainId: number]: AccountStatus;
|
|
170
|
+
};
|
|
171
|
+
requiredDelegations?: Delegations;
|
|
172
|
+
};
|
|
173
|
+
interface Delegation {
|
|
174
|
+
contract: Address;
|
|
175
|
+
}
|
|
176
|
+
type Delegations = Record<number, Delegation>;
|
|
177
|
+
interface EmissarySetupConfig {
|
|
178
|
+
configId: number;
|
|
179
|
+
validatorAddress: Address;
|
|
180
|
+
emissaryAddress: Address;
|
|
181
|
+
emissaryConfig: EmissaryConfig;
|
|
182
|
+
emissaryEnable: EmissaryEnable;
|
|
183
|
+
}
|
|
184
|
+
interface EmissaryConfig {
|
|
185
|
+
configId: number;
|
|
186
|
+
allocator: Address;
|
|
187
|
+
scope: number;
|
|
188
|
+
resetPeriod: number;
|
|
189
|
+
validator: Address;
|
|
190
|
+
validatorConfig: Hex;
|
|
191
|
+
}
|
|
192
|
+
interface EmissaryEnable {
|
|
193
|
+
allocatorSig: Hex;
|
|
194
|
+
userSig: Hex;
|
|
195
|
+
expires: bigint;
|
|
196
|
+
nonce: bigint;
|
|
197
|
+
allChainIds: bigint[];
|
|
198
|
+
chainIndex: bigint;
|
|
199
|
+
}
|
|
200
|
+
interface IntentRoute {
|
|
201
|
+
intentOp: IntentOp;
|
|
202
|
+
intentCost: IntentCost;
|
|
203
|
+
}
|
|
204
|
+
interface IntentResult {
|
|
205
|
+
result: {
|
|
206
|
+
id: string;
|
|
207
|
+
status: IntentStatus;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
type SignedIntentOp = IntentOp & {
|
|
211
|
+
originSignatures: Hex[];
|
|
212
|
+
destinationSignature: Hex;
|
|
213
|
+
signedAuthorizations?: readonly {
|
|
214
|
+
chainId: number;
|
|
215
|
+
address: Address;
|
|
216
|
+
nonce: number;
|
|
217
|
+
yParity: number;
|
|
218
|
+
r: Hex;
|
|
219
|
+
s: Hex;
|
|
220
|
+
}[];
|
|
221
|
+
};
|
|
222
|
+
interface TokenConfig {
|
|
223
|
+
symbol: string;
|
|
224
|
+
address: Address;
|
|
225
|
+
decimals: number;
|
|
226
|
+
}
|
|
227
|
+
export type TokenPrices = {
|
|
228
|
+
[key in SupportedTokenSymbol]?: number;
|
|
229
|
+
};
|
|
230
|
+
export type GasPrices = {
|
|
231
|
+
[key in SupportedMainnet | SupportedTestnet]?: bigint;
|
|
232
|
+
};
|
|
233
|
+
export type OPNetworkParams = {
|
|
234
|
+
[key in SupportedOPStackMainnet | SupportedOPStackTestnet]?: {
|
|
235
|
+
l1BaseFee: bigint;
|
|
236
|
+
l1BlobBaseFee: bigint;
|
|
237
|
+
baseFeeScalar: bigint;
|
|
238
|
+
blobFeeScalar: bigint;
|
|
239
|
+
};
|
|
240
|
+
} | {
|
|
241
|
+
estimatedCalldataSize: number;
|
|
242
|
+
};
|
|
243
|
+
interface IntentOpStatus {
|
|
244
|
+
type: 'intent';
|
|
245
|
+
status: IntentStatus;
|
|
246
|
+
fillTimestamp?: number;
|
|
247
|
+
fillTransactionHash?: Hex;
|
|
248
|
+
claims: Claim[];
|
|
249
|
+
}
|
|
250
|
+
interface UserOpStatus {
|
|
251
|
+
type: 'userop';
|
|
252
|
+
receipt: UserOperationReceipt;
|
|
253
|
+
}
|
|
254
|
+
interface PortfolioTokenChainResponse {
|
|
255
|
+
chainId: number;
|
|
256
|
+
accountStatus: AccountStatus;
|
|
257
|
+
tokenAddress: Address;
|
|
258
|
+
balance: {
|
|
259
|
+
locked: string;
|
|
260
|
+
unlocked: string;
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
interface PortfolioTokenResponse {
|
|
264
|
+
tokenName: 'ETH';
|
|
265
|
+
tokenDecimals: 18;
|
|
266
|
+
balance: {
|
|
267
|
+
locked: string;
|
|
268
|
+
unlocked: string;
|
|
269
|
+
};
|
|
270
|
+
tokenChainBalance: PortfolioTokenChainResponse[];
|
|
271
|
+
}
|
|
272
|
+
type PortfolioResponse = PortfolioTokenResponse[];
|
|
273
|
+
export type { TokenConfig, SupportedChain, SettlementSystem, IntentInput, IntentCost, IntentRoute, IntentOp, IntentOpElement, SignedIntentOp, IntentOpStatus, UserOpStatus, IntentResult, PortfolioTokenResponse, PortfolioResponse, Portfolio, PortfolioToken, };
|
|
274
|
+
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
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../orchestrator/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,WAAW,EACX,OAAO,EACP,QAAQ,EACR,eAAe,EACf,OAAO,EACP,OAAO,EACP,OAAO,EACP,MAAM,EACP,MAAM,aAAa,CAAA;AAEpB,KAAK,gBAAgB,GACjB,OAAO,OAAO,CAAC,EAAE,GACjB,OAAO,WAAW,CAAC,EAAE,GACrB,OAAO,eAAe,CAAC,EAAE,GACzB,OAAO,eAAe,CAAC,EAAE,CAAA;AAC7B,KAAK,gBAAgB,GACjB,OAAO,OAAO,CAAC,EAAE,GACjB,OAAO,IAAI,CAAC,EAAE,GACd,OAAO,QAAQ,CAAC,EAAE,GAClB,OAAO,QAAQ,CAAC,EAAE,GAClB,OAAO,OAAO,CAAC,EAAE,GACjB,OAAO,MAAM,CAAC,EAAE,GAChB,OAAO,OAAO,CAAC,EAAE,CAAA;AACrB,KAAK,uBAAuB,GACxB,OAAO,QAAQ,CAAC,EAAE,GAClB,OAAO,IAAI,CAAC,EAAE,GACd,OAAO,OAAO,CAAC,EAAE,CAAA;AACrB,KAAK,uBAAuB,GAAG,OAAO,eAAe,CAAC,EAAE,GAAG,OAAO,WAAW,CAAC,EAAE,CAAA;AAChF,KAAK,cAAc,GAAG,gBAAgB,GAAG,gBAAg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A;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,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,cAAc,GACf,CAAA;AACD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,iCAAiC,EACjC,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,GACtB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INTENT_STATUS_UNKNOWN = exports.INTENT_STATUS_PRECONFIRMED = exports.INTENT_STATUS_FILLED = exports.INTENT_STATUS_COMPLETED = exports.INTENT_STATUS_PARTIALLY_COMPLETED = exports.INTENT_STATUS_EXPIRED = exports.INTENT_STATUS_FAILED = exports.INTENT_STATUS_PENDING = void 0;
|
|
4
|
+
const INTENT_STATUS_PENDING = 'PENDING';
|
|
5
|
+
exports.INTENT_STATUS_PENDING = INTENT_STATUS_PENDING;
|
|
6
|
+
const INTENT_STATUS_FAILED = 'FAILED';
|
|
7
|
+
exports.INTENT_STATUS_FAILED = INTENT_STATUS_FAILED;
|
|
8
|
+
const INTENT_STATUS_EXPIRED = 'EXPIRED';
|
|
9
|
+
exports.INTENT_STATUS_EXPIRED = INTENT_STATUS_EXPIRED;
|
|
10
|
+
const INTENT_STATUS_PARTIALLY_COMPLETED = 'PARTIALLY_COMPLETED';
|
|
11
|
+
exports.INTENT_STATUS_PARTIALLY_COMPLETED = INTENT_STATUS_PARTIALLY_COMPLETED;
|
|
12
|
+
const INTENT_STATUS_COMPLETED = 'COMPLETED';
|
|
13
|
+
exports.INTENT_STATUS_COMPLETED = INTENT_STATUS_COMPLETED;
|
|
14
|
+
const INTENT_STATUS_FILLED = 'FILLED';
|
|
15
|
+
exports.INTENT_STATUS_FILLED = INTENT_STATUS_FILLED;
|
|
16
|
+
const INTENT_STATUS_PRECONFIRMED = 'PRECONFIRMED';
|
|
17
|
+
exports.INTENT_STATUS_PRECONFIRMED = INTENT_STATUS_PRECONFIRMED;
|
|
18
|
+
const INTENT_STATUS_UNKNOWN = 'UNKNOWN';
|
|
19
|
+
exports.INTENT_STATUS_UNKNOWN = INTENT_STATUS_UNKNOWN;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../orchestrator/utils.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,SAAS,CAAA;AAWzD,iBAAS,eAAe,CAAC,QAAQ,EAAE,QAAQ,iBA4F1C;AAED,iBAAS,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAwB1C;AAED,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIntentOpHash = getIntentOpHash;
|
|
4
|
+
exports.convertBigIntFields = convertBigIntFields;
|
|
5
|
+
const viem_1 = require("viem");
|
|
6
|
+
function getClaimProofer(settlementSystem) {
|
|
7
|
+
switch (settlementSystem) {
|
|
8
|
+
case 'ACROSS':
|
|
9
|
+
return '0x1636b30481Db91Bbc5818e65d3962838BdCd5569';
|
|
10
|
+
case 'SAME_CHAIN':
|
|
11
|
+
return viem_1.zeroAddress;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function getIntentOpHash(intentOp) {
|
|
15
|
+
const notarizedChainElement = intentOp.elements[0];
|
|
16
|
+
const settlementSystem = notarizedChainElement.mandate.qualifier.settlementSystem;
|
|
17
|
+
const claimProofer = getClaimProofer(settlementSystem);
|
|
18
|
+
return (0, viem_1.hashTypedData)({
|
|
19
|
+
domain: {
|
|
20
|
+
name: 'The Compact',
|
|
21
|
+
version: '1',
|
|
22
|
+
chainId: BigInt(notarizedChainElement.chainId),
|
|
23
|
+
verifyingContract: '0xAbd3388A633758D0Bae01Efb885EF1e87BD519a6',
|
|
24
|
+
},
|
|
25
|
+
types: {
|
|
26
|
+
MultichainCompact: [
|
|
27
|
+
{ name: 'sponsor', type: 'address' },
|
|
28
|
+
{ name: 'nonce', type: 'uint256' },
|
|
29
|
+
{ name: 'expires', type: 'uint256' },
|
|
30
|
+
{ name: 'elements', type: 'Element[]' },
|
|
31
|
+
],
|
|
32
|
+
Element: [
|
|
33
|
+
{ name: 'arbiter', type: 'address' },
|
|
34
|
+
{ name: 'chainId', type: 'uint256' },
|
|
35
|
+
{ name: 'commitments', type: 'Lock[]' },
|
|
36
|
+
{ name: 'mandate', type: 'Mandate' },
|
|
37
|
+
],
|
|
38
|
+
Lock: [
|
|
39
|
+
{ name: 'lockTag', type: 'bytes12' },
|
|
40
|
+
{ name: 'token', type: 'address' },
|
|
41
|
+
{ name: 'amount', type: 'uint256' },
|
|
42
|
+
],
|
|
43
|
+
Mandate: [
|
|
44
|
+
{ name: 'target', type: 'Target' },
|
|
45
|
+
{ name: 'originOps', type: 'Op[]' },
|
|
46
|
+
{ name: 'destOps', type: 'Op[]' },
|
|
47
|
+
{ name: 'q', type: 'bytes32' },
|
|
48
|
+
],
|
|
49
|
+
Target: [
|
|
50
|
+
{ name: 'recipient', type: 'address' },
|
|
51
|
+
{ name: 'tokenOut', type: 'Token[]' },
|
|
52
|
+
{ name: 'targetChain', type: 'uint256' },
|
|
53
|
+
{ name: 'fillExpiry', type: 'uint256' },
|
|
54
|
+
{ name: 'claimProofer', type: 'address' },
|
|
55
|
+
],
|
|
56
|
+
Token: [
|
|
57
|
+
{ name: 'token', type: 'address' },
|
|
58
|
+
{ name: 'amount', type: 'uint256' },
|
|
59
|
+
],
|
|
60
|
+
Op: [
|
|
61
|
+
{ name: 'to', type: 'address' },
|
|
62
|
+
{ name: 'value', type: 'uint256' },
|
|
63
|
+
{ name: 'data', type: 'bytes' },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
primaryType: 'MultichainCompact',
|
|
67
|
+
message: {
|
|
68
|
+
sponsor: intentOp.sponsor,
|
|
69
|
+
nonce: BigInt(intentOp.nonce),
|
|
70
|
+
expires: BigInt(intentOp.expires),
|
|
71
|
+
elements: intentOp.elements.map((element) => ({
|
|
72
|
+
arbiter: element.arbiter,
|
|
73
|
+
chainId: BigInt(element.chainId),
|
|
74
|
+
commitments: element.idsAndAmounts.map((token) => ({
|
|
75
|
+
lockTag: (0, viem_1.slice)((0, viem_1.toHex)(BigInt(token[0])), 0, 12),
|
|
76
|
+
token: (0, viem_1.slice)((0, viem_1.toHex)(BigInt(token[0])), 12, 32),
|
|
77
|
+
amount: BigInt(token[1]),
|
|
78
|
+
})),
|
|
79
|
+
mandate: {
|
|
80
|
+
target: {
|
|
81
|
+
recipient: element.mandate.recipient,
|
|
82
|
+
tokenOut: element.mandate.tokenOut.map((token) => ({
|
|
83
|
+
token: (0, viem_1.slice)((0, viem_1.toHex)(BigInt(token[0])), 12, 32),
|
|
84
|
+
amount: BigInt(token[1]),
|
|
85
|
+
})),
|
|
86
|
+
targetChain: BigInt(element.mandate.destinationChainId),
|
|
87
|
+
fillExpiry: BigInt(element.mandate.fillDeadline),
|
|
88
|
+
claimProofer: claimProofer,
|
|
89
|
+
},
|
|
90
|
+
originOps: element.mandate.preClaimOps.map((op) => ({
|
|
91
|
+
to: op.to,
|
|
92
|
+
value: BigInt(op.value),
|
|
93
|
+
data: op.data,
|
|
94
|
+
})),
|
|
95
|
+
destOps: element.mandate.destinationOps.map((op) => ({
|
|
96
|
+
to: op.to,
|
|
97
|
+
value: BigInt(op.value),
|
|
98
|
+
data: op.data,
|
|
99
|
+
})),
|
|
100
|
+
q: (0, viem_1.keccak256)(element.mandate.qualifier?.encodedVal ?? '0x'),
|
|
101
|
+
},
|
|
102
|
+
})),
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function convertBigIntFields(obj) {
|
|
107
|
+
if (obj === null || obj === undefined) {
|
|
108
|
+
return obj;
|
|
109
|
+
}
|
|
110
|
+
if (typeof obj === 'bigint') {
|
|
111
|
+
return obj.toString();
|
|
112
|
+
}
|
|
113
|
+
if (Array.isArray(obj)) {
|
|
114
|
+
return obj.map(convertBigIntFields);
|
|
115
|
+
}
|
|
116
|
+
if (typeof obj === 'object') {
|
|
117
|
+
const result = {};
|
|
118
|
+
for (const key in obj) {
|
|
119
|
+
if (Object.hasOwn(obj, key)) {
|
|
120
|
+
result[key] = convertBigIntFields(obj[key]);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
125
|
+
return obj;
|
|
126
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Account, Address, Chain, Hex } from 'viem';
|
|
2
2
|
import type { WebAuthnAccount } from 'viem/account-abstraction';
|
|
3
|
-
import { EnableSessionData } from './modules/validators/smart-sessions';
|
|
4
|
-
type AccountType = 'safe' | 'nexus' | 'kernel';
|
|
3
|
+
import type { EnableSessionData } from './modules/validators/smart-sessions';
|
|
4
|
+
type AccountType = 'safe' | 'nexus' | 'kernel' | 'startale';
|
|
5
5
|
interface AccountProviderConfig {
|
|
6
6
|
type: AccountType;
|
|
7
7
|
}
|
|
@@ -15,15 +15,24 @@ interface WebauthnValidatorConfig {
|
|
|
15
15
|
account: WebAuthnAccount;
|
|
16
16
|
credentialIds: Hex[];
|
|
17
17
|
}
|
|
18
|
+
interface MultiFactorValidatorConfig {
|
|
19
|
+
type: 'multi-factor';
|
|
20
|
+
validators: (OwnableValidatorConfig | WebauthnValidatorConfig)[];
|
|
21
|
+
threshold?: number;
|
|
22
|
+
}
|
|
23
|
+
interface ProviderConfig {
|
|
24
|
+
type: 'alchemy';
|
|
25
|
+
apiKey: string;
|
|
26
|
+
}
|
|
18
27
|
interface BundlerConfig {
|
|
19
|
-
type: 'pimlico';
|
|
28
|
+
type: 'pimlico' | 'biconomy';
|
|
20
29
|
apiKey: string;
|
|
21
30
|
}
|
|
22
31
|
interface PaymasterConfig {
|
|
23
|
-
type: 'pimlico';
|
|
32
|
+
type: 'pimlico' | 'biconomy';
|
|
24
33
|
apiKey: string;
|
|
25
34
|
}
|
|
26
|
-
type OwnerSet = OwnableValidatorConfig | WebauthnValidatorConfig;
|
|
35
|
+
type OwnerSet = OwnableValidatorConfig | WebauthnValidatorConfig | MultiFactorValidatorConfig;
|
|
27
36
|
interface SudoPolicy {
|
|
28
37
|
type: 'sudo';
|
|
29
38
|
}
|
|
@@ -80,28 +89,26 @@ interface RhinestoneAccountConfig {
|
|
|
80
89
|
account?: AccountProviderConfig;
|
|
81
90
|
owners: OwnerSet;
|
|
82
91
|
rhinestoneApiKey: string;
|
|
83
|
-
deployerAccount?: Account;
|
|
84
92
|
sessions?: Session[];
|
|
85
93
|
recovery?: Recovery;
|
|
86
94
|
eoa?: Account;
|
|
87
|
-
provider?:
|
|
88
|
-
type: 'alchemy';
|
|
89
|
-
apiKey: string;
|
|
90
|
-
};
|
|
95
|
+
provider?: ProviderConfig;
|
|
91
96
|
bundler?: BundlerConfig;
|
|
92
97
|
paymaster?: PaymasterConfig;
|
|
93
98
|
}
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
type TokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT';
|
|
100
|
+
interface CallInput {
|
|
101
|
+
to: Address | TokenSymbol;
|
|
96
102
|
data?: Hex;
|
|
97
103
|
value?: bigint;
|
|
98
104
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
interface Call {
|
|
106
|
+
to: Address;
|
|
107
|
+
data: Hex;
|
|
108
|
+
value: bigint;
|
|
109
|
+
}
|
|
103
110
|
interface TokenRequest {
|
|
104
|
-
address: Address;
|
|
111
|
+
address: Address | TokenSymbol;
|
|
105
112
|
amount: bigint;
|
|
106
113
|
}
|
|
107
114
|
type OwnerSignerSet = {
|
|
@@ -112,6 +119,18 @@ type OwnerSignerSet = {
|
|
|
112
119
|
type: 'owner';
|
|
113
120
|
kind: 'passkey';
|
|
114
121
|
account: WebAuthnAccount;
|
|
122
|
+
} | {
|
|
123
|
+
type: 'owner';
|
|
124
|
+
kind: 'multi-factor';
|
|
125
|
+
validators: ({
|
|
126
|
+
type: 'ecdsa';
|
|
127
|
+
id: number | Hex;
|
|
128
|
+
accounts: Account[];
|
|
129
|
+
} | {
|
|
130
|
+
type: 'passkey';
|
|
131
|
+
id: number | Hex;
|
|
132
|
+
account: WebAuthnAccount;
|
|
133
|
+
})[];
|
|
115
134
|
};
|
|
116
135
|
interface SessionSignerSet {
|
|
117
136
|
type: 'session';
|
|
@@ -124,18 +143,20 @@ interface GuardiansSignerSet {
|
|
|
124
143
|
}
|
|
125
144
|
type SignerSet = OwnerSignerSet | SessionSignerSet | GuardiansSignerSet;
|
|
126
145
|
interface BaseTransaction {
|
|
127
|
-
calls:
|
|
128
|
-
tokenRequests
|
|
146
|
+
calls: CallInput[];
|
|
147
|
+
tokenRequests?: TokenRequest[];
|
|
129
148
|
gasLimit?: bigint;
|
|
130
149
|
signers?: SignerSet;
|
|
150
|
+
sponsored?: boolean;
|
|
151
|
+
eip7702InitSignature?: Hex;
|
|
131
152
|
}
|
|
132
153
|
interface SameChainTransaction extends BaseTransaction {
|
|
133
154
|
chain: Chain;
|
|
134
155
|
}
|
|
135
156
|
interface CrossChainTransaction extends BaseTransaction {
|
|
136
|
-
|
|
157
|
+
sourceChains?: Chain[];
|
|
137
158
|
targetChain: Chain;
|
|
138
159
|
}
|
|
139
160
|
type Transaction = SameChainTransaction | CrossChainTransaction;
|
|
140
|
-
export type { AccountType, RhinestoneAccountConfig, AccountProviderConfig, BundlerConfig, PaymasterConfig, Transaction,
|
|
161
|
+
export type { AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, Session, Recovery, Policy, UniversalActionPolicyParamCondition, };
|
|
141
162
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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;AAE5E,KAAK,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE3D,UAAU,qBAAqB;IAC7B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,eAAe,CAAA;IACxB,aAAa,EAAE,GAAG,EAAE,CAAA;CACrB;AAED,UAAU,0BAA0B;IAClC,IAAI,EAAE,cAAc,CAAA;IACpB,UAAU,EAAE,CAAC,sBAAsB,GAAG,uBAAuB,CAAC,EAAE,CAAA;IAChE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;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BAAqB,SAAQ,eAAe;IACpD,KAAK,EAAE,KAAK,CAAA;CACb;AAED,UAAU,qBAAsB,SAAQ,eAAe;IACrD,YAAY,CAAC,EAAE,KAAK,EAAE,CAAA;IACtB,WAAW,EAAE,KAAK,CAAA;CACnB;AAED,KAAK,WAAW,GAAG,oBAAoB,GAAG,qBAAqB,CAAA;AAE/D,YAAY,EACV,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,GACpC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type WebAuthnAccount } from 'viem/account-abstraction';
|
|
2
|
+
import { type Account } from 'viem/accounts';
|
|
3
|
+
declare const accountA: Account;
|
|
4
|
+
declare const accountB: Account;
|
|
5
|
+
declare const accountC: Account;
|
|
6
|
+
declare const accountD: Account;
|
|
7
|
+
declare const passkeyAccount: WebAuthnAccount;
|
|
8
|
+
declare const MOCK_API_KEY = "MOCK_KEY";
|
|
9
|
+
export { accountA, accountB, accountC, accountD, passkeyAccount, MOCK_API_KEY };
|
|
10
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../test/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,KAAK,OAAO,EAAuB,MAAM,eAAe,CAAA;AAEjE,QAAA,MAAM,QAAQ,EAAE,OAEf,CAAA;AACD,QAAA,MAAM,QAAQ,EAAE,OAEf,CAAA;AACD,QAAA,MAAM,QAAQ,EAAE,OAEf,CAAA;AACD,QAAA,MAAM,QAAQ,EAAE,OAEf,CAAA;AACD,QAAA,MAAM,cAAc,EAAE,eAMpB,CAAA;AAEF,QAAA,MAAM,YAAY,aAAa,CAAA;AAE/B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MOCK_API_KEY = exports.passkeyAccount = exports.accountD = exports.accountC = exports.accountB = exports.accountA = void 0;
|
|
4
|
+
const account_abstraction_1 = require("viem/account-abstraction");
|
|
5
|
+
const accounts_1 = require("viem/accounts");
|
|
6
|
+
const accountA = (0, accounts_1.privateKeyToAccount)('0x2be89d993f98bbaab8b83f1a2830cb9414e19662967c7ba2a0f43d2a9125bd6d');
|
|
7
|
+
exports.accountA = accountA;
|
|
8
|
+
const accountB = (0, accounts_1.privateKeyToAccount)('0x39e2fec1a04c088f939d81de8f1abebdebf899a6cfb9968f9b663a7afba8301b');
|
|
9
|
+
exports.accountB = accountB;
|
|
10
|
+
const accountC = (0, accounts_1.privateKeyToAccount)('0xb63c74af219a3949cf95f5e3a3d20b0137425de053bb03e5cc0f46fe0d19f22f');
|
|
11
|
+
exports.accountC = accountC;
|
|
12
|
+
const accountD = (0, accounts_1.privateKeyToAccount)('0xa4aba81871b7b51fff56bfe441ea7f9a4879dd4bc8ce8c15fdb06dc92e63d1d7');
|
|
13
|
+
exports.accountD = accountD;
|
|
14
|
+
const passkeyAccount = (0, account_abstraction_1.toWebAuthnAccount)({
|
|
15
|
+
credential: {
|
|
16
|
+
id: '9IwX9n6cn-l9SzqFzfQXvDHRuTM',
|
|
17
|
+
publicKey: '0x580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d1',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
exports.passkeyAccount = passkeyAccount;
|
|
21
|
+
const MOCK_API_KEY = 'MOCK_KEY';
|
|
22
|
+
exports.MOCK_API_KEY = MOCK_API_KEY;
|