@pezkuwi/api-derive 16.5.9 → 16.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,7 @@ export declare function identity(instanceId: string, api: DeriveApi): (accountId
33
33
  * console.log(await api.derive.accounts.hasIdentity(ALICE));
34
34
  * ```
35
35
  */
36
- export declare const hasIdentity: (instanceId: string, api: DeriveApi) => (accountId: string | AccountId | Uint8Array) => Observable<DeriveHasIdentity>;
36
+ export declare const hasIdentity: (instanceId: string, api: DeriveApi) => (accountId: string | AccountId | Uint8Array<ArrayBufferLike>) => Observable<DeriveHasIdentity>;
37
37
  /**
38
38
  * @name hasIdentityMulti
39
39
  * @description Checks whether multiple accounts have on chain identities registered.
@@ -28,7 +28,8 @@ export function subscribeFinalizedHeads(instanceId, api) {
28
28
  return api.rpc.chain.subscribeFinalizedHeads().pipe(switchMap((header) => {
29
29
  const endHash = prevHash;
30
30
  const startHash = header.parentHash;
31
- prevHash = header.createdAtHash = header.hash;
31
+ header.createdAtHash = header.hash;
32
+ prevHash = header.hash;
32
33
  return endHash === null || startHash.eq(endHash)
33
34
  ? of(header)
34
35
  : api.derive.chain._getHeaderRange(startHash, endHash, [header]).pipe(switchMap((headers) => from(headers)));
@@ -33,7 +33,7 @@ export declare function identity(instanceId: string, api: DeriveApi): (accountId
33
33
  * console.log(await api.derive.accounts.hasIdentity(ALICE));
34
34
  * ```
35
35
  */
36
- export declare const hasIdentity: (instanceId: string, api: DeriveApi) => (accountId: string | AccountId | Uint8Array) => Observable<DeriveHasIdentity>;
36
+ export declare const hasIdentity: (instanceId: string, api: DeriveApi) => (accountId: string | AccountId | Uint8Array<ArrayBufferLike>) => Observable<DeriveHasIdentity>;
37
37
  /**
38
38
  * @name hasIdentityMulti
39
39
  * @description Checks whether multiple accounts have on chain identities registered.
@@ -32,7 +32,8 @@ function subscribeFinalizedHeads(instanceId, api) {
32
32
  return api.rpc.chain.subscribeFinalizedHeads().pipe((0, rxjs_1.switchMap)((header) => {
33
33
  const endHash = prevHash;
34
34
  const startHash = header.parentHash;
35
- prevHash = header.createdAtHash = header.hash;
35
+ header.createdAtHash = header.hash;
36
+ prevHash = header.hash;
36
37
  return endHash === null || startHash.eq(endHash)
37
38
  ? (0, rxjs_1.of)(header)
38
39
  : api.derive.chain._getHeaderRange(startHash, endHash, [header]).pipe((0, rxjs_1.switchMap)((headers) => (0, rxjs_1.from)(headers)));
@@ -21,4 +21,4 @@ export declare function preimages(instanceId: string, api: DeriveApi): (hashes:
21
21
  * const preimage = await api.derive.democracy.preimage(HASH);
22
22
  * ```
23
23
  */
24
- export declare const preimage: (instanceId: string, api: DeriveApi) => (hash: string | Uint8Array | Hash | PezframeSupportPreimagesBounded) => Observable<DeriveProposalImage | undefined>;
24
+ export declare const preimage: (instanceId: string, api: DeriveApi) => (hash: string | Uint8Array<ArrayBufferLike> | Hash | PezframeSupportPreimagesBounded) => Observable<DeriveProposalImage | undefined>;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageInfo = void 0;
4
- exports.packageInfo = { name: '@pezkuwi/api-derive', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '16.5.9' };
4
+ exports.packageInfo = { name: '@pezkuwi/api-derive', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '16.5.10' };
@@ -28,4 +28,4 @@ export declare function accounts(instanceId: string, api: DeriveApi): (accountId
28
28
  * console.log(accountStakingData);
29
29
  * ```
30
30
  */
31
- export declare const account: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, opts?: StakingQueryFlags | undefined) => Observable<DeriveStakingAccount>;
31
+ export declare const account: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, opts?: StakingQueryFlags | undefined) => Observable<DeriveStakingAccount>;
@@ -16,7 +16,7 @@ import type { DeriveStakingKeys } from './types.js';
16
16
  * );
17
17
  * ```
18
18
  */
19
- export declare const keys: (instanceId: string, api: DeriveApi) => (stashId: string | Uint8Array) => Observable<DeriveStakingKeys>;
19
+ export declare const keys: (instanceId: string, api: DeriveApi) => (stashId: string | Uint8Array<ArrayBufferLike>) => Observable<DeriveStakingKeys>;
20
20
  /**
21
21
  * @name keysMulti
22
22
  * @description Retrieves session keys for multiple stash accounts.
@@ -20,7 +20,7 @@ export declare function _ownExposures(instanceId: string, api: DeriveApi): (acco
20
20
  * console.log(JSON.stringify(exposure));
21
21
  * ```
22
22
  */
23
- export declare const ownExposure: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, era: EraIndex, page?: u32 | AnyNumber | undefined) => Observable<DeriveOwnExposure>;
23
+ export declare const ownExposure: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, era: EraIndex, page?: u32 | AnyNumber | undefined) => Observable<DeriveOwnExposure>;
24
24
  /**
25
25
  * @name ownExposures
26
26
  * @description Retrieves staking exposures for a validator across multiple historical eras.
@@ -17,7 +17,7 @@ export declare function _ownSlashes(instanceId: string, api: DeriveApi): (accoun
17
17
  * console.log(`Era: ${slashedAmount.era}, total ${slashedAmount.total}`);
18
18
  * ```
19
19
  */
