MCPcopy Create free account

hub / github.com/Privacy-Cash/privacy-cash / functions

Functions208 in github.com/Privacy-Cash/privacy-cash

↓ 81 callersMethodgetCommitment
()
anchor/tests/lib/utxo.ts:57
↓ 69 callersFunctiongetExtDataHash
(extData: { recipient: string | PublicKey; extAmount: string | number | BN; encryptedOutput1?: string |
anchor/tests/lib/utils.ts:36
↓ 67 callersFunctioncreateVersionedTransactionWithALT
( connection: Connection, payer: PublicKey, instructions: anchor.web3.TransactionInstruction[], altAdd
anchor/tests/lib/test_alt.ts:209
↓ 67 callersFunctionsendAndConfirmVersionedTransaction
( connection: Connection, transaction: VersionedTransaction, signers: Keypair[] )
anchor/tests/lib/test_alt.ts:245
↓ 59 callersMethodgetNullifier
()
anchor/tests/lib/utxo.ts:68
↓ 59 callersFunctionprove
* Generates a ZK proof using snarkjs and formats it for use on-chain * * @param input The circuit inputs to generate a proof for * @param keyBaseP
anchor/tests/lib/prover.ts:64
↓ 59 callersMethodroot
* Get tree root * @returns {*}
anchor/tests/lib/merkle_tree.ts:74
↓ 57 callersFunctionparseProofToBytesArray
( proof: Proof, compressed: boolean = false, )
anchor/tests/lib/prover.ts:170
↓ 57 callersFunctionparseToBytesArray
(publicSignals: string[])
anchor/tests/lib/prover.ts:241
↓ 49 callersMethodinsert
* Insert new element into the tree * @param element Element to insert
anchor/tests/lib/merkle_tree.ts:85
↓ 47 callersFunctioncreateGlobalTestALT
( connection: Connection, payer: Keypair, addresses: PublicKey[] )
anchor/tests/lib/test_alt.ts:29
↓ 34 callersFunctioncreateExtDataMinified
(extData: any)
anchor/tests/spl_tests.ts:82
↓ 33 callersFunctioncreateExtDataMinified
(extData: any)
anchor/tests/sol_tests.ts:78
↓ 33 callersFunctionfindCrossCheckNullifierPDAs
(program: anchor.Program<any>, proof: any)
anchor/tests/spl_tests.ts:67
↓ 33 callersFunctionfindCrossCheckNullifierPDAs
(program: anchor.Program<any>, proof: any)
anchor/tests/sol_tests.ts:63
↓ 33 callersFunctionfindNullifierPDAs
(program: anchor.Program<any>, proof: any)
anchor/tests/spl_tests.ts:52
↓ 33 callersFunctionfindNullifierPDAs
(program: anchor.Program<any>, proof: any)
anchor/tests/sol_tests.ts:48
↓ 33 callersFunctiongetCreateTokenAccountInstructionIfNeeded
( connection: anchor.web3.Connection, payer: PublicKey, tokenAccountAddress: PublicKey, owner: PublicK
anchor/tests/spl_tests.ts:90
↓ 32 callersFunctionvalidate_fee
* Validates that the provided fee meets the minimum required fee based on global configuration. * * For deposits (ext_amount > 0): * - expected_fe
anchor/programs/zkcash/src/utils.rs:148
↓ 25 callersFunctiongetTestProtocolAddressesWithMint
( programId: PublicKey, authority: PublicKey, treeAta: PublicKey, feeRecipient: PublicKey, feeRecipi
anchor/tests/lib/test_alt.ts:164
↓ 24 callersMethodpath
* Get merkle path to a leaf * @param {number} index Leaf index to generate path for * @returns {{pathElements: number[], pathIndex: number[]}} A
anchor/tests/lib/merkle_tree.ts:137
↓ 22 callersFunctiongetTestProtocolAddresses
( programId: PublicKey, authority: PublicKey, feeRecipient: PublicKey )
anchor/tests/lib/test_alt.ts:127
↓ 19 callersFunctioncheck_public_amount
* Calculates the expected public amount from ext_amount and fee, then verifies if it matches * the provided public_amount_bytes. * * @param ext_amo
anchor/programs/zkcash/src/utils.rs:92
↓ 19 callersFunctiongetMintAddressField
(mint: PublicKey)
anchor/tests/lib/utils.ts:104
↓ 17 callersFunctioncalculate_complete_ext_data_hash
* Calculate ExtData hash with encrypted outputs included * This matches the client-side calculation for hash verification * * This is for SOL mint
anchor/programs/zkcash/src/utils.rs:276
↓ 16 callersFunctionchange_endianness
(bytes: &[u8])
anchor/programs/zkcash/src/utils.rs:313
↓ 15 callersFunctioncalculateDepositFee
(amount: number)
anchor/tests/spl_tests.ts:32
↓ 15 callersMethodindexOf
* Find an element in the tree * @param element An element to find * @param comparator A function that checks leaf value equality * @returns {
anchor/tests/lib/merkle_tree.ts:163
↓ 14 callersFunctioncalculateDepositFee
(amount: number)
anchor/tests/sol_tests.ts:28
↓ 13 callersFunctionfr_to_bytes
Helper function to convert Fr to bytes in big-endian format
anchor/programs/zkcash/tests/unit/utils_test.rs:64
↓ 12 callersFunctiongenerateRandomNullifier
()
anchor/tests/sol_tests.ts:18
↓ 11 callersFunctioncreate_test_account
()
anchor/programs/zkcash/tests/unit/merkle_tree_test.rs:5
↓ 9 callersFunctioncalculateWithdrawalFee
(amount: number)
anchor/tests/spl_tests.ts:37
↓ 8 callersFunctiongenerateRandomNullifier
()
anchor/tests/spl_tests.ts:22
↓ 8 callersMethodsign
* Sign a message using keypair private key * * @param {string|number|BigNumber} commitment a hex string with commitment * @param {string|numb
anchor/tests/lib/keypair.ts:40
↓ 6 callersFunctionbnToBytes
(bn: anchor.BN)
anchor/tests/sol_tests.ts:37
↓ 6 callersFunctioncalculateFee
(amount: number, feeRate: number)
anchor/tests/spl_tests.ts:27
↓ 6 callersFunctioncalculateWithdrawalFee
(amount: number)
anchor/tests/sol_tests.ts:33
↓ 5 callersMethodserialize
* Serialize entire tree state including intermediate layers into a plain object * Deserializing it back will not require to recompute any hashes
anchor/tests/lib/merkle_tree.ts:184
↓ 5 callersFunctionu64_to_bytes
Helper function to create a byte array representing a u64 value
anchor/programs/zkcash/tests/unit/utils_test.rs:73
↓ 4 callersFunctionbnToBytes
(bn: anchor.BN)
anchor/tests/spl_tests.ts:41
↓ 3 callersMethod_doCalculateWitness
(input_orig, sanityCheck)
artifacts/circuits/transaction2_js/witness_calculator.js:131
↓ 3 callersFunctionaddBitmaskToByte
(byte: number, yIsPositive: boolean)
anchor/tests/lib/prover.ts:290
↓ 3 callersFunctionfromArray32
(arr)
artifacts/circuits/transaction2_js/witness_calculator.js:338
↓ 3 callersMethodinitialize
(tree_account: &mut MerkleTreeAccount)
anchor/programs/zkcash/src/merkle_tree.rs:9
↓ 3 callersMethodverify
Verifies the proof, and checks that public inputs are smaller than field size.
anchor/programs/zkcash/src/groth16.rs:114
↓ 2 callersMethod_rebuild
()
anchor/tests/lib/merkle_tree.ts:56
↓ 2 callersFunctioncalculateFee
(amount: number, feeRate: number)
anchor/tests/spl_mint_test.ts:27
↓ 2 callersFunctioncalculateFee
(amount: number, feeRate: number)
anchor/tests/sol_tests.ts:23
↓ 2 callersFunctionflatArray
(a)
artifacts/circuits/transaction2_js/witness_calculator.js:347
↓ 2 callersFunctiongetMessage
()
artifacts/circuits/transaction2_js/witness_calculator.js:81
↓ 2 callersFunctionqualify_input
(prefix,input,input1)
artifacts/circuits/transaction2_js/witness_calculator.js:292
↓ 2 callersMethodupdate
* Change an element in the tree * @param {number} index Index of element to change * @param element Updated element value
anchor/tests/lib/merkle_tree.ts:110
↓ 2 callersFunctionyElementIsPositiveG1
(yElement: anchor.BN)
anchor/tests/lib/prover.ts:260
↓ 1 callersFunctioncalculateDepositFee
(amount: number)
anchor/tests/spl_mint_test.ts:32
↓ 1 callersMethodcalculateWTNSBin
(input, sanityCheck)
artifacts/circuits/transaction2_js/witness_calculator.js:212
↓ 1 callersMethodcalculateWitness
(input, sanityCheck)
artifacts/circuits/transaction2_js/witness_calculator.js:176
↓ 1 callersFunctioncreateALT
* Create a new address lookup table
scripts/create_alt_mainnet.ts:36
↓ 1 callersFunctioncreateExtDataMinified
(extData: any)
anchor/tests/spl_mint_test.ts:82
↓ 1 callersFunctionfillArray
(res, a)
artifacts/circuits/transaction2_js/witness_calculator.js:352
↓ 1 callersFunctionfindCrossCheckNullifierPDAs
(program: anchor.Program<any>, proof: any)
anchor/tests/spl_mint_test.ts:67
↓ 1 callersFunctionfindNullifierPDAs
(program: anchor.Program<any>, proof: any)
anchor/tests/spl_mint_test.ts:52
↓ 1 callersFunctionfnvHash
(str)
artifacts/circuits/transaction2_js/witness_calculator.js:369
↓ 1 callersMethodgenerateNew
(lightWasm: LightWasm)
anchor/tests/lib/keypair.ts:44
↓ 1 callersFunctiongenerateSquadUpdateDepositLimitForSplTokenInstruction
()
scripts/update_spl_deposit_limit_via_squad.ts:36
↓ 1 callersFunctiongenerateSquadsTransaction
()
scripts/initialize_spl_tree_mainnet_squads.ts:23
↓ 1 callersFunctiongenerateUpdateDepositLimitForSplTokenDiscriminator
* Generate Anchor instruction discriminator for updateDepositLimitForSplToken * Anchor uses the first 8 bytes of SHA256("global:update_deposit_limit_
scripts/update_spl_deposit_limit_via_squad.ts:20
↓ 1 callersFunctiongetProtocolAddresses
* Get all required addresses for the privacy cash protocol
scripts/create_alt_mainnet.ts:147
↓ 1 callersFunctiongetTreePDA
(program: anchor.Program<any>, mint: PublicKey)
anchor/tests/spl_tests.ts:123
↓ 1 callersFunctioninitialize
* Example output: * Generated PDAs: * Tree Account: 2R6iQwfvX2ixi21MFnm3KSDBfFrCAWv7qpw2cE9ygqt5 * Tree Token Account: FwQAFcHJqDWNBLKoa5qncZhP8fce
scripts/initialize_devnet.ts:46
↓ 1 callersFunctioninitializeSplTree
* Example output: * Generated PDAs: * Tree Account for SPL Token: xxx * Global Config: xxx * Initialization successful! * Transaction signature:
scripts/initialize_spl_tree_devnet.ts:37
↓ 1 callersFunctionis_less_than_bn254_field_size_be
(bytes: &[u8; 32])
anchor/programs/zkcash/src/groth16.rs:149
↓ 1 callersFunctionmain
()
scripts/extend_alt_mainnet.ts:32
↓ 1 callersFunctionmain
()
scripts/create_alt_mainnet.ts:226
↓ 1 callersFunctionnormalize
(n, prime)
artifacts/circuits/transaction2_js/witness_calculator.js:363
↓ 1 callersFunctionprintSharedRWMemory
()
artifacts/circuits/transaction2_js/witness_calculator.js:91
↓ 1 callersFunctionqualify_input_list
(prefix,input,input1)
artifacts/circuits/transaction2_js/witness_calculator.js:281
↓ 1 callersFunctionresetGlobalTestALT
()
anchor/tests/lib/test_alt.ts:22
↓ 1 callersFunctionserializeNewLimit
* Serialize the new limit parameter as u64 (little-endian)
scripts/update_spl_deposit_limit_via_squad.ts:30
↓ 1 callersFunctiontoArray32
(rem,size)
artifacts/circuits/transaction2_js/witness_calculator.js:321
↓ 1 callersFunctionverify_proof
(proof: Proof, verifying_key: Groth16Verifyingkey)
anchor/programs/zkcash/src/utils.rs:214
↓ 1 callersMethodverify_unchecked
Verifies the proof, and does not check that public inputs are smaller than field size.
anchor/programs/zkcash/src/groth16.rs:120
↓ 1 callersFunctionyElementIsPositiveG2
(yElement1: anchor.BN, yElement2: anchor.BN)
anchor/tests/lib/prover.ts:264
Methodappend
( leaf: [u8; 32], tree_account: &mut MerkleTreeAccount, )
anchor/programs/zkcash/src/merkle_tree.rs:26
FunctionbnToBytes
(bn: anchor.BN)
anchor/tests/spl_mint_test.ts:41
FunctionbnToBytes
(bn: anchor.BN)
anchor/tests/lib/utils.ts:14
MethodbulkInsert
* Insert multiple elements into the tree. Tree will be fully rebuilt during this operation. * @param {Array} elements Elements to insert
anchor/tests/lib/merkle_tree.ts:96
MethodcalculateBinWitness
(input, sanityCheck)
artifacts/circuits/transaction2_js/witness_calculator.js:194
FunctioncalculateWithdrawalFee
(amount: number)
anchor/tests/spl_mint_test.ts:37
Methodcircom_version
()
artifacts/circuits/transaction2_js/witness_calculator.js:127
FunctionclearGlobalTestALT
()
anchor/tests/lib/test_alt.ts:285
Methodconstructor
( levels: number, lightWasm: LightWasm, elements: string[] = [], { zeroElement = DEFAULT_ZERO
anchor/tests/lib/merkle_tree.ts:29
Methodconstructor
(privkeyHex: string, lightWasm: LightWasm)
anchor/tests/lib/keypair.ts:25
Methodconstructor
({ lightWasm, amount = new BN(0), /** * Tornado nova doesn't use solana eddsa with curve 255
anchor/tests/lib/utxo.ts:25
Methodconstructor
(instance, sanityCheck)
artifacts/circuits/transaction2_js/witness_calculator.js:109
Methoddeserialize
* Deserialize data into a MerkleTree instance * Make sure to provide the same hashFunction as was used in the source tree, * otherwise the tree
anchor/tests/lib/merkle_tree.ts:201
Methodelements
* Returns a copy of non-zero tree elements * @returns {Object[]}
anchor/tests/lib/merkle_tree.ts:175
Functionext_data_hash_should_match
()
anchor/programs/zkcash/tests/unit/groth16_test.rs:278
Methodfrom_minified
(ctx: &Context<Transact>, minified: ExtDataMinified)
anchor/programs/zkcash/src/lib.rs:569
Methodfrom_minified_spl
(ctx: &Context<TransactSpl>, minified: ExtDataMinified)
anchor/programs/zkcash/src/lib.rs:579
next →1–100 of 208, ranked by callers