@defuse-protocol/intents-sdk 0.30.0 → 0.30.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.
|
@@ -3,8 +3,8 @@ const require_route_enum = require('../../constants/route-enum.cjs');
|
|
|
3
3
|
const require_direct_bridge_constants = require('./direct-bridge-constants.cjs');
|
|
4
4
|
let __defuse_protocol_internal_utils = require("@defuse-protocol/internal-utils");
|
|
5
5
|
__defuse_protocol_internal_utils = require_rolldown_runtime.__toESM(__defuse_protocol_internal_utils);
|
|
6
|
-
let
|
|
7
|
-
|
|
6
|
+
let near_api_js = require("near-api-js");
|
|
7
|
+
near_api_js = require_rolldown_runtime.__toESM(near_api_js);
|
|
8
8
|
|
|
9
9
|
//#region src/bridges/direct-bridge/direct-bridge-utils.ts
|
|
10
10
|
function createWithdrawIntentPrimitive(params) {
|
|
@@ -36,7 +36,7 @@ async function accountExistsInNEAR(provider, accountId) {
|
|
|
36
36
|
});
|
|
37
37
|
return true;
|
|
38
38
|
} catch (error) {
|
|
39
|
-
if (error instanceof
|
|
39
|
+
if (error instanceof near_api_js.providers.TypedError && error.type === "AccountDoesNotExist") return false;
|
|
40
40
|
throw error;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RouteEnum } from "../../constants/route-enum.js";
|
|
2
2
|
import { NEAR_NATIVE_ASSET_ID } from "./direct-bridge-constants.js";
|
|
3
3
|
import { assert, unwrapNearFailoverRpcProvider, utils } from "@defuse-protocol/internal-utils";
|
|
4
|
-
import {
|
|
4
|
+
import { providers } from "near-api-js";
|
|
5
5
|
|
|
6
6
|
//#region src/bridges/direct-bridge/direct-bridge-utils.ts
|
|
7
7
|
function createWithdrawIntentPrimitive(params) {
|
|
@@ -33,7 +33,7 @@ async function accountExistsInNEAR(provider, accountId) {
|
|
|
33
33
|
});
|
|
34
34
|
return true;
|
|
35
35
|
} catch (error) {
|
|
36
|
-
if (error instanceof TypedError && error.type === "AccountDoesNotExist") return false;
|
|
36
|
+
if (error instanceof providers.TypedError && error.type === "AccountDoesNotExist") return false;
|
|
37
37
|
throw error;
|
|
38
38
|
}
|
|
39
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defuse-protocol/intents-sdk",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"valibot": "^1.0.0",
|
|
40
40
|
"viem": "^2.0.0",
|
|
41
41
|
"@defuse-protocol/contract-types": "0.3.0",
|
|
42
|
-
"@defuse-protocol/internal-utils": "0.18.
|
|
42
|
+
"@defuse-protocol/internal-utils": "0.18.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"tsdown": "0.15.5",
|