20
- export declare const ownSlash: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, era: EraIndex) => Observable<DeriveStakerSlashes>;
20
+ export declare const ownSlash: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, era: EraIndex) => Observable<DeriveStakerSlashes>;
21
21
  /**
22
22
  * @name ownSlashes
23
23
  * @description Retrieves the slashes for a specific account across all historic eras.
@@ -16,7 +16,7 @@ import type { DeriveApi, DeriveStakingQuery, StakingQueryFlags } from '../types.
16
16
  * );
17
17
  * ```
18
18
  */
19
- export declare const query: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, flags: StakingQueryFlags, page?: u32 | undefined) => Observable<DeriveStakingQuery>;
19
+ export declare const query: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, flags: StakingQueryFlags, page?: u32 | undefined) => Observable<DeriveStakingQuery>;
20
20
  /**
21
21
  * @name queryMulti
22
22
  * @param { (Uint8Array | string)[] } accountIds List of stash accounts to query.
@@ -30,4 +30,4 @@ export declare function stakerExposures(instanceId: string, api: DeriveApi): (ac
30
30
  * );
31
31
  * ```
32
32
  */
33
- export declare const stakerExposure: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, withActive?: boolean | undefined) => Observable<DeriveStakerExposure[]>;
33
+ export declare const stakerExposure: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, withActive?: boolean | undefined) => Observable<DeriveStakerExposure[]>;
@@ -17,7 +17,7 @@ export declare function _stakerRewards(instanceId: string, api: DeriveApi): (acc
17
17
  * );
18
18
  * ```
19
19
  */
20
- export declare const stakerRewards: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, withActive?: boolean | undefined) => Observable<DeriveStakerReward[]>;
20
+ export declare const stakerRewards: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, withActive?: boolean | undefined) => Observable<DeriveStakerReward[]>;
21
21
  /**
22
22
  * @name stakerRewardsMultiEras
23
23
  * @description Staking rewards for multiple stakers over specific eras.
@@ -21,4 +21,4 @@ export declare function preimages(instanceId: string, api: DeriveApi): (hashes:
21
21
  * const preimage = await api.derive.democracy.preimage(HASH);
22
22
  * ```
23
23
  */
24
- export declare const preimage: (instanceId: string, api: DeriveApi) => (hash: string | Uint8Array | Hash | PezframeSupportPreimagesBounded) => Observable<DeriveProposalImage | undefined>;
24
+ export declare const preimage: (instanceId: string, api: DeriveApi) => (hash: string | Uint8Array<ArrayBufferLike> | Hash | PezframeSupportPreimagesBounded) => Observable<DeriveProposalImage | undefined>;
package/package.json CHANGED
@@ -18,8 +18,8 @@
18
18
  "./cjs/packageDetect.js"
19
19
  ],
20
20
  "type": "module",
21
- "version": "16.5.9",
22
- "main": "./cjs/cjs/index.js",
21
+ "version": "16.5.10",
22
+ "main": "./cjs/index.js",
23
23
  "module": "./cjs/index.js",
