@shapeshiftoss/unchained-client 10.14.11 → 10.16.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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/cosmossdk/thorchain/parser/__tests__/thorchain.test.js +1 -1
- package/dist/cjs/cosmossdk/thorchain/parser/rfox.js +1 -1
- package/dist/cjs/evm/arbitrum/parser/index.js +2 -2
- package/dist/cjs/evm/ethereum/parser/index.js +6 -0
- package/dist/cjs/generated/ethereum/apis/V1Api.d.ts +15 -0
- package/dist/cjs/generated/ethereum/apis/V1Api.js +24 -0
- package/dist/cjs/generated/mayachain/apis/V1Api.d.ts +1 -13
- package/dist/cjs/generated/mayachain/apis/V1Api.js +0 -27
- package/dist/cjs/generated/mayachain/models/index.d.ts +0 -2
- package/dist/cjs/generated/mayachain/models/index.js +0 -2
- package/dist/cjs/generated/thorchain/apis/V1Api.d.ts +1 -25
- package/dist/cjs/generated/thorchain/apis/V1Api.js +0 -54
- package/dist/cjs/generated/thorchain/models/index.d.ts +0 -3
- package/dist/cjs/generated/thorchain/models/index.js +0 -3
- package/dist/cjs/tron/__tests__/api.test.d.ts +1 -0
- package/dist/cjs/tron/__tests__/api.test.js +425 -0
- package/dist/cjs/tron/api.d.ts +42 -15
- package/dist/cjs/tron/api.js +222 -78
- package/dist/cjs/tron/types.d.ts +4 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/cosmossdk/thorchain/parser/__tests__/thorchain.test.js +2 -2
- package/dist/esm/cosmossdk/thorchain/parser/rfox.js +2 -2
- package/dist/esm/evm/arbitrum/parser/index.js +3 -3
- package/dist/esm/evm/ethereum/parser/index.js +7 -1
- package/dist/esm/generated/ethereum/apis/V1Api.d.ts +15 -0
- package/dist/esm/generated/ethereum/apis/V1Api.js +24 -0
- package/dist/esm/generated/mayachain/apis/V1Api.d.ts +1 -13
- package/dist/esm/generated/mayachain/apis/V1Api.js +1 -28
- package/dist/esm/generated/mayachain/models/index.d.ts +0 -2
- package/dist/esm/generated/mayachain/models/index.js +0 -2
- package/dist/esm/generated/thorchain/apis/V1Api.d.ts +1 -25
- package/dist/esm/generated/thorchain/apis/V1Api.js +1 -55
- package/dist/esm/generated/thorchain/models/index.d.ts +0 -3
- package/dist/esm/generated/thorchain/models/index.js +0 -3
- package/dist/esm/tron/__tests__/api.test.d.ts +1 -0
- package/dist/esm/tron/__tests__/api.test.js +423 -0
- package/dist/esm/tron/api.d.ts +42 -15
- package/dist/esm/tron/api.js +220 -77
- package/dist/esm/tron/types.d.ts +4 -0
- package/package.json +5 -5
- package/dist/cjs/generated/mayachain/models/AffiliateFee.d.ts +0 -67
- package/dist/cjs/generated/mayachain/models/AffiliateFee.js +0 -63
- package/dist/cjs/generated/mayachain/models/AffiliateFees.d.ts +0 -32
- package/dist/cjs/generated/mayachain/models/AffiliateFees.js +0 -52
- package/dist/cjs/generated/thorchain/models/AffiliateFee.d.ts +0 -67
- package/dist/cjs/generated/thorchain/models/AffiliateFee.js +0 -63
- package/dist/cjs/generated/thorchain/models/AffiliateFees.d.ts +0 -32
- package/dist/cjs/generated/thorchain/models/AffiliateFees.js +0 -52
- package/dist/cjs/generated/thorchain/models/AffiliateRevenue.d.ts +0 -45
- package/dist/cjs/generated/thorchain/models/AffiliateRevenue.js +0 -57
- package/dist/esm/generated/mayachain/models/AffiliateFee.d.ts +0 -67
- package/dist/esm/generated/mayachain/models/AffiliateFee.js +0 -56
- package/dist/esm/generated/mayachain/models/AffiliateFees.d.ts +0 -32
- package/dist/esm/generated/mayachain/models/AffiliateFees.js +0 -45
- package/dist/esm/generated/thorchain/models/AffiliateFee.d.ts +0 -67
- package/dist/esm/generated/thorchain/models/AffiliateFee.js +0 -56
- package/dist/esm/generated/thorchain/models/AffiliateFees.d.ts +0 -32
- package/dist/esm/generated/thorchain/models/AffiliateFees.js +0 -45
- package/dist/esm/generated/thorchain/models/AffiliateRevenue.d.ts +0 -45
- package/dist/esm/generated/thorchain/models/AffiliateRevenue.js +0 -50
|
@@ -632,7 +632,7 @@ const txParser = new index_1.TransactionParser({
|
|
|
632
632
|
epoch: 0,
|
|
633
633
|
ipfsHash: 'QmYUiUq9UWK5NPF1h2BGdatw95psNtW8seGQpXZYoQYK1s',
|
|
634
634
|
stakingAddress: '0x32DBc9Cf9E8FbCebE1e0a2ecF05Ed86Ca3096Cb6',
|
|
635
|
-
stakingContract: contracts_1.
|
|
635
|
+
stakingContract: contracts_1.RFOX_ARB_PROXY_CONTRACT,
|
|
636
636
|
},
|
|
637
637
|
};
|
|
638
638
|
const actual = await txParser.parse(tx, address);
|
|
@@ -19,7 +19,7 @@ class Parser {
|
|
|
19
19
|
method: 'reward',
|
|
20
20
|
epoch: parseInt(match.groups.epoch, 10),
|
|
21
21
|
stakingAddress: match.groups.stakingAddress,
|
|
22
|
-
stakingContract: stakingContract || contracts_1.
|
|
22
|
+
stakingContract: stakingContract || contracts_1.RFOX_ARB_PROXY_CONTRACT,
|
|
23
23
|
ipfsHash: match.groups.ipfsHash,
|
|
24
24
|
},
|
|
25
25
|
});
|
|
@@ -43,11 +43,11 @@ class TransactionParser extends parser_1.BaseTransactionParser {
|
|
|
43
43
|
}),
|
|
44
44
|
new zrx.Parser({ proxyContract: contracts_1.ZRX_ETHEREUM_PROXY_CONTRACT }),
|
|
45
45
|
new rfox.Parser({
|
|
46
|
-
proxyContract: contracts_1.
|
|
46
|
+
proxyContract: contracts_1.RFOX_ARB_PROXY_CONTRACT,
|
|
47
47
|
stakingAssetId: caip_1.foxOnArbitrumOneAssetId,
|
|
48
48
|
}),
|
|
49
49
|
new rfox.Parser({
|
|
50
|
-
proxyContract: contracts_1.
|
|
50
|
+
proxyContract: contracts_1.RFOX_ARB_UNI_V2_ETH_FOX_PROXY_CONTRACT,
|
|
51
51
|
stakingAssetId: caip_1.uniV2EthFoxArbitrumAssetId,
|
|
52
52
|
}),
|
|
53
53
|
new arbitrumBridge.Parser({
|
|
@@ -24,11 +24,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.TransactionParser = void 0;
|
|
27
|
+
const caip_1 = require("@shapeshiftoss/caip");
|
|
27
28
|
const contracts_1 = require("@shapeshiftoss/contracts");
|
|
28
29
|
const parser_1 = require("../../parser");
|
|
29
30
|
const arbitrumBridge = __importStar(require("../../parser/arbitrumBridge"));
|
|
30
31
|
const erc20 = __importStar(require("../../parser/erc20"));
|
|
31
32
|
const mayachain = __importStar(require("../../parser/mayachain"));
|
|
33
|
+
const rfox = __importStar(require("../../parser/rfox"));
|
|
32
34
|
const thorchain = __importStar(require("../../parser/thorchain"));
|
|
33
35
|
const zrx = __importStar(require("../../parser/zrx"));
|
|
34
36
|
const cowswap = __importStar(require("./cowswap"));
|
|
@@ -53,6 +55,10 @@ class TransactionParser extends parser_1.BaseTransactionParser {
|
|
|
53
55
|
midgardUrl: args.thorMidgardUrl,
|
|
54
56
|
}),
|
|
55
57
|
new zrx.Parser({ proxyContract: contracts_1.ZRX_ETHEREUM_PROXY_CONTRACT }),
|
|
58
|
+
new rfox.Parser({
|
|
59
|
+
proxyContract: contracts_1.RFOX_ETH_PROXY_CONTRACT,
|
|
60
|
+
stakingAssetId: caip_1.foxAssetId,
|
|
61
|
+
}),
|
|
56
62
|
new cowswap.Parser(),
|
|
57
63
|
new arbitrumBridge.Parser({ chainId: this.chainId }),
|
|
58
64
|
]);
|
|
@@ -20,6 +20,9 @@ export interface EstimateGasRequest {
|
|
|
20
20
|
export interface GetAccountRequest {
|
|
21
21
|
pubkey: string;
|
|
22
22
|
}
|
|
23
|
+
export interface GetRfoxStakingDurationRequest {
|
|
24
|
+
address: string;
|
|
25
|
+
}
|
|
23
26
|
export interface GetTransactionRequest {
|
|
24
27
|
txid: string;
|
|
25
28
|
}
|
|
@@ -77,6 +80,18 @@ export declare class V1Api extends runtime.BaseAPI {
|
|
|
77
80
|
* Get information about the running coinstack
|
|
78
81
|
*/
|
|
79
82
|
getInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseInfo>;
|
|
83
|
+
/**
|
|
84
|
+
* Get rFOX staking duration by contract address
|
|
85
|
+
*/
|
|
86
|
+
getRfoxStakingDurationRaw(requestParameters: GetRfoxStakingDurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
87
|
+
[key: string]: number;
|
|
88
|
+
}>>;
|
|
89
|
+
/**
|
|
90
|
+
* Get rFOX staking duration by contract address
|
|
91
|
+
*/
|
|
92
|
+
getRfoxStakingDuration(requestParameters: GetRfoxStakingDurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
93
|
+
[key: string]: number;
|
|
94
|
+
}>;
|
|
80
95
|
/**
|
|
81
96
|
* Get transaction details
|
|
82
97
|
*/
|
|
@@ -162,6 +162,30 @@ class V1Api extends runtime.BaseAPI {
|
|
|
162
162
|
const response = await this.getInfoRaw(initOverrides);
|
|
163
163
|
return await response.value();
|
|
164
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Get rFOX staking duration by contract address
|
|
167
|
+
*/
|
|
168
|
+
async getRfoxStakingDurationRaw(requestParameters, initOverrides) {
|
|
169
|
+
if (requestParameters.address === null || requestParameters.address === undefined) {
|
|
170
|
+
throw new runtime.RequiredError('address', 'Required parameter requestParameters.address was null or undefined when calling getRfoxStakingDuration.');
|
|
171
|
+
}
|
|
172
|
+
const queryParameters = {};
|
|
173
|
+
const headerParameters = {};
|
|
174
|
+
const response = await this.request({
|
|
175
|
+
path: `/api/v1/rfox/staking-duration/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
|
|
176
|
+
method: 'GET',
|
|
177
|
+
headers: headerParameters,
|
|
178
|
+
query: queryParameters,
|
|
179
|
+
}, initOverrides);
|
|
180
|
+
return new runtime.JSONApiResponse(response);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get rFOX staking duration by contract address
|
|
184
|
+
*/
|
|
185
|
+
async getRfoxStakingDuration(requestParameters, initOverrides) {
|
|
186
|
+
const response = await this.getRfoxStakingDurationRaw(requestParameters, initOverrides);
|
|
187
|
+
return await response.value();
|
|
188
|
+
}
|
|
165
189
|
/**
|
|
166
190
|
* Get transaction details
|
|
167
191
|
*/
|
|
@@ -10,17 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { Account,
|
|
13
|
+
import type { Account, EstimateGasRequest, Info, Tx, TxHistory } from '../models';
|
|
14
14
|
export interface EstimateGasOperationRequest {
|
|
15
15
|
body?: EstimateGasRequest;
|
|
16
16
|
}
|
|
17
17
|
export interface GetAccountRequest {
|
|
18
18
|
pubkey: string;
|
|
19
19
|
}
|
|
20
|
-
export interface GetAffiliateFeesRequest {
|
|
21
|
-
start?: string;
|
|
22
|
-
end?: string;
|
|
23
|
-
}
|
|
24
20
|
export interface GetTxRequest {
|
|
25
21
|
txid: string;
|
|
26
22
|
}
|
|
@@ -52,14 +48,6 @@ export declare class V1Api extends runtime.BaseAPI {
|
|
|
52
48
|
* Get account details.
|
|
53
49
|
*/
|
|
54
50
|
getAccount(requestParameters: GetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Account>;
|
|
55
|
-
/**
|
|
56
|
-
* Get ss affiliate fee history.
|
|
57
|
-
*/
|
|
58
|
-
getAffiliateFeesRaw(requestParameters: GetAffiliateFeesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AffiliateFees>>;
|
|
59
|
-
/**
|
|
60
|
-
* Get ss affiliate fee history.
|
|
61
|
-
*/
|
|
62
|
-
getAffiliateFees(requestParameters?: GetAffiliateFeesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AffiliateFees>;
|
|
63
51
|
/**
|
|
64
52
|
* Get information about the running coinstack.
|
|
65
53
|
*/
|
|
@@ -91,33 +91,6 @@ class V1Api extends runtime.BaseAPI {
|
|
|
91
91
|
const response = await this.getAccountRaw(requestParameters, initOverrides);
|
|
92
92
|
return await response.value();
|
|
93
93
|
}
|
|
94
|
-
/**
|
|
95
|
-
* Get ss affiliate fee history.
|
|
96
|
-
*/
|
|
97
|
-
async getAffiliateFeesRaw(requestParameters, initOverrides) {
|
|
98
|
-
const queryParameters = {};
|
|
99
|
-
if (requestParameters.start !== undefined) {
|
|
100
|
-
queryParameters['start'] = requestParameters.start;
|
|
101
|
-
}
|
|
102
|
-
if (requestParameters.end !== undefined) {
|
|
103
|
-
queryParameters['end'] = requestParameters.end;
|
|
104
|
-
}
|
|
105
|
-
const headerParameters = {};
|
|
106
|
-
const response = await this.request({
|
|
107
|
-
path: `/api/v1/affiliate/fees`,
|
|
108
|
-
method: 'GET',
|
|
109
|
-
headers: headerParameters,
|
|
110
|
-
query: queryParameters,
|
|
111
|
-
}, initOverrides);
|
|
112
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.AffiliateFeesFromJSON)(jsonValue));
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Get ss affiliate fee history.
|
|
116
|
-
*/
|
|
117
|
-
async getAffiliateFees(requestParameters = {}, initOverrides) {
|
|
118
|
-
const response = await this.getAffiliateFeesRaw(requestParameters, initOverrides);
|
|
119
|
-
return await response.value();
|
|
120
|
-
}
|
|
121
94
|
/**
|
|
122
95
|
* Get information about the running coinstack.
|
|
123
96
|
*/
|
|
@@ -18,8 +18,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
/* tslint:disable */
|
|
19
19
|
/* eslint-disable */
|
|
20
20
|
__exportStar(require("./Account"), exports);
|
|
21
|
-
__exportStar(require("./AffiliateFee"), exports);
|
|
22
|
-
__exportStar(require("./AffiliateFees"), exports);
|
|
23
21
|
__exportStar(require("./ApiError"), exports);
|
|
24
22
|
__exportStar(require("./Attribute"), exports);
|
|
25
23
|
__exportStar(require("./BadRequestError"), exports);
|
|
@@ -10,21 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { Account,
|
|
13
|
+
import type { Account, EstimateGasRequest, Info, Tx, TxHistory } from '../models';
|
|
14
14
|
export interface EstimateGasOperationRequest {
|
|
15
15
|
body?: EstimateGasRequest;
|
|
16
16
|
}
|
|
17
17
|
export interface GetAccountRequest {
|
|
18
18
|
pubkey: string;
|
|
19
19
|
}
|
|
20
|
-
export interface GetAffiliateFeesRequest {
|
|
21
|
-
start?: string;
|
|
22
|
-
end?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface GetAffiliateRevenueRequest {
|
|
25
|
-
start?: string;
|
|
26
|
-
end?: string;
|
|
27
|
-
}
|
|
28
20
|
export interface GetTxRequest {
|
|
29
21
|
txid: string;
|
|
30
22
|
}
|
|
@@ -56,22 +48,6 @@ export declare class V1Api extends runtime.BaseAPI {
|
|
|
56
48
|
* Get account details.
|
|
57
49
|
*/
|
|
58
50
|
getAccount(requestParameters: GetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Account>;
|
|
59
|
-
/**
|
|
60
|
-
* Get ss affiliate fee history.
|
|
61
|
-
*/
|
|
62
|
-
getAffiliateFeesRaw(requestParameters: GetAffiliateFeesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AffiliateFees>>;
|
|
63
|
-
/**
|
|
64
|
-
* Get ss affiliate fee history.
|
|
65
|
-
*/
|
|
66
|
-
getAffiliateFees(requestParameters?: GetAffiliateFeesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AffiliateFees>;
|
|
67
|
-
/**
|
|
68
|
-
* Get total ss affiliate revenue earned.
|
|
69
|
-
*/
|
|
70
|
-
getAffiliateRevenueRaw(requestParameters: GetAffiliateRevenueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AffiliateRevenue>>;
|
|
71
|
-
/**
|
|
72
|
-
* Get total ss affiliate revenue earned.
|
|
73
|
-
*/
|
|
74
|
-
getAffiliateRevenue(requestParameters?: GetAffiliateRevenueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AffiliateRevenue>;
|
|
75
51
|
/**
|
|
76
52
|
* Get information about the running coinstack.
|
|
77
53
|
*/
|
|
@@ -91,60 +91,6 @@ class V1Api extends runtime.BaseAPI {
|
|
|
91
91
|
const response = await this.getAccountRaw(requestParameters, initOverrides);
|
|
92
92
|
return await response.value();
|
|
93
93
|
}
|
|
94
|
-
/**
|
|
95
|
-
* Get ss affiliate fee history.
|
|
96
|
-
*/
|
|
97
|
-
async getAffiliateFeesRaw(requestParameters, initOverrides) {
|
|
98
|
-
const queryParameters = {};
|
|
99
|
-
if (requestParameters.start !== undefined) {
|
|
100
|
-
queryParameters['start'] = requestParameters.start;
|
|
101
|
-
}
|
|
102
|
-
if (requestParameters.end !== undefined) {
|
|
103
|
-
queryParameters['end'] = requestParameters.end;
|
|
104
|
-
}
|
|
105
|
-
const headerParameters = {};
|
|
106
|
-
const response = await this.request({
|
|
107
|
-
path: `/api/v1/affiliate/fees`,
|
|
108
|
-
method: 'GET',
|
|
109
|
-
headers: headerParameters,
|
|
110
|
-
query: queryParameters,
|
|
111
|
-
}, initOverrides);
|
|
112
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.AffiliateFeesFromJSON)(jsonValue));
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Get ss affiliate fee history.
|
|
116
|
-
*/
|
|
117
|
-
async getAffiliateFees(requestParameters = {}, initOverrides) {
|
|
118
|
-
const response = await this.getAffiliateFeesRaw(requestParameters, initOverrides);
|
|
119
|
-
return await response.value();
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Get total ss affiliate revenue earned.
|
|
123
|
-
*/
|
|
124
|
-
async getAffiliateRevenueRaw(requestParameters, initOverrides) {
|
|
125
|
-
const queryParameters = {};
|
|
126
|
-
if (requestParameters.start !== undefined) {
|
|
127
|
-
queryParameters['start'] = requestParameters.start;
|
|
128
|
-
}
|
|
129
|
-
if (requestParameters.end !== undefined) {
|
|
130
|
-
queryParameters['end'] = requestParameters.end;
|
|
131
|
-
}
|
|
132
|
-
const headerParameters = {};
|
|
133
|
-
const response = await this.request({
|
|
134
|
-
path: `/api/v1/affiliate/revenue`,
|
|
135
|
-
method: 'GET',
|
|
136
|
-
headers: headerParameters,
|
|
137
|
-
query: queryParameters,
|
|
138
|
-
}, initOverrides);
|
|
139
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.AffiliateRevenueFromJSON)(jsonValue));
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Get total ss affiliate revenue earned.
|
|
143
|
-
*/
|
|
144
|
-
async getAffiliateRevenue(requestParameters = {}, initOverrides) {
|
|
145
|
-
const response = await this.getAffiliateRevenueRaw(requestParameters, initOverrides);
|
|
146
|
-
return await response.value();
|
|
147
|
-
}
|
|
148
94
|
/**
|
|
149
95
|
* Get information about the running coinstack.
|
|
150
96
|
*/
|
|
@@ -18,9 +18,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
/* tslint:disable */
|
|
19
19
|
/* eslint-disable */
|
|
20
20
|
__exportStar(require("./Account"), exports);
|
|
21
|
-
__exportStar(require("./AffiliateFee"), exports);
|
|
22
|
-
__exportStar(require("./AffiliateFees"), exports);
|
|
23
|
-
__exportStar(require("./AffiliateRevenue"), exports);
|
|
24
21
|
__exportStar(require("./ApiError"), exports);
|
|
25
22
|
__exportStar(require("./Attribute"), exports);
|
|
26
23
|
__exportStar(require("./BadRequestError"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|