@xchainjs/xchain-thorchain 0.27.1 → 0.27.4
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/client.d.ts +1 -1
- package/lib/index.esm.js +7 -3
- package/lib/index.js +7 -3
- package/package.json +5 -5
package/lib/client.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare class Client extends BaseXChainClient implements ThorchainClient, XChain
|
|
|
33
33
|
*
|
|
34
34
|
* @throws {"Invalid phrase"} Thrown if the given phase is invalid.
|
|
35
35
|
*/
|
|
36
|
-
constructor({ network, phrase, clientUrl, explorerUrls, rootDerivationPaths, chainIds, }: XChainClientParams & ThorchainClientParams);
|
|
36
|
+
constructor({ network, phrase, clientUrl, explorerUrls, rootDerivationPaths, chainIds, customRequestHeaders, }: XChainClientParams & ThorchainClientParams);
|
|
37
37
|
/**
|
|
38
38
|
* Set/update the current network.
|
|
39
39
|
*
|
package/lib/index.esm.js
CHANGED
|
@@ -9969,10 +9969,10 @@ class Client extends BaseXChainClient {
|
|
|
9969
9969
|
[Network.Testnet]: "44'/931'/0'/0/",
|
|
9970
9970
|
}, chainIds = {
|
|
9971
9971
|
[Network.Mainnet]: 'thorchain-mainnet-v1',
|
|
9972
|
-
[Network.Stagenet]: '
|
|
9972
|
+
[Network.Stagenet]: 'thorchain-stagenet-v2',
|
|
9973
9973
|
[Network.Testnet]: 'deprecated',
|
|
9974
|
-
}, }) {
|
|
9975
|
-
super(Chain.Cosmos, { network, rootDerivationPaths, phrase });
|
|
9974
|
+
}, customRequestHeaders = {}, }) {
|
|
9975
|
+
super(Chain.Cosmos, { network, rootDerivationPaths, phrase, customRequestHeaders });
|
|
9976
9976
|
/**
|
|
9977
9977
|
* Get transaction history of a given address with pagination options.
|
|
9978
9978
|
* By default it will return the transaction history of the current wallet.
|
|
@@ -10029,10 +10029,14 @@ class Client extends BaseXChainClient {
|
|
|
10029
10029
|
this.chainIds = chainIds;
|
|
10030
10030
|
registerSendCodecs();
|
|
10031
10031
|
registerDepositCodecs();
|
|
10032
|
+
if (this.clientUrl[Network.Mainnet].node.includes('ninerealms.com') && !this.customRequestHeaders['x-client-id']) {
|
|
10033
|
+
this.customRequestHeaders['x-client-id'] = 'xchainjs-client';
|
|
10034
|
+
}
|
|
10032
10035
|
this.cosmosClient = new CosmosSDKClient({
|
|
10033
10036
|
server: this.getClientUrl().node,
|
|
10034
10037
|
chainId: this.getChainId(network),
|
|
10035
10038
|
prefix: getPrefix(network),
|
|
10039
|
+
headers: this.customRequestHeaders,
|
|
10036
10040
|
});
|
|
10037
10041
|
}
|
|
10038
10042
|
/**
|
package/lib/index.js
CHANGED
|
@@ -9977,10 +9977,10 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
9977
9977
|
[xchainClient.Network.Testnet]: "44'/931'/0'/0/",
|
|
9978
9978
|
}, chainIds = {
|
|
9979
9979
|
[xchainClient.Network.Mainnet]: 'thorchain-mainnet-v1',
|
|
9980
|
-
[xchainClient.Network.Stagenet]: '
|
|
9980
|
+
[xchainClient.Network.Stagenet]: 'thorchain-stagenet-v2',
|
|
9981
9981
|
[xchainClient.Network.Testnet]: 'deprecated',
|
|
9982
|
-
}, }) {
|
|
9983
|
-
super(xchainUtil.Chain.Cosmos, { network, rootDerivationPaths, phrase });
|
|
9982
|
+
}, customRequestHeaders = {}, }) {
|
|
9983
|
+
super(xchainUtil.Chain.Cosmos, { network, rootDerivationPaths, phrase, customRequestHeaders });
|
|
9984
9984
|
/**
|
|
9985
9985
|
* Get transaction history of a given address with pagination options.
|
|
9986
9986
|
* By default it will return the transaction history of the current wallet.
|
|
@@ -10037,10 +10037,14 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
10037
10037
|
this.chainIds = chainIds;
|
|
10038
10038
|
registerSendCodecs();
|
|
10039
10039
|
registerDepositCodecs();
|
|
10040
|
+
if (this.clientUrl[xchainClient.Network.Mainnet].node.includes('ninerealms.com') && !this.customRequestHeaders['x-client-id']) {
|
|
10041
|
+
this.customRequestHeaders['x-client-id'] = 'xchainjs-client';
|
|
10042
|
+
}
|
|
10040
10043
|
this.cosmosClient = new xchainCosmos.CosmosSDKClient({
|
|
10041
10044
|
server: this.getClientUrl().node,
|
|
10042
10045
|
chainId: this.getChainId(network),
|
|
10043
10046
|
prefix: getPrefix(network),
|
|
10047
|
+
headers: this.customRequestHeaders,
|
|
10044
10048
|
});
|
|
10045
10049
|
}
|
|
10046
10050
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.4",
|
|
4
4
|
"description": "Custom Thorchain client and utilities used by XChainJS clients",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"THORChain",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@cosmos-client/core": "0.45.13",
|
|
38
38
|
"@types/big.js": "^6.0.0",
|
|
39
|
-
"@xchainjs/xchain-client": "^0.13.
|
|
40
|
-
"@xchainjs/xchain-cosmos": "^0.20.
|
|
39
|
+
"@xchainjs/xchain-client": "^0.13.3",
|
|
40
|
+
"@xchainjs/xchain-cosmos": "^0.20.4",
|
|
41
41
|
"@xchainjs/xchain-crypto": "^0.2.6",
|
|
42
42
|
"@xchainjs/xchain-util": "^0.11.0",
|
|
43
43
|
"axios": "^0.25.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@cosmos-client/core": "0.45.13",
|
|
52
|
-
"@xchainjs/xchain-client": "^0.13.
|
|
53
|
-
"@xchainjs/xchain-cosmos": "^0.
|
|
52
|
+
"@xchainjs/xchain-client": "^0.13.3",
|
|
53
|
+
"@xchainjs/xchain-cosmos": "^0.20.4",
|
|
54
54
|
"@xchainjs/xchain-crypto": "^0.2.6",
|
|
55
55
|
"@xchainjs/xchain-util": "^0.11.0",
|
|
56
56
|
"axios": "^0.25.0",
|