@pioneer-platform/changelly-client 8.3.12 → 8.3.15
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/lib/index.d.ts +1 -0
- package/lib/index.js +18 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare const CHANGELLY_API_SECRET: string | undefined;
|
|
|
5
5
|
declare let changelly: any;
|
|
6
6
|
declare let ChainToNetworkId: any, caipToNetworkId: any, shortListSymbolToCaip: any;
|
|
7
7
|
declare let networkSupport: any[];
|
|
8
|
+
declare let assetSupport: any[];
|
|
8
9
|
declare function get_currencies(): Promise<any>;
|
|
9
10
|
declare function create_transaction(from: string, to: string, address: string, amount: number, extraId?: string): Promise<any>;
|
|
10
11
|
declare function get_min_amount(from: string, to: string): Promise<any>;
|
package/lib/index.js
CHANGED
|
@@ -68,6 +68,21 @@ var networkSupport = [
|
|
|
68
68
|
ChainToNetworkId["MATIC"],
|
|
69
69
|
ChainToNetworkId["AVAX"],
|
|
70
70
|
];
|
|
71
|
+
var assetSupport = [
|
|
72
|
+
shortListSymbolToCaip["BTC"],
|
|
73
|
+
shortListSymbolToCaip["ETH"],
|
|
74
|
+
shortListSymbolToCaip["XRP"],
|
|
75
|
+
shortListSymbolToCaip["DASH"],
|
|
76
|
+
shortListSymbolToCaip["ZEC"],
|
|
77
|
+
shortListSymbolToCaip["BASE"],
|
|
78
|
+
shortListSymbolToCaip["LTC"],
|
|
79
|
+
shortListSymbolToCaip["BCH"],
|
|
80
|
+
shortListSymbolToCaip["MATIC"],
|
|
81
|
+
shortListSymbolToCaip["AVAX"],
|
|
82
|
+
shortListSymbolToCaip["BSV"], //TODO
|
|
83
|
+
shortListSymbolToCaip["ADA"], //TODO
|
|
84
|
+
shortListSymbolToCaip["EOS"], //TODO
|
|
85
|
+
];
|
|
71
86
|
module.exports = {
|
|
72
87
|
init: function (settings) {
|
|
73
88
|
changelly = new Changelly(CHANGELLY_API_KEY, CHANGELLY_API_SECRET);
|
|
@@ -75,6 +90,9 @@ module.exports = {
|
|
|
75
90
|
networkSupport: function () {
|
|
76
91
|
return networkSupport;
|
|
77
92
|
},
|
|
93
|
+
assetSupport: function () {
|
|
94
|
+
return assetSupport;
|
|
95
|
+
},
|
|
78
96
|
getCurrenciesAsync: function () {
|
|
79
97
|
return get_currencies();
|
|
80
98
|
},
|