24
24
  "types": "./cjs/index.d.ts",
25
25
  "exports": {
package/packageInfo.js CHANGED
@@ -1 +1 @@
1
- export const packageInfo = { name: '@pezkuwi/api-derive', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '16.5.9' };
1
+ export const packageInfo = { name: '@pezkuwi/api-derive', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '16.5.10' };
@@ -28,4 +28,4 @@ export declare function accounts(instanceId: string, api: DeriveApi): (accountId
28
28
  * console.log(accountStakingData);
29
29
  * ```
30
30
  */
31
- export declare const account: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, opts?: StakingQueryFlags | undefined) => Observable<DeriveStakingAccount>;
31
+ export declare const account: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, opts?: StakingQueryFlags | undefined) => Observable<DeriveStakingAccount>;
package/staking/keys.d.ts CHANGED
@@ -16,7 +16,7 @@ import type { DeriveStakingKeys } from './types.js';
16
16
  * );
17
17
  * ```
18
18
  */
19
- export declare const keys: (instanceId: string, api: DeriveApi) => (stashId: string | Uint8Array) => Observable<DeriveStakingKeys>;
19
+ export declare const keys: (instanceId: string, api: DeriveApi) => (stashId: string | Uint8Array<ArrayBufferLike>) => Observable<DeriveStakingKeys>;
20
20
  /**
21
21
  * @name keysMulti
22
22
  * @description Retrieves session keys for multiple stash accounts.
@@ -20,7 +20,7 @@ export declare function _ownExposures(instanceId: string, api: DeriveApi): (acco
20
20
  * console.log(JSON.stringify(exposure));
21
21
  * ```
22
22
  */
23
- export declare const ownExposure: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, era: EraIndex, page?: u32 | AnyNumber | undefined) => Observable<DeriveOwnExposure>;
23
+ export declare const ownExposure: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, era: EraIndex, page?: u32 | AnyNumber | undefined) => Observable<DeriveOwnExposure>;
24
24
  /**
25
25
  * @name ownExposures
26
26
  * @description Retrieves staking exposures for a validator across multiple historical eras.
@@ -17,7 +17,7 @@ export declare function _ownSlashes(instanceId: string, api: DeriveApi): (accoun
17
17
  * console.log(`Era: ${slashedAmount.era}, total ${slashedAmount.total}`);
18
18
  * ```
19
19
  */
20
- export declare const ownSlash: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, era: EraIndex) => Observable<DeriveStakerSlashes>;
20
+ export declare const ownSlash: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, era: EraIndex) => Observable<DeriveStakerSlashes>;
21
21
  /**
22
22
  * @name ownSlashes
23
23
  * @description Retrieves the slashes for a specific account across all historic eras.
@@ -16,7 +16,7 @@ import type { DeriveApi, DeriveStakingQuery, StakingQueryFlags } from '../types.
16
16
  * );
17
17
  * ```
18
18
  */
19
- export declare const query: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, flags: StakingQueryFlags, page?: u32 | undefined) => Observable<DeriveStakingQuery>;
19
+ export declare const query: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, flags: StakingQueryFlags, page?: u32 | undefined) => Observable<DeriveStakingQuery>;
20
20
  /**
21
21
  * @name queryMulti
22
22
  * @param { (Uint8Array | string)[] } accountIds List of stash accounts to query.
@@ -30,4 +30,4 @@ export declare function stakerExposures(instanceId: string, api: DeriveApi): (ac
30
30
  * );
31
31
  * ```
32
32
  */
33
- export declare const stakerExposure: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, withActive?: boolean | undefined) => Observable<DeriveStakerExposure[]>;
33
+ export declare const stakerExposure: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, withActive?: boolean | undefined) => Observable<DeriveStakerExposure[]>;
@@ -17,7 +17,7 @@ export declare function _stakerRewards(instanceId: string, api: DeriveApi): (acc
17
17
  * );
18
18
  * ```
19
19
  */
20
- export declare const stakerRewards: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array, withActive?: boolean | undefined) => Observable<DeriveStakerReward[]>;
20
+ export declare const stakerRewards: (instanceId: string, api: DeriveApi) => (accountId: string | Uint8Array<ArrayBufferLike>, withActive?: boolean | undefined) => Observable<DeriveStakerReward[]>;
21
21
  /**
22
22
  * @name stakerRewardsMultiEras
23
23
  * @description Staking rewards for multiple stakers over specific eras.