UNPKG

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