-
-
Notifications
You must be signed in to change notification settings - Fork 821
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
export signTransaction, update docs #984
Conversation
🦋 Changeset detectedLatest commit: 55ccd86 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@holic is attempting to deploy a commit to the wagmi Team on Vercel. A member of the Team first needs to authorize it. |
site/docs/accounts/custom.md
Outdated
@@ -25,10 +25,9 @@ import { toAccount } from 'viem/accounts' | |||
## Usage | |||
|
|||
```ts | |||
import { createWalletClient, http } from 'viem' | |||
import { toAccount } from 'viem/accounts' // [!code focus] | |||
import { createWalletClient, getAddress, http } from 'viem' |
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 moved getAddress
to a real import but this doesn't actually work for turning a private key into an address. Does viem need a helper for this?
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 be worth adding a privateKeyToAddress
util that just composes this. Similar to publicKeyToAddress
.
) * export signTransaction * update docs * refactor --------- Co-authored-by: moxey.eth <[email protected]>
PR-Codex overview
Focus of this PR:
This PR focuses on adding new exports to the
viem/accounts
entrypoint, specificallysignTransaction
andprivateKeyToAddress
.Detailed summary:
signTransaction
andprivateKeyToAddress
exports toviem/accounts
entrypoint.site/docs/accounts/signMessage.md
andsite/docs/accounts/signTypedData.md
.privateKeyToAddress
insrc/accounts/utils/privateKeyToAddress.test.ts
.src/accounts/utils/signTransaction.ts
to useSignTransactionParameters
type.site/docs/accounts/custom.md
andsite/docs/accounts/signTransaction.md
.privateKeyToAddress
export tosrc/accounts/index.ts
.