UNPKG

5.71 kBTypeScriptView Raw
1/// <reference types="node" />
2/// <reference types="pouchdb-core" />
3import { InvocationTransactionJSON, InvocationTransactionModel, InvocationTransactionModelAdd } from '@neo-one/client-common';
4import { Constructor } from '@neo-one/utils';
5import BN from 'bn.js';
6import { DeserializeWireBaseOptions, SerializeJSONContext } from '../Serializable';
7import { VerifyScriptResult } from '../vm';
8import { Witness } from '../Witness';
9import { Attribute } from './attribute';
10import { Input } from './Input';
11import { Output } from './Output';
12import { FeeContext, TransactionVerifyOptions } from './TransactionBase';
13import { TransactionType } from './TransactionType';
14export interface InvocationTransactionAdd extends InvocationTransactionModelAdd<Attribute, Input, Output, Witness> {
15}
16declare const InvocationTransaction_base: {
17 new (...args: any[]): {
18 readonly equals: import("..").Equals;
19 readonly toKeyString: () => string;
20 readonly getSortedScriptHashesForVerifying: (input: import("./TransactionBase").TransactionGetScriptHashesForVerifyingOptions) => Promise<string[]>;
21 readonly sizeInternal: () => number;
22 readonly networkFee: (input: FeeContext) => Promise<BN>;
23 readonly getReferencesInternal: (input: import("./TransactionBase").GetReferencesOptions) => Promise<Output[]>;
24 readonly getTransactionResultsInternal: (input: import("./TransactionBase").GetTransactionResultsOptions) => Promise<{
25 readonly [x: string]: BN | undefined;
26 }>;
27 readonly baseGetScriptHashesForVerifyingInternal: (input: import("./TransactionBase").TransactionGetScriptHashesForVerifyingOptions) => Promise<Set<string>>;
28 readonly size: number;
29 serializeTransactionBaseJSON(context: SerializeJSONContext): Promise<import("@neo-one/client-common").TransactionBaseJSON>;
30 serializeJSON(_context: SerializeJSONContext): Promise<InvocationTransactionJSON>;
31 getNetworkFee(context: FeeContext): Promise<BN>;
32 getSystemFee({ fees }: FeeContext): BN;
33 getReferences(options: import("./TransactionBase").GetReferencesOptions): Promise<readonly Output[]>;
34 getTransactionResults(options: import("./TransactionBase").GetTransactionResultsOptions): Promise<{
35 readonly [key: string]: BN;
36 }>;
37 getScriptHashesForVerifying(options: import("./TransactionBase").TransactionGetScriptHashesForVerifyingOptions): Promise<Set<string>>;
38 verify(options: TransactionVerifyOptions): Promise<readonly VerifyScriptResult[]>;
39 readonly sizeExclusive: () => number;
40 verifyDoubleSpend({ isSpent }: TransactionVerifyOptions): Promise<void>;
41 verifyOutputs({ getAsset, currentHeight }: TransactionVerifyOptions): Promise<void>;
42 verifyTransactionResults({ getOutput, utilityToken, governingToken, fees, registerValidatorFee, }: TransactionVerifyOptions): Promise<void>;
43 verifyScripts({ getAsset, getOutput, verifyScript, }: TransactionVerifyOptions): Promise<readonly VerifyScriptResult[]>;
44 readonly type: TransactionType.Invocation;
45 readonly version: number;
46 readonly attributes: readonly Attribute[];
47 readonly inputs: readonly Input[];
48 readonly outputs: readonly Output[];
49 readonly scripts: readonly Witness[];
50 readonly serializeWire: import("../Serializable").SerializeWire;
51 readonly serializeUnsigned: import("../Serializable").SerializeWire;
52 readonly hashInternal: () => import("@neo-one/client-common").UInt256;
53 readonly hashHexInternal: () => string;
54 readonly messageInternal: () => Buffer;
55 clone(options: {
56 readonly scripts?: readonly Witness[] | undefined;
57 readonly attributes?: readonly Attribute[] | undefined;
58 readonly inputs?: readonly Input[] | undefined;
59 readonly outputs?: readonly Output[] | undefined;
60 }): any;
61 readonly hash: import("@neo-one/client-common").UInt256;
62 readonly hashHex: string;
63 readonly message: Buffer;
64 sign(key: import("@neo-one/client-common").PrivateKey): any;
65 signWithSignature(signature: Buffer, publicKey: import("@neo-one/client-common").ECPoint): any;
66 serializeExclusiveBase(_writer: import("@neo-one/client-common").BinaryWriter): void;
67 serializeUnsignedBase(writer: import("@neo-one/client-common").BinaryWriter): void;
68 serializeWireBase(writer: import("@neo-one/client-common").BinaryWriter): void;
69 };
70 deserializeTransactionBaseStartWireBase({ reader, }: DeserializeWireBaseOptions): {
71 readonly type: TransactionType;
72 readonly version: number;
73 };
74 deserializeTransactionBaseEndWireBase(options: DeserializeWireBaseOptions): {
75 readonly attributes: readonly Attribute[];
76 readonly inputs: readonly Input[];
77 readonly outputs: readonly Output[];
78 readonly scripts: readonly Witness[];
79 };
80 deserializeWireBase(_options: DeserializeWireBaseOptions): any;
81 deserializeWire(options: import("../Serializable").DeserializeWireOptions): any;
82 readonly WitnessConstructor: Constructor<Witness>;
83} & Constructor<InvocationTransactionModel<Attribute, Input, Output, Witness>>;
84export declare class InvocationTransaction extends InvocationTransaction_base {
85 static deserializeWireBase(options: DeserializeWireBaseOptions): InvocationTransaction;
86 protected readonly sizeExclusive: () => number;
87 serializeJSON(context: SerializeJSONContext): Promise<InvocationTransactionJSON>;
88 getSystemFee(_context: FeeContext): BN;
89 verify(options: TransactionVerifyOptions): Promise<readonly VerifyScriptResult[]>;
90}
91export {};