@layerzerolabs/oft-sui-sdk-v2 0.0.0-stage → 1.2.104

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.
Files changed (105) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +172 -2
  3. package/dist/2PVXPTJR.js +57 -0
  4. package/dist/2PVXPTJR.js.map +1 -0
  5. package/dist/4DKNPMZP.js +82 -0
  6. package/dist/4DKNPMZP.js.map +1 -0
  7. package/dist/5YQUATNE.js +1292 -0
  8. package/dist/5YQUATNE.js.map +1 -0
  9. package/dist/A3B5LALR.js +67 -0
  10. package/dist/A3B5LALR.js.map +1 -0
  11. package/dist/AQUMEEKG.js +108 -0
  12. package/dist/AQUMEEKG.js.map +1 -0
  13. package/dist/DUMP7ZFT.js +200 -0
  14. package/dist/DUMP7ZFT.js.map +1 -0
  15. package/dist/F5PNGH74.js +212 -0
  16. package/dist/F5PNGH74.js.map +1 -0
  17. package/dist/GLVZWDOK.js +49 -0
  18. package/dist/GLVZWDOK.js.map +1 -0
  19. package/dist/HD4WZG6B.js +38 -0
  20. package/dist/HD4WZG6B.js.map +1 -0
  21. package/dist/I5Z2GNDD.js +9 -0
  22. package/dist/I5Z2GNDD.js.map +1 -0
  23. package/dist/JUS4ARN3.js +78 -0
  24. package/dist/JUS4ARN3.js.map +1 -0
  25. package/dist/TF6IBJWJ.js +3 -0
  26. package/dist/TF6IBJWJ.js.map +1 -0
  27. package/dist/TL7X5YWY.js +39 -0
  28. package/dist/TL7X5YWY.js.map +1 -0
  29. package/dist/U4WYCHEV.js +54 -0
  30. package/dist/U4WYCHEV.js.map +1 -0
  31. package/dist/UIOGD65B.js +35 -0
  32. package/dist/UIOGD65B.js.map +1 -0
  33. package/dist/VUOMXK5T.js +6 -0
  34. package/dist/VUOMXK5T.js.map +1 -0
  35. package/dist/XCARM3YF.js +219 -0
  36. package/dist/XCARM3YF.js.map +1 -0
  37. package/dist/bcs/oft.d.ts +23 -0
  38. package/dist/bcs/oft.d.ts.map +1 -0
  39. package/dist/bcs/oft.js +4 -0
  40. package/dist/bcs/oft.js.map +1 -0
  41. package/dist/index.d.ts +6 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +19 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/modules/oft-composer-manager.d.ts +55 -0
  46. package/dist/modules/oft-composer-manager.d.ts.map +1 -0
  47. package/dist/modules/oft-composer-manager.js +16 -0
  48. package/dist/modules/oft-composer-manager.js.map +1 -0
  49. package/dist/modules/oft.d.ts +502 -0
  50. package/dist/modules/oft.d.ts.map +1 -0
  51. package/dist/modules/oft.js +17 -0
  52. package/dist/modules/oft.js.map +1 -0
  53. package/dist/protocol/args.d.ts +22 -0
  54. package/dist/protocol/args.d.ts.map +1 -0
  55. package/dist/protocol/args.js +4 -0
  56. package/dist/protocol/args.js.map +1 -0
  57. package/dist/protocol/deployments.d.ts +25 -0
  58. package/dist/protocol/deployments.d.ts.map +1 -0
  59. package/dist/protocol/deployments.js +4 -0
  60. package/dist/protocol/deployments.js.map +1 -0
  61. package/dist/protocol/endpoint.d.ts +40 -0
  62. package/dist/protocol/endpoint.d.ts.map +1 -0
  63. package/dist/protocol/endpoint.js +8 -0
  64. package/dist/protocol/endpoint.js.map +1 -0
  65. package/dist/protocol/index.d.ts +12 -0
  66. package/dist/protocol/index.d.ts.map +1 -0
  67. package/dist/protocol/index.js +15 -0
  68. package/dist/protocol/index.js.map +1 -0
  69. package/dist/protocol/oapp.d.ts +14 -0
  70. package/dist/protocol/oapp.d.ts.map +1 -0
  71. package/dist/protocol/oapp.js +6 -0
  72. package/dist/protocol/oapp.js.map +1 -0
  73. package/dist/protocol/ptb-builder.d.ts +17 -0
  74. package/dist/protocol/ptb-builder.d.ts.map +1 -0
  75. package/dist/protocol/ptb-builder.js +7 -0
  76. package/dist/protocol/ptb-builder.js.map +1 -0
  77. package/dist/protocol/sdk.d.ts +27 -0
  78. package/dist/protocol/sdk.d.ts.map +1 -0
  79. package/dist/protocol/sdk.js +14 -0
  80. package/dist/protocol/sdk.js.map +1 -0
  81. package/dist/protocol/simulate.d.ts +10 -0
  82. package/dist/protocol/simulate.d.ts.map +1 -0
  83. package/dist/protocol/simulate.js +5 -0
  84. package/dist/protocol/simulate.js.map +1 -0
  85. package/dist/protocol/types.d.ts +63 -0
  86. package/dist/protocol/types.d.ts.map +1 -0
  87. package/dist/protocol/types.js +4 -0
  88. package/dist/protocol/types.js.map +1 -0
  89. package/dist/protocol/utils.d.ts +11 -0
  90. package/dist/protocol/utils.d.ts.map +1 -0
  91. package/dist/protocol/utils.js +5 -0
  92. package/dist/protocol/utils.js.map +1 -0
  93. package/dist/protocol/validators.d.ts +44 -0
  94. package/dist/protocol/validators.d.ts.map +1 -0
  95. package/dist/protocol/validators.js +7 -0
  96. package/dist/protocol/validators.js.map +1 -0
  97. package/dist/protocol/zro.d.ts +13 -0
  98. package/dist/protocol/zro.d.ts.map +1 -0
  99. package/dist/protocol/zro.js +4 -0
  100. package/dist/protocol/zro.js.map +1 -0
  101. package/dist/types.d.ts +31 -0
  102. package/dist/types.d.ts.map +1 -0
  103. package/dist/types.js +4 -0
  104. package/dist/types.js.map +1 -0
  105. package/package.json +45 -3
