518 lines
14 KiB
Markdown
518 lines
14 KiB
Markdown
|
|
|
|
# Hierarchy
|
|
|
|
[ApiBase](_base_.apibase.md)
|
|
|
|
**↳ ApiQueries**
|
|
|
|
↳ [ApiCalls](_calls_.apicalls.md)
|
|
|
|
# Constructors
|
|
|
|
<a id="constructor"></a>
|
|
|
|
## constructor
|
|
|
|
⊕ **new ApiQueries**(api: *`RxApiInterface`*): [ApiQueries](_queries_.apiqueries.md)
|
|
|
|
*Inherited from [ApiBase](_base_.apibase.md).[constructor](_base_.apibase.md#constructor)*
|
|
|
|
*Defined in [Base.ts:22](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Base.ts#L22)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| api | `RxApiInterface` |
|
|
|
|
**Returns:** [ApiQueries](_queries_.apiqueries.md)
|
|
|
|
___
|
|
|
|
# Properties
|
|
|
|
<a id="api"></a>
|
|
|
|
## `<Protected>` api
|
|
|
|
**● api**: *`RxApiInterface`*
|
|
|
|
*Inherited from [ApiBase](_base_.apibase.md).[api](_base_.apibase.md#api)*
|
|
|
|
*Defined in [Base.ts:22](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Base.ts#L22)*
|
|
|
|
___
|
|
|
|
# Methods
|
|
|
|
<a id="combine"></a>
|
|
|
|
## `<Protected>` combine
|
|
|
|
▸ **combine**<`T`,`R`>(observables: *`Array`<`Observable`<`any`>>*, mapfn?: *`MapFn`<`R`, `T`>*): `Observable`<`T`>
|
|
|
|
*Inherited from [ApiBase](_base_.apibase.md).[combine](_base_.apibase.md#combine)*
|
|
|
|
*Defined in [Base.ts:28](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Base.ts#L28)*
|
|
|
|
**Type parameters:**
|
|
|
|
#### T
|
|
#### R
|
|
**Parameters:**
|
|
|
|
| Param | Type | Default value |
|
|
| ------ | ------ | ------ |
|
|
| observables | `Array`<`Observable`<`any`>> | - |
|
|
| `Default value` mapfn | `MapFn`<`R`, `T`> | defaultMapFn |
|
|
|
|
**Returns:** `Observable`<`T`>
|
|
|
|
___
|
|
<a id="democacyvoteof"></a>
|
|
|
|
## democacyVoteOf
|
|
|
|
▸ **democacyVoteOf**(index: * `ReferendumIndex` | `BN` | `number`*, address: * `AccountId` | `string`*): `Observable`<`Bool`>
|
|
|
|
*Defined in [Queries.ts:76](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L76)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| index | `ReferendumIndex` | `BN` | `number`|
|
|
| address | `AccountId` | `string`|
|
|
|
|
**Returns:** `Observable`<`Bool`>
|
|
|
|
___
|
|
<a id="democacyvotersfor"></a>
|
|
|
|
## democacyVotersFor
|
|
|
|
▸ **democacyVotersFor**(index: * `ReferendumIndex` | `BN` | `number`*): `Observable`<`Array`<`AccountId`>>
|
|
|
|
*Defined in [Queries.ts:80](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L80)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| index | `ReferendumIndex` | `BN` | `number`|
|
|
|
|
**Returns:** `Observable`<`Array`<`AccountId`>>
|
|
|
|
___
|
|
<a id="democracylaunchperiod"></a>
|
|
|
|
## democracyLaunchPeriod
|
|
|
|
▸ **democracyLaunchPeriod**(): `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:19](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L19)*
|
|
|
|
**Returns:** `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
___
|
|
<a id="democracynexttally"></a>
|
|
|
|
## democracyNextTally
|
|
|
|
▸ **democracyNextTally**(): `Observable`< `ReferendumIndex` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:23](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L23)*
|
|
|
|
**Returns:** `Observable`< `ReferendumIndex` | `undefined`>
|
|
|
|
___
|
|
<a id="democracyproposaldeposits"></a>
|
|
|
|
## democracyProposalDeposits
|
|
|
|
▸ **democracyProposalDeposits**(proposalId: * `PropIndex` | `BN` | `number`*): `Observable`< [RxProposalDeposits](_classes_.rxproposaldeposits.md) | `undefined`>
|
|
|
|
*Defined in [Queries.ts:27](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L27)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| proposalId | `PropIndex` | `BN` | `number`|
|
|
|
|
**Returns:** `Observable`< [RxProposalDeposits](_classes_.rxproposaldeposits.md) | `undefined`>
|
|
|
|
___
|
|
<a id="democracypublicproposals"></a>
|
|
|
|
## democracyPublicProposals
|
|
|
|
▸ **democracyPublicProposals**(): `Observable`<`Array`<[RxProposal](_classes_.rxproposal.md)>>
|
|
|
|
*Defined in [Queries.ts:40](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L40)*
|
|
|
|
**Returns:** `Observable`<`Array`<[RxProposal](_classes_.rxproposal.md)>>
|
|
|
|
___
|
|
<a id="democracyreferendumcount"></a>
|
|
|
|
## democracyReferendumCount
|
|
|
|
▸ **democracyReferendumCount**(): `Observable`< `ReferendumIndex` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:59](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L59)*
|
|
|
|
**Returns:** `Observable`< `ReferendumIndex` | `undefined`>
|
|
|
|
___
|
|
<a id="democracyreferenduminfoof"></a>
|
|
|
|
## democracyReferendumInfoOf
|
|
|
|
▸ **democracyReferendumInfoOf**(referendumId: * `ReferendumIndex` | `BN` | `number`*): `Observable`< [RxReferendum](_classes_.rxreferendum.md) | `undefined`>
|
|
|
|
*Defined in [Queries.ts:63](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L63)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| referendumId | `ReferendumIndex` | `BN` | `number`|
|
|
|
|
**Returns:** `Observable`< [RxReferendum](_classes_.rxreferendum.md) | `undefined`>
|
|
|
|
___
|
|
<a id="democracyvotingperiod"></a>
|
|
|
|
## democracyVotingPeriod
|
|
|
|
▸ **democracyVotingPeriod**(): `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:91](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L91)*
|
|
|
|
**Returns:** `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
___
|
|
<a id="eralastlengthchange"></a>
|
|
|
|
## eraLastLengthChange
|
|
|
|
▸ **eraLastLengthChange**(): `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:116](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L116)*
|
|
|
|
**Returns:** `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
___
|
|
<a id="fees"></a>
|
|
|
|
## fees
|
|
|
|
▸ **fees**(): `Observable`<[RxFees](../modules/_types_d_.md#rxfees)>
|
|
|
|
*Defined in [Queries.ts:95](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L95)*
|
|
|
|
**Returns:** `Observable`<[RxFees](../modules/_types_d_.md#rxfees)>
|
|
|
|
___
|
|
<a id="isconnected"></a>
|
|
|
|
## isConnected
|
|
|
|
▸ **isConnected**(): `Observable`<`boolean`>
|
|
|
|
*Inherited from [ApiBase](_base_.apibase.md).[isConnected](_base_.apibase.md#isconnected)*
|
|
|
|
*Defined in [Base.ts:36](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Base.ts#L36)*
|
|
|
|
**Returns:** `Observable`<`boolean`>
|
|
|
|
___
|
|
<a id="rawcall"></a>
|
|
|
|
## rawCall
|
|
|
|
▸ **rawCall**<`T`>(__namedParameters: *`object`*, ...params: *`Array`<`any`>*): `Observable`<`T`>
|
|
|
|
*Inherited from [ApiBase](_base_.apibase.md).[rawCall](_base_.apibase.md#rawcall)*
|
|
|
|
*Defined in [Base.ts:40](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Base.ts#L40)*
|
|
|
|
**Type parameters:**
|
|
|
|
#### T
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| __namedParameters | `object` |
|
|
| `Rest` params | `Array`<`any`> |
|
|
|
|
**Returns:** `Observable`<`T`>
|
|
|
|
___
|
|
<a id="rawstorage"></a>
|
|
|
|
## rawStorage
|
|
|
|
▸ **rawStorage**<`T`>(key: *`StorageFunction`*, ...params: *`Array`<`any`>*): `Observable`<`T`>
|
|
|
|
*Inherited from [ApiBase](_base_.apibase.md).[rawStorage](_base_.apibase.md#rawstorage)*
|
|
|
|
*Defined in [Base.ts:52](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Base.ts#L52)*
|
|
|
|
**Type parameters:**
|
|
|
|
#### T
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| key | `StorageFunction` |
|
|
| `Rest` params | `Array`<`any`> |
|
|
|
|
**Returns:** `Observable`<`T`>
|
|
|
|
___
|
|
<a id="rawstoragemulti"></a>
|
|
|
|
## rawStorageMulti
|
|
|
|
▸ **rawStorageMulti**<`T`>(...keys: *`Array`< [`StorageFunction`] | [`StorageFunction`, `any`]>*): `Observable`<`T`>
|
|
|
|
*Inherited from [ApiBase](_base_.apibase.md).[rawStorageMulti](_base_.apibase.md#rawstoragemulti)*
|
|
|
|
*Defined in [Base.ts:63](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Base.ts#L63)*
|
|
|
|
**Type parameters:**
|
|
|
|
#### T
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| `Rest` keys | `Array`< [`StorageFunction`] | [`StorageFunction`, `any`]> |
|
|
|
|
**Returns:** `Observable`<`T`>
|
|
|
|
___
|
|
<a id="sessioncurrentindex"></a>
|
|
|
|
## sessionCurrentIndex
|
|
|
|
▸ **sessionCurrentIndex**(): `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:128](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L128)*
|
|
|
|
**Returns:** `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
___
|
|
<a id="sessioncurrentstart"></a>
|
|
|
|
## sessionCurrentStart
|
|
|
|
▸ **sessionCurrentStart**(): `Observable`< `Moment` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:132](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L132)*
|
|
|
|
**Returns:** `Observable`< `Moment` | `undefined`>
|
|
|
|
___
|
|
<a id="sessionlastlengthchange"></a>
|
|
|
|
## sessionLastLengthChange
|
|
|
|
▸ **sessionLastLengthChange**(): `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:136](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L136)*
|
|
|
|
**Returns:** `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
___
|
|
<a id="sessionlength"></a>
|
|
|
|
## sessionLength
|
|
|
|
▸ **sessionLength**(): `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:140](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L140)*
|
|
|
|
**Returns:** `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
___
|
|
<a id="sessionreward"></a>
|
|
|
|
## sessionReward
|
|
|
|
▸ **sessionReward**(): `Observable`< `Perbill` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:120](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L120)*
|
|
|
|
**Returns:** `Observable`< `Perbill` | `undefined`>
|
|
|
|
___
|
|
<a id="sessionrewardcurrent"></a>
|
|
|
|
## sessionRewardCurrent
|
|
|
|
▸ **sessionRewardCurrent**(): `Observable`< `Balance` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:124](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L124)*
|
|
|
|
**Returns:** `Observable`< `Balance` | `undefined`>
|
|
|
|
___
|
|
<a id="sessionvalidators"></a>
|
|
|
|
## sessionValidators
|
|
|
|
▸ **sessionValidators**(): `Observable`<`Array`<`AccountId`>>
|
|
|
|
*Defined in [Queries.ts:148](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L148)*
|
|
|
|
**Returns:** `Observable`<`Array`<`AccountId`>>
|
|
|
|
___
|
|
<a id="sessionsperera"></a>
|
|
|
|
## sessionsPerEra
|
|
|
|
▸ **sessionsPerEra**(): `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:144](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L144)*
|
|
|
|
**Returns:** `Observable`< `BlockNumber` | `undefined`>
|
|
|
|
___
|
|
<a id="stakingfreebalanceof"></a>
|
|
|
|
## stakingFreeBalanceOf
|
|
|
|
▸ **stakingFreeBalanceOf**(address: * `AccountId` | `string`*): `Observable`< `Balance` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:171](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L171)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| address | `AccountId` | `string`|
|
|
|
|
**Returns:** `Observable`< `Balance` | `undefined`>
|
|
|
|
___
|
|
<a id="stakingintentions"></a>
|
|
|
|
## stakingIntentions
|
|
|
|
▸ **stakingIntentions**(): `Observable`<`Array`<`AccountId`>>
|
|
|
|
*Defined in [Queries.ts:159](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L159)*
|
|
|
|
**Returns:** `Observable`<`Array`<`AccountId`>>
|
|
|
|
___
|
|
<a id="stakingnominating"></a>
|
|
|
|
## stakingNominating
|
|
|
|
▸ **stakingNominating**(address: * `AccountId` | `string`*): `Observable`< `AccountId` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:186](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L186)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| address | `AccountId` | `string`|
|
|
|
|
**Returns:** `Observable`< `AccountId` | `undefined`>
|
|
|
|
___
|
|
<a id="stakingnominatorsfor"></a>
|
|
|
|
## stakingNominatorsFor
|
|
|
|
▸ **stakingNominatorsFor**(address: * `AccountId` | `string`*): `Observable`<`Array`<`AccountId`>>
|
|
|
|
*Defined in [Queries.ts:175](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L175)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| address | `AccountId` | `string`|
|
|
|
|
**Returns:** `Observable`<`Array`<`AccountId`>>
|
|
|
|
___
|
|
<a id="stakingreservedbalanceof"></a>
|
|
|
|
## stakingReservedBalanceOf
|
|
|
|
▸ **stakingReservedBalanceOf**(address: * `AccountId` | `string`*): `Observable`< `Balance` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:191](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L191)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| address | `AccountId` | `string`|
|
|
|
|
**Returns:** `Observable`< `Balance` | `undefined`>
|
|
|
|
___
|
|
<a id="systemaccountindexof"></a>
|
|
|
|
## systemAccountIndexOf
|
|
|
|
▸ **systemAccountIndexOf**(address: * `AccountId` | `string`*): `Observable`< `Index` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:203](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L203)*
|
|
|
|
**Parameters:**
|
|
|
|
| Param | Type |
|
|
| ------ | ------ |
|
|
| address | `AccountId` | `string`|
|
|
|
|
**Returns:** `Observable`< `Index` | `undefined`>
|
|
|
|
___
|
|
<a id="timestampblockperiod"></a>
|
|
|
|
## timestampBlockPeriod
|
|
|
|
▸ **timestampBlockPeriod**(): `Observable`< `Moment` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:195](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L195)*
|
|
|
|
**Returns:** `Observable`< `Moment` | `undefined`>
|
|
|
|
___
|
|
<a id="timestampnow"></a>
|
|
|
|
## timestampNow
|
|
|
|
▸ **timestampNow**(): `Observable`< `Moment` | `undefined`>
|
|
|
|
*Defined in [Queries.ts:199](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L199)*
|
|
|
|
**Returns:** `Observable`< `Moment` | `undefined`>
|
|
|
|
___
|
|
<a id="validatorcount"></a>
|
|
|
|
## validatorCount
|
|
|
|
▸ **validatorCount**(): `Observable`<`u32`>
|
|
|
|
*Defined in [Queries.ts:207](https://github.com/polkadot-js/api/blob/876c34c/packages/api-observable/src/Queries.ts#L207)*
|
|
|
|
**Returns:** `Observable`<`u32`>
|
|
|
|
___
|
|
|