From 26fc93d0e6c470e6da5fcde5e00c503435fd81cc Mon Sep 17 00:00:00 2001 From: Kiln Bot Date: Thu, 9 Jan 2025 12:20:17 +0100 Subject: [PATCH] Update OpenAPI schema (#188) * Update OpenAPI schema * bump v4.1.2 --------- Co-authored-by: Kiln Bot Co-authored-by: ilies --- package.json | 2 +- src/openapi/schema.ts | 790 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 790 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d96f6eb..2e23e26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kilnfi/sdk", - "version": "4.1.1", + "version": "4.1.2", "autor": "Kiln (https://kiln.fi)", "license": "BUSL-1.1", "description": "JavaScript sdk for Kiln API", diff --git a/src/openapi/schema.ts b/src/openapi/schema.ts index 2c7668e..19fda0d 100644 --- a/src/openapi/schema.ts +++ b/src/openapi/schema.ts @@ -1865,6 +1865,206 @@ export interface paths { patch?: never; trace?: never; }; + "/cro/balance": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get balance + * @description Get balance of a Cronos account + */ + post: operations["postCroGetBalance"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/stake": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Stake Transaction + * @description Generates a delegate transaction on Cronos + */ + post: operations["postCroStakeTx"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/withdraw-rewards": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Withdraw Rewards Transaction + * @description Generates a withdraw rewards transaction on Cronos + */ + post: operations["postCroWithdrawRewardsTx"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/restake-rewards": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Restake Rewards Transaction + * @description Generates a restake rewards transaction on Cronos + */ + post: operations["postCroRestakeRewardsTx"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/unstake": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Unstake Transaction + * @description Generates an undelegate transaction on Cronos + */ + post: operations["postCroUnstakeTx"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/redelegate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Redelegate Transaction + * @description Generates a redelegate transaction on Cronos to move a stake from a validator to another without going through the 21 days unbonding period. + */ + post: operations["postCroRedelegateTx"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/prepare": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Prepare Transaction + * @description Prepare an unsigned transaction for broadcast by adding signatures to it + */ + post: operations["postCroPrepareTx"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/broadcast": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Broadcast Transaction + * @description Broadcast a signed transaction to the Cronos network + */ + post: operations["postCroBroadcastTx"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Transaction Status + * @description Get the status of a transaction + */ + get: operations["getCroTxStatus"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/cro/transaction/decode": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Transaction Decoding + * @description Decode a transaction + */ + get: operations["getCroTxDecoding"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/om/stakes": { parameters: { query?: never; @@ -6915,6 +7115,26 @@ export interface paths { patch?: never; trace?: never; }; + "/trx/network-stats": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Network Stats + * @description Get some network statistics on Tron staking + */ + get: operations["getTrxNetworkStats"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/trx/stakes": { parameters: { query?: never; @@ -15171,6 +15391,18 @@ export interface components { */ amount_basecro: string; }; + CROGetBalancePayload: { + /** + * @description Wallet address + * @example cro1djqecw6nn5tydxq0shan7srv8j65clsf7vypl6 + */ + address: string; + /** + * @description The denomination of the balance to query + * @example basecro + */ + denom: string; + }; OMStake: { /** * @description Public key of the validator @@ -33453,7 +33685,7 @@ export interface components { */ network_gross_apy: number; /** - * @description Supply of Solana currently staked + * @description Supply of Ton currently staked * @example 12.4 */ supply_staked_percent: number; @@ -33971,6 +34203,39 @@ export interface components { */ tx_serialized: string; }; + TRXNetworkStats: { + /** + * @description TRX price in USD + * @example 0.27 + */ + trx_price_usd: number; + /** + * @description Number of active bakers + * @example 423 + */ + nb_validators: number; + /** + * @description Gross annual percentage yield + * @example 4.5 + */ + network_gross_apy: number; + /** + * @description Supply percentage of Tron currently staked + * @example 47.39 + */ + supply_staked_percent: number; + /** + * @description TRX inflation rate + * @example 5.5 + */ + inflation_rate: number; + /** + * Format: date-time + * @description Last date this data was updated + * @example 2023-01-14T01:13:59Z + */ + updated_at: string; + }; TRXStake: { /** * @description Wallet address @@ -39134,6 +39399,493 @@ export interface operations { }; }; }; + postCroGetBalance: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Account to query */ + requestBody: { + content: { + "application/json; charset=utf-8": components["schemas"]["CROGetBalancePayload"]; + }; + }; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: { + /** + * @description The balance of the account + * @example 1000000 + */ + amount: string; + /** + * @description The denomination of the balance + * @example basecro + */ + denom: string; + }; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + postCroStakeTx: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Transaction to craft */ + requestBody: { + content: { + "application/json; charset=utf-8": components["schemas"]["CROCraftStakeTxPayload"]; + }; + }; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: components["schemas"]["CROStakeUnsignedTx"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + postCroWithdrawRewardsTx: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Transaction to craft */ + requestBody: { + content: { + "application/json; charset=utf-8": components["schemas"]["CROCraftWithdrawRewardsTxPayload"]; + }; + }; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: components["schemas"]["CROUnsignedTx"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + postCroRestakeRewardsTx: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Transaction to craft */ + requestBody: { + content: { + "application/json; charset=utf-8": components["schemas"]["CROCraftRestakeRewardsTxPayload"]; + }; + }; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: components["schemas"]["CROUnsignedTx"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + postCroUnstakeTx: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Transaction to craft */ + requestBody: { + content: { + "application/json; charset=utf-8": components["schemas"]["CROCraftUnstakeTxPayload"]; + }; + }; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: components["schemas"]["CROUnsignedTx"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + postCroRedelegateTx: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Transaction to craft */ + requestBody: { + content: { + "application/json; charset=utf-8": components["schemas"]["CROCraftRedelegateTxPayload"]; + }; + }; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: components["schemas"]["CROUnsignedTx"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + postCroPrepareTx: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Transaction to prepare */ + requestBody: { + content: { + "application/json; charset=utf-8": components["schemas"]["CROPrepareTxPayload"]; + }; + }; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: components["schemas"]["CROSignedTx"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + postCroBroadcastTx: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Transaction to broadcast */ + requestBody: { + content: { + "application/json; charset=utf-8": components["schemas"]["CROBroadcastTxPayload"]; + }; + }; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: components["schemas"]["CROTxHash"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + getCroTxStatus: { + parameters: { + query: { + /** @description Hash of the transaction */ + tx_hash: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data?: components["schemas"]["CROTxStatus"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + getCroTxDecoding: { + parameters: { + query: { + /** @description Raw transaction to decode */ + tx_serialized: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data?: components["schemas"]["CROTxDecoding"]; + }; + }; + }; + /** @description Invalid parameters */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; getOmStakes: { parameters: { query?: { @@ -52097,6 +52849,42 @@ export interface operations { }; }; }; + getTrxNetworkStats: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful operation */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json; charset=utf-8": { + data: components["schemas"]["TRXNetworkStats"]; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; getTrxStakes: { parameters: { query?: {