amogus-sdk-internal-utils 0.35.2
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/_virtual/rolldown_runtime.cjs +43 -0
- package/dist/_virtual/rolldown_runtime.js +18 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/apis.cjs +10 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/apis.d.cts +6 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/apis.d.ts +6 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/apis.js +10 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/index.cjs +17 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/index.d.cts +9 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/index.d.ts +9 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/index.js +12 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/runtime.cjs +20 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/runtime.js +20 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/types.cjs +25 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/types.d.cts +31 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/types.d.ts +31 -0
- package/dist/bridgeIndexer/bridgeIndexerHttpClient/types.js +23 -0
- package/dist/bridgeIndexer/index.cjs +13 -0
- package/dist/bridgeIndexer/index.d.cts +8 -0
- package/dist/bridgeIndexer/index.d.ts +8 -0
- package/dist/bridgeIndexer/index.js +8 -0
- package/dist/config.cjs +86 -0
- package/dist/config.d.cts +50 -0
- package/dist/config.d.ts +50 -0
- package/dist/config.js +76 -0
- package/dist/errors/assert.cjs +11 -0
- package/dist/errors/assert.d.cts +11 -0
- package/dist/errors/assert.d.ts +11 -0
- package/dist/errors/assert.js +11 -0
- package/dist/errors/base.cjs +34 -0
- package/dist/errors/base.d.cts +21 -0
- package/dist/errors/base.d.ts +21 -0
- package/dist/errors/base.js +33 -0
- package/dist/errors/index.cjs +23 -0
- package/dist/errors/index.d.cts +11 -0
- package/dist/errors/index.d.ts +11 -0
- package/dist/errors/index.js +18 -0
- package/dist/errors/request.cjs +48 -0
- package/dist/errors/request.d.cts +61 -0
- package/dist/errors/request.d.ts +61 -0
- package/dist/errors/request.js +46 -0
- package/dist/errors/utils/isNetworkError.cjs +23 -0
- package/dist/errors/utils/isNetworkError.js +22 -0
- package/dist/errors/utils/toError.cjs +8 -0
- package/dist/errors/utils/toError.d.cts +4 -0
- package/dist/errors/utils/toError.d.ts +4 -0
- package/dist/errors/utils/toError.js +7 -0
- package/dist/index.cjs +144 -0
- package/dist/index.d.cts +33 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +33 -0
- package/dist/logger.d.cts +11 -0
- package/dist/logger.d.ts +11 -0
- package/dist/nearClient.cjs +18 -0
- package/dist/nearClient.d.cts +8 -0
- package/dist/nearClient.d.ts +8 -0
- package/dist/nearClient.js +18 -0
- package/dist/poaBridge/constants/blockchains.cjs +62 -0
- package/dist/poaBridge/constants/blockchains.d.cts +95 -0
- package/dist/poaBridge/constants/blockchains.d.ts +95 -0
- package/dist/poaBridge/constants/blockchains.js +59 -0
- package/dist/poaBridge/errors/withdrawal.cjs +52 -0
- package/dist/poaBridge/errors/withdrawal.d.cts +34 -0
- package/dist/poaBridge/errors/withdrawal.d.ts +34 -0
- package/dist/poaBridge/errors/withdrawal.js +50 -0
- package/dist/poaBridge/getPendingDeposits.cjs +31 -0
- package/dist/poaBridge/getPendingDeposits.d.cts +14 -0
- package/dist/poaBridge/getPendingDeposits.d.ts +15 -0
- package/dist/poaBridge/getPendingDeposits.js +31 -0
- package/dist/poaBridge/index.cjs +23 -0
- package/dist/poaBridge/index.d.cts +11 -0
- package/dist/poaBridge/index.d.ts +11 -0
- package/dist/poaBridge/index.js +18 -0
- package/dist/poaBridge/poaBridgeHttpClient/apis.cjs +38 -0
- package/dist/poaBridge/poaBridgeHttpClient/apis.d.cts +12 -0
- package/dist/poaBridge/poaBridgeHttpClient/apis.d.ts +12 -0
- package/dist/poaBridge/poaBridgeHttpClient/apis.js +32 -0
- package/dist/poaBridge/poaBridgeHttpClient/index.cjs +21 -0
- package/dist/poaBridge/poaBridgeHttpClient/index.d.cts +9 -0
- package/dist/poaBridge/poaBridgeHttpClient/index.d.ts +9 -0
- package/dist/poaBridge/poaBridgeHttpClient/index.js +16 -0
- package/dist/poaBridge/poaBridgeHttpClient/runtime.cjs +49 -0
- package/dist/poaBridge/poaBridgeHttpClient/runtime.js +47 -0
- package/dist/poaBridge/poaBridgeHttpClient/types.d.cts +172 -0
- package/dist/poaBridge/poaBridgeHttpClient/types.d.ts +172 -0
- package/dist/poaBridge/waitForWithdrawalCompletion.cjs +57 -0
- package/dist/poaBridge/waitForWithdrawalCompletion.d.cts +31 -0
- package/dist/poaBridge/waitForWithdrawalCompletion.d.ts +31 -0
- package/dist/poaBridge/waitForWithdrawalCompletion.js +56 -0
- package/dist/services/blockchainBalanceService.cjs +40 -0
- package/dist/services/blockchainBalanceService.d.cts +21 -0
- package/dist/services/blockchainBalanceService.d.ts +21 -0
- package/dist/services/blockchainBalanceService.js +37 -0
- package/dist/solverRelay/errors/intentSettlement.cjs +20 -0
- package/dist/solverRelay/errors/intentSettlement.d.cts +13 -0
- package/dist/solverRelay/errors/intentSettlement.d.ts +13 -0
- package/dist/solverRelay/errors/intentSettlement.js +20 -0
- package/dist/solverRelay/errors/quote.cjs +18 -0
- package/dist/solverRelay/errors/quote.d.cts +21 -0
- package/dist/solverRelay/errors/quote.d.ts +22 -0
- package/dist/solverRelay/errors/quote.js +18 -0
- package/dist/solverRelay/getQuote.cjs +70 -0
- package/dist/solverRelay/getQuote.d.cts +14 -0
- package/dist/solverRelay/getQuote.d.ts +14 -0
- package/dist/solverRelay/getQuote.js +70 -0
- package/dist/solverRelay/getStatus.cjs +26 -0
- package/dist/solverRelay/getStatus.d.cts +17 -0
- package/dist/solverRelay/getStatus.d.ts +18 -0
- package/dist/solverRelay/getStatus.js +26 -0
- package/dist/solverRelay/index.cjs +27 -0
- package/dist/solverRelay/index.d.cts +16 -0
- package/dist/solverRelay/index.d.ts +16 -0
- package/dist/solverRelay/index.js +22 -0
- package/dist/solverRelay/publishIntent.cjs +20 -0
- package/dist/solverRelay/publishIntent.d.cts +15 -0
- package/dist/solverRelay/publishIntent.d.ts +16 -0
- package/dist/solverRelay/publishIntent.js +20 -0
- package/dist/solverRelay/publishIntents.cjs +42 -0
- package/dist/solverRelay/publishIntents.d.cts +10 -0
- package/dist/solverRelay/publishIntents.d.ts +11 -0
- package/dist/solverRelay/publishIntents.js +41 -0
- package/dist/solverRelay/solverRelayHttpClient/apis.cjs +21 -0
- package/dist/solverRelay/solverRelayHttpClient/apis.d.cts +9 -0
- package/dist/solverRelay/solverRelayHttpClient/apis.d.ts +9 -0
- package/dist/solverRelay/solverRelayHttpClient/apis.js +18 -0
- package/dist/solverRelay/solverRelayHttpClient/index.cjs +18 -0
- package/dist/solverRelay/solverRelayHttpClient/index.d.cts +9 -0
- package/dist/solverRelay/solverRelayHttpClient/index.d.ts +9 -0
- package/dist/solverRelay/solverRelayHttpClient/index.js +13 -0
- package/dist/solverRelay/solverRelayHttpClient/runtime.cjs +60 -0
- package/dist/solverRelay/solverRelayHttpClient/runtime.js +58 -0
- package/dist/solverRelay/solverRelayHttpClient/types.d.cts +117 -0
- package/dist/solverRelay/solverRelayHttpClient/types.d.ts +117 -0
- package/dist/solverRelay/utils/parseFailedPublishError.cjs +64 -0
- package/dist/solverRelay/utils/parseFailedPublishError.d.cts +56 -0
- package/dist/solverRelay/utils/parseFailedPublishError.d.ts +57 -0
- package/dist/solverRelay/utils/parseFailedPublishError.js +61 -0
- package/dist/solverRelay/utils/quoteWithLog.cjs +21 -0
- package/dist/solverRelay/utils/quoteWithLog.d.cts +12 -0
- package/dist/solverRelay/utils/quoteWithLog.d.ts +14 -0
- package/dist/solverRelay/utils/quoteWithLog.js +21 -0
- package/dist/solverRelay/waitForIntentSettlement.cjs +52 -0
- package/dist/solverRelay/waitForIntentSettlement.d.cts +30 -0
- package/dist/solverRelay/waitForIntentSettlement.d.ts +30 -0
- package/dist/solverRelay/waitForIntentSettlement.js +52 -0
- package/dist/types/authHandle.cjs +22 -0
- package/dist/types/authHandle.d.cts +25 -0
- package/dist/types/authHandle.d.ts +25 -0
- package/dist/types/authHandle.js +16 -0
- package/dist/types/base.d.cts +45 -0
- package/dist/types/base.d.ts +45 -0
- package/dist/types/intentsUserId.d.cts +10 -0
- package/dist/types/intentsUserId.d.ts +10 -0
- package/dist/types/walletMessage.cjs +11 -0
- package/dist/types/walletMessage.d.cts +106 -0
- package/dist/types/walletMessage.d.ts +106 -0
- package/dist/types/walletMessage.js +5 -0
- package/dist/utils/abortSignal.cjs +19 -0
- package/dist/utils/abortSignal.js +18 -0
- package/dist/utils/appFee.cjs +20 -0
- package/dist/utils/appFee.d.cts +9 -0
- package/dist/utils/appFee.d.ts +9 -0
- package/dist/utils/appFee.js +15 -0
- package/dist/utils/assert.cjs +9 -0
- package/dist/utils/assert.d.cts +7 -0
- package/dist/utils/assert.d.ts +7 -0
- package/dist/utils/assert.js +9 -0
- package/dist/utils/authIdentity.cjs +56 -0
- package/dist/utils/authIdentity.d.cts +34 -0
- package/dist/utils/authIdentity.d.ts +34 -0
- package/dist/utils/authIdentity.js +50 -0
- package/dist/utils/failover.cjs +36 -0
- package/dist/utils/failover.d.cts +24 -0
- package/dist/utils/failover.d.ts +24 -0
- package/dist/utils/failover.js +34 -0
- package/dist/utils/handleRPCResponse.cjs +30 -0
- package/dist/utils/handleRPCResponse.js +28 -0
- package/dist/utils/handleResponse.cjs +31 -0
- package/dist/utils/handleResponse.js +29 -0
- package/dist/utils/index.cjs +55 -0
- package/dist/utils/index.d.cts +13 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.js +50 -0
- package/dist/utils/messageFactory.cjs +137 -0
- package/dist/utils/messageFactory.d.cts +70 -0
- package/dist/utils/messageFactory.d.ts +70 -0
- package/dist/utils/messageFactory.js +132 -0
- package/dist/utils/multiPayload/webauthn.cjs +27 -0
- package/dist/utils/multiPayload/webauthn.js +26 -0
- package/dist/utils/near.cjs +58 -0
- package/dist/utils/near.d.cts +35 -0
- package/dist/utils/near.d.ts +35 -0
- package/dist/utils/near.js +53 -0
- package/dist/utils/poll.cjs +87 -0
- package/dist/utils/poll.d.cts +54 -0
- package/dist/utils/poll.d.ts +54 -0
- package/dist/utils/poll.js +85 -0
- package/dist/utils/prepareBroadcastRequest.cjs +98 -0
- package/dist/utils/prepareBroadcastRequest.d.cts +16 -0
- package/dist/utils/prepareBroadcastRequest.d.ts +16 -0
- package/dist/utils/prepareBroadcastRequest.js +90 -0
- package/dist/utils/promise/withTimeout.cjs +34 -0
- package/dist/utils/promise/withTimeout.d.cts +16 -0
- package/dist/utils/promise/withTimeout.d.ts +16 -0
- package/dist/utils/promise/withTimeout.js +34 -0
- package/dist/utils/request.cjs +100 -0
- package/dist/utils/request.d.cts +27 -0
- package/dist/utils/request.d.ts +27 -0
- package/dist/utils/request.js +99 -0
- package/dist/utils/requestShouldRetry.cjs +20 -0
- package/dist/utils/requestShouldRetry.js +20 -0
- package/dist/utils/retry.cjs +66 -0
- package/dist/utils/retry.d.cts +56 -0
- package/dist/utils/retry.d.ts +56 -0
- package/dist/utils/retry.js +64 -0
- package/dist/utils/rpc-endpoint.cjs +56 -0
- package/dist/utils/rpc-endpoint.d.cts +20 -0
- package/dist/utils/rpc-endpoint.d.ts +20 -0
- package/dist/utils/rpc-endpoint.js +54 -0
- package/dist/utils/serialize.cjs +82 -0
- package/dist/utils/serialize.d.cts +17 -0
- package/dist/utils/serialize.d.ts +17 -0
- package/dist/utils/serialize.js +81 -0
- package/dist/utils/stellarAddressToBytes.cjs +295 -0
- package/dist/utils/stellarAddressToBytes.js +294 -0
- package/dist/utils/token.cjs +8 -0
- package/dist/utils/token.js +7 -0
- package/dist/utils/tokenUtils.cjs +263 -0
- package/dist/utils/tokenUtils.d.cts +88 -0
- package/dist/utils/tokenUtils.d.ts +88 -0
- package/dist/utils/tokenUtils.js +238 -0
- package/dist/utils/tronAddressToHex.cjs +18 -0
- package/dist/utils/tronAddressToHex.js +17 -0
- package/dist/utils/uint8Array.cjs +15 -0
- package/dist/utils/uint8Array.d.cts +4 -0
- package/dist/utils/uint8Array.d.ts +4 -0
- package/dist/utils/uint8Array.js +14 -0
- package/dist/utils/webAuthn.cjs +58 -0
- package/dist/utils/webAuthn.js +56 -0
- package/dist/xrpl/index.cjs +13 -0
- package/dist/xrpl/index.d.cts +8 -0
- package/dist/xrpl/index.d.ts +8 -0
- package/dist/xrpl/index.js +8 -0
- package/dist/xrpl/xrplHttpClient/apis.cjs +28 -0
- package/dist/xrpl/xrplHttpClient/apis.d.cts +7 -0
- package/dist/xrpl/xrplHttpClient/apis.d.ts +7 -0
- package/dist/xrpl/xrplHttpClient/apis.js +27 -0
- package/dist/xrpl/xrplHttpClient/errors.cjs +27 -0
- package/dist/xrpl/xrplHttpClient/errors.d.cts +24 -0
- package/dist/xrpl/xrplHttpClient/errors.d.ts +24 -0
- package/dist/xrpl/xrplHttpClient/errors.js +26 -0
- package/dist/xrpl/xrplHttpClient/index.cjs +19 -0
- package/dist/xrpl/xrplHttpClient/index.d.cts +10 -0
- package/dist/xrpl/xrplHttpClient/index.d.ts +10 -0
- package/dist/xrpl/xrplHttpClient/index.js +14 -0
- package/dist/xrpl/xrplHttpClient/runtime.cjs +57 -0
- package/dist/xrpl/xrplHttpClient/runtime.js +55 -0
- package/dist/xrpl/xrplHttpClient/types.cjs +39 -0
- package/dist/xrpl/xrplHttpClient/types.d.cts +64 -0
- package/dist/xrpl/xrplHttpClient/types.d.ts +64 -0
- package/dist/xrpl/xrplHttpClient/types.js +35 -0
- package/package.json +59 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseError } from "./base.js";
|
|
2
|
+
|
|
3
|
+
//#region src/errors/assert.ts
|
|
4
|
+
var AssertionError = class extends BaseError {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message || "Assertion failed", { name: "AssertionError" });
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AssertionError };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/errors/base.ts
|
|
3
|
+
var BaseError = class BaseError extends Error {
|
|
4
|
+
constructor(shortMessage, args = {}) {
|
|
5
|
+
const details = (() => {
|
|
6
|
+
if (args.cause instanceof BaseError) return args.cause.details;
|
|
7
|
+
if (args.cause != null && typeof args.cause === "object" && "message" in args.cause && typeof args.cause.message === "string") return args.cause.message;
|
|
8
|
+
return args.details ?? "";
|
|
9
|
+
})();
|
|
10
|
+
const message = [
|
|
11
|
+
shortMessage || "An error occurred.",
|
|
12
|
+
"",
|
|
13
|
+
...args.metaMessages ? [...args.metaMessages, ""] : [],
|
|
14
|
+
...details ? [`Details: ${details}`] : []
|
|
15
|
+
].join("\n");
|
|
16
|
+
super(message, args.cause ? { cause: args.cause } : void 0);
|
|
17
|
+
this.name = "BaseError";
|
|
18
|
+
this.details = details;
|
|
19
|
+
this.metaMessages = args.metaMessages;
|
|
20
|
+
this.name = args.name ?? this.name;
|
|
21
|
+
this.shortMessage = shortMessage;
|
|
22
|
+
}
|
|
23
|
+
walk(fn) {
|
|
24
|
+
return walk(this, fn);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function walk(err, fn) {
|
|
28
|
+
if (fn?.(err)) return err;
|
|
29
|
+
if (err && typeof err === "object" && "cause" in err && err.cause !== void 0) return walk(err.cause, fn);
|
|
30
|
+
return fn ? null : err;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.BaseError = BaseError;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/errors/base.d.ts
|
|
2
|
+
type BaseErrorParameters = {
|
|
3
|
+
cause?: unknown;
|
|
4
|
+
details?: string | undefined;
|
|
5
|
+
metaMessages?: string[] | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
type BaseErrorType = BaseError & {
|
|
9
|
+
name: "BaseError";
|
|
10
|
+
};
|
|
11
|
+
declare class BaseError extends Error {
|
|
12
|
+
details: string;
|
|
13
|
+
metaMessages?: string[] | undefined;
|
|
14
|
+
shortMessage: string;
|
|
15
|
+
name: string;
|
|
16
|
+
constructor(shortMessage: string, args?: BaseErrorParameters);
|
|
17
|
+
walk(): Error;
|
|
18
|
+
walk(fn: (err: unknown) => boolean): Error | null;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { BaseError, BaseErrorType };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/errors/base.d.ts
|
|
2
|
+
type BaseErrorParameters = {
|
|
3
|
+
cause?: unknown;
|
|
4
|
+
details?: string | undefined;
|
|
5
|
+
metaMessages?: string[] | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
type BaseErrorType = BaseError & {
|
|
9
|
+
name: "BaseError";
|
|
10
|
+
};
|
|
11
|
+
declare class BaseError extends Error {
|
|
12
|
+
details: string;
|
|
13
|
+
metaMessages?: string[] | undefined;
|
|
14
|
+
shortMessage: string;
|
|
15
|
+
name: string;
|
|
16
|
+
constructor(shortMessage: string, args?: BaseErrorParameters);
|
|
17
|
+
walk(): Error;
|
|
18
|
+
walk(fn: (err: unknown) => boolean): Error | null;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { BaseError, BaseErrorType };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/errors/base.ts
|
|
2
|
+
var BaseError = class BaseError extends Error {
|
|
3
|
+
constructor(shortMessage, args = {}) {
|
|
4
|
+
const details = (() => {
|
|
5
|
+
if (args.cause instanceof BaseError) return args.cause.details;
|
|
6
|
+
if (args.cause != null && typeof args.cause === "object" && "message" in args.cause && typeof args.cause.message === "string") return args.cause.message;
|
|
7
|
+
return args.details ?? "";
|
|
8
|
+
})();
|
|
9
|
+
const message = [
|
|
10
|
+
shortMessage || "An error occurred.",
|
|
11
|
+
"",
|
|
12
|
+
...args.metaMessages ? [...args.metaMessages, ""] : [],
|
|
13
|
+
...details ? [`Details: ${details}`] : []
|
|
14
|
+
].join("\n");
|
|
15
|
+
super(message, args.cause ? { cause: args.cause } : void 0);
|
|
16
|
+
this.name = "BaseError";
|
|
17
|
+
this.details = details;
|
|
18
|
+
this.metaMessages = args.metaMessages;
|
|
19
|
+
this.name = args.name ?? this.name;
|
|
20
|
+
this.shortMessage = shortMessage;
|
|
21
|
+
}
|
|
22
|
+
walk(fn) {
|
|
23
|
+
return walk(this, fn);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
function walk(err, fn) {
|
|
27
|
+
if (fn?.(err)) return err;
|
|
28
|
+
if (err && typeof err === "object" && "cause" in err && err.cause !== void 0) return walk(err.cause, fn);
|
|
29
|
+
return fn ? null : err;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { BaseError };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_base = require('./base.cjs');
|
|
3
|
+
const require_request = require('./request.cjs');
|
|
4
|
+
const require_toError = require('./utils/toError.cjs');
|
|
5
|
+
const require_assert = require('./assert.cjs');
|
|
6
|
+
|
|
7
|
+
//#region src/errors/index.ts
|
|
8
|
+
var errors_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
9
|
+
AssertionError: () => require_assert.AssertionError,
|
|
10
|
+
BaseError: () => require_base.BaseError,
|
|
11
|
+
HttpRequestError: () => require_request.HttpRequestError,
|
|
12
|
+
RpcRequestError: () => require_request.RpcRequestError,
|
|
13
|
+
TimeoutError: () => require_request.TimeoutError,
|
|
14
|
+
toError: () => require_toError.toError
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
Object.defineProperty(exports, 'errors_exports', {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return errors_exports;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseError, BaseErrorType } from "./base.cjs";
|
|
2
|
+
import { HttpRequestError, HttpRequestErrorType, RpcRequestError, RpcRequestErrorType, TimeoutError, TimeoutErrorType } from "./request.cjs";
|
|
3
|
+
import { AssertionError, AssertionErrorType } from "./assert.cjs";
|
|
4
|
+
import { toError } from "./utils/toError.cjs";
|
|
5
|
+
|
|
6
|
+
//#region src/errors/index.d.ts
|
|
7
|
+
declare namespace index_d_exports {
|
|
8
|
+
export { AssertionError, AssertionErrorType, BaseError, BaseErrorType, HttpRequestError, HttpRequestErrorType, RpcRequestError, RpcRequestErrorType, TimeoutError, TimeoutErrorType, toError };
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { index_d_exports };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseError, BaseErrorType } from "./base.js";
|
|
2
|
+
import { HttpRequestError, HttpRequestErrorType, RpcRequestError, RpcRequestErrorType, TimeoutError, TimeoutErrorType } from "./request.js";
|
|
3
|
+
import { AssertionError, AssertionErrorType } from "./assert.js";
|
|
4
|
+
import { toError } from "./utils/toError.js";
|
|
5
|
+
|
|
6
|
+
//#region src/errors/index.d.ts
|
|
7
|
+
declare namespace index_d_exports {
|
|
8
|
+
export { AssertionError, AssertionErrorType, BaseError, BaseErrorType, HttpRequestError, HttpRequestErrorType, RpcRequestError, RpcRequestErrorType, TimeoutError, TimeoutErrorType, toError };
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { index_d_exports };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { BaseError } from "./base.js";
|
|
3
|
+
import { HttpRequestError, RpcRequestError, TimeoutError } from "./request.js";
|
|
4
|
+
import { toError } from "./utils/toError.js";
|
|
5
|
+
import { AssertionError } from "./assert.js";
|
|
6
|
+
|
|
7
|
+
//#region src/errors/index.ts
|
|
8
|
+
var errors_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
+
AssertionError: () => AssertionError,
|
|
10
|
+
BaseError: () => BaseError,
|
|
11
|
+
HttpRequestError: () => HttpRequestError,
|
|
12
|
+
RpcRequestError: () => RpcRequestError,
|
|
13
|
+
TimeoutError: () => TimeoutError,
|
|
14
|
+
toError: () => toError
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { errors_exports };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const require_serialize = require('../utils/serialize.cjs');
|
|
2
|
+
const require_base = require('./base.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/errors/request.ts
|
|
5
|
+
var HttpRequestError = class extends require_base.BaseError {
|
|
6
|
+
constructor({ body, cause, details, headers, status, url }) {
|
|
7
|
+
super("HTTP request failed.", {
|
|
8
|
+
cause,
|
|
9
|
+
details,
|
|
10
|
+
metaMessages: [
|
|
11
|
+
status && `Status: ${status}`,
|
|
12
|
+
`URL: ${url}`,
|
|
13
|
+
body && `Request body: ${require_serialize.serialize(body)}`
|
|
14
|
+
].filter(Boolean),
|
|
15
|
+
name: "HttpRequestError"
|
|
16
|
+
});
|
|
17
|
+
this.body = body;
|
|
18
|
+
this.headers = headers;
|
|
19
|
+
this.status = status;
|
|
20
|
+
this.url = url;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var RpcRequestError = class extends require_base.BaseError {
|
|
24
|
+
constructor({ body, error, url }) {
|
|
25
|
+
super("RPC Request failed.", {
|
|
26
|
+
cause: error,
|
|
27
|
+
details: error.message,
|
|
28
|
+
metaMessages: [`URL: ${url}`, `Request body: ${require_serialize.serialize(body)}`],
|
|
29
|
+
name: "RpcRequestError"
|
|
30
|
+
});
|
|
31
|
+
this.code = error.code;
|
|
32
|
+
this.data = error.data;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var TimeoutError = class extends require_base.BaseError {
|
|
36
|
+
constructor({ body, url }) {
|
|
37
|
+
super("The request took too long to respond.", {
|
|
38
|
+
details: "The request timed out.",
|
|
39
|
+
metaMessages: [`URL: ${url}`, `Request body: ${require_serialize.serialize(body)}`],
|
|
40
|
+
name: "TimeoutError"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
exports.HttpRequestError = HttpRequestError;
|
|
47
|
+
exports.RpcRequestError = RpcRequestError;
|
|
48
|
+
exports.TimeoutError = TimeoutError;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BaseError } from "./base.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/errors/request.d.ts
|
|
4
|
+
type HttpRequestErrorType = HttpRequestError & {
|
|
5
|
+
name: "HttpRequestError";
|
|
6
|
+
};
|
|
7
|
+
declare class HttpRequestError extends BaseError {
|
|
8
|
+
body?: unknown | undefined;
|
|
9
|
+
headers?: Headers | undefined;
|
|
10
|
+
status?: number | undefined;
|
|
11
|
+
url: string;
|
|
12
|
+
constructor({
|
|
13
|
+
body,
|
|
14
|
+
cause,
|
|
15
|
+
details,
|
|
16
|
+
headers,
|
|
17
|
+
status,
|
|
18
|
+
url
|
|
19
|
+
}: {
|
|
20
|
+
body?: unknown | undefined;
|
|
21
|
+
cause?: Error | undefined;
|
|
22
|
+
details?: string | undefined;
|
|
23
|
+
headers?: Headers | undefined;
|
|
24
|
+
status?: number | undefined;
|
|
25
|
+
url: string;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
type RpcRequestErrorType = RpcRequestError & {
|
|
29
|
+
name: "RpcRequestError";
|
|
30
|
+
};
|
|
31
|
+
declare class RpcRequestError extends BaseError {
|
|
32
|
+
code: number;
|
|
33
|
+
data?: unknown;
|
|
34
|
+
constructor({
|
|
35
|
+
body,
|
|
36
|
+
error,
|
|
37
|
+
url
|
|
38
|
+
}: {
|
|
39
|
+
body: unknown;
|
|
40
|
+
error: {
|
|
41
|
+
code: number;
|
|
42
|
+
data?: unknown;
|
|
43
|
+
message: string;
|
|
44
|
+
};
|
|
45
|
+
url: string;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
type TimeoutErrorType = TimeoutError & {
|
|
49
|
+
name: "TimeoutError";
|
|
50
|
+
};
|
|
51
|
+
declare class TimeoutError extends BaseError {
|
|
52
|
+
constructor({
|
|
53
|
+
body,
|
|
54
|
+
url
|
|
55
|
+
}: {
|
|
56
|
+
body: unknown;
|
|
57
|
+
url: string;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { HttpRequestError, HttpRequestErrorType, RpcRequestError, RpcRequestErrorType, TimeoutError, TimeoutErrorType };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BaseError } from "./base.js";
|
|
2
|
+
|
|
3
|
+
//#region src/errors/request.d.ts
|
|
4
|
+
type HttpRequestErrorType = HttpRequestError & {
|
|
5
|
+
name: "HttpRequestError";
|
|
6
|
+
};
|
|
7
|
+
declare class HttpRequestError extends BaseError {
|
|
8
|
+
body?: unknown | undefined;
|
|
9
|
+
headers?: Headers | undefined;
|
|
10
|
+
status?: number | undefined;
|
|
11
|
+
url: string;
|
|
12
|
+
constructor({
|
|
13
|
+
body,
|
|
14
|
+
cause,
|
|
15
|
+
details,
|
|
16
|
+
headers,
|
|
17
|
+
status,
|
|
18
|
+
url
|
|
19
|
+
}: {
|
|
20
|
+
body?: unknown | undefined;
|
|
21
|
+
cause?: Error | undefined;
|
|
22
|
+
details?: string | undefined;
|
|
23
|
+
headers?: Headers | undefined;
|
|
24
|
+
status?: number | undefined;
|
|
25
|
+
url: string;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
type RpcRequestErrorType = RpcRequestError & {
|
|
29
|
+
name: "RpcRequestError";
|
|
30
|
+
};
|
|
31
|
+
declare class RpcRequestError extends BaseError {
|
|
32
|
+
code: number;
|
|
33
|
+
data?: unknown;
|
|
34
|
+
constructor({
|
|
35
|
+
body,
|
|
36
|
+
error,
|
|
37
|
+
url
|
|
38
|
+
}: {
|
|
39
|
+
body: unknown;
|
|
40
|
+
error: {
|
|
41
|
+
code: number;
|
|
42
|
+
data?: unknown;
|
|
43
|
+
message: string;
|
|
44
|
+
};
|
|
45
|
+
url: string;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
type TimeoutErrorType = TimeoutError & {
|
|
49
|
+
name: "TimeoutError";
|
|
50
|
+
};
|
|
51
|
+
declare class TimeoutError extends BaseError {
|
|
52
|
+
constructor({
|
|
53
|
+
body,
|
|
54
|
+
url
|
|
55
|
+
}: {
|
|
56
|
+
body: unknown;
|
|
57
|
+
url: string;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { HttpRequestError, HttpRequestErrorType, RpcRequestError, RpcRequestErrorType, TimeoutError, TimeoutErrorType };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { serialize } from "../utils/serialize.js";
|
|
2
|
+
import { BaseError } from "./base.js";
|
|
3
|
+
|
|
4
|
+
//#region src/errors/request.ts
|
|
5
|
+
var HttpRequestError = class extends BaseError {
|
|
6
|
+
constructor({ body, cause, details, headers, status, url }) {
|
|
7
|
+
super("HTTP request failed.", {
|
|
8
|
+
cause,
|
|
9
|
+
details,
|
|
10
|
+
metaMessages: [
|
|
11
|
+
status && `Status: ${status}`,
|
|
12
|
+
`URL: ${url}`,
|
|
13
|
+
body && `Request body: ${serialize(body)}`
|
|
14
|
+
].filter(Boolean),
|
|
15
|
+
name: "HttpRequestError"
|
|
16
|
+
});
|
|
17
|
+
this.body = body;
|
|
18
|
+
this.headers = headers;
|
|
19
|
+
this.status = status;
|
|
20
|
+
this.url = url;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var RpcRequestError = class extends BaseError {
|
|
24
|
+
constructor({ body, error, url }) {
|
|
25
|
+
super("RPC Request failed.", {
|
|
26
|
+
cause: error,
|
|
27
|
+
details: error.message,
|
|
28
|
+
metaMessages: [`URL: ${url}`, `Request body: ${serialize(body)}`],
|
|
29
|
+
name: "RpcRequestError"
|
|
30
|
+
});
|
|
31
|
+
this.code = error.code;
|
|
32
|
+
this.data = error.data;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var TimeoutError = class extends BaseError {
|
|
36
|
+
constructor({ body, url }) {
|
|
37
|
+
super("The request took too long to respond.", {
|
|
38
|
+
details: "The request timed out.",
|
|
39
|
+
metaMessages: [`URL: ${url}`, `Request body: ${serialize(body)}`],
|
|
40
|
+
name: "TimeoutError"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { HttpRequestError, RpcRequestError, TimeoutError };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/errors/utils/isNetworkError.ts
|
|
3
|
+
const objectToString = Object.prototype.toString;
|
|
4
|
+
const isError = (value) => objectToString.call(value) === "[object Error]" || value instanceof Error;
|
|
5
|
+
const errorMessages = new Set([
|
|
6
|
+
"network error",
|
|
7
|
+
"Failed to fetch",
|
|
8
|
+
"NetworkError when attempting to fetch resource.",
|
|
9
|
+
"The Internet connection appears to be offline.",
|
|
10
|
+
"Load failed",
|
|
11
|
+
"Network request failed",
|
|
12
|
+
"fetch failed",
|
|
13
|
+
"terminated"
|
|
14
|
+
]);
|
|
15
|
+
function isNetworkError(error) {
|
|
16
|
+
if (error instanceof Error) {}
|
|
17
|
+
if (!(error && isError(error) && error.name === "TypeError" && typeof error.message === "string")) return false;
|
|
18
|
+
if (error.message === "Load failed") return error.stack === void 0;
|
|
19
|
+
return errorMessages.has(error.message);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.isNetworkError = isNetworkError;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/errors/utils/isNetworkError.ts
|
|
2
|
+
const objectToString = Object.prototype.toString;
|
|
3
|
+
const isError = (value) => objectToString.call(value) === "[object Error]" || value instanceof Error;
|
|
4
|
+
const errorMessages = new Set([
|
|
5
|
+
"network error",
|
|
6
|
+
"Failed to fetch",
|
|
7
|
+
"NetworkError when attempting to fetch resource.",
|
|
8
|
+
"The Internet connection appears to be offline.",
|
|
9
|
+
"Load failed",
|
|
10
|
+
"Network request failed",
|
|
11
|
+
"fetch failed",
|
|
12
|
+
"terminated"
|
|
13
|
+
]);
|
|
14
|
+
function isNetworkError(error) {
|
|
15
|
+
if (error instanceof Error) {}
|
|
16
|
+
if (!(error && isError(error) && error.name === "TypeError" && typeof error.message === "string")) return false;
|
|
17
|
+
if (error.message === "Load failed") return error.stack === void 0;
|
|
18
|
+
return errorMessages.has(error.message);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { isNetworkError };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
const require_config = require('./config.cjs');
|
|
2
|
+
const require_serialize = require('./utils/serialize.cjs');
|
|
3
|
+
const require_base = require('./errors/base.cjs');
|
|
4
|
+
const require_request = require('./errors/request.cjs');
|
|
5
|
+
const require_withTimeout = require('./utils/promise/withTimeout.cjs');
|
|
6
|
+
const require_request$1 = require('./utils/request.cjs');
|
|
7
|
+
const require_retry = require('./utils/retry.cjs');
|
|
8
|
+
const require_withdrawal = require('./poaBridge/errors/withdrawal.cjs');
|
|
9
|
+
const require_blockchains = require('./poaBridge/constants/blockchains.cjs');
|
|
10
|
+
const require_index = require('./poaBridge/index.cjs');
|
|
11
|
+
const require_assert = require('./errors/assert.cjs');
|
|
12
|
+
const require_assert$1 = require('./utils/assert.cjs');
|
|
13
|
+
const require_quote = require('./solverRelay/errors/quote.cjs');
|
|
14
|
+
const require_authIdentity = require('./utils/authIdentity.cjs');
|
|
15
|
+
const require_prepareBroadcastRequest = require('./utils/prepareBroadcastRequest.cjs');
|
|
16
|
+
const require_index$1 = require('./utils/index.cjs');
|
|
17
|
+
const require_parseFailedPublishError = require('./solverRelay/utils/parseFailedPublishError.cjs');
|
|
18
|
+
const require_poll = require('./utils/poll.cjs');
|
|
19
|
+
const require_intentSettlement = require('./solverRelay/errors/intentSettlement.cjs');
|
|
20
|
+
const require_index$2 = require('./solverRelay/index.cjs');
|
|
21
|
+
const require_index$3 = require('./bridgeIndexer/index.cjs');
|
|
22
|
+
const require_index$4 = require('./errors/index.cjs');
|
|
23
|
+
const require_index$5 = require('./xrpl/index.cjs');
|
|
24
|
+
const require_messageFactory = require('./utils/messageFactory.cjs');
|
|
25
|
+
const require_appFee = require('./utils/appFee.cjs');
|
|
26
|
+
const require_walletMessage = require('./types/walletMessage.cjs');
|
|
27
|
+
const require_authHandle = require('./types/authHandle.cjs');
|
|
28
|
+
const require_blockchainBalanceService = require('./services/blockchainBalanceService.cjs');
|
|
29
|
+
const require_rpc_endpoint = require('./utils/rpc-endpoint.cjs');
|
|
30
|
+
const require_failover = require('./utils/failover.cjs');
|
|
31
|
+
const require_nearClient = require('./nearClient.cjs');
|
|
32
|
+
|
|
33
|
+
exports.AssertionError = require_assert.AssertionError;
|
|
34
|
+
exports.AuthMethod = require_authHandle.AuthMethod;
|
|
35
|
+
exports.BaseError = require_base.BaseError;
|
|
36
|
+
exports.BlockchainEnum = require_blockchains.BlockchainEnum;
|
|
37
|
+
exports.HttpRequestError = require_request.HttpRequestError;
|
|
38
|
+
exports.IntentSettlementError = require_intentSettlement.IntentSettlementError;
|
|
39
|
+
exports.POLL_PENDING = require_poll.POLL_PENDING;
|
|
40
|
+
exports.PUBLIC_NEAR_RPC_URLS = require_nearClient.PUBLIC_NEAR_RPC_URLS;
|
|
41
|
+
exports.PoaWithdrawalInvariantError = require_withdrawal.PoaWithdrawalInvariantError;
|
|
42
|
+
exports.PoaWithdrawalNotFoundError = require_withdrawal.PoaWithdrawalNotFoundError;
|
|
43
|
+
exports.PoaWithdrawalPendingError = require_withdrawal.PoaWithdrawalPendingError;
|
|
44
|
+
exports.PollTimeoutError = require_poll.PollTimeoutError;
|
|
45
|
+
exports.QuoteError = require_quote.QuoteError;
|
|
46
|
+
exports.RETRY_CONFIGS = require_retry.RETRY_CONFIGS;
|
|
47
|
+
exports.RelayPublishError = require_parseFailedPublishError.RelayPublishError;
|
|
48
|
+
exports.RelayPublishRejectedError = require_parseFailedPublishError.RelayPublishRejectedError;
|
|
49
|
+
exports.RelayPublishResultUnknownError = require_parseFailedPublishError.RelayPublishResultUnknownError;
|
|
50
|
+
exports.RpcRequestError = require_request.RpcRequestError;
|
|
51
|
+
exports.TimeoutError = require_request.TimeoutError;
|
|
52
|
+
Object.defineProperty(exports, 'appFee', {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () {
|
|
55
|
+
return require_appFee.appFee_exports;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
exports.assert = require_assert$1.assert;
|
|
59
|
+
Object.defineProperty(exports, 'authHandle', {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () {
|
|
62
|
+
return require_authHandle.authHandle_exports;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(exports, 'authIdentity', {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return require_authIdentity.authIdentity_exports;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, 'bridgeIndexer', {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () {
|
|
74
|
+
return require_index$3.bridgeIndexer_exports;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
exports.calculateMaxAttempts = require_retry.calculateMaxAttempts;
|
|
78
|
+
Object.defineProperty(exports, 'config', {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return require_config.config;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
exports.configsByEnvironment = require_config.configsByEnvironment;
|
|
85
|
+
exports.configureSDK = require_config.configureSDK;
|
|
86
|
+
Object.defineProperty(exports, 'errors', {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () {
|
|
89
|
+
return require_index$4.errors_exports;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
exports.extractRpcUrls = require_rpc_endpoint.extractRpcUrls;
|
|
93
|
+
exports.getNearNep141MinStorageBalance = require_blockchainBalanceService.getNearNep141MinStorageBalance;
|
|
94
|
+
exports.getNearNep141StorageBalance = require_blockchainBalanceService.getNearNep141StorageBalance;
|
|
95
|
+
Object.defineProperty(exports, 'messageFactory', {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () {
|
|
98
|
+
return require_messageFactory.messageFactory_exports;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
exports.nearFailoverRpcProvider = require_failover.nearFailoverRpcProvider;
|
|
102
|
+
exports.normalizeRpcEndpoint = require_rpc_endpoint.normalizeRpcEndpoint;
|
|
103
|
+
Object.defineProperty(exports, 'poaBridge', {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () {
|
|
106
|
+
return require_index.poaBridge_exports;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
exports.poll = require_poll.poll;
|
|
110
|
+
Object.defineProperty(exports, 'prepareBroadcastRequest', {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () {
|
|
113
|
+
return require_prepareBroadcastRequest.prepareBroadcastRequest_exports;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
exports.request = require_request$1.request;
|
|
117
|
+
exports.resolveEnvConfig = require_config.resolveEnvConfig;
|
|
118
|
+
exports.serialize = require_serialize.serialize;
|
|
119
|
+
Object.defineProperty(exports, 'solverRelay', {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () {
|
|
122
|
+
return require_index$2.solverRelay_exports;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
exports.unwrapNearFailoverRpcProvider = require_failover.unwrapNearFailoverRpcProvider;
|
|
126
|
+
Object.defineProperty(exports, 'utils', {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return require_index$1.utils_exports;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, 'walletMessage', {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return require_walletMessage.walletMessage_exports;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
exports.withTimeout = require_withTimeout.withTimeout;
|
|
139
|
+
Object.defineProperty(exports, 'xrpl', {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () {
|
|
142
|
+
return require_index$5.xrpl_exports;
|
|
143
|
+
}
|
|
144
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseError, BaseErrorType } from "./errors/base.cjs";
|
|
2
|
+
import { HttpRequestError, HttpRequestErrorType, RpcRequestError, RpcRequestErrorType, TimeoutError, TimeoutErrorType } from "./errors/request.cjs";
|
|
3
|
+
import { ILogger } from "./logger.cjs";
|
|
4
|
+
import { RETRY_CONFIGS, RetryOptions, calculateMaxAttempts } from "./utils/retry.cjs";
|
|
5
|
+
import { RequestErrorType, request } from "./utils/request.cjs";
|
|
6
|
+
import { BlockchainEnum } from "./poaBridge/constants/blockchains.cjs";
|
|
7
|
+
import { PoaWithdrawalInvariantError, PoaWithdrawalInvariantErrorType, PoaWithdrawalNotFoundError, PoaWithdrawalNotFoundErrorType, PoaWithdrawalPendingError, PoaWithdrawalPendingErrorType } from "./poaBridge/errors/withdrawal.cjs";
|
|
8
|
+
import { index_d_exports as index_d_exports$2 } from "./poaBridge/index.cjs";
|
|
9
|
+
import { QuoteError, QuoteErrorType } from "./solverRelay/errors/quote.cjs";
|
|
10
|
+
import { AssertionError, AssertionErrorType } from "./errors/assert.cjs";
|
|
11
|
+
import { index_d_exports as index_d_exports$1 } from "./errors/index.cjs";
|
|
12
|
+
import { RelayPublishError, RelayPublishErrorType, RelayPublishRejectedError, RelayPublishRejectedErrorType, RelayPublishResultUnknownError, RelayPublishResultUnknownErrorType } from "./solverRelay/utils/parseFailedPublishError.cjs";
|
|
13
|
+
import { IntentSettlementError, IntentSettlementErrorType } from "./solverRelay/errors/intentSettlement.cjs";
|
|
14
|
+
import { AuthMethod, authHandle_d_exports } from "./types/authHandle.cjs";
|
|
15
|
+
import { walletMessage_d_exports } from "./types/walletMessage.cjs";
|
|
16
|
+
import { index_d_exports as index_d_exports$3 } from "./solverRelay/index.cjs";
|
|
17
|
+
import { index_d_exports } from "./bridgeIndexer/index.cjs";
|
|
18
|
+
import { index_d_exports as index_d_exports$5 } from "./xrpl/index.cjs";
|
|
19
|
+
import { assert } from "./utils/assert.cjs";
|
|
20
|
+
import { authIdentity_d_exports } from "./utils/authIdentity.cjs";
|
|
21
|
+
import { prepareBroadcastRequest_d_exports } from "./utils/prepareBroadcastRequest.cjs";
|
|
22
|
+
import { index_d_exports as index_d_exports$4 } from "./utils/index.cjs";
|
|
23
|
+
import { messageFactory_d_exports } from "./utils/messageFactory.cjs";
|
|
24
|
+
import { appFee_d_exports } from "./utils/appFee.cjs";
|
|
25
|
+
import { getNearNep141MinStorageBalance, getNearNep141StorageBalance } from "./services/blockchainBalanceService.cjs";
|
|
26
|
+
import { EnvConfig, NearIntentsEnv, config, configsByEnvironment, configureSDK, resolveEnvConfig } from "./config.cjs";
|
|
27
|
+
import { withTimeout } from "./utils/promise/withTimeout.cjs";
|
|
28
|
+
import { CompletionStats, POLL_PENDING, PollOptions, PollTimeoutError, PollTimeoutErrorType, poll } from "./utils/poll.cjs";
|
|
29
|
+
import { serialize } from "./utils/serialize.cjs";
|
|
30
|
+
import { RpcEndpoint, RpcEndpointConfig, extractRpcUrls, normalizeRpcEndpoint } from "./utils/rpc-endpoint.cjs";
|
|
31
|
+
import { nearFailoverRpcProvider, unwrapNearFailoverRpcProvider } from "./utils/failover.cjs";
|
|
32
|
+
import { PUBLIC_NEAR_RPC_URLS } from "./nearClient.cjs";
|
|
33
|
+
export { AssertionError, type AssertionErrorType, AuthMethod, BaseError, type BaseErrorType, BlockchainEnum, type CompletionStats, type EnvConfig, HttpRequestError, type HttpRequestErrorType, type ILogger, IntentSettlementError, type IntentSettlementErrorType, type NearIntentsEnv, POLL_PENDING, PUBLIC_NEAR_RPC_URLS, PoaWithdrawalInvariantError, type PoaWithdrawalInvariantErrorType, PoaWithdrawalNotFoundError, type PoaWithdrawalNotFoundErrorType, PoaWithdrawalPendingError, type PoaWithdrawalPendingErrorType, type PollOptions, PollTimeoutError, type PollTimeoutErrorType, QuoteError, type QuoteErrorType, RETRY_CONFIGS, RelayPublishError, type RelayPublishErrorType, RelayPublishRejectedError, type RelayPublishRejectedErrorType, RelayPublishResultUnknownError, type RelayPublishResultUnknownErrorType, type RequestErrorType, type RetryOptions, type RpcEndpoint, type RpcEndpointConfig, RpcRequestError, type RpcRequestErrorType, TimeoutError, type TimeoutErrorType, appFee_d_exports as appFee, assert, authHandle_d_exports as authHandle, authIdentity_d_exports as authIdentity, index_d_exports as bridgeIndexer, calculateMaxAttempts, config, configsByEnvironment, configureSDK, index_d_exports$1 as errors, extractRpcUrls, getNearNep141MinStorageBalance, getNearNep141StorageBalance, messageFactory_d_exports as messageFactory, nearFailoverRpcProvider, normalizeRpcEndpoint, index_d_exports$2 as poaBridge, poll, prepareBroadcastRequest_d_exports as prepareBroadcastRequest, request, resolveEnvConfig, serialize, index_d_exports$3 as solverRelay, unwrapNearFailoverRpcProvider, index_d_exports$4 as utils, walletMessage_d_exports as walletMessage, withTimeout, index_d_exports$5 as xrpl };
|