UNPKG

5.98 kBTypeScriptView Raw
1/// <reference types="node" />
2/// <reference types="pouchdb-core" />
3import { ClaimTransactionJSON, ClaimTransactionModel, ClaimTransactionModelAdd, UInt160Hex } 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, GetReferencesOptions, TransactionGetScriptHashesForVerifyingOptions, TransactionVerifyOptions } from './TransactionBase';
13import { TransactionType } from './TransactionType';
14export interface ClaimTransactionAdd extends ClaimTransactionModelAdd<Attribute, Input, Output, Witness> {
15}
16declare const ClaimTransaction_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: FeeContext) => Promise<BN>;
23 readonly getReferencesInternal: (input: GetReferencesOptions) => Promise<Output[]>;
24 readonly getTransactionResultsInternal: (input: import("./TransactionBase").GetTransactionResultsOptions) => Promise<{
25 readonly [x: string]: BN | 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<ClaimTransactionJSON>;
31 getNetworkFee(context: FeeContext): Promise<BN>;
32 getSystemFee({ fees }: FeeContext): BN;
33 getReferences(options: GetReferencesOptions): Promise<readonly Output[]>;
34 getTransactionResults(options: import("./TransactionBase").GetTransactionResultsOptions): Promise<{
35 readonly [key: string]: BN;
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.Claim;
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<ClaimTransactionModel<Attribute, Input, Output, Witness>>;
84export declare class ClaimTransaction extends ClaimTransaction_base {
85 static deserializeWireBase(options: DeserializeWireBaseOptions): ClaimTransaction;
86 readonly claims: readonly Input[];
87 protected readonly sizeExclusive: () => number;
88 private readonly claimGetScriptHashesForVerifyingInternal;
89 constructor(add: ClaimTransactionAdd);
90 getNetworkFee(_context: FeeContext): Promise<BN>;
91 getClaimReferences({ getOutput }: GetReferencesOptions): Promise<readonly Output[]>;
92 getScriptHashesForVerifying(options: TransactionGetScriptHashesForVerifyingOptions): Promise<Set<UInt160Hex>>;
93 verify(options: TransactionVerifyOptions): Promise<readonly VerifyScriptResult[]>;
94 serializeJSON(context: SerializeJSONContext): Promise<ClaimTransactionJSON>;
95 private verifyInternal;
96}
97export {};