1 | /// <reference types="node" />
|
2 | import { BufferLike, FakeTxData, PrefixedHexString, TransactionOptions } from './types';
|
3 | import Transaction from './transaction';
|
4 | /**
|
5 | * Creates a new transaction object that doesn't need to be signed.
|
6 | *
|
7 | * @param data - A transaction can be initialized with its rlp representation, an array containing
|
8 | * the value of its fields in order, or an object containing them by name.
|
9 | *
|
10 | * @param opts - The transaction's options, used to indicate the chain and hardfork the
|
11 | * transactions belongs to.
|
12 | *
|
13 | * @see Transaction
|
14 | */
|
15 | export default class FakeTransaction extends Transaction {
|
16 | /**
|
17 | * Set from address to bypass transaction signing.
|
18 | * This is not an optional property, as its getter never returns undefined.
|
19 | */
|
20 | from: Buffer;
|
21 | constructor(data?: Buffer | PrefixedHexString | BufferLike[] | FakeTxData, opts?: TransactionOptions);
|
22 | /**
|
23 | * Computes a sha3-256 hash of the serialized tx, using the sender address to generate a fake
|
24 | * signature.
|
25 | *
|
26 | * @param includeSignature - Whether or not to include the signature
|
27 | */
|
28 | hash(includeSignature?: boolean): Buffer;
|
29 | }
|