repo_id stringclasses 279
values | file_path stringlengths 43 179 | content stringlengths 1 4.18M | __index_level_0__ int64 0 0 |
|---|---|---|---|
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_compressed_balance_by_owner_post_request.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetCompressedBalanceByOwnerPostRequest {
/// ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_compressed_token_balances_by_owner_post_request.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetCompressedTokenBalancesByOwnerPostRequest {
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_multiple_new_address_proofs_post_200_response_result.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetMultipleNewAddressProofsPost200ResponseResult ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/account_with_optional_token_data.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountWithOptionalTokenData {
#[serde(rename... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_compressed_account_proof_post_request.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetCompressedAccountProofPostRequest {
/// An... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_multiple_new_address_proofs_post_request.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetMultipleNewAddressProofsPostRequest {
/// ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_multiple_compressed_accounts_post_request_params.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
/// GetMultipleCompressedAccountsPostRequestParams : Request for compressed account data
#[derive(Clone, Default, Debug, Partial... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/compressed_proof_with_context.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CompressedProofWithContext {
#[serde(rename =... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/context.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Context {
#[serde(rename = "slot")]
pub s... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_multiple_new_address_proofs_post_200_response.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetMultipleNewAddressProofsPost200Response {
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_latest_non_voting_signatures_post_request.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetLatestNonVotingSignaturesPostRequest {
///... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_compressed_account_post_request.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetCompressedAccountPostRequest {
/// An ID t... | 0 |
solana_public_repos/Lightprotocol/light-protocol/photon-api/src | solana_public_repos/Lightprotocol/light-protocol/photon-api/src/models/_get_transaction_with_compression_info_post_request.rs | /*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.45.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetTransactionWithCompressionInfoPostRequest {
... | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/test-utils/Cargo.toml | [package]
name = "light-test-utils"
version = "1.2.1"
description = "Utilities used in Light Protocol program tests"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[features]
default = []
devenv = []
[dependencies]
anchor-lang = { workspace = true }
anchor-spl =... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/assert_compressed_tx.rs | use account_compression::{state::QueueAccount, StateMerkleTreeAccount};
use forester_utils::indexer::{Indexer, StateMerkleTreeAccounts};
use forester_utils::{get_concurrent_merkle_tree, get_hash_set, AccountZeroCopy};
use light_client::rpc::RpcConnection;
use light_hasher::Poseidon;
use light_system_program::sdk::event... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/assert_epoch.rs | use light_client::rpc::RpcConnection;
use light_registry::{
protocol_config::state::ProtocolConfigPda,
utils::{get_epoch_pda_address, get_forester_pda, get_protocol_config_pda_address},
EpochPda, ForesterEpochPda, ForesterPda,
};
use solana_sdk::pubkey::Pubkey;
pub async fn assert_finalized_epoch_registrat... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/test_forester.rs | use account_compression::instruction::UpdateAddressMerkleTree;
use account_compression::state::QueueAccount;
use account_compression::utils::constants::{
ADDRESS_MERKLE_TREE_HEIGHT, ADDRESS_MERKLE_TREE_ROOTS,
};
use account_compression::{instruction::InsertAddresses, StateMerkleTreeAccount, ID};
use account_compres... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/lib.rs | use account_compression::initialize_address_merkle_tree::Pubkey;
use account_compression::{
AddressMerkleTreeConfig, AddressQueueConfig, QueueType, RegisteredProgram,
};
use solana_sdk::signature::{Keypair, Signature, Signer};
use solana_sdk::{instruction::InstructionError, transaction};
use std::cmp;
pub mod addr... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/assert_address_merkle_tree.rs | use forester_utils::{get_indexed_merkle_tree, AccountZeroCopy};
use light_client::rpc::RpcConnection;
use light_hasher::Poseidon;
use solana_sdk::pubkey::Pubkey;
#[allow(clippy::too_many_arguments)]
pub async fn assert_address_merkle_tree_initialized<R: RpcConnection>(
rpc: &mut R,
merkle_tree_pubkey: &Pubkey,... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/assert_merkle_tree.rs | use account_compression::StateMerkleTreeAccount;
use forester_utils::{get_concurrent_merkle_tree, AccountZeroCopy};
use light_client::rpc::RpcConnection;
use light_hasher::Poseidon;
use light_utils::fee::compute_rollover_fee;
use solana_sdk::pubkey::Pubkey;
#[allow(clippy::too_many_arguments)]
pub async fn assert_merk... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/address_tree_rollover.rs | #![allow(clippy::await_holding_refcell_ref)]
use anchor_lang::{InstructionData, Key, Lamports, ToAccountInfo, ToAccountMetas};
use solana_sdk::clock::Slot;
use solana_sdk::{
account::{AccountSharedData, WritableAccount},
account_info::AccountInfo,
instruction::Instruction,
pubkey::Pubkey,
signature... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/assert_rollover.rs | use account_compression::{MerkleTreeMetadata, QueueMetadata};
use anchor_lang::prelude::Pubkey;
use light_concurrent_merkle_tree::ConcurrentMerkleTree;
use light_hasher::Hasher;
pub fn assert_rolledover_merkle_trees<H, const HEIGHT: usize>(
old_merkle_tree: &ConcurrentMerkleTree<H, HEIGHT>,
new_merkle_tree: &C... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/spl.rs | use anchor_spl::token::{Mint, TokenAccount};
use forester_utils::create_account_instruction;
use forester_utils::indexer::{Indexer, TokenDataWithContext};
use light_compressed_token::process_compress_spl_token_account::sdk::create_compress_spl_token_account_instruction;
use light_compressed_token::{
burn::sdk::{cre... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/assert_queue.rs | use account_compression::{QueueAccount, QueueMetadata, QueueType, RolloverMetadata};
use forester_utils::{get_hash_set, AccountZeroCopy};
use light_client::rpc::RpcConnection;
use light_utils::fee::compute_rollover_fee;
use solana_sdk::pubkey::Pubkey;
#[allow(clippy::too_many_arguments)]
pub async fn assert_address_qu... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/assert_token_tx.rs | use crate::assert_compressed_tx::{
assert_merkle_tree_after_tx, assert_nullifiers_exist_in_hash_sets,
assert_public_transaction_event, MerkleTreeTestSnapShot,
};
use anchor_lang::AnchorSerialize;
use forester_utils::indexer::{Indexer, TokenDataWithContext};
use light_client::rpc::RpcConnection;
use light_compre... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/e2e_test_env.rs | // Flow:
// init indexer
// init first keypair
// init crank
// vec of public Merkle tree NF queue pairs
// vec of public address Mt and queue pairs
// for i in rounds
// randomly add new keypair
// for every keypair randomly select whether it does an action
// Architecture:
// - bundle trees, indexer etc in a E2ETe... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/state_tree_rollover.rs | #![allow(clippy::await_holding_refcell_ref)]
use crate::assert_rollover::{
assert_rolledover_merkle_trees, assert_rolledover_merkle_trees_metadata,
assert_rolledover_queues_metadata,
};
use account_compression::NullifierQueueConfig;
use account_compression::{
self, initialize_address_merkle_tree::AccountLo... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/system_program.rs | use forester_utils::indexer::Indexer;
use light_hasher::Poseidon;
use light_system_program::sdk::event::PublicTransactionEvent;
use light_system_program::{
sdk::{
address::derive_address,
compressed_account::{
CompressedAccount, CompressedAccountWithMerkleContext, MerkleContext,
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils/src | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/indexer/mod.rs | pub mod test_indexer;
pub use test_indexer::TestIndexer;
| 0 |
solana_public_repos/Lightprotocol/light-protocol/test-utils/src | solana_public_repos/Lightprotocol/light-protocol/test-utils/src/indexer/test_indexer.rs | use log::{debug, info, warn};
use num_bigint::BigUint;
use solana_sdk::bs58;
use std::marker::PhantomData;
use std::sync::{Arc, Mutex};
use crate::create_address_merkle_tree_and_queue_account_with_assert;
use crate::e2e_test_env::KeypairActionConfig;
use crate::spl::create_initialize_mint_instructions;
use account_com... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/Cargo.toml | [package]
name = "light-hasher"
version = "1.1.0"
description = "Trait for generic usage of hash functions on Solana"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[features]
solana = []
[dependencies]
light-poseidon = "0.2.0"
solana-program = { workspace = tru... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/sha256.rs | use crate::{
errors::HasherError,
zero_bytes::{sha256::ZERO_BYTES, ZeroBytes},
zero_indexed_leaf::sha256::ZERO_INDEXED_LEAF,
Hash, Hasher,
};
#[derive(Clone, Copy)] // To allow using with zero copy Solana accounts.
pub struct Sha256;
impl Hasher for Sha256 {
fn hash(val: &[u8]) -> Result<Hash, Has... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/lib.rs | pub mod bytes;
pub mod errors;
pub mod keccak;
pub mod poseidon;
pub mod sha256;
pub mod syscalls;
pub mod zero_bytes;
pub mod zero_indexed_leaf;
pub use keccak::Keccak;
pub use poseidon::Poseidon;
pub use sha256::Sha256;
pub use crate::errors::HasherError;
use crate::zero_bytes::ZeroBytes;
pub const HASH_BYTES: usi... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/keccak.rs | use crate::{
errors::HasherError,
zero_bytes::{keccak::ZERO_BYTES, ZeroBytes},
zero_indexed_leaf::keccak::ZERO_INDEXED_LEAF,
Hash, Hasher,
};
#[derive(Clone, Copy)] // To allow using with zero copy Solana accounts.
pub struct Keccak;
impl Hasher for Keccak {
fn hash(val: &[u8]) -> Result<Hash, Has... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/errors.rs | use light_poseidon::PoseidonError;
use solana_program::poseidon::PoseidonSyscallError;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum HasherError {
#[error("Integer overflow, value too large")]
IntegerOverflow,
#[error("Poseidon hasher error: {0}")]
Poseidon(#[from] PoseidonError),
#[error(... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/bytes.rs | /// A trait providing [`as_byte_vec()`](AsByteVec::as_byte_vec) method for types which
/// are used inside compressed accounts.
pub trait AsByteVec {
fn as_byte_vec(&self) -> Vec<Vec<u8>>;
}
macro_rules! impl_as_byte_vec_for_integer_type {
($int_ty:ty) => {
impl AsByteVec for $int_ty {
fn a... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/poseidon.rs | use crate::{
errors::HasherError,
zero_bytes::{poseidon::ZERO_BYTES, ZeroBytes},
zero_indexed_leaf::poseidon::ZERO_INDEXED_LEAF,
Hash, Hasher,
};
#[derive(Debug, Clone, Copy)]
pub struct Poseidon;
impl Hasher for Poseidon {
fn hash(val: &[u8]) -> Result<Hash, HasherError> {
Self::hashv(&[v... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/zero_indexed_leaf/sha256.rs | // This file is generated by xtask. Do not edit it manually.
pub const ZERO_INDEXED_LEAF: [u8; 32] = [
131u8, 74u8, 112u8, 155u8, 162u8, 83u8, 78u8, 190u8, 62u8, 225u8, 57u8, 127u8, 212u8, 247u8,
189u8, 40u8, 139u8, 42u8, 204u8, 29u8, 32u8, 160u8, 141u8, 108u8, 134u8, 45u8, 205u8, 153u8,
182u8, 240u8, 68u8... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/zero_indexed_leaf/keccak.rs | // This file is generated by xtask. Do not edit it manually.
pub const ZERO_INDEXED_LEAF: [u8; 32] = [
60u8, 172u8, 49u8, 121u8, 8u8, 198u8, 153u8, 254u8, 135u8, 58u8, 127u8, 110u8, 228u8, 232u8,
205u8, 99u8, 251u8, 233u8, 145u8, 139u8, 35u8, 21u8, 201u8, 123u8, 233u8, 21u8, 133u8, 89u8,
1u8, 104u8, 227u8,... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/zero_indexed_leaf/mod.rs | pub mod keccak;
pub mod poseidon;
pub mod sha256;
| 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/zero_indexed_leaf/poseidon.rs | // This file is generated by xtask. Do not edit it manually.
pub const ZERO_INDEXED_LEAF: [u8; 32] = [
11u8, 193u8, 136u8, 210u8, 125u8, 204u8, 234u8, 220u8, 29u8, 207u8, 182u8, 175u8, 10u8, 122u8,
240u8, 143u8, 226u8, 134u8, 78u8, 236u8, 236u8, 150u8, 197u8, 174u8, 124u8, 238u8, 109u8,
179u8, 27u8, 165u8,... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/zero_bytes/sha256.rs | // This file is generated by xtask. Do not edit it manually.
use super::ZeroBytes;
pub const ZERO_BYTES: ZeroBytes = [
[
0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8,
0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8,
],
[
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/zero_bytes/keccak.rs | // This file is generated by xtask. Do not edit it manually.
use super::ZeroBytes;
pub const ZERO_BYTES: ZeroBytes = [
[
0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8,
0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8,
],
[
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/zero_bytes/mod.rs | pub mod keccak;
pub mod poseidon;
pub mod sha256;
pub const MAX_HEIGHT: usize = 32;
pub type ZeroBytes = [[u8; 32]; MAX_HEIGHT + 1];
| 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/zero_bytes/poseidon.rs | // This file is generated by xtask. Do not edit it manually.
use super::ZeroBytes;
pub const ZERO_BYTES: ZeroBytes = [
[
0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8,
0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8,
],
[
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/syscalls/definitions.rs | //! This module is a partial copy from
//! [solana-program](https://github.com/solana-labs/solana/blob/master/sdk/program/src/syscalls/definitions.rs),
//! which is licensed under Apache License 2.0.
#[cfg(target_feature = "static-syscalls")]
macro_rules! define_syscall {
(fn $name:ident($($arg:ident: $typ:ty),*) ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hasher/src/syscalls/mod.rs | //! This module is a partial copy from
//! [solana-program](https://github.com/solana-labs/solana/blob/master/sdk/program/src/syscalls/definitions.rs),
//! which is licensed under Apache License 2.0.
//!
//! The purpose of the module is to provide definition of Poseidon syscall
//! without upgrading solana-program and ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hash-set/Cargo.toml | [package]
name = "light-hash-set"
version = "1.2.0"
description = "Hash set which can be stored on a Solana account"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[features]
solana = ["solana-program"]
[dependencies]
light-bounded-vec = { path = "../bounded-vec... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hash-set | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hash-set/src/zero_copy.rs | use std::{
marker::PhantomData,
mem,
ops::{Deref, DerefMut},
ptr::NonNull,
};
use crate::{HashSet, HashSetCell, HashSetError};
/// A `HashSet` wrapper which can be instantiated from Solana account bytes
/// without copying them.
#[derive(Debug)]
pub struct HashSetZeroCopy<'a> {
pub hash_set: mem::... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hash-set | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/hash-set/src/lib.rs | use light_utils::{bigint::bigint_to_be_bytes_array, UtilsError};
use num_bigint::{BigUint, ToBigUint};
use num_traits::{FromBytes, ToPrimitive};
use std::{
alloc::{self, handle_alloc_error, Layout},
cmp::Ordering,
marker::Send,
mem,
ptr::NonNull,
};
use thiserror::Error;
pub mod zero_copy;
pub con... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/Cargo.toml | [package]
name = "light-indexed-merkle-tree"
version = "1.1.0"
description = "Implementation of indexed (and concurrent) Merkle tree in Rust"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[features]
solana = [
"light-concurrent-merkle-tree/solana",
"solana-p... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/tests/tests.rs | use std::cell::{Ref, RefCell, RefMut};
use light_bounded_vec::BoundedVec;
use light_concurrent_merkle_tree::{
errors::ConcurrentMerkleTreeError,
event::IndexedMerkleTreeUpdate,
light_hasher::{Hasher, Poseidon},
};
use light_hash_set::{HashSet, HashSetError};
use light_indexed_merkle_tree::{
array::{Ind... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/src/copy.rs | use std::{fmt, marker::PhantomData, ops::Deref};
use crate::{errors::IndexedMerkleTreeError, IndexedMerkleTree};
use light_bounded_vec::CyclicBoundedVecMetadata;
use light_concurrent_merkle_tree::{
copy::ConcurrentMerkleTreeCopy, errors::ConcurrentMerkleTreeError,
};
use light_hasher::Hasher;
use light_utils::offs... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/src/zero_copy.rs | use std::{
fmt,
marker::PhantomData,
mem,
ops::{Deref, DerefMut},
};
use light_bounded_vec::{CyclicBoundedVec, CyclicBoundedVecMetadata};
use light_concurrent_merkle_tree::{
errors::ConcurrentMerkleTreeError,
zero_copy::{ConcurrentMerkleTreeZeroCopy, ConcurrentMerkleTreeZeroCopyMut},
Concur... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/src/lib.rs | use std::{
fmt,
marker::PhantomData,
mem,
ops::{Deref, DerefMut},
};
use array::{IndexedArray, IndexedElement};
use changelog::IndexedChangelogEntry;
use light_bounded_vec::{BoundedVec, CyclicBoundedVec, CyclicBoundedVecMetadata};
use light_concurrent_merkle_tree::{
errors::ConcurrentMerkleTreeErro... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/src/errors.rs | use light_bounded_vec::BoundedVecError;
use light_concurrent_merkle_tree::{
errors::ConcurrentMerkleTreeError, light_hasher::errors::HasherError,
};
use light_utils::UtilsError;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum IndexedMerkleTreeError {
#[error("Integer overflow")]
IntegerOverflow,
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/src/array.rs | use std::{cmp::Ordering, fmt::Debug, marker::PhantomData};
use crate::{errors::IndexedMerkleTreeError, HIGHEST_ADDRESS_PLUS_ONE};
use light_concurrent_merkle_tree::{event::RawIndexedElement, light_hasher::Hasher};
use light_utils::bigint::bigint_to_be_bytes_array;
use num_bigint::BigUint;
use num_traits::Zero;
use num... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/src/reference.rs | use std::marker::PhantomData;
use light_bounded_vec::{BoundedVec, BoundedVecError};
use light_concurrent_merkle_tree::light_hasher::{errors::HasherError, Hasher};
use light_merkle_tree_reference::{MerkleTree, ReferenceMerkleTreeError};
use light_utils::bigint::bigint_to_be_bytes_array;
use num_bigint::BigUint;
use num... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/indexed/src/changelog.rs | use light_concurrent_merkle_tree::event::RawIndexedElement;
/// NET_HEIGHT = HEIGHT - CANOPY_DEPTH
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct IndexedChangelogEntry<I, const NET_HEIGHT: usize>
where
I: Clone,
{
/// Element that was a subject to the change.
pub element: RawIndexedElement<I>,
/// ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/bounded-vec/Cargo.toml | [package]
name = "light-bounded-vec"
version = "1.1.0"
description = "Bounded and cyclic vector implementations"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[features]
solana = ["solana-program"]
[dependencies]
bytemuck = { version = "1.17", features = ["min_... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/bounded-vec | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/bounded-vec/src/lib.rs | use std::{
alloc::{self, handle_alloc_error, Layout},
fmt, mem,
ops::{Index, IndexMut},
ptr::{self, NonNull},
slice::{self, Iter, IterMut, SliceIndex},
};
use memoffset::span_of;
use thiserror::Error;
#[derive(Debug, Error, PartialEq)]
pub enum BoundedVecError {
#[error("The vector is full, ca... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/Cargo.toml | [package]
name = "light-concurrent-merkle-tree"
version = "1.1.0"
edition = "2021"
description = "Concurrent Merkle tree implementation"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
[features]
heavy-tests = []
solana = [
"light-bounded-vec/solana",
"light-hasher/solana",
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/tests/tests.rs | use ark_bn254::Fr;
use ark_ff::{BigInteger, PrimeField, UniformRand};
use light_bounded_vec::{BoundedVec, BoundedVecError, CyclicBoundedVec};
use light_concurrent_merkle_tree::{
changelog::{ChangelogEntry, ChangelogPath},
errors::ConcurrentMerkleTreeError,
zero_copy::ConcurrentMerkleTreeZeroCopyMut,
Con... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/src/copy.rs | use std::ops::Deref;
use light_bounded_vec::{BoundedVecMetadata, CyclicBoundedVecMetadata};
use light_hasher::Hasher;
use light_utils::offset::copy::{read_bounded_vec_at, read_cyclic_bounded_vec_at, read_value_at};
use memoffset::{offset_of, span_of};
use crate::{errors::ConcurrentMerkleTreeError, ConcurrentMerkleTre... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/src/zero_copy.rs | use std::{
marker::PhantomData,
mem,
ops::{Deref, DerefMut},
};
use light_bounded_vec::{
BoundedVec, BoundedVecMetadata, CyclicBoundedVec, CyclicBoundedVecMetadata,
};
use light_hasher::Hasher;
use light_utils::offset::zero_copy::{read_array_like_ptr_at, read_ptr_at, write_at};
use memoffset::{offset_o... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/src/lib.rs | use std::{
alloc::{self, handle_alloc_error, Layout},
iter::Skip,
marker::PhantomData,
mem,
};
use changelog::ChangelogPath;
use light_bounded_vec::{
BoundedVec, BoundedVecMetadata, CyclicBoundedVec, CyclicBoundedVecIterator,
CyclicBoundedVecMetadata,
};
pub use light_hasher;
use light_hasher::... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/src/event.rs | use borsh::{BorshDeserialize, BorshSerialize};
#[derive(BorshDeserialize, BorshSerialize, Debug)]
pub struct MerkleTreeEvents {
pub events: Vec<MerkleTreeEvent>,
}
/// Event containing the Merkle path of the given
/// [`StateMerkleTree`](light_merkle_tree_program::state::StateMerkleTree)
/// change. Indexers can u... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/src/errors.rs | use light_bounded_vec::BoundedVecError;
use light_hasher::errors::HasherError;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum ConcurrentMerkleTreeError {
#[error("Integer overflow")]
IntegerOverflow,
#[error("Invalid height, it has to be greater than 0")]
HeightZero,
#[error("Invalud height... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/src/hash.rs | use light_bounded_vec::BoundedVec;
use light_hasher::Hasher;
use crate::errors::ConcurrentMerkleTreeError;
/// Returns the hash of the parent node based on the provided `node` (with its
/// `node_index`) and `sibling` (with its `sibling_index`).
pub fn compute_parent_node<H>(
node: &[u8; 32],
sibling: &[u8; 3... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/concurrent/src/changelog.rs | use std::ops::{Deref, DerefMut};
use light_bounded_vec::BoundedVec;
use crate::errors::ConcurrentMerkleTreeError;
#[derive(Clone, Debug, PartialEq, Eq)]
#[repr(transparent)]
pub struct ChangelogPath<const HEIGHT: usize>(pub [Option<[u8; 32]>; HEIGHT]);
impl<const HEIGHT: usize> ChangelogPath<HEIGHT> {
pub fn fr... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/reference/Cargo.toml | [package]
name = "light-merkle-tree-reference"
version = "1.1.0"
description = "Non-sparse reference Merkle tree implementation"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[dependencies]
light-bounded-vec = { path = "../bounded-vec", version = "1.1.0" }
light... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/reference | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/reference/tests/tests.rs | use light_bounded_vec::BoundedVec;
use light_hasher::{Hasher, Keccak, Poseidon, Sha256};
use light_merkle_tree_reference::MerkleTree;
fn append<H>(canopy_depth: usize)
where
H: Hasher,
{
const HEIGHT: usize = 4;
let mut mt = MerkleTree::<H>::new(4, canopy_depth);
let leaf_1 = [1_u8; 32];
mt.appen... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/reference | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/reference/src/lib.rs | pub mod sparse_merkle_tree;
use std::marker::PhantomData;
use light_bounded_vec::{BoundedVec, BoundedVecError};
use light_hasher::{errors::HasherError, Hasher};
use thiserror::Error;
#[derive(Debug, Error)]
pub enum ReferenceMerkleTreeError {
#[error("Leaf {0} does not exist")]
LeafDoesNotExist(usize),
#... | 0 |
solana_public_repos/Lightprotocol/light-protocol/merkle-tree/reference | solana_public_repos/Lightprotocol/light-protocol/merkle-tree/reference/src/sparse_merkle_tree.rs | use light_hasher::Hasher;
use num_bigint::BigUint;
use std::marker::PhantomData;
#[derive(Clone, Debug)]
pub struct SparseMerkleTree<H: Hasher, const HEIGHT: usize> {
subtrees: [[u8; 32]; HEIGHT],
next_index: usize,
root: [u8; 32],
_hasher: PhantomData<H>,
}
impl<H, const HEIGHT: usize> SparseMerkleTr... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/README.md | <p align="center">
<img src="https://github.com/ldiego08/light-protocol/raw/main/assets/logo.svg" width="90" />
</p>
<h1 align="center">@lightprotocol/stateless.js</h1>
<p align="center">
<b>This is the JavaScript SDK for building Solana applications with ZK Compression for Node and web.</b>
</p>
<p align="cente... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/rollup.config.js | import typescript from '@rollup/plugin-typescript';
import nodePolyfills from 'rollup-plugin-polyfill-node';
import dts from 'rollup-plugin-dts';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
const rolls = (fmt, env) => ({
input: 'src/index.ts',
output: {
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tsconfig.test.json | {
"compilerOptions": {
"esModuleInterop": true,
"rootDirs": ["src", "tests"]
},
"extends": "./tsconfig.json",
"include": ["./tests/**/*.ts", "vitest.config.ts"]
}
| 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/package.json | {
"name": "@lightprotocol/stateless.js",
"version": "0.16.0",
"description": "JavaScript API for Light and ZK Compression",
"sideEffects": false,
"main": "dist/cjs/node/index.cjs",
"type": "module",
"exports": {
".": {
"require": "./dist/cjs/node/index.cjs",
"... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/.prettierrc | {
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 80,
"useTabs": false,
"tabWidth": 4,
"bracketSpacing": true,
"arrowParens": "avoid"
}
| 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tsconfig.json | {
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"importHelpers": true,
"outDir": "./dist",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"declaration": true,
"target": "ESNext",
"module": ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/.eslintignore | node_modules
lib
dist
| 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/playwright.config.ts | import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
webServer: {
command: 'npx http-server -p 4004 -c-1',
port: 4004,
cwd: '.',
timeout: 15 * 1000,
},
testDir: './tests/e2e/browser',
};
export default config;
| 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/vitest.config.ts | import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['tests/**/*.test.ts'],
exclude: process.env.EXCLUDE_E2E ? ['tests/e2e/**'] : [],
testTimeout: 30000,
},
});
| 0 |
solana_public_repos/Lightprotocol/light-protocol/js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/.eslintrc.json | {
"root": true,
"ignorePatterns": ["node_modules", "lib"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json", "./tsconfig.test.json"]
},
"plugins": ["@typescript-eslint", "vitest"],
"extends": [
"eslint:recommended",
"plugin:@type... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit/merkle-tree/merkle-tree.test.ts | import { IndexedArray } from '../../../src/test-helpers/merkle-tree/indexed-array';
import { beforeAll, describe, expect, it } from 'vitest';
import { IndexedElement } from '../../../src/test-helpers/merkle-tree/indexed-array';
import { HIGHEST_ADDRESS_PLUS_ONE } from '../../../src/constants';
import { bn } from '../..... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit/utils/conversion.test.ts | import { describe, it, expect } from 'vitest';
import { toArray } from '../../../src/utils/conversion';
import { calculateComputeUnitPrice } from '../../../src/utils';
describe('toArray', () => {
it('should return same array if array is passed', () => {
const arr = [1, 2, 3];
expect(toArray(arr)).t... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit/utils/validation.test.ts | import { describe, it, expect } from 'vitest';
import { validateSufficientBalance } from '../../../src/utils/validation';
import { bn } from '../../../src/state';
describe('validateSufficientBalance', () => {
it('should not throw error for positive balance', () => {
expect(() => validateSufficientBalance(b... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit/state/compressed-account.test.ts | import { describe, it, expect } from 'vitest';
import {
createCompressedAccount,
createCompressedAccountWithMerkleContext,
createMerkleContext,
} from '../../../src/state/compressed-account';
import { PublicKey } from '@solana/web3.js';
import { bn } from '../../../src/state';
describe('createCompressedAcc... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit/state/bn254.test.ts | import { describe, it, expect } from 'vitest';
import { createBN254, encodeBN254toBase58 } from '../../../src/state/BN254';
import { bn } from '../../../src/state';
import { PublicKey } from '@solana/web3.js';
import { FIELD_SIZE } from '../../../src/constants';
describe('createBN254 function', () => {
it('should ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/unit/instruction/pack-compressed-accounts.test.ts | import { describe, expect, it } from 'vitest';
import { PublicKey } from '@solana/web3.js';
import { padOutputStateMerkleTrees } from '../../../src/instruction/pack-compressed-accounts';
describe('padOutputStateMerkleTrees', () => {
const treeA: any = PublicKey.unique();
const treeB: any = PublicKey.unique();
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e/transfer.test.ts | import { describe, it, assert, beforeAll } from 'vitest';
import { Signer } from '@solana/web3.js';
import { newAccountWithLamports } from '../../src/utils/test-utils';
import { Rpc } from '../../src/rpc';
import { bn, compress } from '../../src';
import { transfer } from '../../src/actions/transfer';
import { getTestR... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e/serde.test.ts | import { describe, it, expect } from 'vitest';
import { LightSystemProgram } from '../../src/programs';
import {
CompressedAccount,
PublicTransactionEvent,
bn,
useWallet,
} from '../../src';
import { Connection, Keypair, PublicKey } from '@solana/web3.js';
import { AnchorProvider, Program, setProvider }... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e/test-rpc.test.ts | import { describe, it, assert, beforeAll, expect } from 'vitest';
import { Signer } from '@solana/web3.js';
import {
STATE_MERKLE_TREE_NETWORK_FEE,
STATE_MERKLE_TREE_ROLLOVER_FEE,
defaultTestStateTreeAccounts,
} from '../../src/constants';
import { newAccountWithLamports } from '../../src/utils/test-utils';... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e/compress.test.ts | import { describe, it, assert, beforeAll, expect } from 'vitest';
import { Signer } from '@solana/web3.js';
import {
STATE_MERKLE_TREE_NETWORK_FEE,
ADDRESS_QUEUE_ROLLOVER_FEE,
STATE_MERKLE_TREE_ROLLOVER_FEE,
defaultTestStateTreeAccounts,
ADDRESS_TREE_NETWORK_FEE,
} from '../../src/constants';
import... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e/testnet.test.ts | import { describe, it, assert, beforeAll } from 'vitest';
import { Signer } from '@solana/web3.js';
import { newAccountWithLamports } from '../../src/utils/test-utils';
import { createRpc, Rpc } from '../../src/rpc';
import { bn, compress } from '../../src';
import { transfer } from '../../src/actions/transfer';
import... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e/rpc-interop.test.ts | import { describe, it, assert, beforeAll, expect } from 'vitest';
import { PublicKey, Signer } from '@solana/web3.js';
import { newAccountWithLamports } from '../../src/utils/test-utils';
import { Rpc, createRpc } from '../../src/rpc';
import {
LightSystemProgram,
bn,
compress,
createAccount,
create... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e/browser/rpc.browser.spec.ts | import { test, expect } from '@playwright/test';
import {
Rpc,
bn,
compress,
createRpc,
defaultTestStateTreeAccounts,
newAccountWithLamports,
} from '../../../src';
test.describe('RPC in browser', () => {
const { merkleTree } = defaultTestStateTreeAccounts();
test.beforeAll(async ({ p... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/tests/e2e/browser/test-page.html | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Test Page</title>
</head>
<body>
<!-- <script type="module" src="/dist/es/index.js"></script> -->
<script type="module">
import * as stateless from '/dist/browser/index.js';
window... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/src/errors.ts | // TODO: Clean up
export enum UtxoErrorCode {
NEGATIVE_LAMPORTS = 'NEGATIVE_LAMPORTS',
NOT_U64 = 'NOT_U64',
BLINDING_EXCEEDS_FIELD_SIZE = 'BLINDING_EXCEEDS_FIELD_SIZE',
}
export enum SelectInUtxosErrorCode {
FAILED_TO_FIND_UTXO_COMBINATION = 'FAILED_TO_FIND_UTXO_COMBINATION',
INVALID_NUMBER_OF_IN_U... | 0 |
solana_public_repos/Lightprotocol/light-protocol/js/stateless.js | solana_public_repos/Lightprotocol/light-protocol/js/stateless.js/src/rpc.ts | import {
Connection,
ConnectionConfig,
SolanaJSONRPCError,
PublicKey,
} from '@solana/web3.js';
import { Buffer } from 'buffer';
import {
BalanceResult,
CompressedAccountResult,
CompressedAccountsByOwnerResult,
CompressedProofWithContext,
CompressedTokenAccountsByOwnerOrDelegateResul... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.