@@ -0,0 +1,502 @@
1
+ import type { ClientWithCoreApi } from '@mysten/sui/client';
2
+ import type { TransactionArgument, TransactionResult } from '@mysten/sui/transactions';
3
+ import { Transaction } from '@mysten/sui/transactions';
4
+ import type { IPTBValidator, MessagingFee, SuiProtocolSDK } from '../protocol';
5
+ import type { OFTFeeDetail, OFTInfoV1, OFTLimit, OFTReceipt, SendParam } from '../types';
6
+ export declare const OFTErrorCode: {
7
+ readonly EComposeMsgNotAllowed: 1;
8
+ readonly EComposeMsgRequired: 2;
9
+ readonly EInsufficientBalance: 3;
10
+ readonly EInvalidAdminCap: 4;
11
+ readonly EInvalidComposeQueue: 5;
12
+ readonly EInvalidLocalDecimals: 6;
13
+ readonly EInvalidMigrationCap: 7;
14
+ readonly EInvalidSendContext: 8;
15
+ readonly ESlippageExceeded: 9;
16
+ readonly EWrongPackageVersion: 10;
17
+ };
18
+ /**
19
+ * OFT (Omnichain Fungible Token) Class
20
+ *
21
+ * The OFT class provides a comprehensive interface for interacting with LayerZero's
22
+ * Omnichain Fungible Token standard on the Sui blockchain. OFTs enable seamless
23
+ * cross-chain token transfers while maintaining fungibility across multiple networks.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Initialize OFT instance
28
+ * const oft = new OFT(protocolSDK, oftCallCapId);
29
+ *
30
+ * // Send tokens cross-chain
31
+ * const tx = new Transaction();
32
+ * const coin = await oft.splitCoinMoveCall(tx, sender, amount);
33
+ * await oft.sendMoveCall(tx, sender, sendParam, coin, nativeFee, zroFee, refundAddress);
34
+ * tx.transferObjects([coin], sender);
35
+ * ...
36
+ *
37
+ * // Quote transfer fees
38
+ * const fees = await oft.quoteSend(sender, sendParam, payInZro);
39
+ * ```
40
+ */
41
+ export declare class OFT {
42
+ #private;
43
+ /** Sui client for blockchain interactions */
44
+ readonly client: ClientWithCoreApi;
45
+ /** The OFTCallCap ID */
46
+ readonly oftCallCapId: string;
47
+ /** The package ID of the OFT */
48
+ private oftPackageId?;
49
+ /** LayerZero protocol object references (endpoint, messaging channels, etc.) */
50
+ private readonly objects;
51
+ /** The unique object ID of this OFT instance on Sui */
52
+ private oftObjectId?;
53
+ /** Admin capability object ID for privileged operations (retrieved dynamically when needed) */
54
+ private adminCapId?;
55
+ /** The Sui coin type this OFT represents (e.g., "0x123::mycoin::MYCOIN") */
56
+ private coinType?;
57
+ /** The unique object ID of the associated OApp instance on Sui */
58
+ private oappObjectId?;
59
+ /** Reference to the LayerZero protocol SDK for cross-chain operations */
60
+ private readonly protocolSDK;
61
+ /** The OFTInfoV1 structure */
62
+ private oftInfo?;
63
+ /**
64
+ * Creates a new OFT instance for interacting with an Omnichain Fungible Token
65
+ *
66
+ * @param protocolSDK - The LayerZero protocol SDK instance providing core cross-chain functionality
67
+ * @param oftCallCapId - The OFT call capability ID used for OFT operations and accessing OFT information
68
+ * @param oftObjectId - Optional OFT object ID on Sui blockchain for direct OFT instance access
69
+ * @param coinType - Optional Sui coin type string (e.g., "0x123::mycoin::MYCOIN") that this OFT represents
70
+ * @param oappObjectId - Optional associated OApp object ID for cross-chain messaging operations
71
+ * @param adminCapId - Optional admin capability object ID for privileged operations
72
+ */
73
+ constructor(protocolSDK: SuiProtocolSDK, oftCallCapId: string, oftObjectId?: string, coinType?: string, oappObjectId?: string, // the associated oapp object id
74
+ adminCapId?: string);
75
+ /**
76
+ * Updates the associated OApp object ID
77
+ * @param oappObjectId - The new OApp object ID
78
+ */
79
+ setOappObjectId(oappObjectId: string): void;
80
+ /**
81
+ * Initialize an OFT instance with a treasury capability
82
+ * Creates a new OFT that mints its own tokens
83
+ * @param tx - The transaction to add the move call to
84
+ * @param coinType - The Sui coin type string (e.g., "0x123::mycoin::MYCOIN")
85
+ * @param ticket - The OFTCreationTicket object ID or TransactionArgument
86
+ * @param oapp - The OApp object ID or TransactionArgument
87
+ * @param treasury - The TreasuryCap object ID or TransactionArgument for the coin type
88
+ * @param metadata - The CoinMetadata object ID or TransactionArgument for the coin type
89
+ * @param sharedDecimals - Number of decimals to use for cross-chain operations
90
+ * @returns TransactionResult array containing [AdminCap, MigrationCap] - MigrationCap must be transferred or stored
91
+ */
92
+ initOftMoveCall(tx: Transaction, coinType: string, ticket: string | TransactionArgument, oapp: string | TransactionArgument, treasury: string | TransactionArgument, metadata: string | TransactionArgument, sharedDecimals: number | TransactionArgument): TransactionResult;
93
+ /**
94
+ * Initialize an OFT adapter instance
95
+ * Creates an OFT adapter that wraps an existing coin type
96
+ * @param tx - The transaction to add the move call to
97
+ * @param coinType - The Sui coin type string (e.g., "0x123::mycoin::MYCOIN")
98
+ * @param ticket - The OFTCreationTicket object ID or TransactionArgument
99
+ * @param oapp - The OApp object ID or TransactionArgument
100
+ * @param metadata - The CoinMetadata object ID or TransactionArgument for the coin type
101
+ * @param sharedDecimals - Number of decimals to use for cross-chain operations
102
+ * @returns TransactionResult array containing [AdminCap, MigrationCap] - MigrationCap must be transferred or stored
103
+ */
104
+ initOftAdapterMoveCall(tx: Transaction, coinType: string, ticket: string | TransactionArgument, oapp: string | TransactionArgument, metadata: string | TransactionArgument, sharedDecimals: number | TransactionArgument): TransactionResult;
105
+ /**
106
+ * Get LayerZero receive information for OFT registration
107
+ *
108
+ * This function prepares the necessary metadata for registering an OFT
109
+ * with the LayerZero endpoint, enabling it to receive cross-chain messages.
110
+ *
111
+ * @param tx - The transaction to add the move call to
112
+ * @param composerManager - The composer manager object ID for routing compose transfers
113
+ * @returns TransactionResult containing serialized execution metadata for endpoint registration
114
+ */
115
+ lzReceiveInfoMoveCall(tx: Transaction, composerManager: string | TransactionArgument): Promise<TransactionResult>;
116
+ /**
117
+ * Register OFT as an OApp with LayerZero endpoint
118
+ * @param tx - The transaction to add the move call to
119
+ * @param coinType - The Sui coin type string (e.g., "0x123::mycoin::MYCOIN")
120
+ * @param oftObjectId - The OFT object ID
121
+ * @param oappObjectId - The OApp object ID
122
+ * @param composerManager - The composer manager object ID or TransactionArgument
123
+ * @param lzReceiveInfo - Optional LayerZero receive info as Uint8Array or TransactionArgument
124
+ */
125
+ registerOAppMoveCall(tx: Transaction, coinType: string, oftObjectId: string, oappObjectId: string, composerManager: string | TransactionArgument, lzReceiveInfo?: Uint8Array | TransactionArgument): Promise<void>;
126
+ /**
127
+ * Set pause state for OFT operations
128
+ * @param tx - The transaction to add the move call to
129
+ * @param pause - Whether to pause or unpause operations
130
+ */
131
+ setPauseMoveCall(tx: Transaction, pause: boolean | TransactionArgument): Promise<void>;
132
+ /**
133
+ * Set fee deposit address for OFT fees
134
+ * @param tx - The transaction to add the move call to
135
+ * @param feeDepositAddress - The new fee deposit address
136
+ */
137
+ setFeeDepositAddressMoveCall(tx: Transaction, feeDepositAddress: string | TransactionArgument): Promise<void>;
138
+ /**
139
+ * Set default fee basis points for OFT transfers
140
+ * @param tx - The transaction to add the move call to
141
+ * @param feeBps - Default fee rate in basis points (0-10,000, where 10,000 = 100%)
142
+ */
143
+ setDefaultFeeBpsMoveCall(tx: Transaction, feeBps: bigint | number | string | TransactionArgument): Promise<void>;
144
+ /**
145
+ * Set fee basis points for a specific destination chain
146
+ * @param tx - The transaction to add the move call to
147
+ * @param dstEid - Destination endpoint ID
148
+ * @param feeBps - Fee rate in basis points (0-10,000, where 10,000 = 100%)
149
+ */
150
+ setFeeBpsMoveCall(tx: Transaction, dstEid: number | TransactionArgument, feeBps: bigint | number | string | TransactionArgument): Promise<void>;
151
+ /**
152
+ * Removes the fee rate for a specific destination chain
153
+ * @param tx - The transaction to add the move call to
154
+ * @param dstEid - Destination endpoint ID
155
+ */
156
+ unsetFeeBpsMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<void>;
157
+ /**
158
+ * Migrate OFT instance to a new contract
159
+ * @param tx - The transaction to add the move call to
160
+ * @param migrationCap - Migration capability object ID or transaction argument
161
+ * @returns TransactionResult containing the migration ticket
162
+ */
163
+ migrateMoveCall(tx: Transaction, migrationCap: string | TransactionArgument): Promise<TransactionResult>;
164
+ /**
165
+ * Set rate limit for OFT transfers
166
+ * @param tx - The transaction to add the move call to
167
+ * @param eid - Endpoint ID
168
+ * @param inbound - Whether this is for inbound or outbound transfers
169
+ * @param rateLimit - Rate limit amount
170
+ * @param windowSeconds - Time window in seconds
171
+ */
172
+ setRateLimitMoveCall(tx: Transaction, eid: number | TransactionArgument, inbound: boolean | TransactionArgument, rateLimit: bigint | number | string | TransactionArgument, windowSeconds: bigint | number | string | TransactionArgument): Promise<void>;
173
+ /**
174
+ * Remove rate limit for OFT transfers
175
+ * @param tx - The transaction to add the move call to
176
+ * @param eid - Endpoint ID
177
+ * @param inbound - Whether this is for inbound or outbound transfers
178
+ */
179
+ unsetRateLimitMoveCall(tx: Transaction, eid: number | TransactionArgument, inbound: boolean | TransactionArgument): Promise<void>;
180
+ /**
181
+ * Splits specified amount of coins from user's wallet
182
+ * @param tx - The transaction to add the move call to
183
+ * @param owner - Address of the user whose coins to split
184
+ * @param amount - Amount of coins to split (in smallest units)
185
+ * @param limit - Maximum total number of coins to collect across all pages (default: 200)
186
+ * @param pageSize - Maximum number of coins to fetch per page (default: 50)
187
+ * @returns Promise resolving to split coin as TransactionResult
188
+ * @throws Error if insufficient coins balance or no coins found
189
+ */
190
+ splitCoinMoveCall(tx: Transaction, owner: string, amount: bigint, limit?: number, pageSize?: number): Promise<TransactionResult>;
191
+ /**
192
+ * Send OFT tokens to destination chain
193
+ * @param tx - The transaction to add the move call to
194
+ * @param sender - Sender address for ZRO token operations
195
+ * @param sendParam - Send parameters including destination and amounts
196
+ * @param coinProvided - Coin object ID or transaction result to send
197
+ * @param nativeFee - Native token fee amount
198
+ * @param zroFee - ZRO token fee amount
199
+ * @param refundAddress - Address for fee refunds
200
+ * @param validators - Optional PTB validators for transaction validation
201
+ * @param maxSimulationTimes - Optional maximum number of simulation attempts
202
+ * @returns Promise<void> - Completes when the send operation is processed
203
+ */
204
+ sendMoveCall(tx: Transaction, sender: string, sendParam: SendParam | TransactionArgument, coinProvided: string | TransactionArgument, nativeFee: bigint | TransactionArgument, zroFee: bigint | TransactionArgument, refundAddress: string | TransactionArgument, validators?: IPTBValidator[], maxSimulationTimes?: number): Promise<void>;
205
+ /**
206
+ * Process inbound cross-chain token transfers
207
+ * @param tx - The transaction to add the move call to
208
+ * @param call - LayerZero receive call containing the verified cross-chain message
209
+ * @returns TransactionResult containing the processed transfer
210
+ */
211
+ lzReceiveMoveCall(tx: Transaction, call: string | TransactionArgument): Promise<TransactionResult>;
212
+ /**
213
+ * Process inbound cross-chain token transfers with compose functionality
214
+ * @param tx - The transaction to add the move call to
215
+ * @param composeQueue - The composer's message queue for sequencing operations
216
+ * @param composerManager - Manager managing token deposits for composers
217
+ * @param call - LayerZero receive call containing the verified cross-chain message
218
+ * @returns TransactionResult containing the processed transfer
219
+ */
220
+ lzReceiveWithComposeMoveCall(tx: Transaction, composeQueue: string | TransactionArgument, composerManager: string | TransactionArgument, call: string | TransactionArgument): Promise<TransactionResult>;
221
+ /**
222
+ * Confirms and extracts results from a quote operation
223
+ * @param tx - The transaction to add the move call to
224
+ * @param call - Completed Call object from quote_send() execution
225
+ * @returns TransactionResult containing the messaging fee
226
+ */
227
+ confirmQuoteSendMoveCall(tx: Transaction, call: string | TransactionArgument): Promise<TransactionResult>;
228
+ /**
229
+ * Quote OFT sending operation with detailed fee breakdown
230
+ * @param sendParam - Send parameters for the OFT operation
231
+ * @returns Promise with limit, fee details, and receipt information
232
+ */
233
+ quoteOft(sendParam: SendParam | TransactionArgument): Promise<{
234
+ limit: OFTLimit;
235
+ feeDetails: OFTFeeDetail[];
236
+ receipt: OFTReceipt;
237
+ }>;
238
+ /**
239
+ * Quote messaging fees for OFT sending
240
+ * @param sender - Sender address
241
+ * @param sendParam - Send parameters for the OFT operation
242
+ * @param payInZro - Whether to pay in ZRO tokens
243
+ * @param validators - Optional PTB validators for transaction validation
244
+ * @param maxSimulationTimes - Optional maximum number of simulation attempts
245
+ * @returns Promise<MessagingFee> - The calculated messaging fees
246
+ */
247
+ quoteSend(sender: string, sendParam: SendParam | TransactionArgument, payInZro: boolean | TransactionArgument, validators?: IPTBValidator[], maxSimulationTimes?: number): Promise<MessagingFee>;
248
+ /**
249
+ * Get the upgrade version of this OFT instance
250
+ * @param tx - The transaction to add the move call to
251
+ * @returns Transaction result containing the upgrade version
252
+ */
253
+ upgradeVersionMoveCall(tx: Transaction): Promise<TransactionResult>;
254
+ /**
255
+ * Get the upgrade version of this OFT instance
256
+ * @returns Promise<bigint> - The upgrade version
257
+ */
258
+ upgradeVersion(): Promise<bigint>;
259
+ /**
260
+ * Get the associated OApp object address
261
+ * @param tx - The transaction to add the move call to
262
+ * @returns Transaction result containing the OApp object address
263
+ */
264
+ oappObjectMoveCall(tx: Transaction): Promise<TransactionResult>;
265
+ /**
266
+ * Get the associated OApp object address
267
+ * @returns Promise<string> - The OApp object address
268
+ */
269
+ oappObject(): Promise<string>;
270
+ /**
271
+ * Get OFT version information
272
+ * @param tx - The transaction to add the move call to
273
+ * @returns Transaction result containing version information
274
+ */
275
+ oftVersionMoveCall(tx: Transaction): Promise<TransactionResult>;
276
+ /**
277
+ * Get OFT version information
278
+ * @returns Promise<{ major: number; minor: number }> - The OFT version
279
+ */
280
+ oftVersion(): Promise<{
281
+ major: number;
282
+ minor: number;
283
+ }>;
284
+ /**
285
+ * Get the OFT capability ID
286
+ * @param tx - The transaction to add the move call to
287
+ * @returns Transaction result containing the OFT capability ID
288
+ */
289
+ oftCapIdMoveCall(tx: Transaction): Promise<TransactionResult>;
290
+ /**
291
+ * Get the OFT capability ID
292
+ * @returns Promise<string> - The OFT capability ID
293
+ */
294
+ oftCapId(): Promise<string>;
295
+ /**
296
+ * Get the migration capability address for this OFT
297
+ * @param tx - The transaction to add the move call to
298
+ * @returns Transaction result containing the migration capability address
299
+ */
300
+ migrationCapMoveCall(tx: Transaction): Promise<TransactionResult>;
301
+ /**
302
+ * Get the migration capability address for this OFT
303
+ * @returns Promise<string> - The migration capability address
304
+ */
305
+ migrationCap(): Promise<string>;
306
+ messagingChannel(): Promise<string>;
307
+ /**
308
+ * Get coin metadata address
309
+ * @param tx - The transaction to add the move call to
310
+ * @returns Transaction result containing coin metadata address
311
+ */
312
+ coinMetadataMoveCall(tx: Transaction): Promise<TransactionResult>;
313
+ /**
314
+ * Get coin metadata address
315
+ * @returns Promise<string> - The coin metadata address
316
+ */
317
+ coinMetadata(): Promise<string>;
318
+ /**
319
+ * Get OFT admin capability address
320
+ * @param tx - The transaction to add the move call to
321
+ * @returns Transaction result containing the admin capability address
322
+ */
323
+ adminCapMoveCall(tx: Transaction): Promise<TransactionResult>;
324
+ /**
325
+ * Get OFT admin capability address
326
+ * @returns Promise<string> - The admin capability address
327
+ */
328
+ adminCap(): Promise<string>;
329
+ /**
330
+ * Get shared decimals for cross-chain compatibility
331
+ * @param tx - The transaction to add the move call to
332
+ * @returns Transaction result containing shared decimals
333
+ */
334
+ sharedDecimalsMoveCall(tx: Transaction): Promise<TransactionResult>;
335
+ /**
336
+ * Get shared decimals for cross-chain compatibility
337
+ * @returns Promise<number> - The shared decimal precision
338
+ */
339
+ sharedDecimals(): Promise<number>;
340
+ /**
341
+ * Get the decimal conversion rate for this OFT
342
+ * @param tx - The transaction to add the move call to
343
+ * @returns Transaction result containing the decimal conversion rate
344
+ */
345
+ decimalConversionRateMoveCall(tx: Transaction): Promise<TransactionResult>;
346
+ /**
347
+ * Get the decimal conversion rate for this OFT
348
+ * @returns Promise<bigint> - The decimal conversion rate multiplier
349
+ */
350
+ decimalConversionRate(): Promise<bigint>;
351
+ /**
352
+ * Check if OFT is paused
353
+ * @param tx - The transaction to add the move call to
354
+ * @returns Transaction result containing the paused status
355
+ */
356
+ isPausedMoveCall(tx: Transaction): Promise<TransactionResult>;
357
+ /**
358
+ * Check if OFT is paused
359
+ * @returns Promise<boolean> - True if OFT is paused
360
+ */
361
+ isPaused(): Promise<boolean>;
362
+ /**
363
+ * Check if this OFT is an adapter (wraps existing token)
364
+ * @param tx - The transaction to add the move call to
365
+ * @returns Transaction result containing the adapter status
366
+ */
367
+ isAdapterMoveCall(tx: Transaction): Promise<TransactionResult>;
368
+ /**
369
+ * Check if this OFT is an adapter (wraps existing token)
370
+ * @returns Promise<boolean> - True if this is an OFT adapter
371
+ */
372
+ isAdapter(): Promise<boolean>;
373
+ /**
374
+ * Decode OFTInfoV1 from encoded bytes
375
+ * @param tx - The transaction to add the move call to
376
+ * @param encodedBytes - The encoded OFTInfoV1 bytes to decode
377
+ * @returns Transaction result containing the decoded OFTInfoV1
378
+ */
379
+ decodeOftInfoV1MoveCall(tx: Transaction, encodedBytes: Uint8Array | TransactionArgument): TransactionResult;
380
+ /**
381
+ * Decode OFTInfoV1 from encoded bytes
382
+ * @param encodedBytes - The encoded OFTInfoV1 bytes to decode
383
+ * @returns Promise<OFTInfoV1> - The decoded OFTInfoV1 structure
384
+ */
385
+ decodeOftInfoV1(encodedBytes: Uint8Array): Promise<OFTInfoV1>;
386
+ /**
387
+ * Check if the OFT has a fee rate greater than 0 for the specified destination
388
+ * @param tx - The transaction to add the move call to
389
+ * @param dstEid - Destination endpoint ID
390
+ * @returns Transaction result containing whether fee exists
391
+ */
392
+ hasOftFeeMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
393
+ /**
394
+ * Check if the OFT has a fee rate greater than 0 for the specified destination
395
+ * @param dstEid - Destination endpoint ID
396
+ * @returns Promise<boolean> - True if fee exists
397
+ */
398
+ hasOftFee(dstEid: number): Promise<boolean>;
399
+ /**
400
+ * Get the effective fee rate for a specific destination chain
401
+ * @param tx - The transaction to add the move call to
402
+ * @param dstEid - Destination endpoint ID
403
+ * @returns Transaction result containing the effective fee basis points
404
+ */
405
+ effectiveFeeBpsMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
406
+ /**
407
+ * Get the effective fee rate for a specific destination chain
408
+ * @param dstEid - Destination endpoint ID
409
+ * @returns Promise<bigint> - The effective fee in basis points
410
+ */
411
+ effectiveFeeBps(dstEid: number): Promise<bigint>;
412
+ /**
413
+ * Get the default fee rate
414
+ * @param tx - The transaction to add the move call to
415
+ * @returns Transaction result containing the default fee basis points
416
+ */
417
+ defaultFeeBpsMoveCall(tx: Transaction): Promise<TransactionResult>;
418
+ /**
419
+ * Get the default fee rate
420
+ * @returns Promise<bigint> - The default fee in basis points
421
+ */
422
+ defaultFeeBps(): Promise<bigint>;
423
+ /**
424
+ * Get fee basis points for a specific destination chain
425
+ * @param tx - The transaction to add the move call to
426
+ * @param dstEid - Destination endpoint ID
427
+ * @returns Transaction result containing the fee basis points
428
+ */
429
+ feeBpsMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
430
+ /**
431
+ * Get fee basis points for a specific destination chain
432
+ * @param dstEid - Destination endpoint ID
433
+ * @returns Promise<bigint> - The fee in basis points
434
+ */
435
+ feeBps(dstEid: number): Promise<bigint>;
436
+ /**
437
+ * Get fee deposit address for OFT
438
+ * @param tx - The transaction to add the move call to
439
+ * @returns Transaction result containing the fee deposit address
440
+ */
441
+ feeDepositAddressMoveCall(tx: Transaction): Promise<TransactionResult>;
442
+ /**
443
+ * Get fee deposit address for OFT
444
+ * @returns Promise<string> - The fee deposit address
445
+ */
446
+ feeDepositAddress(): Promise<string>;
447
+ /**
448
+ * Get rate limit configuration for an endpoint
449
+ * @param tx - The transaction to add the move call to
450
+ * @param eid - Endpoint ID
451
+ * @param inbound - Whether this is for inbound or outbound transfers
452
+ * @returns Transaction result containing rate limit configuration
453
+ */
454
+ rateLimitConfigMoveCall(tx: Transaction, eid: number | TransactionArgument, inbound: boolean | TransactionArgument): Promise<TransactionResult>;
455
+ /**
456
+ * Get rate limit configuration for an endpoint
457
+ * @param eid - Endpoint ID
458
+ * @param inbound - Whether this is for inbound or outbound transfers
459
+ * @returns Promise<{ limit: bigint; windowSeconds: bigint }> - Rate limit configuration
460
+ */
461
+ rateLimitConfig(eid: number, inbound: boolean): Promise<{
462
+ limit: bigint;
463
+ windowSeconds: bigint;
464
+ }>;
465
+ /**
466
+ * Get current in-flight amount for rate limiting
467
+ * @param tx - The transaction to add the move call to
468
+ * @param eid - Endpoint ID
469
+ * @param inbound - Whether this is for inbound or outbound transfers
470
+ * @returns Transaction result containing in-flight amount
471
+ */
472
+ rateLimitInFlightMoveCall(tx: Transaction, eid: number | TransactionArgument, inbound: boolean | TransactionArgument): Promise<TransactionResult>;
473
+ /**
474
+ * Get current in-flight amount for rate limiting
475
+ * @param eid - Endpoint ID
476
+ * @param inbound - Whether this is for inbound or outbound transfers
477
+ * @returns Promise<bigint> - Current in-flight amount
478
+ */
479
+ rateLimitInFlight(eid: number, inbound: boolean): Promise<bigint>;
480
+ /**
481
+ * Get rate limit capacity (remaining available amount)
482
+ * @param tx - The transaction to add the move call to
483
+ * @param eid - Endpoint ID
484
+ * @param inbound - Whether this is for inbound or outbound transfers
485
+ * @returns Transaction result containing rate limit capacity
486
+ */
487
+ rateLimitCapacityMoveCall(tx: Transaction, eid: number | TransactionArgument, inbound: boolean | TransactionArgument): Promise<TransactionResult>;
488
+ /**
489
+ * Get rate limit capacity (remaining available amount)
490
+ * @param eid - Endpoint ID
491
+ * @param inbound - Whether this is for inbound or outbound transfers
492
+ * @returns Promise<bigint> - Remaining rate limit capacity
493
+ */
494
+ rateLimitCapacity(eid: number, inbound: boolean): Promise<bigint>;
495
+ /**
496
+ * Create a transaction sender object for OFT operations
497
+ * @param tx - The transaction to add the move call to
498
+ * @returns Transaction result containing the transaction sender object
499
+ */
500
+ txSenderMoveCall(tx: Transaction): Promise<TransactionResult>;
501
+ }
502
+ //# sourceMappingURL=oft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oft.d.ts","sourceRoot":"","sources":["../../src/modules/oft.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAiB,cAAc,EAAE,MAAM,aAAa,CAAC;AAe9F,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAYzF,eAAO,MAAM,YAAY;aAErB,qBAAqB,EAAE,CAAC;aACxB,mBAAmB,EAAE,CAAC;aACtB,oBAAoB,EAAE,CAAC;aACvB,gBAAgB,EAAE,CAAC;aACnB,oBAAoB,EAAE,CAAC;aACvB,qBAAqB,EAAE,CAAC;aACxB,oBAAoB,EAAE,CAAC;aACvB,mBAAmB,EAAE,CAAC;aACtB,iBAAiB,EAAE,CAAC;aACpB,oBAAoB,EAAE,EAAE;CAClB,CAAC;AAEX;;;;;;;;;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YQUATNE.js';
2
+ import '../U4WYCHEV.js';
3
+ import '../TF6IBJWJ.js';
4
+ import '../2PVXPTJR.js';
5
+ import '../HD4WZG6B.js';
6
+ import '../DUMP7ZFT.js';
7
+ import '../4DKNPMZP.js';
8
+ import '../GLVZWDOK.js';
9
+ import '../JUS4ARN3.js';
10
+ import '../F5PNGH74.js';
11
+ import '../XCARM3YF.js';
12
+ import '../A3B5LALR.js';
13
+ import '../TL7X5YWY.js';
14
+ import '../UIOGD65B.js';
15
+ import '../VUOMXK5T.js';
16
+ //# sourceMappingURL=oft.js.map
17
+ //# sourceMappingURL=oft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"oft.js"}
@@ -0,0 +1,22 @@
1
+ import type { Transaction, TransactionArgument } from '@mysten/sui/transactions';
2
+ import type { Utils } from './utils';
3
+ export declare const toTypeArgument: (type: string) => string;
4
+ export declare const isTransactionArgument: (value: unknown) => value is TransactionArgument;
5
+ export declare const asArg: <T>(value: T | TransactionArgument, converter: (value: T) => TransactionArgument) => TransactionArgument;
6
+ export declare const asArgWithTx: <T>(tx: Transaction, value: T | TransactionArgument, converter: (tx: Transaction, value: T) => TransactionArgument) => TransactionArgument;
7
+ export declare const asArgWithTxAsync: <T>(tx: Transaction, value: T | TransactionArgument, converter: (tx: Transaction, value: T) => Promise<TransactionArgument>) => Promise<TransactionArgument>;
8
+ export declare const asObject: (tx: Transaction, value: string | TransactionArgument) => TransactionArgument;
9
+ export declare const asAddress: (tx: Transaction, value: string | TransactionArgument) => TransactionArgument;
10
+ export declare const asU8: (tx: Transaction, value: number | TransactionArgument) => TransactionArgument;
11
+ export declare const asU16: (tx: Transaction, value: number | TransactionArgument) => TransactionArgument;
12
+ export declare const asU32: (tx: Transaction, value: number | TransactionArgument) => TransactionArgument;
13
+ export declare const asU64: (tx: Transaction, value: bigint | number | string | TransactionArgument) => TransactionArgument;
14
+ export declare const asU128: (tx: Transaction, value: bigint | number | string | TransactionArgument) => TransactionArgument;
15
+ export declare const asU256: (tx: Transaction, value: bigint | number | string | TransactionArgument) => TransactionArgument;
16
+ export declare const asBytes32: (tx: Transaction, value: Uint8Array | TransactionArgument, utils: Utils) => TransactionArgument;
17
+ export declare const asBytes: (tx: Transaction, value: Uint8Array | TransactionArgument) => TransactionArgument;
18
+ export declare const asBytesVector: (tx: Transaction, value: Uint8Array[] | TransactionArgument) => TransactionArgument;
19
+ export declare const asString: (tx: Transaction, value: string | TransactionArgument) => TransactionArgument;
20
+ export declare const asAddressVector: (tx: Transaction, value: string[] | TransactionArgument) => TransactionArgument;
21
+ export declare const asBool: (tx: Transaction, value: boolean | TransactionArgument) => TransactionArgument;
22
+ //# sourceMappingURL=args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/protocol/args.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEjF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,MAC+B,CAAC;AAE9E,eAAO,MAAM,qBAAqB,UAAW,OAAO,KAAG,KAAK,IAAI,mBAW/D,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,CAAC,SACZ,CAAC,GAAG,mBAAmB,aACnB,CAAC,KAAK,EAAE,CAAC,KAAK,mBAAmB,KAC7C,mBAAgF,CAAC;AAEpF,eAAO,MAAM,WAAW,GAAI,CAAC,MACrB,WAAW,SACR,CAAC,GAAG,mBAAmB,aACnB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,KAAK,mBAAmB,KAC9D,mBAAoF,CAAC;AAExF,eAAO,MAAM,gBAAgB,GAAU,CAAC,MAChC,WAAW,SACR,CAAC,GAAG,mBAAmB,aACnB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,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AAO,MAAM,MAAM,OACX,WAAW,SACR,OAAO,GAAG,mBAAmB,KACrC,mBAA+D,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { asAddress, asAddressVector, asArg, asArgWithTx, asArgWithTxAsync, asBool, asBytes, asBytes32, asBytesVector, asObject, asString, asU128, asU16, asU256, asU32, asU64, asU8, isTransactionArgument, toTypeArgument } from '../UIOGD65B.js';
2
+ import '../VUOMXK5T.js';
3
+ //# sourceMappingURL=args.js.map
4
+ //# sourceMappingURL=args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"args.js"}
@@ -0,0 +1,25 @@
1
+ export type Stage = 'mainnet' | 'testnet' | 'sandbox';
2
+ export interface PackageOptions {
3
+ endpointV2: string;
4
+ utils: string;
5
+ zro: string;
6
+ call: string;
7
+ endpointPtbBuilder: string;
8
+ ptbMoveCall: string;
9
+ oapp: string;
10
+ packageWhitelistValidator: string;
11
+ }
12
+ export interface ObjectOptions {
13
+ endpointV2: string;
14
+ endpointPtbBuilder: string;
15
+ packageWhitelistValidator: string;
16
+ }
17
+ export declare const PACKAGE_ADDRESS_MAP: {
18
+ [K in keyof PackageOptions]: Record<Stage, string>;
19
+ };
20
+ export declare const OBJECT_ADDRESS_MAP: {
21
+ [K in keyof ObjectOptions]: Record<Stage, string>;
22
+ };
23
+ export declare const mergeDefaultPackageConfig: (stage: Stage, customPackages?: Partial<PackageOptions>) => PackageOptions;
24
+ export declare const mergeDefaultObjectConfig: (stage: Stage, customObjects?: Partial<ObjectOptions>) => ObjectOptions;
25
+ //# sourceMappingURL=deployments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/protocol/deployments.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,yBAAyB,EAAE,MAAM,CAAC;CACrC;AAED,eAAO,MAAM,mBAAmB,EAAE;KAAG,CAAC,IAAI,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC;CAyCrF,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE;KAAG,CAAC,IAAI,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC;CAgBnF,CAAC;AAcF,eAAO,MAAM,yBAAyB,UAC3B,KAAK,mBACK,OAAO,CAAC,cAAc,CAAC,KACzC,cAAwF,CAAC;AAE5F,eAAO,MAAM,wBAAwB,UAC1B,KAAK,kBACI,OAAO,CAAC,aAAa,CAAC,KACvC,aAAoF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { OBJECT_ADDRESS_MAP, PACKAGE_ADDRESS_MAP, mergeDefaultObjectConfig, mergeDefaultPackageConfig } from '../JUS4ARN3.js';
2
+ import '../VUOMXK5T.js';
3
+ //# sourceMappingURL=deployments.js.map
4
+ //# sourceMappingURL=deployments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"deployments.js"}