-
Notifications
You must be signed in to change notification settings - Fork 6
feat: SRC20 wallet + public actions #333
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
Conversation
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.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| to: log.args.to as Address, | ||
| encryptKeyHash: log.args.encryptKeyHash as Hex, | ||
| encryptedAmount: log.args.encryptedAmount as Hex, | ||
| decryptedAmount: BigInt(decryptedAmount), |
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.
Bug: BigInt('0x') throws SyntaxError for empty decrypted data
When aesCipher.decrypt returns '0x' for empty ciphertext, calling BigInt(decryptedAmount) throws a SyntaxError because '0x' is not a valid BigInt literal—it requires at least one digit after the prefix like '0x0'. This can occur if the encrypted data contains only a nonce with no ciphertext, causing parseEncryptedData to return an empty ciphertext. The error is caught and passed to onError, but a zero amount should return 0n rather than triggering an error callback.
Note
Adds SRC20 ABIs, directory key utilities, and event-watching actions (public/wallet) with decryption, integrated into clients and exports; bumps seismic-viem to 1.0.54.
@sviem/abis/src20.tsand@sviem/abis/directory.ts(withDIRECTORY_ADDRESS).watchSRC20EventsWithKeyviasrc20PublicActions.watchSRC20Eventsviasrc20WalletActions.encryptKeyHash).checkRegistration,getKeyHash,getKey(signed read),registerKey(timeout),computeKeyHash.parseEncryptedDatafor ciphertext/nonce parsing.ShieldedPublicClient/ShieldedWalletClientwith SRC20 actions; wire intocreateShieldedPublicClientandgetSeismicClients.src/index.ts.seismic-viemto1.0.54.Written by Cursor Bugbot for commit a40154a. This will update automatically on new commits. Configure here.