bcnmy / biconomy-client-sdk

Biconomy SDK is a plug & play toolkit for dApps to build transaction legos that enable a highly customised one-click experience for their users
MIT License
73 stars 76 forks source link

chore: sessions dx #486

Closed joepegler closed 4 months ago

joepegler commented 4 months ago

Improved dx around creating and using a session. See here for an example


PR-Codex overview

This PR focuses on improving session management and smart account functionalities.

Detailed summary

The following files were skipped due to too many changes: src/modules/interfaces/ISessionStorage.ts, src/account/utils/Logger.ts, examples/SEND_SOME_ETH_WITH_SPONSORSHIP.md, src/modules/session-storage/utils.ts, src/modules/utils/Constants.ts, src/modules/utils/Types.ts, examples/SEND_A_MULTI_TX_AND_PAY_GAS_WITH_TOKEN.md, examples/INITIALISE_A_SMART_CONTRACT.md, src/account/BiconomySmartAccountV2.ts, src/modules/utils/Helper.ts, src/modules/session-storage/SessionFileStorage.ts, examples/CREATE_AND_USE_A_SESSION.md, src/modules/session-storage/SessionMemoryStorage.ts, examples/CREATE_AND_USE_A_BATCH_SESSION.md, src/modules/session-storage/SessionLocalStorage.ts, src/modules/sessions/sessionSmartAccountClient.ts, README.md, tests/modules/read.test.ts, src/modules/sessions/batch.ts, src/modules/sessions/abi.ts, tests/modules/write.test.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

github-actions[bot] commented 4 months ago

size-limit report 📦

Path Size
core (esm) 53.68 KB (+2.6% 🔺)
core (cjs) 58.61 KB (+2.96% 🔺)
account (tree-shaking) 51.85 KB (+1.09% 🔺)
bundler (tree-shaking) 2.37 KB (+1.51% 🔺)
paymaster (tree-shaking) 2.29 KB (+0.95% 🔺)
modules (tree-shaking) 40.48 KB (+1.07% 🔺)
livingrockrises commented 4 months ago

can you also add list of all new methods added and description natspecs

joepegler commented 4 months ago

can you also add list of all new methods added and description natspecs

This is already in the PR... Is there something you've noticed that I've missed?

createMultiSession

createSession

createSessionSmartAccountClient

and the one that was missing: createAndStoreNewSessionKey

joepegler commented 4 months ago

can you also add list of all new methods added and description natspecs

This is already in the PR... Is there something you've noticed that I've missed?

createMultiSession

createSession

createSessionSmartAccountClient

and the one that was missing: createAndStoreNewSessionKey

Added a couple more. I've gotten to all of them now

livingrockrises commented 4 months ago

can you also add list of all new methods added and description natspecs

This is already in the PR... Is there something you've noticed that I've missed?

createMultiSession

createSession

createSessionSmartAccountClient

and the one that was missing: createAndStoreNewSessionKey

I like createSessionKeyEOA (later could become createSessionKeyEOAWithPermissions with mpc network capabilities) such can be used later on to change the implementation and register user on silence network