Skip to content

Commit ead789a

Browse files
catmcgeelorisleiva
andauthored
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/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
},
5151
"dependencies": {
5252
"@noble/curves": "^1.9.7",
53+
"@solana-program/record": "^0.3.0",
5354
"@solana-program/zk-elgamal-proof": "^0.3.2"
5455
},
5556
"devDependencies": {

clients/js/pnpm-lock.yaml

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)