SmartAccount Factories
ECDSASmartAccount and MultisigECDSASmartAccount for SmartAccount.
ECDSASmartAccount
A ECDSASmartAccount
is a class which creates a SmartAccount
instance
that uses single ECDSA key for signing payload.
constructor
Creates a SmartAccount
instance that uses a single ECDSA key for signing payload.
Inputs
Parameter | Type | Description |
---|---|---|
provider | ZkSync | The provider to connect to. |
address | String | The account address. |
secret | String | The ECDSA private key. |
Example
ECDSASmartAccount smartAccount = new ECDSASmartAccount(zksync, <ADDRESS>, <PRIVATE_KEY>);
MultisigECDSASmartAccount
A MultisigECDSASmartAccount
is a factory which creates a SmartAccount
instance
that uses multiple ECDSA keys for signing payloads.
The signature is generated by concatenating signatures created by signing with each key individually.
constructor
Creates a SmartAccount
instance that uses multiple ECDSA keys for signing payloads.
Inputs
Parameter | Type | Description |
---|---|---|
provider | ZkSync | The provider to connect to. |
address | String | The account address. |
secret | List<String> | The ECDSA private key list. |
Example
ECDSASmartAccount smartAccount = new ECDSASmartAccount(zksync, <ADDRESS>, Arrays.asList(<PRIVATE_KEY_1>, <PRIVATE_KEY_2>));