@allbridge/bridge-core-sdk 3.35.0-alpha.2 → 3.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +213 -76
  2. package/dist/browser/index.js +2 -2
  3. package/dist/browser/index.js.map +2 -2
  4. package/dist/cjs/index.js +1 -1
  5. package/dist/cjs/index.js.map +2 -2
  6. package/dist/esm/index.js +2 -2
  7. package/dist/esm/index.js.map +2 -2
  8. package/dist/src/client/core-api/core-api.model.d.ts +33 -0
  9. package/dist/src/client/core-api/core-api.model.js +21 -0
  10. package/dist/src/client/core-api/core-api.model.js.map +1 -1
  11. package/dist/src/exceptions/exceptions.d.ts +6 -0
  12. package/dist/src/exceptions/exceptions.js +6 -0
  13. package/dist/src/exceptions/exceptions.js.map +1 -1
  14. package/dist/src/index.d.ts +87 -38
  15. package/dist/src/index.js +9 -8
  16. package/dist/src/index.js.map +1 -1
  17. package/dist/src/models/index.d.ts +4 -1
  18. package/dist/src/models/index.js.map +1 -1
  19. package/dist/src/services/models/index.d.ts +4 -0
  20. package/dist/src/services/models/index.js.map +1 -1
  21. package/dist/src/services/yield/index.d.ts +18 -0
  22. package/dist/src/services/yield/index.js +6 -0
  23. package/dist/src/services/yield/index.js.map +1 -1
  24. package/dist/src/services/yield/models/yield.model.d.ts +33 -0
  25. package/dist/src/services/yield/models/yield.model.js.map +1 -1
  26. package/dist/src/services/yield/raw-yield-transaction-builder.d.ts +9 -0
  27. package/dist/src/services/yield/raw-yield-transaction-builder.js +3 -0
  28. package/dist/src/services/yield/raw-yield-transaction-builder.js.map +1 -1
  29. package/dist/src/services/yield/validations.d.ts +2 -0
  30. package/dist/src/services/yield/validations.js +2 -0
  31. package/dist/src/services/yield/validations.js.map +1 -1
  32. package/dist/src/tokens-info/tokens-info.model.d.ts +29 -9
  33. package/dist/src/tokens-info/tokens-info.model.js.map +1 -1
  34. package/dist/src/version.d.ts +1 -1
  35. package/dist/src/version.js +1 -1
  36. package/dist/src/version.js.map +1 -1
  37. package/package.json +2 -2
