-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore!: wallet refactoring #1620
base: master
Are you sure you want to change the base?
Conversation
@@ -9,7 +9,7 @@ publish = false | |||
repository = { workspace = true } | |||
description = "Fuel Rust SDK contract examples." | |||
|
|||
[dev-dependencies] | |||
[dependencies] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Examples didn't build under newer rust versions because you cannot (still) enable features on dev deps via feature flags of your own (and it seems we tried to do that in the past but failed silently... until now).
#[cfg(feature = "signer-google-kms")] | ||
pub mod google; | ||
|
||
mod signature_utils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes, just moved
docs/spell-check-custom-words.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorted it and added a few words.
Release notes
Wallets are now unified in a single type generic over the signer.
In this release, we:
Summary
Breaking Changes
ImpersonatedAccount
is removedTo achieve the same functionality instantiate a `FakeSigner:
AwsKmsSigner
andGoogleKmsSigner
movedunder
fuels::accounts::signers::kms::aws
andfuels::accounts::signers::kms::google
, respectfully.KmsWallet
removeduse an ordinary
Wallet
now with a kms signer (aws or google)WalletUnlocked
andWallet
substituted byWallet<Unlocked<S = PrivateKeySigner>>
orWallet<Locked>
The provider is now mandatory for
Wallet::new
.Common operations in the new API:
Creating a random wallet:
a) Two step (useful when you haven't started the node but need the address)
b) One step (when you already have a provider)
Locking a wallet
Creating a locked wallet
Wallets no longer sign
You use one of the signers for that. Or, if your wallet is unlocked, get its signer by calling
wallet.signer()
.ViewOnlyAccount
no longer requirescore::fmt::Debug
andcore::clone::Clone
as supertraits.Wallet
no longer handles encrypting keys for disk storageUse the
fuels::accounts::Keystore
for that (feature-gated underaccounts-keystore
)AWS/Google kms feature flags changed
They're now
accounts-signer-aws-kms
andaccounts-signer-google-kms
.Checklist