@xchainjs/xchain-thornode 0.1.0-alpha → 0.1.0-alpha2
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/README.md +4 -3
- package/lib/generated/thornodeApi/api.d.ts +102 -6
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -4,7 +4,8 @@ Thornode Module for XChainJS Clients
|
|
|
4
4
|
|
|
5
5
|
## Modules
|
|
6
6
|
|
|
7
|
-
Thornode module has been created using openapi-generator-cli auto-
|
|
7
|
+
Thornode module has been created using openapi-generator-cli to auto-generate rest api reading from "https://thornode.ninerealms.com/thorchain/doc/openapi.yaml"
|
|
8
|
+
This library exposes all the Api's outlined in the swagger doc "https://thornode.ninerealms.com/thorchain/doc"
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
## Installation
|
|
@@ -23,8 +24,8 @@ Request data from MimirApi
|
|
|
23
24
|
const baseUrl = THORNODE_API_9R_URL
|
|
24
25
|
const apiconfig = new Configuration({ basePath: baseUrl })
|
|
25
26
|
const mimirApi = new MimirApi(apiconfig)
|
|
26
|
-
const
|
|
27
|
-
console.log(data)
|
|
27
|
+
const mimirResponse = await mimirApi.mimir()
|
|
28
|
+
console.log(mimirResponse.data)
|
|
28
29
|
|
|
29
30
|
```
|
|
30
31
|
|
|
@@ -829,6 +829,54 @@ export interface Pool {
|
|
|
829
829
|
* @interface ProcessedOutbound
|
|
830
830
|
*/
|
|
831
831
|
export interface ProcessedOutbound {
|
|
832
|
+
/**
|
|
833
|
+
*
|
|
834
|
+
* @type {string}
|
|
835
|
+
* @memberof ProcessedOutbound
|
|
836
|
+
*/
|
|
837
|
+
'chain'?: string;
|
|
838
|
+
/**
|
|
839
|
+
*
|
|
840
|
+
* @type {string}
|
|
841
|
+
* @memberof ProcessedOutbound
|
|
842
|
+
*/
|
|
843
|
+
'to_address'?: string;
|
|
844
|
+
/**
|
|
845
|
+
*
|
|
846
|
+
* @type {string}
|
|
847
|
+
* @memberof ProcessedOutbound
|
|
848
|
+
*/
|
|
849
|
+
'vault_pub_key'?: string;
|
|
850
|
+
/**
|
|
851
|
+
*
|
|
852
|
+
* @type {Coin}
|
|
853
|
+
* @memberof ProcessedOutbound
|
|
854
|
+
*/
|
|
855
|
+
'coin'?: Coin;
|
|
856
|
+
/**
|
|
857
|
+
*
|
|
858
|
+
* @type {string}
|
|
859
|
+
* @memberof ProcessedOutbound
|
|
860
|
+
*/
|
|
861
|
+
'memo'?: string;
|
|
862
|
+
/**
|
|
863
|
+
*
|
|
864
|
+
* @type {Array<Coin>}
|
|
865
|
+
* @memberof ProcessedOutbound
|
|
866
|
+
*/
|
|
867
|
+
'max_gas'?: Array<Coin>;
|
|
868
|
+
/**
|
|
869
|
+
*
|
|
870
|
+
* @type {number}
|
|
871
|
+
* @memberof ProcessedOutbound
|
|
872
|
+
*/
|
|
873
|
+
'gas_rate'?: number;
|
|
874
|
+
/**
|
|
875
|
+
*
|
|
876
|
+
* @type {string}
|
|
877
|
+
* @memberof ProcessedOutbound
|
|
878
|
+
*/
|
|
879
|
+
'in_hash'?: string;
|
|
832
880
|
/**
|
|
833
881
|
*
|
|
834
882
|
* @type {string}
|
|
@@ -873,6 +921,54 @@ export interface Queue {
|
|
|
873
921
|
* @interface ScheduledOutbound
|
|
874
922
|
*/
|
|
875
923
|
export interface ScheduledOutbound {
|
|
924
|
+
/**
|
|
925
|
+
*
|
|
926
|
+
* @type {string}
|
|
927
|
+
* @memberof ScheduledOutbound
|
|
928
|
+
*/
|
|
929
|
+
'chain'?: string;
|
|
930
|
+
/**
|
|
931
|
+
*
|
|
932
|
+
* @type {string}
|
|
933
|
+
* @memberof ScheduledOutbound
|
|
934
|
+
*/
|
|
935
|
+
'to_address'?: string;
|
|
936
|
+
/**
|
|
937
|
+
*
|
|
938
|
+
* @type {string}
|
|
939
|
+
* @memberof ScheduledOutbound
|
|
940
|
+
*/
|
|
941
|
+
'vault_pub_key'?: string;
|
|
942
|
+
/**
|
|
943
|
+
*
|
|
944
|
+
* @type {Coin}
|
|
945
|
+
* @memberof ScheduledOutbound
|
|
946
|
+
*/
|
|
947
|
+
'coin'?: Coin;
|
|
948
|
+
/**
|
|
949
|
+
*
|
|
950
|
+
* @type {string}
|
|
951
|
+
* @memberof ScheduledOutbound
|
|
952
|
+
*/
|
|
953
|
+
'memo'?: string;
|
|
954
|
+
/**
|
|
955
|
+
*
|
|
956
|
+
* @type {Array<Coin>}
|
|
957
|
+
* @memberof ScheduledOutbound
|
|
958
|
+
*/
|
|
959
|
+
'max_gas'?: Array<Coin>;
|
|
960
|
+
/**
|
|
961
|
+
*
|
|
962
|
+
* @type {number}
|
|
963
|
+
* @memberof ScheduledOutbound
|
|
964
|
+
*/
|
|
965
|
+
'gas_rate'?: number;
|
|
966
|
+
/**
|
|
967
|
+
*
|
|
968
|
+
* @type {string}
|
|
969
|
+
* @memberof ScheduledOutbound
|
|
970
|
+
*/
|
|
971
|
+
'in_hash'?: string;
|
|
876
972
|
/**
|
|
877
973
|
*
|
|
878
974
|
* @type {number}
|
|
@@ -2054,7 +2150,7 @@ export declare const TSSApiFp: (configuration?: Configuration | undefined) => {
|
|
|
2054
2150
|
* @param {*} [options] Override http request option.
|
|
2055
2151
|
* @throws {RequiredError}
|
|
2056
2152
|
*/
|
|
2057
|
-
keysignPubkey(height: number, pubkey: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<
|
|
2153
|
+
keysignPubkey(height: number, pubkey: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<Keysign>>;
|
|
2058
2154
|
/**
|
|
2059
2155
|
* Returns keygen and keysign metrics for current vaults.
|
|
2060
2156
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -2069,7 +2165,7 @@ export declare const TSSApiFp: (configuration?: Configuration | undefined) => {
|
|
|
2069
2165
|
* @param {*} [options] Override http request option.
|
|
2070
2166
|
* @throws {RequiredError}
|
|
2071
2167
|
*/
|
|
2072
|
-
metricsKeygen(pubkey: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<
|
|
2168
|
+
metricsKeygen(pubkey: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<Array<KeygenMetric>>>;
|
|
2073
2169
|
};
|
|
2074
2170
|
/**
|
|
2075
2171
|
* TSSApi - factory interface
|
|
@@ -2090,7 +2186,7 @@ export declare const TSSApiFactory: (configuration?: Configuration | undefined,
|
|
|
2090
2186
|
* @param {*} [options] Override http request option.
|
|
2091
2187
|
* @throws {RequiredError}
|
|
2092
2188
|
*/
|
|
2093
|
-
keysignPubkey(height: number, pubkey: string, options?: any): AxiosPromise<
|
|
2189
|
+
keysignPubkey(height: number, pubkey: string, options?: any): AxiosPromise<Keysign>;
|
|
2094
2190
|
/**
|
|
2095
2191
|
* Returns keygen and keysign metrics for current vaults.
|
|
2096
2192
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -2105,7 +2201,7 @@ export declare const TSSApiFactory: (configuration?: Configuration | undefined,
|
|
|
2105
2201
|
* @param {*} [options] Override http request option.
|
|
2106
2202
|
* @throws {RequiredError}
|
|
2107
2203
|
*/
|
|
2108
|
-
metricsKeygen(pubkey: string, height?: number | undefined, options?: any): AxiosPromise<
|
|
2204
|
+
metricsKeygen(pubkey: string, height?: number | undefined, options?: any): AxiosPromise<Array<KeygenMetric>>;
|
|
2109
2205
|
};
|
|
2110
2206
|
/**
|
|
2111
2207
|
* TSSApi - object-oriented interface
|
|
@@ -2130,7 +2226,7 @@ export declare class TSSApi extends BaseAPI {
|
|
|
2130
2226
|
* @throws {RequiredError}
|
|
2131
2227
|
* @memberof TSSApi
|
|
2132
2228
|
*/
|
|
2133
|
-
keysignPubkey(height: number, pubkey: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
2229
|
+
keysignPubkey(height: number, pubkey: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Keysign, any>>;
|
|
2134
2230
|
/**
|
|
2135
2231
|
* Returns keygen and keysign metrics for current vaults.
|
|
2136
2232
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -2147,7 +2243,7 @@ export declare class TSSApi extends BaseAPI {
|
|
|
2147
2243
|
* @throws {RequiredError}
|
|
2148
2244
|
* @memberof TSSApi
|
|
2149
2245
|
*/
|
|
2150
|
-
metricsKeygen(pubkey: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
2246
|
+
metricsKeygen(pubkey: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<KeygenMetric[], any>>;
|
|
2151
2247
|
}
|
|
2152
2248
|
/**
|
|
2153
2249
|
* ThornamesApi - axios parameter creator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thornode",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-alpha2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Thornode module that exposes all thornode functions using openapi-generator-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -29,11 +29,14 @@
|
|
|
29
29
|
"lint": "eslint \"{src,__tests__}/**/*.ts\" --fix --max-warnings 0",
|
|
30
30
|
"prepublishOnly": "yarn run build",
|
|
31
31
|
"test": "jest --passWithNoTests",
|
|
32
|
-
"generate:types": "yarn clean:types:thornode && yarn generate:types:thornode",
|
|
33
|
-
"generate:types:
|
|
32
|
+
"generate:types": "yarn clean:types:thornode && yarn generate:types:convertToJson && yarn generate:types:thornode && yarn clean:types:tempFiles",
|
|
33
|
+
"generate:types:convertToJson": "curl 'https://thornode.ninerealms.com/thorchain/doc/openapi.yaml' > ./input.yaml && yaml2json ./input.yaml --pretty > ./input.json",
|
|
34
|
+
"generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i ./input.json -g typescript-axios -o ./src/generated/thornodeApi --reserved-words-mappings in=in",
|
|
35
|
+
"clean:types:tempFiles": "rimraf ./input.yaml ./input.json",
|
|
34
36
|
"clean:types:thornode": "rimraf ./src/generated/thornodeApi"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
39
|
+
"yamljs": "^0.3.0",
|
|
37
40
|
"@openapitools/openapi-generator-cli": "^2.5.1",
|
|
38
41
|
"rimraf": "~3.0.2"
|
|
39
42
|
},
|