-
Notifications
You must be signed in to change notification settings - Fork 1
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
Migrate Quickstart Guide to use Examples from the Javascript SDK and add more context to examples #75
Conversation
@AlwaysBCoding is attempting to deploy a commit to the Turnkey Team on Vercel. To accomplish this, @AlwaysBCoding needs to request access to the Team. Afterwards, an owner of the Team is required to accept their membership request. If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
```javascript | ||
const response = await turnkeyClient.createWallet({ | ||
organizationId: TURNKEY_ORGANIZATION_ID, | ||
type: 'ACTIVITY_TYPE_CREATE_WALLET', | ||
timestampMs: String(Date.now()), | ||
parameters: { | ||
walletName: "Test Wallet 1", | ||
accounts: [] | ||
} | ||
}) | ||
|
||
const walletId = response.activity.result.createWalletResult.walletId; | ||
``` |
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.
I think we should create the account in here to simplify onboarding? That way there's a single activity rather than 2
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.
So my thought on this is that there's already confusion with the distinction between wallets
and accounts
and you can clear up some of that confusion to someone reading this guide by explicitly creating the resources in separate steps. I think in general it's a good pattern for quickstart guides to avoid creating multiple resources in a single step if there's a way to create them individually. I'd prefer leaving this as is, with the note underneath:
Note: If desired, you can also create accounts
in the same API call where you create the wallet
by passing in the account derivation paths as parameters to the createWallet
call.
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.
In the context of a "quick" start there are competing priorities: time to value is very important because typically people want to run through this as quick as possible. The other priority is clarity.
In this case it's probably fine to leave things the way you have it if you think it's clearer. But it's "one more thing" to copy/paste; that's the trade-off.
Make sure to replace the `unsignedTransaction` below with your own. You can use our [simple transaction generator](https://build.tx.xyz) if you need a quick transaction for testing. | ||
|
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.
I think this needs to be replaced with code to create an unsigned transaction
This PR migrates the initial Quickstart guide to use examples from the Javascript SDK as well as adds more context to each of the examples to make getting started with Turnkey more approachable.
It moves the current CLI quickstart guide to a "Using the CLI" section of the docs