@@ -17,6 +17,9 @@ export interface ChainDetailsDTO {
17
17
  oftBridgeAddress?: string;
18
18
  abrPayer?: AbrPayerChainInfoDTO;
19
19
  swapAddress: string;
20
+ /**
21
+ * @deprecated Do not use.
22
+ */
20
23
  yieldAddress?: string;
21
24
  transferTime: TransferTimeDTO;
22
25
  txCostAmount: TxCostAmountDTO;
@@ -55,6 +58,9 @@ export interface TokenDTO {
55
58
  cctpV2Address?: string;
56
59
  cctpFeeShare?: string;
57
60
  cctpV2FeeShare?: string;
61
+ /**
62
+ * @deprecated Do not use.
63
+ */
58
64
  yieldId?: number;
59
65
  xReserve?: XReserveDTO;
60
66
  flags: {
@@ -102,17 +108,44 @@ export interface TxCostAmountDTO {
102
108
  export type MessengerTransferTimeDTO = {
103
109
  [messenger in MessengerKeyDTO]: number | null;
104
110
  };
111
+ /**
112
+ * Bridging protocol used for a transfer.
113
+ * Only {@link ActiveMessenger} values are supported.
114
+ */
105
115
  export declare enum Messenger {
106
116
  /** @deprecated Do not use. */
107
117
  ALLBRIDGE = 1,
108
118
  /** @deprecated Do not use. */
109
119
  WORMHOLE = 2,
120
+ /**
121
+ * Circle CCTP.
122
+ * Route is supported when `cctpAddress` is defined on both source and destination tokens.
123
+ */
110
124
  CCTP = 3,
125
+ /**
126
+ * Circle CCTP V2.
127
+ * Route is supported when `cctpV2Address` is defined on both source and destination tokens.
128
+ */
111
129
  CCTP_V2 = 4,
130
+ /**
131
+ * LayerZero OFT.
132
+ * Route is supported when source and destination tokens have the same `oftId`
133
+ * and `oftBridgeAddress` is defined on both chains.
134
+ */
112
135
  OFT = 5,
136
+ /**
137
+ * xReserve.
138
+ * Route is supported when `xReserve` is defined on both source and destination tokens.
139
+ */
113
140
  X_RESERVE = 6
114
141
  }
142
+ /**
143
+ * @deprecated Do not use.
144
+ */
115
145
  export type LegacyMessenger = Messenger.ALLBRIDGE | Messenger.WORMHOLE;
146
+ /**
147
+ * Messengers supported for transfers: {@link Messenger.CCTP}, {@link Messenger.CCTP_V2}, {@link Messenger.OFT}, {@link Messenger.X_RESERVE}
148
+ */
116
149
  export type ActiveMessenger = Exclude<Messenger, LegacyMessenger>;
117
150
  export interface ReceiveTransactionCostRequest {
118
151
  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":"AAgCA,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;AA0DD,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 /**\n * @deprecated Do not use.\n */\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 /**\n * @deprecated Do not use.\n */\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"]}
@@ -53,6 +53,9 @@ export declare class CCTPDoesNotSupportedError extends SdkRootError {
53
53
  export declare class OFTDoesNotSupportedError extends SdkRootError {
54
54
  constructor(message?: string);
55
55
  }
56
+ /**
57
+ * @deprecated Do not use.
58
+ */
56
59
  export declare class YieldDoesNotSupportedError extends SdkRootError {
57
60
  constructor(message?: string);
58
61
  }
@@ -77,6 +80,9 @@ export declare enum ErrorCode {
77
80
  NODE_RPC_URL_NOT_INITIALIZED_ERROR = "NodeRpcUrlNotInitializedError",
78
81
  CCTP_DOES_NOT_SUPPORTED_ERROR = "CCTPDoesNotSupportedError",
79
82
  OFT_DOES_NOT_SUPPORTED_ERROR = "OFTDoesNotSupportedError",
83
+ /**
84
+ * @deprecated Do not use.
85
+ */
80
86
  YIELD_DOES_NOT_SUPPORTED_ERROR = "YieldDoesNotSupportedError",
81
87
  TX_TOO_LARGE = "TxTooLargeError"
82
88
  }
@@ -88,6 +88,9 @@ export class OFTDoesNotSupportedError extends SdkRootError {
88
88
  super(ErrorCode.OFT_DOES_NOT_SUPPORTED_ERROR, message);
89
89
  }
90
90
  }
91
+ /**
92
+ * @deprecated Do not use.
93
+ */
91
94
  export class YieldDoesNotSupportedError extends SdkRootError {
92
95
  constructor(message) {
93
96
  super(ErrorCode.YIELD_DOES_NOT_SUPPORTED_ERROR, message);
@@ -117,6 +120,9 @@ export var ErrorCode;
117
120
  ErrorCode["NODE_RPC_URL_NOT_INITIALIZED_ERROR"] = "NodeRpcUrlNotInitializedError";
118
121
  ErrorCode["CCTP_DOES_NOT_SUPPORTED_ERROR"] = "CCTPDoesNotSupportedError";
119
122
  ErrorCode["OFT_DOES_NOT_SUPPORTED_ERROR"] = "OFTDoesNotSupportedError";
123
+ /**
124
+ * @deprecated Do not use.
125
+ */
120
126
  ErrorCode["YIELD_DOES_NOT_SUPPORTED_ERROR"] = "YieldDoesNotSupportedError";
121
127
  ErrorCode["TX_TOO_LARGE"] = "TxTooLargeError";
122
128
  })(ErrorCode || (ErrorCode = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../../../src/exceptions/exceptions.ts"],"names":[],"mappings":"AAAA,MAAM,OAAgB,YAAa,SAAQ,KAAK;IACvC,SAAS,CAAY;IAE5B,YAAsB,IAAe,EAAE,OAAgB;QACrD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;CACF;AAED,MAAM,OAAO,QAAS,SAAQ,YAAY;IACxC,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,YAAY;IAClD,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACF;AAED,MAAM,OAAO,oBAAqB,SAAQ,YAAY;IACpD,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,8BAA+B,SAAQ,YAAY;IAC9D,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAED,MAAM,OAAO,+BAAgC,SAAQ,YAAY;IAC/D,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,YAAY;IAC3D,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,YAAY;IACvD,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,YAAY;IAC9C,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,MAAM,OAAO,6BAA8B,SAAQ,YAAY;IAC7D,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAED,MAAM,OAAO,4BAA6B,SAAQ,YAAY;IAC5D,YAAY,OAAe,EAAE,UAAkB,EAAE,gBAAwB;QACvE,KAAK,CACH,SAAS,CAAC,+BAA+B,EACzC,aAAa,OAAO,eAAe,UAAU,6BAA6B,gBAAgB,GAAG,CAC9F,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAED,MAAM,OAAO,6BAA8B,SAAQ,YAAY;IAC7D,YAAY,WAAmB;QAC7B,KAAK,CAAC,SAAS,CAAC,kCAAkC,EAAE,cAAc,WAAW,gCAAgC,CAAC,CAAC;IACjH,CAAC;CACF;AAED,MAAM,OAAO,yBAA0B,SAAQ,YAAY;IACzD,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,OAAO,wBAAyB,SAAQ,YAAY;IACxD,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,YAAY;IAC1D,YAAY,OAAgB;QAC1B,KAAK,CAAC,SAAS,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,YAAY;IAC/C;QACE,KAAK,CACH,SAAS,CAAC,YAAY,EACtB,iHAAiH,CAClH,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAN,IAAY,SAoBX;AApBD,WAAY,SAAS;IACnB,mCAAsB,CAAA;IACtB,wDAA2C,CAAA;IAC3C,6DAAgD,CAAA;IAChD,8BAA8B;IAC9B,iFAAoE,CAAA;IACpE,2CAA8B,CAAA;IAC9B,qFAAwE,CAAA;IACxE,2EAA8D,CAAA;IAC9D,mEAAsD,CAAA;IACtD,8CAAiC,CAAA;IACjC,gDAAmC,CAAA;IACnC,iFAAoE,CAAA;IACpE,6EAAgE,CAAA;IAChE,2CAA8B,CAAA;IAC9B,iFAAoE,CAAA;IACpE,wEAA2D,CAAA;IAC3D,sEAAyD,CAAA;IACzD,0EAA6D,CAAA;IAC7D,6CAAgC,CAAA;AAClC,CAAC,EApBW,SAAS,KAAT,SAAS,QAoBpB","sourcesContent":["export abstract class SdkRootError extends Error {\n public errorCode: ErrorCode;\n\n protected constructor(code: ErrorCode, message?: string) {\n super(message);\n this.errorCode = code;\n }\n}\n\nexport class SdkError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.SDK_ERROR, message);\n }\n}\n\nexport class InvalidAmountError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INVALID_AMOUNT_ERROR, message);\n }\n}\n\nexport class AmountNotEnoughError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.AMOUNT_NOT_ENOUGH_ERROR, message);\n }\n}\n\n/**\n * @deprecated Do not use.\n */\nexport class InsufficientPoolLiquidityError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INSUFFICIENT_POOL_LIQUIDITY_ERROR, message);\n }\n}\n\nexport class JupiterError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.JUPITER_ERROR, message);\n }\n}\n\nexport class InvalidGasFeePaymentOptionError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INVALID_GAS_FEE_PAYMENT_OPTION_ERROR, message);\n }\n}\n\nexport class InvalidMessengerOptionError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INVALID_MESSENGER_OPTION_ERROR, message);\n }\n}\n\nexport class MethodNotSupportedError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.METHOD_NOT_SUPPORTED_ERROR, message);\n }\n}\n\nexport class VerifyTxError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.VERIFY_TX_ERROR, message);\n }\n}\n\nexport class InvalidTxError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INVALID_TX_ERROR, message);\n }\n}\n\nexport class ExtraGasMaxLimitExceededError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.EXTRA_GAS_MAX_LIMIT_EXCEEDED_ERROR, message);\n }\n}\n\nexport class ArgumentInvalidDecimalsError extends SdkRootError {\n constructor(argName: string, decimalsIs: number, decimalsRequired: number) {\n super(\n ErrorCode.ARGUMENT_INVALID_DECIMALS_ERROR,\n `Argument '${argName}' decimals '${decimalsIs}' cannot be greater than '${decimalsRequired}'`\n );\n }\n}\n\nexport class TimeoutError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.TIMEOUT_ERROR, message);\n }\n}\n\nexport class NodeRpcUrlNotInitializedError extends SdkRootError {\n constructor(chainSymbol: string) {\n super(ErrorCode.NODE_RPC_URL_NOT_INITIALIZED_ERROR, `For chain '${chainSymbol}' Node RPC URL not initialized`);\n }\n}\n\nexport class CCTPDoesNotSupportedError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.CCTP_DOES_NOT_SUPPORTED_ERROR, message);\n }\n}\n\nexport class OFTDoesNotSupportedError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.OFT_DOES_NOT_SUPPORTED_ERROR, message);\n }\n}\n\nexport class YieldDoesNotSupportedError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.YIELD_DOES_NOT_SUPPORTED_ERROR, message);\n }\n}\n\nexport class TxTooLargeError extends SdkRootError {\n constructor() {\n super(\n ErrorCode.TX_TOO_LARGE,\n \"Transaction too large: try again later or switch to another messenger or pay relayer fee in native gas currency\"\n );\n }\n}\n\nexport enum ErrorCode {\n SDK_ERROR = \"SdkError\",\n INVALID_AMOUNT_ERROR = \"InvalidAmountError\",\n AMOUNT_NOT_ENOUGH_ERROR = \"AmountNotEnoughError\",\n /** @deprecated Do not use. */\n INSUFFICIENT_POOL_LIQUIDITY_ERROR = \"InsufficientPoolLiquidityError\",\n JUPITER_ERROR = \"JupiterError\",\n INVALID_GAS_FEE_PAYMENT_OPTION_ERROR = \"InvalidGasFeePaymentOptionError\",\n INVALID_MESSENGER_OPTION_ERROR = \"InvalidMessengerOptionError\",\n METHOD_NOT_SUPPORTED_ERROR = \"MethodNotSupportedError\",\n VERIFY_TX_ERROR = \"VerifyTxError\",\n INVALID_TX_ERROR = \"InvalidTxError\",\n EXTRA_GAS_MAX_LIMIT_EXCEEDED_ERROR = \"ExtraGasMaxLimitExceededError\",\n ARGUMENT_INVALID_DECIMALS_ERROR = \"ArgumentInvalidDecimalsError\",\n TIMEOUT_ERROR = \"TimeoutError\",\n NODE_RPC_URL_NOT_INITIALIZED_ERROR = \"NodeRpcUrlNotInitializedError\",\n CCTP_DOES_NOT_SUPPORTED_ERROR = \"CCTPDoesNotSupportedError\",\n OFT_DOES_NOT_SUPPORTED_ERROR = \"OFTDoesNotSupportedError\",\n YIELD_DOES_NOT_SUPPORTED_ERROR = \"YieldDoesNotSupportedError\",\n TX_TOO_LARGE = \"TxTooLargeError\",\n}\n"]}
1
+ {"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../../../src/exceptions/exceptions.ts"],"names":[],"mappings":"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","sourcesContent":["export abstract class SdkRootError extends Error {\n public errorCode: ErrorCode;\n\n protected constructor(code: ErrorCode, message?: string) {\n super(message);\n this.errorCode = code;\n }\n}\n\nexport class SdkError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.SDK_ERROR, message);\n }\n}\n\nexport class InvalidAmountError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INVALID_AMOUNT_ERROR, message);\n }\n}\n\nexport class AmountNotEnoughError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.AMOUNT_NOT_ENOUGH_ERROR, message);\n }\n}\n\n/**\n * @deprecated Do not use.\n */\nexport class InsufficientPoolLiquidityError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INSUFFICIENT_POOL_LIQUIDITY_ERROR, message);\n }\n}\n\nexport class JupiterError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.JUPITER_ERROR, message);\n }\n}\n\nexport class InvalidGasFeePaymentOptionError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INVALID_GAS_FEE_PAYMENT_OPTION_ERROR, message);\n }\n}\n\nexport class InvalidMessengerOptionError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INVALID_MESSENGER_OPTION_ERROR, message);\n }\n}\n\nexport class MethodNotSupportedError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.METHOD_NOT_SUPPORTED_ERROR, message);\n }\n}\n\nexport class VerifyTxError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.VERIFY_TX_ERROR, message);\n }\n}\n\nexport class InvalidTxError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.INVALID_TX_ERROR, message);\n }\n}\n\nexport class ExtraGasMaxLimitExceededError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.EXTRA_GAS_MAX_LIMIT_EXCEEDED_ERROR, message);\n }\n}\n\nexport class ArgumentInvalidDecimalsError extends SdkRootError {\n constructor(argName: string, decimalsIs: number, decimalsRequired: number) {\n super(\n ErrorCode.ARGUMENT_INVALID_DECIMALS_ERROR,\n `Argument '${argName}' decimals '${decimalsIs}' cannot be greater than '${decimalsRequired}'`\n );\n }\n}\n\nexport class TimeoutError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.TIMEOUT_ERROR, message);\n }\n}\n\nexport class NodeRpcUrlNotInitializedError extends SdkRootError {\n constructor(chainSymbol: string) {\n super(ErrorCode.NODE_RPC_URL_NOT_INITIALIZED_ERROR, `For chain '${chainSymbol}' Node RPC URL not initialized`);\n }\n}\n\nexport class CCTPDoesNotSupportedError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.CCTP_DOES_NOT_SUPPORTED_ERROR, message);\n }\n}\n\nexport class OFTDoesNotSupportedError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.OFT_DOES_NOT_SUPPORTED_ERROR, message);\n }\n}\n\n/**\n * @deprecated Do not use.\n */\nexport class YieldDoesNotSupportedError extends SdkRootError {\n constructor(message?: string) {\n super(ErrorCode.YIELD_DOES_NOT_SUPPORTED_ERROR, message);\n }\n}\n\nexport class TxTooLargeError extends SdkRootError {\n constructor() {\n super(\n ErrorCode.TX_TOO_LARGE,\n \"Transaction too large: try again later or switch to another messenger or pay relayer fee in native gas currency\"\n );\n }\n}\n\nexport enum ErrorCode {\n SDK_ERROR = \"SdkError\",\n INVALID_AMOUNT_ERROR = \"InvalidAmountError\",\n AMOUNT_NOT_ENOUGH_ERROR = \"AmountNotEnoughError\",\n /** @deprecated Do not use. */\n INSUFFICIENT_POOL_LIQUIDITY_ERROR = \"InsufficientPoolLiquidityError\",\n JUPITER_ERROR = \"JupiterError\",\n INVALID_GAS_FEE_PAYMENT_OPTION_ERROR = \"InvalidGasFeePaymentOptionError\",\n INVALID_MESSENGER_OPTION_ERROR = \"InvalidMessengerOptionError\",\n METHOD_NOT_SUPPORTED_ERROR = \"MethodNotSupportedError\",\n VERIFY_TX_ERROR = \"VerifyTxError\",\n INVALID_TX_ERROR = \"InvalidTxError\",\n EXTRA_GAS_MAX_LIMIT_EXCEEDED_ERROR = \"ExtraGasMaxLimitExceededError\",\n ARGUMENT_INVALID_DECIMALS_ERROR = \"ArgumentInvalidDecimalsError\",\n TIMEOUT_ERROR = \"TimeoutError\",\n NODE_RPC_URL_NOT_INITIALIZED_ERROR = \"NodeRpcUrlNotInitializedError\",\n CCTP_DOES_NOT_SUPPORTED_ERROR = \"CCTPDoesNotSupportedError\",\n OFT_DOES_NOT_SUPPORTED_ERROR = \"OFTDoesNotSupportedError\",\n /**\n * @deprecated Do not use.\n */\n YIELD_DOES_NOT_SUPPORTED_ERROR = \"YieldDoesNotSupportedError\",\n TX_TOO_LARGE = \"TxTooLargeError\",\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.
@@ -92,6 +96,9 @@ export declare class AllbridgeCoreSdk {
92
96
  * @deprecated Do not use.
93
97
  */
94
98
  pool: LiquidityPoolService;
99
+ /**
100
+ * @deprecated Do not use.
101
+ */
95
102
  yield: YieldService;
96
103
  utils: Utils;
97
104
  private service;
@@ -104,38 +111,57 @@ export declare class AllbridgeCoreSdk {
104
111
  */
105
112
  constructor(nodeUrls: NodeUrlsConfig | NodeRpcUrls, params?: AllbridgeCoreSdkOptions);
106
113
  /**
107
- * Returns {@link ChainDetailsMap} containing a list of supported tokens groped by chain.
108
- *
109
- * @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
+ * Returns {@link ChainDetailsMap} containing a list of tokens for liquidity pools operations grouped by chain.
115
+ * @param type - 'pool'
116
+ * @deprecated Do not use.
112
117
  */
113
- /** @deprecated Do not use. */
114
118
  chainDetailsMap(type: "pool"): Promise<ChainDetailsMap>;
119
+ /**
120
+ * Returns {@link ChainDetailsMap} containing a list of supported tokens grouped by chain.
121
+ * @param type - Optional. 'swap' (tokens to send) is the only supported value and the default.
122
+ */
115
123
  chainDetailsMap(type?: "swap"): Promise<ChainDetailsMap>;
124
+ /**
125
+ * Returns {@link ChainDetailsMap} containing a list of supported tokens grouped by chain.
126
+ * @param type - 'swap' for tokens to send. The 'pool' value (liquidity pools setup) is deprecated. Do not use.
127
+ */
116
128
  chainDetailsMap(type: "swap" | "pool"): Promise<ChainDetailsMap>;
129
+ /**
130
+ * Returns a list of {@link TokenWithChainDetails | tokens} for liquidity pools operations.
131
+ * @param type - 'pool'
132
+ * @deprecated Do not use.
133
+ */
134
+ tokens(type: "pool"): Promise<TokenWithChainDetails[]>;
117
135
  /**
118
136
  * Returns a list of supported {@link TokenWithChainDetails | tokens}.
119
- *
120
- * @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'.
137
+ * @param type - Optional. 'swap' (tokens to send) is the only supported value and the default.
123
138
  * @returns A promise that resolves to an array of {@link TokenWithChainDetails}.
124
139
  */
125
- /** @deprecated Do not use. */
126
- tokens(type: "pool"): Promise<TokenWithChainDetails[]>;
127
140
  tokens(type?: "swap"): Promise<TokenWithChainDetails[]>;
141
+ /**
142
+ * Returns a list of supported {@link TokenWithChainDetails | tokens}.
143
+ * @param type - 'swap' for tokens to send. The 'pool' value (liquidity pools operations) is deprecated. Do not use.
144
+ * @returns A promise that resolves to an array of {@link TokenWithChainDetails}.
145
+ */
128
146
  tokens(type: "swap" | "pool"): Promise<TokenWithChainDetails[]>;
129
147
  /**
130
- * Returns a list of supported {@link TokenWithChainDetails | tokens} on the selected chain.
148
+ * Returns a list of {@link TokenWithChainDetails | tokens} for liquidity pools operations on the selected chain.
131
149
  * @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
- * @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'.
150
+ * @param type - 'pool'
151
+ * @deprecated Do not use.
135
152
  */
136
- /** @deprecated Do not use. */
137
153
  tokensByChain(chainSymbol: string, type: "pool"): Promise<TokenWithChainDetails[]>;
154
+ /**
155
+ * Returns a list of supported {@link TokenWithChainDetails | tokens} on the selected chain.
156
+ * @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}.
157
+ * @param type - Optional. 'swap' (tokens to send) is the only supported value and the default.
158
+ */
138
159
  tokensByChain(chainSymbol: string, type?: "swap"): Promise<TokenWithChainDetails[]>;
160
+ /**
161
+ * Returns a list of supported {@link TokenWithChainDetails | tokens} on the selected chain.
162
+ * @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}.
163
+ * @param type - 'swap' for tokens to send. The 'pool' value (liquidity pools operations) is deprecated. Do not use.
164
+ */
139
165
  tokensByChain(chainSymbol: string, type: "swap" | "pool"): Promise<TokenWithChainDetails[]>;
140
166
  /**
141
167
  * Fetches information about tokens transfer by chosen chainSymbol and transaction Id from the Allbridge Core API.
@@ -209,8 +235,7 @@ export declare class AllbridgeCoreSdk {
209
235
  * @param destinationChainToken selected token on the destination chain
210
236
  * @param messenger
211
237
  *
212
- * @Deprecated Use {@link getGasFeeOptions} and separately call one of:
213
- * {@link getAmountToBeReceived}, {@link getAmountToBeReceivedFromChain}, or {@link getAmountToBeReceivedFromPools}.
238
+ * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToBeReceived}.
214
239
  */
215
240
  getAmountToBeReceivedAndGasFeeOptions(amountToSendFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger): Promise<AmountsAndGasFeeOptions>;
216
241
  /**
@@ -221,19 +246,27 @@ export declare class AllbridgeCoreSdk {
221
246
  * @param destinationChainToken selected token on the destination chain
222
247
  * @param messenger
223
248
  *
224
- * @Deprecated Use {@link getGasFeeOptions} and separately call one of:
225
- * {@link getAmountToSend}, {@link getAmountToSendFromChain}, or {@link getAmountToSendFromPools}.
249
+ * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToSend}.
226
250
  */
227
251
  getAmountToSendAndGasFeeOptions(amountToBeReceivedFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger): Promise<AmountsAndGasFeeOptions>;
228
252
  /**
229
- * Calculates the amount of tokens to be received as a result of transfer.
253
+ * Calculates the amount of tokens to be received as a result of transfer through a legacy messenger.
230
254
  * @param amountToSendFloat the amount of tokens that will be sent
231
255
  * @param sourceChainToken selected token on the source chain
232
256
  * @param destinationChainToken selected token on the destination chain
233
- * @param messenger selected messenger
257
+ * @param messenger {@link LegacyMessenger}
258
+ * @deprecated Do not use.
234
259
  */
235
- /** @deprecated Do not use. */
236
260
  getAmountToBeReceived(amountToSendFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: LegacyMessenger): Promise<string>;
261
+ /**
262
+ * Calculates the amount of tokens to be received as a result of transfer
263
+ * after applying the fee of the selected messenger.
264
+ * @param amountToSendFloat the amount of tokens that will be sent
265
+ * @param sourceChainToken selected token on the source chain
266
+ * @param destinationChainToken selected token on the destination chain
267
+ * @param messenger selected messenger, see {@link ActiveMessenger}
268
+ * @throws CCTPDoesNotSupportedError, OFTDoesNotSupportedError or SdkError if the route is not supported by the messenger
269
+ */
237
270
  getAmountToBeReceived(amountToSendFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: ActiveMessenger): Promise<string>;
238
271
  /**
239
272
  * Calculates the amount of tokens to be received as a result of transfer based on actual blockchain pool state.
@@ -243,8 +276,8 @@ export declare class AllbridgeCoreSdk {
243
276
  * @param messenger selected messenger
244
277
  * @param sourceProvider Optional. source chain Provider
245
278
  * @param destinationProvider Optional. destination chain Provider
279
+ * @deprecated Do not use.
246
280
  */
247
- /** @deprecated Do not use. */
248
281
  getAmountToBeReceivedFromChain(amountToSendFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger, sourceProvider?: Provider, destinationProvider?: Provider): Promise<string>;
249
282
  /**
250
283
  * Calculates the amount of tokens to be received as a result of transfer based on passed pool state.
@@ -254,18 +287,27 @@ export declare class AllbridgeCoreSdk {
254
287
  * @param sourcePool source token pool state
255
288
  * @param destinationPool destination token pool state
256
289
  * @param messenger selected messenger
290
+ * @deprecated Do not use.
257
291
  */
258
- /** @deprecated Do not use. */
259
292
  getAmountToBeReceivedFromPools(amountToSendFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, sourcePool: PoolInfo, destinationPool: PoolInfo, messenger: Exclude<Messenger, Messenger.OFT>): string;
260
293
  /**
261
- * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer.
294
+ * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer through a legacy messenger.
262
295
  * @param amountToBeReceivedFloat the amount of tokens that should be received
263
296
  * @param sourceChainToken selected token on the source chain
264
297
  * @param destinationChainToken selected token on the destination chain
265
- * @param messenger selected messenger
298
+ * @param messenger {@link LegacyMessenger}
299
+ * @deprecated Do not use.
266
300
  */
267
- /** @deprecated Do not use. */
268
301
  getAmountToSend(amountToBeReceivedFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: LegacyMessenger): Promise<string>;
302
+ /**
303
+ * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer
304
+ * after applying the fee of the selected messenger.
305
+ * @param amountToBeReceivedFloat the amount of tokens that should be received
306
+ * @param sourceChainToken selected token on the source chain
307
+ * @param destinationChainToken selected token on the destination chain
308
+ * @param messenger selected messenger, see {@link ActiveMessenger}
309
+ * @throws CCTPDoesNotSupportedError, OFTDoesNotSupportedError or SdkError if the route is not supported by the messenger
310
+ */
269
311
  getAmountToSend(amountToBeReceivedFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: ActiveMessenger): Promise<string>;
270
312
  /**
271
313
  * 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.
@@ -275,8 +317,8 @@ export declare class AllbridgeCoreSdk {
275
317
  * @param messenger selected messenger
276
318
  * @param sourceProvider Optional. source chain Provider
277
319
  * @param destinationProvider Optional. destination chain Provider
320
+ * @deprecated Do not use.
278
321
  */
279
- /** @deprecated Do not use. */
280
322
  getAmountToSendFromChain(amountToBeReceivedFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger, sourceProvider?: Provider, destinationProvider?: Provider): Promise<string>;
281
323
  /**
282
324
  * Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer based on passed pool state.
@@ -286,14 +328,14 @@ export declare class AllbridgeCoreSdk {
286
328
  * @param sourcePool source token pool state
287
329
  * @param destinationPool destination token pool state
288
330
  * @param messenger selected messenger
331
+ * @deprecated Do not use.
289
332
  */
290
- /** @deprecated Do not use. */
291
333
  getAmountToSendFromPools(amountToBeReceivedFloat: BigSource, sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, sourcePool: PoolInfo, destinationPool: PoolInfo, messenger: Exclude<Messenger, Messenger.OFT>): string;
292
334
  /**
293
335
  * Fetches possible ways to pay the transfer gas fee.
294
336
  * @param sourceChainToken selected token on the source chain
295
337
  * @param destinationChainToken selected token on the destination chain
296
- * @param messenger
338
+ * @param messenger selected messenger, see {@link ActiveMessenger}
297
339
  * @returns {@link GasFeeOptions}
298
340
  */
299
341
  getGasFeeOptions(sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger): Promise<GasFeeOptions>;
@@ -301,7 +343,7 @@ export declare class AllbridgeCoreSdk {
301
343
  * Gets the average time in ms to complete a transfer for given tokens and messenger.
302
344
  * @param sourceChainToken selected token on the source chain.
303
345
  * @param destinationChainToken selected token on the destination chain.
304
- * @param messenger
346
+ * @param messenger selected messenger, see {@link ActiveMessenger}
305
347
  * @returns Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.
306
348
  */
307
349
  getAverageTransferTime(sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: Messenger): number | null;
@@ -328,15 +370,22 @@ export declare class AllbridgeCoreSdk {
328
370
  * @returns aprPercentageView
329
371
  */
330
372
  aprInPercents(apr: string): string;
373
+ /**
374
+ * Get possible limit of extra gas amount for a legacy messenger.
375
+ * @param sourceChainToken selected token on the source chain
376
+ * @param destinationChainToken selected token on the destination chain
377
+ * @param messenger {@link LegacyMessenger}
378
+ * @deprecated Do not use.
379
+ */
380
+ getExtraGasMaxLimits(sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: LegacyMessenger): Promise<ExtraGasMaxLimitResponse>;
331
381
  /**
332
382
  * Get possible limit of extra gas amount.
383
+ * For {@link Messenger.X_RESERVE} extra gas is not supported and zero limits are returned.
333
384
  * @param sourceChainToken selected token on the source chain
334
385
  * @param destinationChainToken selected token on the destination chain
335
- * @param messenger selected Messenger
386
+ * @param messenger selected messenger, see {@link ActiveMessenger}
336
387
  * @returns {@link ExtraGasMaxLimitResponse}
337
388
  */
338
- /** @deprecated Do not use. */
339
- getExtraGasMaxLimits(sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: LegacyMessenger): Promise<ExtraGasMaxLimitResponse>;
340
389
  getExtraGasMaxLimits(sourceChainToken: TokenWithChainDetails, destinationChainToken: TokenWithChainDetails, messenger: ActiveMessenger): Promise<ExtraGasMaxLimitResponse>;
341
390
  /**
342
391
  * @deprecated Do not use.
@@ -354,14 +403,14 @@ export declare class AllbridgeCoreSdk {
354
403
  */
355
404
  getAmountFromVUsd(vUsdAmount: string, destToken: TokenWithChainDetails): Promise<AmountFormatted>;
356
405
  /**
357
- * @deprecated Use {@link getSendAmountDetails}
406
+ * @deprecated Do not use.
358
407
  * @param amountInTokenPrecision
359
408
  * @param sourceToken
360
409
  * @param destToken
361
410
  */
362
411
  swapAndBridgeFeeCalculation(amountInTokenPrecision: string, sourceToken: TokenWithChainDetails, destToken: TokenWithChainDetails): Promise<SwapAndBridgeCalculationData>;
363
412
  /**
364
- * @deprecated Use {@link getAmountToBeReceived} and then {@link getSendAmountDetails}
413
+ * @deprecated Do not use.
365
414
  * @param amountInTokenPrecision
366
415
  * @param sourceToken
367
416
  * @param destToken
package/dist/src/index.js CHANGED
@@ -17,6 +17,9 @@ export class AllbridgeCoreSdk {
17
17
  * @deprecated Do not use.
18
18
  */
19
19
  pool;
20
+ /**
21
+ * @deprecated Do not use.
22
+ */
20
23
  yield;
21
24
  utils;
22
25
  service;
@@ -139,8 +142,7 @@ export class AllbridgeCoreSdk {
139
142
  * @param destinationChainToken selected token on the destination chain
140
143
  * @param messenger
141
144
  *
142
- * @Deprecated Use {@link getGasFeeOptions} and separately call one of:
143
- * {@link getAmountToBeReceived}, {@link getAmountToBeReceivedFromChain}, or {@link getAmountToBeReceivedFromPools}.
145
+ * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToBeReceived}.
144
146
  */
145
147
  async getAmountToBeReceivedAndGasFeeOptions(amountToSendFloat, sourceChainToken, destinationChainToken, messenger) {
146
148
  return this.service.getAmountToBeReceivedAndGasFeeOptions(amountToSendFloat, sourceChainToken, destinationChainToken, messenger);
@@ -153,8 +155,7 @@ export class AllbridgeCoreSdk {
153
155
  * @param destinationChainToken selected token on the destination chain
154
156
  * @param messenger
155
157
  *
156
- * @Deprecated Use {@link getGasFeeOptions} and separately call one of:
157
- * {@link getAmountToSend}, {@link getAmountToSendFromChain}, or {@link getAmountToSendFromPools}.
158
+ * @deprecated Use {@link getGasFeeOptions} and {@link getAmountToSend}.
158
159
  */
159
160
  async getAmountToSendAndGasFeeOptions(amountToBeReceivedFloat, sourceChainToken, destinationChainToken, messenger) {
160
161
  return this.service.getAmountToSendAndGasFeeOptions(amountToBeReceivedFloat, sourceChainToken, destinationChainToken, messenger);
@@ -215,7 +216,7 @@ export class AllbridgeCoreSdk {
215
216
  * Fetches possible ways to pay the transfer gas fee.
216
217
  * @param sourceChainToken selected token on the source chain
217
218
  * @param destinationChainToken selected token on the destination chain
218
- * @param messenger
219
+ * @param messenger selected messenger, see {@link ActiveMessenger}
219
220
  * @returns {@link GasFeeOptions}
220
221
  */
221
222
  async getGasFeeOptions(sourceChainToken, destinationChainToken, messenger) {
@@ -225,7 +226,7 @@ export class AllbridgeCoreSdk {
225
226
  * Gets the average time in ms to complete a transfer for given tokens and messenger.
226
227
  * @param sourceChainToken selected token on the source chain.
227
228
  * @param destinationChainToken selected token on the destination chain.
228
- * @param messenger
229
+ * @param messenger selected messenger, see {@link ActiveMessenger}
229
230
  * @returns Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.
230
231
  */
231
232
  getAverageTransferTime(sourceChainToken, destinationChainToken, messenger) {
@@ -283,7 +284,7 @@ export class AllbridgeCoreSdk {
283
284
  return this.service.getAmountFromVUsd(vUsdAmount, destToken);
284
285
  }
285
286
  /**
286
- * @deprecated Use {@link getSendAmountDetails}
287
+ * @deprecated Do not use.
287
288
  * @param amountInTokenPrecision
288
289
  * @param sourceToken
289
290
  * @param destToken
@@ -292,7 +293,7 @@ export class AllbridgeCoreSdk {
292
293
  return this.service.swapAndBridgeFeeCalculation(amountInTokenPrecision, sourceToken, destToken);
293
294
  }
294
295
  /**
295
- * @deprecated Use {@link getAmountToBeReceived} and then {@link getSendAmountDetails}
296
+ * @deprecated Do not use.
296
297
  * @param amountInTokenPrecision
297
298
  * @param sourceToken
298
299
  * @param destToken