Skip to content

Commit 35dd3cb

Browse files
committed
update spec (#130)
1 parent 3a17d8b commit 35dd3cb

File tree

2 files changed

+104
-43
lines changed

2 files changed

+104
-43
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kilnfi/sdk",
3-
"version": "3.0.7",
3+
"version": "3.0.8",
44
"autor": "Kiln <[email protected]> (https://kiln.fi)",
55
"license": "BUSL-1.1",
66
"description": "JavaScript sdk for Kiln API",

src/openapi/schema.ts

Lines changed: 103 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,13 @@ export interface paths {
11631163
*/
11641164
get: operations["getDotOperations"];
11651165
};
1166+
"/v1/dot/reports": {
1167+
/**
1168+
* Reports
1169+
* @description Get reports on Polkadot staking
1170+
*/
1171+
get: operations["getDotReports"];
1172+
};
11661173
"/v1/dot/network-stats": {
11671174
/**
11681175
* Network Stats
@@ -1317,6 +1324,13 @@ export interface paths {
13171324
*/
13181325
get: operations["getKsmOperations"];
13191326
};
1327+
"/v1/ksm/reports": {
1328+
/**
1329+
* Reports
1330+
* @description Get reports on Kusama staking
1331+
*/
1332+
get: operations["getKsmReports"];
1333+
};
13201334
"/v1/ksm/network-stats": {
13211335
/**
13221336
* Network Stats
@@ -3554,8 +3568,9 @@ export interface components {
35543568
* @description Response format. Use `"cli_deposit"` for more information about each key.
35553569
* @default batch_deposit
35563570
* @example cli_deposit
3571+
* @enum {string}
35573572
*/
3558-
format?: string;
3573+
format?: "cli_deposit" | "batch_deposit";
35593574
};
35603575
ETHPostKeysOnChainPayload: {
35613576
/**
@@ -3605,88 +3620,70 @@ export interface components {
36053620
/**
36063621
* @description Format of the key
36073622
* @example cli_deposit
3623+
* @enum {string}
36083624
*/
3609-
format?: string;
3625+
format: "cli_deposit";
36103626
/**
36113627
* @description Public key of the validator
36123628
* @example 8f36e2f4e921b1ed5ce9c94f21e1f26a748ac4e0c57f0d8973e7d576a2f8953b87dd86300de718238de23b1fecb19db5
36133629
*/
3614-
pubkey?: string;
3630+
pubkey: string;
36153631
/**
36163632
* @description Withdrawals credentials of the validator
36173633
* @example 010000000000000000000000e1f4acc0affb36a805474e3b6ab786738c6900a2
36183634
*/
3619-
withdrawal_credentials?: string;
3635+
withdrawal_credentials: string;
36203636
/**
36213637
* @description Amount in GWEI that needs to be deposited to activate the validator
36223638
* @example 32000000000
36233639
*/
3624-
amount?: number;
3640+
amount: number;
36253641
/**
36263642
* @description BLS signature for the deposit data structure required to stake on the Ethereum chain
36273643
* @example b7947eabf631d4772c4014a9fec2ecac2c15fc5175ad83023bbdfc9e6618cb8e78829231477c060bc9339482058ff195141f2aeb801c0329a1a4afebd7e76ce0ba1d9d88f8820d052836a79d59aea673db9eb5009db4a4f6e04fb7ffbdbdd604
36283644
*/
3629-
signature?: string;
3645+
signature: string;
36303646
/**
36313647
* @description Root hash ensuring the deposit message integrity
36323648
* @example 65db6ae73c6465311a7acf2cd8a2863eececf09901872550639f0d8f6c1876f5
36333649
*/
3634-
deposit_message_root?: string;
3650+
deposit_message_root: string;
36353651
/**
36363652
* @description Root hash ensuring the deposit data integrity
36373653
* @example 9b74cccf3a3c501374179be4bb6f505c4b40da41c205a101db3342a8df0af2dd
36383654
*/
3639-
deposit_data_root?: string;
3655+
deposit_data_root: string;
36403656
/**
36413657
* @description Identifier for the fork version
36423658
* @example 00000000
36433659
*/
3644-
fork_version?: string;
3660+
fork_version: string;
36453661
/**
36463662
* @description Ethereum network for the generated validation key(s)
36473663
* @example mainnet
36483664
*/
3649-
network_name?: string;
3665+
network_name: string;
36503666
/**
36513667
* @description Version of the deposit-cli tool used to generate the validation key
36523668
* @example 2.2.0
36533669
*/
3654-
deposit_cli_version?: string;
3670+
deposit_cli_version: string;
36553671
}[];
36563672
ETHPostKeysBatchResponse: {
36573673
/**
36583674
* @description Format of the key
36593675
* @example batch_deposit
3676+
* @enum {string}
36603677
*/
3661-
format?: string;
3662-
/**
3663-
* @description Public keys of the validators
3664-
* @example [
3665-
* "8f36e2f4e921b1ed5ce9c94f21e1f26a748ac4e0c57f0d8973e7d576a2f8953b87dd86300de718238de23b1fecb19db5"
3666-
* ]
3667-
*/
3668-
pubkeys?: string[];
3669-
/**
3670-
* @description Withdrawals credentials of the validators
3671-
* @example [
3672-
* "010000000000000000000000e1f4acc0affb36a805474e3b6ab786738c6900a2"
3673-
* ]
3674-
*/
3675-
withdrawal_credentials?: string[];
3676-
/**
3677-
* @description BLS signatures for the deposit data structure required to stake on the Ethereum chain
3678-
* @example [
3679-
* "b7947eabf631d4772c4014a9fec2ecac2c15fc5175ad83023bbdfc9e6618cb8e78829231477c060bc9339482058ff195141f2aeb801c0329a1a4afebd7e76ce0ba1d9d88f8820d052836a79d59aea673db9eb5009db4a4f6e04fb7ffbdbdd604"
3680-
* ]
3681-
*/
3682-
signatures?: string[];
3683-
/**
3684-
* @description Root hashes ensuring the deposit data integrity
3685-
* @example [
3686-
* "37e329240dd23a4bcd86cd62b97fdf0873b565876f29678e1edbf5514fe344d6"
3687-
* ]
3688-
*/
3689-
deposit_data_roots?: string[];
3678+
format: "batch_deposit";
3679+
/** @description Public keys of the validators */
3680+
pubkeys: string[];
3681+
/** @description Withdrawals credentials of the validators */
3682+
withdrawal_credentials: string[];
3683+
/** @description BLS signatures for the deposit data structure required to stake on the Ethereum chain */
3684+
signatures: string[];
3685+
/** @description Root hashes ensuring the deposit data integrity */
3686+
deposit_data_roots: string[];
36903687
};
36913688
ETHCraftStakeTxPayload: {
36923689
/**
@@ -15127,7 +15124,7 @@ export interface components {
1512715124
* @description Accumulated rewards in USDC during the day
1512815125
* @example 35758910838
1512915126
*/
15130-
rewards_uusdc: string;
15127+
rewards_uusdc?: string;
1513115128
/**
1513215129
* @description Estimated value of USDC rewards generated for that day in USD. The exchange rate is the rate at the end of the day provided by CoinGeckko.
1513315130
* @example 40.12
@@ -25531,7 +25528,7 @@ export interface operations {
2553125528
201: {
2553225529
content: {
2553325530
"application/json; charset=utf-8": {
25534-
data?: components["schemas"]["ETHPostKeysCliResponse"] | components["schemas"]["ETHPostKeysBatchResponse"];
25531+
data: components["schemas"]["ETHPostKeysCliResponse"] | components["schemas"]["ETHPostKeysBatchResponse"];
2553525532
};
2553625533
};
2553725534
};
@@ -30736,6 +30733,38 @@ export interface operations {
3073630733
};
3073730734
};
3073830735
};
30736+
/**
30737+
* Reports
30738+
* @description Get reports on Polkadot staking
30739+
*/
30740+
getDotReports: {
30741+
parameters: {
30742+
query?: {
30743+
addresses?: components["parameters"]["DOTAddressesParam"];
30744+
accounts?: components["parameters"]["AccountsParam"];
30745+
};
30746+
};
30747+
responses: {
30748+
/** @description Successful operation */
30749+
200: {
30750+
content: {
30751+
"application/octet-stream": string;
30752+
};
30753+
};
30754+
/** @description Invalid parameters */
30755+
400: {
30756+
content: never;
30757+
};
30758+
/** @description Unauthorized */
30759+
401: {
30760+
content: never;
30761+
};
30762+
/** @description Internal server error */
30763+
500: {
30764+
content: never;
30765+
};
30766+
};
30767+
};
3073930768
/**
3074030769
* Network Stats
3074130770
* @description Get stats on Polkadot network
@@ -31478,6 +31507,38 @@ export interface operations {
3147831507
};
3147931508
};
3148031509
};
31510+
/**
31511+
* Reports
31512+
* @description Get reports on Kusama staking
31513+
*/
31514+
getKsmReports: {
31515+
parameters: {
31516+
query?: {
31517+
addresses?: components["parameters"]["KSMAddressesParam"];
31518+
accounts?: components["parameters"]["AccountsParam"];
31519+
};
31520+
};
31521+
responses: {
31522+
/** @description Successful operation */
31523+
200: {
31524+
content: {
31525+
"application/octet-stream": string;
31526+
};
31527+
};
31528+
/** @description Invalid parameters */
31529+
400: {
31530+
content: never;
31531+
};
31532+
/** @description Unauthorized */
31533+
401: {
31534+
content: never;
31535+
};
31536+
/** @description Internal server error */
31537+
500: {
31538+
content: never;
31539+
};
31540+
};
31541+
};
3148131542
/**
3148231543
* Network Stats
3148331544
* @description Get stats on Kusama network

0 commit comments

Comments
 (0)