@defuse-protocol/intents-sdk 0.32.0 → 0.32.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.
|
@@ -36,7 +36,8 @@ const caip2Mapping = {
|
|
|
36
36
|
[require_caip2.Chains.Tron]: "tron:mainnet",
|
|
37
37
|
[require_caip2.Chains.Sui]: "sui:mainnet",
|
|
38
38
|
[require_caip2.Chains.Aptos]: "aptos:mainnet",
|
|
39
|
-
[require_caip2.Chains.Cardano]: "cardano:mainnet"
|
|
39
|
+
[require_caip2.Chains.Cardano]: "cardano:mainnet",
|
|
40
|
+
[require_caip2.Chains.Litecoin]: "ltc:mainnet"
|
|
40
41
|
};
|
|
41
42
|
function toPoaNetwork(caip2) {
|
|
42
43
|
if (caip2Mapping[caip2] == null) throw new Error(`Unsupported POA Bridge chain = ${caip2}`);
|
|
@@ -56,7 +57,8 @@ const tokenPrefixMapping = {
|
|
|
56
57
|
tron: require_caip2.Chains.Tron,
|
|
57
58
|
sui: require_caip2.Chains.Sui,
|
|
58
59
|
aptos: require_caip2.Chains.Aptos,
|
|
59
|
-
cardano: require_caip2.Chains.Cardano
|
|
60
|
+
cardano: require_caip2.Chains.Cardano,
|
|
61
|
+
ltc: require_caip2.Chains.Litecoin
|
|
60
62
|
};
|
|
61
63
|
function contractIdToCaip2(contractId) {
|
|
62
64
|
for (const [prefix, caip2] of Object.entries(tokenPrefixMapping)) if (contractId.startsWith(`${prefix}.`) || contractId.startsWith(`${prefix}-`)) return caip2;
|
|
@@ -34,7 +34,8 @@ const caip2Mapping = {
|
|
|
34
34
|
[Chains.Tron]: "tron:mainnet",
|
|
35
35
|
[Chains.Sui]: "sui:mainnet",
|
|
36
36
|
[Chains.Aptos]: "aptos:mainnet",
|
|
37
|
-
[Chains.Cardano]: "cardano:mainnet"
|
|
37
|
+
[Chains.Cardano]: "cardano:mainnet",
|
|
38
|
+
[Chains.Litecoin]: "ltc:mainnet"
|
|
38
39
|
};
|
|
39
40
|
function toPoaNetwork(caip2) {
|
|
40
41
|
if (caip2Mapping[caip2] == null) throw new Error(`Unsupported POA Bridge chain = ${caip2}`);
|
|
@@ -54,7 +55,8 @@ const tokenPrefixMapping = {
|
|
|
54
55
|
tron: Chains.Tron,
|
|
55
56
|
sui: Chains.Sui,
|
|
56
57
|
aptos: Chains.Aptos,
|
|
57
|
-
cardano: Chains.Cardano
|
|
58
|
+
cardano: Chains.Cardano,
|
|
59
|
+
ltc: Chains.Litecoin
|
|
58
60
|
};
|
|
59
61
|
function contractIdToCaip2(contractId) {
|
|
60
62
|
for (const [prefix, caip2] of Object.entries(tokenPrefixMapping)) if (contractId.startsWith(`${prefix}.`) || contractId.startsWith(`${prefix}-`)) return caip2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defuse-protocol/intents-sdk",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"ripple-address-codec": "^5.0.0",
|
|
39
39
|
"valibot": "^1.0.0",
|
|
40
40
|
"viem": "^2.0.0",
|
|
41
|
-
"@defuse-protocol/
|
|
42
|
-
"@defuse-protocol/
|
|
41
|
+
"@defuse-protocol/contract-types": "0.3.0",
|
|
42
|
+
"@defuse-protocol/internal-utils": "0.19.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"tsdown": "0.15.5",
|