-
Notifications
You must be signed in to change notification settings - Fork 11
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
[PSDK-86] Enable creation of wallets backed by server signers #48
[PSDK-86] Enable creation of wallets backed by server signers #48
Conversation
1b0dffa
to
321cf5e
Compare
321cf5e
to
deef84b
Compare
create_wallet_request: { | ||
wallet: { | ||
network_id: network_id, | ||
use_server_signer: server_signer |
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.
could you add this to the readme as well?
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.
Synced offline, we will update the readme once external developers are able to create and run server signers on their own.
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.
+1 to keeping it semi-hidden for now :)
@@ -20,21 +20,11 @@ def id | |||
end | |||
|
|||
# Creates a new Wallet belonging to the User. | |||
# @param network_id [String] (Optional) the ID of the blockchain network. Defaults to 'base-sepolia'. | |||
# @param server_signer [Boolean] (Optional) whether Wallet should use project's server signer. Defaults to false. |
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.
Should we document saying this is a no-op right now?
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.
Moving to a feature branch!
This bumps the openapi ruby client to the latest openapi spec that allows for creating wallets with a server signer.
This enables creating a wallet with a server signer, e.g. `Coinbase::Wallet.create(server_signer: true)` This will create a new wallet using your projects default server signer.
6e9377a
to
1ce540b
Compare
What changed? Why?
This enables developers to create wallets that are backed by server signers v.s. managing the seeds themselves.
When calling
user.create_wallet(server_signer: true)
the wallet will be created and associated with the project's default server signer (if one exists). It will return an error if a server signer does not exist for that project.Default address creation
Rather than add further cases to the wallet initialization this removes the side-effects from that method in favor of a
Wallet.create
class method.This code path will only be used for creation of wallets, where we will additionally create a default address for wallets that are not backed by server signers.
Network IDs
This also adds support for specifying the
network_id
which the backend will properly validate based on supported networks.Qualified Impact
This touches the
user.create_wallet
flow