@shapeshiftoss/unchained-client 9.8.3 → 10.0.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/dist/cosmos/types.d.ts +2 -2
- package/dist/evm/ethereum/parser/cowswap.d.ts +4 -0
- package/dist/evm/ethereum/parser/foxy.d.ts +4 -0
- package/dist/evm/ethereum/parser/thor.d.ts +4 -0
- package/dist/evm/ethereum/parser/uniV2.d.ts +4 -0
- package/dist/evm/ethereum/parser/weth.d.ts +4 -0
- package/dist/evm/ethereum/parser/yearn.d.ts +7 -0
- package/dist/evm/ethereum/parser/yearn.js +30 -14
- package/dist/evm/parser/erc20.d.ts +6 -0
- package/dist/evm/parser/erc20.js +14 -11
- package/dist/evm/parser/types.d.ts +10 -9
- package/dist/evm/parser/types.js +0 -5
- package/dist/evm/parser/zrx.d.ts +4 -0
- package/dist/generated/cosmos/api.d.ts +183 -66
- package/dist/generated/cosmos/api.js +82 -13
- package/dist/generated/cosmos/base.d.ts +1 -1
- package/dist/generated/cosmos/base.js +1 -1
- package/dist/generated/cosmos/common.d.ts +1 -1
- package/dist/generated/cosmos/common.js +1 -1
- package/dist/generated/cosmos/configuration.d.ts +1 -1
- package/dist/generated/cosmos/configuration.js +1 -1
- package/dist/generated/cosmos/index.d.ts +1 -1
- package/dist/generated/cosmos/index.js +1 -1
- package/dist/generated/osmosis/api.d.ts +183 -66
- package/dist/generated/osmosis/api.js +82 -13
- package/dist/generated/osmosis/base.d.ts +1 -1
- package/dist/generated/osmosis/base.js +1 -1
- package/dist/generated/osmosis/common.d.ts +1 -1
- package/dist/generated/osmosis/common.js +1 -1
- package/dist/generated/osmosis/configuration.d.ts +1 -1
- package/dist/generated/osmosis/configuration.js +1 -1
- package/dist/generated/osmosis/index.d.ts +1 -1
- package/dist/generated/osmosis/index.js +1 -1
- package/dist/types.d.ts +0 -13
- package/dist/types.js +1 -12
- package/package.json +3 -3
package/dist/cosmos/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface TxMetadata extends
|
|
1
|
+
import { BaseTxMetadata, StandardTx } from '../types';
|
|
2
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
3
3
|
parser: 'cosmos';
|
|
4
4
|
delegator?: string;
|
|
5
5
|
sourceValidator?: string;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Tx } from '../../../generated/ethereum';
|
|
2
|
+
import { BaseTxMetadata } from '../../../types';
|
|
2
3
|
import { SubParser, TxSpecific } from '../../parser';
|
|
4
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
5
|
+
parser: 'cowswap';
|
|
6
|
+
}
|
|
3
7
|
export declare class Parser implements SubParser<Tx> {
|
|
4
8
|
parse(tx: Tx): Promise<TxSpecific | undefined>;
|
|
5
9
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
2
|
import { Tx } from '../../../generated/ethereum';
|
|
3
|
+
import { BaseTxMetadata } from '../../../types';
|
|
3
4
|
import { SubParser, TxSpecific } from '../../parser';
|
|
5
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
6
|
+
parser: 'foxy';
|
|
7
|
+
}
|
|
4
8
|
export declare class Parser implements SubParser<Tx> {
|
|
5
9
|
readonly abiInterface: ethers.utils.Interface;
|
|
6
10
|
readonly supportedFunctions: {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
3
|
import { Tx } from '../../../generated/ethereum';
|
|
4
|
+
import { BaseTxMetadata } from '../../../types';
|
|
4
5
|
import { SubParser, TxSpecific } from '../../parser';
|
|
6
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
7
|
+
parser: 'thor';
|
|
8
|
+
}
|
|
5
9
|
export interface ParserArgs {
|
|
6
10
|
chainId: ChainId;
|
|
7
11
|
rpcUrl: string;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
3
|
import { Tx } from '../../../generated/ethereum';
|
|
4
|
+
import { BaseTxMetadata } from '../../../types';
|
|
4
5
|
import { SubParser, TxSpecific } from '../../parser';
|
|
6
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
7
|
+
parser: 'uniV2';
|
|
8
|
+
}
|
|
5
9
|
export interface ParserArgs {
|
|
6
10
|
chainId: ChainId;
|
|
7
11
|
provider: ethers.providers.JsonRpcProvider;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
3
|
import { Tx } from '../../../generated/ethereum';
|
|
4
|
+
import { BaseTxMetadata } from '../../../types';
|
|
4
5
|
import { SubParser, TxSpecific } from '../../parser';
|
|
6
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
7
|
+
parser: 'weth';
|
|
8
|
+
}
|
|
5
9
|
export interface ParserArgs {
|
|
6
10
|
chainId: ChainId;
|
|
7
11
|
provider: ethers.providers.JsonRpcProvider;
|
|
@@ -2,7 +2,13 @@ import { ChainId } from '@shapeshiftoss/caip';
|
|
|
2
2
|
import { ChainId as YearnChainId, Yearn } from '@yfi/sdk';
|
|
3
3
|
import { ethers } from 'ethers';
|
|
4
4
|
import { Tx } from '../../../generated/ethereum';
|
|
5
|
+
import { BaseTxMetadata } from '../../../types';
|
|
5
6
|
import { SubParser, TxSpecific } from '../../parser';
|
|
7
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
8
|
+
parser: 'yearn';
|
|
9
|
+
assetId?: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
}
|
|
6
12
|
interface ParserArgs {
|
|
7
13
|
chainId: ChainId;
|
|
8
14
|
provider: ethers.providers.JsonRpcProvider;
|
|
@@ -11,6 +17,7 @@ export declare class Parser implements SubParser<Tx> {
|
|
|
11
17
|
provider: ethers.providers.JsonRpcProvider;
|
|
12
18
|
yearnSdk: Yearn<YearnChainId> | undefined;
|
|
13
19
|
yearnTokenVaultAddresses: string[] | undefined;
|
|
20
|
+
readonly chainId: ChainId;
|
|
14
21
|
readonly shapeShiftInterface: ethers.utils.Interface;
|
|
15
22
|
readonly yearnInterface: ethers.utils.Interface;
|
|
16
23
|
readonly supportedYearnFunctions: {
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Parser = void 0;
|
|
7
|
+
const caip_1 = require("@shapeshiftoss/caip");
|
|
7
8
|
const sdk_1 = require("@yfi/sdk");
|
|
8
9
|
const ethers_1 = require("ethers");
|
|
9
10
|
const parser_1 = require("../../parser");
|
|
@@ -25,6 +26,7 @@ class Parser {
|
|
|
25
26
|
depositSigHash: this.shapeShiftInterface.getSighash('deposit(address,address,uint256,uint256)'),
|
|
26
27
|
};
|
|
27
28
|
this.provider = args.provider;
|
|
29
|
+
this.chainId = args.chainId;
|
|
28
30
|
// The only Yearn-supported chain we currently support is mainnet
|
|
29
31
|
if (args.chainId === 'eip155:1') {
|
|
30
32
|
// 1 for EthMain (@yfi/sdk/dist/chain.d.ts)
|
|
@@ -36,6 +38,12 @@ class Parser {
|
|
|
36
38
|
if (!tx.inputData)
|
|
37
39
|
return;
|
|
38
40
|
const txSigHash = (0, parser_1.getSigHash)(tx.inputData);
|
|
41
|
+
const supportedSigHashes = [
|
|
42
|
+
...Object.values(this.supportedShapeShiftFunctions),
|
|
43
|
+
...Object.values(this.supportedYearnFunctions),
|
|
44
|
+
];
|
|
45
|
+
if (!supportedSigHashes.some((hash) => hash === txSigHash))
|
|
46
|
+
return;
|
|
39
47
|
const abiInterface = this.getAbiInterface(txSigHash);
|
|
40
48
|
if (!abiInterface)
|
|
41
49
|
return;
|
|
@@ -47,31 +55,39 @@ class Parser {
|
|
|
47
55
|
// failed to decode input data
|
|
48
56
|
if (!decoded)
|
|
49
57
|
return;
|
|
58
|
+
const data = {
|
|
59
|
+
method: decoded.name,
|
|
60
|
+
parser: 'yearn',
|
|
61
|
+
};
|
|
50
62
|
switch (txSigHash) {
|
|
51
63
|
case this.supportedYearnFunctions.approveSigHash:
|
|
52
|
-
if (
|
|
64
|
+
if (decoded.args._spender !== constants_1.SHAPE_SHIFT_ROUTER_CONTRACT)
|
|
53
65
|
return;
|
|
54
|
-
|
|
66
|
+
return {
|
|
67
|
+
data: {
|
|
68
|
+
...data,
|
|
69
|
+
assetId: (0, caip_1.toAssetId)({
|
|
70
|
+
chainId: this.chainId,
|
|
71
|
+
assetNamespace: 'erc20',
|
|
72
|
+
assetReference: tx.to,
|
|
73
|
+
}),
|
|
74
|
+
value: decoded.args._value.toString(),
|
|
75
|
+
},
|
|
76
|
+
};
|
|
55
77
|
case this.supportedShapeShiftFunctions.depositSigHash:
|
|
56
78
|
if (tx.to !== constants_1.SHAPE_SHIFT_ROUTER_CONTRACT)
|
|
57
79
|
return;
|
|
58
|
-
|
|
59
|
-
case this.supportedYearnFunctions.withdrawSigHash:
|
|
60
|
-
case this.supportedYearnFunctions.depositSigHash:
|
|
61
|
-
case this.supportedYearnFunctions.depositAmountSigHash:
|
|
80
|
+
return { data };
|
|
62
81
|
case this.supportedYearnFunctions.depositAmountAndRecipientSigHash:
|
|
63
82
|
if (tx.to && !((_b = this.yearnTokenVaultAddresses) === null || _b === void 0 ? void 0 : _b.includes(tx.to)))
|
|
64
83
|
return;
|
|
65
|
-
|
|
84
|
+
return { data };
|
|
85
|
+
case this.supportedYearnFunctions.withdrawSigHash:
|
|
86
|
+
case this.supportedYearnFunctions.depositSigHash:
|
|
87
|
+
case this.supportedYearnFunctions.depositAmountSigHash:
|
|
66
88
|
default:
|
|
67
|
-
return;
|
|
89
|
+
return { data };
|
|
68
90
|
}
|
|
69
|
-
return {
|
|
70
|
-
data: {
|
|
71
|
-
method: decoded.name,
|
|
72
|
-
parser: 'yearn',
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
91
|
}
|
|
76
92
|
getAbiInterface(txSigHash) {
|
|
77
93
|
if (Object.values(this.supportedYearnFunctions).some((abi) => abi === txSigHash))
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
|
+
import { BaseTxMetadata } from '../../types';
|
|
3
4
|
import { SubParser, Tx, TxSpecific } from './types';
|
|
5
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
6
|
+
parser: 'erc20';
|
|
7
|
+
assetId: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
}
|
|
4
10
|
interface ParserArgs {
|
|
5
11
|
chainId: ChainId;
|
|
6
12
|
provider: ethers.providers.JsonRpcProvider;
|
package/dist/evm/parser/erc20.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.Parser = void 0;
|
|
|
7
7
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
8
8
|
const ethers_1 = require("ethers");
|
|
9
9
|
const erc20_1 = __importDefault(require("./abi/erc20"));
|
|
10
|
-
const types_1 = require("./types");
|
|
11
10
|
const utils_1 = require("./utils");
|
|
12
11
|
class Parser {
|
|
13
12
|
constructor(args) {
|
|
@@ -28,17 +27,21 @@ class Parser {
|
|
|
28
27
|
// failed to decode input data
|
|
29
28
|
if (!decoded)
|
|
30
29
|
return;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
parser: types_1.TxParser.ERC20,
|
|
40
|
-
},
|
|
30
|
+
const data = {
|
|
31
|
+
assetId: (0, caip_1.toAssetId)({
|
|
32
|
+
...(0, caip_1.fromChainId)(this.chainId),
|
|
33
|
+
assetNamespace: 'erc20',
|
|
34
|
+
assetReference: tx.to,
|
|
35
|
+
}),
|
|
36
|
+
method: decoded.name,
|
|
37
|
+
parser: 'erc20',
|
|
41
38
|
};
|
|
39
|
+
switch (txSigHash) {
|
|
40
|
+
case this.supportedFunctions.approveSigHash:
|
|
41
|
+
return { data: { ...data, value: (decoded === null || decoded === void 0 ? void 0 : decoded.args.amount).toString() } };
|
|
42
|
+
default:
|
|
43
|
+
return { data };
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
exports.Parser = Parser;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { evm } from '@shapeshiftoss/common-api';
|
|
2
|
-
import {
|
|
2
|
+
import { StandardTx } from '../../types';
|
|
3
|
+
import * as cowswap from '../ethereum/parser/cowswap';
|
|
4
|
+
import * as foxy from '../ethereum/parser/foxy';
|
|
5
|
+
import * as thor from '../ethereum/parser/thor';
|
|
6
|
+
import * as uniV2 from '../ethereum/parser/uniV2';
|
|
7
|
+
import * as weth from '../ethereum/parser/weth';
|
|
8
|
+
import * as yearn from '../ethereum/parser/yearn';
|
|
9
|
+
import * as erc20 from '../parser/erc20';
|
|
10
|
+
import * as zrx from '../parser/zrx';
|
|
3
11
|
export declare type Tx = evm.Tx;
|
|
4
|
-
export declare
|
|
5
|
-
ERC20 = "erc20"
|
|
6
|
-
}
|
|
7
|
-
export interface ERC20TxMetadata extends BaseTxMetadata {
|
|
8
|
-
parser: TxParser.ERC20;
|
|
9
|
-
assetId?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare type TxMetadata = StandardTxMetadata | ERC20TxMetadata;
|
|
12
|
+
export declare type TxMetadata = cowswap.TxMetadata | erc20.TxMetadata | foxy.TxMetadata | thor.TxMetadata | uniV2.TxMetadata | weth.TxMetadata | yearn.TxMetadata | zrx.TxMetadata;
|
|
12
13
|
export interface ParsedTx extends StandardTx {
|
|
13
14
|
data?: TxMetadata;
|
|
14
15
|
}
|
package/dist/evm/parser/types.js
CHANGED
package/dist/evm/parser/zrx.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { BaseTxMetadata } from '../../types';
|
|
1
2
|
import { type Tx } from '../parser/types';
|
|
2
3
|
import { type SubParser, type TxSpecific } from '.';
|
|
4
|
+
export interface TxMetadata extends BaseTxMetadata {
|
|
5
|
+
parser: 'zrx';
|
|
6
|
+
}
|
|
3
7
|
export declare class Parser implements SubParser<Tx> {
|
|
4
8
|
parse(tx: Tx): Promise<TxSpecific | undefined>;
|
|
5
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cosmos Unchained API
|
|
3
|
-
* Provides access to cosmos chain data
|
|
3
|
+
* Provides access to cosmos chain data.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 1.0.0
|
|
6
6
|
*
|
|
@@ -48,83 +48,34 @@ export interface Account {
|
|
|
48
48
|
* @memberof Account
|
|
49
49
|
*/
|
|
50
50
|
'assets': Array<Value>;
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @type {Array<Delegation>}
|
|
54
|
-
* @memberof Account
|
|
55
|
-
*/
|
|
56
|
-
'delegations': Array<Delegation>;
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
* @type {Array<Redelegation>}
|
|
60
|
-
* @memberof Account
|
|
61
|
-
*/
|
|
62
|
-
'redelegations': Array<Redelegation>;
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
* @type {Array<Reward>}
|
|
66
|
-
* @memberof Account
|
|
67
|
-
*/
|
|
68
|
-
'rewards': Array<Reward>;
|
|
69
51
|
/**
|
|
70
52
|
*
|
|
71
53
|
* @type {number}
|
|
72
54
|
* @memberof Account
|
|
73
55
|
*/
|
|
74
56
|
'sequence': number;
|
|
75
|
-
/**
|
|
76
|
-
*
|
|
77
|
-
* @type {Array<Unbonding>}
|
|
78
|
-
* @memberof Account
|
|
79
|
-
*/
|
|
80
|
-
'unbondings': Array<Unbonding>;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @export
|
|
85
|
-
* @interface AccountAllOf
|
|
86
|
-
*/
|
|
87
|
-
export interface AccountAllOf {
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @type {number}
|
|
91
|
-
* @memberof AccountAllOf
|
|
92
|
-
*/
|
|
93
|
-
'accountNumber': number;
|
|
94
|
-
/**
|
|
95
|
-
*
|
|
96
|
-
* @type {Array<Value>}
|
|
97
|
-
* @memberof AccountAllOf
|
|
98
|
-
*/
|
|
99
|
-
'assets': Array<Value>;
|
|
100
57
|
/**
|
|
101
58
|
*
|
|
102
59
|
* @type {Array<Delegation>}
|
|
103
|
-
* @memberof
|
|
60
|
+
* @memberof Account
|
|
104
61
|
*/
|
|
105
62
|
'delegations': Array<Delegation>;
|
|
106
63
|
/**
|
|
107
64
|
*
|
|
108
65
|
* @type {Array<Redelegation>}
|
|
109
|
-
* @memberof
|
|
66
|
+
* @memberof Account
|
|
110
67
|
*/
|
|
111
68
|
'redelegations': Array<Redelegation>;
|
|
112
69
|
/**
|
|
113
70
|
*
|
|
114
71
|
* @type {Array<Reward>}
|
|
115
|
-
* @memberof
|
|
72
|
+
* @memberof Account
|
|
116
73
|
*/
|
|
117
74
|
'rewards': Array<Reward>;
|
|
118
|
-
/**
|
|
119
|
-
*
|
|
120
|
-
* @type {number}
|
|
121
|
-
* @memberof AccountAllOf
|
|
122
|
-
*/
|
|
123
|
-
'sequence': number;
|
|
124
75
|
/**
|
|
125
76
|
*
|
|
126
77
|
* @type {Array<Unbonding>}
|
|
127
|
-
* @memberof
|
|
78
|
+
* @memberof Account
|
|
128
79
|
*/
|
|
129
80
|
'unbondings': Array<Unbonding>;
|
|
130
81
|
}
|
|
@@ -286,6 +237,87 @@ export interface BaseTxHistoryAllOf {
|
|
|
286
237
|
*/
|
|
287
238
|
'txs': Array<Tx>;
|
|
288
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* Contains common cosmossdk info about account details for an address or xpub
|
|
242
|
+
* @export
|
|
243
|
+
* @interface CosmosSDKAccount
|
|
244
|
+
*/
|
|
245
|
+
export interface CosmosSDKAccount {
|
|
246
|
+
/**
|
|
247
|
+
*
|
|
248
|
+
* @type {string}
|
|
249
|
+
* @memberof CosmosSDKAccount
|
|
250
|
+
*/
|
|
251
|
+
'balance': string;
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
* @type {string}
|
|
255
|
+
* @memberof CosmosSDKAccount
|
|
256
|
+
*/
|
|
257
|
+
'pubkey': string;
|
|
258
|
+
/**
|
|
259
|
+
*
|
|
260
|
+
* @type {string}
|
|
261
|
+
* @memberof CosmosSDKAccount
|
|
262
|
+
*/
|
|
263
|
+
'unconfirmedBalance': string;
|
|
264
|
+
/**
|
|
265
|
+
*
|
|
266
|
+
* @type {number}
|
|
267
|
+
* @memberof CosmosSDKAccount
|
|
268
|
+
*/
|
|
269
|
+
'accountNumber': number;
|
|
270
|
+
/**
|
|
271
|
+
*
|
|
272
|
+
* @type {Array<Value>}
|
|
273
|
+
* @memberof CosmosSDKAccount
|
|
274
|
+
*/
|
|
275
|
+
'assets': Array<Value>;
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
* @type {number}
|
|
279
|
+
* @memberof CosmosSDKAccount
|
|
280
|
+
*/
|
|
281
|
+
'sequence': number;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
* @export
|
|
286
|
+
* @interface CosmosSDKAccountAllOf
|
|
287
|
+
*/
|
|
288
|
+
export interface CosmosSDKAccountAllOf {
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
* @type {number}
|
|
292
|
+
* @memberof CosmosSDKAccountAllOf
|
|
293
|
+
*/
|
|
294
|
+
'accountNumber': number;
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
* @type {Array<Value>}
|
|
298
|
+
* @memberof CosmosSDKAccountAllOf
|
|
299
|
+
*/
|
|
300
|
+
'assets': Array<Value>;
|
|
301
|
+
/**
|
|
302
|
+
*
|
|
303
|
+
* @type {number}
|
|
304
|
+
* @memberof CosmosSDKAccountAllOf
|
|
305
|
+
*/
|
|
306
|
+
'sequence': number;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Contains common cosmossdk info about the running coinstack
|
|
310
|
+
* @export
|
|
311
|
+
* @interface CosmosSDKInfo
|
|
312
|
+
*/
|
|
313
|
+
export interface CosmosSDKInfo {
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @type {string}
|
|
317
|
+
* @memberof CosmosSDKInfo
|
|
318
|
+
*/
|
|
319
|
+
'network': string;
|
|
320
|
+
}
|
|
289
321
|
/**
|
|
290
322
|
* Contains info about a staking delegation
|
|
291
323
|
* @export
|
|
@@ -568,6 +600,37 @@ export interface Reward {
|
|
|
568
600
|
*/
|
|
569
601
|
'validator': Validator;
|
|
570
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Contains info about current staking state
|
|
605
|
+
* @export
|
|
606
|
+
* @interface Staking
|
|
607
|
+
*/
|
|
608
|
+
export interface Staking {
|
|
609
|
+
/**
|
|
610
|
+
*
|
|
611
|
+
* @type {Array<Delegation>}
|
|
612
|
+
* @memberof Staking
|
|
613
|
+
*/
|
|
614
|
+
'delegations': Array<Delegation>;
|
|
615
|
+
/**
|
|
616
|
+
*
|
|
617
|
+
* @type {Array<Redelegation>}
|
|
618
|
+
* @memberof Staking
|
|
619
|
+
*/
|
|
620
|
+
'redelegations': Array<Redelegation>;
|
|
621
|
+
/**
|
|
622
|
+
*
|
|
623
|
+
* @type {Array<Reward>}
|
|
624
|
+
* @memberof Staking
|
|
625
|
+
*/
|
|
626
|
+
'rewards': Array<Reward>;
|
|
627
|
+
/**
|
|
628
|
+
*
|
|
629
|
+
* @type {Array<Unbonding>}
|
|
630
|
+
* @memberof Staking
|
|
631
|
+
*/
|
|
632
|
+
'unbondings': Array<Unbonding>;
|
|
633
|
+
}
|
|
571
634
|
/**
|
|
572
635
|
* Contains info about a transaction
|
|
573
636
|
* @export
|
|
@@ -970,7 +1033,8 @@ export interface Value {
|
|
|
970
1033
|
*/
|
|
971
1034
|
export declare const V1ApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
|
|
972
1035
|
/**
|
|
973
|
-
*
|
|
1036
|
+
*
|
|
1037
|
+
* @summary Get the estimated gas cost for a transaction.
|
|
974
1038
|
* @param {InlineObject} [body]
|
|
975
1039
|
* @param {*} [options] Override http request option.
|
|
976
1040
|
* @throws {RequiredError}
|
|
@@ -991,6 +1055,13 @@ export declare const V1ApiAxiosParamCreator: (configuration?: Configuration | un
|
|
|
991
1055
|
* @throws {RequiredError}
|
|
992
1056
|
*/
|
|
993
1057
|
getInfo: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1058
|
+
/**
|
|
1059
|
+
* # Get transaction details
|
|
1060
|
+
* @param {string} txid Transaction hash
|
|
1061
|
+
* @param {*} [options] Override http request option.
|
|
1062
|
+
* @throws {RequiredError}
|
|
1063
|
+
*/
|
|
1064
|
+
getTx: (txid: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
994
1065
|
/**
|
|
995
1066
|
*
|
|
996
1067
|
* @summary Get paginated transaction history.
|
|
@@ -1002,14 +1073,16 @@ export declare const V1ApiAxiosParamCreator: (configuration?: Configuration | un
|
|
|
1002
1073
|
*/
|
|
1003
1074
|
getTxHistory: (pubkey: string, cursor?: string | undefined, pageSize?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1004
1075
|
/**
|
|
1005
|
-
*
|
|
1076
|
+
*
|
|
1077
|
+
* @summary Get a specific validator.
|
|
1006
1078
|
* @param {string} pubkey Account address or xpub
|
|
1007
1079
|
* @param {*} [options] Override http request option.
|
|
1008
1080
|
* @throws {RequiredError}
|
|
1009
1081
|
*/
|
|
1010
1082
|
getValidator: (pubkey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1011
1083
|
/**
|
|
1012
|
-
*
|
|
1084
|
+
*
|
|
1085
|
+
* @summary Get the list of current validators.
|
|
1013
1086
|
* @param {*} [options] Override http request option.
|
|
1014
1087
|
* @throws {RequiredError}
|
|
1015
1088
|
*/
|
|
@@ -1029,7 +1102,8 @@ export declare const V1ApiAxiosParamCreator: (configuration?: Configuration | un
|
|
|
1029
1102
|
*/
|
|
1030
1103
|
export declare const V1ApiFp: (configuration?: Configuration | undefined) => {
|
|
1031
1104
|
/**
|
|
1032
|
-
*
|
|
1105
|
+
*
|
|
1106
|
+
* @summary Get the estimated gas cost for a transaction.
|
|
1033
1107
|
* @param {InlineObject} [body]
|
|
1034
1108
|
* @param {*} [options] Override http request option.
|
|
1035
1109
|
* @throws {RequiredError}
|
|
@@ -1050,6 +1124,13 @@ export declare const V1ApiFp: (configuration?: Configuration | undefined) => {
|
|
|
1050
1124
|
* @throws {RequiredError}
|
|
1051
1125
|
*/
|
|
1052
1126
|
getInfo(options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<Info>>;
|
|
1127
|
+
/**
|
|
1128
|
+
* # Get transaction details
|
|
1129
|
+
* @param {string} txid Transaction hash
|
|
1130
|
+
* @param {*} [options] Override http request option.
|
|
1131
|
+
* @throws {RequiredError}
|
|
1132
|
+
*/
|
|
1133
|
+
getTx(txid: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<Tx>>;
|
|
1053
1134
|
/**
|
|
1054
1135
|
*
|
|
1055
1136
|
* @summary Get paginated transaction history.
|
|
@@ -1061,14 +1142,16 @@ export declare const V1ApiFp: (configuration?: Configuration | undefined) => {
|
|
|
1061
1142
|
*/
|
|
1062
1143
|
getTxHistory(pubkey: string, cursor?: string | undefined, pageSize?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<TxHistory>>;
|
|
1063
1144
|
/**
|
|
1064
|
-
*
|
|
1145
|
+
*
|
|
1146
|
+
* @summary Get a specific validator.
|
|
1065
1147
|
* @param {string} pubkey Account address or xpub
|
|
1066
1148
|
* @param {*} [options] Override http request option.
|
|
1067
1149
|
* @throws {RequiredError}
|
|
1068
1150
|
*/
|
|
1069
1151
|
getValidator(pubkey: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<Validator>>;
|
|
1070
1152
|
/**
|
|
1071
|
-
*
|
|
1153
|
+
*
|
|
1154
|
+
* @summary Get the list of current validators.
|
|
1072
1155
|
* @param {*} [options] Override http request option.
|
|
1073
1156
|
* @throws {RequiredError}
|
|
1074
1157
|
*/
|
|
@@ -1088,7 +1171,8 @@ export declare const V1ApiFp: (configuration?: Configuration | undefined) => {
|
|
|
1088
1171
|
*/
|
|
1089
1172
|
export declare const V1ApiFactory: (configuration?: Configuration | undefined, basePath?: string | undefined, axios?: AxiosInstance | undefined) => {
|
|
1090
1173
|
/**
|
|
1091
|
-
*
|
|
1174
|
+
*
|
|
1175
|
+
* @summary Get the estimated gas cost for a transaction.
|
|
1092
1176
|
* @param {InlineObject} [body]
|
|
1093
1177
|
* @param {*} [options] Override http request option.
|
|
1094
1178
|
* @throws {RequiredError}
|
|
@@ -1109,6 +1193,13 @@ export declare const V1ApiFactory: (configuration?: Configuration | undefined, b
|
|
|
1109
1193
|
* @throws {RequiredError}
|
|
1110
1194
|
*/
|
|
1111
1195
|
getInfo(options?: any): AxiosPromise<Info>;
|
|
1196
|
+
/**
|
|
1197
|
+
* # Get transaction details
|
|
1198
|
+
* @param {string} txid Transaction hash
|
|
1199
|
+
* @param {*} [options] Override http request option.
|
|
1200
|
+
* @throws {RequiredError}
|
|
1201
|
+
*/
|
|
1202
|
+
getTx(txid: string, options?: any): AxiosPromise<Tx>;
|
|
1112
1203
|
/**
|
|
1113
1204
|
*
|
|
1114
1205
|
* @summary Get paginated transaction history.
|
|
@@ -1120,14 +1211,16 @@ export declare const V1ApiFactory: (configuration?: Configuration | undefined, b
|
|
|
1120
1211
|
*/
|
|
1121
1212
|
getTxHistory(pubkey: string, cursor?: string | undefined, pageSize?: number | undefined, options?: any): AxiosPromise<TxHistory>;
|
|
1122
1213
|
/**
|
|
1123
|
-
*
|
|
1214
|
+
*
|
|
1215
|
+
* @summary Get a specific validator.
|
|
1124
1216
|
* @param {string} pubkey Account address or xpub
|
|
1125
1217
|
* @param {*} [options] Override http request option.
|
|
1126
1218
|
* @throws {RequiredError}
|
|
1127
1219
|
*/
|
|
1128
1220
|
getValidator(pubkey: string, options?: any): AxiosPromise<Validator>;
|
|
1129
1221
|
/**
|
|
1130
|
-
*
|
|
1222
|
+
*
|
|
1223
|
+
* @summary Get the list of current validators.
|
|
1131
1224
|
* @param {*} [options] Override http request option.
|
|
1132
1225
|
* @throws {RequiredError}
|
|
1133
1226
|
*/
|
|
@@ -1167,6 +1260,19 @@ export interface V1ApiGetAccountRequest {
|
|
|
1167
1260
|
*/
|
|
1168
1261
|
readonly pubkey: string;
|
|
1169
1262
|
}
|
|
1263
|
+
/**
|
|
1264
|
+
* Request parameters for getTx operation in V1Api.
|
|
1265
|
+
* @export
|
|
1266
|
+
* @interface V1ApiGetTxRequest
|
|
1267
|
+
*/
|
|
1268
|
+
export interface V1ApiGetTxRequest {
|
|
1269
|
+
/**
|
|
1270
|
+
* Transaction hash
|
|
1271
|
+
* @type {string}
|
|
1272
|
+
* @memberof V1ApiGetTx
|
|
1273
|
+
*/
|
|
1274
|
+
readonly txid: string;
|
|
1275
|
+
}
|
|
1170
1276
|
/**
|
|
1171
1277
|
* Request parameters for getTxHistory operation in V1Api.
|
|
1172
1278
|
* @export
|
|
@@ -1226,7 +1332,8 @@ export interface V1ApiSendTxRequest {
|
|
|
1226
1332
|
*/
|
|
1227
1333
|
export declare class V1Api extends BaseAPI {
|
|
1228
1334
|
/**
|
|
1229
|
-
*
|
|
1335
|
+
*
|
|
1336
|
+
* @summary Get the estimated gas cost for a transaction.
|
|
1230
1337
|
* @param {V1ApiEstimateGasRequest} requestParameters Request parameters.
|
|
1231
1338
|
* @param {*} [options] Override http request option.
|
|
1232
1339
|
* @throws {RequiredError}
|
|
@@ -1250,6 +1357,14 @@ export declare class V1Api extends BaseAPI {
|
|
|
1250
1357
|
* @memberof V1Api
|
|
1251
1358
|
*/
|
|
1252
1359
|
getInfo(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Info, any>>;
|
|
1360
|
+
/**
|
|
1361
|
+
* # Get transaction details
|
|
1362
|
+
* @param {V1ApiGetTxRequest} requestParameters Request parameters.
|
|
1363
|
+
* @param {*} [options] Override http request option.
|
|
1364
|
+
* @throws {RequiredError}
|
|
1365
|
+
* @memberof V1Api
|
|
1366
|
+
*/
|
|
1367
|
+
getTx(requestParameters: V1ApiGetTxRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Tx, any>>;
|
|
1253
1368
|
/**
|
|
1254
1369
|
*
|
|
1255
1370
|
* @summary Get paginated transaction history.
|
|
@@ -1260,7 +1375,8 @@ export declare class V1Api extends BaseAPI {
|
|
|
1260
1375
|
*/
|
|
1261
1376
|
getTxHistory(requestParameters: V1ApiGetTxHistoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TxHistory, any>>;
|
|
1262
1377
|
/**
|
|
1263
|
-
*
|
|
1378
|
+
*
|
|
1379
|
+
* @summary Get a specific validator.
|
|
1264
1380
|
* @param {V1ApiGetValidatorRequest} requestParameters Request parameters.
|
|
1265
1381
|
* @param {*} [options] Override http request option.
|
|
1266
1382
|
* @throws {RequiredError}
|
|
@@ -1268,7 +1384,8 @@ export declare class V1Api extends BaseAPI {
|
|
|
1268
1384
|
*/
|
|
1269
1385
|
getValidator(requestParameters: V1ApiGetValidatorRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Validator, any>>;
|
|
1270
1386
|
/**
|
|
1271
|
-
*
|
|
1387
|
+
*
|
|
1388
|
+
* @summary Get the list of current validators.
|
|
1272
1389
|
* @param {*} [options] Override http request option.
|
|
1273
1390
|
* @throws {RequiredError}
|
|
1274
1391
|
* @memberof V1Api
|