@alephium/web3 0.2.0-test.1 → 0.2.2
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/.eslintignore +2 -2
- package/README.md +2 -135
- package/dist/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.LICENSE.txt +0 -17
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-alephium.d.ts +116 -18
- package/dist/src/api/api-alephium.js +146 -81
- package/dist/src/api/api-explorer.d.ts +178 -51
- package/dist/src/api/api-explorer.js +172 -37
- package/dist/src/api/index.d.ts +40 -5
- package/dist/src/api/index.js +115 -7
- package/dist/src/api/types.d.ts +23 -0
- package/dist/src/api/types.js +235 -0
- package/dist/src/api/utils.d.ts +6 -0
- package/dist/{scripts/rename-gitignore.js → src/api/utils.js} +11 -6
- package/dist/src/contract/contract.d.ts +69 -55
- package/dist/src/contract/contract.js +241 -387
- package/dist/src/contract/events.d.ts +4 -4
- package/dist/src/contract/events.js +2 -1
- package/dist/src/contract/index.js +5 -1
- package/dist/src/contract/ralph.d.ts +5 -4
- package/dist/src/contract/ralph.js +27 -1
- package/dist/src/global.d.ts +6 -2
- package/dist/src/global.js +19 -3
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +23 -2
- package/dist/src/signer/index.d.ts +0 -1
- package/dist/src/signer/index.js +5 -2
- package/dist/src/signer/signer.d.ts +59 -60
- package/dist/src/signer/signer.js +99 -70
- package/dist/src/transaction/index.d.ts +0 -1
- package/dist/src/transaction/index.js +5 -2
- package/dist/src/transaction/status.d.ts +2 -1
- package/dist/src/transaction/status.js +2 -1
- package/dist/src/utils/bs58.d.ts +1 -0
- package/dist/src/utils/bs58.js +13 -1
- package/dist/src/utils/index.d.ts +0 -1
- package/dist/src/utils/index.js +5 -2
- package/dist/src/utils/subscription.d.ts +0 -2
- package/dist/src/utils/subscription.js +0 -2
- package/dist/src/utils/utils.d.ts +4 -9
- package/dist/src/utils/utils.js +20 -24
- package/jest-config.json +11 -0
- package/package.json +11 -45
- package/src/api/api-alephium.ts +163 -26
- package/src/api/api-explorer.ts +247 -54
- package/src/api/index.ts +140 -6
- package/src/api/types.ts +229 -0
- package/{scripts/rename-gitignore.js → src/api/utils.ts} +7 -6
- package/src/contract/contract.ts +405 -432
- package/src/contract/events.ts +6 -5
- package/src/contract/ralph.ts +29 -4
- package/src/global.ts +23 -3
- package/src/index.ts +7 -1
- package/src/signer/index.ts +0 -1
- package/src/signer/signer.ts +165 -135
- package/src/transaction/index.ts +0 -1
- package/src/transaction/status.ts +5 -2
- package/src/utils/bs58.ts +11 -0
- package/src/utils/index.ts +0 -1
- package/src/utils/subscription.ts +0 -4
- package/src/utils/utils.ts +11 -19
- package/webpack.config.js +3 -0
- package/.eslintrc.json +0 -21
- package/LICENSE +0 -165
- package/contracts/add/add.ral +0 -13
- package/contracts/greeter/greeter.ral +0 -7
- package/contracts/greeter/greeter_interface.ral +0 -4
- package/contracts/greeter_main.ral +0 -7
- package/contracts/main.ral +0 -4
- package/contracts/sub/sub.ral +0 -10
- package/contracts/test/metadata.ral +0 -18
- package/contracts/test/warnings.ral +0 -8
- package/dev/user.conf +0 -29
- package/dist/scripts/create-project.d.ts +0 -2
- package/dist/scripts/create-project.js +0 -125
- package/dist/scripts/rename-gitignore.d.ts +0 -1
- package/dist/scripts/start-devnet.d.ts +0 -1
- package/dist/scripts/start-devnet.js +0 -131
- package/dist/scripts/stop-devnet.d.ts +0 -1
- package/dist/scripts/stop-devnet.js +0 -32
- package/dist/src/signer/node-wallet.d.ts +0 -11
- package/dist/src/signer/node-wallet.js +0 -57
- package/dist/src/test/index.d.ts +0 -6
- package/dist/src/test/index.js +0 -41
- package/dist/src/test/privatekey-wallet.d.ts +0 -11
- package/dist/src/test/privatekey-wallet.js +0 -68
- package/dist/src/transaction/sign-verify.d.ts +0 -2
- package/dist/src/transaction/sign-verify.js +0 -58
- package/dist/src/utils/password-crypto.d.ts +0 -2
- package/dist/src/utils/password-crypto.js +0 -69
- package/gitignore +0 -9
- package/scripts/create-project.ts +0 -137
- package/scripts/start-devnet.js +0 -141
- package/scripts/stop-devnet.js +0 -32
- package/src/contract/ralph.test.ts +0 -178
- package/src/fixtures/address.json +0 -36
- package/src/fixtures/balance.json +0 -9
- package/src/fixtures/self-clique.json +0 -19
- package/src/fixtures/transaction.json +0 -13
- package/src/fixtures/transactions.json +0 -179
- package/src/signer/fixtures/genesis.json +0 -26
- package/src/signer/fixtures/wallets.json +0 -26
- package/src/signer/node-wallet.ts +0 -65
- package/src/test/index.ts +0 -31
- package/src/test/privatekey-wallet.ts +0 -57
- package/src/transaction/sign-verify.test.ts +0 -50
- package/src/transaction/sign-verify.ts +0 -39
- package/src/utils/address.test.ts +0 -47
- package/src/utils/djb2.test.ts +0 -35
- package/src/utils/password-crypto.test.ts +0 -27
- package/src/utils/password-crypto.ts +0 -77
- package/src/utils/utils.test.ts +0 -161
- package/templates/base/README.md +0 -34
- package/templates/base/package.json +0 -35
- package/templates/base/src/greeter.ts +0 -42
- package/templates/base/tsconfig.json +0 -19
- package/templates/react/README.md +0 -34
- package/templates/react/config-overrides.js +0 -18
- package/templates/react/package.json +0 -66
- package/templates/react/src/App.tsx +0 -42
- package/templates/react/src/artifacts/greeter.ral.json +0 -26
- package/templates/react/src/artifacts/greeter_main.ral.json +0 -22
- package/templates/shared/.eslintrc.json +0 -12
- package/templates/shared/scripts/header.js +0 -0
- package/test/contract.test.ts +0 -213
- package/test/events.test.ts +0 -141
- package/test/transaction.test.ts +0 -73
package/src/api/api-alephium.ts
CHANGED
|
@@ -124,6 +124,11 @@ export interface Banned {
|
|
|
124
124
|
type: string
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
export interface BlockAndEvents {
|
|
128
|
+
block: BlockEntry
|
|
129
|
+
events: ContractEventByBlockHash[]
|
|
130
|
+
}
|
|
131
|
+
|
|
127
132
|
export interface BlockEntry {
|
|
128
133
|
/** @format block-hash */
|
|
129
134
|
hash: string
|
|
@@ -174,6 +179,14 @@ export interface BlockHeaderEntry {
|
|
|
174
179
|
deps: string[]
|
|
175
180
|
}
|
|
176
181
|
|
|
182
|
+
export interface BlocksAndEventsPerTimeStampRange {
|
|
183
|
+
blocksAndEvents: BlockAndEvents[][]
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface BlocksPerTimeStampRange {
|
|
187
|
+
blocks: BlockEntry[][]
|
|
188
|
+
}
|
|
189
|
+
|
|
177
190
|
export interface BrokerInfo {
|
|
178
191
|
/** @format clique-id */
|
|
179
192
|
cliqueId: string
|
|
@@ -422,10 +435,16 @@ export interface ChangeActiveAddress {
|
|
|
422
435
|
}
|
|
423
436
|
|
|
424
437
|
export interface CompileContractResult {
|
|
438
|
+
version: string
|
|
439
|
+
name: string
|
|
425
440
|
bytecode: string
|
|
441
|
+
bytecodeDebugPatch: string
|
|
426
442
|
|
|
427
443
|
/** @format 32-byte-hash */
|
|
428
444
|
codeHash: string
|
|
445
|
+
|
|
446
|
+
/** @format 32-byte-hash */
|
|
447
|
+
codeHashDebug: string
|
|
429
448
|
fields: FieldsSig
|
|
430
449
|
functions: FunctionSig[]
|
|
431
450
|
events: EventSig[]
|
|
@@ -438,12 +457,24 @@ export interface CompileProjectResult {
|
|
|
438
457
|
}
|
|
439
458
|
|
|
440
459
|
export interface CompileScriptResult {
|
|
460
|
+
version: string
|
|
461
|
+
name: string
|
|
441
462
|
bytecodeTemplate: string
|
|
463
|
+
bytecodeDebugPatch: string
|
|
442
464
|
fields: FieldsSig
|
|
443
465
|
functions: FunctionSig[]
|
|
444
466
|
warnings: string[]
|
|
445
467
|
}
|
|
446
468
|
|
|
469
|
+
export interface CompilerOptions {
|
|
470
|
+
ignoreUnusedConstantsWarnings?: boolean
|
|
471
|
+
ignoreUnusedVariablesWarnings?: boolean
|
|
472
|
+
ignoreUnusedFieldsWarnings?: boolean
|
|
473
|
+
ignoreUnusedPrivateFunctionsWarnings?: boolean
|
|
474
|
+
ignoreUpdateFieldsCheckWarnings?: boolean
|
|
475
|
+
ignoreExternalCallCheckWarnings?: boolean
|
|
476
|
+
}
|
|
477
|
+
|
|
447
478
|
export interface Confirmed {
|
|
448
479
|
/** @format block-hash */
|
|
449
480
|
blockHash: string
|
|
@@ -464,6 +495,7 @@ export interface Confirmed {
|
|
|
464
495
|
|
|
465
496
|
export interface Contract {
|
|
466
497
|
code: string
|
|
498
|
+
compilerOptions?: CompilerOptions
|
|
467
499
|
}
|
|
468
500
|
|
|
469
501
|
export interface ContractEvent {
|
|
@@ -478,6 +510,18 @@ export interface ContractEvent {
|
|
|
478
510
|
fields: Val[]
|
|
479
511
|
}
|
|
480
512
|
|
|
513
|
+
export interface ContractEventByBlockHash {
|
|
514
|
+
/** @format 32-byte-hash */
|
|
515
|
+
txId: string
|
|
516
|
+
|
|
517
|
+
/** @format address */
|
|
518
|
+
contractAddress: string
|
|
519
|
+
|
|
520
|
+
/** @format int32 */
|
|
521
|
+
eventIndex: number
|
|
522
|
+
fields: Val[]
|
|
523
|
+
}
|
|
524
|
+
|
|
481
525
|
export interface ContractEventByTxId {
|
|
482
526
|
/** @format block-hash */
|
|
483
527
|
blockHash: string
|
|
@@ -497,11 +541,12 @@ export interface ContractEvents {
|
|
|
497
541
|
nextStart: number
|
|
498
542
|
}
|
|
499
543
|
|
|
544
|
+
export interface ContractEventsByBlockHash {
|
|
545
|
+
events: ContractEventByBlockHash[]
|
|
546
|
+
}
|
|
547
|
+
|
|
500
548
|
export interface ContractEventsByTxId {
|
|
501
549
|
events: ContractEventByTxId[]
|
|
502
|
-
|
|
503
|
-
/** @format int32 */
|
|
504
|
-
nextStart: number
|
|
505
550
|
}
|
|
506
551
|
|
|
507
552
|
export interface ContractOutput {
|
|
@@ -536,6 +581,12 @@ export interface ContractState {
|
|
|
536
581
|
asset: AssetState
|
|
537
582
|
}
|
|
538
583
|
|
|
584
|
+
export interface DebugMessage {
|
|
585
|
+
/** @format address */
|
|
586
|
+
contractAddress: string
|
|
587
|
+
message: string
|
|
588
|
+
}
|
|
589
|
+
|
|
539
590
|
export interface DecodeUnsignedTx {
|
|
540
591
|
unsignedTx: string
|
|
541
592
|
}
|
|
@@ -572,10 +623,6 @@ export interface EventSig {
|
|
|
572
623
|
fieldTypes: string[]
|
|
573
624
|
}
|
|
574
625
|
|
|
575
|
-
export interface FetchResponse {
|
|
576
|
-
blocks: BlockEntry[][]
|
|
577
|
-
}
|
|
578
|
-
|
|
579
626
|
export interface FieldsSig {
|
|
580
627
|
names: string[]
|
|
581
628
|
types: string[]
|
|
@@ -714,6 +761,7 @@ export interface Penalty {
|
|
|
714
761
|
|
|
715
762
|
export interface Project {
|
|
716
763
|
code: string
|
|
764
|
+
compilerOptions?: CompilerOptions
|
|
717
765
|
}
|
|
718
766
|
|
|
719
767
|
export interface Reachable {
|
|
@@ -742,6 +790,7 @@ export interface RevealMnemonicResult {
|
|
|
742
790
|
|
|
743
791
|
export interface Script {
|
|
744
792
|
code: string
|
|
793
|
+
compilerOptions?: CompilerOptions
|
|
745
794
|
}
|
|
746
795
|
|
|
747
796
|
export interface SelfClique {
|
|
@@ -859,6 +908,7 @@ export interface TestContractResult {
|
|
|
859
908
|
txInputs: string[]
|
|
860
909
|
txOutputs: Output[]
|
|
861
910
|
events: ContractEventByTxId[]
|
|
911
|
+
debugMessages: DebugMessage[]
|
|
862
912
|
}
|
|
863
913
|
|
|
864
914
|
export interface TestInputAsset {
|
|
@@ -1071,16 +1121,7 @@ export interface WalletUnlock {
|
|
|
1071
1121
|
}
|
|
1072
1122
|
|
|
1073
1123
|
import 'cross-fetch/polyfill'
|
|
1074
|
-
|
|
1075
|
-
function convertHttpResponse<T>(
|
|
1076
|
-
response: HttpResponse<T, { detail: string }> | HttpResponse<T, { detail: string }>
|
|
1077
|
-
): T {
|
|
1078
|
-
if (response.error) {
|
|
1079
|
-
throw new Error(response.error.detail)
|
|
1080
|
-
} else {
|
|
1081
|
-
return response.data
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1124
|
+
import { convertHttpResponse } from './utils'
|
|
1084
1125
|
|
|
1085
1126
|
export type QueryParamsType = Record<string | number, any>
|
|
1086
1127
|
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>
|
|
@@ -1284,7 +1325,6 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
1284
1325
|
this.abortControllers.delete(cancelToken)
|
|
1285
1326
|
}
|
|
1286
1327
|
|
|
1287
|
-
if (!response.ok) throw data
|
|
1288
1328
|
return data
|
|
1289
1329
|
})
|
|
1290
1330
|
}
|
|
@@ -1292,7 +1332,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
1292
1332
|
|
|
1293
1333
|
/**
|
|
1294
1334
|
* @title Alephium API
|
|
1295
|
-
* @version 1.5.
|
|
1335
|
+
* @version 1.5.3
|
|
1296
1336
|
* @baseUrl ../
|
|
1297
1337
|
*/
|
|
1298
1338
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -1843,13 +1883,36 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1843
1883
|
* No description
|
|
1844
1884
|
*
|
|
1845
1885
|
* @tags Blockflow
|
|
1846
|
-
* @name
|
|
1886
|
+
* @name GetBlockflowBlocks
|
|
1847
1887
|
* @summary List blocks on the given time interval
|
|
1848
|
-
* @request GET:/blockflow
|
|
1888
|
+
* @request GET:/blockflow/blocks
|
|
1889
|
+
*/
|
|
1890
|
+
getBlockflowBlocks: (query: { fromTs: number; toTs?: number }, params: RequestParams = {}) =>
|
|
1891
|
+
this.request<
|
|
1892
|
+
BlocksPerTimeStampRange,
|
|
1893
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1894
|
+
>({
|
|
1895
|
+
path: `/blockflow/blocks`,
|
|
1896
|
+
method: 'GET',
|
|
1897
|
+
query: query,
|
|
1898
|
+
format: 'json',
|
|
1899
|
+
...params
|
|
1900
|
+
}).then(convertHttpResponse),
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* No description
|
|
1904
|
+
*
|
|
1905
|
+
* @tags Blockflow
|
|
1906
|
+
* @name GetBlockflowBlocksWithEvents
|
|
1907
|
+
* @summary List blocks with events on the given time interval
|
|
1908
|
+
* @request GET:/blockflow/blocks-with-events
|
|
1849
1909
|
*/
|
|
1850
|
-
|
|
1851
|
-
this.request<
|
|
1852
|
-
|
|
1910
|
+
getBlockflowBlocksWithEvents: (query: { fromTs: number; toTs?: number }, params: RequestParams = {}) =>
|
|
1911
|
+
this.request<
|
|
1912
|
+
BlocksAndEventsPerTimeStampRange,
|
|
1913
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1914
|
+
>({
|
|
1915
|
+
path: `/blockflow/blocks-with-events`,
|
|
1853
1916
|
method: 'GET',
|
|
1854
1917
|
query: query,
|
|
1855
1918
|
format: 'json',
|
|
@@ -1872,6 +1935,22 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1872
1935
|
...params
|
|
1873
1936
|
}).then(convertHttpResponse),
|
|
1874
1937
|
|
|
1938
|
+
/**
|
|
1939
|
+
* No description
|
|
1940
|
+
*
|
|
1941
|
+
* @tags Blockflow
|
|
1942
|
+
* @name GetBlockflowBlocksWithEventsBlockHash
|
|
1943
|
+
* @summary Get a block and events with hash
|
|
1944
|
+
* @request GET:/blockflow/blocks-with-events/{block_hash}
|
|
1945
|
+
*/
|
|
1946
|
+
getBlockflowBlocksWithEventsBlockHash: (blockHash: string, params: RequestParams = {}) =>
|
|
1947
|
+
this.request<BlockAndEvents, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1948
|
+
path: `/blockflow/blocks-with-events/${blockHash}`,
|
|
1949
|
+
method: 'GET',
|
|
1950
|
+
format: 'json',
|
|
1951
|
+
...params
|
|
1952
|
+
}).then(convertHttpResponse),
|
|
1953
|
+
|
|
1875
1954
|
/**
|
|
1876
1955
|
* No description
|
|
1877
1956
|
*
|
|
@@ -2089,6 +2168,27 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2089
2168
|
...params
|
|
2090
2169
|
}).then(convertHttpResponse),
|
|
2091
2170
|
|
|
2171
|
+
/**
|
|
2172
|
+
* No description
|
|
2173
|
+
*
|
|
2174
|
+
* @tags Transactions
|
|
2175
|
+
* @name GetTransactionsDetailsTxid
|
|
2176
|
+
* @summary Get transaction details
|
|
2177
|
+
* @request GET:/transactions/details/{txId}
|
|
2178
|
+
*/
|
|
2179
|
+
getTransactionsDetailsTxid: (
|
|
2180
|
+
txId: string,
|
|
2181
|
+
query?: { fromGroup?: number; toGroup?: number },
|
|
2182
|
+
params: RequestParams = {}
|
|
2183
|
+
) =>
|
|
2184
|
+
this.request<Transaction, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2185
|
+
path: `/transactions/details/${txId}`,
|
|
2186
|
+
method: 'GET',
|
|
2187
|
+
query: query,
|
|
2188
|
+
format: 'json',
|
|
2189
|
+
...params
|
|
2190
|
+
}).then(convertHttpResponse),
|
|
2191
|
+
|
|
2092
2192
|
/**
|
|
2093
2193
|
* No description
|
|
2094
2194
|
*
|
|
@@ -2385,6 +2485,23 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2385
2485
|
...params
|
|
2386
2486
|
}).then(convertHttpResponse),
|
|
2387
2487
|
|
|
2488
|
+
/**
|
|
2489
|
+
* No description
|
|
2490
|
+
*
|
|
2491
|
+
* @tags Miners
|
|
2492
|
+
* @name PostMinersCpuMiningMineOneBlock
|
|
2493
|
+
* @summary Mine a block on CPU miner. !!! for test only !!!
|
|
2494
|
+
* @request POST:/miners/cpu-mining/mine-one-block
|
|
2495
|
+
*/
|
|
2496
|
+
postMinersCpuMiningMineOneBlock: (query: { fromGroup: number; toGroup: number }, params: RequestParams = {}) =>
|
|
2497
|
+
this.request<boolean, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2498
|
+
path: `/miners/cpu-mining/mine-one-block`,
|
|
2499
|
+
method: 'POST',
|
|
2500
|
+
query: query,
|
|
2501
|
+
format: 'json',
|
|
2502
|
+
...params
|
|
2503
|
+
}).then(convertHttpResponse),
|
|
2504
|
+
|
|
2388
2505
|
/**
|
|
2389
2506
|
* No description
|
|
2390
2507
|
*
|
|
@@ -2429,7 +2546,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2429
2546
|
*/
|
|
2430
2547
|
getEventsContractContractaddress: (
|
|
2431
2548
|
contractAddress: string,
|
|
2432
|
-
query: { start: number;
|
|
2549
|
+
query: { start: number; limit?: number; group?: number },
|
|
2433
2550
|
params: RequestParams = {}
|
|
2434
2551
|
) =>
|
|
2435
2552
|
this.request<ContractEvents, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
@@ -2461,7 +2578,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2461
2578
|
*
|
|
2462
2579
|
* @tags Events
|
|
2463
2580
|
* @name GetEventsTxIdTxid
|
|
2464
|
-
* @summary Get events for a
|
|
2581
|
+
* @summary Get contract events for a transaction
|
|
2465
2582
|
* @request GET:/events/tx-id/{txId}
|
|
2466
2583
|
*/
|
|
2467
2584
|
getEventsTxIdTxid: (txId: string, query?: { group?: number }, params: RequestParams = {}) =>
|
|
@@ -2474,6 +2591,26 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2474
2591
|
query: query,
|
|
2475
2592
|
format: 'json',
|
|
2476
2593
|
...params
|
|
2594
|
+
}).then(convertHttpResponse),
|
|
2595
|
+
|
|
2596
|
+
/**
|
|
2597
|
+
* No description
|
|
2598
|
+
*
|
|
2599
|
+
* @tags Events
|
|
2600
|
+
* @name GetEventsBlockHashBlockhash
|
|
2601
|
+
* @summary Get contract events for a block
|
|
2602
|
+
* @request GET:/events/block-hash/{blockHash}
|
|
2603
|
+
*/
|
|
2604
|
+
getEventsBlockHashBlockhash: (blockHash: string, query?: { group?: number }, params: RequestParams = {}) =>
|
|
2605
|
+
this.request<
|
|
2606
|
+
ContractEventsByBlockHash,
|
|
2607
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
2608
|
+
>({
|
|
2609
|
+
path: `/events/block-hash/${blockHash}`,
|
|
2610
|
+
method: 'GET',
|
|
2611
|
+
query: query,
|
|
2612
|
+
format: 'json',
|
|
2613
|
+
...params
|
|
2477
2614
|
}).then(convertHttpResponse)
|
|
2478
2615
|
}
|
|
2479
2616
|
}
|