@provablehq/aleo-bridge-sdk 0.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/LICENSE +21 -0
- package/README.md +390 -0
- package/dist/agent/index.d.ts +23 -0
- package/dist/agent/index.js +7 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/chunk-NTWXJE7R.js +93 -0
- package/dist/chunk-NTWXJE7R.js.map +1 -0
- package/dist/chunk-OU6GVGG7.js +606 -0
- package/dist/chunk-OU6GVGG7.js.map +1 -0
- package/dist/createBridgeClient-DzmEyXfG.d.ts +1058 -0
- package/dist/index.d.ts +739 -0
- package/dist/index.js +3882 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +28 -0
- package/dist/mcp/index.js +13 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/solana/index.d.ts +113 -0
- package/dist/solana/index.js +15 -0
- package/dist/solana/index.js.map +1 -0
- package/dist/solana-D5Qr6SLa.d.ts +725 -0
- package/package.json +74 -0
|
@@ -0,0 +1,725 @@
|
|
|
1
|
+
/** Identifies the protocol that carries a bridge transfer. */
|
|
2
|
+
type BridgeProtocol = 'xreserve' | 'hyperlane';
|
|
3
|
+
/** Identifies the deployment environment selected by a bridge client. */
|
|
4
|
+
type BridgeEnvironment = 'mainnet' | 'testnet';
|
|
5
|
+
/** Identifies the transaction model used by a chain. */
|
|
6
|
+
type BridgeChainFamily = 'aleo' | 'evm' | 'solana';
|
|
7
|
+
/**
|
|
8
|
+
* Describes a chain known to the protocol bridge registry.
|
|
9
|
+
*
|
|
10
|
+
* @property id Stable SDK identifier used by assets and routes.
|
|
11
|
+
* @property displayName Human-readable chain name.
|
|
12
|
+
* @property family Transaction model used to prepare transfer steps.
|
|
13
|
+
* @property environment Deployment environment containing the chain.
|
|
14
|
+
* @property nativeCurrencySymbol Symbol used to pay transaction fees.
|
|
15
|
+
* @property protocolDomains Protocol-specific domain identifiers when known.
|
|
16
|
+
*/
|
|
17
|
+
type ProtocolBridgeChain = {
|
|
18
|
+
id: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
family: BridgeChainFamily;
|
|
21
|
+
environment: BridgeEnvironment;
|
|
22
|
+
nativeCurrencySymbol: string;
|
|
23
|
+
protocolDomains?: Partial<Record<BridgeProtocol, string | number>> | undefined;
|
|
24
|
+
};
|
|
25
|
+
/** Identifies how an asset exists on its chain. */
|
|
26
|
+
type BridgeAssetKind = 'native' | 'token';
|
|
27
|
+
/**
|
|
28
|
+
* Locates a token on its chain.
|
|
29
|
+
*
|
|
30
|
+
* @property kind Namespace containing the identifier.
|
|
31
|
+
* @property value Contract, program, mint, or native-denom identifier.
|
|
32
|
+
* @property tokenId Optional token identifier within a shared token program.
|
|
33
|
+
*/
|
|
34
|
+
type BridgeAssetLocator = {
|
|
35
|
+
kind: 'aleo-program' | 'evm-contract' | 'solana-mint' | 'native';
|
|
36
|
+
value: string;
|
|
37
|
+
tokenId?: string | undefined;
|
|
38
|
+
};
|
|
39
|
+
/** Identifies the Aleo transition family used to convert an asset between public and private state. */
|
|
40
|
+
type AleoPrivacyKind = 'arc20' | 'arc22';
|
|
41
|
+
/**
|
|
42
|
+
* Describes how an Aleo asset converts between public balances and private records.
|
|
43
|
+
*
|
|
44
|
+
* @property kind ABI family that determines the transition names and input order.
|
|
45
|
+
* @property program Program containing the public balance and private `Token` record.
|
|
46
|
+
*/
|
|
47
|
+
type AleoPrivacyCapability = {
|
|
48
|
+
kind: AleoPrivacyKind;
|
|
49
|
+
program: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Describes one chain-specific representation of a bridgeable asset.
|
|
53
|
+
*
|
|
54
|
+
* @property id Stable registry identifier, scoped to one chain.
|
|
55
|
+
* @property key Stable caller-facing asset identifier within the chain.
|
|
56
|
+
* @property chainId Chain carrying this representation.
|
|
57
|
+
* @property symbol Display symbol.
|
|
58
|
+
* @property name Human-readable asset name.
|
|
59
|
+
* @property decimals Number of decimal places accepted in display amounts.
|
|
60
|
+
* @property kind Whether the representation is native currency or a token.
|
|
61
|
+
* @property locator Onchain identifier when the deployment is known.
|
|
62
|
+
* @property addressValidationRegex Optional recipient validation expression.
|
|
63
|
+
* @property privacy Optional Aleo public/private conversion capability.
|
|
64
|
+
*/
|
|
65
|
+
type ProtocolBridgeAsset = {
|
|
66
|
+
id: string;
|
|
67
|
+
key: string;
|
|
68
|
+
chainId: string;
|
|
69
|
+
symbol: string;
|
|
70
|
+
name: string;
|
|
71
|
+
decimals: number;
|
|
72
|
+
kind: BridgeAssetKind;
|
|
73
|
+
locator?: BridgeAssetLocator | undefined;
|
|
74
|
+
addressValidationRegex?: string | undefined;
|
|
75
|
+
privacy?: AleoPrivacyCapability | undefined;
|
|
76
|
+
};
|
|
77
|
+
/** Reports whether a route has enough reviewed metadata for execution. */
|
|
78
|
+
type BridgeRouteAvailability = 'active' | 'metadata-required' | 'disabled';
|
|
79
|
+
/**
|
|
80
|
+
* Describes one directional protocol route.
|
|
81
|
+
*
|
|
82
|
+
* @property id Stable route identifier.
|
|
83
|
+
* @property protocol Protocol responsible for delivery.
|
|
84
|
+
* @property environment Deployment environment containing both endpoints.
|
|
85
|
+
* @property sourceAssetId Registry id of the debited asset.
|
|
86
|
+
* @property destinationAssetId Registry id of the delivered asset.
|
|
87
|
+
* @property availability Readiness for transaction execution.
|
|
88
|
+
* @property deploymentId Upstream protocol deployment identifier when known.
|
|
89
|
+
* @property source Reference used to audit the route metadata.
|
|
90
|
+
* @property metadata Protocol-specific non-secret configuration.
|
|
91
|
+
*/
|
|
92
|
+
type ProtocolBridgeRoute = {
|
|
93
|
+
id: string;
|
|
94
|
+
protocol: BridgeProtocol;
|
|
95
|
+
environment: BridgeEnvironment;
|
|
96
|
+
sourceAssetId: string;
|
|
97
|
+
destinationAssetId: string;
|
|
98
|
+
availability: BridgeRouteAvailability;
|
|
99
|
+
deploymentId?: string | undefined;
|
|
100
|
+
source?: string | undefined;
|
|
101
|
+
metadata?: Readonly<Record<string, string | number | boolean>> | undefined;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Selects chain-specific assets from a bridge registry.
|
|
105
|
+
*
|
|
106
|
+
* @property environment Optional mainnet or testnet filter. Defaults to both environments.
|
|
107
|
+
* @property chainId Optional registry chain identifier filter. Defaults to all chains.
|
|
108
|
+
* @property symbol Optional case-insensitive token symbol filter. Defaults to all symbols.
|
|
109
|
+
*/
|
|
110
|
+
type GetAssetsParameters = {
|
|
111
|
+
environment?: BridgeEnvironment | undefined;
|
|
112
|
+
chainId?: string | undefined;
|
|
113
|
+
symbol?: string | undefined;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Selects directional routes from a bridge registry.
|
|
117
|
+
*
|
|
118
|
+
* @property environment Optional mainnet or testnet filter. Defaults to both environments.
|
|
119
|
+
* @property protocol Optional bridge provider filter. Defaults to all providers.
|
|
120
|
+
* @property sourceChainId Optional source registry chain identifier. Defaults to all source chains.
|
|
121
|
+
* @property destinationChainId Optional destination registry chain identifier. Defaults to all destination chains.
|
|
122
|
+
* @property symbol Optional case-insensitive source or destination token symbol. Defaults to all symbols.
|
|
123
|
+
* @property includeUnavailable Includes disabled routes when true. Defaults to false; routes awaiting metadata remain visible.
|
|
124
|
+
*/
|
|
125
|
+
type GetRoutesParameters = {
|
|
126
|
+
environment?: BridgeEnvironment | undefined;
|
|
127
|
+
protocol?: BridgeProtocol | undefined;
|
|
128
|
+
sourceChainId?: string | undefined;
|
|
129
|
+
destinationChainId?: string | undefined;
|
|
130
|
+
symbol?: string | undefined;
|
|
131
|
+
includeUnavailable?: boolean | undefined;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Stores reviewed bridge chains, assets, and directional routes.
|
|
135
|
+
*
|
|
136
|
+
* @property version Caller-visible version used to pin and audit configuration.
|
|
137
|
+
* @property chains Chain metadata referenced by assets.
|
|
138
|
+
* @property assets Chain-specific assets referenced by routes.
|
|
139
|
+
* @property routes Directional protocol routes.
|
|
140
|
+
* @property sources Upstream registries and documentation used to build the snapshot.
|
|
141
|
+
* @property getAssets Lists matching chain-specific assets without contacting a chain or wallet.
|
|
142
|
+
* @property getRoutes Lists matching directional routes without contacting a chain or wallet.
|
|
143
|
+
*/
|
|
144
|
+
type BridgeRegistry = {
|
|
145
|
+
version: string;
|
|
146
|
+
chains: readonly ProtocolBridgeChain[];
|
|
147
|
+
assets: readonly ProtocolBridgeAsset[];
|
|
148
|
+
routes: readonly ProtocolBridgeRoute[];
|
|
149
|
+
sources?: readonly string[] | undefined;
|
|
150
|
+
getAssets: (params?: GetAssetsParameters) => ProtocolBridgeAsset[];
|
|
151
|
+
getRoutes: (params?: GetRoutesParameters) => ProtocolBridgeRoute[];
|
|
152
|
+
};
|
|
153
|
+
/** Identifies the signer or service responsible for a transfer step. */
|
|
154
|
+
type BridgeStepExecutor = 'aleo-wallet' | 'evm-wallet' | 'solana-wallet' | 'protocol';
|
|
155
|
+
/** Identifies a resumable operation in a protocol transfer. */
|
|
156
|
+
type BridgeExecutionStepKind = 'approve' | 'deposit' | 'burn' | 'dispatch' | 'wait-attestation' | 'mint' | 'withdraw' | 'wait-delivery' | 'confirm-delivery';
|
|
157
|
+
/**
|
|
158
|
+
* Describes one stage required to move an asset between two chains.
|
|
159
|
+
*
|
|
160
|
+
* @property key Stable step key within the plan.
|
|
161
|
+
* @property kind Operation the executor performs.
|
|
162
|
+
* @property chainId Chain on which the operation occurs, when applicable.
|
|
163
|
+
* @property executor Wallet or protocol service responsible for the operation.
|
|
164
|
+
* @property description Human-readable consequence of the step.
|
|
165
|
+
* @property irreversible Whether submitting the step commits funds to the protocol flow.
|
|
166
|
+
*/
|
|
167
|
+
type BridgeExecutionStep = {
|
|
168
|
+
key: string;
|
|
169
|
+
kind: BridgeExecutionStepKind;
|
|
170
|
+
chainId?: string | undefined;
|
|
171
|
+
executor: BridgeStepExecutor;
|
|
172
|
+
description: string;
|
|
173
|
+
irreversible: boolean;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Describes a fee associated with a transfer plan.
|
|
177
|
+
*
|
|
178
|
+
* @property kind Fee category.
|
|
179
|
+
* @property chainId Chain charging the fee.
|
|
180
|
+
* @property assetId Asset used to pay the fee when known.
|
|
181
|
+
* @property amount Decimal fee amount when available.
|
|
182
|
+
* @property estimated Whether the amount can change before submission.
|
|
183
|
+
*/
|
|
184
|
+
type BridgeFee = {
|
|
185
|
+
kind: 'network' | 'protocol' | 'relayer';
|
|
186
|
+
chainId: string;
|
|
187
|
+
assetId?: string | undefined;
|
|
188
|
+
amount?: string | undefined;
|
|
189
|
+
estimated: boolean;
|
|
190
|
+
};
|
|
191
|
+
/** Selects the Aleo destination transition used for an xReserve mint. */
|
|
192
|
+
type AleoMintMode = 'public' | 'record' | 'private';
|
|
193
|
+
/**
|
|
194
|
+
* Selects one chain-specific bridge asset without exposing registry route ids.
|
|
195
|
+
*
|
|
196
|
+
* @property chain Stable registry chain identifier.
|
|
197
|
+
* @property asset Stable asset key within the selected chain.
|
|
198
|
+
*/
|
|
199
|
+
type BridgeEndpoint = {
|
|
200
|
+
chain: string;
|
|
201
|
+
asset: string;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Parameters for preparing a protocol bridge transfer.
|
|
205
|
+
*
|
|
206
|
+
* @property source Chain and asset debited by the transfer.
|
|
207
|
+
* @property destination Chain and asset delivered by the transfer.
|
|
208
|
+
* @property bridgeProtocol Optional protocol constraint. Omit when exactly one route matches the endpoints.
|
|
209
|
+
* @property amount Decimal source amount in display units.
|
|
210
|
+
* @property recipient Destination-chain recipient.
|
|
211
|
+
* @property sender Optional source-chain sender used by future fee and approval planning.
|
|
212
|
+
* @property mintMode Aleo mint transition selected for xReserve delivery. Defaults to `public`.
|
|
213
|
+
* @property privateRecipient Deprecated alias for `mintMode: 'private'`. Defaults to false.
|
|
214
|
+
*/
|
|
215
|
+
type PrepareParameters = {
|
|
216
|
+
source: BridgeEndpoint;
|
|
217
|
+
destination: BridgeEndpoint;
|
|
218
|
+
bridgeProtocol?: BridgeProtocol | undefined;
|
|
219
|
+
amount: string;
|
|
220
|
+
recipient: string;
|
|
221
|
+
sender?: string | undefined;
|
|
222
|
+
mintMode?: AleoMintMode | undefined;
|
|
223
|
+
/** @deprecated Use `mintMode: 'private'`; retained for compatibility through the next major release. */
|
|
224
|
+
privateRecipient?: boolean | undefined;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Records the route, assets, amount, recipient, and stages of a cross-chain transfer.
|
|
228
|
+
*
|
|
229
|
+
* This information can be quoted before any wallet authorization is requested
|
|
230
|
+
* or funds move.
|
|
231
|
+
*
|
|
232
|
+
* @property registryVersion Registry snapshot used to build the plan.
|
|
233
|
+
* @property protocol Protocol responsible for delivery.
|
|
234
|
+
* @property route Directional route selected by the caller.
|
|
235
|
+
* @property sourceAsset Asset debited by the source transaction.
|
|
236
|
+
* @property destinationAsset Asset delivered on the destination chain.
|
|
237
|
+
* @property amountIn Decimal source amount.
|
|
238
|
+
* @property amountOut Expected decimal destination amount when determinable without a live fee query.
|
|
239
|
+
* @property recipient Destination-chain recipient.
|
|
240
|
+
* @property sender Optional source-chain sender.
|
|
241
|
+
* @property mintMode Aleo destination transition selected by the caller.
|
|
242
|
+
* @property privateRecipient Whether the destination requests private Aleo delivery.
|
|
243
|
+
* @property fees Known fee categories; amounts remain absent until protocol quoting is implemented.
|
|
244
|
+
* @property steps Ordered operations required to complete the transfer.
|
|
245
|
+
*/
|
|
246
|
+
type BridgePlan = {
|
|
247
|
+
registryVersion: string;
|
|
248
|
+
protocol: BridgeProtocol;
|
|
249
|
+
route: ProtocolBridgeRoute;
|
|
250
|
+
sourceAsset: ProtocolBridgeAsset;
|
|
251
|
+
destinationAsset: ProtocolBridgeAsset;
|
|
252
|
+
amountIn: string;
|
|
253
|
+
amountOut?: string | undefined;
|
|
254
|
+
recipient: string;
|
|
255
|
+
sender?: string | undefined;
|
|
256
|
+
mintMode: AleoMintMode;
|
|
257
|
+
privateRecipient: boolean;
|
|
258
|
+
fees: BridgeFee[];
|
|
259
|
+
steps: BridgeExecutionStep[];
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Records the public inputs needed to reconstruct a cross-chain transfer.
|
|
263
|
+
*
|
|
264
|
+
* Private keys, records, proofs, and private-mint nonces are deliberately
|
|
265
|
+
* excluded so this value can be stored with transaction identifiers.
|
|
266
|
+
*
|
|
267
|
+
* @property source Chain and asset debited by the transfer.
|
|
268
|
+
* @property destination Chain and asset delivered by the transfer.
|
|
269
|
+
* @property bridgeProtocol Resolved protocol selected during preparation.
|
|
270
|
+
* @property amount Decimal source amount in display units.
|
|
271
|
+
* @property recipient Destination-chain recipient.
|
|
272
|
+
* @property sender Source-chain sender when the plan or executing wallet resolved one.
|
|
273
|
+
* @property mintMode Aleo destination transition selected by the caller.
|
|
274
|
+
*/
|
|
275
|
+
type BridgeIntent = {
|
|
276
|
+
source: BridgeEndpoint;
|
|
277
|
+
destination: BridgeEndpoint;
|
|
278
|
+
bridgeProtocol: BridgeProtocol;
|
|
279
|
+
amount: string;
|
|
280
|
+
recipient: string;
|
|
281
|
+
sender?: string | undefined;
|
|
282
|
+
mintMode?: AleoMintMode | undefined;
|
|
283
|
+
};
|
|
284
|
+
/** Identifies the normalized lifecycle state of a protocol transfer. */
|
|
285
|
+
type BridgeStatus = 'PREPARED' | 'SOURCE_APPROVAL_PENDING' | 'SOURCE_SUBMISSION_PENDING' | 'SOURCE_CONFIRMING' | 'ATTESTATION_PENDING' | 'DESTINATION_ACTION_REQUIRED' | 'DELIVERY_PENDING' | 'DESTINATION_CONFIRMING' | 'COMPLETED' | 'FAILED' | 'EXPIRED';
|
|
286
|
+
/**
|
|
287
|
+
* Describes the next caller-authorized bridge operation.
|
|
288
|
+
*
|
|
289
|
+
* @property kind Protocol operation ready for wallet submission.
|
|
290
|
+
* @property chainId Registry chain on which the wallet will submit it.
|
|
291
|
+
*/
|
|
292
|
+
type BridgeNextAction = {
|
|
293
|
+
kind: 'xreserve-private-mint';
|
|
294
|
+
chainId: string;
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Captures protocol-neutral transfer progress and protocol-native state.
|
|
298
|
+
*
|
|
299
|
+
* @property id Stable transfer or message identifier.
|
|
300
|
+
* @property protocol Protocol responsible for delivery.
|
|
301
|
+
* @property status Normalized lifecycle state.
|
|
302
|
+
* @property sourceTxId Source-chain transaction identifier when submitted.
|
|
303
|
+
* @property destinationTxId Destination-chain transaction identifier when submitted.
|
|
304
|
+
* @property messageId Hyperlane message identifier when applicable.
|
|
305
|
+
* @property nextAction Caller-authorized operation available at the current status.
|
|
306
|
+
* @property protocolState Protocol-native progress fields retained for diagnostics and resumption.
|
|
307
|
+
*/
|
|
308
|
+
type BridgeReceipt = {
|
|
309
|
+
id: string;
|
|
310
|
+
protocol: BridgeProtocol;
|
|
311
|
+
status: BridgeStatus;
|
|
312
|
+
sourceTxId?: string | undefined;
|
|
313
|
+
destinationTxId?: string | undefined;
|
|
314
|
+
messageId?: string | undefined;
|
|
315
|
+
nextAction?: BridgeNextAction | undefined;
|
|
316
|
+
protocolState: Readonly<Record<string, unknown>>;
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* Records prepared or submitted transaction data needed to recover a bridge transfer.
|
|
320
|
+
*
|
|
321
|
+
* The checkpoint excludes expanded registry objects, secrets, and protocol
|
|
322
|
+
* response bodies, except serialized Aleo transactions that become public on
|
|
323
|
+
* broadcast. The caller stores it only for interrupted-process recovery.
|
|
324
|
+
*
|
|
325
|
+
* @property version Serialization format version, currently `1`.
|
|
326
|
+
* @property intent Public inputs used to reconstruct the runtime plan.
|
|
327
|
+
* @property route Canonical route and registry version that bound execution.
|
|
328
|
+
* @property source Prepared or submitted source transactions.
|
|
329
|
+
* @property source.approvalTransactionIds Source token approval transaction identifiers in submission order.
|
|
330
|
+
* @property source.transactionId Irreversible source transfer transaction when submitted.
|
|
331
|
+
* @property source.preparedTransaction Fully proved Aleo transaction retained before broadcast for idempotent recovery.
|
|
332
|
+
* @property source.hookData Public xReserve hook committed by a submitted approval sequence.
|
|
333
|
+
* @property source.blockhash Solana blockhash that bounded the submitted source transaction.
|
|
334
|
+
* @property source.lastValidBlockHeight Final Solana block height at which the source transaction can land.
|
|
335
|
+
* @property destination Caller-authorized destination transaction when submitted.
|
|
336
|
+
* @property destination.transactionId Destination-chain transaction identifier.
|
|
337
|
+
* @property destination.preparedTransaction Fully proved Aleo destination transaction retained before broadcast for idempotent recovery.
|
|
338
|
+
* @property deliveryVerification Destination balance snapshot used when the protocol explorer does not index Aleo origins.
|
|
339
|
+
*/
|
|
340
|
+
type BridgeCheckpoint = {
|
|
341
|
+
version: 1;
|
|
342
|
+
intent: BridgeIntent;
|
|
343
|
+
route: {
|
|
344
|
+
id: string;
|
|
345
|
+
registryVersion: string;
|
|
346
|
+
};
|
|
347
|
+
source?: {
|
|
348
|
+
approvalTransactionIds?: readonly string[] | undefined;
|
|
349
|
+
transactionId?: string | undefined;
|
|
350
|
+
hookData?: string | undefined;
|
|
351
|
+
blockhash?: string | undefined;
|
|
352
|
+
lastValidBlockHeight?: string | undefined;
|
|
353
|
+
preparedTransaction?: {
|
|
354
|
+
transactionId: string;
|
|
355
|
+
serializedTransaction: string;
|
|
356
|
+
} | undefined;
|
|
357
|
+
} | undefined;
|
|
358
|
+
destination?: {
|
|
359
|
+
transactionId?: string | undefined;
|
|
360
|
+
preparedTransaction?: {
|
|
361
|
+
transactionId: string;
|
|
362
|
+
serializedTransaction: string;
|
|
363
|
+
} | undefined;
|
|
364
|
+
} | undefined;
|
|
365
|
+
deliveryVerification?: {
|
|
366
|
+
balanceBeforeAtomic: string;
|
|
367
|
+
expectedIncreaseAtomic: string;
|
|
368
|
+
} | undefined;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* Identifies the operation available after bridge progress is reconstructed.
|
|
372
|
+
*
|
|
373
|
+
* `wait` requires only reads, while `resume` and `complete` mark explicit
|
|
374
|
+
* wallet authorization boundaries.
|
|
375
|
+
*/
|
|
376
|
+
type BridgeProgressNext = 'wait' | 'resume' | 'complete' | 'done' | 'failed';
|
|
377
|
+
type BridgeProgressState = {
|
|
378
|
+
plan: BridgePlan;
|
|
379
|
+
receipt: BridgeReceipt;
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Carries reconstructed runtime state and tells the caller what can happen next.
|
|
383
|
+
*
|
|
384
|
+
* @property next Read-only observation, source resumption, destination completion, or terminal outcome.
|
|
385
|
+
* @property plan Runtime plan rebuilt from the checkpoint's public intent.
|
|
386
|
+
* @property receipt Latest protocol-neutral lifecycle receipt.
|
|
387
|
+
* @property error Failure description when `next` is `failed`.
|
|
388
|
+
*/
|
|
389
|
+
type BridgeProgress = (BridgeProgressState & {
|
|
390
|
+
next: 'wait';
|
|
391
|
+
}) | (BridgeProgressState & {
|
|
392
|
+
next: 'resume';
|
|
393
|
+
}) | (BridgeProgressState & {
|
|
394
|
+
next: 'complete';
|
|
395
|
+
}) | (BridgeProgressState & {
|
|
396
|
+
next: 'done';
|
|
397
|
+
}) | (BridgeProgressState & {
|
|
398
|
+
next: 'failed';
|
|
399
|
+
error: string;
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Sends a Solana JSON-RPC POST request without coupling the bridge client to a runtime global.
|
|
404
|
+
*
|
|
405
|
+
* Matches the subset of the Fetch API needed for JSON-RPC calls, so
|
|
406
|
+
* `globalThis.fetch` satisfies this type without an adapter.
|
|
407
|
+
*/
|
|
408
|
+
type SolanaRpcHttpTransport = (url: string, init: {
|
|
409
|
+
method: 'POST';
|
|
410
|
+
headers: Record<string, string>;
|
|
411
|
+
body: string;
|
|
412
|
+
cache?: 'no-store' | undefined;
|
|
413
|
+
}) => Promise<{
|
|
414
|
+
ok: boolean;
|
|
415
|
+
status: number;
|
|
416
|
+
json: () => Promise<unknown>;
|
|
417
|
+
}>;
|
|
418
|
+
/**
|
|
419
|
+
* Configures the Solana JSON-RPC endpoint used for reads such as blockhash and
|
|
420
|
+
* transaction-confirmation lookups.
|
|
421
|
+
*
|
|
422
|
+
* @property url Solana JSON-RPC HTTP endpoint.
|
|
423
|
+
* @property transport Optional fetch-compatible transport used for RPC requests. Defaults to `globalThis.fetch`.
|
|
424
|
+
*/
|
|
425
|
+
type SolanaRpcConfig = {
|
|
426
|
+
url: string;
|
|
427
|
+
transport?: SolanaRpcHttpTransport | undefined;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Captures the reviewed metadata required to dispatch a Solana Hyperlane Warp Route transfer.
|
|
431
|
+
*
|
|
432
|
+
* @property warpProgramAddress Deployed Solana Warp Route program handling the transfer instruction.
|
|
433
|
+
* @property tokenPda Program-derived address holding the route's token configuration.
|
|
434
|
+
* @property nativeCollateralPda Program-derived address holding locked native SOL collateral.
|
|
435
|
+
* @property dispatchAuthorityPda Program-derived address authorizing Mailbox dispatch on behalf of the Warp Route.
|
|
436
|
+
* @property mailboxProgramAddress Solana Hyperlane Mailbox program used by the reviewed deployment.
|
|
437
|
+
* @property mailboxOutboxPda Program-derived address holding the Mailbox's outbox state.
|
|
438
|
+
* @property igpProgramAddress Solana interchain gas paymaster program used by the reviewed deployment.
|
|
439
|
+
* @property igpProgramDataPda Program-derived address holding the gas paymaster's program data.
|
|
440
|
+
* @property igpAccount Terminal gas-oracle account actually debited for destination delivery; read
|
|
441
|
+
* directly off the token's configuration when the route points at a plain IGP, or off the configured
|
|
442
|
+
* `igpOverheadAccount`'s own `inner` field when the route wraps its IGP in an `OverheadIgp`.
|
|
443
|
+
* @property igpOverheadAccount Optional `OverheadIgp` wrapper account configured as the token's gas
|
|
444
|
+
* paymaster. Present only when the reviewed deployment wraps its IGP in an `OverheadIgp` layer;
|
|
445
|
+
* `buildTransferRemoteInstruction` appends it ahead of `igpAccount` when set, and omits it otherwise.
|
|
446
|
+
* @property splNoopProgramAddress SPL no-op program used to emit Hyperlane message logs.
|
|
447
|
+
* @property destinationDomain Hyperlane domain passed to the transfer instruction.
|
|
448
|
+
* @property destinationGasAmount Destination gas amount quoted for delivery, as a base-10 string.
|
|
449
|
+
* @property registryCommit Hyperlane Registry commit containing the deployment snapshot.
|
|
450
|
+
* @property solanaReviewedAt ISO 8601 timestamp of the last manual review of this deployment.
|
|
451
|
+
* @property solanaConfigSource Identifies where the reviewed configuration values were sourced from.
|
|
452
|
+
*/
|
|
453
|
+
type SolanaHyperlaneRouteMetadata = {
|
|
454
|
+
warpProgramAddress: string;
|
|
455
|
+
tokenPda: string;
|
|
456
|
+
nativeCollateralPda: string;
|
|
457
|
+
dispatchAuthorityPda: string;
|
|
458
|
+
mailboxProgramAddress: string;
|
|
459
|
+
mailboxOutboxPda: string;
|
|
460
|
+
igpProgramAddress: string;
|
|
461
|
+
igpProgramDataPda: string;
|
|
462
|
+
igpAccount: string;
|
|
463
|
+
igpOverheadAccount?: string | undefined;
|
|
464
|
+
splNoopProgramAddress: string;
|
|
465
|
+
destinationDomain: number;
|
|
466
|
+
destinationGasAmount: string;
|
|
467
|
+
registryCommit: string;
|
|
468
|
+
solanaReviewedAt: string;
|
|
469
|
+
solanaConfigSource: string;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* Supplies a Solana-to-Aleo Hyperlane transfer for current fee calculation.
|
|
473
|
+
*
|
|
474
|
+
* @property plan Route, amount, and recipient selected for the transfer.
|
|
475
|
+
*/
|
|
476
|
+
type QuoteSolanaHyperlaneTransferParameters = {
|
|
477
|
+
plan: BridgePlan;
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* Captures one live fee quote for a Solana-to-Aleo Hyperlane transfer.
|
|
481
|
+
*
|
|
482
|
+
* All amounts are denominated in lamports.
|
|
483
|
+
*
|
|
484
|
+
* @property routeId Route the quote applies to.
|
|
485
|
+
* @property amountLamports Amount to be transferred, in lamports.
|
|
486
|
+
* @property igpPaymentLamports Interchain gas paymaster payment required for destination delivery, in lamports.
|
|
487
|
+
* @property networkFeeLamports Solana network fee estimated for the transaction, in lamports.
|
|
488
|
+
* @property rentLamports Rent-exempt funding for the gas-payment account, dispatched-message account, and fee payer, in lamports.
|
|
489
|
+
* @property totalLamports Executable balance requirement: amount, gas payment, network fee, and rent, in lamports.
|
|
490
|
+
*/
|
|
491
|
+
type SolanaHyperlaneTransferQuote = {
|
|
492
|
+
routeId: string;
|
|
493
|
+
amountLamports: bigint;
|
|
494
|
+
igpPaymentLamports: bigint;
|
|
495
|
+
networkFeeLamports: bigint;
|
|
496
|
+
rentLamports: bigint;
|
|
497
|
+
totalLamports: bigint;
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* Configures submission of a Solana Hyperlane transfer.
|
|
501
|
+
*
|
|
502
|
+
* The action signs and sends the transaction through the Solana client's
|
|
503
|
+
* wallet client, then polls its public client for confirmation.
|
|
504
|
+
*
|
|
505
|
+
* @property plan Route, amount, and recipient selected for the transfer.
|
|
506
|
+
* @property pollingIntervalMs Delay between confirmation checks. Defaults to 1,000 milliseconds; floored at 100 milliseconds so a small or zero value cannot busy-poll the RPC endpoint.
|
|
507
|
+
* @property confirmationTimeoutMs Maximum time to wait for confirmation. Defaults to 120,000 milliseconds; a timeout returns resumable pending state.
|
|
508
|
+
* @property resume Previously checkpointed receipt. When supplied, the action
|
|
509
|
+
* verifies the existing signature without signing or broadcasting again.
|
|
510
|
+
* @property onSubmitted Durable checkpoint hook called immediately after broadcast
|
|
511
|
+
* and before confirmation polling begins.
|
|
512
|
+
*/
|
|
513
|
+
type ExecuteSolanaHyperlaneTransferParameters = {
|
|
514
|
+
plan: BridgePlan;
|
|
515
|
+
pollingIntervalMs?: number | undefined;
|
|
516
|
+
confirmationTimeoutMs?: number | undefined;
|
|
517
|
+
resume?: BridgeReceipt | undefined;
|
|
518
|
+
onSubmitted?: ((receipt: BridgeReceipt) => void | Promise<void>) | undefined;
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* Captures the resumable Hyperlane progress after a Solana transfer is submitted.
|
|
522
|
+
*
|
|
523
|
+
* @property receipt Protocol-neutral transfer state, including the source signature and message id when confirmed.
|
|
524
|
+
*/
|
|
525
|
+
type SolanaHyperlaneTransferExecution = {
|
|
526
|
+
receipt: BridgeReceipt;
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Confirmation state Solana reports for a submitted transaction signature.
|
|
531
|
+
*
|
|
532
|
+
* `'failed'` is synthesized locally from a non-null `err` field on the
|
|
533
|
+
* `getSignatureStatuses` result; Solana itself only ever reports a
|
|
534
|
+
* `confirmationStatus`, never a failure status.
|
|
535
|
+
*/
|
|
536
|
+
type SolanaSignatureConfirmationStatus = 'processed' | 'confirmed' | 'finalized' | 'failed';
|
|
537
|
+
/**
|
|
538
|
+
* Reads live Solana chain state needed to prepare, submit, and confirm a
|
|
539
|
+
* Hyperlane Warp Route transfer.
|
|
540
|
+
*
|
|
541
|
+
* Every method hits the configured Solana JSON-RPC endpoint over the network;
|
|
542
|
+
* none of them sign or submit a transaction.
|
|
543
|
+
*
|
|
544
|
+
* @property getLatestBlockhash Reads the current blockhash and the block height it remains valid through.
|
|
545
|
+
* @property getBlockHeight Reads the current block height used to detect transaction expiry.
|
|
546
|
+
* @property isBlockhashValid Reports whether a recent blockhash remains valid at confirmed commitment.
|
|
547
|
+
* @property getBalance Reads an account's lamport balance.
|
|
548
|
+
* @property getAccountData Reads an account's raw data, or `null` when the account does not exist.
|
|
549
|
+
* @property getFeeForMessage Reads the network fee for a compiled transaction message, in lamports.
|
|
550
|
+
* @property getMinimumBalanceForRentExemption Reads the rent-exempt minimum for an account data length, in lamports.
|
|
551
|
+
* @property getSignatureStatus Reads a submitted transaction's confirmation state, or `null` when the signature is unknown to the node.
|
|
552
|
+
* @property getTransactionLogs Reads a confirmed transaction's program logs, or `null` when the transaction is not found.
|
|
553
|
+
*/
|
|
554
|
+
type SolanaRpcClient = {
|
|
555
|
+
getLatestBlockhash: () => Promise<{
|
|
556
|
+
blockhash: string;
|
|
557
|
+
lastValidBlockHeight: bigint;
|
|
558
|
+
}>;
|
|
559
|
+
getBlockHeight: () => Promise<bigint>;
|
|
560
|
+
isBlockhashValid: (blockhash: string) => Promise<boolean>;
|
|
561
|
+
getBalance: (address: string) => Promise<bigint>;
|
|
562
|
+
getAccountData: (address: string) => Promise<Uint8Array | null>;
|
|
563
|
+
getFeeForMessage: (message: Uint8Array) => Promise<bigint>;
|
|
564
|
+
getMinimumBalanceForRentExemption: (dataLength: number) => Promise<bigint>;
|
|
565
|
+
getSignatureStatus: (signature: string) => Promise<SolanaSignatureConfirmationStatus | null>;
|
|
566
|
+
getTransactionLogs: (signature: string) => Promise<string[] | null>;
|
|
567
|
+
};
|
|
568
|
+
/**
|
|
569
|
+
* Creates the Solana network reader used to quote and follow Hyperlane transfers.
|
|
570
|
+
*
|
|
571
|
+
* Every method sends one JSON-RPC request through the supplied transport and
|
|
572
|
+
* validates the response before returning it. No method requests a wallet
|
|
573
|
+
* signature or submits a transaction.
|
|
574
|
+
*
|
|
575
|
+
* @param config Solana JSON-RPC endpoint and optional Fetch API replacement. The transport defaults to `globalThis.fetch`.
|
|
576
|
+
* @returns Network reads for blockhashes, balances, fees, rent, accounts, signatures, and logs.
|
|
577
|
+
*
|
|
578
|
+
* @example
|
|
579
|
+
* const rpc = createSolanaRpcClient({ url: 'https://api.mainnet-beta.solana.com' })
|
|
580
|
+
* const { blockhash } = await rpc.getLatestBlockhash()
|
|
581
|
+
*/
|
|
582
|
+
declare function createSolanaRpcClient(config: SolanaRpcConfig): SolanaRpcClient;
|
|
583
|
+
|
|
584
|
+
/** Provides Solana's public mainnet endpoint as the default for examples and low-volume reads. */
|
|
585
|
+
declare const DEFAULT_SOLANA_RPC_URL = "https://api.mainnet-beta.solana.com";
|
|
586
|
+
/**
|
|
587
|
+
* Sends one Solana JSON-RPC method through an application transport.
|
|
588
|
+
* @param method JSON-RPC method name.
|
|
589
|
+
* @param params Positional JSON-RPC parameters.
|
|
590
|
+
* @returns The decoded method result.
|
|
591
|
+
*/
|
|
592
|
+
type SolanaRequest = (method: string, params: unknown[]) => Promise<unknown>;
|
|
593
|
+
/**
|
|
594
|
+
* Configures Fetch API behavior for a Solana HTTP transport.
|
|
595
|
+
* @property fetch Optional fetch-compatible JSON-RPC transport.
|
|
596
|
+
*/
|
|
597
|
+
type SolanaHttpOptions = {
|
|
598
|
+
fetch?: SolanaRpcHttpTransport | undefined;
|
|
599
|
+
};
|
|
600
|
+
/** Stores an HTTP endpoint or custom JSON-RPC function without contacting Solana. */
|
|
601
|
+
type SolanaTransport = {
|
|
602
|
+
type: 'http';
|
|
603
|
+
url: string;
|
|
604
|
+
fetch?: SolanaRpcHttpTransport | undefined;
|
|
605
|
+
} | {
|
|
606
|
+
type: 'custom';
|
|
607
|
+
request: SolanaRequest;
|
|
608
|
+
};
|
|
609
|
+
/** Selects whether a Wallet Standard account or application-held key authorizes transactions. */
|
|
610
|
+
type SolanaAccount = {
|
|
611
|
+
type: 'wallet';
|
|
612
|
+
wallet: {
|
|
613
|
+
features: Record<string, unknown>;
|
|
614
|
+
};
|
|
615
|
+
account: {
|
|
616
|
+
address: string;
|
|
617
|
+
publicKey: Uint8Array;
|
|
618
|
+
};
|
|
619
|
+
chain: string;
|
|
620
|
+
} | {
|
|
621
|
+
type: 'local';
|
|
622
|
+
secretKeyBytes: Uint8Array;
|
|
623
|
+
};
|
|
624
|
+
/**
|
|
625
|
+
* Configures Solana network and optional wallet access for one named bridge chain.
|
|
626
|
+
* @property transport Required public JSON-RPC transport.
|
|
627
|
+
* @property account Optional Wallet Standard or local-key signing authority.
|
|
628
|
+
*/
|
|
629
|
+
type SolanaClientConfig = {
|
|
630
|
+
transport: SolanaTransport;
|
|
631
|
+
account?: SolanaAccount | undefined;
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* Exposes account-free Solana operations used by bridge actions.
|
|
635
|
+
* @property sendTransaction Broadcasts a fully signed wire transaction.
|
|
636
|
+
*/
|
|
637
|
+
type SolanaPublicClient = SolanaRpcClient & {
|
|
638
|
+
sendTransaction: (signedTransaction: Uint8Array) => Promise<{
|
|
639
|
+
signature: string;
|
|
640
|
+
}>;
|
|
641
|
+
};
|
|
642
|
+
/**
|
|
643
|
+
* Exposes account-authorized Solana operations used by bridge actions.
|
|
644
|
+
* @property getAddress Resolves the fee payer address.
|
|
645
|
+
* @property sendTransaction Adds the fee-payer signature and broadcasts or delegates both operations to a wallet.
|
|
646
|
+
*/
|
|
647
|
+
type SolanaWalletClient = {
|
|
648
|
+
getAddress: () => Promise<string>;
|
|
649
|
+
sendTransaction: (wireTransaction: Uint8Array) => Promise<{
|
|
650
|
+
signature: string;
|
|
651
|
+
}>;
|
|
652
|
+
};
|
|
653
|
+
/**
|
|
654
|
+
* Holds materialized Solana public and wallet capabilities.
|
|
655
|
+
* @property family Prevents this client from being used for an EVM or Aleo route stored under the wrong chain identifier.
|
|
656
|
+
* @property publicClient Read and broadcast capability.
|
|
657
|
+
* @property walletClient Optional signing capability.
|
|
658
|
+
*/
|
|
659
|
+
type SolanaClient = {
|
|
660
|
+
family: 'solana';
|
|
661
|
+
publicClient: SolanaPublicClient;
|
|
662
|
+
walletClient?: SolanaWalletClient | undefined;
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
* Defines the Solana JSON-RPC endpoint used when a bridge action reads or submits.
|
|
666
|
+
*
|
|
667
|
+
* Creating the transport does not contact the endpoint.
|
|
668
|
+
*
|
|
669
|
+
* @param url Solana JSON-RPC endpoint contacted by the resulting client.
|
|
670
|
+
* @param options Optional Fetch API implementation. Defaults to `globalThis.fetch` when the client is created.
|
|
671
|
+
* @returns Deferred HTTP configuration accepted by `createSolanaClient`.
|
|
672
|
+
* @example const transport = solanaHttp('https://api.mainnet-beta.solana.com')
|
|
673
|
+
*/
|
|
674
|
+
declare function solanaHttp(url: string, options?: SolanaHttpOptions): SolanaTransport;
|
|
675
|
+
/**
|
|
676
|
+
* Defines Solana network access through an application-supplied JSON-RPC function.
|
|
677
|
+
*
|
|
678
|
+
* Creating the transport does not call the request function.
|
|
679
|
+
*
|
|
680
|
+
* @param request Function that sends JSON-RPC methods when a bridge action needs network access.
|
|
681
|
+
* @returns Deferred custom transport configuration accepted by `createSolanaClient`.
|
|
682
|
+
* @example const transport = solanaCustom((method, params) => rpc.request(method, params))
|
|
683
|
+
*/
|
|
684
|
+
declare function solanaCustom(request: SolanaRequest): SolanaTransport;
|
|
685
|
+
/**
|
|
686
|
+
* Selects a Wallet Standard account to authorize Solana bridge transactions.
|
|
687
|
+
*
|
|
688
|
+
* The wallet retains custody of the account and controls signing and broadcast.
|
|
689
|
+
* This helper does not connect to the wallet or request a signature.
|
|
690
|
+
*
|
|
691
|
+
* @param params Wallet, selected account, and Wallet Standard chain identifier used for later authorization.
|
|
692
|
+
* @returns Deferred wallet configuration accepted by `createSolanaClient`.
|
|
693
|
+
* @example const account = solanaWallet({ wallet, account: wallet.accounts[0], chain: 'solana:mainnet' })
|
|
694
|
+
*/
|
|
695
|
+
declare function solanaWallet(params: Omit<Extract<SolanaAccount, {
|
|
696
|
+
type: 'wallet';
|
|
697
|
+
}>, 'type'>): SolanaAccount;
|
|
698
|
+
/**
|
|
699
|
+
* Selects an application-held Solana keypair for unattended bridge transactions.
|
|
700
|
+
*
|
|
701
|
+
* The keypair signs on the caller's device or server. This helper copies the
|
|
702
|
+
* key bytes but does not contact Solana or submit a transaction; the application
|
|
703
|
+
* remains responsible for keeping the key secret.
|
|
704
|
+
*
|
|
705
|
+
* @param secretKeyBytes Secret Solana CLI-format 64-byte keypair held by the application.
|
|
706
|
+
* @returns Deferred local signing configuration accepted by `createSolanaClient`.
|
|
707
|
+
* @throws BridgeError When the key is not exactly 64 bytes.
|
|
708
|
+
* @example const account = solanaKeyPair(secretKeyBytes)
|
|
709
|
+
*/
|
|
710
|
+
declare function solanaKeyPair(secretKeyBytes: Uint8Array): SolanaAccount;
|
|
711
|
+
/**
|
|
712
|
+
* Creates the Solana client used to read bridge state and optionally authorize transactions.
|
|
713
|
+
*
|
|
714
|
+
* Construction wires the transport and optional account without making an RPC
|
|
715
|
+
* request. Read-only actions need only the transport; fund-moving actions also
|
|
716
|
+
* require a Wallet Standard account or local keypair.
|
|
717
|
+
*
|
|
718
|
+
* @param config Solana network access and optional wallet authorization supplied by the application.
|
|
719
|
+
* @returns Solana read, broadcast, and optional wallet capabilities used by bridge actions.
|
|
720
|
+
* @throws BridgeError When the transport is absent.
|
|
721
|
+
* @example const client = createSolanaClient({ transport: solanaHttp(rpcUrl), account: solanaKeyPair(key) })
|
|
722
|
+
*/
|
|
723
|
+
declare function createSolanaClient(config: SolanaClientConfig): SolanaClient;
|
|
724
|
+
|
|
725
|
+
export { type AleoMintMode as A, type BridgeRegistry as B, type ProtocolBridgeChain as C, DEFAULT_SOLANA_RPC_URL as D, type ExecuteSolanaHyperlaneTransferParameters as E, type ProtocolBridgeRoute as F, type GetAssetsParameters as G, type SolanaAccount as H, type SolanaClientConfig as I, type SolanaHttpOptions as J, type SolanaHyperlaneRouteMetadata as K, type SolanaPublicClient as L, type SolanaRequest as M, type SolanaTransport as N, createSolanaClient as O, type PrepareParameters as P, type QuoteSolanaHyperlaneTransferParameters as Q, solanaCustom as R, type SolanaClient as S, solanaHttp as T, solanaKeyPair as U, solanaWallet as V, type SolanaRpcClient as W, createSolanaRpcClient as X, type BridgeReceipt as a, type BridgeProgress as b, type BridgePlan as c, type BridgeCheckpoint as d, type SolanaHyperlaneTransferQuote as e, type SolanaWalletClient as f, type SolanaHyperlaneTransferExecution as g, type BridgeEnvironment as h, type AleoPrivacyCapability as i, type AleoPrivacyKind as j, type BridgeAssetKind as k, type BridgeAssetLocator as l, type BridgeChainFamily as m, type BridgeEndpoint as n, type BridgeExecutionStep as o, type BridgeExecutionStepKind as p, type BridgeFee as q, type BridgeIntent as r, type BridgeNextAction as s, type BridgeProgressNext as t, type BridgeProtocol as u, type BridgeRouteAvailability as v, type BridgeStatus as w, type BridgeStepExecutor as x, type GetRoutesParameters as y, type ProtocolBridgeAsset as z };
|