Constructors

Methods

  • Parses an EIP712 transaction from a payload.

    Parameters

    • payload: Bytes

      The payload to parse.

    Returns Eip712TxData

    const serializedTx =
    "0x71f87f8080808094a61464658afeaf65cccaafd3a512b69a83b77618830f42408001a073a20167b8d23b610b058c05368174495adf7da3a4ed4a57eb6dbdeb1fafc24aa02f87530d663a0d061f69bb564d2c6fb46ae5ae776bbd4bd2a2a4478b9cd1b42a82010e9436615cf349d7f6344891b1e7ca7c72883f5dc04982c350c080c0";
    const tx: types.TransactionLike = utils.parse(serializedTx);
    /*
    tx: types.Eip712TxData = {
    type: 113,
    nonce: 0,
    maxPriorityFeePerGas: BigInt(0),
    maxFeePerGas: BigInt(0),
    gasLimit: BigInt(0),
    to: "0xa61464658AfeAf65CccaaFD3a512b69A83B77618",
    value: BigInt(1000000),
    data: "0x",
    chainId: BigInt(270),
    from: "0x36615Cf349d7F6344891B1e7CA7C72883F5dc049",
    customData: {
    gasPerPubdata: BigInt(50000),
    factoryDeps: [],
    customSignature: "0x",
    paymasterParams: null,
    },
    hash: "0x9ed410ce33179ac1ff6b721060605afc72d64febfe0c08cacab5a246602131ee",
    };
    */
  • Parameters

    Returns (
        | string
        | number
        | string[]
        | Uint8Array
        | Uint8Array[])[]

  • Parameters

    • hash: string
    • privateKey: string

    Returns SignResult

  • Returns the hash of an EIP712 transaction.

    Parameters

    Returns string