@defuse-protocol/intents-sdk 0.66.1 → 0.67.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.
@@ -64,7 +64,8 @@ const CHAIN_MAPPINGS = [
64
64
  [require_caip2.Chains.BNB, _omni_bridge_core.ChainKind.Bnb],
65
65
  [require_caip2.Chains.Bitcoin, _omni_bridge_core.ChainKind.Btc],
66
66
  [require_caip2.Chains.Abstract, _omni_bridge_core.ChainKind.Abs],
67
- [require_caip2.Chains.Starknet, _omni_bridge_core.ChainKind.Strk]
67
+ [require_caip2.Chains.Starknet, _omni_bridge_core.ChainKind.Strk],
68
+ [require_caip2.Chains.Fogo, _omni_bridge_core.ChainKind.Fogo]
68
69
  ];
69
70
  function caip2ToChainKind(network) {
70
71
  return CHAIN_MAPPINGS.find(([chain]) => chain === network)?.[1] ?? null;
@@ -96,7 +97,7 @@ async function getAccountOmniStorageBalance(nearProvider, accountId) {
96
97
  })])
97
98
  });
98
99
  }
99
- 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:")), "Must comply with omni address schema");
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");
100
101
  /**
101
102
  * Converts a token address from one chain to its equivalent on another chain.
102
103
  * @param nearProvider Near provider used for querying the contract
@@ -62,7 +62,8 @@ const CHAIN_MAPPINGS = [
62
62
  [Chains.BNB, ChainKind.Bnb],
63
63
  [Chains.Bitcoin, ChainKind.Btc],
64
64
  [Chains.Abstract, ChainKind.Abs],
65
- [Chains.Starknet, ChainKind.Strk]
65
+ [Chains.Starknet, ChainKind.Strk],
66
+ [Chains.Fogo, ChainKind.Fogo]
66
67
  ];
67
68
  function caip2ToChainKind(network) {
68
69
  return CHAIN_MAPPINGS.find(([chain]) => chain === network)?.[1] ?? null;
@@ -94,7 +95,7 @@ async function getAccountOmniStorageBalance(nearProvider, accountId) {
94
95
  })])
95
96
  });
96
97
  }
97
- 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:")), "Must comply with omni address schema");
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");
98
99
  /**
99
100
  * Converts a token address from one chain to its equivalent on another chain.
100
101
  * @param nearProvider Near provider used for querying the contract
@@ -265,7 +265,7 @@ var OmniBridge = class {
265
265
  const destinationChain = (0, _omni_bridge_core.getChain)(transfer.transfer_message.recipient);
266
266
  let txHash = null;
267
267
  if ((0, _omni_bridge_core.isEvmChain)(destinationChain)) txHash = transfer.finalised?.EVMLog?.transaction_hash;
268
- else if (destinationChain === _omni_bridge_core.ChainKind.Sol) txHash = transfer.finalised?.Solana?.signature;
268
+ else if (destinationChain === _omni_bridge_core.ChainKind.Sol || destinationChain === _omni_bridge_core.ChainKind.Fogo) txHash = transfer.finalised?.Solana?.signature;
269
269
  else if (destinationChain === _omni_bridge_core.ChainKind.Btc) txHash = typeof window !== "undefined" ? transfer.utxo_transfer?.btc_pending_id : transfer.finalised?.UtxoLog?.transaction_hash;
270
270
  else if (destinationChain === _omni_bridge_core.ChainKind.Strk) txHash = transfer.finalised?.Starknet?.transaction_hash;
271
271
  else return {
@@ -263,7 +263,7 @@ var OmniBridge = class {
263
263
  const destinationChain = getChain(transfer.transfer_message.recipient);
264
264
  let txHash = null;
265
265
  if (isEvmChain(destinationChain)) txHash = transfer.finalised?.EVMLog?.transaction_hash;
266
- else if (destinationChain === ChainKind.Sol) txHash = transfer.finalised?.Solana?.signature;
266
+ else if (destinationChain === ChainKind.Sol || destinationChain === ChainKind.Fogo) txHash = transfer.finalised?.Solana?.signature;
267
267
  else if (destinationChain === ChainKind.Btc) txHash = typeof window !== "undefined" ? transfer.utxo_transfer?.btc_pending_id : transfer.finalised?.UtxoLog?.transaction_hash;
268
268
  else if (destinationChain === ChainKind.Strk) txHash = transfer.finalised?.Starknet?.transaction_hash;
269
269
  else return {
@@ -30,7 +30,6 @@ const caip2Mapping = {
30
30
  [require_caip2.Chains.Bitcoin]: "btc:mainnet",
31
31
  [require_caip2.Chains.BitcoinCash]: "bch:mainnet",
32
32
  [require_caip2.Chains.Solana]: "sol:mainnet",
33
- [require_caip2.Chains.Fogo]: "fogo:mainnet",
34
33
  [require_caip2.Chains.Dogecoin]: "doge:mainnet",
35
34
  [require_caip2.Chains.XRPL]: "xrp:mainnet",
36
35
  [require_caip2.Chains.Zcash]: "zec:mainnet",
@@ -57,7 +56,6 @@ const tokenPrefixMapping = {
57
56
  btc: require_caip2.Chains.Bitcoin,
58
57
  bch: require_caip2.Chains.BitcoinCash,
59
58
  sol: require_caip2.Chains.Solana,
60
- fogo: require_caip2.Chains.Fogo,
61
59
  doge: require_caip2.Chains.Dogecoin,
62
60
  xrp: require_caip2.Chains.XRPL,
63
61
  zec: require_caip2.Chains.Zcash,
@@ -29,7 +29,6 @@ const caip2Mapping = {
29
29
  [Chains.Bitcoin]: "btc:mainnet",
30
30
  [Chains.BitcoinCash]: "bch:mainnet",
31
31
  [Chains.Solana]: "sol:mainnet",
32
- [Chains.Fogo]: "fogo:mainnet",
33
32
  [Chains.Dogecoin]: "doge:mainnet",
34
33
  [Chains.XRPL]: "xrp:mainnet",
35
34
  [Chains.Zcash]: "zec:mainnet",
@@ -56,7 +55,6 @@ const tokenPrefixMapping = {
56
55
  btc: Chains.Bitcoin,
57
56
  bch: Chains.BitcoinCash,
58
57
  sol: Chains.Solana,
59
- fogo: Chains.Fogo,
60
58
  doge: Chains.Dogecoin,
61
59
  xrp: Chains.XRPL,
62
60
  zec: Chains.Zcash,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defuse-protocol/intents-sdk",
3
- "version": "0.66.1",
3
+ "version": "0.67.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {
@@ -38,8 +38,8 @@
38
38
  "@hot-labs/omni-sdk": "2.25.5",
39
39
  "@isaacs/ttlcache": "^1.0.0",
40
40
  "@lifeomic/attempt": "^3.0.0",
41
- "@omni-bridge/core": "0.8.0",
42
- "@omni-bridge/near": "0.8.0",
41
+ "@omni-bridge/core": "0.9.0",
42
+ "@omni-bridge/near": "0.9.0",
43
43
  "@noble/hashes": "^1.7.1",
44
44
  "@scure/base": "^1.0.0",
45
45
  "@solana/web3.js": "^1.0.0",
@@ -50,7 +50,7 @@
50
50
  "valibot": "^1.0.0",
51
51
  "viem": "^2.0.0",
52
52
  "@defuse-protocol/contract-types": "0.6.4",
53
- "@defuse-protocol/internal-utils": "0.33.0"
53
+ "@defuse-protocol/internal-utils": "0.34.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@ton/core": "^0.60.0",