UNPKG

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