@allbridge/bridge-core-sdk 3.35.0-alpha.2 → 3.35.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.
@@ -102,17 +102,44 @@ export interface TxCostAmountDTO {
102
102
  export type MessengerTransferTimeDTO = {
103
103
  [messenger in MessengerKeyDTO]: number | null;
104
104
  };
105
+ /**
106
+ * Bridging protocol used for a transfer.
107
+ * Only {@link ActiveMessenger} values are supported.
108
+ */
105
109
  export declare enum Messenger {
106
110
  /** @deprecated Do not use. */
107
111
  ALLBRIDGE = 1,
108
112
  /** @deprecated Do not use. */
109
113
  WORMHOLE = 2,
114
+ /**
115
+ * Circle CCTP.
116
+ * Route is supported when `cctpAddress` is defined on both source and destination tokens.
117
+ */
110
118
  CCTP = 3,
119
+ /**
120
+ * Circle CCTP V2.
121
+ * Route is supported when `cctpV2Address` is defined on both source and destination tokens.
122
+ */
111
123
  CCTP_V2 = 4,
124
+ /**
125
+ * LayerZero OFT.
126
+ * Route is supported when source and destination tokens have the same `oftId`
127
+ * and `oftBridgeAddress` is defined on both chains.
128
+ */
112
129
  OFT = 5,
130
+ /**
131
+ * xReserve.
132
+ * Route is supported when `xReserve` is defined on both source and destination tokens.
133
+ */
113
134
  X_RESERVE = 6
114
135
  }
136
+ /**
137
+ * @deprecated Do not use.
138
+ */
115
139
  export type LegacyMessenger = Messenger.ALLBRIDGE | Messenger.WORMHOLE;
140
+ /**
141
+ * Messengers supported for transfers: {@link Messenger.CCTP}, {@link Messenger.CCTP_V2}, {@link Messenger.OFT}, {@link Messenger.X_RESERVE}
142
+ */
116
143
  export type ActiveMessenger = Exclude<Messenger, LegacyMessenger>;
117
144
  export interface ReceiveTransactionCostRequest {
118
145
  sourceChainId: number;
@@ -18,15 +18,36 @@ export var MessengerKeyDTO;
18
18
  MessengerKeyDTO["OFT"] = "oft";
19
19
  MessengerKeyDTO["X_RESERVE"] = "xReserve";
20
20
  })(MessengerKeyDTO || (MessengerKeyDTO = {}));
21
+ /**
22
+ * Bridging protocol used for a transfer.
23
+ * Only {@link ActiveMessenger} values are supported.
24
+ */
21
25
  export var Messenger;
22
26
  (function (Messenger) {
23
27
  /** @deprecated Do not use. */
24
28
  Messenger[Messenger["ALLBRIDGE"] = 1] = "ALLBRIDGE";
25
29
  /** @deprecated Do not use. */
26
30
  Messenger[Messenger["WORMHOLE"] = 2] = "WORMHOLE";
31
+ /**
32
+ * Circle CCTP.
33
+ * Route is supported when `cctpAddress` is defined on both source and destination tokens.
34
+ */
27
35
  Messenger[Messenger["CCTP"] = 3] = "CCTP";
36
+ /**
37
+ * Circle CCTP V2.
38
+ * Route is supported when `cctpV2Address` is defined on both source and destination tokens.
39
+ */
28
40
  Messenger[Messenger["CCTP_V2"] = 4] = "CCTP_V2";
41
+ /**
42
+ * LayerZero OFT.
43
+ * Route is supported when source and destination tokens have the same `oftId`
44
+ * and `oftBridgeAddress` is defined on both chains.
45
+ */
29
46
  Messenger[Messenger["OFT"] = 5] = "OFT";
47
+ /**
48
+ * xReserve.
49
+ * Route is supported when `xReserve` is defined on both source and destination tokens.
50
+ */
30
51
  Messenger[Messenger["X_RESERVE"] = 6] = "X_RESERVE";
31
52
  })(Messenger || (Messenger = {}));
32
53
  //# sourceMappingURL=core-api.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-api.model.js","sourceRoot":"","sources":["../../../../src/client/core-api/core-api.model.ts"],"names":[],"mappings":"AA6BA,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,0BAAS,CAAA;IACT,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,gDAA+B,CAAA;IAC/B,sDAAqC,CAAA;IACrC,kFAAiE,CAAA;AACnE,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAuDD,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,8BAA8B;IAC9B,0CAAuB,CAAA;IACvB,8BAA8B;IAC9B,wCAAqB,CAAA;IACrB,gCAAa,CAAA;IACb,qCAAkB,CAAA;IAClB,8BAAW,CAAA;IACX,yCAAsB,CAAA;AACxB,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B;AAkBD,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,8BAA8B;IAC9B,mDAAa,CAAA;IACb,8BAA8B;IAC9B,iDAAY,CAAA;IACZ,yCAAQ,CAAA;IACR,+CAAW,CAAA;IACX,uCAAO,CAAA;IACP,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB","sourcesContent":["import { ChainSymbol } from \"../../chains/chain.enums\";\nimport { PoolInfo, SuiAddresses } from \"../../tokens-info\";\n\nexport type ChainDetailsResponse = Record<string, ChainDetailsDTO>;\n\nexport interface AbrPayerChainInfoDTO {\n payerAddress: string;\n tokenAddress: string;\n tokenDecimals: number;\n payerAvailability: AbrPayerAvailabilityTypeDTO;\n}\n\nexport interface ChainDetailsDTO {\n tokens: TokenDTO[];\n chainId: number;\n bridgeId?: string;\n paddingUtilId?: string;\n /** @deprecated Do not use. */\n bridgeAddress: string;\n oftBridgeAddress?: string;\n abrPayer?: AbrPayerChainInfoDTO;\n swapAddress: string;\n yieldAddress?: string;\n transferTime: TransferTimeDTO;\n txCostAmount: TxCostAmountDTO;\n confirmations: number;\n suiAddresses?: SuiAddresses;\n}\n\nexport enum AddressStatus {\n OK = \"OK\",\n INVALID = \"INVALID\",\n FORBIDDEN = \"FORBIDDEN\",\n UNINITIALIZED = \"UNINITIALIZED\",\n CONTRACT_ADDRESS = \"CONTRACT_ADDRESS\",\n WRONG_ASSOCIATED_ACCOUNT_OWNER = \"WRONG_ASSOCIATED_ACCOUNT_OWNER\",\n}\n\nexport interface TokenDTO {\n symbol: string;\n name: string;\n decimals: number;\n /** @deprecated Do not use. */\n poolAddress: string;\n tokenAddress: string;\n /** @deprecated Do not use. */\n poolInfo: PoolInfoDTO;\n oftId?: string;\n /** @deprecated Do not use. */\n feeShare: string;\n /** @deprecated Do not use. */\n apr: string;\n /** @deprecated Do not use. */\n apr7d: string;\n /** @deprecated Do not use. */\n apr30d: string;\n /** @deprecated Do not use. */\n lpRate: string;\n cctpAddress?: string;\n cctpV2Address?: string;\n cctpFeeShare?: string;\n cctpV2FeeShare?: string;\n yieldId?: number;\n xReserve?: XReserveDTO;\n flags: {\n swap: boolean;\n /** @deprecated Do not use. */\n pool: boolean;\n };\n}\n\nexport interface XReserveDTO {\n bridgeAddress: string;\n feeConst: string;\n feeShare: string;\n protocolAddress?: string;\n}\n\n/**\n * @deprecated Do not use.\n */\nexport interface PoolInfoDTO {\n aValue: string;\n dValue: string;\n tokenBalance: string;\n vUsdBalance: string;\n totalLpAmount: string;\n accRewardPerShareP: string;\n p: number;\n}\n\nexport enum MessengerKeyDTO {\n /** @deprecated Do not use. */\n ALLBRIDGE = \"allbridge\",\n /** @deprecated Do not use. */\n WORMHOLE = \"wormhole\",\n CCTP = \"cctp\",\n CCTP_V2 = \"cctpV2\",\n OFT = \"oft\",\n X_RESERVE = \"xReserve\",\n}\n\nexport type AbrPayerAvailabilityKeyDTO = (typeof MessengerKeyDTO)[keyof typeof MessengerKeyDTO];\n\nexport type AbrPayerAvailabilityTypeDTO = Partial<Record<AbrPayerAvailabilityKeyDTO, boolean>>;\n\nexport type TransferTimeDTO = Record<string, MessengerTransferTimeDTO>;\n\nexport interface TxCostAmountDTO {\n maxAmount: string;\n swap: string;\n transfer: string;\n}\n\nexport type MessengerTransferTimeDTO = {\n [messenger in MessengerKeyDTO]: number | null;\n};\n\nexport enum Messenger {\n /** @deprecated Do not use. */\n ALLBRIDGE = 1,\n /** @deprecated Do not use. */\n WORMHOLE = 2,\n CCTP = 3,\n CCTP_V2 = 4,\n OFT = 5,\n X_RESERVE = 6,\n}\n\nexport type LegacyMessenger = Messenger.ALLBRIDGE | Messenger.WORMHOLE;\nexport type ActiveMessenger = Exclude<Messenger, LegacyMessenger>;\n\nexport interface ReceiveTransactionCostRequest {\n sourceChainId: number;\n destinationChainId: number;\n messenger: Messenger;\n sourceToken?: string;\n}\n\nexport interface ReceiveTransactionCostResponse {\n exchangeRate: string;\n fee: string;\n sourceNativeTokenPrice: string;\n abrExchangeRate?: string;\n adminFeeShareWithExtras?: string;\n}\n\nexport interface GasBalanceResponse {\n gasBalance: string | null;\n status: AddressStatus;\n}\n\nexport interface CheckAddressResponse {\n gasBalance: string | null;\n status: AddressStatus;\n}\n\nexport interface TransferStatusResponse {\n txId: string;\n\n sourceChainSymbol: ChainSymbol;\n destinationChainSymbol: ChainSymbol;\n\n sendAmount: string;\n sendAmountFormatted: number;\n\n stableFee: string;\n stableFeeFormatted: number;\n\n sourceTokenAddress: string;\n destinationTokenAddress: string;\n\n originSourceTokenAddress?: string;\n originDestinationTokenAddress?: string;\n\n senderAddress: string;\n recipientAddress: string;\n\n signaturesCount: number;\n signaturesNeeded: number;\n\n send: BridgeTransaction;\n receive?: BridgeTransaction;\n\n responseTime?: number;\n}\n\nexport interface BridgeTransaction {\n txId: string;\n\n sourceChainId: number;\n destinationChainId: number;\n\n fee: string;\n feeFormatted: number;\n\n stableFee: string;\n stableFeeFormatted: number;\n\n amount: string;\n amountFormatted: number;\n virtualAmount: string;\n\n bridgeContract: string;\n sender: string;\n recipient: string;\n\n sourceTokenAddress: string;\n destinationTokenAddress: string;\n\n originSourceTokenAddress?: string;\n originDestinationTokenAddress?: string;\n\n hash: string;\n\n messenger: Messenger;\n\n blockTime: number;\n blockId: string;\n\n confirmations: number;\n confirmationsNeeded: number;\n\n isClaimable?: boolean;\n}\n\n/**\n * @deprecated Do not use.\n */\nexport type PoolInfoResponse = Record<string, PoolInfo>;\n/**\n * @deprecated Do not use.\n */\nexport type PendingInfoResponse = Partial<Record<string, TokenPendingInfoDTO>>;\n/**\n * @deprecated Do not use.\n */\nexport type TokenPendingInfoDTO = Record<string, PendingInfoDTO>;\n\n/**\n * @deprecated Do not use.\n */\nexport interface PendingInfoDTO {\n pendingTxs: number;\n totalSentAmount: string;\n}\n"]}
