@defuse-protocol/intents-sdk 0.68.0 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/bridges/omni-bridge/omni-bridge-constants.cjs +1 -1
- package/dist/src/bridges/omni-bridge/omni-bridge-constants.js +1 -1
- package/dist/src/bridges/poa-bridge/poa-bridge.cjs +1 -1
- package/dist/src/bridges/poa-bridge/poa-bridge.js +1 -1
- package/dist/src/sdk.cjs +2 -0
- package/dist/src/sdk.js +2 -0
- package/dist/src/shared-types.d.cts +1 -0
- package/dist/src/shared-types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ const OMNI_BRIDGE_CONTRACT = "omni.bridge.near";
|
|
|
5
5
|
const MIN_STORAGE_BALANCE_FOR_INTENTS_NEAR = 500000000000000000000000n;
|
|
6
6
|
const MIN_GAS_AMOUNT = "37400000000000";
|
|
7
7
|
const INTENTS_STORAGE_BALANCE_CACHE_KEY = "INTENTS_STORAGE_BALANCE";
|
|
8
|
-
const FEE_SUBSIDIZED_TOKENS = ["nep141:lsd-usdt.rhealab.near"];
|
|
8
|
+
const FEE_SUBSIDIZED_TOKENS = ["nep141:lsd-usdt.rhealab.near", "nep141:sol-0xa69aa1bcb03a369e338156a8718ad60271145803.omdep.near"];
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
11
11
|
exports.FEE_SUBSIDIZED_TOKENS = FEE_SUBSIDIZED_TOKENS;
|
|
@@ -4,7 +4,7 @@ const OMNI_BRIDGE_CONTRACT = "omni.bridge.near";
|
|
|
4
4
|
const MIN_STORAGE_BALANCE_FOR_INTENTS_NEAR = 500000000000000000000000n;
|
|
5
5
|
const MIN_GAS_AMOUNT = "37400000000000";
|
|
6
6
|
const INTENTS_STORAGE_BALANCE_CACHE_KEY = "INTENTS_STORAGE_BALANCE";
|
|
7
|
-
const FEE_SUBSIDIZED_TOKENS = ["nep141:lsd-usdt.rhealab.near"];
|
|
7
|
+
const FEE_SUBSIDIZED_TOKENS = ["nep141:lsd-usdt.rhealab.near", "nep141:sol-0xa69aa1bcb03a369e338156a8718ad60271145803.omdep.near"];
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
10
10
|
export { FEE_SUBSIDIZED_TOKENS, INTENTS_STORAGE_BALANCE_CACHE_KEY, MIN_GAS_AMOUNT, MIN_STORAGE_BALANCE_FOR_INTENTS_NEAR, NEAR_NATIVE_ASSET_ID, OMNI_BRIDGE_CONTRACT };
|
|
@@ -90,7 +90,7 @@ var PoaBridge = class {
|
|
|
90
90
|
const isXrp = assetInfo.contractId === "xrp.omft.near";
|
|
91
91
|
try {
|
|
92
92
|
const accountInfo = await _defuse_protocol_internal_utils.xrpl.httpClient.getAccountInfo(args.destinationAddress, xrplConfig);
|
|
93
|
-
if (accountInfo.account_flags.requireDestinationTag) throw new require_errors$1.XrplDestinationTagRequiredError(args.destinationAddress);
|
|
93
|
+
if (accountInfo.account_flags.requireDestinationTag && !args.destinationMemo) throw new require_errors$1.XrplDestinationTagRequiredError(args.destinationAddress);
|
|
94
94
|
if (accountInfo.account_flags.depositAuth) throw new require_errors$1.XrplDepositAuthEnabledError(args.destinationAddress);
|
|
95
95
|
} catch (error) {
|
|
96
96
|
if (!(isXrp && error instanceof _defuse_protocol_internal_utils.xrpl.httpClient.XrplAccountNotFundedError)) throw error;
|
|
@@ -88,7 +88,7 @@ var PoaBridge = class {
|
|
|
88
88
|
const isXrp = assetInfo.contractId === "xrp.omft.near";
|
|
89
89
|
try {
|
|
90
90
|
const accountInfo = await xrpl.httpClient.getAccountInfo(args.destinationAddress, xrplConfig);
|
|
91
|
-
if (accountInfo.account_flags.requireDestinationTag) throw new XrplDestinationTagRequiredError(args.destinationAddress);
|
|
91
|
+
if (accountInfo.account_flags.requireDestinationTag && !args.destinationMemo) throw new XrplDestinationTagRequiredError(args.destinationAddress);
|
|
92
92
|
if (accountInfo.account_flags.depositAuth) throw new XrplDepositAuthEnabledError(args.destinationAddress);
|
|
93
93
|
} catch (error) {
|
|
94
94
|
if (!(isXrp && error instanceof xrpl.httpClient.XrplAccountNotFundedError)) throw error;
|
package/dist/src/sdk.cjs
CHANGED
|
@@ -178,6 +178,7 @@ var IntentsSDK = class {
|
|
|
178
178
|
assetId: args.withdrawalParams.assetId,
|
|
179
179
|
amount: actualAmount,
|
|
180
180
|
destinationAddress: args.withdrawalParams.destinationAddress,
|
|
181
|
+
destinationMemo: args.withdrawalParams.destinationMemo,
|
|
181
182
|
feeEstimation: args.feeEstimation,
|
|
182
183
|
routeConfig: args.withdrawalParams.routeConfig,
|
|
183
184
|
logger: args.logger
|
|
@@ -221,6 +222,7 @@ var IntentsSDK = class {
|
|
|
221
222
|
feeEstimation: fee,
|
|
222
223
|
routeConfig: args.withdrawalParams.routeConfig,
|
|
223
224
|
logger: args.logger,
|
|
225
|
+
destinationMemo: args.withdrawalParams.destinationMemo,
|
|
224
226
|
skipMinAmountValidation: args.withdrawalParams.amount === 0n && args.withdrawalParams.feeInclusive === false
|
|
225
227
|
});
|
|
226
228
|
return fee;
|
package/dist/src/sdk.js
CHANGED
|
@@ -176,6 +176,7 @@ var IntentsSDK = class {
|
|
|
176
176
|
assetId: args.withdrawalParams.assetId,
|
|
177
177
|
amount: actualAmount,
|
|
178
178
|
destinationAddress: args.withdrawalParams.destinationAddress,
|
|
179
|
+
destinationMemo: args.withdrawalParams.destinationMemo,
|
|
179
180
|
feeEstimation: args.feeEstimation,
|
|
180
181
|
routeConfig: args.withdrawalParams.routeConfig,
|
|
181
182
|
logger: args.logger
|
|
@@ -219,6 +220,7 @@ var IntentsSDK = class {
|
|
|
219
220
|
feeEstimation: fee,
|
|
220
221
|
routeConfig: args.withdrawalParams.routeConfig,
|
|
221
222
|
logger: args.logger,
|
|
223
|
+
destinationMemo: args.withdrawalParams.destinationMemo,
|
|
222
224
|
skipMinAmountValidation: args.withdrawalParams.amount === 0n && args.withdrawalParams.feeInclusive === false
|
|
223
225
|
});
|
|
224
226
|
return fee;
|