InputLibrary
State Variables
INPUT_TYPE
string constant INPUT_TYPE = "Input(uint8 inputType,bytes data)";
INPUT_TYPEHASH
bytes32 constant INPUT_TYPEHASH = keccak256(bytes(INPUT_TYPE));
Functions
createInlineInput
Creates an inline input.
function createInlineInput(bytes memory inlineData) internal pure returns (Input memory);
Name | Type | Description |
---|---|---|
inlineData | bytes | The data for the inline input. |
Name | Type | Description |
---|---|---|
<none> | Input | An Input struct with type Inline and the provided data. |
createUrlInput
Creates a URL input.
function createUrlInput(string memory url) internal pure returns (Input memory);
Name | Type | Description |
---|---|---|
url | string | The URL for the input. |
Name | Type | Description |
---|---|---|
<none> | Input | An Input struct with type Url and the provided URL as data. |
eip712Digest
Computes the EIP-712 digest for the given input.
function eip712Digest(Input memory input) internal pure returns (bytes32);
Name | Type | Description |
---|---|---|
input | Input | The input to compute the digest for. |
Name | Type | Description |
---|---|---|
<none> | bytes32 | The EIP-712 digest of the input. |