1
+ {"version":3,"file":"core-api.model.js","sourceRoot":"","sources":["../../../../src/client/core-api/core-api.model.ts"],"names":[],"mappings":"AA6BA,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,0BAAS,CAAA;IACT,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,gDAA+B,CAAA;IAC/B,sDAAqC,CAAA;IACrC,kFAAiE,CAAA;AACnE,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAuDD,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,8BAA8B;IAC9B,0CAAuB,CAAA;IACvB,8BAA8B;IAC9B,wCAAqB,CAAA;IACrB,gCAAa,CAAA;IACb,qCAAkB,CAAA;IAClB,8BAAW,CAAA;IACX,yCAAsB,CAAA;AACxB,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B;AAkBD;;;GAGG;AACH,MAAM,CAAN,IAAY,SA0BX;AA1BD,WAAY,SAAS;IACnB,8BAA8B;IAC9B,mDAAa,CAAA;IACb,8BAA8B;IAC9B,iDAAY,CAAA;IACZ;;;OAGG;IACH,yCAAQ,CAAA;IACR;;;OAGG;IACH,+CAAW,CAAA;IACX;;;;OAIG;IACH,uCAAO,CAAA;IACP;;;OAGG;IACH,mDAAa,CAAA;AACf,CAAC,EA1BW,SAAS,KAAT,SAAS,QA0BpB","sourcesContent":["import { ChainSymbol } from \"../../chains/chain.enums\";\nimport { PoolInfo, SuiAddresses } from \"../../tokens-info\";\n\nexport type ChainDetailsResponse = Record<string, ChainDetailsDTO>;\n\nexport interface AbrPayerChainInfoDTO {\n payerAddress: string;\n tokenAddress: string;\n tokenDecimals: number;\n payerAvailability: AbrPayerAvailabilityTypeDTO;\n}\n\nexport interface ChainDetailsDTO {\n tokens: TokenDTO[];\n chainId: number;\n bridgeId?: string;\n paddingUtilId?: string;\n /** @deprecated Do not use. */\n bridgeAddress: string;\n oftBridgeAddress?: string;\n abrPayer?: AbrPayerChainInfoDTO;\n swapAddress: string;\n yieldAddress?: string;\n transferTime: TransferTimeDTO;\n txCostAmount: TxCostAmountDTO;\n confirmations: number;\n suiAddresses?: SuiAddresses;\n}\n\nexport enum AddressStatus {\n OK = \"OK\",\n INVALID = \"INVALID\",\n FORBIDDEN = \"FORBIDDEN\",\n UNINITIALIZED = \"UNINITIALIZED\",\n CONTRACT_ADDRESS = \"CONTRACT_ADDRESS\",\n WRONG_ASSOCIATED_ACCOUNT_OWNER = \"WRONG_ASSOCIATED_ACCOUNT_OWNER\",\n}\n\nexport interface TokenDTO {\n symbol: string;\n name: string;\n decimals: number;\n /** @deprecated Do not use. */\n poolAddress: string;\n tokenAddress: string;\n /** @deprecated Do not use. */\n poolInfo: PoolInfoDTO;\n oftId?: string;\n /** @deprecated Do not use. */\n feeShare: string;\n /** @deprecated Do not use. */\n apr: string;\n /** @deprecated Do not use. */\n apr7d: string;\n /** @deprecated Do not use. */\n apr30d: string;\n /** @deprecated Do not use. */\n lpRate: string;\n cctpAddress?: string;\n cctpV2Address?: string;\n cctpFeeShare?: string;\n cctpV2FeeShare?: string;\n yieldId?: number;\n xReserve?: XReserveDTO;\n flags: {\n swap: boolean;\n /** @deprecated Do not use. */\n pool: boolean;\n };\n}\n\nexport interface XReserveDTO {\n bridgeAddress: string;\n feeConst: string;\n feeShare: string;\n protocolAddress?: string;\n}\n\n/**\n * @deprecated Do not use.\n */\nexport interface PoolInfoDTO {\n aValue: string;\n dValue: string;\n tokenBalance: string;\n vUsdBalance: string;\n totalLpAmount: string;\n accRewardPerShareP: string;\n p: number;\n}\n\nexport enum MessengerKeyDTO {\n /** @deprecated Do not use. */\n ALLBRIDGE = \"allbridge\",\n /** @deprecated Do not use. */\n WORMHOLE = \"wormhole\",\n CCTP = \"cctp\",\n CCTP_V2 = \"cctpV2\",\n OFT = \"oft\",\n X_RESERVE = \"xReserve\",\n}\n\nexport type AbrPayerAvailabilityKeyDTO = (typeof MessengerKeyDTO)[keyof typeof MessengerKeyDTO];\n\nexport type AbrPayerAvailabilityTypeDTO = Partial<Record<AbrPayerAvailabilityKeyDTO, boolean>>;\n\nexport type TransferTimeDTO = Record<string, MessengerTransferTimeDTO>;\n\nexport interface TxCostAmountDTO {\n maxAmount: string;\n swap: string;\n transfer: string;\n}\n\nexport type MessengerTransferTimeDTO = {\n [messenger in MessengerKeyDTO]: number | null;\n};\n\n/**\n * Bridging protocol used for a transfer.\n * Only {@link ActiveMessenger} values are supported.\n */\nexport enum Messenger {\n /** @deprecated Do not use. */\n ALLBRIDGE = 1,\n /** @deprecated Do not use. */\n WORMHOLE = 2,\n /**\n * Circle CCTP.\n * Route is supported when `cctpAddress` is defined on both source and destination tokens.\n */\n CCTP = 3,\n /**\n * Circle CCTP V2.\n * Route is supported when `cctpV2Address` is defined on both source and destination tokens.\n */\n CCTP_V2 = 4,\n /**\n * LayerZero OFT.\n * Route is supported when source and destination tokens have the same `oftId`\n * and `oftBridgeAddress` is defined on both chains.\n */\n OFT = 5,\n /**\n * xReserve.\n * Route is supported when `xReserve` is defined on both source and destination tokens.\n */\n X_RESERVE = 6,\n}\n\n/**\n * @deprecated Do not use.\n */\nexport type LegacyMessenger = Messenger.ALLBRIDGE | Messenger.WORMHOLE;\n/**\n * Messengers supported for transfers: {@link Messenger.CCTP}, {@link Messenger.CCTP_V2}, {@link Messenger.OFT}, {@link Messenger.X_RESERVE}\n */\nexport type ActiveMessenger = Exclude<Messenger, LegacyMessenger>;\n\nexport interface ReceiveTransactionCostRequest {\n sourceChainId: number;\n destinationChainId: number;\n messenger: Messenger;\n sourceToken?: string;\n}\n\nexport interface ReceiveTransactionCostResponse {\n exchangeRate: string;\n fee: string;\n sourceNativeTokenPrice: string;\n abrExchangeRate?: string;\n adminFeeShareWithExtras?: string;\n}\n\nexport interface GasBalanceResponse {\n gasBalance: string | null;\n status: AddressStatus;\n}\n\nexport interface CheckAddressResponse {\n gasBalance: string | null;\n status: AddressStatus;\n}\n\nexport interface TransferStatusResponse {\n txId: string;\n\n sourceChainSymbol: ChainSymbol;\n destinationChainSymbol: ChainSymbol;\n\n sendAmount: string;\n sendAmountFormatted: number;\n\n stableFee: string;\n stableFeeFormatted: number;\n\n sourceTokenAddress: string;\n destinationTokenAddress: string;\n\n originSourceTokenAddress?: string;\n originDestinationTokenAddress?: string;\n\n senderAddress: string;\n recipientAddress: string;\n\n signaturesCount: number;\n signaturesNeeded: number;\n\n send: BridgeTransaction;\n receive?: BridgeTransaction;\n\n responseTime?: number;\n}\n\nexport interface BridgeTransaction {\n txId: string;\n\n sourceChainId: number;\n destinationChainId: number;\n\n fee: string;\n feeFormatted: number;\n\n stableFee: string;\n stableFeeFormatted: number;\n\n amount: string;\n amountFormatted: number;\n virtualAmount: string;\n\n bridgeContract: string;\n sender: string;\n recipient: string;\n\n sourceTokenAddress: string;\n destinationTokenAddress: string;\n\n originSourceTokenAddress?: string;\n originDestinationTokenAddress?: string;\n\n hash: string;\n\n messenger: Messenger;\n\n blockTime: number;\n blockId: string;\n\n confirmations: number;\n confirmationsNeeded: number;\n\n isClaimable?: boolean;\n}\n\n/**\n * @deprecated Do not use.\n */\nexport type PoolInfoResponse = Record<string, PoolInfo>;\n/**\n * @deprecated Do not use.\n */\nexport type PendingInfoResponse = Partial<Record<string, TokenPendingInfoDTO>>;\n/**\n * @deprecated Do not use.\n */\nexport type TokenPendingInfoDTO = Record<string, PendingInfoDTO>;\n\n/**\n * @deprecated Do not use.\n */\nexport interface PendingInfoDTO {\n pendingTxs: number;\n totalSentAmount: string;\n}\n"]}
@@ -51,6 +51,10 @@ export interface AllbridgeCoreSdkOptions {
51
51
  * @deprecated Do not use.
52
52
  */
53
53
  tronJsonRpc?: string;
54
+ /**
55
+ * Solana CCTP / CCTP V2 program ids and CCTP domains, see {@link CctpParams}.
56
+ * Required for transfers with {@link Messenger.CCTP} and {@link Messenger.CCTP_V2} from Solana.
57
+ */
54
58
  cctpParams: CctpParams;
55
59
  /**
56
60
  * The number of seconds that pool information taken from the chain will be cached.
@@ -107,8 +111,8 @@ export declare class AllbridgeCoreSdk {
107
111
  * Returns {@link ChainDetailsMap} containing a list of supported tokens groped by chain.
108
112
  *
109
113
  * @param type - A string value which specifies ChainDetailsMap to retrieve.
110
- * Can be either 'swap' for send or 'pool' for liquidity pools setup.
111
- * Defaults to 'swap'.
114
+ * Defaults to 'swap' (tokens to send).
115
+ * The 'pool' value (liquidity pools setup) is deprecated. Do not use.
112
116
  */
113
117
  /** @deprecated Do not use. */
114
118
  chainDetailsMap(type: "pool"): Promise<ChainDetailsMap>;
@@ -118,8 +122,8 @@ export declare class AllbridgeCoreSdk {
118
122
  * Returns a list of supported {@link TokenWithChainDetails | tokens}.
119
123
  *
120
124
  * @param type - A string value which specifies a set of tokens to retrieve.
121
- * Can be either 'swap' for tokens to send or 'pool' for liquidity pools operations.
122
- * Defaults to 'swap'.
125
+ * Defaults to 'swap' (tokens to send).
126
+ * The 'pool' value (liquidity pools operations) is deprecated. Do not use.
123
127
  * @returns A promise that resolves to an array of {@link TokenWithChainDetails}.
124
128
  */
125
129
  /** @deprecated Do not use. */
@@ -130,8 +134,8 @@ export declare class AllbridgeCoreSdk {
130
134
  * Returns a list of supported {@link TokenWithChainDetails | tokens} on the selected chain.
131
135
  * @param chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., "ETH" for Ethereum). For more details, see: {@link ChainSymbol}.
132
136
  * @param type - A string value which specifies a set of tokens to retrieve.
133
- * Can be either 'swap' for tokens to send or 'pool' for liquidity pools operations.
134
- * Defaults to 'swap'.
137
+ * Defaults to 'swap' (tokens to send).
138
+ * The 'pool' value (liquidity pools operations) is deprecated. Do not use.
135
139
  */
136
140
  /** @deprecated Do not use. */
137
141
  tokensByChain(chainSymbol: string, type: "pool"): Promise<TokenWithChainDetails[]>;
@@ -209,8 +213,7 @@ export declare class AllbridgeCoreSdk {
209
213
  * @param destinationChainToken selected token on the destination chain
210
214
  * @param messenger
211
215
  *
212
- * @Deprecated Use {@link getGasFeeOptions} and separately call one of:
213
- * {@link getAmountToBeReceived}, {@link getAmountToBeReceivedFromChain}, or {@link getAmountToBeReceivedFromPools}.
216
+ * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToBeReceived}.
214
217
  */
215
218
  getAmountToBeReceivedAndGasFeeOptions(amountToSendFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger): Promise<AmountsAndGasFeeOptions>;
216
219
  /**
@@ -221,16 +224,17 @@ export declare class AllbridgeCoreSdk {
221
224
  * @param destinationChainToken selected token on the destination chain
222
225
  * @param messenger
223
226
  *
224
- * @Deprecated Use {@link getGasFeeOptions} and separately call one of:
225
- * {@link getAmountToSend}, {@link getAmountToSendFromChain}, or {@link getAmountToSendFromPools}.
227
+ * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToSend}.
226
228
  */
227
229
  getAmountToSendAndGasFeeOptions(amountToBeReceivedFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger): Promise<AmountsAndGasFeeOptions>;
228
230
  /**
229
- * Calculates the amount of tokens to be received as a result of transfer.
231
+ * Calculates the amount of tokens to be received as a result of transfer
232
+ * after applying the fee of the selected messenger.
230
233
  * @param amountToSendFloat the amount of tokens that will be sent
231
234
  * @param sourceChainToken selected token on the source chain
232
235
  * @param destinationChainToken selected token on the destination chain
233
- * @param messenger selected messenger
236
+ * @param messenger selected messenger, see {@link ActiveMessenger}
237
+ * @throws CCTPDoesNotSupportedError, OFTDoesNotSupportedError or SdkError if the route is not supported by the messenger
234
238
  */
235
239
  /** @deprecated Do not use. */
236
240
  getAmountToBeReceived(amountToSendFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: LegacyMessenger): Promise<string>;
@@ -258,11 +262,13 @@ export declare class AllbridgeCoreSdk {
258
262
  /** @deprecated Do not use. */
259
263
  getAmountToBeReceivedFromPools(amountToSendFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, sourcePool: PoolInfo, destinationPool: PoolInfo, messenger: Exclude<Messenger, Messenger.OFT>): string;
260
264
  /**
261
- * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer.
265
+ * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer
266
+ * after applying the fee of the selected messenger.
262
267
  * @param amountToBeReceivedFloat the amount of tokens that should be received
263
268
  * @param sourceChainToken selected token on the source chain
264
269
  * @param destinationChainToken selected token on the destination chain
265
- * @param messenger selected messenger
270
+ * @param messenger selected messenger, see {@link ActiveMessenger}
271
+ * @throws CCTPDoesNotSupportedError, OFTDoesNotSupportedError or SdkError if the route is not supported by the messenger
266
272
  */
267
273
  /** @deprecated Do not use. */
268
274
  getAmountToSend(amountToBeReceivedFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: LegacyMessenger): Promise<string>;
@@ -293,7 +299,7 @@ export declare class AllbridgeCoreSdk {
293
299
  * Fetches possible ways to pay the transfer gas fee.
294
300
  * @param sourceChainToken selected token on the source chain
295
301
  * @param destinationChainToken selected token on the destination chain
296
- * @param messenger
302
+ * @param messenger selected messenger, see {@link ActiveMessenger}
297
303
  * @returns {@link GasFeeOptions}
298
304
  */
299
305
  getGasFeeOptions(sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger): Promise<GasFeeOptions>;
@@ -301,7 +307,7 @@ export declare class AllbridgeCoreSdk {
301
307
  * Gets the average time in ms to complete a transfer for given tokens and messenger.
302
308
  * @param sourceChainToken selected token on the source chain.
303
309
  * @param destinationChainToken selected token on the destination chain.
304
- * @param messenger
310
+ * @param messenger selected messenger, see {@link ActiveMessenger}
305
311
  * @returns Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.
306
312
  */
307
313
  getAverageTransferTime(sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger): number | null;
@@ -330,9 +336,10 @@ export declare class AllbridgeCoreSdk {
330
336
  aprInPercents(apr: string): string;
331
337
  /**
332
338
  * Get possible limit of extra gas amount.
339
+ * For {@link Messenger.X_RESERVE} extra gas is not supported and zero limits are returned.
333
340
  * @param sourceChainToken selected token on the source chain
334
341
  * @param destinationChainToken selected token on the destination chain
335
- * @param messenger selected Messenger
342
+ * @param messenger selected messenger, see {@link ActiveMessenger}
336
343
  * @returns {@link ExtraGasMaxLimitResponse}
337
344
  */
338
345
  /** @deprecated Do not use. */
package/dist/src/index.js CHANGED
@@ -139,8 +139,7 @@ export class AllbridgeCoreSdk {
139
139
  * @param destinationChainToken selected token on the destination chain
140
140
  * @param messenger
141
141
  *
142
- * @Deprecated Use {@link getGasFeeOptions} and separately call one of:
143
- * {@link getAmountToBeReceived}, {@link getAmountToBeReceivedFromChain}, or {@link getAmountToBeReceivedFromPools}.
142
+ * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToBeReceived}.
144
143
  */
145
144
  async getAmountToBeReceivedAndGasFeeOptions(amountToSendFloat, sourceChainToken, destinationChainToken, messenger) {
146
145
  return this.service.getAmountToBeReceivedAndGasFeeOptions(amountToSendFloat, sourceChainToken, destinationChainToken, messenger);
@@ -153,8 +152,7 @@ export class AllbridgeCoreSdk {
153
152
  * @param destinationChainToken selected token on the destination chain
154
153
  * @param messenger
155
154
  *
156
- * @Deprecated Use {@link getGasFeeOptions} and separately call one of:
157
- * {@link getAmountToSend}, {@link getAmountToSendFromChain}, or {@link getAmountToSendFromPools}.
155
+ * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToSend}.
158
156
  */
159
157
  async getAmountToSendAndGasFeeOptions(amountToBeReceivedFloat, sourceChainToken, destinationChainToken, messenger) {
160
158
  return this.service.getAmountToSendAndGasFeeOptions(amountToBeReceivedFloat, sourceChainToken, destinationChainToken, messenger);
@@ -215,7 +213,7 @@ export class AllbridgeCoreSdk {
215
213
  * Fetches possible ways to pay the transfer gas fee.
216
214
  * @param sourceChainToken selected token on the source chain
217
215
  * @param destinationChainToken selected token on the destination chain
218
- * @param messenger
216
+ * @param messenger selected messenger, see {@link ActiveMessenger}
219
217
  * @returns {@link GasFeeOptions}
220
218
  */
221
219
  async getGasFeeOptions(sourceChainToken, destinationChainToken, messenger) {
@@ -225,7 +223,7 @@ export class AllbridgeCoreSdk {
225
223
  * Gets the average time in ms to complete a transfer for given tokens and messenger.
226
224
  * @param sourceChainToken selected token on the source chain.
227
225
  * @param destinationChainToken selected token on the destination chain.
228
- * @param messenger
226
+ * @param messenger selected messenger, see {@link ActiveMessenger}
229
227
  * @returns Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.
230
228
  */
231
229
  getAverageTransferTime(sourceChainToken, destinationChainToken, messenger) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAeL,SAAS,GAQV,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGxE,OAAO,EAAE,YAAY,EAAS,MAAM,SAAS,CAAC;AAE9C,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AAuFzB;;GAEG;AACH,SAAS,gBAAgB,CAAC,QAAsC;IAC9D,OAAO,cAAc,IAAI,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,OAAO,gBAAgB;IAClB,MAAM,CAA0B;IAEzC,MAAM,CAAgB;IACtB;;OAEG;IACH,IAAI,CAAuB;IAC3B,KAAK,CAAe;IACpB,KAAK,CAAQ;IAEL,OAAO,CAA0B;IAEzC;;;;;;OAMG;IACH,YAAY,QAAsC,EAAE,SAAkC,OAAO;QAC3F,IAAI,iBAAoC,CAAC;QACzC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/B,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,YAAY,EAAE,GAAG,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M,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CAAC,UAAkB,EAAE,SAAgC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,2BAA2B,CAC/B,sBAA8B,EAC9B,WAAkC,EAClC,SAAgC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,sBAAsB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IAClG,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kCAAkC,CACtC,sBAA8B,EAC9B,WAAkC,EAClC,SAAgC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAC,kCAAkC,CAAC,sBAAsB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IACzG,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,oBAAoB,CACxB,MAAc,EACd,YAA0B,EAC1B,WAAkC,EAClC,SAAgC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IACzF,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/unified-signatures -- overloads intentionally expose route-specific deprecation metadata */\nimport { BigSource } from \"big.js\";\nimport { AdditionalBasicChainProperties } from \"./chains/models\";\nimport { mainnet } from \"./configs\";\nimport {\n ActiveMessenger,\n AmountFormat,\n AmountFormatted,\n AmountsAndGasFeeOptions,\n BridgeService,\n ChainDetailsMap,\n CheckAddressResponse,\n ExtraGasMaxLimitResponse,\n GasBalanceResponse,\n GasFeeOptions,\n GetNativeTokenBalanceParams,\n GetTokenBalanceParams,\n LiquidityPoolService,\n LegacyMessenger,\n Messenger,\n PendingStatusInfoResponse,\n PoolInfo,\n Provider,\n SendAmountDetails,\n SwapAndBridgeCalculationData,\n TokenWithChainDetails,\n TransferStatusResponse,\n} from \"./models\";\nimport { AllbridgeCoreSdkService, NodeRpcUrlsConfig } from \"./services\";\nimport { CctpParams } from \"./services/bridge/sol\";\nimport { YieldService } from \"./services/yield\";\nimport { DefaultUtils, Utils } from \"./utils\";\n\nexport * from \"./configs\";\nexport * from \"./models\";\n\nexport interface AllbridgeCoreSdkOptions {\n coreApiUrl: string;\n /**\n * A set of query parameters to be added to all requests to the Core API.\n */\n coreApiQueryParams?: Record<string, string>;\n /**\n * A set of headers to be added to all requests to the Core API.\n */\n coreApiHeaders?: Record<string, string>;\n /**\n * A function that returns headers to be added to a single Core API request.\n * It is evaluated right before each request\n */\n coreApiHeadersProvider?: () => Promise<Record<string, string> | undefined>;\n /**\n * Jupiter Swap Api</br>\n * Default: https://lite-api.jup.ag/swap/v1</br>\n * {@link https://dev.jup.ag/docs/swap-api/}\n */\n jupiterUrl: string;\n /**\n * Jupiter Api Key Header</br>\n * {@link https://dev.jup.ag/docs/api-setup}\n */\n jupiterApiKeyHeader?: string;\n /**\n * Jupiter v6 'maxAccounts' parameter</br>\n * Rough estimate of the max accounts to be used for the quote, so that you can compose with your own accounts</br>\n * {@link https://station.jup.ag/docs/apis/swap-api#using-maxaccounts}\n */\n jupiterMaxAccounts?: number;\n /**\n * @deprecated Do not use.\n */\n wormholeMessengerProgramId?: string;\n solanaLookUpTable: string;\n sorobanNetworkPassphrase: string;\n /**\n * Optional. Will be used in methods</br>\n * {@link LiquidityPoolService.getPoolInfoFromChain} and {@link LiquidityPoolService.getAmountToBeWithdrawn}</br>\n * to fetch information from the blockchain with fewer HTTP requests using JSON-RPC API\n * @deprecated Do not use.\n */\n tronJsonRpc?: string;\n cctpParams: CctpParams;\n /**\n * The number of seconds that pool information taken from the chain will be cached.\n *\n * @type {number}\n * @deprecated Do not use.\n */\n cachePoolInfoChainSec?: number;\n\n /**\n * @internal\n * Optional additional properties to merge with the default properties.\n */\n additionalChainsProperties?: Record<string, AdditionalBasicChainProperties>;\n\n suiIsTestnet?: boolean;\n\n stxIsTestnet?: boolean;\n stxHeroApiKey?: string;\n}\n\n/**\n * Type representing RPC node URLs for different blockchain chains.</br>\n * Provide node RPC URL for chain connection you intend to communicate with</br>\n * - required for SOL, TRX chains</br>\n * - optional for EVM chains -- you can interact by passing a {@link Provider} that will be used to communicate with the chain</br>\n * @typedef {Record<string, string>} NodeRpcUrls\n * @property {string} chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @property {string} rpcUrl - The RPC node URL for the specified chain.\n */\nexport type NodeRpcUrls = Record<string, string>;\n\n/**\n * @deprecated Use {@link NodeRpcUrls}\n */\nexport interface NodeUrlsConfig {\n solanaRpcUrl: string;\n tronRpcUrl: string;\n}\n\n/**\n * @deprecated Use {@link NodeRpcUrls}\n */\nfunction isNodeUrlsConfig(nodeUrls: NodeUrlsConfig | NodeRpcUrls): nodeUrls is NodeUrlsConfig {\n return \"solanaRpcUrl\" in nodeUrls;\n}\n\nexport class AllbridgeCoreSdk {\n readonly params: AllbridgeCoreSdkOptions;\n\n bridge: BridgeService;\n /**\n * @deprecated Do not use.\n */\n pool: LiquidityPoolService;\n yield: YieldService;\n utils: Utils;\n\n private service: AllbridgeCoreSdkService;\n\n /**\n * Initializes the SDK object.\n * @param nodeUrls node rpc urls for full functionality\n * @param params\n * Optional.\n * If not defined, the default {@link mainnet} parameters are used.\n */\n constructor(nodeUrls: NodeUrlsConfig | NodeRpcUrls, params: AllbridgeCoreSdkOptions = mainnet) {\n let nodeRpcUrlsConfig: NodeRpcUrlsConfig;\n if (isNodeUrlsConfig(nodeUrls)) {\n nodeRpcUrlsConfig = new NodeRpcUrlsConfig({ SOL: nodeUrls.solanaRpcUrl, TRX: nodeUrls.tronRpcUrl });\n } else {\n nodeRpcUrlsConfig = new NodeRpcUrlsConfig(nodeUrls);\n }\n this.service = new AllbridgeCoreSdkService(nodeRpcUrlsConfig, params);\n this.bridge = this.service.bridge;\n this.pool = this.service.pool;\n this.yield = this.service.yield;\n this.utils = new DefaultUtils(this.service);\n this.params = params;\n }\n\n /**\n * Returns {@link ChainDetailsMap} containing a list of supported tokens groped by chain.\n *\n * @param type - A string value which specifies ChainDetailsMap to retrieve.\n * Can be either 'swap' for send or 'pool' for liquidity pools setup.\n * Defaults to 'swap'.\n */\n /** @deprecated Do not use. */\n chainDetailsMap(type: \"pool\"): Promise<ChainDetailsMap>;\n chainDetailsMap(type?: \"swap\"): Promise<ChainDetailsMap>;\n chainDetailsMap(type: \"swap\" | \"pool\"): Promise<ChainDetailsMap>;\n async chainDetailsMap(type: \"swap\" | \"pool\" = \"swap\"): Promise<ChainDetailsMap> {\n return this.service.chainDetailsMap(type);\n }\n\n /**\n * Returns a list of supported {@link TokenWithChainDetails | tokens}.\n *\n * @param type - A string value which specifies a set of tokens to retrieve.\n * Can be either 'swap' for tokens to send or 'pool' for liquidity pools operations.\n * Defaults to 'swap'.\n * @returns A promise that resolves to an array of {@link TokenWithChainDetails}.\n */\n /** @deprecated Do not use. */\n tokens(type: \"pool\"): Promise<TokenWithChainDetails[]>;\n tokens(type?: \"swap\"): Promise<TokenWithChainDetails[]>;\n tokens(type: \"swap\" | \"pool\"): Promise<TokenWithChainDetails[]>;\n async tokens(type: \"swap\" | \"pool\" = \"swap\"): Promise<TokenWithChainDetails[]> {\n return this.service.tokens(type);\n }\n\n /**\n * Returns a list of supported {@link TokenWithChainDetails | tokens} on the selected chain.\n * @param chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @param type - A string value which specifies a set of tokens to retrieve.\n * Can be either 'swap' for tokens to send or 'pool' for liquidity pools operations.\n * Defaults to 'swap'.\n */\n /** @deprecated Do not use. */\n tokensByChain(chainSymbol: string, type: \"pool\"): Promise<TokenWithChainDetails[]>;\n tokensByChain(chainSymbol: string, type?: \"swap\"): Promise<TokenWithChainDetails[]>;\n tokensByChain(chainSymbol: string, type: \"swap\" | \"pool\"): Promise<TokenWithChainDetails[]>;\n async tokensByChain(chainSymbol: string, type: \"swap\" | \"pool\" = \"swap\"): Promise<TokenWithChainDetails[]> {\n return this.service.tokensByChain(chainSymbol, type);\n }\n\n /**\n * Fetches information about tokens transfer by chosen chainSymbol and transaction Id from the Allbridge Core API.\n * @param chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @param txId\n */\n async getTransferStatus(chainSymbol: string, txId: string): Promise<TransferStatusResponse> {\n return this.service.getTransferStatus(chainSymbol, txId);\n }\n\n /**\n * Get gas balance\n * @param chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @param address\n */\n async getGasBalance(chainSymbol: string, address: string): Promise<GasBalanceResponse> {\n return this.service.getGasBalance(chainSymbol, address);\n }\n\n /**\n * Check address and show gas balance\n * @deprecated\n * @param _chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @param _recipientAddress\n * @param _tokenAddress\n */\n async checkAddress(\n _chainSymbol: string,\n _recipientAddress: string,\n _tokenAddress?: string\n ): Promise<CheckAddressResponse> {\n return await this.service.checkAddress();\n }\n\n /**\n * Returns information about pending transactions for the same destination chain and the amount of tokens can be received as a result of transfer considering pending transactions.\n * @deprecated Do not use.\n * @param amount the amount of tokens that will be sent\n * @param amountFormat amount format\n * @param sourceToken selected token transfer from\n * @param destToken selected token transfer to\n * @returns range of possible amount based on already pending transactions\n */\n async getPendingStatusInfo(\n amount: string,\n amountFormat: AmountFormat,\n sourceToken: TokenWithChainDetails,\n destToken: TokenWithChainDetails\n ): Promise<PendingStatusInfoResponse> {\n return this.service.getPendingStatusInfo(amount, amountFormat, sourceToken, destToken);\n }\n\n /**\n * Get token balance\n * @param params\n * @param provider\n * @returns Token balance\n */\n async getTokenBalance(params: GetTokenBalanceParams, provider?: Provider): Promise<string> {\n return this.service.getTokenBalance(params, provider);\n }\n\n /**\n * Get native (gas) token balance\n * @param params\n * @param provider\n * @returns Token balance\n */\n async getNativeTokenBalance(params: GetNativeTokenBalanceParams, provider?: Provider): Promise<AmountFormatted> {\n return this.service.getNativeTokenBalance(params, provider);\n }\n\n /**\n * @deprecated\n * Calculates the percentage of fee from the initial amount that is charged when swapping from the selected source chain.\n * (Does not include fee related to the destination chain. Does not include gas fee)\n * @param amountFloat initial amount of tokens to swap\n * @param sourceChainToken selected token on the source chain\n * @returns fee percent\n */\n async calculateFeePercentOnSourceChain(\n amountFloat: BigSource,\n sourceChainToken: TokenWithChainDetails\n ): Promise<number> {\n return this.service.calculateFeePercentOnSourceChain(amountFloat, sourceChainToken);\n }\n\n /**\n * @deprecated\n * Calculates the percentage of fee that is charged when swapping to the selected destination chain. The destination chain fee percent applies to the amount after the source chain fee.\n * (Does not include fee related to the source chain. Does not include gas fee)\n * @see {@link calculateFeePercentOnSourceChain}\n * @param amountFloat initial amount of tokens to swap\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @returns fee percent\n */\n async calculateFeePercentOnDestinationChain(\n amountFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails\n ): Promise<number> {\n return this.service.calculateFeePercentOnDestinationChain(amountFloat, sourceChainToken, destinationChainToken);\n }\n\n /**\n * Calculates the amount of tokens to be received as a result of transfer\n * and fetches {@link GasFeeOptions} which contains available ways to pay the gas fee.\n * @param amountToSendFloat the amount of tokens that will be sent\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger\n *\n * @Deprecated Use {@link getGasFeeOptions} and separately call one of:\n * {@link getAmountToBeReceived}, {@link getAmountToBeReceivedFromChain}, or {@link getAmountToBeReceivedFromPools}.\n */\n async getAmountToBeReceivedAndGasFeeOptions(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): Promise<AmountsAndGasFeeOptions> {\n return this.service.getAmountToBeReceivedAndGasFeeOptions(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken,\n messenger\n );\n }\n\n /**\n * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer.\n * and fetches {@link GasFeeOptions} which contains available ways to pay the gas fee.\n * @param amountToBeReceivedFloat the amount of tokens that should be received\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger\n *\n * @Deprecated Use {@link getGasFeeOptions} and separately call one of:\n * {@link getAmountToSend}, {@link getAmountToSendFromChain}, or {@link getAmountToSendFromPools}.\n */\n async getAmountToSendAndGasFeeOptions(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): Promise<AmountsAndGasFeeOptions> {\n return this.service.getAmountToSendAndGasFeeOptions(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken,\n messenger\n );\n }\n\n /**\n * Calculates the amount of tokens to be received as a result of transfer.\n * @param amountToSendFloat the amount of tokens that will be sent\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger\n */\n /** @deprecated Do not use. */\n getAmountToBeReceived(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: LegacyMessenger\n ): Promise<string>;\n getAmountToBeReceived(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: ActiveMessenger\n ): Promise<string>;\n async getAmountToBeReceived(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n /**\n * The Messengers for different routes.\n */\n messenger: Messenger\n ): Promise<string> {\n return this.service.getAmountToBeReceived(amountToSendFloat, sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * Calculates the amount of tokens to be received as a result of transfer based on actual blockchain pool state.\n * @param amountToSendFloat the amount of tokens that will be sent\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger\n * @param sourceProvider Optional. source chain Provider\n * @param destinationProvider Optional. destination chain Provider\n */\n /** @deprecated Do not use. */\n getAmountToBeReceivedFromChain(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger,\n sourceProvider?: Provider,\n destinationProvider?: Provider\n ): Promise<string>;\n async getAmountToBeReceivedFromChain(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n /**\n * The Messengers for different routes.\n */\n messenger: Messenger,\n sourceProvider?: Provider,\n destinationProvider?: Provider\n ): Promise<string> {\n return this.service.getAmountToBeReceivedFromChain(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken,\n messenger,\n sourceProvider,\n destinationProvider\n );\n }\n\n /**\n * Calculates the amount of tokens to be received as a result of transfer based on passed pool state.\n * @param amountToSendFloat the amount of tokens that will be sent\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param sourcePool source token pool state\n * @param destinationPool destination token pool state\n * @param messenger selected messenger\n */\n /** @deprecated Do not use. */\n getAmountToBeReceivedFromPools(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n sourcePool: PoolInfo,\n destinationPool: PoolInfo,\n messenger: Exclude<Messenger, Messenger.OFT>\n ): string;\n getAmountToBeReceivedFromPools(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n sourcePool: PoolInfo,\n destinationPool: PoolInfo,\n messenger: Exclude<Messenger, Messenger.OFT>\n ): string {\n switch (messenger) {\n case Messenger.ALLBRIDGE:\n case Messenger.WORMHOLE:\n return this.service.getAmountToBeReceivedComputeWithPools(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken,\n sourcePool,\n destinationPool\n );\n case Messenger.CCTP:\n case Messenger.CCTP_V2:\n return this.service.getAmountToBeReceivedComputeCctp(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken,\n messenger\n );\n case Messenger.X_RESERVE:\n return this.service.getAmountToBeReceivedComputeXReserve(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken\n );\n }\n }\n\n /**\n * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer.\n * @param amountToBeReceivedFloat the amount of tokens that should be received\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger\n */\n /** @deprecated Do not use. */\n getAmountToSend(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: LegacyMessenger\n ): Promise<string>;\n getAmountToSend(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: ActiveMessenger\n ): Promise<string>;\n async getAmountToSend(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n /**\n * The Messengers for different routes.\n */\n messenger: Messenger\n ): Promise<string> {\n return this.service.getAmountToSend(amountToBeReceivedFloat, sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer based on actual blockchain pool state.\n * @param amountToBeReceivedFloat the amount of tokens that should be received\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger\n * @param sourceProvider Optional. source chain Provider\n * @param destinationProvider Optional. destination chain Provider\n */\n /** @deprecated Do not use. */\n getAmountToSendFromChain(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger,\n sourceProvider?: Provider,\n destinationProvider?: Provider\n ): Promise<string>;\n async getAmountToSendFromChain(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n /**\n * The Messengers for different routes.\n */\n messenger: Messenger,\n sourceProvider?: Provider,\n destinationProvider?: Provider\n ): Promise<string> {\n return this.service.getAmountToSendFromChain(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken,\n messenger,\n sourceProvider,\n destinationProvider\n );\n }\n\n /**\n * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer based on passed pool state.\n * @param amountToBeReceivedFloat the amount of tokens that should be received\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param sourcePool source token pool state\n * @param destinationPool destination token pool state\n * @param messenger selected messenger\n */\n /** @deprecated Do not use. */\n getAmountToSendFromPools(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n sourcePool: PoolInfo,\n destinationPool: PoolInfo,\n messenger: Exclude<Messenger, Messenger.OFT>\n ): string;\n getAmountToSendFromPools(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n sourcePool: PoolInfo,\n destinationPool: PoolInfo,\n messenger: Exclude<Messenger, Messenger.OFT>\n ): string {\n switch (messenger) {\n case Messenger.ALLBRIDGE:\n case Messenger.WORMHOLE:\n return this.service.getAmountToSendComputeWithPools(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken,\n sourcePool,\n destinationPool\n );\n case Messenger.CCTP:\n case Messenger.CCTP_V2:\n return this.service.getAmountToSendComputeCctp(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken,\n messenger\n );\n case Messenger.X_RESERVE:\n return this.service.getAmountToSendComputeXReserve(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken\n );\n }\n }\n\n /**\n * Fetches possible ways to pay the transfer gas fee.\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger\n * @returns {@link GasFeeOptions}\n */\n async getGasFeeOptions(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): Promise<GasFeeOptions> {\n return this.service.getGasFeeOptions(sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * Gets the average time in ms to complete a transfer for given tokens and messenger.\n * @param sourceChainToken selected token on the source chain.\n * @param destinationChainToken selected token on the destination chain.\n * @param messenger\n * @returns Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.\n */\n getAverageTransferTime(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): number | null {\n return this.service.getAverageTransferTime(sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * Gets information about the poolInfo by token\n * @deprecated Do not use.\n * @param token\n * @returns poolInfo\n */\n async getPoolInfoByToken(token: TokenWithChainDetails): Promise<PoolInfo> {\n return this.service.getPoolInfoByToken(token);\n }\n\n /**\n * Forces refresh of cached information about the state of liquidity pools.\n * Outdated cache leads to calculated amounts being less accurate.\n * The cache is invalidated at regular intervals, but it can be forced to be refreshed by calling this method.+\n *\n * @deprecated Do not use.\n * @param tokens if present, the corresponding liquidity pools will be updated\n */\n async refreshPoolInfo(tokens?: TokenWithChainDetails | TokenWithChainDetails[]): Promise<void> {\n return this.service.refreshPoolInfo(tokens);\n }\n\n /**\n * Convert APR to percentage view\n * @deprecated Do not use.\n * @param apr\n * @returns aprPercentageView\n */\n aprInPercents(apr: string): string {\n return this.service.aprInPercents(apr);\n }\n\n /**\n * Get possible limit of extra gas amount.\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected Messenger\n * @returns {@link ExtraGasMaxLimitResponse}\n */\n /** @deprecated Do not use. */\n getExtraGasMaxLimits(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: LegacyMessenger\n ): Promise<ExtraGasMaxLimitResponse>;\n getExtraGasMaxLimits(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: ActiveMessenger\n ): Promise<ExtraGasMaxLimitResponse>;\n async getExtraGasMaxLimits(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): Promise<ExtraGasMaxLimitResponse> {\n return this.service.getExtraGasMaxLimits(sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * @deprecated Do not use.\n * @param amount - amount\n * @param amountFormat - AmountFormat\n * @param sourceToken - selected token on the source chain\n * @return virtual amount\n */\n async getVUsdFromAmount(\n amount: string,\n amountFormat: AmountFormat,\n sourceToken: TokenWithChainDetails\n ): Promise<AmountFormatted> {\n return this.service.getVUsdFromAmount(amount, amountFormat, sourceToken);\n }\n\n /**\n * @deprecated Do not use.\n * @param vUsdAmount - amount of vUsd, int format\n * @param destToken selected token on the destination chain\n * @return amount of destToken\n */\n async getAmountFromVUsd(vUsdAmount: string, destToken: TokenWithChainDetails): Promise<AmountFormatted> {\n return this.service.getAmountFromVUsd(vUsdAmount, destToken);\n }\n\n /**\n * @deprecated Use {@link getSendAmountDetails}\n * @param amountInTokenPrecision\n * @param sourceToken\n * @param destToken\n */\n async swapAndBridgeFeeCalculation(\n amountInTokenPrecision: string,\n sourceToken: TokenWithChainDetails,\n destToken: TokenWithChainDetails\n ): Promise<SwapAndBridgeCalculationData> {\n return this.service.swapAndBridgeFeeCalculation(amountInTokenPrecision, sourceToken, destToken);\n }\n\n /**\n * @deprecated Use {@link getAmountToBeReceived} and then {@link getSendAmountDetails}\n * @param amountInTokenPrecision\n * @param sourceToken\n * @param destToken\n */\n async swapAndBridgeFeeCalculationReverse(\n amountInTokenPrecision: string,\n sourceToken: TokenWithChainDetails,\n destToken: TokenWithChainDetails\n ): Promise<SwapAndBridgeCalculationData> {\n return this.service.swapAndBridgeFeeCalculationReverse(amountInTokenPrecision, sourceToken, destToken);\n }\n\n /**\n * Show amount changes (fee and amount adjustment) during send through pools on source and destination chains\n * @deprecated Do not use.\n */\n async getSendAmountDetails(\n amount: string,\n amountFormat: AmountFormat,\n sourceToken: TokenWithChainDetails,\n destToken: TokenWithChainDetails\n ): Promise<SendAmountDetails> {\n return this.service.getSendAmountDetails(amount, amountFormat, sourceToken, destToken);\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAeL,SAAS,GAQV,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGxE,OAAO,EAAE,YAAY,EAAS,MAAM,SAAS,CAAC;AAE9C,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AA2FzB;;GAEG;AACH,SAAS,gBAAgB,CAAC,QAAsC;IAC9D,OAAO,cAAc,IAAI,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,OAAO,gBAAgB;IAClB,MAAM,CAA0B;IAEzC,MAAM,CAAgB;IACtB;;OAEG;IACH,IAAI,CAAuB;IAC3B,KAAK,CAAe;IACpB,KAAK,CAAQ;IAEL,OAAO,CAA0B;IAEzC;;;;;;OAMG;IACH,YAAY,QAAsC,EAAE,SAAkC,OAAO;QAC3F,IAAI,iBAAoC,CAAC;QACzC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/B,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;QACtG,CAAC;aAAM,CAAC;YACN,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,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SAAgC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,2BAA2B,CAC/B,sBAA8B,EAC9B,WAAkC,EAClC,SAAgC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,sBAAsB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IAClG,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kCAAkC,CACtC,sBAA8B,EAC9B,WAAkC,EAClC,SAAgC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAC,kCAAkC,CAAC,sBAAsB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IACzG,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,oBAAoB,CACxB,MAAc,EACd,YAA0B,EAC1B,WAAkC,EAClC,SAAgC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IACzF,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/unified-signatures -- overloads intentionally expose route-specific deprecation metadata */\nimport { BigSource } from \"big.js\";\nimport { AdditionalBasicChainProperties } from \"./chains/models\";\nimport { mainnet } from \"./configs\";\nimport {\n ActiveMessenger,\n AmountFormat,\n AmountFormatted,\n AmountsAndGasFeeOptions,\n BridgeService,\n ChainDetailsMap,\n CheckAddressResponse,\n ExtraGasMaxLimitResponse,\n GasBalanceResponse,\n GasFeeOptions,\n GetNativeTokenBalanceParams,\n GetTokenBalanceParams,\n LiquidityPoolService,\n LegacyMessenger,\n Messenger,\n PendingStatusInfoResponse,\n PoolInfo,\n Provider,\n SendAmountDetails,\n SwapAndBridgeCalculationData,\n TokenWithChainDetails,\n TransferStatusResponse,\n} from \"./models\";\nimport { AllbridgeCoreSdkService, NodeRpcUrlsConfig } from \"./services\";\nimport { CctpParams } from \"./services/bridge/sol\";\nimport { YieldService } from \"./services/yield\";\nimport { DefaultUtils, Utils } from \"./utils\";\n\nexport * from \"./configs\";\nexport * from \"./models\";\n\nexport interface AllbridgeCoreSdkOptions {\n coreApiUrl: string;\n /**\n * A set of query parameters to be added to all requests to the Core API.\n */\n coreApiQueryParams?: Record<string, string>;\n /**\n * A set of headers to be added to all requests to the Core API.\n */\n coreApiHeaders?: Record<string, string>;\n /**\n * A function that returns headers to be added to a single Core API request.\n * It is evaluated right before each request\n */\n coreApiHeadersProvider?: () => Promise<Record<string, string> | undefined>;\n /**\n * Jupiter Swap Api</br>\n * Default: https://lite-api.jup.ag/swap/v1</br>\n * {@link https://dev.jup.ag/docs/swap-api/}\n */\n jupiterUrl: string;\n /**\n * Jupiter Api Key Header</br>\n * {@link https://dev.jup.ag/docs/api-setup}\n */\n jupiterApiKeyHeader?: string;\n /**\n * Jupiter v6 'maxAccounts' parameter</br>\n * Rough estimate of the max accounts to be used for the quote, so that you can compose with your own accounts</br>\n * {@link https://station.jup.ag/docs/apis/swap-api#using-maxaccounts}\n */\n jupiterMaxAccounts?: number;\n /**\n * @deprecated Do not use.\n */\n wormholeMessengerProgramId?: string;\n solanaLookUpTable: string;\n sorobanNetworkPassphrase: string;\n /**\n * Optional. Will be used in methods</br>\n * {@link LiquidityPoolService.getPoolInfoFromChain} and {@link LiquidityPoolService.getAmountToBeWithdrawn}</br>\n * to fetch information from the blockchain with fewer HTTP requests using JSON-RPC API\n * @deprecated Do not use.\n */\n tronJsonRpc?: string;\n /**\n * Solana CCTP / CCTP V2 program ids and CCTP domains, see {@link CctpParams}.\n * Required for transfers with {@link Messenger.CCTP} and {@link Messenger.CCTP_V2} from Solana.\n */\n cctpParams: CctpParams;\n /**\n * The number of seconds that pool information taken from the chain will be cached.\n *\n * @type {number}\n * @deprecated Do not use.\n */\n cachePoolInfoChainSec?: number;\n\n /**\n * @internal\n * Optional additional properties to merge with the default properties.\n */\n additionalChainsProperties?: Record<string, AdditionalBasicChainProperties>;\n\n suiIsTestnet?: boolean;\n\n stxIsTestnet?: boolean;\n stxHeroApiKey?: string;\n}\n\n/**\n * Type representing RPC node URLs for different blockchain chains.</br>\n * Provide node RPC URL for chain connection you intend to communicate with</br>\n * - required for SOL, TRX chains</br>\n * - optional for EVM chains -- you can interact by passing a {@link Provider} that will be used to communicate with the chain</br>\n * @typedef {Record<string, string>} NodeRpcUrls\n * @property {string} chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @property {string} rpcUrl - The RPC node URL for the specified chain.\n */\nexport type NodeRpcUrls = Record<string, string>;\n\n/**\n * @deprecated Use {@link NodeRpcUrls}\n */\nexport interface NodeUrlsConfig {\n solanaRpcUrl: string;\n tronRpcUrl: string;\n}\n\n/**\n * @deprecated Use {@link NodeRpcUrls}\n */\nfunction isNodeUrlsConfig(nodeUrls: NodeUrlsConfig | NodeRpcUrls): nodeUrls is NodeUrlsConfig {\n return \"solanaRpcUrl\" in nodeUrls;\n}\n\nexport class AllbridgeCoreSdk {\n readonly params: AllbridgeCoreSdkOptions;\n\n bridge: BridgeService;\n /**\n * @deprecated Do not use.\n */\n pool: LiquidityPoolService;\n yield: YieldService;\n utils: Utils;\n\n private service: AllbridgeCoreSdkService;\n\n /**\n * Initializes the SDK object.\n * @param nodeUrls node rpc urls for full functionality\n * @param params\n * Optional.\n * If not defined, the default {@link mainnet} parameters are used.\n */\n constructor(nodeUrls: NodeUrlsConfig | NodeRpcUrls, params: AllbridgeCoreSdkOptions = mainnet) {\n let nodeRpcUrlsConfig: NodeRpcUrlsConfig;\n if (isNodeUrlsConfig(nodeUrls)) {\n nodeRpcUrlsConfig = new NodeRpcUrlsConfig({ SOL: nodeUrls.solanaRpcUrl, TRX: nodeUrls.tronRpcUrl });\n } else {\n nodeRpcUrlsConfig = new NodeRpcUrlsConfig(nodeUrls);\n }\n this.service = new AllbridgeCoreSdkService(nodeRpcUrlsConfig, params);\n this.bridge = this.service.bridge;\n this.pool = this.service.pool;\n this.yield = this.service.yield;\n this.utils = new DefaultUtils(this.service);\n this.params = params;\n }\n\n /**\n * Returns {@link ChainDetailsMap} containing a list of supported tokens groped by chain.\n *\n * @param type - A string value which specifies ChainDetailsMap to retrieve.\n * Defaults to 'swap' (tokens to send).\n * The 'pool' value (liquidity pools setup) is deprecated. Do not use.\n */\n /** @deprecated Do not use. */\n chainDetailsMap(type: \"pool\"): Promise<ChainDetailsMap>;\n chainDetailsMap(type?: \"swap\"): Promise<ChainDetailsMap>;\n chainDetailsMap(type: \"swap\" | \"pool\"): Promise<ChainDetailsMap>;\n async chainDetailsMap(type: \"swap\" | \"pool\" = \"swap\"): Promise<ChainDetailsMap> {\n return this.service.chainDetailsMap(type);\n }\n\n /**\n * Returns a list of supported {@link TokenWithChainDetails | tokens}.\n *\n * @param type - A string value which specifies a set of tokens to retrieve.\n * Defaults to 'swap' (tokens to send).\n * The 'pool' value (liquidity pools operations) is deprecated. Do not use.\n * @returns A promise that resolves to an array of {@link TokenWithChainDetails}.\n */\n /** @deprecated Do not use. */\n tokens(type: \"pool\"): Promise<TokenWithChainDetails[]>;\n tokens(type?: \"swap\"): Promise<TokenWithChainDetails[]>;\n tokens(type: \"swap\" | \"pool\"): Promise<TokenWithChainDetails[]>;\n async tokens(type: \"swap\" | \"pool\" = \"swap\"): Promise<TokenWithChainDetails[]> {\n return this.service.tokens(type);\n }\n\n /**\n * Returns a list of supported {@link TokenWithChainDetails | tokens} on the selected chain.\n * @param chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @param type - A string value which specifies a set of tokens to retrieve.\n * Defaults to 'swap' (tokens to send).\n * The 'pool' value (liquidity pools operations) is deprecated. Do not use.\n */\n /** @deprecated Do not use. */\n tokensByChain(chainSymbol: string, type: \"pool\"): Promise<TokenWithChainDetails[]>;\n tokensByChain(chainSymbol: string, type?: \"swap\"): Promise<TokenWithChainDetails[]>;\n tokensByChain(chainSymbol: string, type: \"swap\" | \"pool\"): Promise<TokenWithChainDetails[]>;\n async tokensByChain(chainSymbol: string, type: \"swap\" | \"pool\" = \"swap\"): Promise<TokenWithChainDetails[]> {\n return this.service.tokensByChain(chainSymbol, type);\n }\n\n /**\n * Fetches information about tokens transfer by chosen chainSymbol and transaction Id from the Allbridge Core API.\n * @param chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @param txId\n */\n async getTransferStatus(chainSymbol: string, txId: string): Promise<TransferStatusResponse> {\n return this.service.getTransferStatus(chainSymbol, txId);\n }\n\n /**\n * Get gas balance\n * @param chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @param address\n */\n async getGasBalance(chainSymbol: string, address: string): Promise<GasBalanceResponse> {\n return this.service.getGasBalance(chainSymbol, address);\n }\n\n /**\n * Check address and show gas balance\n * @deprecated\n * @param _chainSymbol - The symbol of the chain representing one of the supported blockchain networks (e.g., \"ETH\" for Ethereum). For more details, see: {@link ChainSymbol}.\n * @param _recipientAddress\n * @param _tokenAddress\n */\n async checkAddress(\n _chainSymbol: string,\n _recipientAddress: string,\n _tokenAddress?: string\n ): Promise<CheckAddressResponse> {\n return await this.service.checkAddress();\n }\n\n /**\n * Returns information about pending transactions for the same destination chain and the amount of tokens can be received as a result of transfer considering pending transactions.\n * @deprecated Do not use.\n * @param amount the amount of tokens that will be sent\n * @param amountFormat amount format\n * @param sourceToken selected token transfer from\n * @param destToken selected token transfer to\n * @returns range of possible amount based on already pending transactions\n */\n async getPendingStatusInfo(\n amount: string,\n amountFormat: AmountFormat,\n sourceToken: TokenWithChainDetails,\n destToken: TokenWithChainDetails\n ): Promise<PendingStatusInfoResponse> {\n return this.service.getPendingStatusInfo(amount, amountFormat, sourceToken, destToken);\n }\n\n /**\n * Get token balance\n * @param params\n * @param provider\n * @returns Token balance\n */\n async getTokenBalance(params: GetTokenBalanceParams, provider?: Provider): Promise<string> {\n return this.service.getTokenBalance(params, provider);\n }\n\n /**\n * Get native (gas) token balance\n * @param params\n * @param provider\n * @returns Token balance\n */\n async getNativeTokenBalance(params: GetNativeTokenBalanceParams, provider?: Provider): Promise<AmountFormatted> {\n return this.service.getNativeTokenBalance(params, provider);\n }\n\n /**\n * @deprecated\n * Calculates the percentage of fee from the initial amount that is charged when swapping from the selected source chain.\n * (Does not include fee related to the destination chain. Does not include gas fee)\n * @param amountFloat initial amount of tokens to swap\n * @param sourceChainToken selected token on the source chain\n * @returns fee percent\n */\n async calculateFeePercentOnSourceChain(\n amountFloat: BigSource,\n sourceChainToken: TokenWithChainDetails\n ): Promise<number> {\n return this.service.calculateFeePercentOnSourceChain(amountFloat, sourceChainToken);\n }\n\n /**\n * @deprecated\n * Calculates the percentage of fee that is charged when swapping to the selected destination chain. The destination chain fee percent applies to the amount after the source chain fee.\n * (Does not include fee related to the source chain. Does not include gas fee)\n * @see {@link calculateFeePercentOnSourceChain}\n * @param amountFloat initial amount of tokens to swap\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @returns fee percent\n */\n async calculateFeePercentOnDestinationChain(\n amountFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails\n ): Promise<number> {\n return this.service.calculateFeePercentOnDestinationChain(amountFloat, sourceChainToken, destinationChainToken);\n }\n\n /**\n * Calculates the amount of tokens to be received as a result of transfer\n * and fetches {@link GasFeeOptions} which contains available ways to pay the gas fee.\n * @param amountToSendFloat the amount of tokens that will be sent\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger\n *\n * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToBeReceived}.\n */\n async getAmountToBeReceivedAndGasFeeOptions(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): Promise<AmountsAndGasFeeOptions> {\n return this.service.getAmountToBeReceivedAndGasFeeOptions(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken,\n messenger\n );\n }\n\n /**\n * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer.\n * and fetches {@link GasFeeOptions} which contains available ways to pay the gas fee.\n * @param amountToBeReceivedFloat the amount of tokens that should be received\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger\n *\n * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToSend}.\n */\n async getAmountToSendAndGasFeeOptions(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): Promise<AmountsAndGasFeeOptions> {\n return this.service.getAmountToSendAndGasFeeOptions(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken,\n messenger\n );\n }\n\n /**\n * Calculates the amount of tokens to be received as a result of transfer\n * after applying the fee of the selected messenger.\n * @param amountToSendFloat the amount of tokens that will be sent\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger, see {@link ActiveMessenger}\n * @throws CCTPDoesNotSupportedError, OFTDoesNotSupportedError or SdkError if the route is not supported by the messenger\n */\n /** @deprecated Do not use. */\n getAmountToBeReceived(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: LegacyMessenger\n ): Promise<string>;\n getAmountToBeReceived(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: ActiveMessenger\n ): Promise<string>;\n async getAmountToBeReceived(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n /**\n * The Messengers for different routes.\n */\n messenger: Messenger\n ): Promise<string> {\n return this.service.getAmountToBeReceived(amountToSendFloat, sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * Calculates the amount of tokens to be received as a result of transfer based on actual blockchain pool state.\n * @param amountToSendFloat the amount of tokens that will be sent\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger\n * @param sourceProvider Optional. source chain Provider\n * @param destinationProvider Optional. destination chain Provider\n */\n /** @deprecated Do not use. */\n getAmountToBeReceivedFromChain(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger,\n sourceProvider?: Provider,\n destinationProvider?: Provider\n ): Promise<string>;\n async getAmountToBeReceivedFromChain(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n /**\n * The Messengers for different routes.\n */\n messenger: Messenger,\n sourceProvider?: Provider,\n destinationProvider?: Provider\n ): Promise<string> {\n return this.service.getAmountToBeReceivedFromChain(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken,\n messenger,\n sourceProvider,\n destinationProvider\n );\n }\n\n /**\n * Calculates the amount of tokens to be received as a result of transfer based on passed pool state.\n * @param amountToSendFloat the amount of tokens that will be sent\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param sourcePool source token pool state\n * @param destinationPool destination token pool state\n * @param messenger selected messenger\n */\n /** @deprecated Do not use. */\n getAmountToBeReceivedFromPools(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n sourcePool: PoolInfo,\n destinationPool: PoolInfo,\n messenger: Exclude<Messenger, Messenger.OFT>\n ): string;\n getAmountToBeReceivedFromPools(\n amountToSendFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n sourcePool: PoolInfo,\n destinationPool: PoolInfo,\n messenger: Exclude<Messenger, Messenger.OFT>\n ): string {\n switch (messenger) {\n case Messenger.ALLBRIDGE:\n case Messenger.WORMHOLE:\n return this.service.getAmountToBeReceivedComputeWithPools(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken,\n sourcePool,\n destinationPool\n );\n case Messenger.CCTP:\n case Messenger.CCTP_V2:\n return this.service.getAmountToBeReceivedComputeCctp(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken,\n messenger\n );\n case Messenger.X_RESERVE:\n return this.service.getAmountToBeReceivedComputeXReserve(\n amountToSendFloat,\n sourceChainToken,\n destinationChainToken\n );\n }\n }\n\n /**\n * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer\n * after applying the fee of the selected messenger.\n * @param amountToBeReceivedFloat the amount of tokens that should be received\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger, see {@link ActiveMessenger}\n * @throws CCTPDoesNotSupportedError, OFTDoesNotSupportedError or SdkError if the route is not supported by the messenger\n */\n /** @deprecated Do not use. */\n getAmountToSend(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: LegacyMessenger\n ): Promise<string>;\n getAmountToSend(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: ActiveMessenger\n ): Promise<string>;\n async getAmountToSend(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n /**\n * The Messengers for different routes.\n */\n messenger: Messenger\n ): Promise<string> {\n return this.service.getAmountToSend(amountToBeReceivedFloat, sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer based on actual blockchain pool state.\n * @param amountToBeReceivedFloat the amount of tokens that should be received\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger\n * @param sourceProvider Optional. source chain Provider\n * @param destinationProvider Optional. destination chain Provider\n */\n /** @deprecated Do not use. */\n getAmountToSendFromChain(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger,\n sourceProvider?: Provider,\n destinationProvider?: Provider\n ): Promise<string>;\n async getAmountToSendFromChain(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n /**\n * The Messengers for different routes.\n */\n messenger: Messenger,\n sourceProvider?: Provider,\n destinationProvider?: Provider\n ): Promise<string> {\n return this.service.getAmountToSendFromChain(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken,\n messenger,\n sourceProvider,\n destinationProvider\n );\n }\n\n /**\n * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer based on passed pool state.\n * @param amountToBeReceivedFloat the amount of tokens that should be received\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param sourcePool source token pool state\n * @param destinationPool destination token pool state\n * @param messenger selected messenger\n */\n /** @deprecated Do not use. */\n getAmountToSendFromPools(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n sourcePool: PoolInfo,\n destinationPool: PoolInfo,\n messenger: Exclude<Messenger, Messenger.OFT>\n ): string;\n getAmountToSendFromPools(\n amountToBeReceivedFloat: BigSource,\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n sourcePool: PoolInfo,\n destinationPool: PoolInfo,\n messenger: Exclude<Messenger, Messenger.OFT>\n ): string {\n switch (messenger) {\n case Messenger.ALLBRIDGE:\n case Messenger.WORMHOLE:\n return this.service.getAmountToSendComputeWithPools(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken,\n sourcePool,\n destinationPool\n );\n case Messenger.CCTP:\n case Messenger.CCTP_V2:\n return this.service.getAmountToSendComputeCctp(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken,\n messenger\n );\n case Messenger.X_RESERVE:\n return this.service.getAmountToSendComputeXReserve(\n amountToBeReceivedFloat,\n sourceChainToken,\n destinationChainToken\n );\n }\n }\n\n /**\n * Fetches possible ways to pay the transfer gas fee.\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger, see {@link ActiveMessenger}\n * @returns {@link GasFeeOptions}\n */\n async getGasFeeOptions(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): Promise<GasFeeOptions> {\n return this.service.getGasFeeOptions(sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * Gets the average time in ms to complete a transfer for given tokens and messenger.\n * @param sourceChainToken selected token on the source chain.\n * @param destinationChainToken selected token on the destination chain.\n * @param messenger selected messenger, see {@link ActiveMessenger}\n * @returns Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.\n */\n getAverageTransferTime(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): number | null {\n return this.service.getAverageTransferTime(sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * Gets information about the poolInfo by token\n * @deprecated Do not use.\n * @param token\n * @returns poolInfo\n */\n async getPoolInfoByToken(token: TokenWithChainDetails): Promise<PoolInfo> {\n return this.service.getPoolInfoByToken(token);\n }\n\n /**\n * Forces refresh of cached information about the state of liquidity pools.\n * Outdated cache leads to calculated amounts being less accurate.\n * The cache is invalidated at regular intervals, but it can be forced to be refreshed by calling this method.+\n *\n * @deprecated Do not use.\n * @param tokens if present, the corresponding liquidity pools will be updated\n */\n async refreshPoolInfo(tokens?: TokenWithChainDetails | TokenWithChainDetails[]): Promise<void> {\n return this.service.refreshPoolInfo(tokens);\n }\n\n /**\n * Convert APR to percentage view\n * @deprecated Do not use.\n * @param apr\n * @returns aprPercentageView\n */\n aprInPercents(apr: string): string {\n return this.service.aprInPercents(apr);\n }\n\n /**\n * Get possible limit of extra gas amount.\n * For {@link Messenger.X_RESERVE} extra gas is not supported and zero limits are returned.\n * @param sourceChainToken selected token on the source chain\n * @param destinationChainToken selected token on the destination chain\n * @param messenger selected messenger, see {@link ActiveMessenger}\n * @returns {@link ExtraGasMaxLimitResponse}\n */\n /** @deprecated Do not use. */\n getExtraGasMaxLimits(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: LegacyMessenger\n ): Promise<ExtraGasMaxLimitResponse>;\n getExtraGasMaxLimits(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: ActiveMessenger\n ): Promise<ExtraGasMaxLimitResponse>;\n async getExtraGasMaxLimits(\n sourceChainToken: TokenWithChainDetails,\n destinationChainToken: TokenWithChainDetails,\n messenger: Messenger\n ): Promise<ExtraGasMaxLimitResponse> {\n return this.service.getExtraGasMaxLimits(sourceChainToken, destinationChainToken, messenger);\n }\n\n /**\n * @deprecated Do not use.\n * @param amount - amount\n * @param amountFormat - AmountFormat\n * @param sourceToken - selected token on the source chain\n * @return virtual amount\n */\n async getVUsdFromAmount(\n amount: string,\n amountFormat: AmountFormat,\n sourceToken: TokenWithChainDetails\n ): Promise<AmountFormatted> {\n return this.service.getVUsdFromAmount(amount, amountFormat, sourceToken);\n }\n\n /**\n * @deprecated Do not use.\n * @param vUsdAmount - amount of vUsd, int format\n * @param destToken selected token on the destination chain\n * @return amount of destToken\n */\n async getAmountFromVUsd(vUsdAmount: string, destToken: TokenWithChainDetails): Promise<AmountFormatted> {\n return this.service.getAmountFromVUsd(vUsdAmount, destToken);\n }\n\n /**\n * @deprecated Use {@link getSendAmountDetails}\n * @param amountInTokenPrecision\n * @param sourceToken\n * @param destToken\n */\n async swapAndBridgeFeeCalculation(\n amountInTokenPrecision: string,\n sourceToken: TokenWithChainDetails,\n destToken: TokenWithChainDetails\n ): Promise<SwapAndBridgeCalculationData> {\n return this.service.swapAndBridgeFeeCalculation(amountInTokenPrecision, sourceToken, destToken);\n }\n\n /**\n * @deprecated Use {@link getAmountToBeReceived} and then {@link getSendAmountDetails}\n * @param amountInTokenPrecision\n * @param sourceToken\n * @param destToken\n */\n async swapAndBridgeFeeCalculationReverse(\n amountInTokenPrecision: string,\n sourceToken: TokenWithChainDetails,\n destToken: TokenWithChainDetails\n ): Promise<SwapAndBridgeCalculationData> {\n return this.service.swapAndBridgeFeeCalculationReverse(amountInTokenPrecision, sourceToken, destToken);\n }\n\n /**\n * Show amount changes (fee and amount adjustment) during send through pools on source and destination chains\n * @deprecated Do not use.\n */\n async getSendAmountDetails(\n amount: string,\n amountFormat: AmountFormat,\n sourceToken: TokenWithChainDetails,\n destToken: TokenWithChainDetails\n ): Promise<SendAmountDetails> {\n return this.service.getSendAmountDetails(amount, amountFormat, sourceToken, destToken);\n }\n}\n"]}
@@ -34,6 +34,9 @@ export declare enum FeePaymentMethod {
34
34
  */
35
35
  WITH_ABR = "abr"
36
36
  }
37
+ /**
38
+ * @deprecated Do not use.
39
+ */
37
40
  export interface AmountsAndGasFeeOptions {
38
41
  /**
39
42
  * The floating point amount of tokens to be sent (not including gas fee).
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,SAAS,EAKT,aAAa,GACd,MAAM,mCAAmC,CAAC;AAY3C,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmCzF,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAG/D,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,mDAA+B,CAAA;IAE/B;;OAEG;IACH,kDAA8B,CAAA;IAE9B;;OAEG;IACH,oCAAgB,CAAA;AAClB,CAAC,EAfW,gBAAgB,KAAhB,gBAAgB,QAe3B;AAqCD;;;;GAIG;AACH,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,+BAAe,CAAA;AACjB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB","sourcesContent":["export {\n ApproveParams as BridgeApproveParams,\n BaseSendParams,\n CheckAllowanceParams,\n GetAllowanceParams,\n GetTokenBalanceParams,\n SendParams,\n SwapParams,\n GetNativeTokenBalanceParams,\n} from \"../services/bridge/models/bridge.model\";\nexport { BridgeService } from \"../services/bridge/index\";\nexport { CctpParams, CctpDomains } from \"../services/bridge/sol\";\nexport { LiquidityPoolService } from \"../services/liquidity-pool/index\";\nexport {\n ActiveMessenger,\n LegacyMessenger,\n Messenger,\n TransferStatusResponse,\n BridgeTransaction,\n GasBalanceResponse,\n CheckAddressResponse,\n AddressStatus,\n} from \"../client/core-api/core-api.model\";\nexport { RawBridgeTransactionBuilder } from \"../services/bridge/raw-bridge-transaction-builder\";\nexport { RawPoolTransactionBuilder } from \"../services/liquidity-pool/raw-pool-transaction-builder\";\nexport {\n UserBalanceInfo,\n UserBalanceInfoDTO,\n LiquidityPoolsParams,\n LiquidityPoolsParamsWithAmount,\n ApproveParams as LiquidityPoolsApproveParams,\n CheckAllowanceParams as LiquidityPoolsCheckAllowanceParams,\n GetAllowanceParams as LiquidityPoolsGetAllowanceParams,\n} from \"../services/liquidity-pool/models/pool.model\";\nexport * from \"../services/models/index\";\nexport { YieldService } from \"../services/yield/index\";\nexport { assertYieldIsSupported, isYieldSupported } from \"../services/yield/validations\";\nexport {\n TokenWithChainDetailsYield,\n CYDToken,\n YieldGetAllowanceParams,\n YieldCheckAllowanceParams,\n YieldBalanceParams,\n YieldGetEstimatedAmountOnDepositParams,\n YieldGetWithdrawProportionAmountParams,\n YieldWithdrawAmount,\n YieldApproveParams,\n YieldDepositParams,\n YieldWithdrawParams,\n} from \"../services/yield/models/yield.model\";\nexport { RawYieldTransactionBuilder } from \"../services/yield/raw-yield-transaction-builder\";\nexport {\n SwapAndBridgeCalculationData,\n SwapFromVUsdCalcResult,\n SwapToVUsdCalcResult,\n} from \"../utils/calculation/swap-and-bridge-fee-calc\";\nexport { SendAmountDetails, AmountImpact } from \"../utils/calculation/swap-and-bridge-details\";\nexport {\n PoolInfo,\n TokenCoreFields,\n TokenWithChainDetails,\n TransferTime,\n TxCostAmount,\n SuiAddresses,\n MessengerTransferTime,\n ChainDetailsMap,\n ChainDetailsWithTokens,\n} from \"../tokens-info\";\nexport { Utils } from \"../utils\";\nexport { SrbUtils, TrustLineParams } from \"../utils/srb\";\nexport { SolUtils } from \"../utils/sol\";\nexport * from \"../exceptions\";\nexport { ChainSymbol, ChainType } from \"../chains/chain.enums\";\nexport { AdditionalBasicChainProperties, BasicChainProperties } from \"../chains/models\";\n\nexport enum FeePaymentMethod {\n /**\n * The fee is paid in the native currency of the source chain.\n */\n WITH_NATIVE_CURRENCY = \"native\",\n\n /**\n * The fee is paid with the stablecoin token.\n */\n WITH_STABLECOIN = \"stablecoin\",\n\n /**\n * The fee is paid with the ABR token.\n */\n WITH_ABR = \"abr\",\n}\n\nexport interface AmountsAndGasFeeOptions {\n /**\n * The floating point amount of tokens to be sent (not including gas fee).\n */\n amountToSendFloat: string;\n\n /**\n * The floating point amount of tokens to be received.\n */\n amountToBeReceivedFloat: string;\n\n /**\n * Available ways to pay the transfer gas fee and gas fee amount.\n */\n gasFeeOptions: GasFeeOptions;\n}\n\ntype GasFeeOptionsType = {\n [key in FeePaymentMethod]?: AmountFormatted;\n};\n\n/**\n * Describes available options of paying the gas fee and the amount to pay when using the corresponding method.\n *\n * For {@link FeePaymentMethod.WITH_NATIVE_CURRENCY} value contains the amount in the smallest denomination of the source chain currency\n *\n * For {@link FeePaymentMethod.WITH_STABLECOIN} value contains the amount in the smallest denomination of the source token\n */\nexport interface GasFeeOptions extends GasFeeOptionsType {\n [FeePaymentMethod.WITH_NATIVE_CURRENCY]: AmountFormatted;\n [FeePaymentMethod.WITH_STABLECOIN]?: AmountFormatted;\n [FeePaymentMethod.WITH_ABR]?: AmountFormatted;\n adminFeeShareWithExtras?: string;\n}\n\n/**\n * Define the type of amount data<p/>\n * Example:<p/>\n * \"1500000\" USDC {@link AmountFormat.INT} = \"1.5\" USDC {@link AmountFormat.FLOAT}, if USDC.decimals = 6\n */\nexport enum AmountFormat {\n /**\n * denominated in the smallest unit of the source token\n */\n INT = \"int\",\n /**\n * denominated in the unit of the source token\n */\n FLOAT = \"float\",\n}\n\n/**\n * Describes the same amount in two variation formats.\n *\n * For {@link AmountFormat.INT} value contains the amount in the smallest denomination\n *\n * For {@link AmountFormat.FLOAT} value contains the amount in tokens denomination\n */\nexport type AmountFormatted = {\n [key in AmountFormat]: string;\n};\n\n/**\n * Describes MAX extra gas value can to be passed when using the corresponding method.\n *\n * For {@link FeePaymentMethod.WITH_NATIVE_CURRENCY} value contains {@link ExtraGasMaxLimit} the amount of the source chain currency\n *\n * For {@link FeePaymentMethod.WITH_STABLECOIN} value contains {@link ExtraGasMaxLimit} the amount of the source token\n */\nexport type ExtraGasMaxLimits = {\n [key in FeePaymentMethod]?: ExtraGasMaxLimit;\n};\n\n/**\n * Describes the same MAX extra gas amount.\n */\nexport type ExtraGasMaxLimit = AmountFormatted;\n\n/**\n * Provide extra gas information\n */\nexport interface ExtraGasMaxLimitResponse {\n /**\n * See {@link ExtraGasMaxLimits}\n */\n extraGasMax: ExtraGasMaxLimits;\n /**\n * Information due to destination chain\n */\n destinationChain: {\n /**\n * gasAmountMax maximum amount you can receive as extra gas on dest chain\n */\n gasAmountMax: ExtraGasMaxLimit;\n /**\n * cost of swap tx on chain\n */\n swap: AmountFormatted;\n /**\n * cost of send tx on chain\n */\n transfer: AmountFormatted;\n };\n /**\n * Exchange rate\n */\n exchangeRate: string;\n /**\n * Exchange rate\n */\n abrExchangeRate?: string;\n /**\n * Source native token price\n */\n sourceNativeTokenPrice: string;\n}\n\n/**\n * Provide pending status information\n * @deprecated Do not use.\n */\nexport interface PendingStatusInfoResponse {\n /**\n * Number of pending transactions\n */\n pendingTxs: number;\n /**\n * Total amount of pending transactions\n */\n pendingAmount: AmountFormatted;\n /**\n * The amount of tokens can be received as a result of transfer considering pending transactions\n */\n estimatedAmount: { min: AmountFormatted; max: AmountFormatted };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,SAAS,EAKT,aAAa,GACd,MAAM,mCAAmC,CAAC;AAY3C,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmCzF,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAG/D,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,mDAA+B,CAAA;IAE/B;;OAEG;IACH,kDAA8B,CAAA;IAE9B;;OAEG;IACH,oCAAgB,CAAA;AAClB,CAAC,EAfW,gBAAgB,KAAhB,gBAAgB,QAe3B;AAwCD;;;;GAIG;AACH,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,+BAAe,CAAA;AACjB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB","sourcesContent":["export {\n ApproveParams as BridgeApproveParams,\n BaseSendParams,\n CheckAllowanceParams,\n GetAllowanceParams,\n GetTokenBalanceParams,\n SendParams,\n SwapParams,\n GetNativeTokenBalanceParams,\n} from \"../services/bridge/models/bridge.model\";\nexport { BridgeService } from \"../services/bridge/index\";\nexport { CctpParams, CctpDomains } from \"../services/bridge/sol\";\nexport { LiquidityPoolService } from \"../services/liquidity-pool/index\";\nexport {\n ActiveMessenger,\n LegacyMessenger,\n Messenger,\n TransferStatusResponse,\n BridgeTransaction,\n GasBalanceResponse,\n CheckAddressResponse,\n AddressStatus,\n} from \"../client/core-api/core-api.model\";\nexport { RawBridgeTransactionBuilder } from \"../services/bridge/raw-bridge-transaction-builder\";\nexport { RawPoolTransactionBuilder } from \"../services/liquidity-pool/raw-pool-transaction-builder\";\nexport {\n UserBalanceInfo,\n UserBalanceInfoDTO,\n LiquidityPoolsParams,\n LiquidityPoolsParamsWithAmount,\n ApproveParams as LiquidityPoolsApproveParams,\n CheckAllowanceParams as LiquidityPoolsCheckAllowanceParams,\n GetAllowanceParams as LiquidityPoolsGetAllowanceParams,\n} from \"../services/liquidity-pool/models/pool.model\";\nexport * from \"../services/models/index\";\nexport { YieldService } from \"../services/yield/index\";\nexport { assertYieldIsSupported, isYieldSupported } from \"../services/yield/validations\";\nexport {\n TokenWithChainDetailsYield,\n CYDToken,\n YieldGetAllowanceParams,\n YieldCheckAllowanceParams,\n YieldBalanceParams,\n YieldGetEstimatedAmountOnDepositParams,\n YieldGetWithdrawProportionAmountParams,\n YieldWithdrawAmount,\n YieldApproveParams,\n YieldDepositParams,\n YieldWithdrawParams,\n} from \"../services/yield/models/yield.model\";\nexport { RawYieldTransactionBuilder } from \"../services/yield/raw-yield-transaction-builder\";\nexport {\n SwapAndBridgeCalculationData,\n SwapFromVUsdCalcResult,\n SwapToVUsdCalcResult,\n} from \"../utils/calculation/swap-and-bridge-fee-calc\";\nexport { SendAmountDetails, AmountImpact } from \"../utils/calculation/swap-and-bridge-details\";\nexport {\n PoolInfo,\n TokenCoreFields,\n TokenWithChainDetails,\n TransferTime,\n TxCostAmount,\n SuiAddresses,\n MessengerTransferTime,\n ChainDetailsMap,\n ChainDetailsWithTokens,\n} from \"../tokens-info\";\nexport { Utils } from \"../utils\";\nexport { SrbUtils, TrustLineParams } from \"../utils/srb\";\nexport { SolUtils } from \"../utils/sol\";\nexport * from \"../exceptions\";\nexport { ChainSymbol, ChainType } from \"../chains/chain.enums\";\nexport { AdditionalBasicChainProperties, BasicChainProperties } from \"../chains/models\";\n\nexport enum FeePaymentMethod {\n /**\n * The fee is paid in the native currency of the source chain.\n */\n WITH_NATIVE_CURRENCY = \"native\",\n\n /**\n * The fee is paid with the stablecoin token.\n */\n WITH_STABLECOIN = \"stablecoin\",\n\n /**\n * The fee is paid with the ABR token.\n */\n WITH_ABR = \"abr\",\n}\n\n/**\n * @deprecated Do not use.\n */\nexport interface AmountsAndGasFeeOptions {\n /**\n * The floating point amount of tokens to be sent (not including gas fee).\n */\n amountToSendFloat: string;\n\n /**\n * The floating point amount of tokens to be received.\n */\n amountToBeReceivedFloat: string;\n\n /**\n * Available ways to pay the transfer gas fee and gas fee amount.\n */\n gasFeeOptions: GasFeeOptions;\n}\n\ntype GasFeeOptionsType = {\n [key in FeePaymentMethod]?: AmountFormatted;\n};\n\n/**\n * Describes available options of paying the gas fee and the amount to pay when using the corresponding method.\n *\n * For {@link FeePaymentMethod.WITH_NATIVE_CURRENCY} value contains the amount in the smallest denomination of the source chain currency\n *\n * For {@link FeePaymentMethod.WITH_STABLECOIN} value contains the amount in the smallest denomination of the source token\n */\nexport interface GasFeeOptions extends GasFeeOptionsType {\n [FeePaymentMethod.WITH_NATIVE_CURRENCY]: AmountFormatted;\n [FeePaymentMethod.WITH_STABLECOIN]?: AmountFormatted;\n [FeePaymentMethod.WITH_ABR]?: AmountFormatted;\n adminFeeShareWithExtras?: string;\n}\n\n/**\n * Define the type of amount data<p/>\n * Example:<p/>\n * \"1500000\" USDC {@link AmountFormat.INT} = \"1.5\" USDC {@link AmountFormat.FLOAT}, if USDC.decimals = 6\n */\nexport enum AmountFormat {\n /**\n * denominated in the smallest unit of the source token\n */\n INT = \"int\",\n /**\n * denominated in the unit of the source token\n */\n FLOAT = \"float\",\n}\n\n/**\n * Describes the same amount in two variation formats.\n *\n * For {@link AmountFormat.INT} value contains the amount in the smallest denomination\n *\n * For {@link AmountFormat.FLOAT} value contains the amount in tokens denomination\n */\nexport type AmountFormatted = {\n [key in AmountFormat]: string;\n};\n\n/**\n * Describes MAX extra gas value can to be passed when using the corresponding method.\n *\n * For {@link FeePaymentMethod.WITH_NATIVE_CURRENCY} value contains {@link ExtraGasMaxLimit} the amount of the source chain currency\n *\n * For {@link FeePaymentMethod.WITH_STABLECOIN} value contains {@link ExtraGasMaxLimit} the amount of the source token\n */\nexport type ExtraGasMaxLimits = {\n [key in FeePaymentMethod]?: ExtraGasMaxLimit;\n};\n\n/**\n * Describes the same MAX extra gas amount.\n */\nexport type ExtraGasMaxLimit = AmountFormatted;\n\n/**\n * Provide extra gas information\n */\nexport interface ExtraGasMaxLimitResponse {\n /**\n * See {@link ExtraGasMaxLimits}\n */\n extraGasMax: ExtraGasMaxLimits;\n /**\n * Information due to destination chain\n */\n destinationChain: {\n /**\n * gasAmountMax maximum amount you can receive as extra gas on dest chain\n */\n gasAmountMax: ExtraGasMaxLimit;\n /**\n * cost of swap tx on chain\n */\n swap: AmountFormatted;\n /**\n * cost of send tx on chain\n */\n transfer: AmountFormatted;\n };\n /**\n * Exchange rate\n */\n exchangeRate: string;\n /**\n * Exchange rate\n */\n abrExchangeRate?: string;\n /**\n * Source native token price\n */\n sourceNativeTokenPrice: string;\n}\n\n/**\n * Provide pending status information\n * @deprecated Do not use.\n */\nexport interface PendingStatusInfoResponse {\n /**\n * Number of pending transactions\n */\n pendingTxs: number;\n /**\n * Total amount of pending transactions\n */\n pendingAmount: AmountFormatted;\n /**\n * The amount of tokens can be received as a result of transfer considering pending transactions\n */\n estimatedAmount: { min: AmountFormatted; max: AmountFormatted };\n}\n"]}
@@ -12,6 +12,7 @@ export interface SolanaTxFeeParams {
12
12
  /**
13
13
  * Covers transaction fees (including Accounts creation) by swapping stablecoin into the required native token.
14
14
  * Applicable only for {@link Messenger.ALLBRIDGE}.
15
+ * @deprecated Do not use.
15
16
  */
16
17
  payTxFeeWithStablecoinSwap?: boolean;
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/models/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAgE,eAAe,EAAE,MAAM,OAAO,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\nimport { Transaction as SolanaWeb3Transaction, VersionedTransaction } from \"@solana/web3.js\";\nimport { Algodv2 } from \"algosdk\";\nimport { TronWeb, Types } from \"tronweb\";\nimport { SolanaTxFee } from \"./sol\";\n\nexport { SolanaTxFee, PricePerUnitInMicroLamports, ExtraFeeInLamports, SolanaAutoTxFee } from \"./sol\";\n\nexport interface SolanaTxFeeParams {\n /**\n * Transaction fee configuration.\n * If omitted, automatic fee calculation is used.\n */\n fee?: SolanaTxFee;\n\n /**\n * Covers transaction fees (including Accounts creation) by swapping stablecoin into the required native token.\n * Applicable only for {@link Messenger.ALLBRIDGE}.\n */\n payTxFeeWithStablecoinSwap?: boolean;\n}\n\n/**\n * Blockchain fee params for tx\n */\nexport interface TxFeeParams {\n solana?: SolanaTxFee | SolanaTxFeeParams;\n}\n\n/**\n * The `EssentialWeb3` interface provides the minimum set of Web3 functionalities\n * required by the SDK. It allows any web3-like provider to be used, as long as it\n * matches the signature of these essential methods and properties. This prevents\n * tight coupling to a specific version of the `web3` library.\n */\nexport interface EssentialWeb3 {\n eth: {\n getBalance: (address: string) => Promise<any>;\n estimateGas: (tx: any) => Promise<any>;\n sendTransaction: (tx: any) => Promise<any>;\n Contract: new (abi: any, address?: string) => any;\n BatchRequest: new () => any;\n };\n}\n\n/**\n * The provider is type that combines connection implementations for different chains.<br/>\n * TIP: None provider in the Solana blockchain case.\n */\nexport type Provider = EssentialWeb3 | TronWeb | Algodv2;\n\n/**\n * The `EssentialWeb3Transaction` interface provides the minimum set of Web3 Transaction\n * returned by the SDK. It allows any web3-like provider to be used, as long as it\n * matches the signature of these essential interface. This prevents\n * tight coupling to a specific version of the `web3` library.\n */\nexport interface EssentialWeb3Transaction {\n from?: string;\n to?: string;\n value?: string;\n data?: string;\n}\n\nexport type RawTransaction =\n | RawTronTransaction\n | RawEvmTransaction\n | RawSorobanTransaction\n | RawAlgTransaction\n | RawStxTransaction\n | RawSuiTransaction\n | RawBridgeSolanaTransaction\n | RawPoolSolanaTransaction;\nexport type RawEvmTransaction = EssentialWeb3Transaction;\nexport type RawTronTransaction = Types.Transaction;\nexport type RawSorobanTransaction = string;\nexport type RawPoolSolanaTransaction = SolanaWeb3Transaction;\nexport type RawBridgeSolanaTransaction = VersionedTransaction;\nexport type RawSuiTransaction = string;\nexport type RawAlgTransaction = string[];\nexport type RawStxTransaction = string;\n\nexport interface SmartContractMethodParameter {\n type: string;\n value: string | number | Buffer;\n}\n\nexport interface TransactionResponse {\n txId: string;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/models/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAgE,eAAe,EAAE,MAAM,OAAO,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\nimport { Transaction as SolanaWeb3Transaction, VersionedTransaction } from \"@solana/web3.js\";\nimport { Algodv2 } from \"algosdk\";\nimport { TronWeb, Types } from \"tronweb\";\nimport { SolanaTxFee } from \"./sol\";\n\nexport { SolanaTxFee, PricePerUnitInMicroLamports, ExtraFeeInLamports, SolanaAutoTxFee } from \"./sol\";\n\nexport interface SolanaTxFeeParams {\n /**\n * Transaction fee configuration.\n * If omitted, automatic fee calculation is used.\n */\n fee?: SolanaTxFee;\n\n /**\n * Covers transaction fees (including Accounts creation) by swapping stablecoin into the required native token.\n * Applicable only for {@link Messenger.ALLBRIDGE}.\n * @deprecated Do not use.\n */\n payTxFeeWithStablecoinSwap?: boolean;\n}\n\n/**\n * Blockchain fee params for tx\n */\nexport interface TxFeeParams {\n solana?: SolanaTxFee | SolanaTxFeeParams;\n}\n\n/**\n * The `EssentialWeb3` interface provides the minimum set of Web3 functionalities\n * required by the SDK. It allows any web3-like provider to be used, as long as it\n * matches the signature of these essential methods and properties. This prevents\n * tight coupling to a specific version of the `web3` library.\n */\nexport interface EssentialWeb3 {\n eth: {\n getBalance: (address: string) => Promise<any>;\n estimateGas: (tx: any) => Promise<any>;\n sendTransaction: (tx: any) => Promise<any>;\n Contract: new (abi: any, address?: string) => any;\n BatchRequest: new () => any;\n };\n}\n\n/**\n * The provider is type that combines connection implementations for different chains.<br/>\n * TIP: None provider in the Solana blockchain case.\n */\nexport type Provider = EssentialWeb3 | TronWeb | Algodv2;\n\n/**\n * The `EssentialWeb3Transaction` interface provides the minimum set of Web3 Transaction\n * returned by the SDK. It allows any web3-like provider to be used, as long as it\n * matches the signature of these essential interface. This prevents\n * tight coupling to a specific version of the `web3` library.\n */\nexport interface EssentialWeb3Transaction {\n from?: string;\n to?: string;\n value?: string;\n data?: string;\n}\n\nexport type RawTransaction =\n | RawTronTransaction\n | RawEvmTransaction\n | RawSorobanTransaction\n | RawAlgTransaction\n | RawStxTransaction\n | RawSuiTransaction\n | RawBridgeSolanaTransaction\n | RawPoolSolanaTransaction;\nexport type RawEvmTransaction = EssentialWeb3Transaction;\nexport type RawTronTransaction = Types.Transaction;\nexport type RawSorobanTransaction = string;\nexport type RawPoolSolanaTransaction = SolanaWeb3Transaction;\nexport type RawBridgeSolanaTransaction = VersionedTransaction;\nexport type RawSuiTransaction = string;\nexport type RawAlgTransaction = string[];\nexport type RawStxTransaction = string;\n\nexport interface SmartContractMethodParameter {\n type: string;\n value: string | number | Buffer;\n}\n\nexport interface TransactionResponse {\n txId: string;\n}\n"]}
@@ -42,7 +42,7 @@ export interface ChainDetails extends BasicChainProperties {
42
42
  */
43
43
  bridgeAddress: string;
44
44
  /**
45
- * OFT Bridge contract address
45
+ * OFT Bridge contract address (the contract to approve for {@link Messenger.OFT})
46
46
  * Optional. Defined if the chain supports OFT
47
47
  */
48
48
  oftBridgeAddress?: string;
@@ -120,7 +120,7 @@ export interface Token {
120
120
  */
121
121
  originTokenAddress?: string;
122
122
  /**
123
- * Token CCTP address</br>
123
+ * Token CCTP address (bridge contract to approve for {@link Messenger.CCTP})</br>
124
124
  * Optional. Defined if the token is supported by CCTP
125
125
  */
126
126
  cctpAddress?: string;
@@ -130,18 +130,18 @@ export interface Token {
130
130
  */
131
131
  cctpFeeShare?: string;
132
132
  /**
133
- * Token CCTP address</br>
134
- * Optional. Defined if the token is supported by CCTP
133
+ * Token CCTP V2 address (bridge contract to approve for {@link Messenger.CCTP_V2})</br>
134
+ * Optional. Defined if the token is supported by CCTP V2
135
135
  */
136
136
  cctpV2Address?: string;
137
137
  /**
138
138
  * Token fee share for CCTP V2</br>
139
- * Optional. Defined if the token is supported by CCTP
139
+ * Optional. Defined if the token is supported by CCTP V2
140
140
  */
141
141
  cctpV2FeeShare?: string;
142
142
  /**
143
- * XReserve bridge configuration for token.
144
- * Optional. Defined if the token is supported by XReserve
143
+ * xReserve bridge configuration for token, see {@link XReserveTokenInfo}.
144
+ * Optional. Defined if the token is supported by {@link Messenger.X_RESERVE}
145
145
  */
146
146
  xReserve?: XReserveTokenInfo;
147
147
  /**
@@ -150,7 +150,8 @@ export interface Token {
150
150
  * Used to link representations of a token deployed on multiple networks (e.g., Ethereum, BSC).
151
151
  * Tokens with the same `oftId` are considered to be equivalent.
152
152
  *
153
- * Optional. Defined if the token is supported by OFT
153
+ * Optional. Defined if the token is supported by {@link Messenger.OFT}.
154
+ * The bridge contract to approve is {@link ChainDetails.oftBridgeAddress}.
154
155
  */
155
156
  oftId?: string;
156
157
  /**
@@ -159,8 +160,8 @@ export interface Token {
159
160
  */
160
161
  feeShare: string;
161
162
  /**
162
- * @Deprecated use {@link apr7d}</br>
163
163
  * Token APR
164
+ * @deprecated Do not use.
164
165
  */
165
166
  apr: string;
166
167
  /**
@@ -185,10 +186,25 @@ export interface Token {
185
186
  */
186
187
  suiAddresses?: SuiAddresses;
187
188
  }
189
+ /**
190
+ * xReserve route configuration of a token, see {@link Messenger.X_RESERVE}
191
+ */
188
192
  export interface XReserveTokenInfo {
193
+ /**
194
+ * xReserve bridge contract address (the contract to approve)
195
+ */
189
196
  bridgeAddress: string;
197
+ /**
198
+ * Constant part of the fee, in the smallest denomination of the token
199
+ */
190
200
  feeConst: string;
201
+ /**
202
+ * Share of the transferred amount charged as a fee
203
+ */
191
204
  feeShare: string;
205
+ /**
206
+ * xReserve protocol contract address
207
+ */
192
208
  protocolAddress?: string;
193
209
  }
194
210
  export interface SuiAddresses {