Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ERC-1056, a proposal for managing and extending identities such as Ethereum accounts by associating delegates and attributes with them.
This explanation translates, summarizes, and expands on the original proposal.
I have also written about other EIPs.
Abstract
ERC-1056 defines a standard registry for lightweight identities on Ethereum. It allows multiple attributes and delegates to be associated with each identity while making efficient use of blockchain resources.
Creating an identity requires no separate on-chain registration or gas expenditure: an existing Ethereum account address can serve as an identity. In other words, every Ethereum address is a valid identity under this model. Updating the registry, by contrast, requires a transaction.
The standard is designed to work with decentralized identifiers (DIDs) and existing decentralized identity frameworks.
Motivation
ERC-1056 draws on several years of identity-system development in the uPort project. The earlier ERC-725 approach requires deploying a smart contract to create an identity, which incurs a substantial gas cost.
For more about ERC-725, see the following article.
[ERC725] Separating execution and data management in a smart contract
The proposal addresses this problem with the following design goals:
- Identity creation should be free.
- Identities should be usable in offline environments, including refugee camps.
- Keys should be rotatable without changing the primary identity address.
- The design should accommodate both on-chain and off-chain use.
Meeting these requirements makes blockchain-based identity management accessible to more users and applications, particularly where connectivity or budgets are limited.
Specification
Events
DIDOwnerChanged
event DIDOwnerChanged(
address indexed identity,
address owner,
uint previousChange
);Emitted when an identity's owner changes through changeOwner or changeOwnerSigned. The event includes a reference to the preceding change.
Parameters
identity- The address of the identity whose owner changed.
owner- The newly assigned owner address.
previousChange- The block number of the preceding change. The Japanese article refers to a block timestamp here and in several descriptions below, but the event-history algorithm uses block numbers.
DIDDelegateChanged
event DIDDelegateChanged(
address indexed identity,
bytes32 delegateType,
address delegate,
uint validTo,
uint previousChange
);Emitted when a delegate is added or revoked for an identity. It contains the delegate's expiration time and a reference to the preceding change.
Parameters
identity- The identity whose delegate changed.
delegateType- An identifier for the delegate's purpose, such as did-jwt or raiden.
delegate- The delegate address being added or revoked.
validTo- The delegate's expiration time, expressed as a Unix timestamp.
previousChange- The block number of the preceding change.
DIDAttributeChanged
event DIDAttributeChanged(
address indexed identity,
bytes32 name,
bytes value,
uint validTo,
uint previousChange
);Emitted when an attribute is added, updated, or revoked. Attributes may represent public keys, service information, or other data associated with an identity.
Parameters
identity- The identity whose attribute changed.
name- The name or label of the attribute.
value- The attribute's binary value.
validTo- The attribute's expiration time, expressed as a Unix timestamp.
previousChange- The block number of the preceding change.
Functions
identityOwner
function identityOwner(address identity) public view returns(address);Returns the owner (controller) of an identity. By default, the identity address is its own owner, but ownership can be assigned to another address using changeOwner.
Arguments
identity- The identity address whose owner is being queried.
Return value
address- The address that controls the identity.
changeOwner
function changeOwner(address identity, address newOwner) public;Changes the identity's owner to a new Ethereum address. This operation must be authorized by the current owner.
Arguments
identity- The address of the identity whose owner is to be changed.
newOwner- The new owner's address.
changeOwnerSigned
function changeOwnerSigned(address identity, uint8 sigV, bytes32 sigR, bytes32 sigS, address newOwner) public;Changes an identity's owner based on data signed off-chain. Off-chain authorization and on-chain signature verification allow a relayer to submit the change, making ownership transfers more flexible. The relayed transaction still consumes gas.
Arguments
identity- The identity whose owner is to be changed.
sigV,sigR,sigS- The owner's ECDSA signature components.
newOwner- The new owner's address.
addDelegate
function addDelegate(
address identity,
bytes32 delegateType,
address delegate,
uint validity
) public;Registers a new delegate for a specified identity. A delegate can perform a particular role on behalf of that identity. The delegateType distinguishes purposes such as did-jwt, while validity specifies the duration of the delegation in seconds. The operation must be authorized by the identity's owner.
Arguments
identity- The identity's Ethereum address.
delegateType- The delegate type, such as
did-jwtencoded asbytes32.
- The delegate type, such as
delegate- The delegate address being registered.
validity- The number of seconds for which the registration remains valid.
revokeDelegate
function revokeDelegate(
address identity,
bytes32 delegateType,
address delegate
) public;Explicitly revokes a delegate previously registered with addDelegate. The owner can revoke a delegation before its expiration.
Arguments
identity- The identity concerned.
delegateType- The type of delegate being revoked.
delegate- The delegate address being revoked.
setAttribute
function setAttribute(
address identity,
bytes32 name,
bytes memory value,
uint validity
) public;Adds or updates an attribute associated with an identity. Attributes may represent metadata such as public keys, service URLs, and profile information. The caller specifies the attribute's name, value, and validity period.
Arguments
identity- The identity for which the attribute is being set.
name- The attribute name, such as
did/publicKey/Ed25519.
- The attribute name, such as
value- The attribute value, such as a Base64-encoded key.
validity- The validity period in seconds from the current time.
revokeAttribute
function revokeAttribute(
address identity,
bytes32 name,
bytes memory value
) public;Revokes a specified attribute by expiring its validity. This makes the attribute inactive without erasing the historical event record. The function can be used when attributes need to be changed or invalidated.
Arguments
identity- The identity whose attribute is being revoked.
name- The name of the attribute.
value- The attribute value being revoked.
validDelegate
function validDelegate(
address identity,
bytes32 delegateType,
address delegate
) public view returns (bool);Checks whether a specified delegate of an identity is currently valid. Applications can use this function in their verification logic to determine whether the delegation has expired or been revoked.
Arguments
identity- The identity concerned.
delegateType- The delegate type.
delegate- The delegate address being checked.
Return value
booltrueif the delegate is valid;falseif it is invalid or expired.
changed
function changed(address identity) public view returns (uint);Returns the block number in which the identity was last modified. The latest modification may be a change to the owner, a delegate, or an attribute. Applications can use this reference when synchronizing data and checking for updates.
Arguments
identity- The identity being queried.
Return value
uint- The block number of the most recent change, not a Unix timestamp.
Efficient event-history retrieval
Ethereum contract events are widely used to retrieve information for off-chain applications independently of the contract's current state. Searching backward through events associated with an address can be inefficient, especially when eth_getLogs must scan a broad range of blocks.
ERC-1056 addresses this by linking events to blocks containing earlier changes. The changed mapping records the block number of the latest modification for each identity, which allows an application to follow references backward through its history.
This avoids unnecessarily scanning unrelated blocks and lets applications retrieve the relevant events block by block.
Tracing event history
To reconstruct the history of an identity, including owner changes, delegate registrations, and attribute updates, an application can start with changed and follow links to earlier blocks.
The following JavaScript example uses a web3-style API.
const history = []
let previousChange = await didReg.changed(identity)
while (previousChange) {
const filter = await didReg.allEvents({
topics: [identity],
fromBlock: previousChange,
toBlock: previousChange
})
const events = await getLogs(filter)
previousChange = undefined
for (let event of events) {
history.unshift(event)
previousChange = event.args.previousChange
}
}The code works as follows:
- Call
changed(identity)to get the latest change block. - Filter and retrieve relevant events from that block.
- Use each event's
previousChangefield to reach the preceding block. - Insert events into
historyto reconstruct the chronological history.
This reduces the number of blocks that must be queried. A production resolver must also ensure that it handles the ordering of multiple events within the same block correctly.
Constructing a DID document
Building a DID document using ERC-1056 involves several steps.
First, call identityOwner(identity) to retrieve the owner. The owner address represents the primary controller and, in the historical document format described here, is placed first in the publicKey section.
Then read DIDDelegateChanged events to identify registered delegate keys. Valid delegates can be reflected in the DID document's authentication section as additional verification keys. The application determines which delegate types to include.
Finally, follow DIDAttributeChanged events to retrieve other metadata, including service endpoints or encryption keys such as did/service/endpoint and did/publicKey/X25519. These attributes can describe public-key-based end-to-end encryption or integration with external APIs.
A DID document derived from contract events can thus reflect identity data managed on-chain and provide verification information for decentralized applications and authentication systems. The document field names above reflect the historical proposal; implementations should use the DID document format supported by their resolver.
Rationale
Ethereum exposes the immediate caller of a contract through msg.sender, allowing account authorization to be expressed in terms of an Ethereum address. Both contract accounts and key-controlled accounts can be callers of contract functions, an important concept for account abstraction. A contract caller is not necessarily the signer of the outer transaction.
On-chain transactions incur gas costs, which can create a barrier to adoption. Meta-transactions allow a user to authorize an operation off-chain and a third party to relay the signed request on-chain, including models in which someone other than the user pays the transaction fee.
Conventional ECDSA signatures require a private key. A smart contract does not itself possess a private key, so it cannot generate such a signature on its own.
ERC-1056 provides a way for contract accounts and ordinary accounts to register key-controlled addresses as delegates that can act on their behalf. A delegate can represent a contract-controlled identity in off-chain operations or payment channels.
Delegations can have short or long validity periods, making them useful for payments, session management, and integration with external services.
Backward compatibility
ERC-1056 treats every Ethereum address as a valid identity. Accounts already generated and managed by Ethereum wallets can therefore be used as DID-compatible identities.
No separate contract deployment or account creation is required for each identity. An existing Ethereum address serves as the lightweight identity.
Wallets can also incorporate delegate and attribute management through libraries such as ethr-did.
As decentralized authentication standards mature, such wallets may also support decentralized login. ERC-1056 provides a flexible way to extend identity capabilities while retaining compatibility with existing infrastructure.
Citation
Pelle Braendgaard pelle.braendgaard@consensys.net, Joel Torstensson oed@consensys.net, "ERC-1056: Ethereum Lightweight Identity [DRAFT]," Ethereum Improvement Proposals, no. 1056, May 2018. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-1056.
Conclusion
ERC-1056 provides a mechanism for managing Ethereum-based identities by associating them with delegates and attributes without deploying a dedicated identity contract for every account.
If you have questions, feel free to contact me via Twitter.
I also share technical content on the following platforms.



