@defuse-protocol/intents-sdk 0.73.0 → 0.74.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.
|
@@ -65,7 +65,8 @@ const CHAIN_MAPPINGS = [
|
|
|
65
65
|
[require_caip2.Chains.Bitcoin, _omni_bridge_core.ChainKind.Btc],
|
|
66
66
|
[require_caip2.Chains.Abstract, _omni_bridge_core.ChainKind.Abs],
|
|
67
67
|
[require_caip2.Chains.Starknet, _omni_bridge_core.ChainKind.Strk],
|
|
68
|
-
[require_caip2.Chains.Fogo, _omni_bridge_core.ChainKind.Fogo]
|
|
68
|
+
[require_caip2.Chains.Fogo, _omni_bridge_core.ChainKind.Fogo],
|
|
69
|
+
[require_caip2.Chains.Polygon, _omni_bridge_core.ChainKind.Pol]
|
|
69
70
|
];
|
|
70
71
|
function caip2ToChainKind(network) {
|
|
71
72
|
return CHAIN_MAPPINGS.find(([chain]) => chain === network)?.[1] ?? null;
|
|
@@ -97,7 +98,7 @@ async function getAccountOmniStorageBalance(nearProvider, accountId) {
|
|
|
97
98
|
})])
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
|
-
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:") || input.startsWith("abs:") || input.startsWith("strk:") || input.startsWith("fogo:")), "Must comply with omni address schema");
|
|
101
|
+
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:") || input.startsWith("abs:") || input.startsWith("strk:") || input.startsWith("fogo:") || input.startsWith("pol:")), "Must comply with omni address schema");
|
|
101
102
|
/**
|
|
102
103
|
* Converts a token address from one chain to its equivalent on another chain.
|
|
103
104
|
* @param nearProvider Near provider used for querying the contract
|
|
@@ -63,7 +63,8 @@ const CHAIN_MAPPINGS = [
|
|
|
63
63
|
[Chains.Bitcoin, ChainKind.Btc],
|
|
64
64
|
[Chains.Abstract, ChainKind.Abs],
|
|
65
65
|
[Chains.Starknet, ChainKind.Strk],
|
|
66
|
-
[Chains.Fogo, ChainKind.Fogo]
|
|
66
|
+
[Chains.Fogo, ChainKind.Fogo],
|
|
67
|
+
[Chains.Polygon, ChainKind.Pol]
|
|
67
68
|
];
|
|
68
69
|
function caip2ToChainKind(network) {
|
|
69
70
|
return CHAIN_MAPPINGS.find(([chain]) => chain === network)?.[1] ?? null;
|
|
@@ -95,7 +96,7 @@ async function getAccountOmniStorageBalance(nearProvider, accountId) {
|
|
|
95
96
|
})])
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
|
-
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:") || input.startsWith("abs:") || input.startsWith("strk:") || input.startsWith("fogo:")), "Must comply with omni address schema");
|
|
99
|
+
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:") || input.startsWith("abs:") || input.startsWith("strk:") || input.startsWith("fogo:") || input.startsWith("pol:")), "Must comply with omni address schema");
|
|
99
100
|
/**
|
|
100
101
|
* Converts a token address from one chain to its equivalent on another chain.
|
|
101
102
|
* @param nearProvider Near provider used for querying the contract
|