diff --git a/src/eth/fill.yaml b/src/eth/fill.yaml new file mode 100644 index 000000000..aad77e44a --- /dev/null +++ b/src/eth/fill.yaml @@ -0,0 +1,11 @@ +- name: eth_fillTransaction + summary: Fills in missing transaction fields to be signed and submitted. + params: + - name: Transaction + required: true + schema: + $ref: '#/components/schemas/GenericTransaction' + result: + name: Transaction result + schema: + $ref: '#/components/schemas/FillTransactionResult' diff --git a/src/eth/sign.yaml b/src/eth/sign.yaml index 5ee2fa08d..807c9e9f8 100644 --- a/src/eth/sign.yaml +++ b/src/eth/sign.yaml @@ -31,20 +31,34 @@ schema: $ref: '#/components/schemas/GenericTransaction' result: - name: Encoded transaction + name: Transaction result schema: - $ref: '#/components/schemas/bytes' + $ref: '#/components/schemas/SignTransactionResult' examples: - name: eth_signTransaction example params: - name: Transaction value: - data: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675' - from: '0xb60e8dd61c5d32be8058bb8eb970870f07233155' + from: '0x9d8a62f656a8d1615c1294fd71e9cfb3e4855a4f' + nonce: '0x9' + to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' gas: '0x76c0' gasPrice: '0x9184e72a000' - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' value: '0x9184e72a' + input: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675' result: - name: Encoded transaction - value: '0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b' + name: Transaction result + value: + raw: '0xf892098609184e72a0008276c094d46e8dd67c5d32be8058bb8eb970870f07244567849184e72aa9d46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f07244567526a0839ebaab7774ffdae60d418fc8b4192d2cb861ac31acbb5fef26027d1b8f10aea015396a78493395691c10fccc33ec13f2eeb96a3ba2b4ca1652c91bb2b348d12b' + tx: + type: '0x0' + chainId: '0x1' + nonce: '0x9' + to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + gas: '0x76c0' + gasPrice: '0x9184e72a000' + value: '0x9184e72a' + input: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675' + v: '0x26' + r: '0x839ebaab7774ffdae60d418fc8b4192d2cb861ac31acbb5fef26027d1b8f10ae' + s: '0x15396a78493395691c10fccc33ec13f2eeb96a3ba2b4ca1652c91bb2b348d12b' diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 78b58859f..5f0f5ffd7 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -155,6 +155,34 @@ Transaction4844Unsigned: title: chainId description: Chain ID that this transaction is valid on $ref: '#/components/schemas/uint' +Transaction4844UnsignedWithSidecar: + title: Unsigned 4844 transaction with sidecar + type: object + allOf: + - $ref: '#/components/schemas/Transaction4844Unsigned' + - title: EIP-4844 transaction signature properties. + required: + - blobs + - commitments + - proofs + properties: + blobs: + title: blobs + description: Raw blob data. + type: array + items: + $ref: '#/components/schemas/bytes' + commitments: + title: Blob commitments. + type: array + items: + $ref: '#/components/schemas/bytes' + proofs: + title: Blob proofs. + description: Pre-PeerDAS this contains one KZG proof per blob (length == len(blobs)). Post-PeerDAS this contains cell proofs with length == 128 * len(blobs). + type: array + items: + $ref: '#/components/schemas/bytes' AccessListEntry: title: Access list entry type: object @@ -550,6 +578,18 @@ GenericTransaction: type: array items: $ref: '#/components/schemas/bytes' + commitments: + title: commitments + description: List of blob commitments as per EIP-4844. + type: array + items: + $ref: '#/components/schemas/bytes' + proofs: + title: proofs + description: List of blob proofs. Pre-PeerDAS this contains one KZG proof per blob (length == len(blobs)). Post-PeerDAS this contains cell proofs with length == 128 * len(blobs). + type: array + items: + $ref: '#/components/schemas/bytes' chainId: title: chainId description: Chain ID that this transaction is valid on. @@ -558,3 +598,33 @@ GenericTransaction: title: authorizationList description: EIP-7702 authorization list $ref: '#/components/schemas/AuthorizationList' +SignTransactionResult: + type: object + title: Encoded and raw signed transaction object. + required: + - raw + - tx + properties: + raw: + title: raw + $ref: '#/components/schemas/bytes' + tx: + title: tx + $ref: '#/components/schemas/TransactionSigned' +FilledTransaction: + oneOf: + - $ref: '#/components/schemas/Transaction7702Unsigned' + - $ref: '#/components/schemas/Transaction4844UnsignedWithSidecar' + - $ref: '#/components/schemas/Transaction4844Unsigned' + - $ref: '#/components/schemas/Transaction1559Unsigned' + - $ref: '#/components/schemas/Transaction2930Unsigned' + - $ref: '#/components/schemas/TransactionLegacyUnsigned' +FillTransactionResult: + type: object + title: Filled unsigned transaction object. + required: + - tx + properties: + tx: + title: tx + $ref: '#/components/schemas/FilledTransaction'