From 20394802489f2c4ed1b826a0baead82d450e668a Mon Sep 17 00:00:00 2001 From: devdanco Date: Mon, 20 Nov 2023 12:52:32 +0100 Subject: [PATCH] feat: add new rpc [only @mangata-finance/type-definitions] --- packages/type-definitions/package.json | 2 +- packages/type-definitions/src/index.ts | 44 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/packages/type-definitions/package.json b/packages/type-definitions/package.json index bcfd9a4..34c626e 100644 --- a/packages/type-definitions/package.json +++ b/packages/type-definitions/package.json @@ -1,6 +1,6 @@ { "name": "@mangata-finance/type-definitions", - "version": "2.0.0", + "version": "2.0.1-feature-3rdparty-rewards-merge.0", "description": "Type definitions for Mangata Finance", "repository": { "type": "git", diff --git a/packages/type-definitions/src/index.ts b/packages/type-definitions/src/index.ts index aee67d1..7003718 100644 --- a/packages/type-definitions/src/index.ts +++ b/packages/type-definitions/src/index.ts @@ -216,6 +216,50 @@ export const mRpc = { params: [], type: "Vec" } + }, + pos: { + calculate_native_rewards_amount: { + description: "Calculates amount of available native rewards", + params: [ + { + name: "account", + type: "AccountId" + }, + { + name: "liquidity_token", + type: "TokenId" + } + ], + type: "Balance" + }, + calculate_3rdparty_rewards_amount: { + description: "Calculates amount of available 3rdparty rewards", + params: [ + { + name: "account", + type: "AccountId" + }, + { + name: "liquidity_token", + type: "TokenId" + }, + { + name: "rewards_token", + type: "TokenId" + } + ], + type: "Balance" + }, + calculate_3rdparty_rewards_all: { + description: "Calculates amount of available 3rdparty rewards", + params: [ + { + name: "account", + type: "AccountId" + } + ], + type: "Balance" + } } };