forked from alchemyplatform/aa-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update address calculation, session key, and guides (alchemypla…
…tform#451) * docs: update address calculation, session key, and guides - fix signer typos - add address calculation information to LA and MA - update session key tag to use keccak algorithm - improve MA getting started guide for better flow * Update site/smart-accounts/light-account/index.md Co-authored-by: Michael Moldoveanu <[email protected]> * Update site/smart-accounts/light-account/index.md Co-authored-by: Dennis Won <[email protected]> * Update site/snippets/session-keys/add-session-key.ts Co-authored-by: Dennis Won <[email protected]> * docs: fix aa core definition * docs: address modular account getting started PR comment Co-authored-by: Dennis Won <[email protected]> --------- Co-authored-by: Dennis Won <[email protected]> Co-authored-by: Michael Moldoveanu <[email protected]>
- Loading branch information
1 parent
ab15676
commit 6fd817f
Showing
5 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import { SessionKeyPermissionsBuilder } from "@alchemy/aa-accounts"; | ||
import { client } from "./base-client.js"; | ||
import { keccak256 } from "viem"; | ||
|
||
const result = await client.addSessionKey({ | ||
key: "0xSessionKeyAddress", | ||
tag: "0xkeytag", | ||
// tag is an identifier for the emitted SessionKeyAdded event | ||
tag: keccak256(new TextEncoder().encode("session-key-tag")), | ||
permissions: new SessionKeyPermissionsBuilder().encode(), | ||
}); |