@xchainjs/xchain-thorchain 3.0.6 → 3.0.7
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/const.d.ts +12 -0
- package/lib/index.esm.js +27 -1
- package/lib/index.js +30 -0
- package/lib/utils.d.ts +7 -0
- package/package.json +4 -4
package/lib/const.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ export declare const RUNE_DENOM = "rune";
|
|
|
16
16
|
* Denomination of the TCY asset
|
|
17
17
|
*/
|
|
18
18
|
export declare const TCY_DENOM = "tcy";
|
|
19
|
+
/**
|
|
20
|
+
* Denomination of the ruji asset
|
|
21
|
+
*/
|
|
22
|
+
export declare const RUJI_DENOM = "x/ruji";
|
|
19
23
|
/**
|
|
20
24
|
* Ticker symbol for the RUNE asset
|
|
21
25
|
*/
|
|
@@ -24,6 +28,10 @@ export declare const RUNE_TICKER = "RUNE";
|
|
|
24
28
|
* Ticker symbol for the TCY asset
|
|
25
29
|
*/
|
|
26
30
|
export declare const TCY_TICKER = "TCY";
|
|
31
|
+
/**
|
|
32
|
+
* Ticker symbol for the RUJI asset
|
|
33
|
+
*/
|
|
34
|
+
export declare const RUJI_TICKER = "RUJI";
|
|
27
35
|
/**
|
|
28
36
|
* Default fee used by the client to make transactions
|
|
29
37
|
*/
|
|
@@ -48,6 +56,10 @@ export declare const AssetRuneNative: Asset;
|
|
|
48
56
|
* Native asset representation for TCY in Thorchain
|
|
49
57
|
*/
|
|
50
58
|
export declare const AssetTCY: TokenAsset;
|
|
59
|
+
/**
|
|
60
|
+
* Native asset representation for TCY in Thorchain
|
|
61
|
+
*/
|
|
62
|
+
export declare const AssetRUJI: Asset;
|
|
51
63
|
/**
|
|
52
64
|
* Message type URL used to make send transactions
|
|
53
65
|
*/
|
package/lib/index.esm.js
CHANGED
|
@@ -3091,6 +3091,13 @@ const isAssetRuneNative = (asset) => assetToString(asset) === assetToString(Asse
|
|
|
3091
3091
|
* @returns {boolean} `true` or `false`
|
|
3092
3092
|
*/
|
|
3093
3093
|
const isTCYAsset = (asset) => assetToString(asset) === assetToString(AssetTCY);
|
|
3094
|
+
/**
|
|
3095
|
+
* Checks whether an asset is the native RUJI asset
|
|
3096
|
+
*
|
|
3097
|
+
* @param {CompatibleAsset} asset
|
|
3098
|
+
* @returns {boolean} `true` or `false`
|
|
3099
|
+
*/
|
|
3100
|
+
const isRUJIAsset = (asset) => assetToString(asset) === assetToString(AssetRUJI);
|
|
3094
3101
|
/**
|
|
3095
3102
|
* Get denomination from Asset
|
|
3096
3103
|
*
|
|
@@ -3106,6 +3113,8 @@ const getDenom = (asset) => {
|
|
|
3106
3113
|
return assetToString(asset).toLowerCase();
|
|
3107
3114
|
if (isTCYAsset(asset))
|
|
3108
3115
|
return TCY_DENOM;
|
|
3116
|
+
if (isRUJIAsset(asset))
|
|
3117
|
+
return RUJI_DENOM;
|
|
3109
3118
|
return assetToString(asset).toLowerCase();
|
|
3110
3119
|
};
|
|
3111
3120
|
/**
|
|
@@ -3222,6 +3231,10 @@ const RUNE_DENOM = 'rune';
|
|
|
3222
3231
|
* Denomination of the TCY asset
|
|
3223
3232
|
*/
|
|
3224
3233
|
const TCY_DENOM = 'tcy';
|
|
3234
|
+
/**
|
|
3235
|
+
* Denomination of the ruji asset
|
|
3236
|
+
*/
|
|
3237
|
+
const RUJI_DENOM = 'x/ruji';
|
|
3225
3238
|
/**
|
|
3226
3239
|
* Ticker symbol for the RUNE asset
|
|
3227
3240
|
*/
|
|
@@ -3230,6 +3243,10 @@ const RUNE_TICKER = 'RUNE';
|
|
|
3230
3243
|
* Ticker symbol for the TCY asset
|
|
3231
3244
|
*/
|
|
3232
3245
|
const TCY_TICKER = 'TCY';
|
|
3246
|
+
/**
|
|
3247
|
+
* Ticker symbol for the RUJI asset
|
|
3248
|
+
*/
|
|
3249
|
+
const RUJI_TICKER = 'RUJI';
|
|
3233
3250
|
/**
|
|
3234
3251
|
* Default fee used by the client to make transactions
|
|
3235
3252
|
*/
|
|
@@ -3264,6 +3281,15 @@ const AssetTCY = {
|
|
|
3264
3281
|
ticker: TCY_TICKER,
|
|
3265
3282
|
type: AssetType.TOKEN,
|
|
3266
3283
|
};
|
|
3284
|
+
/**
|
|
3285
|
+
* Native asset representation for TCY in Thorchain
|
|
3286
|
+
*/
|
|
3287
|
+
const AssetRUJI = {
|
|
3288
|
+
chain: THORChain,
|
|
3289
|
+
symbol: RUJI_TICKER,
|
|
3290
|
+
ticker: RUJI_TICKER,
|
|
3291
|
+
type: AssetType.NATIVE,
|
|
3292
|
+
};
|
|
3267
3293
|
/**
|
|
3268
3294
|
* Message type URL used to make send transactions
|
|
3269
3295
|
*/
|
|
@@ -3945,4 +3971,4 @@ class ClientLedger extends Client {
|
|
|
3945
3971
|
}
|
|
3946
3972
|
}
|
|
3947
3973
|
|
|
3948
|
-
export { AssetRuneNative, AssetTCY, ClientKeystore as Client, ClientKeystore, ClientLedger, DEFAULT_EXPLORER_URL, DEFAULT_FEE, DEFAULT_GAS_LIMIT_VALUE, DEPOSIT_GAS_LIMIT_VALUE, MSG_DEPOSIT_TYPE_URL, MSG_SEND_TYPE_URL, RUNE_DECIMAL, RUNE_DENOM, RUNE_TICKER, TCY_DENOM, TCY_TICKER, THORChain, defaultClientConfig, getChainId, getDefaultClientUrls, getDefaultExplorers, getDefaultRootDerivationPaths, getDenom, getExplorerAddressUrl, getExplorerTxUrl, getPrefix, isAssetRuneNative, isTCYAsset, parseAssetToTHORNodeAsset, parseDerivationPath, sortAndStringifyJson, sortedObject };
|
|
3974
|
+
export { AssetRUJI, AssetRuneNative, AssetTCY, ClientKeystore as Client, ClientKeystore, ClientLedger, DEFAULT_EXPLORER_URL, DEFAULT_FEE, DEFAULT_GAS_LIMIT_VALUE, DEPOSIT_GAS_LIMIT_VALUE, MSG_DEPOSIT_TYPE_URL, MSG_SEND_TYPE_URL, RUJI_DENOM, RUJI_TICKER, RUNE_DECIMAL, RUNE_DENOM, RUNE_TICKER, TCY_DENOM, TCY_TICKER, THORChain, defaultClientConfig, getChainId, getDefaultClientUrls, getDefaultExplorers, getDefaultRootDerivationPaths, getDenom, getExplorerAddressUrl, getExplorerTxUrl, getPrefix, isAssetRuneNative, isRUJIAsset, isTCYAsset, parseAssetToTHORNodeAsset, parseDerivationPath, sortAndStringifyJson, sortedObject };
|
package/lib/index.js
CHANGED
|
@@ -3118,6 +3118,13 @@ const isAssetRuneNative = (asset) => xchainUtil.assetToString(asset) === xchainU
|
|
|
3118
3118
|
* @returns {boolean} `true` or `false`
|
|
3119
3119
|
*/
|
|
3120
3120
|
const isTCYAsset = (asset) => xchainUtil.assetToString(asset) === xchainUtil.assetToString(AssetTCY);
|
|
3121
|
+
/**
|
|
3122
|
+
* Checks whether an asset is the native RUJI asset
|
|
3123
|
+
*
|
|
3124
|
+
* @param {CompatibleAsset} asset
|
|
3125
|
+
* @returns {boolean} `true` or `false`
|
|
3126
|
+
*/
|
|
3127
|
+
const isRUJIAsset = (asset) => xchainUtil.assetToString(asset) === xchainUtil.assetToString(AssetRUJI);
|
|
3121
3128
|
/**
|
|
3122
3129
|
* Get denomination from Asset
|
|
3123
3130
|
*
|
|
@@ -3133,6 +3140,8 @@ const getDenom = (asset) => {
|
|
|
3133
3140
|
return xchainUtil.assetToString(asset).toLowerCase();
|
|
3134
3141
|
if (isTCYAsset(asset))
|
|
3135
3142
|
return TCY_DENOM;
|
|
3143
|
+
if (isRUJIAsset(asset))
|
|
3144
|
+
return RUJI_DENOM;
|
|
3136
3145
|
return xchainUtil.assetToString(asset).toLowerCase();
|
|
3137
3146
|
};
|
|
3138
3147
|
/**
|
|
@@ -3249,6 +3258,10 @@ const RUNE_DENOM = 'rune';
|
|
|
3249
3258
|
* Denomination of the TCY asset
|
|
3250
3259
|
*/
|
|
3251
3260
|
const TCY_DENOM = 'tcy';
|
|
3261
|
+
/**
|
|
3262
|
+
* Denomination of the ruji asset
|
|
3263
|
+
*/
|
|
3264
|
+
const RUJI_DENOM = 'x/ruji';
|
|
3252
3265
|
/**
|
|
3253
3266
|
* Ticker symbol for the RUNE asset
|
|
3254
3267
|
*/
|
|
@@ -3257,6 +3270,10 @@ const RUNE_TICKER = 'RUNE';
|
|
|
3257
3270
|
* Ticker symbol for the TCY asset
|
|
3258
3271
|
*/
|
|
3259
3272
|
const TCY_TICKER = 'TCY';
|
|
3273
|
+
/**
|
|
3274
|
+
* Ticker symbol for the RUJI asset
|
|
3275
|
+
*/
|
|
3276
|
+
const RUJI_TICKER = 'RUJI';
|
|
3260
3277
|
/**
|
|
3261
3278
|
* Default fee used by the client to make transactions
|
|
3262
3279
|
*/
|
|
@@ -3291,6 +3308,15 @@ const AssetTCY = {
|
|
|
3291
3308
|
ticker: TCY_TICKER,
|
|
3292
3309
|
type: xchainUtil.AssetType.TOKEN,
|
|
3293
3310
|
};
|
|
3311
|
+
/**
|
|
3312
|
+
* Native asset representation for TCY in Thorchain
|
|
3313
|
+
*/
|
|
3314
|
+
const AssetRUJI = {
|
|
3315
|
+
chain: THORChain,
|
|
3316
|
+
symbol: RUJI_TICKER,
|
|
3317
|
+
ticker: RUJI_TICKER,
|
|
3318
|
+
type: xchainUtil.AssetType.NATIVE,
|
|
3319
|
+
};
|
|
3294
3320
|
/**
|
|
3295
3321
|
* Message type URL used to make send transactions
|
|
3296
3322
|
*/
|
|
@@ -3972,6 +3998,7 @@ class ClientLedger extends Client {
|
|
|
3972
3998
|
}
|
|
3973
3999
|
}
|
|
3974
4000
|
|
|
4001
|
+
exports.AssetRUJI = AssetRUJI;
|
|
3975
4002
|
exports.AssetRuneNative = AssetRuneNative;
|
|
3976
4003
|
exports.AssetTCY = AssetTCY;
|
|
3977
4004
|
exports.Client = ClientKeystore;
|
|
@@ -3983,6 +4010,8 @@ exports.DEFAULT_GAS_LIMIT_VALUE = DEFAULT_GAS_LIMIT_VALUE;
|
|
|
3983
4010
|
exports.DEPOSIT_GAS_LIMIT_VALUE = DEPOSIT_GAS_LIMIT_VALUE;
|
|
3984
4011
|
exports.MSG_DEPOSIT_TYPE_URL = MSG_DEPOSIT_TYPE_URL;
|
|
3985
4012
|
exports.MSG_SEND_TYPE_URL = MSG_SEND_TYPE_URL;
|
|
4013
|
+
exports.RUJI_DENOM = RUJI_DENOM;
|
|
4014
|
+
exports.RUJI_TICKER = RUJI_TICKER;
|
|
3986
4015
|
exports.RUNE_DECIMAL = RUNE_DECIMAL;
|
|
3987
4016
|
exports.RUNE_DENOM = RUNE_DENOM;
|
|
3988
4017
|
exports.RUNE_TICKER = RUNE_TICKER;
|
|
@@ -3999,6 +4028,7 @@ exports.getExplorerAddressUrl = getExplorerAddressUrl;
|
|
|
3999
4028
|
exports.getExplorerTxUrl = getExplorerTxUrl;
|
|
4000
4029
|
exports.getPrefix = getPrefix;
|
|
4001
4030
|
exports.isAssetRuneNative = isAssetRuneNative;
|
|
4031
|
+
exports.isRUJIAsset = isRUJIAsset;
|
|
4002
4032
|
exports.isTCYAsset = isTCYAsset;
|
|
4003
4033
|
exports.parseAssetToTHORNodeAsset = parseAssetToTHORNodeAsset;
|
|
4004
4034
|
exports.parseDerivationPath = parseDerivationPath;
|
package/lib/utils.d.ts
CHANGED
|
@@ -35,6 +35,13 @@ export declare const isAssetRuneNative: (asset: CompatibleAsset) => boolean;
|
|
|
35
35
|
* @returns {boolean} `true` or `false`
|
|
36
36
|
*/
|
|
37
37
|
export declare const isTCYAsset: (asset: CompatibleAsset) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Checks whether an asset is the native RUJI asset
|
|
40
|
+
*
|
|
41
|
+
* @param {CompatibleAsset} asset
|
|
42
|
+
* @returns {boolean} `true` or `false`
|
|
43
|
+
*/
|
|
44
|
+
export declare const isRUJIAsset: (asset: CompatibleAsset) => boolean;
|
|
38
45
|
/**
|
|
39
46
|
* Get denomination from Asset
|
|
40
47
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "Custom Thorchain client and utilities used by XChainJS clients",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"THORChain",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@ledgerhq/hw-transport": "^6.31.6",
|
|
45
45
|
"@scure/bip32": "^1.7.0",
|
|
46
46
|
"@xchainjs/ledger-thorchain": "0.3.0",
|
|
47
|
-
"@xchainjs/xchain-client": "2.0.
|
|
48
|
-
"@xchainjs/xchain-cosmos-sdk": "2.0.
|
|
47
|
+
"@xchainjs/xchain-client": "2.0.3",
|
|
48
|
+
"@xchainjs/xchain-cosmos-sdk": "2.0.3",
|
|
49
49
|
"@xchainjs/xchain-crypto": "1.0.1",
|
|
50
|
-
"@xchainjs/xchain-util": "2.0.
|
|
50
|
+
"@xchainjs/xchain-util": "2.0.2",
|
|
51
51
|
"axios": "1.8.4",
|
|
52
52
|
"bech32": "^1.1.3",
|
|
53
53
|
"bignumber.js": "^9.0.0",
|