UNPKG

6.28 kBTypeScriptView Raw
1/// <reference types="node" />
2/// <reference types="pouchdb-core" />
3import { BinaryWriter, ECPoint, EnrollmentTransactionJSON, TransactionBaseModel, UInt160Hex } from '@neo-one/client-common';
4import { Constructor } from '@neo-one/utils';
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 { TransactionBaseAdd, TransactionGetScriptHashesForVerifyingOptions, TransactionVerifyOptions } from './TransactionBase';
12import { TransactionType } from './TransactionType';
13export interface EnrollmentTransactionAdd extends TransactionBaseAdd {
14 readonly publicKey: ECPoint;
15}
16declare const EnrollmentTransaction_base: {
17 new (...args: any[]): {
18 readonly equals: import("..").Equals;
19 readonly toKeyString: () => string;
20 readonly getSortedScriptHashesForVerifying: (input: TransactionGetScriptHashesForVerifyingOptions) => Promise<string[]>;
21 readonly sizeInternal: () => number;
22 readonly networkFee: (input: import("./TransactionBase").FeeContext) => Promise<import("bn.js")>;
23 readonly getReferencesInternal: (input: import("./TransactionBase").GetReferencesOptions) => Promise<Output[]>;
24 readonly getTransactionResultsInternal: (input: import("./TransactionBase").GetTransactionResultsOptions) => Promise<{
25 readonly [x: string]: import("bn.js") | undefined;
26 }>;
27 readonly baseGetScriptHashesForVerifyingInternal: (input: TransactionGetScriptHashesForVerifyingOptions) => Promise<Set<string>>;
28 readonly size: number;
29 serializeTransactionBaseJSON(context: SerializeJSONContext): Promise<import("@neo-one/client-common").TransactionBaseJSON>;
30 serializeJSON(_context: SerializeJSONContext): Promise<EnrollmentTransactionJSON>;
31 getNetworkFee(context: import("./TransactionBase").FeeContext): Promise<import("bn.js")>;
32 getSystemFee({ fees }: import("./TransactionBase").FeeContext): import("bn.js");
33 getReferences(options: import("./TransactionBase").GetReferencesOptions): Promise<readonly Output[]>;
34 getTransactionResults(options: import("./TransactionBase").GetTransactionResultsOptions): Promise<{
35 readonly [key: string]: import("bn.js");
36 }>;
37 getScriptHashesForVerifying(options: 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.Enrollment;
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: ECPoint): any;
66 serializeExclusiveBase(_writer: BinaryWriter): void;
67 serializeUnsignedBase(writer: BinaryWriter): void;
68 serializeWireBase(writer: 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<TransactionBaseModel<TransactionType.Enrollment, Attribute, Input, Output, Witness>>;
84export declare class EnrollmentTransaction extends EnrollmentTransaction_base {
85 static deserializeWireBase(options: DeserializeWireBaseOptions): EnrollmentTransaction;
86 readonly publicKey: ECPoint;
87 protected readonly sizeExclusive: () => number;
88 private readonly enrollmentGetScriptHashesForVerifyingInternal;
89 constructor({ version, attributes, inputs, outputs, scripts, hash, publicKey }: EnrollmentTransactionAdd);
90 clone({ scripts, attributes, inputs, outputs, }: {
91 readonly scripts?: readonly Witness[];
92 readonly attributes?: readonly Attribute[];
93 readonly inputs?: readonly Input[];
94 readonly outputs?: readonly Output[];
95 }): this;
96 serializeExclusiveBase(writer: BinaryWriter): void;
97 serializeJSON(context: SerializeJSONContext): Promise<EnrollmentTransactionJSON>;
98 getScriptHashesForVerifying(options: TransactionGetScriptHashesForVerifyingOptions): Promise<Set<UInt160Hex>>;
99 verify(_options: TransactionVerifyOptions): Promise<readonly VerifyScriptResult[]>;
100}
101export {};