@xchainjs/xchain-thorchain 0.27.11 → 0.28.0

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.
@@ -1,92 +1,92 @@
1
- import { Network, Tx, TxParams } from '@xchainjs/xchain-client';
2
- import { Asset, BaseAmount } from '@xchainjs/xchain-util';
3
- import BigNumber from 'bignumber.js';
4
- import Long from 'long';
5
- export declare type NodeUrl = {
6
- node: string;
7
- rpc: string;
8
- };
9
- export declare type ClientUrl = Record<Network, NodeUrl>;
10
- export declare type ExplorerUrls = {
11
- root: ExplorerUrl;
12
- tx: ExplorerUrl;
13
- address: ExplorerUrl;
14
- };
15
- export declare type ExplorerUrl = Record<Network, string>;
16
- export declare type ChainId = string;
17
- export declare type ChainIds = Record<Network, ChainId>;
18
- export declare type ThorchainClientParams = {
19
- clientUrl?: ClientUrl;
20
- explorerUrls?: ExplorerUrls;
21
- chainIds?: ChainIds;
22
- };
23
- export declare type DepositParam = {
24
- walletIndex?: number;
25
- asset?: Asset;
26
- amount: BaseAmount;
27
- memo: string;
28
- gasLimit?: BigNumber;
29
- sequence?: number;
30
- };
31
- export declare type TxData = Pick<Tx, 'from' | 'to' | 'type'>;
32
- export declare type TxOfflineParams = TxParams & {
33
- /**
34
- * Balance of Rune to send from
35
- */
36
- fromRuneBalance: BaseAmount;
37
- /**
38
- * Balance of asset to send from
39
- * Optional: It can be ignored if asset to send from is RUNE
40
- */
41
- fromAssetBalance?: BaseAmount;
42
- fromAccountNumber: Long;
43
- fromSequence: Long;
44
- gasLimit?: BigNumber;
45
- };
46
- /**
47
- * Response from `thorchain/constants` endpoint
48
- */
49
- export declare type ThorchainConstantsResponse = {
50
- int_64_values: {
51
- NativeTransactionFee: number;
52
- };
53
- };
54
- /**
55
- * Response of `/cosmos/base/tendermint/v1beta1/node_info`
56
- * Note: We are interested in `network` (aka chain id) only
57
- */
58
- export declare type NodeInfoResponse = {
59
- default_node_info: {
60
- network: string;
61
- };
62
- };
63
- /**
64
- * Response of `/cosmos/tx/v1beta1/simulateo`
65
- * Note: We are interested in `network` (aka chain id) only
66
- */
67
- export declare type SimulateResponse = {
68
- gas_info: {
69
- gas_used: string;
70
- };
71
- };
72
- export declare type MessageSend = {
73
- '@type': string;
74
- from_address: string;
75
- to_address: string;
76
- amount: Amount;
77
- };
78
- export declare type Amount = {
79
- denom: string;
80
- amount: string;
81
- };
82
- export declare type MessageDeposit = {
83
- '@type': string;
84
- coins: Coins[];
85
- memo: string;
86
- signer: string;
87
- };
88
- export declare type Coins = {
89
- asset: string;
90
- amount: number;
91
- decimals: number;
92
- };
1
+ import { Network, Tx, TxParams } from '@xchainjs/xchain-client';
2
+ import { Asset, BaseAmount } from '@xchainjs/xchain-util';
3
+ import BigNumber from 'bignumber.js';
4
+ import Long from 'long';
5
+ export type NodeUrl = {
6
+ node: string;
7
+ rpc: string;
8
+ };
9
+ export type ClientUrl = Record<Network, NodeUrl>;
10
+ export type ExplorerUrls = {
11
+ root: ExplorerUrl;
12
+ tx: ExplorerUrl;
13
+ address: ExplorerUrl;
14
+ };
15
+ export type ExplorerUrl = Record<Network, string>;
16
+ export type ChainId = string;
17
+ export type ChainIds = Record<Network, ChainId>;
18
+ export type ThorchainClientParams = {
19
+ clientUrl?: ClientUrl;
20
+ explorerUrls?: ExplorerUrls;
21
+ chainIds?: ChainIds;
22
+ };
23
+ export type DepositParam = {
24
+ walletIndex?: number;
25
+ asset?: Asset;
26
+ amount: BaseAmount;
27
+ memo: string;
28
+ gasLimit?: BigNumber;
29
+ sequence?: number;
30
+ };
31
+ export type TxData = Pick<Tx, 'from' | 'to' | 'type'>;
32
+ export type TxOfflineParams = TxParams & {
33
+ /**
34
+ * Balance of Rune to send from
35
+ */
36
+ fromRuneBalance: BaseAmount;
37
+ /**
38
+ * Balance of asset to send from
39
+ * Optional: It can be ignored if asset to send from is RUNE
40
+ */
41
+ fromAssetBalance?: BaseAmount;
42
+ fromAccountNumber: Long;
43
+ fromSequence: Long;
44
+ gasLimit?: BigNumber;
45
+ };
46
+ /**
47
+ * Response from `thorchain/constants` endpoint
48
+ */
49
+ export type ThorchainConstantsResponse = {
50
+ int_64_values: {
51
+ NativeTransactionFee: number;
52
+ };
53
+ };
54
+ /**
55
+ * Response of `/cosmos/base/tendermint/v1beta1/node_info`
56
+ * Note: We are interested in `network` (aka chain id) only
57
+ */
58
+ export type NodeInfoResponse = {
59
+ default_node_info: {
60
+ network: string;
61
+ };
62
+ };
63
+ /**
64
+ * Response of `/cosmos/tx/v1beta1/simulateo`
65
+ * Note: We are interested in `network` (aka chain id) only
66
+ */
67
+ export type SimulateResponse = {
68
+ gas_info: {
69
+ gas_used: string;
70
+ };
71
+ };
72
+ export type MessageSend = {
73
+ '@type': string;
74
+ from_address: string;
75
+ to_address: string;
76
+ amount: Amount;
77
+ };
78
+ export type Amount = {
79
+ denom: string;
80
+ amount: string;
81
+ };
82
+ export type MessageDeposit = {
83
+ '@type': string;
84
+ coins: Coins[];
85
+ memo: string;
86
+ signer: string;
87
+ };
88
+ export type Coins = {
89
+ asset: string;
90
+ amount: number;
91
+ decimals: number;
92
+ };
@@ -1,2 +1,2 @@
1
- export * from './client-types';
2
- export * from './messages';
1
+ export * from './client-types';
2
+ export * from './messages';
@@ -1,63 +1,63 @@
1
- import cosmosclient from '@cosmos-client/core';
2
- import { Asset } from '@xchainjs/xchain-util';
3
- export declare type MsgCoin = {
4
- asset: Asset;
5
- amount: string;
6
- };
7
- export declare class MsgNativeTx {
8
- coins: MsgCoin[];
9
- memo: string;
10
- signer: cosmosclient.AccAddress;
11
- constructor(coins: MsgCoin[], memo: string, signer: cosmosclient.AccAddress);
12
- }
13
- /**
14
- * This creates MsgNativeTx from json.
15
- *
16
- * @param value
17
- * @returns {MsgNativeTx}
18
- */
19
- export declare const msgNativeTxFromJson: (value: {
20
- coins: MsgCoin[];
21
- memo: string;
22
- signer: string;
23
- }) => MsgNativeTx;
24
- export declare type AminoWrapping<T> = {
25
- type: string;
26
- value: T;
27
- };
28
- export declare type ThorchainDepositResponse = AminoWrapping<{
29
- msg: AminoWrapping<{
30
- coins: MsgCoin[];
31
- memo: string;
32
- signer: string;
33
- }>[];
34
- fee: cosmosclient.proto.cosmos.tx.v1beta1.Fee;
35
- signatures: string[];
36
- memo: string;
37
- timeout_height: string;
38
- }>;
39
- export declare type TxResult = {
40
- observed_tx: {
41
- tx: {
42
- id: string;
43
- chain: string;
44
- from_address: string;
45
- to_address: string;
46
- coins: {
47
- asset: string;
48
- amount: string;
49
- }[];
50
- gas: {
51
- asset: string;
52
- amount: string;
53
- }[];
54
- memo: string;
55
- };
56
- status: string;
57
- signers: string[];
58
- };
59
- keysign_metric: {
60
- tx_id: string;
61
- node_tss_times: null;
62
- };
63
- };
1
+ import cosmosclient from '@cosmos-client/core';
2
+ import { Asset } from '@xchainjs/xchain-util';
3
+ export type MsgCoin = {
4
+ asset: Asset;
5
+ amount: string;
6
+ };
7
+ export declare class MsgNativeTx {
8
+ coins: MsgCoin[];
9
+ memo: string;
10
+ signer: cosmosclient.AccAddress;
11
+ constructor(coins: MsgCoin[], memo: string, signer: cosmosclient.AccAddress);
12
+ }
13
+ /**
14
+ * This creates MsgNativeTx from json.
15
+ *
16
+ * @param value
17
+ * @returns {MsgNativeTx}
18
+ */
19
+ export declare const msgNativeTxFromJson: (value: {
20
+ coins: MsgCoin[];
21
+ memo: string;
22
+ signer: string;
23
+ }) => MsgNativeTx;
24
+ export type AminoWrapping<T> = {
25
+ type: string;
26
+ value: T;
27
+ };
28
+ export type ThorchainDepositResponse = AminoWrapping<{
29
+ msg: AminoWrapping<{
30
+ coins: MsgCoin[];
31
+ memo: string;
32
+ signer: string;
33
+ }>[];
34
+ fee: cosmosclient.proto.cosmos.tx.v1beta1.Fee;
35
+ signatures: string[];
36
+ memo: string;
37
+ timeout_height: string;
38
+ }>;
39
+ export type TxResult = {
40
+ observed_tx: {
41
+ tx: {
42
+ id: string;
43
+ chain: string;
44
+ from_address: string;
45
+ to_address: string;
46
+ coins: {
47
+ asset: string;
48
+ amount: string;
49
+ }[];
50
+ gas: {
51
+ asset: string;
52
+ amount: string;
53
+ }[];
54
+ memo: string;
55
+ };
56
+ status: string;
57
+ signers: string[];
58
+ };
59
+ keysign_metric: {
60
+ tx_id: string;
61
+ node_tss_times: null;
62
+ };
63
+ };