Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OpenAPI schema #178

Merged
merged 3 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading