Multiple blockchain addresses can be linked to an identity controlled by an IdentityWallet instance. Right now two types of ethereum addresses are supported: EOAs (externally owned accounts) and EIP1271 contracts. Support for other types and blockchains can be easily added by contributing to the 3id-blockchain-utils module.
To link an address simply use the
linkAddress method as shown in the example below. The ethProvider needs to be able to sign a message using
personal_sign for the given address.
const ethAddress = '0xabc...'const ethProvider = // an ethereum json-rpc providerawait idWallet.linkAddress(ethAddress, ethProvider)