Commit ead789a
feat(clients/js): add confidential transfer with fee helper (#1253)
* feat: add confidential transfer with fee helper
* Support record-backed transfer fee proofs
* Fix JS CI for transfer fee helper
* address comments
* Sync with main: adapt to @solana-program/record@0.3.0 and kit 7
This commit brings the confidential-transfer-with-fee helper in line with main's toolchain after rebasing (kit 6 → 7, TypeScript 5 → 6, zk-elgamal-proof 0.2 → 0.3.2).
record@0.1.0 (kit 5 only) forced a duplicate kit-6 install against main's kit-7 project, so it is bumped to ^0.3.0 (kit ^7). record@0.3.0 replaced its imperative API with a plan-based one, so the record-staging path in buildContextStateProofPlan is rewritten accordingly:
- createRecord(...) → getCreateRecordInstructionPlan(client, ...), with a fresh newRecord signer and a minimal getMinimumBalance client adapter.
- The manual chunked write loop (getRecordWriteInstructions) is removed; getWriteInstructionPlan self-chunks the payload across transactions.
- createCloseRecordInstruction(...) → getCloseAccountInstruction(...).
RecordBackedContextStateProofMode now extends ConfidentialTransferContextStateProofMode so the with-fee helper's rpc carries GetAccountInfoApi, which the (now async) auditor resolution from main's #1269 requires.
---------
Co-authored-by: Loris Leiva <loris.leiva@gmail.com>1 parent 149ca75 commit ead789a
6 files changed
Lines changed: 939 additions & 20 deletions
File tree
- clients/js
- src
- test
- extensions/confidentialTransfer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments