@substrate/api-sidecar
Version:
REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
37 lines (36 loc) • 1.38 kB
TypeScript
import { AccountsVestingInfoService } from '../../../services';
import AbstractController from '../../AbstractController';
/**
* GET vesting information for an address on the relay chain.
*
* Paths:
* - `address`: Address to query.
*
* Query params:
* - (Optional)`at`: Block at which to retrieve vesting information at. Block
* identifier, as the block height or block hash. Defaults to most recent block.
*
* Returns:
* - `at`: Block number and hash at which the call was made.
* - `vesting`: Vesting schedule for an account.
* - `locked`: Number of tokens locked at start.
* - `perBlock`: Number of tokens that gets unlocked every block after `startingBlock`.
* - `startingBlock`: Starting block for unlocking(vesting).
*
* Substrate Reference:
* - Vesting Pallet: https://crates.parity.io/pallet_vesting/index.html
* - `VestingInfo`: https://crates.parity.io/pallet_vesting/struct.VestingInfo.html
*/
export default class RcAccountsVestingInfoController extends AbstractController<AccountsVestingInfoService> {
static controllerName: string;
static requiredPallets: string[][];
constructor(_api: string);
protected initRoutes(): void;
/**
* Get vesting information for an account on the relay chain.
*
* @param req Express Request
* @param res Express Response
*/
private getAccountVestingInfo;
}