UNPKG

3.11 kBTypeScriptView Raw
1import { BlockParam, BlockWithoutTransactionData, BlockWithTransactionData, CallData, CallTxDataBase, GethCallOverrides, LogEntry, RawLogEntry, Transaction, TransactionReceipt, TxData } from 'ethereum-types';
2import { BlockWithoutTransactionDataRPC, BlockWithTransactionDataRPC, CallDataRPC, CallTxDataBaseRPC, GethCallOverridesRPC, TransactionReceiptRPC, TransactionRPC, TxDataRPC } from './types';
3/**
4 * Utils to convert ethereum structures from user-space format to RPC format. (marshall/unmarshall)
5 */
6export declare const marshaller: {
7 /**
8 * Unmarshall block without transaction data
9 * @param blockWithHexValues block to unmarshall
10 * @return unmarshalled block without transaction data
11 */
12 unmarshalIntoBlockWithoutTransactionData(blockWithHexValues: BlockWithoutTransactionDataRPC): BlockWithoutTransactionData;
13 /**
14 * Unmarshall block with transaction data
15 * @param blockWithHexValues block to unmarshall
16 * @return unmarshalled block with transaction data
17 */
18 unmarshalIntoBlockWithTransactionData(blockWithHexValues: BlockWithTransactionDataRPC): BlockWithTransactionData;
19 /**
20 * Unmarshall transaction
21 * @param txRpc transaction to unmarshall
22 * @return unmarshalled transaction
23 */
24 unmarshalTransaction(txRpc: TransactionRPC): Transaction;
25 /**
26 * Unmarshall transaction receipt
27 * @param txReceiptRpc transaction receipt to unmarshall
28 * @return unmarshalled transaction receipt
29 */
30 unmarshalTransactionReceipt(txReceiptRpc: TransactionReceiptRPC): TransactionReceipt;
31 /**
32 * Unmarshall transaction data
33 * @param txDataRpc transaction data to unmarshall
34 * @return unmarshalled transaction data
35 */
36 unmarshalTxData(txDataRpc: TxDataRPC): TxData;
37 /**
38 * Marshall transaction data
39 * @param txData transaction data to marshall
40 * @return marshalled transaction data
41 */
42 marshalTxData(txData: Partial<TxData>): Partial<TxDataRPC>;
43 /**
44 * Marshall call data
45 * @param callData call data to marshall
46 * @return marshalled call data
47 */
48 marshalCallData(callData: Partial<CallData>): Partial<CallDataRPC>;
49 /**
50 * Marshall call overrides parameter for for a geth eth_call.
51 * @param overrides overrides to marshal
52 * @return marshalled overrides
53 */
54 marshalCallOverrides(overrides: GethCallOverrides): GethCallOverridesRPC;
55 /**
56 * Marshall address
57 * @param address address to marshall
58 * @return marshalled address
59 */
60 marshalAddress(address: string): string;
61 /**
62 * Marshall block param
63 * @param blockParam block param to marshall
64 * @return marshalled block param
65 */
66 marshalBlockParam(blockParam: BlockParam | string | number | undefined): string | undefined;
67 /**
68 * Unmarshall log
69 * @param rawLog log to unmarshall
70 * @return unmarshalled log
71 */
72 unmarshalLog(rawLog: RawLogEntry): LogEntry;
73 _marshalCallTxDataBase(callTxDataBase: Partial<CallTxDataBase>): Partial<CallTxDataBaseRPC>;
74};
75//# sourceMappingURL=marshaller.d.ts.map
\No newline at end of file