@pioneer-platform/pioneer-sdk 4.21.9 → 4.21.11
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/index.cjs +6 -5
- package/dist/index.es.js +6 -5
- package/dist/index.js +6 -5
- package/package.json +1 -1
- package/src/TransactionManager.ts +8 -5
package/dist/index.cjs
CHANGED
|
@@ -2752,15 +2752,16 @@ class TransactionManager {
|
|
|
2752
2752
|
this.events = events;
|
|
2753
2753
|
}
|
|
2754
2754
|
async classifyCaip(caip) {
|
|
2755
|
-
|
|
2755
|
+
const caipString = typeof caip === "string" ? caip : String(caip);
|
|
2756
|
+
if (SUPPORTED_CAIPS.UTXO.includes(caipString))
|
|
2756
2757
|
return "UTXO";
|
|
2757
|
-
if (SUPPORTED_CAIPS.TENDERMINT.includes(
|
|
2758
|
+
if (SUPPORTED_CAIPS.TENDERMINT.includes(caipString))
|
|
2758
2759
|
return "TENDERMINT";
|
|
2759
|
-
if (
|
|
2760
|
+
if (caipString.startsWith("eip155"))
|
|
2760
2761
|
return "EIP155";
|
|
2761
|
-
if (SUPPORTED_CAIPS.OTHER.includes(
|
|
2762
|
+
if (SUPPORTED_CAIPS.OTHER.includes(caipString))
|
|
2762
2763
|
return "OTHER";
|
|
2763
|
-
throw new Error(`Unsupported CAIP: ${
|
|
2764
|
+
throw new Error(`Unsupported CAIP: ${caipString}`);
|
|
2764
2765
|
}
|
|
2765
2766
|
async transfer({ caip, to, amount, memo, isMax = false, feeLevel = 5, changeScriptType }) {
|
|
2766
2767
|
let tag6 = TAG5 + " | transfer | ";
|
package/dist/index.es.js
CHANGED
|
@@ -2928,15 +2928,16 @@ class TransactionManager {
|
|
|
2928
2928
|
this.events = events;
|
|
2929
2929
|
}
|
|
2930
2930
|
async classifyCaip(caip) {
|
|
2931
|
-
|
|
2931
|
+
const caipString = typeof caip === "string" ? caip : String(caip);
|
|
2932
|
+
if (SUPPORTED_CAIPS.UTXO.includes(caipString))
|
|
2932
2933
|
return "UTXO";
|
|
2933
|
-
if (SUPPORTED_CAIPS.TENDERMINT.includes(
|
|
2934
|
+
if (SUPPORTED_CAIPS.TENDERMINT.includes(caipString))
|
|
2934
2935
|
return "TENDERMINT";
|
|
2935
|
-
if (
|
|
2936
|
+
if (caipString.startsWith("eip155"))
|
|
2936
2937
|
return "EIP155";
|
|
2937
|
-
if (SUPPORTED_CAIPS.OTHER.includes(
|
|
2938
|
+
if (SUPPORTED_CAIPS.OTHER.includes(caipString))
|
|
2938
2939
|
return "OTHER";
|
|
2939
|
-
throw new Error(`Unsupported CAIP: ${
|
|
2940
|
+
throw new Error(`Unsupported CAIP: ${caipString}`);
|
|
2940
2941
|
}
|
|
2941
2942
|
async transfer({ caip, to, amount, memo, isMax = false, feeLevel = 5, changeScriptType }) {
|
|
2942
2943
|
let tag6 = TAG5 + " | transfer | ";
|
package/dist/index.js
CHANGED
|
@@ -2928,15 +2928,16 @@ class TransactionManager {
|
|
|
2928
2928
|
this.events = events;
|
|
2929
2929
|
}
|
|
2930
2930
|
async classifyCaip(caip) {
|
|
2931
|
-
|
|
2931
|
+
const caipString = typeof caip === "string" ? caip : String(caip);
|
|
2932
|
+
if (SUPPORTED_CAIPS.UTXO.includes(caipString))
|
|
2932
2933
|
return "UTXO";
|
|
2933
|
-
if (SUPPORTED_CAIPS.TENDERMINT.includes(
|
|
2934
|
+
if (SUPPORTED_CAIPS.TENDERMINT.includes(caipString))
|
|
2934
2935
|
return "TENDERMINT";
|
|
2935
|
-
if (
|
|
2936
|
+
if (caipString.startsWith("eip155"))
|
|
2936
2937
|
return "EIP155";
|
|
2937
|
-
if (SUPPORTED_CAIPS.OTHER.includes(
|
|
2938
|
+
if (SUPPORTED_CAIPS.OTHER.includes(caipString))
|
|
2938
2939
|
return "OTHER";
|
|
2939
|
-
throw new Error(`Unsupported CAIP: ${
|
|
2940
|
+
throw new Error(`Unsupported CAIP: ${caipString}`);
|
|
2940
2941
|
}
|
|
2941
2942
|
async transfer({ caip, to, amount, memo, isMax = false, feeLevel = 5, changeScriptType }) {
|
|
2942
2943
|
let tag6 = TAG5 + " | transfer | ";
|
package/package.json
CHANGED
|
@@ -46,11 +46,14 @@ export class TransactionManager {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
async classifyCaip(caip: string): Promise<string> {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (SUPPORTED_CAIPS.
|
|
53
|
-
|
|
49
|
+
// Ensure caip is a string (handle case where it might be an object)
|
|
50
|
+
const caipString = typeof caip === 'string' ? caip : String(caip);
|
|
51
|
+
|
|
52
|
+
if (SUPPORTED_CAIPS.UTXO.includes(caipString)) return 'UTXO';
|
|
53
|
+
if (SUPPORTED_CAIPS.TENDERMINT.includes(caipString)) return 'TENDERMINT';
|
|
54
|
+
if (caipString.startsWith('eip155')) return 'EIP155';
|
|
55
|
+
if (SUPPORTED_CAIPS.OTHER.includes(caipString)) return 'OTHER';
|
|
56
|
+
throw new Error(`Unsupported CAIP: ${caipString}`);
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
async transfer({ caip, to, amount, memo, isMax = false, feeLevel = 5, changeScriptType }: any): Promise<any> {
|