UNPKG

6.7 kBTypeScriptView Raw
1import * as wt from '@waves/waves-transactions';
2export declare class WavesConsoleAPI {
3 static env: any;
4 [key: string]: any;
5 private static injectEnv;
6 static setEnv(env: any): void;
7 private bufferToBase64;
8 alias: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.IAliasTransaction<string | number> & wt.WithId;
9 burn: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.IBurnTransaction<string | number> & wt.WithId;
10 cancelLease: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.ICancelLeaseTransaction<string | number> & wt.WithId;
11 cancelOrder: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.ICancelOrder;
12 data: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.IDataTransaction<string | number> & wt.WithId;
13 issue: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.IIssueTransaction<string | number> & wt.WithId;
14 reissue: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.IReissueTransaction<string | number> & wt.WithId;
15 lease: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.ILeaseTransaction<string | number> & wt.WithId;
16 massTransfer: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.IMassTransferTransaction<string | number> & wt.WithId;
17 order: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.IOrder<string | number> & wt.WithId;
18 transfer: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.ITransferTransaction<string | number> & wt.WithId;
19 setScript: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.ISetScriptTransaction<string | number> & wt.WithId;
20 setAssetScript: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.ISetAssetScriptTransaction<string | number> & wt.WithId;
21 signTx: (po: wt.TTxParams<string | number>, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | null | undefined) => wt.TTx<string | number>;
22 addressBalance: (address: string, apiBase?: string | undefined) => Promise<number>;
23 addressDataByKey: (address: string, key: string, apiBase?: string | undefined) => Promise<string | number | Uint8Array | null>;
24 broadcast: (tx: wt.TTx<string | number>, apiBase?: string | undefined) => Promise<any>;
25 file: (tabName?: string | undefined) => string;
26 contract: () => string;
27 keyPair: (seed?: string | undefined) => import("@waves/waves-crypto").KeyPair;
28 publicKey: (seed?: string | undefined) => string;
29 privateKey: (seed: string) => string;
30 address: (seed?: string | undefined, chainId?: string | undefined) => string;
31 compile: (code: string) => string;
32 deploy: (params?: {
33 fee?: number | undefined;
34 senderPublicKey?: string | undefined;
35 script?: string | undefined;
36 } | undefined, seed?: string | import("@waves/waves-transactions/dist/types").IIndexSeedMap | (string | null | undefined)[] | undefined) => Promise<any>;
37 help: (func?: Function | undefined) => string;
38}
39/**
40 * Item for commands list
41 *
42 * @interface IWavesConsoleAPIHelpCommand
43 */
44export interface IWavesConsoleAPIHelpCommand {
45 readonly summary?: string;
46 readonly description?: string;
47 readonly params?: Array<string> | null;
48}
49/**
50 * Item for variables types list
51 *
52 * @interface IWavesConsoleAPIHelpVariable
53 */
54export interface IWavesConsoleAPIHelpVariable {
55 readonly optional?: boolean;
56 readonly type?: string;
57 readonly summary?: string;
58}
59/**
60 * Item for common texts pieces (headers, etc)
61 *
62 * @interface IWavesConsoleApiHelpCommon
63 */
64export interface IWavesConsoleApiHelpCommon {
65 readonly header?: string;
66 readonly summary?: string;
67}
68/**
69 * Help parsers and text compilers
70 *
71 * @static
72 * @class WavesConsoleAPIHelp
73 */
74export declare class WavesConsoleAPIHelp {
75 /**
76 * Common texts pieces
77 *
78 * @static
79 * @member {object} common
80 */
81 static common: {
82 [key: string]: IWavesConsoleApiHelpCommon;
83 };
84 /**
85 * Commands descriptions vocabulary
86 *
87 * @static
88 * @member {object} texts
89 */
90 static texts: {
91 [key: string]: IWavesConsoleAPIHelpCommand;
92 };
93 /**
94 * Variables types vocabulary
95 *
96 * @static
97 * @member {object} types
98 */
99 static types: {
100 [key: string]: IWavesConsoleAPIHelpVariable;
101 };
102 /**
103 * Generates API method argument(s) whole description
104 *
105 * @static
106 * @method compileText
107 *
108 * @param {Array} aliases
109 *
110 * @returns {string}
111 */
112 static compileText(aliases: Array<string>): string;
113 /**
114 * Generates API method arguments description
115 *
116 * @static
117 * @method compileTextArguments
118 *
119 * @param {Array} args
120 * @param {string} text
121 *
122 * @returns {string}
123 */
124 static compileTextArguments(args: Array<string>, text: string): string;
125 /**
126 * Generates API specified method description
127 *
128 * @static
129 * @method compileTextSlice
130 *
131 * @param {string} alias
132 * @param {boolean} full
133 * @param {string} text
134 *
135 * @returns {string}
136 */
137 static compileTextSlice(alias: string, full: boolean, text: string): string;
138}