Api-Derives documentation generator (#6099)
* Initial Readme * Initial Readme * expand accounts derive docs * parse and render derives documentation * write to docs/derives * Add code docs * Lint * Temporarily simplify derives Readme * Remove unnecesary export * Regenerate yarn.lock * Improve Derives description
This commit is contained in:
@@ -14,7 +14,7 @@ import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name accountId
|
||||
* @param {(Address | AccountId | AccountIndex | string | null)} address - An accounts address in various formats.
|
||||
* @param {(Address | AccountId | AccountIndex | string | null)} address An accounts address in various formats.
|
||||
* @description An [[AccountId]]
|
||||
*/
|
||||
export function accountId (instanceId: string, api: DeriveApi): (address?: Address | AccountId | AccountIndex | string | null) => Observable<AccountId> {
|
||||
|
||||
@@ -29,7 +29,7 @@ function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string
|
||||
|
||||
/**
|
||||
* @name info
|
||||
* @description Returns aux. info with regards to an account, current that includes the accountId, accountIndex and nickname
|
||||
* @description Returns aux. info with regards to an account, current that includes the accountId, accountIndex, identity and nickname
|
||||
*/
|
||||
export function info (instanceId: string, api: DeriveApi): (address?: AccountIndex | AccountId | Address | Uint8Array | string | null) => Observable<DeriveAccountInfo> {
|
||||
return memo(instanceId, (address?: AccountIndex | AccountId | Address | Uint8Array | string | null): Observable<DeriveAccountInfo> =>
|
||||
|
||||
@@ -64,6 +64,9 @@ function parseResult (api: DeriveApi, sessionInfo: DeriveSessionInfo, keys: Deri
|
||||
}
|
||||
|
||||
/**
|
||||
* @name accounts
|
||||
* @param {(Uint8Array | string)[]} accountIds List of account stashes
|
||||
* @param {StakingQueryFlags} opts optional filtering flag
|
||||
* @description From a list of stashes, fill in all the relevant staking details
|
||||
*/
|
||||
export function accounts (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], opts?: StakingQueryFlags) => Observable<DeriveStakingAccount[]> {
|
||||
@@ -84,6 +87,9 @@ export function accounts (instanceId: string, api: DeriveApi): (accountIds: (Uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @name account
|
||||
* @param {(Uint8Array | string)} accountId AccountId of the stash
|
||||
* @param {StakingQueryFlags} opts optional filtering flag
|
||||
* @description From a stash, retrieve the controllerId and fill in all the relevant staking details
|
||||
*/
|
||||
export const account = /*#__PURE__*/ firstMemo(
|
||||
|
||||
Reference in New Issue
Block a user