1 | import { ECPoint, TransactionBaseModelAdd, TransactionBaseModelAddWithType } from '@neo-one/client-common';
|
2 | import BN from 'bn.js';
|
3 | import { Account, AccountKey } from '../Account';
|
4 | import { Asset, AssetKey } from '../Asset';
|
5 | import { Validator } from '../Validator';
|
6 | import { VerifyScript } from '../vm';
|
7 | import { Witness } from '../Witness';
|
8 | import { Attribute } from './attribute';
|
9 | import { Input } from './Input';
|
10 | import { Output, OutputKey } from './Output';
|
11 | import { RegisterTransaction } from './RegisterTransaction';
|
12 | import { Transaction } from './Transaction';
|
13 | import { TransactionType } from './TransactionType';
|
14 | export interface TransactionBaseAdd extends TransactionBaseModelAdd<Attribute, Input, Output, Witness> {
|
15 | }
|
16 | export interface TransactionBaseAddWithType<Type extends TransactionType> extends TransactionBaseModelAddWithType<Type, Attribute, Input, Output, Witness> {
|
17 | }
|
18 | export interface FeeContext {
|
19 | readonly getOutput: (input: Input) => Promise<Output>;
|
20 | readonly governingToken: RegisterTransaction;
|
21 | readonly utilityToken: RegisterTransaction;
|
22 | readonly fees: {
|
23 | [K in TransactionType]?: BN;
|
24 | };
|
25 | readonly registerValidatorFee: BN;
|
26 | }
|
27 | export interface TransactionGetScriptHashesForVerifyingOptions {
|
28 | readonly getOutput: (key: OutputKey) => Promise<Output>;
|
29 | readonly getAsset: (key: AssetKey) => Promise<Asset>;
|
30 | }
|
31 | export interface GetReferencesOptions {
|
32 | readonly getOutput: (key: OutputKey) => Promise<Output>;
|
33 | }
|
34 | export interface GetTransactionResultsOptions {
|
35 | readonly getOutput: (key: OutputKey) => Promise<Output>;
|
36 | }
|
37 | export interface TransactionVerifyOptions {
|
38 | readonly calculateClaimAmount: (inputs: readonly Input[]) => Promise<BN>;
|
39 | readonly isSpent: (key: OutputKey) => Promise<boolean>;
|
40 | readonly getAsset: (key: AssetKey) => Promise<Asset>;
|
41 | readonly getOutput: (key: OutputKey) => Promise<Output>;
|
42 | readonly tryGetAccount: (key: AccountKey) => Promise<Account | undefined>;
|
43 | readonly standbyValidators: readonly ECPoint[];
|
44 | readonly getAllValidators: () => Promise<readonly Validator[]>;
|
45 | readonly verifyScript: VerifyScript;
|
46 | readonly currentHeight: number;
|
47 | readonly governingToken: RegisterTransaction;
|
48 | readonly utilityToken: RegisterTransaction;
|
49 | readonly fees: {
|
50 | [K in TransactionType]?: BN;
|
51 | };
|
52 | readonly registerValidatorFee: BN;
|
53 | readonly memPool?: readonly Transaction[];
|
54 | }
|