web3swift
web3swift copied to clipboard
SignatureProvider implementation
trafficstars
Hi.
This is the second PR, it is related to signature providers. The first one is #446.
We are working on the Avalanche library and in order to integrate this library we need to be able to use custom signature provider which should be asynchronous. One of the benefits of asynchronous signature providers is the ability to add support for hardware wallets for example.
In this PR:
- We created SignatureProvider protocol which returns accounts and performs signing of transactions and messages asynchronously.
- Implemented default KeystoreSignatureProvider which uses AbstractKeystore.
- Specific implementation of signature provider can be set in web3 object.
If you need more info, please, tell us. Will be glad to provide it.
Thanks.