-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Confidential Transfer Support in @solana/spl-token #6338
Comments
I apologize for the late response on this. The wrong size for the confidential transfer mint and accounts in token-js will be fixed once #6487 is merged. There has been some delay with supporting confidential transfers in token-js as we plan to compile the zk logic with wasm. We hope to have them all supported within a couple of weeks. Also, unfortunately, it is currently not possible to run the confidential transfers outside of tests since the zk proof verification program is behind a feature-gate (solana-labs/solana#32613). We are working hard to get the program activated, so please stay tuned. |
I am building the token-2022 program from the master branch, locally and running the local validator like this: solana-test-validator -r I can create the mint with the confidential transfer extension enabled and can deposit into confidential account, apply pending balance and can verify the encrypted available/pending balances on the explorer fine. transfer error: withdraw error: |
Can you verify if the same error happens with the latest |
yes, that was indeed the error with 3.3.0. Just built and tried with 3.4.0 and both transfer/withdraw work fine too. Thanks for your quick pointer. |
Audit keys are supported in the program, but we have not added the functionality to decrypt yet. That will be coming very soon. |
spl-token-cli 3.4.1 still cannot work I run the script here: https://github.com/solana-labs/solana-program-library/blob/master/token/cli/examples/confidential-transfer.sh
@huckym Could you take a look at it? Thanks a lot! |
@doutv The error says: |
Thanks for your reply. I thought it was enabled since Solana version is 1.18 now. The status here should be updated: https://spl.solana.com/token-2022/status ![]() |
I have been messing with confidential transfers on the client side recently and ran into some issues with the
@solana/spl-token
API that I'd like to highlight here.getMintLen()
does not return the correct byte size for a mint with the confidential transfer extension.InitializeMint
instruction on the Token22 program.InvalidAccountData
error is thrown because the program checks that the size of the given account matches exactly what is expected for the given extension.There is virtually no support for any of the Confidential Transfer instructions or any of the relevant types in the
@solana/spl-token
API. I assume this is intentional, but I have begun implementing the API following the same format as the other Token Extension methods for my own use cases. Which is a bit of a pain so far and I'm not sure if this is completely viable. I am curious why they are not supported yet and if there are plans to implement them?It seems like the "Configure a token account for confidential transfers" commandline example does not even work in the Confidential Transfers quick start guide.. I get a "Transaction simulation failed: Attempt to load a program that does not exist" RPC error. I'm at least able to invoke the ConfidentialTransfer::ConfigureAccount instruction via typescript on devnet, so I thought this error response was odd. But that might be unrelated.
Commandline RPC Error:
Error: Client(Error { request: Some(SendTransaction), kind: RpcError(RpcResponseError { code: -32002, message: "Transaction simulation failed: Attempt to load a program that does not exist", data: SendTransactionPreflightFailure(RpcSimulateTransactionResult { err: Some(ProgramAccountNotFound), logs: Some([]), accounts: None, units_consumed: Some(0), return_data: None }) }) })
Repo with my code.
The text was updated successfully, but these errors were encountered: