@xchainjs/xchain-thorchain 0.24.0 → 0.24.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.
- package/CHANGELOG.md +6 -0
- package/README.md +10 -33
- package/lib/index.esm.js +1 -1
- package/lib/index.js +1 -1
- package/lib/util.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -11,17 +11,20 @@ yarn add @xchainjs/xchain-thorchain
|
|
|
11
11
|
Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-thorchain`.
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util @xchainjs/xchain-cosmos axios cosmos-client bech32-buffer
|
|
14
|
+
yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util @xchainjs/xchain-cosmos axios @cosmos-client/core bech32-buffer
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Important note: Make sure to install same version of `@cosmos-client/core` as `xchain-thorchain` is using (currently `@cosmos-client/core@0.45.1` ). In other case things might break.
|
|
18
18
|
|
|
19
|
-
## Thorchain Client Testing
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
## Documentation
|
|
21
|
+
|
|
22
|
+
### [`xchain thorchain`](http://docs.xchainjs.org/xchain-client/xchain-thorchain/)
|
|
23
|
+
[`How xchain-thorchain works`](http://docs.xchainjs.org/xchain-client/xchain-thorchain/how-it-works.html)\
|
|
24
|
+
[`How to use xchain-thorchain`](http://docs.xchainjs.org/xchain-client/xchain-thorchain/how-to-use.html)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
For more examples check out tests in `./__tests__/client.test.ts`
|
|
25
28
|
|
|
26
29
|
## Service Providers
|
|
27
30
|
|
|
@@ -37,33 +40,7 @@ This package uses the following service providers:
|
|
|
37
40
|
|
|
38
41
|
Rate limits: No
|
|
39
42
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
```ts
|
|
43
|
-
// import `xchain-thorchain`
|
|
44
|
-
import { Client } from '@xchainjs/xchain-thorchain'
|
|
45
|
-
|
|
46
|
-
// Create a `Client`
|
|
47
|
-
const client = new Client({ network: Network.Testnet, phrase: 'my secret phrase' })
|
|
48
|
-
|
|
49
|
-
// get address
|
|
50
|
-
const address = client.getAddress()
|
|
51
|
-
console.log('address:', client.getAddress()) // address: tthor13gym97tmw3axj3hpewdggy2cr288d3qffr8skg
|
|
52
|
-
|
|
53
|
-
// get balances
|
|
54
|
-
const balances = await client.getBalance(address)
|
|
55
|
-
console.log('balances:', balances[0].amount.amount().toString()) // balance: 6968080395099
|
|
56
|
-
|
|
57
|
-
// get transactions
|
|
58
|
-
const txs = await client.getTransactions({ address })
|
|
59
|
-
console.log('txs total:', txs.total) // txs total: 100
|
|
60
|
-
|
|
61
|
-
// get transaction details
|
|
62
|
-
const tx = await client.getTransactionData('any-tx-hash', address)
|
|
63
|
-
console.log('tx asset:', tx.asset) // tx asset: { chain: 'THOR', symbol: 'RUNE', ticker: 'RUNE' }
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
For more examples check out tests in `./__tests__/client.test.ts`
|
|
43
|
+
## Extras
|
|
67
44
|
|
|
68
45
|
## Creating protobuffer typescript bindings
|
|
69
46
|
|
package/lib/index.esm.js
CHANGED
|
@@ -5376,7 +5376,7 @@ $root.cosmos = (function() {
|
|
|
5376
5376
|
var MsgCompiled = $root;
|
|
5377
5377
|
|
|
5378
5378
|
const DECIMAL = 8;
|
|
5379
|
-
const DEFAULT_GAS_VALUE = '
|
|
5379
|
+
const DEFAULT_GAS_VALUE = '4000000';
|
|
5380
5380
|
const DEPOSIT_GAS_VALUE = '500000000';
|
|
5381
5381
|
const MAX_TX_COUNT = 100;
|
|
5382
5382
|
/**
|
package/lib/index.js
CHANGED
|
@@ -5384,7 +5384,7 @@ $root.cosmos = (function() {
|
|
|
5384
5384
|
var MsgCompiled = $root;
|
|
5385
5385
|
|
|
5386
5386
|
const DECIMAL = 8;
|
|
5387
|
-
const DEFAULT_GAS_VALUE = '
|
|
5387
|
+
const DEFAULT_GAS_VALUE = '4000000';
|
|
5388
5388
|
const DEPOSIT_GAS_VALUE = '500000000';
|
|
5389
5389
|
const MAX_TX_COUNT = 100;
|
|
5390
5390
|
/**
|
package/lib/util.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Asset, BaseAmount } from '@xchainjs/xchain-util';
|
|
|
5
5
|
import { ChainId, ChainIds, ClientUrl, ExplorerUrls, TxData } from './types';
|
|
6
6
|
import { MsgNativeTx } from './types/messages';
|
|
7
7
|
export declare const DECIMAL = 8;
|
|
8
|
-
export declare const DEFAULT_GAS_VALUE = "
|
|
8
|
+
export declare const DEFAULT_GAS_VALUE = "4000000";
|
|
9
9
|
export declare const DEPOSIT_GAS_VALUE = "500000000";
|
|
10
10
|
export declare const MAX_TX_COUNT = 100;
|
|
11
11
|
/**
|