lampamazaza-new-intents-sdk 0.47.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.
- package/LICENSE +21 -0
- package/README.md +1083 -0
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/index.cjs +124 -0
- package/dist/index.d.cts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +19 -0
- package/dist/src/bridges/aurora-engine-bridge/aurora-engine-bridge-constants.cjs +10 -0
- package/dist/src/bridges/aurora-engine-bridge/aurora-engine-bridge-constants.js +7 -0
- package/dist/src/bridges/aurora-engine-bridge/aurora-engine-bridge-utils.cjs +44 -0
- package/dist/src/bridges/aurora-engine-bridge/aurora-engine-bridge-utils.js +42 -0
- package/dist/src/bridges/aurora-engine-bridge/aurora-engine-bridge.cjs +111 -0
- package/dist/src/bridges/aurora-engine-bridge/aurora-engine-bridge.js +110 -0
- package/dist/src/bridges/direct-bridge/direct-bridge-constants.cjs +8 -0
- package/dist/src/bridges/direct-bridge/direct-bridge-constants.js +6 -0
- package/dist/src/bridges/direct-bridge/direct-bridge-utils.cjs +47 -0
- package/dist/src/bridges/direct-bridge/direct-bridge-utils.js +44 -0
- package/dist/src/bridges/direct-bridge/direct-bridge.cjs +155 -0
- package/dist/src/bridges/direct-bridge/direct-bridge.js +154 -0
- package/dist/src/bridges/direct-bridge/error.cjs +16 -0
- package/dist/src/bridges/direct-bridge/error.d.cts +12 -0
- package/dist/src/bridges/direct-bridge/error.d.ts +12 -0
- package/dist/src/bridges/direct-bridge/error.js +15 -0
- package/dist/src/bridges/hot-bridge/error.cjs +23 -0
- package/dist/src/bridges/hot-bridge/error.d.cts +19 -0
- package/dist/src/bridges/hot-bridge/error.d.ts +19 -0
- package/dist/src/bridges/hot-bridge/error.js +21 -0
- package/dist/src/bridges/hot-bridge/hot-bridge-chains.cjs +21 -0
- package/dist/src/bridges/hot-bridge/hot-bridge-chains.d.cts +6 -0
- package/dist/src/bridges/hot-bridge/hot-bridge-chains.d.ts +6 -0
- package/dist/src/bridges/hot-bridge/hot-bridge-chains.js +20 -0
- package/dist/src/bridges/hot-bridge/hot-bridge-constants.cjs +11 -0
- package/dist/src/bridges/hot-bridge/hot-bridge-constants.js +9 -0
- package/dist/src/bridges/hot-bridge/hot-bridge-utils.cjs +66 -0
- package/dist/src/bridges/hot-bridge/hot-bridge-utils.js +61 -0
- package/dist/src/bridges/hot-bridge/hot-bridge.cjs +241 -0
- package/dist/src/bridges/hot-bridge/hot-bridge.js +239 -0
- package/dist/src/bridges/intents-bridge/intents-bridge.cjs +59 -0
- package/dist/src/bridges/intents-bridge/intents-bridge.js +59 -0
- package/dist/src/bridges/omni-bridge/error.cjs +54 -0
- package/dist/src/bridges/omni-bridge/error.d.cts +41 -0
- package/dist/src/bridges/omni-bridge/error.d.ts +41 -0
- package/dist/src/bridges/omni-bridge/error.js +49 -0
- package/dist/src/bridges/omni-bridge/omni-bridge-constants.cjs +12 -0
- package/dist/src/bridges/omni-bridge/omni-bridge-constants.js +8 -0
- package/dist/src/bridges/omni-bridge/omni-bridge-utils.cjs +153 -0
- package/dist/src/bridges/omni-bridge/omni-bridge-utils.js +143 -0
- package/dist/src/bridges/omni-bridge/omni-bridge.cjs +316 -0
- package/dist/src/bridges/omni-bridge/omni-bridge.js +314 -0
- package/dist/src/bridges/poa-bridge/poa-bridge-utils.cjs +76 -0
- package/dist/src/bridges/poa-bridge/poa-bridge-utils.js +73 -0
- package/dist/src/bridges/poa-bridge/poa-bridge.cjs +175 -0
- package/dist/src/bridges/poa-bridge/poa-bridge.js +173 -0
- package/dist/src/bridges/poa-bridge/poa-constants.cjs +6 -0
- package/dist/src/bridges/poa-bridge/poa-constants.js +5 -0
- package/dist/src/classes/errors.cjs +87 -0
- package/dist/src/classes/errors.d.cts +48 -0
- package/dist/src/classes/errors.d.ts +48 -0
- package/dist/src/classes/errors.js +81 -0
- package/dist/src/constants/bridge-name-enum.cjs +11 -0
- package/dist/src/constants/bridge-name-enum.d.cts +11 -0
- package/dist/src/constants/bridge-name-enum.d.ts +11 -0
- package/dist/src/constants/bridge-name-enum.js +10 -0
- package/dist/src/constants/poa-tokens-routable-through-omni-bridge.cjs +17 -0
- package/dist/src/constants/poa-tokens-routable-through-omni-bridge.d.cts +12 -0
- package/dist/src/constants/poa-tokens-routable-through-omni-bridge.d.ts +12 -0
- package/dist/src/constants/poa-tokens-routable-through-omni-bridge.js +16 -0
- package/dist/src/constants/public-rpc-urls.cjs +25 -0
- package/dist/src/constants/public-rpc-urls.js +24 -0
- package/dist/src/constants/route-enum.cjs +13 -0
- package/dist/src/constants/route-enum.d.cts +13 -0
- package/dist/src/constants/route-enum.d.ts +13 -0
- package/dist/src/constants/route-enum.js +12 -0
- package/dist/src/constants/withdrawal-timing.cjs +68 -0
- package/dist/src/constants/withdrawal-timing.js +68 -0
- package/dist/src/core/withdrawal-watcher.cjs +86 -0
- package/dist/src/core/withdrawal-watcher.d.cts +18 -0
- package/dist/src/core/withdrawal-watcher.d.ts +19 -0
- package/dist/src/core/withdrawal-watcher.js +82 -0
- package/dist/src/intents/expirable-nonce.cjs +90 -0
- package/dist/src/intents/expirable-nonce.d.cts +44 -0
- package/dist/src/intents/expirable-nonce.d.ts +45 -0
- package/dist/src/intents/expirable-nonce.js +82 -0
- package/dist/src/intents/intent-executer-impl/intent-executer.cjs +85 -0
- package/dist/src/intents/intent-executer-impl/intent-executer.d.cts +20 -0
- package/dist/src/intents/intent-executer-impl/intent-executer.d.ts +24 -0
- package/dist/src/intents/intent-executer-impl/intent-executer.js +85 -0
- package/dist/src/intents/intent-hash.cjs +48 -0
- package/dist/src/intents/intent-hash.d.cts +8 -0
- package/dist/src/intents/intent-hash.d.ts +8 -0
- package/dist/src/intents/intent-hash.js +47 -0
- package/dist/src/intents/intent-hashes/erc191.cjs +38 -0
- package/dist/src/intents/intent-hashes/erc191.js +37 -0
- package/dist/src/intents/intent-hashes/nep413.cjs +23 -0
- package/dist/src/intents/intent-hashes/nep413.js +22 -0
- package/dist/src/intents/intent-hashes/raw-ed25519.cjs +26 -0
- package/dist/src/intents/intent-hashes/raw-ed25519.js +25 -0
- package/dist/src/intents/intent-hashes/sep53.cjs +36 -0
- package/dist/src/intents/intent-hashes/sep53.js +35 -0
- package/dist/src/intents/intent-hashes/tip191.cjs +39 -0
- package/dist/src/intents/intent-hashes/tip191.js +38 -0
- package/dist/src/intents/intent-hashes/ton-connect.cjs +105 -0
- package/dist/src/intents/intent-hashes/ton-connect.js +104 -0
- package/dist/src/intents/intent-hashes/webauthn.cjs +26 -0
- package/dist/src/intents/intent-hashes/webauthn.js +25 -0
- package/dist/src/intents/intent-payload-builder.cjs +208 -0
- package/dist/src/intents/intent-payload-builder.d.cts +161 -0
- package/dist/src/intents/intent-payload-builder.d.ts +161 -0
- package/dist/src/intents/intent-payload-builder.js +207 -0
- package/dist/src/intents/intent-payload-factory.cjs +23 -0
- package/dist/src/intents/intent-payload-factory.js +21 -0
- package/dist/src/intents/intent-relayer-impl/intent-relayer-public.cjs +43 -0
- package/dist/src/intents/intent-relayer-impl/intent-relayer-public.js +42 -0
- package/dist/src/intents/intent-signer-impl/factories.cjs +19 -0
- package/dist/src/intents/intent-signer-impl/factories.d.cts +11 -0
- package/dist/src/intents/intent-signer-impl/factories.d.ts +11 -0
- package/dist/src/intents/intent-signer-impl/factories.js +17 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-near-keypair.cjs +22 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-near-keypair.d.cts +15 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-near-keypair.d.ts +16 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-near-keypair.js +21 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-nep413.cjs +37 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-nep413.d.cts +14 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-nep413.d.ts +14 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-nep413.js +36 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-noop.cjs +8 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-noop.js +7 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-viem.cjs +31 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-viem.d.cts +17 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-viem.d.ts +17 -0
- package/dist/src/intents/intent-signer-impl/intent-signer-viem.js +30 -0
- package/dist/src/intents/interfaces/intent-executer.d.ts +2 -0
- package/dist/src/intents/interfaces/intent-relayer.d.cts +43 -0
- package/dist/src/intents/interfaces/intent-relayer.d.ts +43 -0
- package/dist/src/intents/interfaces/intent-signer.d.cts +8 -0
- package/dist/src/intents/interfaces/intent-signer.d.ts +8 -0
- package/dist/src/intents/interfaces/salt-manager.d.cts +9 -0
- package/dist/src/intents/interfaces/salt-manager.d.ts +9 -0
- package/dist/src/intents/salt-manager.cjs +74 -0
- package/dist/src/intents/salt-manager.js +72 -0
- package/dist/src/intents/shared-types.d.cts +20 -0
- package/dist/src/intents/shared-types.d.ts +20 -0
- package/dist/src/lib/array.cjs +11 -0
- package/dist/src/lib/array.js +10 -0
- package/dist/src/lib/caip2.cjs +50 -0
- package/dist/src/lib/caip2.d.cts +38 -0
- package/dist/src/lib/caip2.d.ts +38 -0
- package/dist/src/lib/caip2.js +48 -0
- package/dist/src/lib/configure-rpc-config.cjs +20 -0
- package/dist/src/lib/configure-rpc-config.js +18 -0
- package/dist/src/lib/estimate-fee.cjs +96 -0
- package/dist/src/lib/estimate-fee.js +94 -0
- package/dist/src/lib/hex.cjs +11 -0
- package/dist/src/lib/hex.js +10 -0
- package/dist/src/lib/nep413.cjs +42 -0
- package/dist/src/lib/nep413.d.cts +14 -0
- package/dist/src/lib/nep413.d.ts +14 -0
- package/dist/src/lib/nep413.js +41 -0
- package/dist/src/lib/object.cjs +10 -0
- package/dist/src/lib/object.js +9 -0
- package/dist/src/lib/parse-defuse-asset-id.cjs +15 -0
- package/dist/src/lib/parse-defuse-asset-id.js +14 -0
- package/dist/src/lib/route-config-factory.cjs +43 -0
- package/dist/src/lib/route-config-factory.d.cts +13 -0
- package/dist/src/lib/route-config-factory.d.ts +13 -0
- package/dist/src/lib/route-config-factory.js +37 -0
- package/dist/src/lib/tokensUsdPricesHttpClient/apis.cjs +17 -0
- package/dist/src/lib/tokensUsdPricesHttpClient/apis.js +16 -0
- package/dist/src/lib/validateAddress.cjs +271 -0
- package/dist/src/lib/validateAddress.d.cts +14 -0
- package/dist/src/lib/validateAddress.d.ts +14 -0
- package/dist/src/lib/validateAddress.js +270 -0
- package/dist/src/sdk.cjs +435 -0
- package/dist/src/sdk.d.cts +231 -0
- package/dist/src/sdk.d.ts +231 -0
- package/dist/src/sdk.js +433 -0
- package/dist/src/shared-types.d.cts +378 -0
- package/dist/src/shared-types.d.ts +378 -0
- package/package.json +62 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let lampamazaza_internal_utils = require("lampamazaza-internal-utils");
|
|
3
|
+
|
|
4
|
+
//#region src/bridges/omni-bridge/error.ts
|
|
5
|
+
var TokenNotFoundInDestinationChainError = class extends lampamazaza_internal_utils.BaseError {
|
|
6
|
+
constructor(token, destinationChain) {
|
|
7
|
+
super(`The token ${token} doesn't exist in destination chain ${destinationChain}`, {
|
|
8
|
+
metaMessages: [`Token: ${token}`, `Destination Chain: ${destinationChain}`],
|
|
9
|
+
name: "TokenNotFoundInDestinationChainError"
|
|
10
|
+
});
|
|
11
|
+
this.token = token;
|
|
12
|
+
this.destinationChain = destinationChain;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var InvalidFeeValueError = class extends lampamazaza_internal_utils.BaseError {
|
|
16
|
+
constructor(token, value) {
|
|
17
|
+
super(`Invalid fee value`, {
|
|
18
|
+
metaMessages: [`Token: ${token}`, `Fee value: ${value}`],
|
|
19
|
+
name: "InvalidFeeValueError"
|
|
20
|
+
});
|
|
21
|
+
this.token = token;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var IntentsNearOmniAvailableBalanceTooLowError = class extends lampamazaza_internal_utils.BaseError {
|
|
25
|
+
constructor(balance) {
|
|
26
|
+
super(`Omni storage balance of intents contract is too low to complete this transaction safely.`, {
|
|
27
|
+
metaMessages: [`Balance: ${balance}`],
|
|
28
|
+
name: "IntentsNearOmniAvailableBalanceTooLowError",
|
|
29
|
+
details: `The available Omni storage balance for intents contract is ${balance}, which is too low to complete this transaction safely. The balance needs to be topped up before retrying.`
|
|
30
|
+
});
|
|
31
|
+
this.balance = balance;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var OmniWithdrawalApiFeeRequestTimeoutError = class extends lampamazaza_internal_utils.BaseError {
|
|
35
|
+
constructor() {
|
|
36
|
+
super("Omni bridge withdrawal fee request timed out.", { name: "OmniWithdrawalApiFeeRequestTimeoutError" });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var InsufficientUtxoForOmniBridgeWithdrawalError = class extends lampamazaza_internal_utils.BaseError {
|
|
40
|
+
constructor(destinationChain) {
|
|
41
|
+
super("Insufficient utxo for withdrawal to a utxo chain.", {
|
|
42
|
+
metaMessages: [`Destination Chain: ${destinationChain}`],
|
|
43
|
+
name: "InsufficientUtxoForOmniBridgeWithdrawalError"
|
|
44
|
+
});
|
|
45
|
+
this.destinationChain = destinationChain;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
exports.InsufficientUtxoForOmniBridgeWithdrawalError = InsufficientUtxoForOmniBridgeWithdrawalError;
|
|
51
|
+
exports.IntentsNearOmniAvailableBalanceTooLowError = IntentsNearOmniAvailableBalanceTooLowError;
|
|
52
|
+
exports.InvalidFeeValueError = InvalidFeeValueError;
|
|
53
|
+
exports.OmniWithdrawalApiFeeRequestTimeoutError = OmniWithdrawalApiFeeRequestTimeoutError;
|
|
54
|
+
exports.TokenNotFoundInDestinationChainError = TokenNotFoundInDestinationChainError;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Chain } from "../../lib/caip2.cjs";
|
|
2
|
+
import { BaseError } from "lampamazaza-internal-utils";
|
|
3
|
+
|
|
4
|
+
//#region src/bridges/omni-bridge/error.d.ts
|
|
5
|
+
type TokenNotFoundInDestinationChainErrorType = TokenNotFoundInDestinationChainError & {
|
|
6
|
+
name: "TokenNotFoundInDestinationChainError";
|
|
7
|
+
};
|
|
8
|
+
declare class TokenNotFoundInDestinationChainError extends BaseError {
|
|
9
|
+
token: string;
|
|
10
|
+
destinationChain: Chain;
|
|
11
|
+
constructor(token: string, destinationChain: Chain);
|
|
12
|
+
}
|
|
13
|
+
type InvalidFeeValueErrorType = InvalidFeeValueError & {
|
|
14
|
+
name: "InvalidFeeValueError";
|
|
15
|
+
};
|
|
16
|
+
declare class InvalidFeeValueError extends BaseError {
|
|
17
|
+
token: string;
|
|
18
|
+
constructor(token: string, value: unknown);
|
|
19
|
+
}
|
|
20
|
+
type IntentsNearOmniAvailableBalanceTooLowErrorType = IntentsNearOmniAvailableBalanceTooLowError & {
|
|
21
|
+
name: "IntentsNearOmniAvailableBalanceTooLowError";
|
|
22
|
+
};
|
|
23
|
+
declare class IntentsNearOmniAvailableBalanceTooLowError extends BaseError {
|
|
24
|
+
balance: string;
|
|
25
|
+
constructor(balance: string);
|
|
26
|
+
}
|
|
27
|
+
type OmniWithdrawalApiFeeRequestTimeoutErrorType = OmniWithdrawalApiFeeRequestTimeoutError & {
|
|
28
|
+
name: "OmniWithdrawalApiFeeRequestTimeoutError";
|
|
29
|
+
};
|
|
30
|
+
declare class OmniWithdrawalApiFeeRequestTimeoutError extends BaseError {
|
|
31
|
+
constructor();
|
|
32
|
+
}
|
|
33
|
+
type InsufficientUtxoForOmniBridgeWithdrawalErrorType = InsufficientUtxoForOmniBridgeWithdrawalError & {
|
|
34
|
+
name: "InsufficientUtxoForOmniBridgeWithdrawalError";
|
|
35
|
+
};
|
|
36
|
+
declare class InsufficientUtxoForOmniBridgeWithdrawalError extends BaseError {
|
|
37
|
+
destinationChain: Chain;
|
|
38
|
+
constructor(destinationChain: Chain);
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { InsufficientUtxoForOmniBridgeWithdrawalError, InsufficientUtxoForOmniBridgeWithdrawalErrorType, IntentsNearOmniAvailableBalanceTooLowError, IntentsNearOmniAvailableBalanceTooLowErrorType, InvalidFeeValueError, InvalidFeeValueErrorType, OmniWithdrawalApiFeeRequestTimeoutError, OmniWithdrawalApiFeeRequestTimeoutErrorType, TokenNotFoundInDestinationChainError, TokenNotFoundInDestinationChainErrorType };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Chain } from "../../lib/caip2.js";
|
|
2
|
+
import { BaseError } from "lampamazaza-internal-utils";
|
|
3
|
+
|
|
4
|
+
//#region src/bridges/omni-bridge/error.d.ts
|
|
5
|
+
type TokenNotFoundInDestinationChainErrorType = TokenNotFoundInDestinationChainError & {
|
|
6
|
+
name: "TokenNotFoundInDestinationChainError";
|
|
7
|
+
};
|
|
8
|
+
declare class TokenNotFoundInDestinationChainError extends BaseError {
|
|
9
|
+
token: string;
|
|
10
|
+
destinationChain: Chain;
|
|
11
|
+
constructor(token: string, destinationChain: Chain);
|
|
12
|
+
}
|
|
13
|
+
type InvalidFeeValueErrorType = InvalidFeeValueError & {
|
|
14
|
+
name: "InvalidFeeValueError";
|
|
15
|
+
};
|
|
16
|
+
declare class InvalidFeeValueError extends BaseError {
|
|
17
|
+
token: string;
|
|
18
|
+
constructor(token: string, value: unknown);
|
|
19
|
+
}
|
|
20
|
+
type IntentsNearOmniAvailableBalanceTooLowErrorType = IntentsNearOmniAvailableBalanceTooLowError & {
|
|
21
|
+
name: "IntentsNearOmniAvailableBalanceTooLowError";
|
|
22
|
+
};
|
|
23
|
+
declare class IntentsNearOmniAvailableBalanceTooLowError extends BaseError {
|
|
24
|
+
balance: string;
|
|
25
|
+
constructor(balance: string);
|
|
26
|
+
}
|
|
27
|
+
type OmniWithdrawalApiFeeRequestTimeoutErrorType = OmniWithdrawalApiFeeRequestTimeoutError & {
|
|
28
|
+
name: "OmniWithdrawalApiFeeRequestTimeoutError";
|
|
29
|
+
};
|
|
30
|
+
declare class OmniWithdrawalApiFeeRequestTimeoutError extends BaseError {
|
|
31
|
+
constructor();
|
|
32
|
+
}
|
|
33
|
+
type InsufficientUtxoForOmniBridgeWithdrawalErrorType = InsufficientUtxoForOmniBridgeWithdrawalError & {
|
|
34
|
+
name: "InsufficientUtxoForOmniBridgeWithdrawalError";
|
|
35
|
+
};
|
|
36
|
+
declare class InsufficientUtxoForOmniBridgeWithdrawalError extends BaseError {
|
|
37
|
+
destinationChain: Chain;
|
|
38
|
+
constructor(destinationChain: Chain);
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { InsufficientUtxoForOmniBridgeWithdrawalError, InsufficientUtxoForOmniBridgeWithdrawalErrorType, IntentsNearOmniAvailableBalanceTooLowError, IntentsNearOmniAvailableBalanceTooLowErrorType, InvalidFeeValueError, InvalidFeeValueErrorType, OmniWithdrawalApiFeeRequestTimeoutError, OmniWithdrawalApiFeeRequestTimeoutErrorType, TokenNotFoundInDestinationChainError, TokenNotFoundInDestinationChainErrorType };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BaseError } from "lampamazaza-internal-utils";
|
|
2
|
+
|
|
3
|
+
//#region src/bridges/omni-bridge/error.ts
|
|
4
|
+
var TokenNotFoundInDestinationChainError = class extends BaseError {
|
|
5
|
+
constructor(token, destinationChain) {
|
|
6
|
+
super(`The token ${token} doesn't exist in destination chain ${destinationChain}`, {
|
|
7
|
+
metaMessages: [`Token: ${token}`, `Destination Chain: ${destinationChain}`],
|
|
8
|
+
name: "TokenNotFoundInDestinationChainError"
|
|
9
|
+
});
|
|
10
|
+
this.token = token;
|
|
11
|
+
this.destinationChain = destinationChain;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
var InvalidFeeValueError = class extends BaseError {
|
|
15
|
+
constructor(token, value) {
|
|
16
|
+
super(`Invalid fee value`, {
|
|
17
|
+
metaMessages: [`Token: ${token}`, `Fee value: ${value}`],
|
|
18
|
+
name: "InvalidFeeValueError"
|
|
19
|
+
});
|
|
20
|
+
this.token = token;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var IntentsNearOmniAvailableBalanceTooLowError = class extends BaseError {
|
|
24
|
+
constructor(balance) {
|
|
25
|
+
super(`Omni storage balance of intents contract is too low to complete this transaction safely.`, {
|
|
26
|
+
metaMessages: [`Balance: ${balance}`],
|
|
27
|
+
name: "IntentsNearOmniAvailableBalanceTooLowError",
|
|
28
|
+
details: `The available Omni storage balance for intents contract is ${balance}, which is too low to complete this transaction safely. The balance needs to be topped up before retrying.`
|
|
29
|
+
});
|
|
30
|
+
this.balance = balance;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var OmniWithdrawalApiFeeRequestTimeoutError = class extends BaseError {
|
|
34
|
+
constructor() {
|
|
35
|
+
super("Omni bridge withdrawal fee request timed out.", { name: "OmniWithdrawalApiFeeRequestTimeoutError" });
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var InsufficientUtxoForOmniBridgeWithdrawalError = class extends BaseError {
|
|
39
|
+
constructor(destinationChain) {
|
|
40
|
+
super("Insufficient utxo for withdrawal to a utxo chain.", {
|
|
41
|
+
metaMessages: [`Destination Chain: ${destinationChain}`],
|
|
42
|
+
name: "InsufficientUtxoForOmniBridgeWithdrawalError"
|
|
43
|
+
});
|
|
44
|
+
this.destinationChain = destinationChain;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { InsufficientUtxoForOmniBridgeWithdrawalError, IntentsNearOmniAvailableBalanceTooLowError, InvalidFeeValueError, OmniWithdrawalApiFeeRequestTimeoutError, TokenNotFoundInDestinationChainError };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/bridges/omni-bridge/omni-bridge-constants.ts
|
|
3
|
+
const NEAR_NATIVE_ASSET_ID = "nep141:wrap.near";
|
|
4
|
+
const OMNI_BRIDGE_CONTRACT = "omni.bridge.near";
|
|
5
|
+
const MIN_ALLOWED_STORAGE_BALANCE_FOR_INTENTS_NEAR = 500000000000000000000000n;
|
|
6
|
+
const MIN_GAS_AMOUNT = "37400000000000";
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.MIN_ALLOWED_STORAGE_BALANCE_FOR_INTENTS_NEAR = MIN_ALLOWED_STORAGE_BALANCE_FOR_INTENTS_NEAR;
|
|
10
|
+
exports.MIN_GAS_AMOUNT = MIN_GAS_AMOUNT;
|
|
11
|
+
exports.NEAR_NATIVE_ASSET_ID = NEAR_NATIVE_ASSET_ID;
|
|
12
|
+
exports.OMNI_BRIDGE_CONTRACT = OMNI_BRIDGE_CONTRACT;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/bridges/omni-bridge/omni-bridge-constants.ts
|
|
2
|
+
const NEAR_NATIVE_ASSET_ID = "nep141:wrap.near";
|
|
3
|
+
const OMNI_BRIDGE_CONTRACT = "omni.bridge.near";
|
|
4
|
+
const MIN_ALLOWED_STORAGE_BALANCE_FOR_INTENTS_NEAR = 500000000000000000000000n;
|
|
5
|
+
const MIN_GAS_AMOUNT = "37400000000000";
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { MIN_ALLOWED_STORAGE_BALANCE_FOR_INTENTS_NEAR, MIN_GAS_AMOUNT, NEAR_NATIVE_ASSET_ID, OMNI_BRIDGE_CONTRACT };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_caip2 = require('../../lib/caip2.cjs');
|
|
3
|
+
const require_omni_bridge_constants = require('./omni-bridge-constants.cjs');
|
|
4
|
+
const require_poa_tokens_routable_through_omni_bridge = require('../../constants/poa-tokens-routable-through-omni-bridge.cjs');
|
|
5
|
+
let lampamazaza_internal_utils = require("lampamazaza-internal-utils");
|
|
6
|
+
let valibot = require("valibot");
|
|
7
|
+
valibot = require_rolldown_runtime.__toESM(valibot);
|
|
8
|
+
let _omni_bridge_core = require("@omni-bridge/core");
|
|
9
|
+
let _omni_bridge_near = require("@omni-bridge/near");
|
|
10
|
+
|
|
11
|
+
//#region src/bridges/omni-bridge/omni-bridge-utils.ts
|
|
12
|
+
function createWithdrawIntentsPrimitive(params) {
|
|
13
|
+
const { contractId: tokenAccountId, standard } = lampamazaza_internal_utils.utils.parseDefuseAssetId(params.assetId);
|
|
14
|
+
(0, lampamazaza_internal_utils.assert)(standard === "nep141", "Only NEP-141 is supported");
|
|
15
|
+
const recipient = (0, _omni_bridge_core.omniAddress)(params.omniChainKind, params.destinationAddress);
|
|
16
|
+
let msg = "";
|
|
17
|
+
const ftWithdrawPayload = {
|
|
18
|
+
recipient,
|
|
19
|
+
fee: "0",
|
|
20
|
+
native_token_fee: params.nativeFee.toString()
|
|
21
|
+
};
|
|
22
|
+
if (isUtxoChain(params.omniChainKind)) {
|
|
23
|
+
(0, lampamazaza_internal_utils.assert)(params.utxoMaxGasFee !== null && params.utxoMaxGasFee > 0n, `Invalid utxo max gas fee: expected > 0, got ${params.utxoMaxGasFee}`);
|
|
24
|
+
msg = JSON.stringify({ MaxGasFee: params.utxoMaxGasFee.toString() });
|
|
25
|
+
ftWithdrawPayload.msg = msg;
|
|
26
|
+
}
|
|
27
|
+
const intents = [];
|
|
28
|
+
if (params.nativeFee > 0n) intents.push({
|
|
29
|
+
deposit_for_account_id: (0, _omni_bridge_near.calculateStorageAccountId)({
|
|
30
|
+
token: `near:${tokenAccountId}`,
|
|
31
|
+
amount: params.amount,
|
|
32
|
+
recipient,
|
|
33
|
+
fee: {
|
|
34
|
+
fee: 0n,
|
|
35
|
+
native_fee: params.nativeFee
|
|
36
|
+
},
|
|
37
|
+
sender: `near:${params.intentsContract}`,
|
|
38
|
+
msg
|
|
39
|
+
}),
|
|
40
|
+
amount: params.nativeFee.toString(),
|
|
41
|
+
contract_id: require_omni_bridge_constants.OMNI_BRIDGE_CONTRACT,
|
|
42
|
+
intent: "storage_deposit"
|
|
43
|
+
});
|
|
44
|
+
intents.push({
|
|
45
|
+
intent: "ft_withdraw",
|
|
46
|
+
token: tokenAccountId,
|
|
47
|
+
receiver_id: require_omni_bridge_constants.OMNI_BRIDGE_CONTRACT,
|
|
48
|
+
amount: params.amount.toString(),
|
|
49
|
+
storage_deposit: params.storageDepositAmount > 0n ? params.storageDepositAmount.toString() : void 0,
|
|
50
|
+
msg: JSON.stringify(ftWithdrawPayload),
|
|
51
|
+
min_gas: require_omni_bridge_constants.MIN_GAS_AMOUNT
|
|
52
|
+
});
|
|
53
|
+
return intents;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Mapping between CAIP-2 chain identifiers and Omni Bridge ChainKind.
|
|
57
|
+
* This serves as a single source of truth for bidirectional chain conversions.
|
|
58
|
+
*/
|
|
59
|
+
const CHAIN_MAPPINGS = [
|
|
60
|
+
[require_caip2.Chains.Ethereum, _omni_bridge_core.ChainKind.Eth],
|
|
61
|
+
[require_caip2.Chains.Base, _omni_bridge_core.ChainKind.Base],
|
|
62
|
+
[require_caip2.Chains.Arbitrum, _omni_bridge_core.ChainKind.Arb],
|
|
63
|
+
[require_caip2.Chains.Solana, _omni_bridge_core.ChainKind.Sol],
|
|
64
|
+
[require_caip2.Chains.BNB, _omni_bridge_core.ChainKind.Bnb],
|
|
65
|
+
[require_caip2.Chains.Bitcoin, _omni_bridge_core.ChainKind.Btc]
|
|
66
|
+
];
|
|
67
|
+
function caip2ToChainKind(network) {
|
|
68
|
+
return CHAIN_MAPPINGS.find(([chain]) => chain === network)?.[1] ?? null;
|
|
69
|
+
}
|
|
70
|
+
function chainKindToCaip2(network) {
|
|
71
|
+
return CHAIN_MAPPINGS.find(([_, kind]) => kind === network)?.[0] ?? null;
|
|
72
|
+
}
|
|
73
|
+
const UTXO_CHAINS = [_omni_bridge_core.ChainKind.Btc];
|
|
74
|
+
function isUtxoChain(network) {
|
|
75
|
+
return UTXO_CHAINS.includes(network);
|
|
76
|
+
}
|
|
77
|
+
function poaContractIdToChainKind(contractId) {
|
|
78
|
+
return require_poa_tokens_routable_through_omni_bridge.POA_TOKENS_ROUTABLE_THROUGH_OMNI_BRIDGE[contractId] ?? null;
|
|
79
|
+
}
|
|
80
|
+
function validateOmniToken(nearAddress) {
|
|
81
|
+
if (nearAddress.endsWith(".testnet")) return false;
|
|
82
|
+
return (0, _omni_bridge_core.isBridgeToken)(nearAddress);
|
|
83
|
+
}
|
|
84
|
+
async function getAccountOmniStorageBalance(nearProvider, accountId) {
|
|
85
|
+
return lampamazaza_internal_utils.utils.queryContract({
|
|
86
|
+
contractId: require_omni_bridge_constants.OMNI_BRIDGE_CONTRACT,
|
|
87
|
+
methodName: "storage_balance_of",
|
|
88
|
+
args: { account_id: accountId },
|
|
89
|
+
finality: "optimistic",
|
|
90
|
+
nearClient: nearProvider,
|
|
91
|
+
schema: valibot.union([valibot.null(), valibot.object({
|
|
92
|
+
total: valibot.string(),
|
|
93
|
+
available: valibot.string()
|
|
94
|
+
})])
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
const OmniAddressSchema = valibot.custom((input) => typeof input === "string" && (input.startsWith("eth:") || input.startsWith("near:") || input.startsWith("sol:") || input.startsWith("arb:") || input.startsWith("base:") || input.startsWith("btc:") || input.startsWith("bnb:")), "Must comply with omni address schema");
|
|
98
|
+
/**
|
|
99
|
+
* Converts a token address from one chain to its equivalent on another chain.
|
|
100
|
+
* @param nearProvider Near provider used for querying the contract
|
|
101
|
+
* @param tokenAddress The source token address to convert
|
|
102
|
+
* @param destinationChain The target chain for the conversion
|
|
103
|
+
* @returns Promise resolving to the equivalent token address on the destination chain
|
|
104
|
+
* @throws Error if source and destination chains are the same
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* // Convert NEAR token to ETH
|
|
108
|
+
* const ethAddress = await getBridgedToken("near:token123", ChainKind.Ethereum)
|
|
109
|
+
*/
|
|
110
|
+
async function getBridgedToken(nearProvider, tokenAddress, destinationChain) {
|
|
111
|
+
return lampamazaza_internal_utils.utils.queryContract({
|
|
112
|
+
contractId: require_omni_bridge_constants.OMNI_BRIDGE_CONTRACT,
|
|
113
|
+
methodName: "get_bridged_token",
|
|
114
|
+
args: {
|
|
115
|
+
chain: _omni_bridge_core.ChainKind[destinationChain].toString(),
|
|
116
|
+
address: tokenAddress
|
|
117
|
+
},
|
|
118
|
+
finality: "optimistic",
|
|
119
|
+
nearClient: nearProvider,
|
|
120
|
+
schema: valibot.union([valibot.null(), OmniAddressSchema])
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Gets token decimals from the NEAR contract
|
|
125
|
+
* @param nearProvider Near provider used for querying the contract
|
|
126
|
+
* @param tokenAddress The Omni token address to check
|
|
127
|
+
* @returns Promise resolving to the token's decimal information
|
|
128
|
+
*/
|
|
129
|
+
async function getTokenDecimals(nearProvider, tokenAddress) {
|
|
130
|
+
if ((0, _omni_bridge_core.getChain)(tokenAddress) === _omni_bridge_core.ChainKind.Near) throw new Error("Token decimals cannot be queried using NEAR addresses. Use the token's foreign chain representation (e.g., eth:0x...) to query decimals.");
|
|
131
|
+
return lampamazaza_internal_utils.utils.queryContract({
|
|
132
|
+
contractId: require_omni_bridge_constants.OMNI_BRIDGE_CONTRACT,
|
|
133
|
+
methodName: "get_token_decimals",
|
|
134
|
+
args: { address: tokenAddress },
|
|
135
|
+
finality: "optimistic",
|
|
136
|
+
nearClient: nearProvider,
|
|
137
|
+
schema: valibot.union([valibot.null(), valibot.object({
|
|
138
|
+
decimals: valibot.number(),
|
|
139
|
+
origin_decimals: valibot.number()
|
|
140
|
+
})])
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
exports.caip2ToChainKind = caip2ToChainKind;
|
|
146
|
+
exports.chainKindToCaip2 = chainKindToCaip2;
|
|
147
|
+
exports.createWithdrawIntentsPrimitive = createWithdrawIntentsPrimitive;
|
|
148
|
+
exports.getAccountOmniStorageBalance = getAccountOmniStorageBalance;
|
|
149
|
+
exports.getBridgedToken = getBridgedToken;
|
|
150
|
+
exports.getTokenDecimals = getTokenDecimals;
|
|
151
|
+
exports.isUtxoChain = isUtxoChain;
|
|
152
|
+
exports.poaContractIdToChainKind = poaContractIdToChainKind;
|
|
153
|
+
exports.validateOmniToken = validateOmniToken;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Chains } from "../../lib/caip2.js";
|
|
2
|
+
import { MIN_GAS_AMOUNT, OMNI_BRIDGE_CONTRACT } from "./omni-bridge-constants.js";
|
|
3
|
+
import { POA_TOKENS_ROUTABLE_THROUGH_OMNI_BRIDGE } from "../../constants/poa-tokens-routable-through-omni-bridge.js";
|
|
4
|
+
import { assert, utils } from "lampamazaza-internal-utils";
|
|
5
|
+
import * as v from "valibot";
|
|
6
|
+
import { ChainKind, getChain, isBridgeToken, omniAddress } from "@omni-bridge/core";
|
|
7
|
+
import { calculateStorageAccountId } from "@omni-bridge/near";
|
|
8
|
+
|
|
9
|
+
//#region src/bridges/omni-bridge/omni-bridge-utils.ts
|
|
10
|
+
function createWithdrawIntentsPrimitive(params) {
|
|
11
|
+
const { contractId: tokenAccountId, standard } = utils.parseDefuseAssetId(params.assetId);
|
|
12
|
+
assert(standard === "nep141", "Only NEP-141 is supported");
|
|
13
|
+
const recipient = omniAddress(params.omniChainKind, params.destinationAddress);
|
|
14
|
+
let msg = "";
|
|
15
|
+
const ftWithdrawPayload = {
|
|
16
|
+
recipient,
|
|
17
|
+
fee: "0",
|
|
18
|
+
native_token_fee: params.nativeFee.toString()
|
|
19
|
+
};
|
|
20
|
+
if (isUtxoChain(params.omniChainKind)) {
|
|
21
|
+
assert(params.utxoMaxGasFee !== null && params.utxoMaxGasFee > 0n, `Invalid utxo max gas fee: expected > 0, got ${params.utxoMaxGasFee}`);
|
|
22
|
+
msg = JSON.stringify({ MaxGasFee: params.utxoMaxGasFee.toString() });
|
|
23
|
+
ftWithdrawPayload.msg = msg;
|
|
24
|
+
}
|
|
25
|
+
const intents = [];
|
|
26
|
+
if (params.nativeFee > 0n) intents.push({
|
|
27
|
+
deposit_for_account_id: calculateStorageAccountId({
|
|
28
|
+
token: `near:${tokenAccountId}`,
|
|
29
|
+
amount: params.amount,
|
|
30
|
+
recipient,
|
|
31
|
+
fee: {
|
|
32
|
+
fee: 0n,
|
|
33
|
+
native_fee: params.nativeFee
|
|
34
|
+
},
|
|
35
|
+
sender: `near:${params.intentsContract}`,
|
|
36
|
+
msg
|
|
37
|
+
}),
|
|
38
|
+
amount: params.nativeFee.toString(),
|
|
39
|
+
contract_id: OMNI_BRIDGE_CONTRACT,
|
|
40
|
+
intent: "storage_deposit"
|
|
41
|
+
});
|
|
42
|
+
intents.push({
|
|
43
|
+
intent: "ft_withdraw",
|
|
44
|
+
token: tokenAccountId,
|
|
45
|
+
receiver_id: OMNI_BRIDGE_CONTRACT,
|
|
46
|
+
amount: params.amount.toString(),
|
|
47
|
+
storage_deposit: params.storageDepositAmount > 0n ? params.storageDepositAmount.toString() : void 0,
|
|
48
|
+
msg: JSON.stringify(ftWithdrawPayload),
|
|
49
|
+
min_gas: MIN_GAS_AMOUNT
|
|
50
|
+
});
|
|
51
|
+
return intents;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Mapping between CAIP-2 chain identifiers and Omni Bridge ChainKind.
|
|
55
|
+
* This serves as a single source of truth for bidirectional chain conversions.
|
|
56
|
+
*/
|
|
57
|
+
const CHAIN_MAPPINGS = [
|
|
58
|
+
[Chains.Ethereum, ChainKind.Eth],
|
|
59
|
+
[Chains.Base, ChainKind.Base],
|
|
60
|
+
[Chains.Arbitrum, ChainKind.Arb],
|
|
61
|
+
[Chains.Solana, ChainKind.Sol],
|
|
62
|
+
[Chains.BNB, ChainKind.Bnb],
|
|
63
|
+
[Chains.Bitcoin, ChainKind.Btc]
|
|
64
|
+
];
|
|
65
|
+
function caip2ToChainKind(network) {
|
|
66
|
+
return CHAIN_MAPPINGS.find(([chain]) => chain === network)?.[1] ?? null;
|
|
67
|
+
}
|
|
68
|
+
function chainKindToCaip2(network) {
|
|
69
|
+
return CHAIN_MAPPINGS.find(([_, kind]) => kind === network)?.[0] ?? null;
|
|
70
|
+
}
|
|
71
|
+
const UTXO_CHAINS = [ChainKind.Btc];
|
|
72
|
+
function isUtxoChain(network) {
|
|
73
|
+
return UTXO_CHAINS.includes(network);
|
|
74
|
+
}
|
|
75
|
+
function poaContractIdToChainKind(contractId) {
|
|
76
|
+
return POA_TOKENS_ROUTABLE_THROUGH_OMNI_BRIDGE[contractId] ?? null;
|
|
77
|
+
}
|
|
78
|
+
function validateOmniToken(nearAddress) {
|
|
79
|
+
if (nearAddress.endsWith(".testnet")) return false;
|
|
80
|
+
return isBridgeToken(nearAddress);
|
|
81
|
+
}
|
|
82
|
+
async function getAccountOmniStorageBalance(nearProvider, accountId) {
|
|
83
|
+
return utils.queryContract({
|
|
84
|
+
contractId: OMNI_BRIDGE_CONTRACT,
|
|
85
|
+
methodName: "storage_balance_of",
|
|
86
|
+
args: { account_id: accountId },
|
|
87
|
+
finality: "optimistic",
|
|
88
|
+
nearClient: nearProvider,
|
|
89
|
+
schema: v.union([v.null(), v.object({
|
|
90
|
+
total: v.string(),
|
|
91
|
+
available: v.string()
|
|
92
|
+
})])
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
const OmniAddressSchema = v.custom((input) => typeof input === "string" && (input.startsWith("eth:") || input.startsWith("near:") || input.startsWith("sol:") || input.startsWith("arb:") || input.startsWith("base:") || input.startsWith("btc:") || input.startsWith("bnb:")), "Must comply with omni address schema");
|
|
96
|
+
/**
|
|
97
|
+
* Converts a token address from one chain to its equivalent on another chain.
|
|
98
|
+
* @param nearProvider Near provider used for querying the contract
|
|
99
|
+
* @param tokenAddress The source token address to convert
|
|
100
|
+
* @param destinationChain The target chain for the conversion
|
|
101
|
+
* @returns Promise resolving to the equivalent token address on the destination chain
|
|
102
|
+
* @throws Error if source and destination chains are the same
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* // Convert NEAR token to ETH
|
|
106
|
+
* const ethAddress = await getBridgedToken("near:token123", ChainKind.Ethereum)
|
|
107
|
+
*/
|
|
108
|
+
async function getBridgedToken(nearProvider, tokenAddress, destinationChain) {
|
|
109
|
+
return utils.queryContract({
|
|
110
|
+
contractId: OMNI_BRIDGE_CONTRACT,
|
|
111
|
+
methodName: "get_bridged_token",
|
|
112
|
+
args: {
|
|
113
|
+
chain: ChainKind[destinationChain].toString(),
|
|
114
|
+
address: tokenAddress
|
|
115
|
+
},
|
|
116
|
+
finality: "optimistic",
|
|
117
|
+
nearClient: nearProvider,
|
|
118
|
+
schema: v.union([v.null(), OmniAddressSchema])
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Gets token decimals from the NEAR contract
|
|
123
|
+
* @param nearProvider Near provider used for querying the contract
|
|
124
|
+
* @param tokenAddress The Omni token address to check
|
|
125
|
+
* @returns Promise resolving to the token's decimal information
|
|
126
|
+
*/
|
|
127
|
+
async function getTokenDecimals(nearProvider, tokenAddress) {
|
|
128
|
+
if (getChain(tokenAddress) === ChainKind.Near) throw new Error("Token decimals cannot be queried using NEAR addresses. Use the token's foreign chain representation (e.g., eth:0x...) to query decimals.");
|
|
129
|
+
return utils.queryContract({
|
|
130
|
+
contractId: OMNI_BRIDGE_CONTRACT,
|
|
131
|
+
methodName: "get_token_decimals",
|
|
132
|
+
args: { address: tokenAddress },
|
|
133
|
+
finality: "optimistic",
|
|
134
|
+
nearClient: nearProvider,
|
|
135
|
+
schema: v.union([v.null(), v.object({
|
|
136
|
+
decimals: v.number(),
|
|
137
|
+
origin_decimals: v.number()
|
|
138
|
+
})])
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
//#endregion
|
|
143
|
+
export { caip2ToChainKind, chainKindToCaip2, createWithdrawIntentsPrimitive, getAccountOmniStorageBalance, getBridgedToken, getTokenDecimals, isUtxoChain, poaContractIdToChainKind, validateOmniToken };
|