UNPKG

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