1 | import { ECPoint, UInt160 } from '@neo-one/client-common';
|
2 | import { Account, StateTransaction, Transaction, Validator, ValidatorKey, ValidatorsCount, ValidatorsCountUpdate, ValidatorUpdate } from '@neo-one/node-core';
|
3 | import BN from 'bn.js';
|
4 | import { Blockchain } from './Blockchain';
|
5 | export interface AccountChanges {
|
6 | [hash: string]: readonly ECPoint[];
|
7 | }
|
8 | export interface ValidatorVotesChanges {
|
9 | [hash: string]: BN;
|
10 | }
|
11 | export interface ValidatorRegisteredChanges {
|
12 | [hash: string]: boolean;
|
13 | }
|
14 | interface ValidatorChange {
|
15 | readonly registered?: boolean;
|
16 | readonly votes?: BN;
|
17 | }
|
18 | export interface ValidatorChanges {
|
19 | [hash: string]: ValidatorChange;
|
20 | }
|
21 | export declare type ValidatorsCountChanges = BN[];
|
22 | export declare const getDescriptorChanges: ({ transactions, getAccount, governingTokenHash, }: {
|
23 | readonly transactions: readonly StateTransaction[];
|
24 | readonly getAccount: (hash: UInt160) => Promise<Account>;
|
25 | readonly governingTokenHash: string;
|
26 | }) => Promise<{
|
27 | readonly accountChanges: AccountChanges;
|
28 | readonly validatorChanges: ValidatorChanges;
|
29 | readonly validatorsCountChanges: BN[];
|
30 | }>;
|
31 | export declare const processStateTransaction: ({ validatorChanges, validatorsCountChanges, tryGetValidatorsCount, addValidatorsCount, updateValidatorsCount, tryGetValidator, addValidator, deleteValidator, updateValidator, }: {
|
32 | readonly validatorChanges: ValidatorChanges;
|
33 | readonly validatorsCountChanges: BN[];
|
34 | readonly tryGetValidatorsCount: () => Promise<ValidatorsCount | undefined>;
|
35 | readonly addValidatorsCount: (validatorsCount: ValidatorsCount) => Promise<void>;
|
36 | readonly updateValidatorsCount: (validatorsCount: ValidatorsCount, update: ValidatorsCountUpdate) => Promise<void>;
|
37 | readonly tryGetValidator: (key: ValidatorKey) => Promise<Validator | undefined>;
|
38 | readonly addValidator: (validator: Validator) => Promise<void>;
|
39 | readonly deleteValidator: (key: ValidatorKey) => Promise<void>;
|
40 | readonly updateValidator: (validator: Validator, update: ValidatorUpdate) => Promise<Validator>;
|
41 | }) => Promise<void>;
|
42 | export declare const getValidators: (blockchain: Blockchain, transactions: readonly Transaction[]) => Promise<readonly ECPoint[]>;
|
43 | export {};
|