diff --git a/docs/concepts/suave-std/Context.mdx b/docs/concepts/suave-std/Context.mdx index a640edb4..d81d4153 100755 --- a/docs/concepts/suave-std/Context.mdx +++ b/docs/concepts/suave-std/Context.mdx @@ -6,16 +6,16 @@ Context is a library with functions to retrieve the context of the MEVM executio ### [confidentialInputs](https://github.com/flashbots/suave-std/tree/main/src/Context.sol#L10) -returns the confidential inputs of the confidential compute request. +Returns the confidential inputs of the confidential compute request. Output: -- "output": bytes of the confidential inputs. +- `output` (`bytes`): Bytes of the confidential inputs. ### [kettleAddress](https://github.com/flashbots/suave-std/tree/main/src/Context.sol#L16) -returns the address of the Kettle that executes the confidential compute request. +Returns the address of the Kettle that executes the confidential compute request. Output: -- "kettleAddress": address of the kettle. +- `kettleAddress` (`address`): Address of the kettle. diff --git a/docs/concepts/suave-std/Random.mdx b/docs/concepts/suave-std/Random.mdx index 6272f8e5..20625dbf 100755 --- a/docs/concepts/suave-std/Random.mdx +++ b/docs/concepts/suave-std/Random.mdx @@ -6,48 +6,48 @@ Random is a library with utilities to generate random data. ### [randomUint8](https://github.com/flashbots/suave-std/tree/main/src/Random.sol#L10) -generate a random uint8 number. +Generate a random uint8 number. Output: -- "value": is the random number +- `value` (`uint8`): Is the random number. ### [randomUint16](https://github.com/flashbots/suave-std/tree/main/src/Random.sol#L19) -generate a random uint16 number. +Generate a random uint16 number. Output: -- "value": is the random number +- `value` (`uint16`): Is the random number. ### [randomUint32](https://github.com/flashbots/suave-std/tree/main/src/Random.sol#L28) -generate a random uint32 number. +Generate a random uint32 number. Output: -- "value": is the random number +- `value` (`uint32`): Is the random number. ### [randomUint64](https://github.com/flashbots/suave-std/tree/main/src/Random.sol#L37) -generate a random uint64 number. +Generate a random uint64 number. Output: -- "value": is the random number +- `value` (`uint64`): Is the random number. ### [randomUint128](https://github.com/flashbots/suave-std/tree/main/src/Random.sol#L46) -generate a random uint128 number. +Generate a random uint128 number. Output: -- "value": is the random number +- `value` (`uint128`): Is the random number. ### [randomUint256](https://github.com/flashbots/suave-std/tree/main/src/Random.sol#L55) -generate a random uint256 number. +Generate a random uint256 number. Output: -- "value": is the random number +- `value` (`uint256`): Is the random number. diff --git a/docs/concepts/suave-std/Suapp.mdx b/docs/concepts/suave-std/Suapp.mdx index 34468ac2..18f69fe5 100755 --- a/docs/concepts/suave-std/Suapp.mdx +++ b/docs/concepts/suave-std/Suapp.mdx @@ -6,4 +6,4 @@ Suapp is a contract with general utilities for a Suapp. ### [emitOffchainLogs](https://github.com/flashbots/suave-std/tree/main/src/Suapp.sol#L9) -modifier to emit the offchain logs. +Modifier to emit the offchain logs. diff --git a/docs/concepts/suave-std/Transactions.mdx b/docs/concepts/suave-std/Transactions.mdx index 927ce775..8e3455e4 100755 --- a/docs/concepts/suave-std/Transactions.mdx +++ b/docs/concepts/suave-std/Transactions.mdx @@ -6,127 +6,127 @@ Transactions is a library with utilities to encode, decode and sign Ethereum tra ### [encodeRLP](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L109) -encode a EIP-155 transaction in RLP. +Encode a EIP-155 transaction in RLP. Input: -- "txStruct": is the transaction structure. +- `txStruct` ([EIP155](#eip155)): Is the transaction structure. Output: -- "output": the encoded RLP bytes. +- `output` (`bytes`): The encoded RLP bytes. ### [encodeRLP](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L133) -encode a EIP-1559 request transaction in RLP. +Encode a EIP-1559 request transaction in RLP. Input: -- "txStruct": is the transaction structure. +- `txStruct` ([EIP155Request](#eip155request)): Is the transaction structure. Output: -- "output": the encoded RLP bytes. +- `output` (`bytes`): The encoded RLP bytes. ### [encodeRLP](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L157) -encode a EIP-1559 transaction in RLP. +Encode a EIP-1559 transaction in RLP. Input: -- "txStruct": is the transaction structure. +- `txStruct` ([EIP1559](#eip1559)): Is the transaction structure. Output: -- "output": the encoded RLP bytes. +- `output` (`bytes`): The encoded RLP bytes. ### [encodeRLP](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L200) -encode a EIP-1559 request transaction in RLP. +Encode a EIP-1559 request transaction in RLP. Input: -- "txStruct": is the transaction structure. +- `txStruct` ([EIP1559Request](#eip1559request)): Is the transaction structure. Output: -- "output": the encoded RLP bytes. +- `output` (`bytes`): The encoded RLP bytes. ### [decodeRLP_EIP155](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L239) -decode a EIP-155 transaction from RLP. +Decode a EIP-155 transaction from RLP. Input: -- "rlp": is the encoded RLP bytes. +- `rlp` (`bytes`): Is the encoded RLP bytes. Output: -- "txStruct": the transaction structure. +- `txStruct` ([EIP155](#eip155)): The transaction structure. ### [decodeRLP_EIP155Request](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L267) -decode a EIP-155 request transaction from RLP. +Decode a EIP-155 request transaction from RLP. Input: -- "rlp": is the encoded RLP bytes. +- `rlp` (`bytes`): Is the encoded RLP bytes. Output: -- "txStruct": the transaction structure. +- `txStruct` ([EIP155Request](#eip155request)): The transaction structure. ### [decodeRLP_EIP1559](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L293) -decode a EIP-1559 transaction from RLP. +Decode a EIP-1559 transaction from RLP. Input: -- "rlp": is the encoded RLP bytes. +- `rlp` (`bytes`): Is the encoded RLP bytes. Output: -- "txStruct": the transaction structure. +- `txStruct` ([EIP1559](#eip1559)): The transaction structure. ### [decodeRLP_EIP1559Request](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L330) -decode a EIP-1559 request transaction from RLP. +Decode a EIP-1559 request transaction from RLP. Input: -- "rlp": is the encoded RLP bytes. +- `rlp` (`bytes`): Is the encoded RLP bytes. Output: -- "txStruct": the transaction structure. +- `txStruct` ([EIP1559Request](#eip1559request)): The transaction structure. ### [signTxn](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L371) -sign a EIP-155 transaction request. +Sign a EIP-155 transaction request. Input: -- "request": is the transaction request. +- `request` ([EIP1559Request](#eip1559request)): Is the transaction request. -- "signingKey": is the private key to sign the transaction. +- `signingKey` (`string`): Is the private key to sign the transaction. Output: -- "response": the signed transaction. +- `response` ([EIP1559](#eip1559)): The signed transaction. ### [signTxn](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L400) -sign a EIP-155 transaction request. +Sign a EIP-155 transaction request. Input: -- "request": is the transaction request. +- `request` ([EIP155Request](#eip155request)): Is the transaction request. -- "signingKey": is the private key to sign the transaction. +- `signingKey` (`string`): Is the private key to sign the transaction. Output: -- "response": the signed transaction. +- `response` ([EIP155](#eip155)): The signed transaction. ## Structs @@ -134,56 +134,56 @@ Output: EIP-155 transaction structure. -- "to": is the target address. -- "gas": is the gas limit. -- "gasPrice": is the gas price. -- "value": is the transfer value in gwei. -- "nonce": is the latest nonce of the sender. -- "data": is the transaction data. -- "chainId": is the id of the chain where the transaction will be executed. -- "r": is the 'r' signature value. -- "s": is the 's' signature value. -- "v": is the 'v' signature value. +- `to` (`address`): Is the target address. +- `gas` (`uint256`): Is the gas limit. +- `gasPrice` (`uint256`): Is the gas price. +- `value` (`uint256`): Is the transfer value in gwei. +- `nonce` (`uint256`): Is the latest nonce of the sender. +- `data` (`bytes`): Is the transaction data. +- `chainId` (`uint256`): Is the id of the chain where the transaction will be executed. +- `r` (`bytes32`): Is the 'r' signature value. +- `s` (`bytes32`): Is the 's' signature value. +- `v` (`uint256`): Is the 'v' signature value. ### [EIP155Request](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L46) EIP-155 transaction request structure. -- "to": is the target address. -- "gas": is the gas limit. -- "gasPrice": is the gas price. -- "value": is the transfer value in gwei. -- "nonce": is the latest nonce of the sender. -- "data": is the transaction data. -- "chainId": is the id of the chain where the transaction will be executed. +- `to` (`address`): Is the target address. +- `gas` (`uint256`): Is the gas limit. +- `gasPrice` (`uint256`): Is the gas price. +- `value` (`uint256`): Is the transfer value in gwei. +- `nonce` (`uint256`): Is the latest nonce of the sender. +- `data` (`bytes`): Is the transaction data. +- `chainId` (`uint256`): Is the id of the chain where the transaction will be executed. ### [EIP1559](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L69) EIP-1559 transaction structure. -- "to": is the target address. -- "gas": is the gas limit. -- "maxFeePerGas": is the maximum fee per gas. -- "maxPriorityFeePerGas": is the maximum priority fee per gas. -- "value": is the transfer value in gwei. -- "nonce": is the latest nonce of the sender. -- "data": is the transaction data. -- "chainId": is the id of the chain where the transaction will be executed. -- "accessList": is the access list. -- "r": is the 'r' signature value. -- "s": is the 's' signature value. -- "v": is the 'v' signature value. +- `to` (`address`): Is the target address. +- `gas` (`uint256`): Is the gas limit. +- `maxFeePerGas` (`uint256`): Is the maximum fee per gas. +- `maxPriorityFeePerGas` (`uint256`): Is the maximum priority fee per gas. +- `value` (`uint256`): Is the transfer value in gwei. +- `nonce` (`uint256`): Is the latest nonce of the sender. +- `data` (`bytes`): Is the transaction data. +- `chainId` (`uint256`): Is the id of the chain where the transaction will be executed. +- `accessList` (`bytes`): Is the access list. +- `r` (`bytes32`): Is the 'r' signature value. +- `s` (`bytes32`): Is the 's' signature value. +- `v` (`uint256`): Is the 'v' signature value. ### [EIP1559Request](https://github.com/flashbots/suave-std/tree/main/src/Transactions.sol#L94) EIP-1559 transaction request structure. -- "to": is the target address. -- "gas": is the gas limit. -- "maxFeePerGas": is the maximum fee per gas. -- "maxPriorityFeePerGas": is the maximum priority fee per gas. -- "value": is the transfer value in gwei. -- "nonce": is the latest nonce of the sender. -- "data": is the transaction data. -- "chainId": is the id of the chain where the transaction will be executed. -- "accessList": is the access list. +- `to` (`address`): Is the target address. +- `gas` (`uint256`): Is the gas limit. +- `maxFeePerGas` (`uint256`): Is the maximum fee per gas. +- `maxPriorityFeePerGas` (`uint256`): Is the maximum priority fee per gas. +- `value` (`uint256`): Is the transfer value in gwei. +- `nonce` (`uint256`): Is the latest nonce of the sender. +- `data` (`bytes`): Is the transaction data. +- `chainId` (`uint256`): Is the id of the chain where the transaction will be executed. +- `accessList` (`bytes`): Is the access list. diff --git a/docs/concepts/suave-std/protocols/Bundle.mdx b/docs/concepts/suave-std/protocols/Bundle.mdx index edf87b8e..bd491b90 100755 --- a/docs/concepts/suave-std/protocols/Bundle.mdx +++ b/docs/concepts/suave-std/protocols/Bundle.mdx @@ -1,31 +1,42 @@ # Bundle -Bundle is a library with utilities to interact with the Flashbots bundle API described in https://docs.flashbots.net/flashbots-auction/advanced/rpc-endpoint#eth_sendbundle +Bundle is a library with utilities to interact with the Flashbots bundle API described in https://docs.flashbots.net/flashbots-auction/advanced/rpc-endpoint#eth_sendbundle. ## Functions -### [sendBundle](https://github.com/flashbots/suave-std/tree/main/src/protocols/Bundle.sol#L25) +### [sendBundle](https://github.com/flashbots/suave-std/tree/main/src/protocols/Bundle.sol#L30) -send a bundle to the Flashbots relay. +Send a bundle to the Flashbots relay. Input: -- "url": the URL of the Flashbots relay. +- `url` (`string`): The URL of the Flashbots relay. -- "bundle": the bundle to send. +- `bundle` ([BundleObj](#bundleobj)): The bundle to send. Output: -- "response": raw bytes response from the Flashbots relay. +- `response` (`bytes`): Raw bytes response from the Flashbots relay. -### [decodeBundle](https://github.com/flashbots/suave-std/tree/main/src/protocols/Bundle.sol#L77) +### [decodeBundle](https://github.com/flashbots/suave-std/tree/main/src/protocols/Bundle.sol#L82) -decode a bundle from a JSON string. +Decode a bundle from a JSON string. Input: -- "bundleJson": the JSON string of the bundle. +- `bundleJson` (`string`): The JSON string of the bundle. Output: -- "bundle": the decoded bundle. +- `bundle` ([BundleObj](#bundleobj)): The decoded bundle. + +## Structs + +### [BundleObj](https://github.com/flashbots/suave-std/tree/main/src/protocols/Bundle.sol#L16) + +BundleObj is a struct that represents a bundle to be sent to the Flashbots relay. + +- `blockNumber` (`uint64`): The block number at which the bundle should be executed. +- `minTimestamp` (`uint64`): The minimum timestamp at which the bundle should be executed. +- `maxTimestamp` (`uint64`): The maximum timestamp at which the bundle should be executed. +- `txns` (``): The transactions to be included in the bundle. diff --git a/docs/concepts/suave-std/protocols/ChatGPT.mdx b/docs/concepts/suave-std/protocols/ChatGPT.mdx index bf9a49a2..61c3273b 100755 --- a/docs/concepts/suave-std/protocols/ChatGPT.mdx +++ b/docs/concepts/suave-std/protocols/ChatGPT.mdx @@ -6,20 +6,20 @@ ChatGPT is a library with utilities to interact with the OpenAI ChatGPT API. ### [constructor](https://github.com/flashbots/suave-std/tree/main/src/protocols/ChatGPT.sol#L25) -constructor to create a ChatGPT instance. +Constructor to create a ChatGPT instance. Input: -- "_apiKey": the API key to interact with the OpenAI ChatGPT. +- `_apiKey` (`string`): The API key to interact with the OpenAI ChatGPT. ### [complete](https://github.com/flashbots/suave-std/tree/main/src/protocols/ChatGPT.sol#L32) -complete a chat with the OpenAI ChatGPT. +Complete a chat with the OpenAI ChatGPT. Input: -- "messages": the messages to complete the chat. +- `messages` (``): The messages to complete the chat. Output: -- "message": the response from the OpenAI ChatGPT. +- `message` (`string`): The response from the OpenAI ChatGPT. diff --git a/docs/concepts/suave-std/protocols/EthJsonRPC.mdx b/docs/concepts/suave-std/protocols/EthJsonRPC.mdx index 1db59cbd..bc41748a 100755 --- a/docs/concepts/suave-std/protocols/EthJsonRPC.mdx +++ b/docs/concepts/suave-std/protocols/EthJsonRPC.mdx @@ -6,12 +6,12 @@ EthJsonRPC is a library with utilities to interact with an Ethereum JSON-RPC end ### [nonce](https://github.com/flashbots/suave-std/tree/main/src/protocols/EthJsonRPC.sol#L21) -get the nonce of an address. +Get the nonce of an address. Input: -- "addr": the address to get the nonce. +- `addr` (`address`): The address to get the nonce. Output: -- "val": the nonce of the address. +- `val` (`uint256`): The nonce of the address. diff --git a/docs/concepts/suave-std/protocols/MevShare.mdx b/docs/concepts/suave-std/protocols/MevShare.mdx index d32541be..2bf595a1 100755 --- a/docs/concepts/suave-std/protocols/MevShare.mdx +++ b/docs/concepts/suave-std/protocols/MevShare.mdx @@ -1,15 +1,15 @@ # MevShare -MevShare is a library with utilities to interact with the Flashbots Mev-Share API described in https://github.com/flashbots/mev-share/blob/main/specs/bundles/v0.1.md#json-rpc-request-scheme +MevShare is a library with utilities to interact with the Flashbots Mev-Share API described in https://github.com/flashbots/mev-share/blob/main/specs/bundles/v0.1.md#json-rpc-request-scheme. ## Functions ### [sendBundle](https://github.com/flashbots/suave-std/tree/main/src/protocols/MevShare.sol#L77) -send a Mev-Share to the Flashbots Mev-Share API. +Send a Mev-Share to the Flashbots Mev-Share API. Input: -- "url": the URL of the Flashbots Mev-Share API. +- `url` (`string`): The URL of the Flashbots Mev-Share API. -- "bundle": the Mev-Share bundle to send. +- `bundle` (`Bundle`): The Mev-Share bundle to send. diff --git a/docs/concepts/suave-std/suavelib/Suave.mdx b/docs/concepts/suave-std/suavelib/Suave.mdx index c9340397..dae6c2c5 100755 --- a/docs/concepts/suave-std/suavelib/Suave.mdx +++ b/docs/concepts/suave-std/suavelib/Suave.mdx @@ -6,29 +6,29 @@ Library to interact with the Suave MEVM precompiles. ### [isConfidential](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L151) -Returns whether execution is off- or on-chain +Returns whether execution is off- or on-chain. Output: -- "b": Whether execution is off- or on-chain +- `b` (`bool`): Whether execution is off- or on-chain. ### [buildEthBlock](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L170) -Constructs an Ethereum block based on the provided `bidIds`. The construction follows the order of `bidId`s are given. +Constructs an Ethereum block based on the provided data records. Input: -- "blockArgs": Arguments to build the block +- `blockArgs` ([BuildBlockArgs](#buildblockargs)): Arguments to build the block. -- "dataId": ID of the data record with mev-share bundle data +- `dataId` (`DataId`): ID of the data record with mev-share bundle data. -- "namespace": deprecated +- `namespace` (`string`): Deprecated. Output: -- "blockBid": Block Bid encoded in JSON +- `blockBid` (`bytes`): Block Bid encoded in JSON. -- "executionPayload": Execution payload encoded in JSON +- `executionPayload` (`bytes`): Execution payload encoded in JSON. ### [confidentialInputs](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L184) @@ -36,45 +36,45 @@ Provides the confidential inputs associated with a confidential computation requ Output: -- "confindentialData": Confidential inputs +- `confindentialData` (`bytes`): Confidential inputs. ### [confidentialRetrieve](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L197) -Retrieves data from the confidential store. Also mandates the caller's presence in the `AllowedPeekers` list. +Retrieves data from the confidential store. Also mandates the caller's presence in the `AllowedPeekers` list. Input: -- "dataId": ID of the data record to retrieve +- `dataId` (`DataId`): ID of the data record to retrieve. -- "key": Key slot of the data to retrieve +- `key` (`string`): Key slot of the data to retrieve. Output: -- "value": Value of the data +- `value` (`bytes`): Value of the data. ### [confidentialStore](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L210) -Handles the storage of data in the confidential store. Requires the caller to be part of the `AllowedPeekers` for the associated bid. +Stores data in the confidential store. Requires the caller to be part of the `AllowedPeekers` for the associated data record. Input: -- "dataId": ID of the data record to store +- `dataId` (`DataId`): ID of the data record to store. -- "key": Key slot of the data to store +- `key` (`string`): Key slot of the data to store. -- "value": Value of the data to store +- `value` (`bytes`): Value of the data to store. ### [contextGet](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L220) -Retrieves a value from the context +Retrieves a value from the context. Input: -- "key": Key of the value to retrieve +- `key` (`string`): Key of the value to retrieve. Output: -- "value": Value of the key +- `value` (`bytes`): Value of the key. ### [doHTTPRequest](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L232) @@ -82,11 +82,11 @@ Performs an HTTP request and returns the response. `request` is the request to p Input: -- "request": Request to perform +- `request` ([HttpRequest](#httprequest)): Request to perform. Output: -- "httpResponse": Body of the response +- `httpResponse` (`bytes`): Body of the response. ### [ethcall](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L245) @@ -94,13 +94,13 @@ Uses the `eth_call` JSON RPC method to let you simulate a function call and retu Input: -- "contractAddr": Address of the contract to call +- `contractAddr` (`address`): Address of the contract to call. -- "input1": Data to send to the contract +- `input1` (`bytes`): Data to send to the contract. Output: -- "callOutput": Output of the contract call +- `callOutput` (`bytes`): Output of the contract call. ### [extractHint](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L257) @@ -108,75 +108,75 @@ Interprets the bundle data and extracts hints, such as the `To` address and call Input: -- "bundleData": Bundle object encoded in JSON +- `bundleData` (`bytes`): Bundle object encoded in JSON. Output: -- "hints": List of hints encoded in JSON +- `hints` (`bytes`): List of hints encoded in JSON. ### [fetchDataRecords](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L271) -Retrieves all data records correlating with a specified decryption condition and namespace +Retrieves all data records correlating with a specified decryption condition and namespace. Input: -- "cond": Filter for the decryption condition +- `cond` (`uint64`): Filter for the decryption condition. -- "namespace": Filter for the namespace of the data records +- `namespace` (`string`): Filter for the namespace of the data records. Output: -- "dataRecords": List of data records that match the filter +- `dataRecords` (``): List of data records that match the filter. ### [fillMevShareBundle](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L283) -Joins the user's transaction and with the backrun, and returns encoded mev-share bundle. The bundle is ready to be sent via `SubmitBundleJsonRPC`. +Joins the user's transaction and with the backrun, and returns encoded mev-share bundle. The bundle is ready to be sent via `SubmitBundleJsonRPC`. Input: -- "dataId": ID of the data record with mev-share bundle data +- `dataId` (`DataId`): ID of the data record with mev-share bundle data. Output: -- "encodedBundle": Mev-Share bundle encoded in JSON +- `encodedBundle` (`bytes`): Mev-Share bundle encoded in JSON. ### [newBuilder](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L295) -Initializes a new remote builder session +Initializes a new remote builder session. Output: -- "sessionid": ID of the remote builder session +- `sessionid` (`string`): ID of the remote builder session. ### [newDataRecord](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L310) -Initializes data records within the ConfidentialStore. Prior to storing data, all bids should undergo initialization via this precompile. +Initializes data records within the ConfidentialStore. Prior to storing data, all data records should undergo initialization via this precompile. Input: -- "decryptionCondition": Up to which block this data record is valid. Used during `fillMevShareBundle` precompie. +- `decryptionCondition` (`uint64`): Up to which block this data record is valid. Used during `fillMevShareBundle` precompie. -- "allowedPeekers": Addresses which can get data +- `allowedPeekers` (``): Addresses which can get data. -- "allowedStores": Addresses can set data +- `allowedStores` (``): Addresses can set data. -- "dataType": Namespace of the data +- `dataType` (`string`): Namespace of the data. Output: -- "dataRecord": Data record that was created +- `dataRecord` ([DataRecord](#datarecord)): Data record that was created. ### [privateKeyGen](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L328) -Generates a private key in ECDA secp256k1 format +Generates a private key in ECDA secp256k1 format. Input: -- "crypto": Type of the private key to generate +- `crypto` (`CryptoSignature`): Type of the private key to generate. Output: -- "privateKey": Hex encoded string of the ECDSA private key. Exactly as a signMessage precompile wants. +- `privateKey` (`string`): Hex encoded string of the ECDSA private key. Exactly as a signMessage precompile wants. ### [randomBytes](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L340) @@ -184,27 +184,27 @@ Generates a number of random bytes, given by the argument numBytes. Input: -- "numBytes": Number of random bytes to generate +- `numBytes` (`uint8`): Number of random bytes to generate. Output: -- "value": Randomly-generated bytes +- `value` (`bytes`): Randomly-generated bytes. ### [signEthTransaction](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L354) -Signs an Ethereum Transaction, 1559 or Legacy, and returns raw signed transaction bytes. `txn` is binary encoding of the transaction. `signingKey` is hex encoded string of the ECDSA private key *without the 0x prefix*. `chainId` is a hex encoded string *with 0x prefix*. +Signs an Ethereum Transaction, 1559 or Legacy, and returns raw signed transaction bytes. `txn` is binary encoding of the transaction. Input: -- "txn": Transaction to sign encoded in RLP +- `txn` (`bytes`): Transaction to sign (RLP encoded). -- "chainId": Id of the chain to sign for +- `chainId` (`string`): Id of the chain to sign for (hex encoded, with 0x prefix). -- "signingKey": Hex encoded string of the ECDSA private key +- `signingKey` (`string`): Hex encoded string of the ECDSA private key (without 0x prefix). Output: -- "signedTxn": Signed transaction encoded in RLP +- `signedTxn` (`bytes`): Signed transaction encoded in RLP. ### [signMessage](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L371) @@ -212,15 +212,15 @@ Signs a message and returns the signature. Input: -- "digest": Message to sign +- `digest` (`bytes`): Message to sign. -- "crypto": Type of the private key to generate +- `crypto` (`CryptoSignature`): Type of the private key to generate. -- "signingKey": Hex encoded string of the ECDSA private key +- `signingKey` (`string`): Hex encoded string of the ECDSA private key. Output: -- "signature": Signature of the message with the private key +- `signature` (`bytes`): Signature of the message with the private key. ### [simulateBundle](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L387) @@ -228,41 +228,41 @@ Performs a simulation of the bundle by building a block that includes it. Input: -- "bundleData": Bundle encoded in JSON +- `bundleData` (`bytes`): Bundle encoded in JSON. Output: -- "effectiveGasPrice": Effective Gas Price of the resultant block +- `effectiveGasPrice` (`uint64`): Effective Gas Price of the resultant block. ### [simulateTransaction](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L400) -Simulates a transaction on a remote builder session +Simulates a transaction on a remote builder session. Input: -- "sessionid": ID of the remote builder session +- `sessionid` (`string`): ID of the remote builder session. -- "txn": Txn to simulate encoded in RLP +- `txn` (`bytes`): Txn to simulate encoded in RLP. Output: -- "simulationResult": Result of the simulation +- `simulationResult` ([SimulateTransactionResult](#simulatetransactionresult)): Result of the simulation. ### [submitBundleJsonRPC](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L417) -Submits bytes as JSONRPC message to the specified URL with the specified method. As this call is intended for bundles, it also signs the params and adds `X-Flashbots-Signature` header, as usual with bundles. Regular eth bundles don't need any processing to be sent. +Submits bytes as JSONRPC message to the specified URL with the specified method. As this call is intended for bundles, it also signs the params and adds `X-Flashbots-Signature` header, as usual with bundles. Regular eth bundles don't need any processing to be sent. Input: -- "url": URL to send the request to +- `url` (`string`): URL to send the request to. -- "method": JSONRPC method to call +- `method` (`string`): JSONRPC method to call. -- "params": JSONRPC input params encoded in RLP +- `params` (`bytes`): JSONRPC input params encoded in RLP. Output: -- "errorMessage": Error message if any +- `errorMessage` (`bytes`): Error message if any. ### [submitEthBlockToRelay](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L434) @@ -270,13 +270,13 @@ Submits a given builderBid to a mev-boost relay. Input: -- "relayUrl": URL of the relay to submit to +- `relayUrl` (`string`): URL of the relay to submit to. -- "builderBid": Block bid to submit encoded in JSON +- `builderBid` (`bytes`): Block bid to submit encoded in JSON. Output: -- "blockBid": Error message if any +- `blockBid` (`bytes`): Error message if any. ## Structs @@ -284,61 +284,61 @@ Output: Arguments to build the block. -- "slot": Slot number of the block -- "proposerPubkey": Public key of the proposer -- "parent": Hash of the parent block -- "timestamp": Timestamp of the block -- "feeRecipient": Address of the fee recipient -- "gasLimit": Gas limit of the block -- "random": Randomness of the block -- "withdrawals": List of withdrawals -- "extra": Extra data of the block -- "beaconRoot": Root of the beacon chain -- "fillPending": Whether to fill the block with pending transactions +- `slot` (`uint64`): Slot number of the block. +- `proposerPubkey` (`bytes`): Public key of the proposer. +- `parent` (`bytes32`): Hash of the parent block. +- `timestamp` (`uint64`): Timestamp of the block. +- `feeRecipient` (`address`): Address of the fee recipient. +- `gasLimit` (`uint64`): Gas limit of the block. +- `random` (`bytes32`): Randomness of the block. +- `withdrawals` (``): List of withdrawals. +- `extra` (`bytes`): Extra data of the block. +- `beaconRoot` (`bytes32`): Root of the beacon chain. +- `fillPending` (`bool`): Whether to fill the block with pending transactions. ### [DataRecord](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L48) A record of data stored in the ConfidentialStore. -- "id": ID of the data record -- "salt": Salt used to derive the encryption key -- "decryptionCondition": Up to which block this data record is valid -- "allowedPeekers": Addresses which can get data -- "allowedStores": Addresses can set data -- "version": Namespace of the data record +- `id` (`DataId`): ID of the data record. +- `salt` (`DataId`): Salt used to derive the encryption key. +- `decryptionCondition` (`uint64`): Up to which block this data record is valid. +- `allowedPeekers` (``): Addresses which can get data. +- `allowedStores` (``): Addresses can set data. +- `version` (`string`): Namespace of the data record. ### [HttpRequest](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L63) Description of an HTTP request. -- "url": Target url of the request -- "method": HTTP method of the request -- "headers": HTTP Headers -- "body": Body of the request (if Post or Put) -- "withFlashbotsSignature": Whether to include the Flashbots signature +- `url` (`string`): Target url of the request. +- `method` (`string`): HTTP method of the request. +- `headers` (``): HTTP Headers. +- `body` (`bytes`): Body of the request (if Post or Put). +- `withFlashbotsSignature` (`bool`): Whether to include the Flashbots signature. ### [SimulateTransactionResult](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L76) Result of a simulated transaction. -- "egp": Effective Gas Price of the transaction -- "logs": Logs emitted during the simulation -- "success": Whether the transaction was successful or not -- "error": Error message if any +- `egp` (`uint64`): Effective Gas Price of the transaction. +- `logs` (``): Logs emitted during the simulation. +- `success` (`bool`): Whether the transaction was successful or not. +- `error` (`string`): Error message if any. ### [SimulatedLog](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L87) A log emitted during the simulation of a transaction. -- "data": Data of the log -- "addr": Address of the contract that emitted the log -- "topics": Topics of the log +- `data` (`bytes`): Data of the log. +- `addr` (`address`): Address of the contract that emitted the log. +- `topics` (``): Topics of the log. ### [Withdrawal](https://github.com/flashbots/suave-std/tree/main/src/suavelib/Suave.sol#L98) A withdrawal from the beacon chain. -- "index": Index of the withdrawal -- "validator": ID of the validator -- "Address": Address to withdraw to -- "amount": Amount to be withdrawn +- `index` (`uint64`): Index of the withdrawal. +- `validator` (`uint64`): ID of the validator. +- `Address` (`address`): Address to withdraw to. +- `amount` (`uint64`): Amount to be withdrawn.