Skip to content

Commit

Permalink
Update OpenAPI schema (#178)
Browse files Browse the repository at this point in the history
* Update OpenAPI schema

* update mantra example

* bump v4.0.2

---------

Co-authored-by: Kiln Bot <[email protected]>
Co-authored-by: ilies <[email protected]>
  • Loading branch information
3 people authored Dec 27, 2024
1 parent 890508d commit 6659536
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/mantra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ try {
pubkey: '028dfa6f41c655e38a0f8f2e3f3aa3e1246907a9bb299933f11996e2a345a21e10',
validator: 'mantravaloper146mj09yzu3mvz7pmy4dvs4z9wr2mst7ram37xw',
amount_uom: omToUom('0.01').toString(),
restake_rewards: false,
},
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kilnfi/sdk",
"version": "4.0.1",
"version": "4.0.2",
"autor": "Kiln <[email protected]> (https://kiln.fi)",
"license": "BUSL-1.1",
"description": "JavaScript sdk for Kiln API",
Expand Down
91 changes: 89 additions & 2 deletions src/openapi/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2029,6 +2029,26 @@ export interface paths {
patch?: never;
trace?: never;
};
"/mantra/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 Mantra
*/
post: operations["postMantraRestakeRewardsTx"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/mantra/transaction/unstake": {
parameters: {
query?: never;
Expand Down Expand Up @@ -15239,7 +15259,7 @@ export interface components {
*/
fee: Record<string, never>;
/**
* @description List of messages included in the transaction.
* @description List of messages included in the transaction. The list contains one message for the staking delegation and one more message for rewards restaking in case specified as a parameter (`restake_rewards=true`).
* @example [
* {
* "typeUrl": "/cosmos.staking.v1beta1.MsgDelegate",
Expand All @@ -15251,10 +15271,19 @@ export interface components {
* "amount": "1000000"
* }
* }
* },
* {
* "typeUrl": "/cosmos.staking.v1beta1.StakeAuthorization",
* "allowList": {
* "address": [
* "mantravaloper1qum83utf8833n4f857w98dxc5w8qlnq9eeew4g"
* ]
* },
* "AuthorizationType": 1
* }
* ]
*/
messages: components["schemas"]["MANTRAStakeMessage"][];
messages: (components["schemas"]["MANTRAStakeMessage"] | components["schemas"]["MANTRAStakeMessageRestake"])[];
/**
* @description Chain ID
* @example cosmoshub-4
Expand Down Expand Up @@ -16013,6 +16042,16 @@ export interface components {
* @example 1000000000000000000000000
*/
amount_uom: string;
/**
* @description If enabled, the rewards will be automatically restaked
* @default false
*/
restake_rewards: boolean;
/**
* @description Grantee address, this address is specific to each validator. Kiln grantee addresses are found here: https://github.com/eco-stake/validator-registry/blob/master/Kiln/chains.json https://github.com/eco-stake/validator-registry/blob/master/Interop/chains.json
* @example cosmos1u4whe0pwlgt7q7ph37qxalq2wfq4pkcdze5fmd
*/
grantee_address?: string;
};
MANTRACraftRestakeRewardsTxPayload: {
/**
Expand Down Expand Up @@ -39295,6 +39334,54 @@ export interface operations {
};
};
};
postMantraRestakeRewardsTx: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** @description Transaction to craft */
requestBody: {
content: {
"application/json; charset=utf-8": components["schemas"]["MANTRACraftRestakeRewardsTxPayload"];
};
};
responses: {
/** @description Successful operation */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json; charset=utf-8": {
data: components["schemas"]["MANTRAUnsignedTx"];
};
};
};
/** @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;
};
};
};
postMantraUnstakeTx: {
parameters: {
query?: never;
Expand Down

0 comments on commit 6659536

Please sign in to comment.