forked from hyperledger-archives/burrow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
818 lines (810 loc) · 32.3 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
// Code generated by go-openrpc. DO NOT EDIT.
package web3
type Service interface {
// Returns the version of the current client
Web3ClientVersion() (*Web3ClientVersionResult, error)
// Hashes data using the Keccak-256 algorithm
Web3Sha3(*Web3Sha3Params) (*Web3Sha3Result, error)
// Determines if this client is listening for new network connections.
NetListening() (*NetListeningResult, error)
// Returns the number of peers currently connected to this client.
NetPeerCount() (*NetPeerCountResult, error)
// Returns the chain ID associated with the current network.
NetVersion() (*NetVersionResult, error)
// Returns the number of most recent block.
EthBlockNumber() (*EthBlockNumberResult, error)
// Executes a new message call (locally) immediately without creating a transaction on the block chain.
EthCall(*EthCallParams) (*EthCallResult, error)
// Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md).
EthChainId() (*EthChainIdResult, error)
// Returns the client coinbase address.
EthCoinbase() (*EthCoinbaseResult, error)
// Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
EthEstimateGas(*EthEstimateGasParams) (*EthEstimateGasResult, error)
// Returns the current price per gas in wei
EthGasPrice() (*EthGasPriceResult, error)
// Returns Ether balance of a given or account or contract
EthGetBalance(*EthGetBalanceParams) (*EthGetBalanceResult, error)
// Gets a block for a given hash
EthGetBlockByHash(*EthGetBlockByHashParams) (*EthGetBlockByHashResult, error)
// Gets a block for a given number salad
EthGetBlockByNumber(*EthGetBlockByNumberParams) (*EthGetBlockByNumberResult, error)
// Returns the number of transactions in a block from a block matching the given block hash.
EthGetBlockTransactionCountByHash(*EthGetBlockTransactionCountByHashParams) (*EthGetBlockTransactionCountByHashResult, error)
// Returns the number of transactions in a block from a block matching the given block number.
EthGetBlockTransactionCountByNumber(*EthGetBlockTransactionCountByNumberParams) (*EthGetBlockTransactionCountByNumberResult, error)
// Returns code at a given contract address
EthGetCode(*EthGetCodeParams) (*EthGetCodeResult, error)
// Polling method for a filter, which returns an array of logs which occurred since last poll.
EthGetFilterChanges(*EthGetFilterChangesParams) (*EthGetFilterChangesResult, error)
// Returns an array of all logs matching filter with given id.
EthGetFilterLogs(*EthGetFilterLogsParams) (*EthGetFilterLogsResult, error)
// Returns raw transaction data of a transaction with the given hash.
EthGetRawTransactionByHash(*EthGetRawTransactionByHashParams) (*EthGetRawTransactionByHashResult, error)
// Returns raw transaction data of a transaction with the given hash.
EthGetRawTransactionByBlockHashAndIndex(*EthGetRawTransactionByBlockHashAndIndexParams) (*EthGetRawTransactionByBlockHashAndIndexResult, error)
// Returns raw transaction data of a transaction with the given hash.
EthGetRawTransactionByBlockNumberAndIndex(*EthGetRawTransactionByBlockNumberAndIndexParams) (*EthGetRawTransactionByBlockNumberAndIndexResult, error)
// Returns an array of all logs matching a given filter object.
EthGetLogs(*EthGetLogsParams) (*EthGetLogsResult, error)
// Gets a storage value from a contract address, a position, and an optional blockNumber
EthGetStorageAt(*EthGetStorageAtParams) (*EthGetStorageAtResult, error)
// Returns the information about a transaction requested by the block hash and index of which it was mined.
EthGetTransactionByBlockHashAndIndex(*EthGetTransactionByBlockHashAndIndexParams) (*EthGetTransactionByBlockHashAndIndexResult, error)
// Returns the information about a transaction requested by the block hash and index of which it was mined.
EthGetTransactionByBlockNumberAndIndex(*EthGetTransactionByBlockNumberAndIndexParams) (*EthGetTransactionByBlockNumberAndIndexResult, error)
// Returns the information about a transaction requested by transaction hash.
EthGetTransactionByHash(*EthGetTransactionByHashParams) (*EthGetTransactionByHashResult, error)
// Returns the number of transactions sent from an address
EthGetTransactionCount(*EthGetTransactionCountParams) (*EthGetTransactionCountResult, error)
// Returns the receipt information of a transaction by its hash.
EthGetTransactionReceipt(*EthGetTransactionReceiptParams) (*EthGetTransactionReceiptResult, error)
// Returns information about a uncle of a block by hash and uncle index position.
EthGetUncleByBlockHashAndIndex(*EthGetUncleByBlockHashAndIndexParams) (*EthGetUncleByBlockHashAndIndexResult, error)
// Returns information about a uncle of a block by hash and uncle index position.
EthGetUncleByBlockNumberAndIndex(*EthGetUncleByBlockNumberAndIndexParams) (*EthGetUncleByBlockNumberAndIndexResult, error)
// Returns the number of uncles in a block from a block matching the given block hash.
EthGetUncleCountByBlockHash(*EthGetUncleCountByBlockHashParams) (*EthGetUncleCountByBlockHashResult, error)
// Returns the number of uncles in a block from a block matching the given block number.
EthGetUncleCountByBlockNumber(*EthGetUncleCountByBlockNumberParams) (*EthGetUncleCountByBlockNumberResult, error)
// Returns the account- and storage-values of the specified account including the Merkle-proof.
EthGetProof(*EthGetProofParams) (*EthGetProofResult, error)
// Returns the hash of the current block, the seedHash, and the boundary condition to be met ('target').
EthGetWork() (*EthGetWorkResult, error)
// Returns the number of hashes per second that the node is mining with.
EthHashrate() (*EthHashrateResult, error)
// Returns true if client is actively mining new blocks.
EthMining() (*EthMiningResult, error)
// Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges.
EthNewBlockFilter() (*EthNewBlockFilterResult, error)
// Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth_getFilterChanges.
EthNewFilter(*EthNewFilterParams) (*EthNewFilterResult, error)
// Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call eth_getFilterChanges.
EthNewPendingTransactionFilter() (*EthNewPendingTransactionFilterResult, error)
// Returns the pending transactions list
EthPendingTransactions() (*EthPendingTransactionsResult, error)
// Returns the current ethereum protocol version.
EthProtocolVersion() (*EthProtocolVersionResult, error)
// The sign method calculates an Ethereum specific signature.
EthSign(*EthSignParams) (*EthSignResult, error)
// Returns a list of addresses owned by client.
EthAccounts() (*EthAccountsResult, error)
// Creates new message call transaction or a contract creation, if the data field contains code.
EthSendTransaction(*EthSendTransactionParams) (*EthSendTransactionResult, error)
// Creates new message call transaction or a contract creation for signed transactions.
EthSendRawTransaction(*EthSendRawTransactionParams) (*EthSendRawTransactionResult, error)
// Returns an array of all logs matching a given filter object.
EthSubmitHashrate(*EthSubmitHashrateParams) (*EthSubmitHashrateResult, error)
// Used for submitting a proof-of-work solution.
EthSubmitWork(*EthSubmitWorkParams) (*EthSubmitWorkResult, error)
// Returns an object with data about the sync status or false.
EthSyncing() (*EthSyncingResult, error)
// Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with eth_getFilterChanges for a period of time.
EthUninstallFilter(*EthUninstallFilterParams) (*EthUninstallFilterResult, error)
}
type Web3ClientVersionResult struct {
// client version
ClientVersion string `json:"clientVersion"`
}
type Web3Sha3Params struct {
// data to hash using the Keccak-256 algorithm
Data string `json:"data"`
}
type Web3Sha3Result struct {
// Hex representation of a Keccak 256 hash
HashedData string `json:"hashedData"`
}
type NetListeningResult struct {
// `true` if listening is active or `false` if listening is not active
IsNetListening bool `json:"isNetListening"`
}
type NetPeerCountResult struct {
// Hex representation of number of connected peers
NumConnectedPeers string `json:"numConnectedPeers"`
}
type NetVersionResult struct {
// chain ID associated with the current network
ChainID string `json:"chainID"`
}
type BlockNumber struct {
// The hex representation of the block's height
BlockNumber string `json:"blockNumber"`
}
type EthBlockNumberResult struct {
BlockNumber string `json:"blockNumber"`
}
type TransactionIndex struct {
// Hex representation of the integer
Integer string `json:"integer"`
}
type Transaction struct {
// Integer of the transaction's index position in the block. null when its pending
TransactionIndex string `json:"transactionIndex"`
// Hash of the block where this transaction was in. null when its pending
BlockHash string `json:"blockHash"`
// Address of the sender
From string `json:"from"`
// Hex representation of a Keccak 256 hash
Hash string `json:"hash"`
// The data field sent with the transaction
Data string `json:"data"`
// A number only to be used once
Nonce string `json:"nonce"`
// The gas limit provided by the sender in Wei
Gas string `json:"gas"`
// Hex representation of a Keccak 256 hash
Value string `json:"value"`
// ECDSA recovery id
V string `json:"v"`
// ECDSA signature s
S string `json:"s"`
// The gas price willing to be paid by the sender in Wei
GasPrice string `json:"gasPrice"`
// address of the receiver. null when its a contract creation transaction
To string `json:"to"`
// Block number where this transaction was in. null when its pending
BlockNumber string `json:"blockNumber"`
// ECDSA signature r
R string `json:"r"`
}
type BlockHash struct {
// Hex representation of a Keccak 256 hash
Keccak string `json:"keccak"`
}
type EthCallParams struct {
Transaction
BlockNumber string `json:"blockNumber"`
}
type EthCallResult struct {
// Hex representation of a variable length byte array
ReturnValue string `json:"returnValue"`
}
type EthChainIdResult struct {
// hex format integer of the current chain id. Defaults are mainnet=61, morden=62.
ChainId string `json:"chainId"`
}
type EthCoinbaseResult struct {
// The address owned by the client that is used as default for things like the mining reward
Address string `json:"address"`
}
type EthEstimateGasParams struct {
Transaction
}
type EthEstimateGasResult struct {
// Hex representation of the integer
GasUsed string `json:"gasUsed"`
}
type EthGasPriceResult struct {
// Hex representation of the integer
GasPrice string `json:"gasPrice"`
}
type EthGetBalanceParams struct {
// The address of the account or contract
Address string `json:"address"`
// The hex representation of the block's height
BlockNumber string `json:"blockNumber"`
}
type GetBalanceResult struct {
// Hex representation of the integer
Integer string `json:"integer"`
}
type EthGetBalanceResult struct {
GetBalanceResult string `json:"getBalanceResult"`
}
type EthGetBlockByHashParams struct {
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
// If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.
IsTransactionsIncluded bool `json:"isTransactionsIncluded"`
}
type Block struct {
// Hex representation of a Keccak 256 hash
Sha3Uncles string `json:"sha3Uncles"`
// Hex representation of a Keccak 256 hash
TransactionsRoot string `json:"transactionsRoot"`
// Hex representation of a Keccak 256 hash
ParentHash string `json:"parentHash"`
// The address of the beneficiary to whom the mining rewards were given or null when its the pending block
Miner string `json:"miner"`
// Integer of the difficulty for this block
Difficulty string `json:"difficulty"`
// The total used gas by all transactions in this block
GasUsed string `json:"gasUsed"`
// The unix timestamp for when the block was collated
Timestamp string `json:"timestamp"`
// Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter
Transactions []Transactions `json:"transactions"`
// The block number or null when its the pending block
Number string `json:"number"`
// The block hash or null when its the pending block
Hash string `json:"hash"`
// Array of uncle hashes
Uncles []string `json:"uncles"`
// Hex representation of a Keccak 256 hash
ReceiptsRoot string `json:"receiptsRoot"`
// The 'extra data' field of this block
ExtraData string `json:"extraData"`
// Hex representation of a Keccak 256 hash
StateRoot string `json:"stateRoot"`
// Integer of the total difficulty of the chain until this block
TotalDifficulty string `json:"totalDifficulty"`
// Integer the size of this block in bytes
Size string `json:"size"`
// The maximum gas allowed in this block
GasLimit string `json:"gasLimit"`
// Randomly selected number to satisfy the proof-of-work or null when its the pending block
Nonce string `json:"nonce"`
// The bloom filter for the logs of the block or null when its the pending block
LogsBloom string `json:"logsBloom"`
}
type Miner struct {
Address string `json:"address"`
}
type Transactions struct {
Transaction
}
type Number struct {
// Hex representation of the integer
Integer string `json:"integer"`
}
type Hash struct {
// Hex representation of a Keccak 256 hash
Keccak string `json:"keccak"`
}
type Uncles struct {
// Hex representation of a Keccak 256 hash
Keccak string `json:"keccak"`
}
type TotalDifficulty struct {
// Hex representation of the integer
Integer string `json:"integer"`
}
type Nonce struct {
// Hex representation of the integer
Integer string `json:"integer"`
}
type GetBlockByHashResult struct {
Block
}
type EthGetBlockByHashResult struct {
GetBlockByHashResult Block `json:"getBlockByHashResult"`
}
type EthGetBlockByNumberParams struct {
BlockNumber string `json:"blockNumber"`
// If `true` it returns the full transaction objects, if `false` only the hashes of the transactions.
IsTransactionsIncluded bool `json:"isTransactionsIncluded"`
}
type GetBlockByNumberResult struct {
Block
}
type EthGetBlockByNumberResult struct {
GetBlockByNumberResult Block `json:"getBlockByNumberResult"`
}
type EthGetBlockTransactionCountByHashParams struct {
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
}
type BlockTransactionCountByHash struct {
// Hex representation of the integer
Integer string `json:"integer"`
}
type EthGetBlockTransactionCountByHashResult struct {
// The Number of total transactions in the given block
BlockTransactionCountByHash string `json:"blockTransactionCountByHash"`
}
type EthGetBlockTransactionCountByNumberParams struct {
BlockNumber string `json:"blockNumber"`
}
type EthGetBlockTransactionCountByNumberResult struct {
// The Number of total transactions in the given block
BlockTransactionCountByHash string `json:"blockTransactionCountByHash"`
}
type EthGetCodeParams struct {
// The address of the contract
Address string `json:"address"`
// The hex representation of the block's height
BlockNumber string `json:"blockNumber"`
}
type EthGetCodeResult struct {
// Hex representation of a variable length byte array
Bytes string `json:"bytes"`
}
type EthGetFilterChangesParams struct {
// An identifier used to reference the filter.
FilterId string `json:"filterId"`
}
type Log struct {
Topics []Topics `json:"topics"`
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
// Sender of the transaction
Address string `json:"address"`
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
// The hex representation of the block's height
BlockNumber string `json:"blockNumber"`
// Hex representation of a variable length byte array
Data string `json:"data"`
// Hex representation of the integer
LogIndex string `json:"logIndex"`
// Hex representation of the integer
TransactionIndex string `json:"transactionIndex"`
}
type LogResult struct {
// An indexed event generated during a transaction
Log
Topics []Topics `json:"topics"`
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
// Sender of the transaction
Address string `json:"address"`
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
// The hex representation of the block's height
BlockNumber string `json:"blockNumber"`
// Hex representation of a variable length byte array
Data string `json:"data"`
// Hex representation of the integer
LogIndex string `json:"logIndex"`
// Hex representation of the integer
TransactionIndex string `json:"transactionIndex"`
}
type EthGetFilterChangesResult struct {
LogResult []LogResult `json:"logResult"`
}
type EthGetFilterLogsParams struct {
// An identifier used to reference the filter.
FilterId string `json:"filterId"`
}
type Logs struct {
// An indexed event generated during a transaction
Log
// Hex representation of the integer
LogIndex string `json:"logIndex"`
// Hex representation of the integer
TransactionIndex string `json:"transactionIndex"`
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
// Sender of the transaction
Address string `json:"address"`
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
// The hex representation of the block's height
BlockNumber string `json:"blockNumber"`
// Hex representation of a variable length byte array
Data string `json:"data"`
Topics []Topics `json:"topics"`
}
type EthGetFilterLogsResult struct {
Logs []Logs `json:"logs"`
}
type EthGetRawTransactionByHashParams struct {
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
}
type EthGetRawTransactionByHashResult struct {
// Hex representation of a variable length byte array
RawTransactionByHash string `json:"rawTransactionByHash"`
}
type EthGetRawTransactionByBlockHashAndIndexParams struct {
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
// Hex representation of the integer
Index string `json:"index"`
}
type EthGetRawTransactionByBlockHashAndIndexResult struct {
// Hex representation of a variable length byte array
RawTransaction string `json:"rawTransaction"`
}
type EthGetRawTransactionByBlockNumberAndIndexParams struct {
BlockNumber string `json:"blockNumber"`
// Hex representation of the integer
Index string `json:"index"`
}
type EthGetRawTransactionByBlockNumberAndIndexResult struct {
// Hex representation of a variable length byte array
RawTransaction string `json:"rawTransaction"`
}
type Filter struct {
// The hex representation of the block's height
FromBlock string `json:"fromBlock"`
// The hex representation of the block's height
ToBlock string `json:"toBlock"`
Address string `json:"address"`
// Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with 'or' options
Topics []string `json:"topics"`
}
type Address struct {
// Address of the contract from which to monitor events
Address string `json:"address"`
}
type Topics struct {
// Hex representation of a 256 bit unit of data
DataWord string `json:"dataWord"`
}
type EthGetLogsParams struct {
// A filter used to monitor the blockchain for log/events
Filter
}
type EthGetLogsResult struct {
Logs []Logs `json:"logs"`
}
type EthGetStorageAtParams struct {
Address string `json:"address"`
// Hex representation of the storage slot where the variable exists
Position string `json:"position"`
BlockNumber string `json:"blockNumber"`
}
type EthGetStorageAtResult struct {
// Hex representation of a 256 bit unit of data
DataWord string `json:"dataWord"`
}
type EthGetTransactionByBlockHashAndIndexParams struct {
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
// Hex representation of the integer
Index string `json:"index"`
}
type TransactionResult struct {
Transaction
}
type EthGetTransactionByBlockHashAndIndexResult struct {
TransactionResult Transaction `json:"transactionResult"`
}
type EthGetTransactionByBlockNumberAndIndexParams struct {
BlockNumber string `json:"blockNumber"`
// Hex representation of the integer
Index string `json:"index"`
}
type EthGetTransactionByBlockNumberAndIndexResult struct {
TransactionResult Transaction `json:"transactionResult"`
}
type EthGetTransactionByHashParams struct {
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
}
type EthGetTransactionByHashResult struct {
Transaction
}
type EthGetTransactionCountParams struct {
Address string `json:"address"`
BlockNumber string `json:"blockNumber"`
}
type NonceOrNull struct {
// A number only to be used once
Nonce string `json:"nonce"`
}
type EthGetTransactionCountResult struct {
NonceOrNull string `json:"nonceOrNull"`
}
type EthGetTransactionReceiptParams struct {
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
}
type Receipt struct {
// The hex representation of the block's height
BlockNumber string `json:"blockNumber"`
// Hex representation of the integer
CumulativeGasUsed string `json:"cumulativeGasUsed"`
// Hex representation of the integer
GasUsed string `json:"gasUsed"`
// An array of all the logs triggered during the transaction
Logs []Logs `json:"logs"`
// A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series
TransactionIndex string `json:"transactionIndex"`
// Whether or not the transaction threw an error.
Status string `json:"status"`
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
// The contract address created, if the transaction was a contract creation, otherwise null
ContractAddress string `json:"contractAddress"`
// The sender of the transaction
From string `json:"from"`
// A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series
LogsBloom string `json:"logsBloom"`
// Destination address of the transaction
To string `json:"to"`
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
}
type EthGetTransactionReceiptResult struct {
// returns either a receipt or null
Receipt
}
type EthGetUncleByBlockHashAndIndexParams struct {
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
// Hex representation of the integer
Index string `json:"index"`
}
type Uncle struct {
// Randomly selected number to satisfy the proof-of-work or null when its the pending block
Nonce string `json:"nonce"`
// Hex representation of a Keccak 256 hash
TransactionsRoot string `json:"transactionsRoot"`
// Integer of the total difficulty of the chain until this block
TotalDifficulty string `json:"totalDifficulty"`
// Integer the size of this block in bytes
Size string `json:"size"`
// The total used gas by all transactions in this block
GasUsed string `json:"gasUsed"`
// Array of uncle hashes
Uncles []string `json:"uncles"`
// The block number or null when its the pending block
Number string `json:"number"`
// The block hash or null when its the pending block
Hash string `json:"hash"`
// Hex representation of a Keccak 256 hash
Sha3Uncles string `json:"sha3Uncles"`
// Hex representation of a Keccak 256 hash
StateRoot string `json:"stateRoot"`
// The 'extra data' field of this block
ExtraData string `json:"extraData"`
// The unix timestamp for when the block was collated
Timestamp string `json:"timestamp"`
// Hex representation of a Keccak 256 hash
ReceiptsRoot string `json:"receiptsRoot"`
// The address of the beneficiary to whom the mining rewards were given or null when its the pending block
Miner string `json:"miner"`
// The maximum gas allowed in this block
GasLimit string `json:"gasLimit"`
// Hex representation of a Keccak 256 hash
ParentHash string `json:"parentHash"`
// The bloom filter for the logs of the block or null when its the pending block
LogsBloom string `json:"logsBloom"`
// Integer of the difficulty for this block
Difficulty string `json:"difficulty"`
}
type UncleOrNull struct {
// Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions.
Uncle
}
type EthGetUncleByBlockHashAndIndexResult struct {
UncleOrNull Uncle `json:"uncleOrNull"`
}
type EthGetUncleByBlockNumberAndIndexParams struct {
// The hex representation of the block's height
UncleBlockNumber string `json:"uncleBlockNumber"`
// Hex representation of the integer
Index string `json:"index"`
}
type UncleResult struct {
// Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions.
Uncle
}
type EthGetUncleByBlockNumberAndIndexResult struct {
// returns an uncle or null
UncleResult Uncle `json:"uncleResult"`
}
type EthGetUncleCountByBlockHashParams struct {
// The hex representation of the Keccak 256 of the RLP encoded block
BlockHash string `json:"blockHash"`
}
type UncleCountOrNull struct {
// Hex representation of the integer
Integer string `json:"integer"`
}
type EthGetUncleCountByBlockHashResult struct {
UncleCountOrNull string `json:"uncleCountOrNull"`
}
type EthGetUncleCountByBlockNumberParams struct {
BlockNumber string `json:"blockNumber"`
}
type EthGetUncleCountByBlockNumberResult struct {
UncleCountOrNull string `json:"uncleCountOrNull"`
}
type EthGetProofParams struct {
// The address of the account or contract
Address string `json:"address"`
// The storage keys of all the storage slots being requested
StorageKeys []string `json:"storageKeys"`
BlockNumber string `json:"blockNumber"`
}
type StorageKeys struct {
// Hex representation of the integer
Integer string `json:"integer"`
}
type ProofAccount struct {
// Hex representation of the integer
Balance string `json:"balance"`
// Hex representation of a Keccak 256 hash
CodeHash string `json:"codeHash"`
// A number only to be used once
Nonce string `json:"nonce"`
// Hex representation of a Keccak 256 hash
StorageHash string `json:"storageHash"`
// Current block header PoW hash.
StorageProof []StorageProof `json:"storageProof"`
// The address of the account or contract of the request
Address string `json:"address"`
// The set of node values needed to traverse a patricia merkle tree (from root to leaf) to retrieve a value
AccountProof []string `json:"accountProof"`
}
type Proof struct {
// Hex representation of a variable length byte array
ProofNode string `json:"proofNode"`
}
type StorageProof struct {
// The set of node values needed to traverse a patricia merkle tree (from root to leaf) to retrieve a value
Proof []string `json:"proof"`
// Hex representation of the integer
Key string `json:"key"`
// Hex representation of the integer
Value string `json:"value"`
}
type AccountProof struct {
// Hex representation of a variable length byte array
ProofNode string `json:"proofNode"`
}
type ProofAccountOrNull struct {
// The merkle proofs of the specified account connecting them to the blockhash of the block specified
ProofAccount
}
type EthGetProofResult struct {
ProofAccountOrNull ProofAccount `json:"proofAccountOrNull"`
}
type EthGetWorkResult struct {
Work []string `json:"work"`
}
type EthHashrateResult struct {
// Hex representation of the integer
HashesPerSecond string `json:"hashesPerSecond"`
}
type EthMiningResult struct {
// Whether of not the client is mining
Mining bool `json:"mining"`
}
type EthNewBlockFilterResult struct {
// Hex representation of the integer
FilterId string `json:"filterId"`
}
type EthNewFilterParams struct {
// A filter used to monitor the blockchain for log/events
Filter
}
type EthNewFilterResult struct {
// Hex representation of the integer
FilterId string `json:"filterId"`
}
type EthNewPendingTransactionFilterResult struct {
// Hex representation of the integer
FilterId string `json:"filterId"`
}
type PendingTransactions struct {
Transaction
// Integer of the transaction's index position in the block. null when its pending
TransactionIndex string `json:"transactionIndex"`
// Hash of the block where this transaction was in. null when its pending
BlockHash string `json:"blockHash"`
// Address of the sender
From string `json:"from"`
// Hex representation of a Keccak 256 hash
Hash string `json:"hash"`
// The data field sent with the transaction
Data string `json:"data"`
// A number only to be used once
Nonce string `json:"nonce"`
// The gas limit provided by the sender in Wei
Gas string `json:"gas"`
// Hex representation of a Keccak 256 hash
Value string `json:"value"`
// ECDSA recovery id
V string `json:"v"`
// ECDSA signature s
S string `json:"s"`
// The gas price willing to be paid by the sender in Wei
GasPrice string `json:"gasPrice"`
// address of the receiver. null when its a contract creation transaction
To string `json:"to"`
// Block number where this transaction was in. null when its pending
BlockNumber string `json:"blockNumber"`
// ECDSA signature r
R string `json:"r"`
}
type EthPendingTransactionsResult struct {
PendingTransactions []PendingTransactions `json:"pendingTransactions"`
}
type EthProtocolVersionResult struct {
// Hex representation of the integer
ProtocolVersion string `json:"protocolVersion"`
}
type EthSignParams struct {
Address string `json:"address"`
// Hex representation of a variable length byte array
Bytes string `json:"bytes"`
}
type EthSignResult struct {
// Hex representation of a variable length byte array
Signature string `json:"signature"`
}
type Addresses struct {
Address string `json:"address"`
}
type EthAccountsResult struct {
// addresses owned by the client
Addresses []string `json:"addresses"`
}
type EthSendTransactionParams struct {
Transaction
}
type EthSendTransactionResult struct {
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
}
type EthSendRawTransactionParams struct {
// Hex representation of a variable length byte array
SignedTransactionData string `json:"signedTransactionData"`
}
type EthSendRawTransactionResult struct {
// Hex representation of a Keccak 256 hash
TransactionHash string `json:"transactionHash"`
}
type EthSubmitHashrateParams struct {
// Hex representation of a 256 bit unit of data
HashRate string `json:"hashRate"`
// Hex representation of a 256 bit unit of data
Id string `json:"id"`
}
type EthSubmitHashrateResult struct {
// whether of not submitting went through successfully
SubmitHashRateSuccess bool `json:"submitHashRateSuccess"`
}
type EthSubmitWorkParams struct {
// A number only to be used once
Nonce string `json:"nonce"`
// Hex representation of a 256 bit unit of data
PowHash string `json:"powHash"`
// Hex representation of a 256 bit unit of data
MixHash string `json:"mixHash"`
}
type EthSubmitWorkResult struct {
// Whether or not the provided solution is valid
SolutionValid bool `json:"solutionValid"`
}
type SyncStatus struct {
// Hex representation of the integer
StartingBlock string `json:"startingBlock"`
// Hex representation of the integer
CurrentBlock string `json:"currentBlock"`
// Hex representation of the integer
HighestBlock string `json:"highestBlock"`
// Hex representation of the integer
KnownStates string `json:"knownStates"`
// Hex representation of the integer
PulledStates string `json:"pulledStates"`
}
type Syncing struct {
// An object with sync status data
SyncStatus
}
type EthSyncingResult struct {
Syncing SyncStatus `json:"syncing"`
}
type EthUninstallFilterParams struct {
// An identifier used to reference the filter.
FilterId string `json:"filterId"`
}
type EthUninstallFilterResult struct {
// Whether of not the filter was successfully uninstalled
FilterUninstalledSuccess bool `json:"filterUninstalledSuccess"`
}