kinds
:
Transaction
: unsigned transaction.Message
: an arbitrary message.Eip712
: typed structured data defined in EIP-712.Eip7702
: authorization tuple for type 4 set code transaction defined in EIP-7702.
Transaction
Signs an unsigned transaction.Field | Description | Type - Optional |
---|---|---|
blockchainKind | Evm | String |
kind | Transaction | String |
transaction | The unsigned hex encoded transaction as shown below. | String |
Typescript Example with EthersJs
First install the Ethers JS. You can find the full documentation here: https://docs.ethers.org/v6/ Here a code sample to generate a signature via the Dfns TypeScript SDK:Message
Signs an arbitrary hex encoded message.Field | Description | Type - Optional |
---|---|---|
blockchainKind | Evm | String |
kind | Message | String |
message | An arbitrary hex encoded message. | String |
EIP-712 TypedData
Signs a typed structured data defined in EIP-712.Field | Description | Type - Optional |
---|---|---|
blockchainKind | Evm | String |
kind | Eip712 | String |
types | Type definitions. | Map<String, TypedDataField[]> |
domain | Domain separator. | Eip712Domain |
message | Structured message to sign. | Object |
TypedDataField
Field | Description | Type - Optional |
---|---|---|
name | Field name. | String |
type | Field type. | String |
Eip712Domain
Field | Description | Type - Optional |
---|---|---|
name | Name of the signing domain. | String |
version | Current major version of the signing domain. | String |
chainId | Chain ID. | Integer |
verifyingContract | The address of the contract that will verify the signature. | String |
salt | 32-byte value as a last-resort domain separator. | String |
EIP-7702 Authorization
Signs an authorization tuple for type 4 set code transaction defined in EIP-7702.Field | Description | Type - Optional |
---|---|---|
blockchainKind | Evm | String |
kind | Eip7702 | String |
chainId | Chain ID. | Integer |
address | The address of the contract the signer’s EOA will be delegated to. | String |
nonce | The current nonce of the signer EOA. | Integer |