@alephium/web3 0.2.0-rc.14 → 0.2.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-alephium.d.ts +10 -0
- package/dist/src/api/api-explorer.d.ts +147 -32
- package/dist/src/api/api-explorer.js +133 -1
- package/dist/src/contract/contract.d.ts +24 -16
- package/dist/src/contract/contract.js +43 -22
- package/dist/src/contract/ralph.d.ts +1 -0
- package/dist/src/contract/ralph.js +27 -1
- package/package.json +3 -3
- package/src/api/api-alephium.ts +12 -0
- package/src/api/api-explorer.ts +233 -40
- package/src/contract/contract.ts +94 -27
- package/src/contract/ralph.ts +25 -0
|
@@ -317,8 +317,11 @@ export interface ChangeActiveAddress {
|
|
|
317
317
|
export interface CompileContractResult {
|
|
318
318
|
name: string;
|
|
319
319
|
bytecode: string;
|
|
320
|
+
bytecodeDebugPatch: string;
|
|
320
321
|
/** @format 32-byte-hash */
|
|
321
322
|
codeHash: string;
|
|
323
|
+
/** @format 32-byte-hash */
|
|
324
|
+
codeHashDebug: string;
|
|
322
325
|
fields: FieldsSig;
|
|
323
326
|
functions: FunctionSig[];
|
|
324
327
|
events: EventSig[];
|
|
@@ -331,6 +334,7 @@ export interface CompileProjectResult {
|
|
|
331
334
|
export interface CompileScriptResult {
|
|
332
335
|
name: string;
|
|
333
336
|
bytecodeTemplate: string;
|
|
337
|
+
bytecodeDebugPatch: string;
|
|
334
338
|
fields: FieldsSig;
|
|
335
339
|
functions: FunctionSig[];
|
|
336
340
|
warnings: string[];
|
|
@@ -422,6 +426,11 @@ export interface ContractState {
|
|
|
422
426
|
fields: Val[];
|
|
423
427
|
asset: AssetState;
|
|
424
428
|
}
|
|
429
|
+
export interface DebugMessage {
|
|
430
|
+
/** @format address */
|
|
431
|
+
contractAddress: string;
|
|
432
|
+
message: string;
|
|
433
|
+
}
|
|
425
434
|
export interface DecodeUnsignedTx {
|
|
426
435
|
unsignedTx: string;
|
|
427
436
|
}
|
|
@@ -672,6 +681,7 @@ export interface TestContractResult {
|
|
|
672
681
|
txInputs: string[];
|
|
673
682
|
txOutputs: Output[];
|
|
674
683
|
events: ContractEventByTxId[];
|
|
684
|
+
debugMessages: DebugMessage[];
|
|
675
685
|
}
|
|
676
686
|
export interface TestInputAsset {
|
|
677
687
|
/** @format address */
|
|
@@ -12,6 +12,23 @@ export interface AddressInfo {
|
|
|
12
12
|
/** @format int32 */
|
|
13
13
|
txNumber: number;
|
|
14
14
|
}
|
|
15
|
+
export interface AssetOutput {
|
|
16
|
+
/** @format int32 */
|
|
17
|
+
hint: number;
|
|
18
|
+
/** @format 32-byte-hash */
|
|
19
|
+
key: string;
|
|
20
|
+
/** @format uint256 */
|
|
21
|
+
attoAlphAmount: string;
|
|
22
|
+
address: string;
|
|
23
|
+
tokens?: Token[];
|
|
24
|
+
/** @format int64 */
|
|
25
|
+
lockTime?: number;
|
|
26
|
+
/** @format hex-string */
|
|
27
|
+
message?: string;
|
|
28
|
+
/** @format 32-byte-hash */
|
|
29
|
+
spent?: string;
|
|
30
|
+
type: string;
|
|
31
|
+
}
|
|
15
32
|
export interface BadRequest {
|
|
16
33
|
detail: string;
|
|
17
34
|
}
|
|
@@ -47,6 +64,19 @@ export interface ConfirmedTransaction {
|
|
|
47
64
|
gasPrice: string;
|
|
48
65
|
type: string;
|
|
49
66
|
}
|
|
67
|
+
export interface ContractOutput {
|
|
68
|
+
/** @format int32 */
|
|
69
|
+
hint: number;
|
|
70
|
+
/** @format 32-byte-hash */
|
|
71
|
+
key: string;
|
|
72
|
+
/** @format uint256 */
|
|
73
|
+
attoAlphAmount: string;
|
|
74
|
+
address: string;
|
|
75
|
+
tokens?: Token[];
|
|
76
|
+
/** @format 32-byte-hash */
|
|
77
|
+
spent?: string;
|
|
78
|
+
type: string;
|
|
79
|
+
}
|
|
50
80
|
export interface ExplorerInfo {
|
|
51
81
|
releaseVersion: string;
|
|
52
82
|
commit: string;
|
|
@@ -59,12 +89,12 @@ export interface Hashrate {
|
|
|
59
89
|
}
|
|
60
90
|
export interface Input {
|
|
61
91
|
outputRef: OutputRef;
|
|
92
|
+
/** @format hex-string */
|
|
62
93
|
unlockScript?: string;
|
|
63
|
-
|
|
64
|
-
txHashRef: string;
|
|
65
|
-
address: string;
|
|
94
|
+
address?: string;
|
|
66
95
|
/** @format uint256 */
|
|
67
|
-
|
|
96
|
+
attoAlphAmount?: string;
|
|
97
|
+
tokens?: Token[];
|
|
68
98
|
}
|
|
69
99
|
export interface InternalServerError {
|
|
70
100
|
detail: string;
|
|
@@ -74,23 +104,15 @@ export interface ListBlocks {
|
|
|
74
104
|
total: number;
|
|
75
105
|
blocks?: BlockEntryLite[];
|
|
76
106
|
}
|
|
107
|
+
export interface LogbackValue {
|
|
108
|
+
name: string;
|
|
109
|
+
level: string;
|
|
110
|
+
}
|
|
77
111
|
export interface NotFound {
|
|
78
112
|
detail: string;
|
|
79
113
|
resource: string;
|
|
80
114
|
}
|
|
81
|
-
export
|
|
82
|
-
/** @format int32 */
|
|
83
|
-
hint: number;
|
|
84
|
-
/** @format 32-byte-hash */
|
|
85
|
-
key: string;
|
|
86
|
-
/** @format uint256 */
|
|
87
|
-
amount: string;
|
|
88
|
-
address: string;
|
|
89
|
-
/** @format int64 */
|
|
90
|
-
lockTime?: number;
|
|
91
|
-
/** @format 32-byte-hash */
|
|
92
|
-
spent?: string;
|
|
93
|
-
}
|
|
115
|
+
export declare type Output = AssetOutput | ContractOutput;
|
|
94
116
|
export interface OutputRef {
|
|
95
117
|
/** @format int32 */
|
|
96
118
|
hint: number;
|
|
@@ -139,6 +161,12 @@ export interface TimedCount {
|
|
|
139
161
|
/** @format int64 */
|
|
140
162
|
totalCountAllChains: number;
|
|
141
163
|
}
|
|
164
|
+
export interface Token {
|
|
165
|
+
/** @format 32-byte-hash */
|
|
166
|
+
id: string;
|
|
167
|
+
/** @format uint256 */
|
|
168
|
+
amount: string;
|
|
169
|
+
}
|
|
142
170
|
export interface TokenSupply {
|
|
143
171
|
/** @format int64 */
|
|
144
172
|
timestamp: number;
|
|
@@ -168,17 +196,6 @@ export interface Transaction {
|
|
|
168
196
|
gasPrice: string;
|
|
169
197
|
}
|
|
170
198
|
export declare type TransactionLike = ConfirmedTransaction | UnconfirmedTransaction;
|
|
171
|
-
export interface UInput {
|
|
172
|
-
outputRef: OutputRef;
|
|
173
|
-
unlockScript?: string;
|
|
174
|
-
}
|
|
175
|
-
export interface UOutput {
|
|
176
|
-
/** @format uint256 */
|
|
177
|
-
amount: string;
|
|
178
|
-
address: string;
|
|
179
|
-
/** @format int64 */
|
|
180
|
-
lockTime?: number;
|
|
181
|
-
}
|
|
182
199
|
export interface Unauthorized {
|
|
183
200
|
detail: string;
|
|
184
201
|
}
|
|
@@ -189,12 +206,14 @@ export interface UnconfirmedTransaction {
|
|
|
189
206
|
chainFrom: number;
|
|
190
207
|
/** @format int32 */
|
|
191
208
|
chainTo: number;
|
|
192
|
-
inputs?:
|
|
193
|
-
outputs?:
|
|
209
|
+
inputs?: Input[];
|
|
210
|
+
outputs?: AssetOutput[];
|
|
194
211
|
/** @format int32 */
|
|
195
212
|
gasAmount: number;
|
|
196
213
|
/** @format uint256 */
|
|
197
214
|
gasPrice: string;
|
|
215
|
+
/** @format int64 */
|
|
216
|
+
lastSeen: number;
|
|
198
217
|
type: string;
|
|
199
218
|
}
|
|
200
219
|
import 'cross-fetch/polyfill';
|
|
@@ -304,6 +323,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
304
323
|
*/
|
|
305
324
|
getTransactionsTransactionHash: (transactionHash: string, params?: RequestParams) => Promise<ConfirmedTransaction | UnconfirmedTransaction>;
|
|
306
325
|
};
|
|
326
|
+
transactionByOutputRefKey: {
|
|
327
|
+
/**
|
|
328
|
+
* @description Get a transaction from a output reference key
|
|
329
|
+
*
|
|
330
|
+
* @tags Transactions
|
|
331
|
+
* @name GetTransactionByOutputRefKeyOutputRefKey
|
|
332
|
+
* @request GET:/transaction-by-output-ref-key/{output-ref-key}
|
|
333
|
+
*/
|
|
334
|
+
getTransactionByOutputRefKeyOutputRefKey: (outputRefKey: string, params?: RequestParams) => Promise<ConfirmedTransaction>;
|
|
335
|
+
};
|
|
307
336
|
addresses: {
|
|
308
337
|
/**
|
|
309
338
|
* @description Get address information
|
|
@@ -333,6 +362,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
333
362
|
* @request GET:/addresses/{address}/total-transactions
|
|
334
363
|
*/
|
|
335
364
|
getAddressesAddressTotalTransactions: (address: string, params?: RequestParams) => Promise<number>;
|
|
365
|
+
/**
|
|
366
|
+
* @description List unconfirmed transactions of a given address
|
|
367
|
+
*
|
|
368
|
+
* @tags Addresses
|
|
369
|
+
* @name GetAddressesAddressUnconfirmedTransactions
|
|
370
|
+
* @request GET:/addresses/{address}/unconfirmed-transactions
|
|
371
|
+
*/
|
|
372
|
+
getAddressesAddressUnconfirmedTransactions: (address: string, params?: RequestParams) => Promise<UnconfirmedTransaction[]>;
|
|
336
373
|
/**
|
|
337
374
|
* @description Get address balance
|
|
338
375
|
*
|
|
@@ -341,6 +378,44 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
341
378
|
* @request GET:/addresses/{address}/balance
|
|
342
379
|
*/
|
|
343
380
|
getAddressesAddressBalance: (address: string, params?: RequestParams) => Promise<AddressBalance>;
|
|
381
|
+
/**
|
|
382
|
+
* @description List address tokens
|
|
383
|
+
*
|
|
384
|
+
* @tags Addresses
|
|
385
|
+
* @name GetAddressesAddressTokens
|
|
386
|
+
* @request GET:/addresses/{address}/tokens
|
|
387
|
+
*/
|
|
388
|
+
getAddressesAddressTokens: (address: string, params?: RequestParams) => Promise<string[]>;
|
|
389
|
+
/**
|
|
390
|
+
* @description List address tokens
|
|
391
|
+
*
|
|
392
|
+
* @tags Addresses
|
|
393
|
+
* @name GetAddressesAddressTokensTokenIdTransactions
|
|
394
|
+
* @request GET:/addresses/{address}/tokens/{token-id}/transactions
|
|
395
|
+
*/
|
|
396
|
+
getAddressesAddressTokensTokenIdTransactions: (address: string, tokenId: string, query?: {
|
|
397
|
+
page?: number;
|
|
398
|
+
limit?: number;
|
|
399
|
+
reverse?: boolean;
|
|
400
|
+
}, params?: RequestParams) => Promise<Transaction[]>;
|
|
401
|
+
/**
|
|
402
|
+
* @description Get address balance of given token
|
|
403
|
+
*
|
|
404
|
+
* @tags Addresses
|
|
405
|
+
* @name GetAddressesAddressTokensTokenIdBalance
|
|
406
|
+
* @request GET:/addresses/{address}/tokens/{token-id}/balance
|
|
407
|
+
*/
|
|
408
|
+
getAddressesAddressTokensTokenIdBalance: (address: string, tokenId: string, params?: RequestParams) => Promise<AddressBalance>;
|
|
409
|
+
};
|
|
410
|
+
addressesActive: {
|
|
411
|
+
/**
|
|
412
|
+
* @description Are the addresses active (at least 1 transaction)
|
|
413
|
+
*
|
|
414
|
+
* @tags Addresses
|
|
415
|
+
* @name PostAddressesActive
|
|
416
|
+
* @request POST:/addresses-active
|
|
417
|
+
*/
|
|
418
|
+
postAddressesActive: (data?: string[], params?: RequestParams) => Promise<boolean[]>;
|
|
344
419
|
};
|
|
345
420
|
infos: {
|
|
346
421
|
/**
|
|
@@ -420,6 +495,46 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
420
495
|
*/
|
|
421
496
|
getInfosAverageBlockTimes: (params?: RequestParams) => Promise<PerChainDuration[]>;
|
|
422
497
|
};
|
|
498
|
+
unconfirmedTransactions: {
|
|
499
|
+
/**
|
|
500
|
+
* @description list unconfirmed transactions
|
|
501
|
+
*
|
|
502
|
+
* @tags Unconfirmed Transactions
|
|
503
|
+
* @name GetUnconfirmedTransactions
|
|
504
|
+
* @request GET:/unconfirmed-transactions
|
|
505
|
+
*/
|
|
506
|
+
getUnconfirmedTransactions: (query?: {
|
|
507
|
+
page?: number;
|
|
508
|
+
limit?: number;
|
|
509
|
+
reverse?: boolean;
|
|
510
|
+
}, params?: RequestParams) => Promise<UnconfirmedTransaction[]>;
|
|
511
|
+
};
|
|
512
|
+
tokens: {
|
|
513
|
+
/**
|
|
514
|
+
* @description List tokens
|
|
515
|
+
*
|
|
516
|
+
* @tags Tokens
|
|
517
|
+
* @name GetTokens
|
|
518
|
+
* @request GET:/tokens
|
|
519
|
+
*/
|
|
520
|
+
getTokens: (query?: {
|
|
521
|
+
page?: number;
|
|
522
|
+
limit?: number;
|
|
523
|
+
reverse?: boolean;
|
|
524
|
+
}, params?: RequestParams) => Promise<string[]>;
|
|
525
|
+
/**
|
|
526
|
+
* @description List token transactions
|
|
527
|
+
*
|
|
528
|
+
* @tags Tokens
|
|
529
|
+
* @name GetTokensTokenIdTransactions
|
|
530
|
+
* @request GET:/tokens/{token-id}/transactions
|
|
531
|
+
*/
|
|
532
|
+
getTokensTokenIdTransactions: (tokenId: string, query?: {
|
|
533
|
+
page?: number;
|
|
534
|
+
limit?: number;
|
|
535
|
+
reverse?: boolean;
|
|
536
|
+
}, params?: RequestParams) => Promise<Transaction[]>;
|
|
537
|
+
};
|
|
423
538
|
charts: {
|
|
424
539
|
/**
|
|
425
540
|
* @description `interval-type` query param: hourly, daily
|
|
@@ -479,13 +594,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
479
594
|
*/
|
|
480
595
|
putUtilsUpdateGlobalLoglevel: (data: 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR', params?: RequestParams) => Promise<void>;
|
|
481
596
|
/**
|
|
482
|
-
* @description Update
|
|
597
|
+
* @description Update logback values
|
|
483
598
|
*
|
|
484
599
|
* @tags Utils
|
|
485
600
|
* @name PutUtilsUpdateLogConfig
|
|
486
601
|
* @request PUT:/utils/update-log-config
|
|
487
602
|
*/
|
|
488
|
-
putUtilsUpdateLogConfig: (data
|
|
603
|
+
putUtilsUpdateLogConfig: (data?: LogbackValue[], params?: RequestParams) => Promise<void>;
|
|
489
604
|
};
|
|
490
605
|
}
|
|
491
606
|
export {};
|
|
@@ -212,6 +212,21 @@ class Api extends HttpClient {
|
|
|
212
212
|
...params
|
|
213
213
|
}).then(utils_1.convertHttpResponse)
|
|
214
214
|
};
|
|
215
|
+
this.transactionByOutputRefKey = {
|
|
216
|
+
/**
|
|
217
|
+
* @description Get a transaction from a output reference key
|
|
218
|
+
*
|
|
219
|
+
* @tags Transactions
|
|
220
|
+
* @name GetTransactionByOutputRefKeyOutputRefKey
|
|
221
|
+
* @request GET:/transaction-by-output-ref-key/{output-ref-key}
|
|
222
|
+
*/
|
|
223
|
+
getTransactionByOutputRefKeyOutputRefKey: (outputRefKey, params = {}) => this.request({
|
|
224
|
+
path: `/transaction-by-output-ref-key/${outputRefKey}`,
|
|
225
|
+
method: 'GET',
|
|
226
|
+
format: 'json',
|
|
227
|
+
...params
|
|
228
|
+
}).then(utils_1.convertHttpResponse)
|
|
229
|
+
};
|
|
215
230
|
this.addresses = {
|
|
216
231
|
/**
|
|
217
232
|
* @description Get address information
|
|
@@ -253,6 +268,19 @@ class Api extends HttpClient {
|
|
|
253
268
|
format: 'json',
|
|
254
269
|
...params
|
|
255
270
|
}).then(utils_1.convertHttpResponse),
|
|
271
|
+
/**
|
|
272
|
+
* @description List unconfirmed transactions of a given address
|
|
273
|
+
*
|
|
274
|
+
* @tags Addresses
|
|
275
|
+
* @name GetAddressesAddressUnconfirmedTransactions
|
|
276
|
+
* @request GET:/addresses/{address}/unconfirmed-transactions
|
|
277
|
+
*/
|
|
278
|
+
getAddressesAddressUnconfirmedTransactions: (address, params = {}) => this.request({
|
|
279
|
+
path: `/addresses/${address}/unconfirmed-transactions`,
|
|
280
|
+
method: 'GET',
|
|
281
|
+
format: 'json',
|
|
282
|
+
...params
|
|
283
|
+
}).then(utils_1.convertHttpResponse),
|
|
256
284
|
/**
|
|
257
285
|
* @description Get address balance
|
|
258
286
|
*
|
|
@@ -265,6 +293,63 @@ class Api extends HttpClient {
|
|
|
265
293
|
method: 'GET',
|
|
266
294
|
format: 'json',
|
|
267
295
|
...params
|
|
296
|
+
}).then(utils_1.convertHttpResponse),
|
|
297
|
+
/**
|
|
298
|
+
* @description List address tokens
|
|
299
|
+
*
|
|
300
|
+
* @tags Addresses
|
|
301
|
+
* @name GetAddressesAddressTokens
|
|
302
|
+
* @request GET:/addresses/{address}/tokens
|
|
303
|
+
*/
|
|
304
|
+
getAddressesAddressTokens: (address, params = {}) => this.request({
|
|
305
|
+
path: `/addresses/${address}/tokens`,
|
|
306
|
+
method: 'GET',
|
|
307
|
+
format: 'json',
|
|
308
|
+
...params
|
|
309
|
+
}).then(utils_1.convertHttpResponse),
|
|
310
|
+
/**
|
|
311
|
+
* @description List address tokens
|
|
312
|
+
*
|
|
313
|
+
* @tags Addresses
|
|
314
|
+
* @name GetAddressesAddressTokensTokenIdTransactions
|
|
315
|
+
* @request GET:/addresses/{address}/tokens/{token-id}/transactions
|
|
316
|
+
*/
|
|
317
|
+
getAddressesAddressTokensTokenIdTransactions: (address, tokenId, query, params = {}) => this.request({
|
|
318
|
+
path: `/addresses/${address}/tokens/${tokenId}/transactions`,
|
|
319
|
+
method: 'GET',
|
|
320
|
+
query: query,
|
|
321
|
+
format: 'json',
|
|
322
|
+
...params
|
|
323
|
+
}).then(utils_1.convertHttpResponse),
|
|
324
|
+
/**
|
|
325
|
+
* @description Get address balance of given token
|
|
326
|
+
*
|
|
327
|
+
* @tags Addresses
|
|
328
|
+
* @name GetAddressesAddressTokensTokenIdBalance
|
|
329
|
+
* @request GET:/addresses/{address}/tokens/{token-id}/balance
|
|
330
|
+
*/
|
|
331
|
+
getAddressesAddressTokensTokenIdBalance: (address, tokenId, params = {}) => this.request({
|
|
332
|
+
path: `/addresses/${address}/tokens/${tokenId}/balance`,
|
|
333
|
+
method: 'GET',
|
|
334
|
+
format: 'json',
|
|
335
|
+
...params
|
|
336
|
+
}).then(utils_1.convertHttpResponse)
|
|
337
|
+
};
|
|
338
|
+
this.addressesActive = {
|
|
339
|
+
/**
|
|
340
|
+
* @description Are the addresses active (at least 1 transaction)
|
|
341
|
+
*
|
|
342
|
+
* @tags Addresses
|
|
343
|
+
* @name PostAddressesActive
|
|
344
|
+
* @request POST:/addresses-active
|
|
345
|
+
*/
|
|
346
|
+
postAddressesActive: (data, params = {}) => this.request({
|
|
347
|
+
path: `/addresses-active`,
|
|
348
|
+
method: 'POST',
|
|
349
|
+
body: data,
|
|
350
|
+
type: ContentType.Json,
|
|
351
|
+
format: 'json',
|
|
352
|
+
...params
|
|
268
353
|
}).then(utils_1.convertHttpResponse)
|
|
269
354
|
};
|
|
270
355
|
this.infos = {
|
|
@@ -382,6 +467,52 @@ class Api extends HttpClient {
|
|
|
382
467
|
...params
|
|
383
468
|
}).then(utils_1.convertHttpResponse)
|
|
384
469
|
};
|
|
470
|
+
this.unconfirmedTransactions = {
|
|
471
|
+
/**
|
|
472
|
+
* @description list unconfirmed transactions
|
|
473
|
+
*
|
|
474
|
+
* @tags Unconfirmed Transactions
|
|
475
|
+
* @name GetUnconfirmedTransactions
|
|
476
|
+
* @request GET:/unconfirmed-transactions
|
|
477
|
+
*/
|
|
478
|
+
getUnconfirmedTransactions: (query, params = {}) => this.request({
|
|
479
|
+
path: `/unconfirmed-transactions`,
|
|
480
|
+
method: 'GET',
|
|
481
|
+
query: query,
|
|
482
|
+
format: 'json',
|
|
483
|
+
...params
|
|
484
|
+
}).then(utils_1.convertHttpResponse)
|
|
485
|
+
};
|
|
486
|
+
this.tokens = {
|
|
487
|
+
/**
|
|
488
|
+
* @description List tokens
|
|
489
|
+
*
|
|
490
|
+
* @tags Tokens
|
|
491
|
+
* @name GetTokens
|
|
492
|
+
* @request GET:/tokens
|
|
493
|
+
*/
|
|
494
|
+
getTokens: (query, params = {}) => this.request({
|
|
495
|
+
path: `/tokens`,
|
|
496
|
+
method: 'GET',
|
|
497
|
+
query: query,
|
|
498
|
+
format: 'json',
|
|
499
|
+
...params
|
|
500
|
+
}).then(utils_1.convertHttpResponse),
|
|
501
|
+
/**
|
|
502
|
+
* @description List token transactions
|
|
503
|
+
*
|
|
504
|
+
* @tags Tokens
|
|
505
|
+
* @name GetTokensTokenIdTransactions
|
|
506
|
+
* @request GET:/tokens/{token-id}/transactions
|
|
507
|
+
*/
|
|
508
|
+
getTokensTokenIdTransactions: (tokenId, query, params = {}) => this.request({
|
|
509
|
+
path: `/tokens/${tokenId}/transactions`,
|
|
510
|
+
method: 'GET',
|
|
511
|
+
query: query,
|
|
512
|
+
format: 'json',
|
|
513
|
+
...params
|
|
514
|
+
}).then(utils_1.convertHttpResponse)
|
|
515
|
+
};
|
|
385
516
|
this.charts = {
|
|
386
517
|
/**
|
|
387
518
|
* @description `interval-type` query param: hourly, daily
|
|
@@ -456,7 +587,7 @@ class Api extends HttpClient {
|
|
|
456
587
|
...params
|
|
457
588
|
}).then(utils_1.convertHttpResponse),
|
|
458
589
|
/**
|
|
459
|
-
* @description Update
|
|
590
|
+
* @description Update logback values
|
|
460
591
|
*
|
|
461
592
|
* @tags Utils
|
|
462
593
|
* @name PutUtilsUpdateLogConfig
|
|
@@ -466,6 +597,7 @@ class Api extends HttpClient {
|
|
|
466
597
|
path: `/utils/update-log-config`,
|
|
467
598
|
method: 'PUT',
|
|
468
599
|
body: data,
|
|
600
|
+
type: ContentType.Json,
|
|
469
601
|
...params
|
|
470
602
|
}).then(utils_1.convertHttpResponse)
|
|
471
603
|
};
|
|
@@ -37,18 +37,18 @@ declare class Compiled<T extends Artifact> {
|
|
|
37
37
|
warnings: string[];
|
|
38
38
|
constructor(sourceFile: SourceFile, artifact: T, warnings: string[]);
|
|
39
39
|
}
|
|
40
|
+
declare type CodeInfo = {
|
|
41
|
+
sourceCodeHash: string;
|
|
42
|
+
bytecodeDebugPatch: string;
|
|
43
|
+
codeHashDebug: string;
|
|
44
|
+
warnings: string[];
|
|
45
|
+
};
|
|
40
46
|
declare class ProjectArtifact {
|
|
41
47
|
static readonly artifactFileName = ".project.json";
|
|
42
48
|
compilerOptionsUsed: node.CompilerOptions;
|
|
43
|
-
infos: Map<string,
|
|
44
|
-
sourceCodeHash: string;
|
|
45
|
-
warnings: string[];
|
|
46
|
-
}>;
|
|
49
|
+
infos: Map<string, CodeInfo>;
|
|
47
50
|
static checkCompilerOptionsParameter(compilerOptions: node.CompilerOptions): void;
|
|
48
|
-
constructor(compilerOptionsUsed: node.CompilerOptions, infos: Map<string,
|
|
49
|
-
sourceCodeHash: string;
|
|
50
|
-
warnings: string[];
|
|
51
|
-
}>);
|
|
51
|
+
constructor(compilerOptionsUsed: node.CompilerOptions, infos: Map<string, CodeInfo>);
|
|
52
52
|
saveToFile(rootPath: string): Promise<void>;
|
|
53
53
|
needToReCompile(compilerOptions: node.CompilerOptions, files: SourceFile[]): boolean;
|
|
54
54
|
static from(rootPath: string): Promise<ProjectArtifact | undefined>;
|
|
@@ -94,20 +94,24 @@ export declare abstract class Artifact {
|
|
|
94
94
|
}
|
|
95
95
|
export declare class Contract extends Artifact {
|
|
96
96
|
readonly bytecode: string;
|
|
97
|
+
readonly bytecodeDebugPatch: string;
|
|
97
98
|
readonly codeHash: string;
|
|
98
99
|
readonly fieldsSig: FieldsSig;
|
|
99
100
|
readonly eventsSig: EventSig[];
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
readonly bytecodeDebug: string;
|
|
102
|
+
readonly codeHashDebug: string;
|
|
103
|
+
constructor(name: string, bytecode: string, bytecodeDebugPatch: string, codeHash: string, codeHashDebug: string, fieldsSig: FieldsSig, eventsSig: EventSig[], functions: FunctionSig[]);
|
|
104
|
+
static fromJson(artifact: any, bytecodeDebugPatch?: string, codeHashDebug?: string): Contract;
|
|
102
105
|
static fromCompileResult(result: node.CompileContractResult): Contract;
|
|
103
|
-
static fromArtifactFile(path: string): Promise<Contract>;
|
|
106
|
+
static fromArtifactFile(path: string, bytecodeDebugPatch: string, codeHashDebug: string): Promise<Contract>;
|
|
104
107
|
fetchState(address: string, group: number): Promise<ContractState>;
|
|
105
108
|
toString(): string;
|
|
106
109
|
toState(fields: Fields, asset: Asset, address?: string): ContractState;
|
|
107
110
|
static randomAddress(): string;
|
|
111
|
+
private _printDebugMessages;
|
|
108
112
|
private _test;
|
|
109
|
-
testPublicMethod(funcName: string, params: TestContractParams): Promise<TestContractResult>;
|
|
110
|
-
testPrivateMethod(funcName: string, params: TestContractParams): Promise<TestContractResult>;
|
|
113
|
+
testPublicMethod(funcName: string, params: TestContractParams, printDebugMessages?: boolean): Promise<TestContractResult>;
|
|
114
|
+
testPrivateMethod(funcName: string, params: TestContractParams, printDebugMessages?: boolean): Promise<TestContractResult>;
|
|
111
115
|
toApiFields(fields?: Fields): node.Val[];
|
|
112
116
|
toApiArgs(funcName: string, args?: Arguments): node.Val[];
|
|
113
117
|
getMethodIndex(funcName: string): number;
|
|
@@ -124,11 +128,12 @@ export declare class Contract extends Artifact {
|
|
|
124
128
|
}
|
|
125
129
|
export declare class Script extends Artifact {
|
|
126
130
|
readonly bytecodeTemplate: string;
|
|
131
|
+
readonly bytecodeDebugPatch: string;
|
|
127
132
|
readonly fieldsSig: FieldsSig;
|
|
128
|
-
constructor(name: string, bytecodeTemplate: string, fieldsSig: FieldsSig, functions: FunctionSig[]);
|
|
133
|
+
constructor(name: string, bytecodeTemplate: string, bytecodeDebugPatch: string, fieldsSig: FieldsSig, functions: FunctionSig[]);
|
|
129
134
|
static fromCompileResult(result: node.CompileScriptResult): Script;
|
|
130
|
-
static fromJson(artifact: any): Script;
|
|
131
|
-
static fromArtifactFile(path: string): Promise<Script>;
|
|
135
|
+
static fromJson(artifact: any, bytecodeDebugPatch?: string): Script;
|
|
136
|
+
static fromArtifactFile(path: string, bytecodeDebugPatch: string): Promise<Script>;
|
|
132
137
|
toString(): string;
|
|
133
138
|
paramsForDeployment(params: BuildExecuteScriptTx): Promise<SignExecuteScriptTxParams>;
|
|
134
139
|
transactionForDeployment(signer: SignerWithNodeProvider, params: Omit<BuildExecuteScriptTx, 'signerAddress'>): Promise<BuildScriptTxResult>;
|
|
@@ -174,14 +179,17 @@ export interface ContractEventByTxId {
|
|
|
174
179
|
name: string;
|
|
175
180
|
fields: Fields;
|
|
176
181
|
}
|
|
182
|
+
export declare type DebugMessage = node.DebugMessage;
|
|
177
183
|
export interface TestContractResult {
|
|
178
184
|
address: string;
|
|
179
185
|
contractId: string;
|
|
186
|
+
contractAddress: string;
|
|
180
187
|
returns: Val[];
|
|
181
188
|
gasUsed: number;
|
|
182
189
|
contracts: ContractState[];
|
|
183
190
|
txOutputs: Output[];
|
|
184
191
|
events: ContractEventByTxId[];
|
|
192
|
+
debugMessages: DebugMessage[];
|
|
185
193
|
}
|
|
186
194
|
export declare type Output = AssetOutput | ContractOutput;
|
|
187
195
|
export interface AssetOutput extends Asset {
|