├── .cargo
└── config.toml
├── .devcontainer
└── devcontainer.json
├── .dockerignore
├── .github
├── actionlint.yaml
├── actions
│ ├── setup-and-build-nocheck
│ │ └── action.yml
│ └── setup-and-build
│ │ └── action.yml
├── dependabot.yml
└── workflows
│ ├── ci-lint.yml
│ ├── delete-buildjet-cache.yml
│ ├── forester-tests.yml
│ ├── js.yml
│ ├── light-examples-tests.yml
│ ├── light-system-programs-tests.yml
│ ├── lint.yml
│ ├── pr.yml
│ ├── prover-release.yml
│ ├── prover-test.yml
│ ├── release-pr-rust.yml
│ ├── release-pr-ts.yml
│ ├── release.yml
│ └── rust.yml
├── .gitignore
├── .husky
└── pre-commit
├── .npmrc.example
├── .prettierignore
├── Anchor.toml
├── CODEOWNERS
├── Cargo.lock
├── Cargo.toml
├── LICENSE
├── README.md
├── SECURITY.md
├── anchor-programs
└── system
│ ├── Cargo.toml
│ ├── README.md
│ ├── Xargo.toml
│ └── src
│ ├── account_traits.rs
│ ├── constants.rs
│ ├── cpi_context_account.rs
│ ├── errors.rs
│ ├── instructions
│ ├── initialize_cpi_context.rs
│ ├── invoke.rs
│ ├── invoke_cpi.rs
│ └── mod.rs
│ ├── lib.rs
│ └── utils.rs
├── assets
└── logo.svg
├── audits
├── accretion_v1_update_audit.pdf
├── neodyme_v1_audit.pdf
├── ottersec_v1_audit.pdf
├── reilabs_circuits_formal_verification_report.pdf
└── zellic_v1_audit.pdf
├── cli
├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .eslintrc.json
├── .gitignore
├── .mocharc.json
├── .npmignore
├── .yarnrc.yml
├── README.md
├── accounts
│ ├── address_merkle_tree_amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2.json
│ ├── address_merkle_tree_queue_aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F.json
│ ├── batch_address_merkle_tree_EzKE84aVTkCUhDHLELqyJaq1Y7UVVmqxXqZjVHwHY3rK.json
│ ├── batch_state_merkle_tree_HLKs5NJ8FXkJg8BrzJt56adFYYuwg5etzDtBbQYTsixu.json
│ ├── batched_output_queue_6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU.json
│ ├── cpi_context_2_cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK.json
│ ├── cpi_context_cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4.json
│ ├── cpi_context_cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK.json
│ ├── epoch_pda_34w7KcLBXabMkHuXE2fY368vFe6kP3v5EJn8nPvQ8SKn.json
│ ├── forester_epoch_pda_3FBt1BPQHCQkS8k3wrUXMfB6JBhtMhEqQXueHRw2ojZV.json
│ ├── governance_authority_pda_CuEtcKkkbTn6qy2qxqDswq5U2ADsqoipYDAYfRvxPjcp.json
│ ├── group_pda_24rt4RgeyjUCWGS2eF7L7gyNMuz6JWdqYpAvb1KRoHxs.json
│ ├── group_pda_32tgQWfaASE7SfTQvMaSJDrqe728tJQ2SGzxtDDrpDwS.json
│ ├── merkle_tree_pubkey_2_smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho.json
│ ├── merkle_tree_pubkey_smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT.json
│ ├── merkle_tree_pubkey_smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho.json
│ ├── nullifier_queue_pubkey_2_nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X.json
│ ├── nullifier_queue_pubkey_nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148.json
│ ├── nullifier_queue_pubkey_nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X.json
│ ├── registered_forester_pda_2KNqEh23Se8AHecuzR1UkxL26euq2qXSpQPTH1jH7VqU.json
│ ├── registered_program_pda_35hkDgaAKwMCaxRz2ocSZ6NaUrtKkyNqU6c4RV3tYJRh.json
│ └── registered_registry_program_pda_DumMsyvkaGJG4QnQ1BhTgvoRMXsgGxfpKDUCr22Xqu4w.json
├── config.json
├── package.json
├── pnpm-lock.yaml
├── scripts
│ ├── buildProver.sh
│ ├── checkAddProgram.ts
│ └── copyLocalProgramBinaries.sh
├── src
│ ├── commands
│ │ ├── approve-and-mint-to
│ │ │ └── index.ts
│ │ ├── balance
│ │ │ └── index.ts
│ │ ├── compress-sol
│ │ │ └── index.ts
│ │ ├── compress-spl
│ │ │ └── index.ts
│ │ ├── config
│ │ │ ├── config.ts
│ │ │ └── index.ts
│ │ ├── create-mint
│ │ │ └── index.ts
│ │ ├── create-token-pool
│ │ │ └── index.ts
│ │ ├── decompress-sol
│ │ │ └── index.ts
│ │ ├── decompress-spl
│ │ │ └── index.ts
│ │ ├── init
│ │ │ └── index.ts
│ │ ├── merge-token-accounts
│ │ │ └── index.ts
│ │ ├── mint-to
│ │ │ └── index.ts
│ │ ├── start-prover
│ │ │ └── index.ts
│ │ ├── test-validator
│ │ │ └── index.ts
│ │ ├── token-balance
│ │ │ └── index.ts
│ │ └── transfer
│ │ │ └── index.ts
│ ├── index.ts
│ ├── psp-utils
│ │ ├── download.ts
│ │ └── index.ts
│ └── utils
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── initTestEnv.ts
│ │ ├── process.ts
│ │ ├── processPhotonIndexer.ts
│ │ ├── processProverServer.ts
│ │ ├── standardFlags.ts
│ │ └── utils.ts
├── test
│ ├── commands
│ │ ├── approve-and-mint-to
│ │ │ └── index.test.ts
│ │ ├── balance
│ │ │ └── index.test.ts
│ │ ├── compress-sol
│ │ │ └── index.test.ts
│ │ ├── compress-spl
│ │ │ └── index.test.ts
│ │ ├── config
│ │ │ └── index.test.ts
│ │ ├── create-mint
│ │ │ └── index.test.ts
│ │ ├── create-token-pool
│ │ │ └── index.test.ts
│ │ ├── decompress-sol
│ │ │ └── index.test.ts
│ │ ├── decompress-spl
│ │ │ └── index.test.ts
│ │ ├── merge-token-accounts
│ │ │ └── index.test.ts
│ │ ├── mint-to
│ │ │ └── index.test.ts
│ │ ├── test-validator
│ │ │ └── index.test.ts
│ │ ├── token-balance
│ │ │ └── index.test.ts
│ │ └── transfer
│ │ │ └── index.test.ts
│ ├── helpers
│ │ ├── helpers.ts
│ │ └── init.js
│ └── utils
│ │ └── index.test.ts
├── test_bin
│ ├── dev
│ └── run
├── tsconfig.json
└── tsconfig.test.json
├── examples
├── anchor
│ ├── counter
│ │ ├── Cargo.toml
│ │ ├── Xargo.toml
│ │ ├── src
│ │ │ └── lib.rs
│ │ └── tests
│ │ │ └── test.rs
│ ├── memo
│ │ ├── Cargo.toml
│ │ ├── Xargo.toml
│ │ ├── src
│ │ │ └── lib.rs
│ │ └── tests
│ │ │ └── test.rs
│ ├── name-service-without-macros
│ │ ├── Cargo.toml
│ │ ├── Xargo.toml
│ │ ├── src
│ │ │ └── lib.rs
│ │ └── tests
│ │ │ └── test.rs
│ ├── name-service
│ │ ├── Cargo.toml
│ │ ├── Xargo.toml
│ │ ├── src
│ │ │ └── lib.rs
│ │ └── tests
│ │ │ └── test.rs
│ ├── package.json
│ └── token-escrow
│ │ ├── Cargo.toml
│ │ ├── Xargo.toml
│ │ ├── src
│ │ ├── escrow_with_compressed_pda
│ │ │ ├── escrow.rs
│ │ │ ├── mod.rs
│ │ │ ├── sdk.rs
│ │ │ └── withdrawal.rs
│ │ ├── escrow_with_pda
│ │ │ ├── escrow.rs
│ │ │ ├── mod.rs
│ │ │ ├── sdk.rs
│ │ │ └── withdrawal.rs
│ │ └── lib.rs
│ │ └── tests
│ │ ├── test.rs
│ │ └── test_compressed_pda.rs
├── browser
│ └── nextjs
│ │ ├── .eslintrc.json
│ │ ├── .gitignore
│ │ ├── .prettierrc
│ │ ├── README.md
│ │ ├── next.config.mjs
│ │ ├── package.json
│ │ ├── public
│ │ ├── next.svg
│ │ └── vercel.svg
│ │ ├── src
│ │ └── app
│ │ │ ├── favicon.ico
│ │ │ ├── globals.css
│ │ │ ├── layout.tsx
│ │ │ ├── page.module.css
│ │ │ └── page.tsx
│ │ └── tsconfig.json
└── node
│ └── esm
│ ├── .gitignore
│ ├── package.json
│ ├── src
│ └── index.ts
│ └── tsconfig.json
├── forester-spec.yaml
├── forester-utils
├── Cargo.toml
└── src
│ ├── account_zero_copy.rs
│ ├── address_merkle_tree_config.rs
│ ├── error.rs
│ ├── forester_epoch.rs
│ ├── instructions
│ ├── address_batch_update.rs
│ ├── create_account.rs
│ ├── mod.rs
│ ├── state_batch_append.rs
│ └── state_batch_nullify.rs
│ ├── lib.rs
│ ├── rate_limiter.rs
│ ├── registry.rs
│ ├── rpc_pool.rs
│ └── utils.rs
├── forester
├── .dockerignore
├── .env.example
├── .gitignore
├── Cargo.lock
├── Cargo.toml
├── Dockerfile
├── README.md
├── package.json
├── src
│ ├── cli.rs
│ ├── config.rs
│ ├── epoch_manager.rs
│ ├── errors.rs
│ ├── forester_status.rs
│ ├── helius_priority_fee_types.rs
│ ├── indexer_type.rs
│ ├── lib.rs
│ ├── main.rs
│ ├── metrics.rs
│ ├── pagerduty.rs
│ ├── processor
│ │ ├── mod.rs
│ │ ├── tx_cache.rs
│ │ ├── v1
│ │ │ ├── config.rs
│ │ │ ├── helpers.rs
│ │ │ ├── mod.rs
│ │ │ ├── send_transaction.rs
│ │ │ └── tx_builder.rs
│ │ └── v2
│ │ │ ├── address.rs
│ │ │ ├── common.rs
│ │ │ ├── error.rs
│ │ │ ├── mod.rs
│ │ │ └── state.rs
│ ├── pubsub_client.rs
│ ├── queue_helpers.rs
│ ├── rollover
│ │ ├── mod.rs
│ │ ├── operations.rs
│ │ └── state.rs
│ ├── slot_tracker.rs
│ ├── smart_transaction.rs
│ ├── telemetry.rs
│ ├── tree_data_sync.rs
│ ├── tree_finder.rs
│ └── utils.rs
├── test.sh
└── tests
│ ├── address_v2_test.rs
│ ├── batched_address_test.rs
│ ├── batched_state_async_indexer_test.rs
│ ├── batched_state_indexer_test.rs
│ ├── batched_state_test.rs
│ ├── e2e_test.rs
│ ├── priority_fee_test.rs
│ └── test_utils.rs
├── js
├── compressed-token
│ ├── .eslintignore
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── .prettierrc
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.js
│ ├── src
│ │ ├── actions
│ │ │ ├── approve-and-mint-to.ts
│ │ │ ├── compress-spl-token-account.ts
│ │ │ ├── compress.ts
│ │ │ ├── create-mint.ts
│ │ │ ├── create-token-pool.ts
│ │ │ ├── create-token-program-lookup-table.ts
│ │ │ ├── decompress.ts
│ │ │ ├── index.ts
│ │ │ ├── merge-token-accounts.ts
│ │ │ ├── mint-to.ts
│ │ │ └── transfer.ts
│ │ ├── constants.ts
│ │ ├── idl.ts
│ │ ├── index.ts
│ │ ├── instructions
│ │ │ ├── index.ts
│ │ │ └── pack-compressed-token-accounts.ts
│ │ ├── layout.ts
│ │ ├── program.ts
│ │ ├── types.ts
│ │ └── utils
│ │ │ ├── index.ts
│ │ │ └── select-input-accounts.ts
│ ├── tests
│ │ └── e2e
│ │ │ ├── approve-and-mint-to.test.ts
│ │ │ ├── compress-spl-token-account.test.ts
│ │ │ ├── compress.test.ts
│ │ │ ├── create-mint.test.ts
│ │ │ ├── create-token-pool.test.ts
│ │ │ ├── decompress.test.ts
│ │ │ ├── layout.test.ts
│ │ │ ├── merge-token-accounts.test.ts
│ │ │ ├── mint-to.test.ts
│ │ │ ├── rpc-multi-trees.test.ts
│ │ │ ├── rpc-token-interop.test.ts
│ │ │ ├── select-accounts.test.ts
│ │ │ └── transfer.test.ts
│ ├── tsconfig.json
│ ├── tsconfig.test.json
│ ├── types
│ │ └── buffer-layout
│ │ │ └── index.d.ts
│ └── vitest.config.ts
└── stateless.js
│ ├── .eslintignore
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── .prettierrc
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── package.json
│ ├── playwright.config.ts
│ ├── rollup.config.js
│ ├── src
│ ├── actions
│ │ ├── common.ts
│ │ ├── compress.ts
│ │ ├── create-account.ts
│ │ ├── decompress.ts
│ │ ├── index.ts
│ │ └── transfer.ts
│ ├── constants.ts
│ ├── errors.ts
│ ├── idl.ts
│ ├── index.ts
│ ├── instruction
│ │ ├── index.ts
│ │ └── pack-compressed-accounts.ts
│ ├── programs
│ │ ├── index.ts
│ │ ├── layout.ts
│ │ └── system.ts
│ ├── rpc-interface.ts
│ ├── rpc.ts
│ ├── state
│ │ ├── BN254.ts
│ │ ├── compressed-account.ts
│ │ ├── index.ts
│ │ └── types.ts
│ ├── test-helpers
│ │ ├── index.ts
│ │ ├── merkle-tree
│ │ │ ├── index.ts
│ │ │ ├── indexed-array.ts
│ │ │ └── merkle-tree.ts
│ │ ├── test-rpc
│ │ │ ├── get-compressed-accounts.ts
│ │ │ ├── get-compressed-token-accounts.ts
│ │ │ ├── get-parsed-events.ts
│ │ │ ├── index.ts
│ │ │ └── test-rpc.ts
│ │ └── test-utils.ts
│ └── utils
│ │ ├── address.ts
│ │ ├── airdrop.ts
│ │ ├── calculate-compute-unit-price.ts
│ │ ├── conversion.ts
│ │ ├── get-light-state-tree-info.ts
│ │ ├── index.ts
│ │ ├── parse-validity-proof.ts
│ │ ├── pipe.ts
│ │ ├── send-and-confirm.ts
│ │ ├── sleep.ts
│ │ └── validation.ts
│ ├── tests
│ ├── e2e
│ │ ├── browser
│ │ │ ├── rpc.browser.spec.ts
│ │ │ └── test-page.html
│ │ ├── compress.test.ts
│ │ ├── layout.test.ts
│ │ ├── rpc-interop.test.ts
│ │ ├── rpc-multi-trees.test.ts
│ │ ├── safe-conversion.test.ts
│ │ ├── test-rpc.test.ts
│ │ ├── testnet.test.ts
│ │ └── transfer.test.ts
│ └── unit
│ │ ├── instruction
│ │ └── pack-compressed-accounts.test.ts
│ │ ├── merkle-tree
│ │ └── merkle-tree.test.ts
│ │ ├── state
│ │ ├── bn254.test.ts
│ │ └── compressed-account.test.ts
│ │ └── utils
│ │ ├── conversion.test.ts
│ │ └── validation.test.ts
│ ├── tsconfig.json
│ ├── tsconfig.test.json
│ ├── types
│ └── buffer-layout
│ │ └── index.d.ts
│ └── vitest.config.ts
├── light_paper_v0.1.0.pdf
├── nx.json
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── program-libs
├── account-checks
│ ├── Cargo.toml
│ └── src
│ │ ├── checks.rs
│ │ ├── discriminator.rs
│ │ ├── error.rs
│ │ ├── lib.rs
│ │ └── test_account_info.rs
├── aligned-sized
│ ├── Cargo.lock
│ ├── Cargo.toml
│ ├── LICENSE
│ ├── README.md
│ ├── src
│ │ ├── expand.rs
│ │ └── lib.rs
│ └── tests
│ │ └── test.rs
├── batched-merkle-tree
│ ├── Cargo.toml
│ ├── src
│ │ ├── batch.rs
│ │ ├── constants.rs
│ │ ├── errors.rs
│ │ ├── initialize_address_tree.rs
│ │ ├── initialize_state_tree.rs
│ │ ├── lib.rs
│ │ ├── merkle_tree.rs
│ │ ├── merkle_tree_metadata.rs
│ │ ├── queue.rs
│ │ ├── queue_batch_metadata.rs
│ │ ├── rollover_address_tree.rs
│ │ └── rollover_state_tree.rs
│ └── tests
│ │ ├── account_access.rs
│ │ ├── initialize_address_tree.rs
│ │ ├── initialize_state_tree.rs
│ │ ├── merkle_tree.rs
│ │ ├── queue.rs
│ │ ├── rollover_address_tree.rs
│ │ └── rollover_state_tree.rs
├── bloom-filter
│ ├── Cargo.toml
│ └── src
│ │ └── lib.rs
├── compressed-account
│ ├── Cargo.toml
│ └── src
│ │ ├── address.rs
│ │ ├── compressed_account.rs
│ │ ├── constants.rs
│ │ ├── discriminators.rs
│ │ ├── indexer_event
│ │ ├── error.rs
│ │ ├── event.rs
│ │ ├── mod.rs
│ │ └── parse.rs
│ │ ├── instruction_data
│ │ ├── compressed_proof.rs
│ │ ├── cpi_context.rs
│ │ ├── data.rs
│ │ ├── insert_into_queues.rs
│ │ ├── invoke_cpi.rs
│ │ ├── mod.rs
│ │ ├── traits.rs
│ │ ├── with_account_info.rs
│ │ ├── with_readonly.rs
│ │ └── zero_copy.rs
│ │ ├── lib.rs
│ │ ├── nullifier.rs
│ │ ├── pubkey.rs
│ │ └── tx_hash.rs
├── concurrent-merkle-tree
│ ├── Cargo.toml
│ ├── src
│ │ ├── changelog.rs
│ │ ├── copy.rs
│ │ ├── errors.rs
│ │ ├── event.rs
│ │ ├── hash.rs
│ │ ├── lib.rs
│ │ ├── offset
│ │ │ ├── copy.rs
│ │ │ ├── mod.rs
│ │ │ └── zero_copy.rs
│ │ └── zero_copy.rs
│ └── tests
│ │ └── tests.rs
├── hash-set
│ ├── Cargo.toml
│ └── src
│ │ ├── lib.rs
│ │ └── zero_copy.rs
├── hasher
│ ├── Cargo.toml
│ └── src
│ │ ├── bigint.rs
│ │ ├── data_hasher.rs
│ │ ├── errors.rs
│ │ ├── hash_chain.rs
│ │ ├── hash_to_field_size.rs
│ │ ├── keccak.rs
│ │ ├── lib.rs
│ │ ├── poseidon.rs
│ │ ├── sha256.rs
│ │ ├── syscalls
│ │ ├── definitions.rs
│ │ └── mod.rs
│ │ ├── to_byte_array.rs
│ │ ├── zero_bytes
│ │ ├── keccak.rs
│ │ ├── mod.rs
│ │ ├── poseidon.rs
│ │ └── sha256.rs
│ │ └── zero_indexed_leaf
│ │ ├── keccak.rs
│ │ ├── mod.rs
│ │ ├── poseidon.rs
│ │ └── sha256.rs
├── heap
│ ├── Cargo.toml
│ └── src
│ │ ├── bench.rs
│ │ └── lib.rs
├── indexed-array
│ ├── Cargo.toml
│ ├── src
│ │ ├── array.rs
│ │ ├── changelog.rs
│ │ ├── errors.rs
│ │ └── lib.rs
│ └── tests
│ │ └── test.rs
├── indexed-merkle-tree
│ ├── Cargo.toml
│ ├── src
│ │ ├── array.rs
│ │ ├── changelog.rs
│ │ ├── copy.rs
│ │ ├── errors.rs
│ │ ├── lib.rs
│ │ ├── reference.rs
│ │ └── zero_copy.rs
│ └── tests
│ │ └── tests.rs
├── macros
│ ├── Cargo.lock
│ ├── Cargo.toml
│ ├── README.md
│ └── src
│ │ ├── lib.rs
│ │ └── pubkey.rs
├── merkle-tree-metadata
│ ├── Cargo.toml
│ └── src
│ │ ├── access.rs
│ │ ├── errors.rs
│ │ ├── events
│ │ ├── batch.rs
│ │ ├── concurrent.rs
│ │ └── mod.rs
│ │ ├── fee.rs
│ │ ├── lib.rs
│ │ ├── merkle_tree.rs
│ │ ├── queue.rs
│ │ ├── rollover.rs
│ │ └── utils.rs
├── verifier
│ ├── .gitignore
│ ├── Cargo.toml
│ └── src
│ │ ├── lib.rs
│ │ └── verifying_keys
│ │ ├── address_append_40_1.rs
│ │ ├── address_append_40_10.rs
│ │ ├── address_append_40_100.rs
│ │ ├── address_append_40_1000.rs
│ │ ├── address_append_40_250.rs
│ │ ├── address_append_40_500.rs
│ │ ├── append_with_proofs_32_10.rs
│ │ ├── append_with_proofs_32_100.rs
│ │ ├── append_with_proofs_32_1000.rs
│ │ ├── append_with_proofs_32_250.rs
│ │ ├── append_with_proofs_32_500.rs
│ │ ├── combined_26_26_1_1.rs
│ │ ├── combined_26_26_1_2.rs
│ │ ├── combined_26_26_2_1.rs
│ │ ├── combined_26_26_2_2.rs
│ │ ├── combined_26_26_3_1.rs
│ │ ├── combined_26_26_3_2.rs
│ │ ├── combined_26_26_4_1.rs
│ │ ├── combined_26_26_4_2.rs
│ │ ├── combined_32_40_1_1.rs
│ │ ├── combined_32_40_1_2.rs
│ │ ├── combined_32_40_1_3.rs
│ │ ├── combined_32_40_1_4.rs
│ │ ├── combined_32_40_2_1.rs
│ │ ├── combined_32_40_2_2.rs
│ │ ├── combined_32_40_2_3.rs
│ │ ├── combined_32_40_2_4.rs
│ │ ├── combined_32_40_3_1.rs
│ │ ├── combined_32_40_3_2.rs
│ │ ├── combined_32_40_3_3.rs
│ │ ├── combined_32_40_3_4.rs
│ │ ├── combined_32_40_4_1.rs
│ │ ├── combined_32_40_4_2.rs
│ │ ├── combined_32_40_4_3.rs
│ │ ├── combined_32_40_4_4.rs
│ │ ├── inclusion_26_1.rs
│ │ ├── inclusion_26_2.rs
│ │ ├── inclusion_26_3.rs
│ │ ├── inclusion_26_4.rs
│ │ ├── inclusion_26_8.rs
│ │ ├── inclusion_32_1.rs
│ │ ├── inclusion_32_2.rs
│ │ ├── inclusion_32_3.rs
│ │ ├── inclusion_32_4.rs
│ │ ├── inclusion_32_8.rs
│ │ ├── mod.rs
│ │ ├── non_inclusion_26_1.rs
│ │ ├── non_inclusion_26_2.rs
│ │ ├── non_inclusion_40_1.rs
│ │ ├── non_inclusion_40_2.rs
│ │ ├── non_inclusion_40_3.rs
│ │ ├── non_inclusion_40_4.rs
│ │ ├── non_inclusion_40_8.rs
│ │ ├── update_32_1.rs
│ │ ├── update_32_10.rs
│ │ ├── update_32_100.rs
│ │ ├── update_32_1000.rs
│ │ └── update_32_500.rs
└── zero-copy
│ ├── Cargo.toml
│ ├── README.md
│ ├── src
│ ├── borsh.rs
│ ├── cyclic_vec.rs
│ ├── errors.rs
│ ├── lib.rs
│ ├── num_trait.rs
│ ├── slice.rs
│ ├── slice_mut.rs
│ └── vec.rs
│ └── tests
│ ├── cyclic_vec_tests.rs
│ ├── slice_mut_test.rs
│ ├── slice_test.rs
│ └── vec_tests.rs
├── program-tests
├── account-compression-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ └── lib.rs
│ └── tests
│ │ ├── address_merkle_tree_tests.rs
│ │ ├── batched_merkle_tree_test.rs
│ │ ├── group_authority_tests.rs
│ │ └── merkle_tree_tests.rs
├── client-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ └── lib.rs
│ └── tests
│ │ ├── light_client.rs
│ │ └── light_program_test.rs
├── compressed-token-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ └── lib.rs
│ └── tests
│ │ └── test.rs
├── create-address-test-program
│ ├── Cargo.toml
│ ├── Xargo.toml
│ └── src
│ │ ├── create_pda.rs
│ │ └── lib.rs
├── e2e-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ └── lib.rs
│ └── tests
│ │ └── test.rs
├── merkle-tree
│ ├── Cargo.toml
│ ├── src
│ │ ├── indexed.rs
│ │ └── lib.rs
│ └── tests
│ │ ├── indexed.rs
│ │ └── tests.rs
├── package.json
├── registry-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ └── lib.rs
│ └── tests
│ │ └── tests.rs
├── sdk-anchor-test
│ ├── .gitignore
│ ├── .prettierignore
│ ├── Anchor.toml
│ ├── README.md
│ ├── package.json
│ ├── programs
│ │ └── sdk-anchor-test
│ │ │ ├── Cargo.toml
│ │ │ ├── Xargo.toml
│ │ │ ├── src
│ │ │ └── lib.rs
│ │ │ └── tests
│ │ │ └── test.rs
│ └── tsconfig.json
├── sdk-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ ├── create_pda.rs
│ │ ├── lib.rs
│ │ └── update_pda.rs
│ └── tests
│ │ └── test.rs
├── system-cpi-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ ├── create_pda.rs
│ │ ├── invalidate_not_owned_account.rs
│ │ ├── lib.rs
│ │ └── sdk.rs
│ └── tests
│ │ ├── test.rs
│ │ └── test_program_owned_trees.rs
├── system-cpi-v2-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ └── lib.rs
│ └── tests
│ │ ├── event.rs
│ │ └── invoke_cpi_with_read_only.rs
├── system-test
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── src
│ │ └── lib.rs
│ └── tests
│ │ └── test.rs
└── utils
│ ├── Cargo.toml
│ └── src
│ ├── address.rs
│ ├── address_tree_rollover.rs
│ ├── assert_compressed_tx.rs
│ ├── assert_epoch.rs
│ ├── assert_merkle_tree.rs
│ ├── assert_queue.rs
│ ├── assert_rollover.rs
│ ├── assert_token_tx.rs
│ ├── batched_address_tree.rs
│ ├── conversions.rs
│ ├── create_address_test_program_sdk.rs
│ ├── e2e_test_env.rs
│ ├── lib.rs
│ ├── mock_batched_forester.rs
│ ├── registered_program_accounts_v1.rs
│ ├── setup_accounts.rs
│ ├── spl.rs
│ ├── state_tree_rollover.rs
│ ├── system_program.rs
│ ├── test_batch_forester.rs
│ ├── test_forester.rs
│ └── test_keypairs.rs
├── programs
├── account-compression
│ ├── Cargo.toml
│ ├── Xargo.toml
│ └── src
│ │ ├── context.rs
│ │ ├── errors.rs
│ │ ├── instructions
│ │ ├── batch_append.rs
│ │ ├── batch_nullify.rs
│ │ ├── batch_update_address_tree.rs
│ │ ├── deregister_program.rs
│ │ ├── generic.rs
│ │ ├── initialize_address_merkle_tree_and_queue.rs
│ │ ├── initialize_batched_address_merkle_tree.rs
│ │ ├── initialize_batched_state_merkle_tree.rs
│ │ ├── initialize_group_authority.rs
│ │ ├── initialize_state_merkle_tree_and_nullifier_queue.rs
│ │ ├── insert_into_queues.rs
│ │ ├── migrate_state.rs
│ │ ├── mod.rs
│ │ ├── nullify_leaves.rs
│ │ ├── register_program.rs
│ │ ├── resize_registered_program_account.rs
│ │ ├── rollover_address_merkle_tree_and_queue.rs
│ │ ├── rollover_batched_address_merkle_tree.rs
│ │ ├── rollover_batched_state_merkle_tree.rs
│ │ ├── rollover_state_merkle_tree_and_queue.rs
│ │ ├── update_address_merkle_tree.rs
│ │ └── update_group_authority.rs
│ │ ├── lib.rs
│ │ ├── processor
│ │ ├── initialize_address_merkle_tree.rs
│ │ ├── initialize_address_queue.rs
│ │ ├── initialize_concurrent_merkle_tree.rs
│ │ ├── initialize_nullifier_queue.rs
│ │ ├── insert_addresses.rs
│ │ ├── insert_into_queues.rs
│ │ ├── insert_leaves.rs
│ │ ├── insert_nullifiers.rs
│ │ └── mod.rs
│ │ ├── state
│ │ ├── address.rs
│ │ ├── change_log_event.rs
│ │ ├── group_authority.rs
│ │ ├── mod.rs
│ │ ├── public_state_merkle_tree.rs
│ │ └── queue.rs
│ │ └── utils
│ │ ├── check_discriminator.rs
│ │ ├── check_signer_is_registered_or_authority.rs
│ │ ├── constants.rs
│ │ ├── mod.rs
│ │ ├── queue.rs
│ │ └── transfer_lamports.rs
├── compressed-token
│ ├── Cargo.toml
│ ├── README.md
│ ├── Xargo.toml
│ └── src
│ │ ├── batch_compress.rs
│ │ ├── burn.rs
│ │ ├── constants.rs
│ │ ├── delegation.rs
│ │ ├── freeze.rs
│ │ ├── instructions
│ │ ├── burn.rs
│ │ ├── create_token_pool.rs
│ │ ├── freeze.rs
│ │ ├── generic.rs
│ │ ├── mod.rs
│ │ └── transfer.rs
│ │ ├── lib.rs
│ │ ├── process_compress_spl_token_account.rs
│ │ ├── process_mint.rs
│ │ ├── process_transfer.rs
│ │ ├── spl_compression.rs
│ │ └── token_data.rs
├── package.json
├── registry
│ ├── Cargo.toml
│ ├── Xargo.toml
│ └── src
│ │ ├── account_compression_cpi
│ │ ├── batch_append.rs
│ │ ├── batch_nullify.rs
│ │ ├── batch_update_address_tree.rs
│ │ ├── initialize_batched_address_tree.rs
│ │ ├── initialize_batched_state_tree.rs
│ │ ├── initialize_tree_and_queue.rs
│ │ ├── migrate_state.rs
│ │ ├── mod.rs
│ │ ├── nullify.rs
│ │ ├── register_program.rs
│ │ ├── rollover_batched_address_tree.rs
│ │ ├── rollover_batched_state_tree.rs
│ │ ├── rollover_state_tree.rs
│ │ ├── sdk.rs
│ │ └── update_address_tree.rs
│ │ ├── constants.rs
│ │ ├── epoch
│ │ ├── finalize_registration.rs
│ │ ├── mod.rs
│ │ ├── register_epoch.rs
│ │ └── report_work.rs
│ │ ├── errors.rs
│ │ ├── lib.rs
│ │ ├── protocol_config
│ │ ├── initialize.rs
│ │ ├── mod.rs
│ │ ├── state.rs
│ │ └── update.rs
│ │ ├── sdk.rs
│ │ ├── selection
│ │ ├── forester.rs
│ │ └── mod.rs
│ │ └── utils.rs
└── system
│ ├── Cargo.toml
│ ├── README.md
│ ├── Xargo.toml
│ ├── src
│ ├── account_compression_state
│ │ ├── address.rs
│ │ ├── mod.rs
│ │ ├── queue.rs
│ │ └── state.rs
│ ├── accounts
│ │ ├── account_checks.rs
│ │ ├── account_traits.rs
│ │ ├── init_context_account.rs
│ │ ├── mod.rs
│ │ ├── mode.rs
│ │ └── remaining_account_checks.rs
│ ├── constants.rs
│ ├── context.rs
│ ├── errors.rs
│ ├── invoke
│ │ ├── instruction.rs
│ │ ├── mod.rs
│ │ └── verify_signer.rs
│ ├── invoke_cpi
│ │ ├── account.rs
│ │ ├── instruction.rs
│ │ ├── instruction_small.rs
│ │ ├── mod.rs
│ │ ├── process_cpi_context.rs
│ │ ├── processor.rs
│ │ └── verify_signer.rs
│ ├── lib.rs
│ ├── processor
│ │ ├── cpi.rs
│ │ ├── create_address_cpi_data.rs
│ │ ├── create_inputs_cpi_data.rs
│ │ ├── create_outputs_cpi_data.rs
│ │ ├── mod.rs
│ │ ├── process.rs
│ │ ├── read_only_account.rs
│ │ ├── read_only_address.rs
│ │ ├── sol_compression.rs
│ │ ├── sum_check.rs
│ │ └── verify_proof.rs
│ └── utils.rs
│ └── tests
│ ├── invoke_cpi_instruction.rs
│ ├── invoke_cpi_instruction_small.rs
│ └── invoke_instruction.rs
├── prover
├── client
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── scripts
│ │ └── rapidsnark_bench.sh
│ ├── src
│ │ ├── constants.rs
│ │ ├── errors.rs
│ │ ├── helpers.rs
│ │ ├── lib.rs
│ │ ├── proof.rs
│ │ ├── proof_client.rs
│ │ ├── proof_type.rs
│ │ ├── proof_types
│ │ │ ├── batch_address_append
│ │ │ │ ├── json.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── proof_inputs.rs
│ │ │ ├── batch_append
│ │ │ │ ├── json.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── proof_inputs.rs
│ │ │ ├── batch_update
│ │ │ │ ├── json.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── proof_inputs.rs
│ │ │ ├── circuit_type.rs
│ │ │ ├── combined
│ │ │ │ ├── mod.rs
│ │ │ │ ├── v1
│ │ │ │ │ ├── json.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── proof_inputs.rs
│ │ │ │ └── v2
│ │ │ │ │ ├── json.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── proof_inputs.rs
│ │ │ ├── inclusion
│ │ │ │ ├── mod.rs
│ │ │ │ ├── v1
│ │ │ │ │ ├── json.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── proof_inputs.rs
│ │ │ │ └── v2
│ │ │ │ │ ├── json.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── proof_inputs.rs
│ │ │ ├── merkle_tree_info.rs
│ │ │ ├── mod.rs
│ │ │ └── non_inclusion
│ │ │ │ ├── mod.rs
│ │ │ │ ├── v1
│ │ │ │ ├── json.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── proof_inputs.rs
│ │ │ │ └── v2
│ │ │ │ ├── json.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── proof_inputs.rs
│ │ └── prover.rs
│ └── tests
│ │ ├── batch_address_append.rs
│ │ ├── batch_append.rs
│ │ ├── batch_update.rs
│ │ ├── combined.rs
│ │ ├── inclusion.rs
│ │ ├── init_merkle_tree.rs
│ │ ├── non_inclusion.rs
│ │ └── utils
│ │ └── mod.rs
└── server
│ ├── .gitignore
│ ├── Dockerfile
│ ├── Dockerfile.light
│ ├── LICENSE
│ ├── README.md
│ ├── bench.sh
│ ├── docker-compose.yml
│ ├── formal-verification
│ ├── .gitignore
│ ├── FormalVerification
│ │ ├── Circuit.lean
│ │ ├── Lemmas.lean
│ │ ├── Merkle.lean
│ │ ├── Poseidon.lean
│ │ ├── RangeTree.lean
│ │ └── Rangecheck.lean
│ ├── Main.lean
│ ├── lake-manifest.json
│ ├── lakefile.lean
│ └── lean-toolchain
│ ├── go.mod
│ ├── go.sum
│ ├── integration_test.go
│ ├── logging
│ └── logger.go
│ ├── main.go
│ ├── merkle-tree
│ ├── indexed_merkle_tree.go
│ ├── indexed_merkle_tree_test.go
│ ├── merkle_tree.go
│ ├── merkle_tree_test.go
│ └── zero_bytes.go
│ ├── prover
│ ├── batch_address_append_circuit.go
│ ├── batch_address_append_circuit_test.go
│ ├── batch_append_with_proofs_circuit.go
│ ├── batch_append_with_proofs_circuit_test.go
│ ├── batch_circuit_helpers.go
│ ├── batch_update_circuit.go
│ ├── batch_update_circuit_test.go
│ ├── circuit_builder.go
│ ├── circuit_utils.go
│ ├── combined_circuit.go
│ ├── combined_proving_system.go
│ ├── combined_proving_system_legacy.go
│ ├── combined_test.go
│ ├── extractor.go
│ ├── inclusion_circuit.go
│ ├── inclusion_proving_system.go
│ ├── inclusion_proving_system_legacy.go
│ ├── inclusion_test.go
│ ├── is_less_test.go
│ ├── leaf_hash_gadget_test.go
│ ├── marshal.go
│ ├── marshal_batch_address_append.go
│ ├── marshal_batch_append_with_proofs.go
│ ├── marshal_combined.go
│ ├── marshal_combined_legacy.go
│ ├── marshal_inclusion.go
│ ├── marshal_inclusion_legacy.go
│ ├── marshal_non_inclusion.go
│ ├── marshal_non_inclusion_legacy.go
│ ├── marshal_update.go
│ ├── non_inclusion_circuit.go
│ ├── non_inclusion_proving_system.go
│ ├── non_inclusion_proving_system_legacy.go
│ ├── non_inclusion_test.go
│ ├── poseidon
│ │ ├── constants.go
│ │ ├── poseidon.go
│ │ └── poseidon_test.go
│ ├── proving_keys_utils.go
│ ├── string_utils.go
│ ├── test_data_generator_test.go
│ └── test_data_helpers.go
│ ├── redis_queue_test.go
│ ├── scripts
│ ├── download_keys.sh
│ ├── generate_checksums.py
│ ├── generate_keys.sh
│ ├── rate_detection.sh
│ ├── server.sh
│ ├── stress_load.sh
│ └── targets.txt
│ ├── server
│ ├── job.go
│ ├── queue.go
│ ├── queue_job.go
│ └── server.go
│ └── test-data
│ ├── combined.csv
│ ├── inclusion.csv
│ └── non_inclusion.csv
├── rust-toolchain.toml
├── rustfmt.toml
├── scripts
├── build-verifiable.sh
├── build.sh
├── bump-versions-and-publish-npm.sh
├── clean.sh
├── coverage.sh
├── create-state-trees.sh
├── deploy-devnet.sh
├── deploy.sh
├── devenv.sh
├── export-photon-test-transactions.sh
├── format.sh
├── getAccountState.sh
├── install.sh
├── lint.sh
├── push-compressed-token-idl.sh
├── push-stateless-js-idls.sh
├── release-all-rust-crates.sh
├── test.sh
└── tsc-create-r1cs.sh
├── sdk-libs
├── client
│ ├── Cargo.toml
│ └── src
│ │ ├── constants.rs
│ │ ├── fee.rs
│ │ ├── indexer
│ │ ├── base58.rs
│ │ ├── config.rs
│ │ ├── error.rs
│ │ ├── indexer_trait.rs
│ │ ├── mod.rs
│ │ ├── options.rs
│ │ ├── photon_indexer.rs
│ │ ├── response.rs
│ │ ├── tree_info.rs
│ │ └── types.rs
│ │ ├── lib.rs
│ │ ├── local_test_validator.rs
│ │ ├── rpc
│ │ ├── client.rs
│ │ ├── errors.rs
│ │ ├── get_light_state_tree_infos.rs
│ │ ├── indexer.rs
│ │ ├── merkle_tree.rs
│ │ ├── mod.rs
│ │ ├── rpc_trait.rs
│ │ └── state.rs
│ │ └── utils.rs
├── macros
│ ├── Cargo.lock
│ ├── Cargo.toml
│ ├── README.md
│ ├── fuzz
│ │ ├── .gitignore
│ │ ├── Cargo.lock
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── fuzz_targets
│ │ │ ├── macro_input.rs
│ │ │ └── struct_generation.rs
│ ├── src
│ │ ├── account.rs
│ │ ├── accounts.rs
│ │ ├── discriminator.rs
│ │ ├── hasher
│ │ │ ├── data_hasher.rs
│ │ │ ├── field_processor.rs
│ │ │ ├── input_validator.rs
│ │ │ ├── light_hasher.rs
│ │ │ ├── mod.rs
│ │ │ └── to_byte_array.rs
│ │ ├── lib.rs
│ │ ├── program.rs
│ │ └── traits.rs
│ └── tests
│ │ └── hasher.rs
├── photon-api
│ ├── .gitignore
│ ├── .openapi-generator-ignore
│ ├── .openapi-generator
│ │ ├── FILES
│ │ └── VERSION
│ ├── .travis.yml
│ ├── Cargo.toml
│ ├── README.md
│ ├── docs
│ │ ├── Account.md
│ │ ├── AccountContext.md
│ │ ├── AccountData.md
│ │ ├── AccountList.md
│ │ ├── AccountListV2.md
│ │ ├── AccountState.md
│ │ ├── AccountV2.md
│ │ ├── AccountWithContext.md
│ │ ├── AccountWithOptionalTokenData.md
│ │ ├── AccountWithOptionalTokenDataV2.md
│ │ ├── AddressSeq.md
│ │ ├── AddressWithTree.md
│ │ ├── ClosedAccountV2.md
│ │ ├── ClosedAccountWithOptionalTokenDataV2.md
│ │ ├── CompressedProof.md
│ │ ├── CompressedProofWithContext.md
│ │ ├── CompressedProofWithContextV2.md
│ │ ├── CompressionInfoV2.md
│ │ ├── Context.md
│ │ ├── DataSlice.md
│ │ ├── DefaultApi.md
│ │ ├── FilterSelector.md
│ │ ├── GetBatchAddressUpdateInfoPost200Response.md
│ │ ├── GetBatchAddressUpdateInfoPost200ResponseError.md
│ │ ├── GetBatchAddressUpdateInfoPost200ResponseResult.md
│ │ ├── GetBatchAddressUpdateInfoPost429Response.md
│ │ ├── GetBatchAddressUpdateInfoPostRequest.md
│ │ ├── GetBatchAddressUpdateInfoPostRequestParams.md
│ │ ├── GetCompressedAccountBalancePost200Response.md
│ │ ├── GetCompressedAccountBalancePost200ResponseResult.md
│ │ ├── GetCompressedAccountBalancePostRequest.md
│ │ ├── GetCompressedAccountPost200Response.md
│ │ ├── GetCompressedAccountPost200ResponseResult.md
│ │ ├── GetCompressedAccountPostRequest.md
│ │ ├── GetCompressedAccountPostRequestParams.md
│ │ ├── GetCompressedAccountProofPost200Response.md
│ │ ├── GetCompressedAccountProofPost200ResponseResult.md
│ │ ├── GetCompressedAccountProofPostRequest.md
│ │ ├── GetCompressedAccountProofPostRequestParams.md
│ │ ├── GetCompressedAccountProofResponseValue.md
│ │ ├── GetCompressedAccountProofResponseValueV2.md
│ │ ├── GetCompressedAccountProofV2Post200Response.md
│ │ ├── GetCompressedAccountProofV2Post200ResponseResult.md
│ │ ├── GetCompressedAccountProofV2PostRequest.md
│ │ ├── GetCompressedAccountV2Post200Response.md
│ │ ├── GetCompressedAccountV2Post200ResponseResult.md
│ │ ├── GetCompressedAccountV2PostRequest.md
│ │ ├── GetCompressedAccountsByOwnerPost200Response.md
│ │ ├── GetCompressedAccountsByOwnerPost200ResponseResult.md
│ │ ├── GetCompressedAccountsByOwnerPostRequest.md
│ │ ├── GetCompressedAccountsByOwnerPostRequestParams.md
│ │ ├── GetCompressedAccountsByOwnerV2Post200Response.md
│ │ ├── GetCompressedAccountsByOwnerV2Post200ResponseResult.md
│ │ ├── GetCompressedAccountsByOwnerV2PostRequest.md
│ │ ├── GetCompressedBalanceByOwnerPostRequest.md
│ │ ├── GetCompressedBalanceByOwnerPostRequestParams.md
│ │ ├── GetCompressedMintTokenHoldersPost200Response.md
│ │ ├── GetCompressedMintTokenHoldersPost200ResponseResult.md
│ │ ├── GetCompressedMintTokenHoldersPostRequest.md
│ │ ├── GetCompressedMintTokenHoldersPostRequestParams.md
│ │ ├── GetCompressedTokenAccountBalancePost200Response.md
│ │ ├── GetCompressedTokenAccountBalancePost200ResponseResult.md
│ │ ├── GetCompressedTokenAccountBalancePostRequest.md
│ │ ├── GetCompressedTokenAccountsByDelegatePost200Response.md
│ │ ├── GetCompressedTokenAccountsByDelegatePost200ResponseResult.md
│ │ ├── GetCompressedTokenAccountsByDelegatePostRequest.md
│ │ ├── GetCompressedTokenAccountsByDelegatePostRequestParams.md
│ │ ├── GetCompressedTokenAccountsByDelegateV2Post200Response.md
│ │ ├── GetCompressedTokenAccountsByDelegateV2Post200ResponseResult.md
│ │ ├── GetCompressedTokenAccountsByDelegateV2PostRequest.md
│ │ ├── GetCompressedTokenAccountsByOwnerPostRequest.md
│ │ ├── GetCompressedTokenAccountsByOwnerPostRequestParams.md
│ │ ├── GetCompressedTokenAccountsByOwnerV2PostRequest.md
│ │ ├── GetCompressedTokenBalancesByOwnerPost200Response.md
│ │ ├── GetCompressedTokenBalancesByOwnerPost200ResponseResult.md
│ │ ├── GetCompressedTokenBalancesByOwnerPostRequest.md
│ │ ├── GetCompressedTokenBalancesByOwnerV2Post200Response.md
│ │ ├── GetCompressedTokenBalancesByOwnerV2Post200ResponseResult.md
│ │ ├── GetCompressedTokenBalancesByOwnerV2PostRequest.md
│ │ ├── GetCompressionSignaturesForAccountPost200Response.md
│ │ ├── GetCompressionSignaturesForAccountPost200ResponseResult.md
│ │ ├── GetCompressionSignaturesForAccountPostRequest.md
│ │ ├── GetCompressionSignaturesForAddressPost200Response.md
│ │ ├── GetCompressionSignaturesForAddressPost200ResponseResult.md
│ │ ├── GetCompressionSignaturesForAddressPostRequest.md
│ │ ├── GetCompressionSignaturesForAddressPostRequestParams.md
│ │ ├── GetCompressionSignaturesForOwnerPostRequest.md
│ │ ├── GetCompressionSignaturesForOwnerPostRequestParams.md
│ │ ├── GetCompressionSignaturesForTokenOwnerPostRequest.md
│ │ ├── GetIndexerHealthPost200Response.md
│ │ ├── GetIndexerHealthPostRequest.md
│ │ ├── GetIndexerSlotPost200Response.md
│ │ ├── GetIndexerSlotPostRequest.md
│ │ ├── GetLatestCompressionSignaturesPostRequest.md
│ │ ├── GetLatestCompressionSignaturesPostRequestParams.md
│ │ ├── GetLatestNonVotingSignaturesPost200Response.md
│ │ ├── GetLatestNonVotingSignaturesPost200ResponseResult.md
│ │ ├── GetLatestNonVotingSignaturesPostRequest.md
│ │ ├── GetMultipleCompressedAccountProofsPost200Response.md
│ │ ├── GetMultipleCompressedAccountProofsPost200ResponseResult.md
│ │ ├── GetMultipleCompressedAccountProofsPostRequest.md
│ │ ├── GetMultipleCompressedAccountProofsV2Post200Response.md
│ │ ├── GetMultipleCompressedAccountProofsV2Post200ResponseResult.md
│ │ ├── GetMultipleCompressedAccountProofsV2PostRequest.md
│ │ ├── GetMultipleCompressedAccountsPost200Response.md
│ │ ├── GetMultipleCompressedAccountsPost200ResponseResult.md
│ │ ├── GetMultipleCompressedAccountsPostRequest.md
│ │ ├── GetMultipleCompressedAccountsPostRequestParams.md
│ │ ├── GetMultipleCompressedAccountsV2Post200Response.md
│ │ ├── GetMultipleCompressedAccountsV2Post200ResponseResult.md
│ │ ├── GetMultipleCompressedAccountsV2PostRequest.md
│ │ ├── GetMultipleCompressedAccountsV2PostRequestParams.md
│ │ ├── GetMultipleNewAddressProofsPost200Response.md
│ │ ├── GetMultipleNewAddressProofsPost200ResponseResult.md
│ │ ├── GetMultipleNewAddressProofsPostRequest.md
│ │ ├── GetMultipleNewAddressProofsV2PostRequest.md
│ │ ├── GetQueueElementsPost200Response.md
│ │ ├── GetQueueElementsPost200ResponseResult.md
│ │ ├── GetQueueElementsPostRequest.md
│ │ ├── GetQueueElementsPostRequestParams.md
│ │ ├── GetQueueElementsResponseValue.md
│ │ ├── GetTransactionWithCompressionInfoPost200Response.md
│ │ ├── GetTransactionWithCompressionInfoPost200ResponseResult.md
│ │ ├── GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo.md
│ │ ├── GetTransactionWithCompressionInfoPostRequest.md
│ │ ├── GetTransactionWithCompressionInfoPostRequestParams.md
│ │ ├── GetTransactionWithCompressionInfoV2Post200Response.md
│ │ ├── GetTransactionWithCompressionInfoV2Post200ResponseResult.md
│ │ ├── GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo.md
│ │ ├── GetTransactionWithCompressionInfoV2PostRequest.md
│ │ ├── GetValidityProofPost200Response.md
│ │ ├── GetValidityProofPost200ResponseResult.md
│ │ ├── GetValidityProofPostRequest.md
│ │ ├── GetValidityProofPostRequestParams.md
│ │ ├── GetValidityProofV2Post200Response.md
│ │ ├── GetValidityProofV2Post200ResponseResult.md
│ │ ├── GetValidityProofV2PostRequest.md
│ │ ├── Memcmp.md
│ │ ├── MerkleContextV2.md
│ │ ├── MerkleContextWithNewAddressProof.md
│ │ ├── OwnerBalance.md
│ │ ├── OwnerBalanceList.md
│ │ ├── OwnerBalancesResponse.md
│ │ ├── PaginatedAccountList.md
│ │ ├── PaginatedAccountListV2.md
│ │ ├── PaginatedSignatureInfoList.md
│ │ ├── RootIndex.md
│ │ ├── SignatureInfo.md
│ │ ├── SignatureInfoList.md
│ │ ├── SignatureInfoListWithError.md
│ │ ├── SignatureInfoWithError.md
│ │ ├── TokenAccount.md
│ │ ├── TokenAccountBalance.md
│ │ ├── TokenAccountList.md
│ │ ├── TokenAccountListV2.md
│ │ ├── TokenAccountV2.md
│ │ ├── TokenBalance.md
│ │ ├── TokenBalanceList.md
│ │ ├── TokenBalanceListV2.md
│ │ ├── TokenData.md
│ │ └── TreeContextInfo.md
│ ├── git_push.sh
│ └── src
│ │ ├── apis
│ │ ├── configuration.rs
│ │ ├── default_api.rs
│ │ └── mod.rs
│ │ ├── lib.rs
│ │ └── models
│ │ ├── _get_batch_address_update_info_post_200_response.rs
│ │ ├── _get_batch_address_update_info_post_200_response_error.rs
│ │ ├── _get_batch_address_update_info_post_200_response_result.rs
│ │ ├── _get_batch_address_update_info_post_429_response.rs
│ │ ├── _get_batch_address_update_info_post_request.rs
│ │ ├── _get_batch_address_update_info_post_request_params.rs
│ │ ├── _get_compressed_account_balance_post_200_response.rs
│ │ ├── _get_compressed_account_balance_post_200_response_result.rs
│ │ ├── _get_compressed_account_balance_post_request.rs
│ │ ├── _get_compressed_account_post_200_response.rs
│ │ ├── _get_compressed_account_post_200_response_result.rs
│ │ ├── _get_compressed_account_post_request.rs
│ │ ├── _get_compressed_account_post_request_params.rs
│ │ ├── _get_compressed_account_proof_post_200_response.rs
│ │ ├── _get_compressed_account_proof_post_200_response_result.rs
│ │ ├── _get_compressed_account_proof_post_request.rs
│ │ ├── _get_compressed_account_proof_post_request_params.rs
│ │ ├── _get_compressed_account_proof_v2_post_200_response.rs
│ │ ├── _get_compressed_account_proof_v2_post_200_response_result.rs
│ │ ├── _get_compressed_account_proof_v2_post_request.rs
│ │ ├── _get_compressed_account_v2_post_200_response.rs
│ │ ├── _get_compressed_account_v2_post_200_response_result.rs
│ │ ├── _get_compressed_account_v2_post_request.rs
│ │ ├── _get_compressed_accounts_by_owner_post_200_response.rs
│ │ ├── _get_compressed_accounts_by_owner_post_200_response_result.rs
│ │ ├── _get_compressed_accounts_by_owner_post_request.rs
│ │ ├── _get_compressed_accounts_by_owner_post_request_params.rs
│ │ ├── _get_compressed_accounts_by_owner_v2_post_200_response.rs
│ │ ├── _get_compressed_accounts_by_owner_v2_post_200_response_result.rs
│ │ ├── _get_compressed_accounts_by_owner_v2_post_request.rs
│ │ ├── _get_compressed_balance_by_owner_post_request.rs
│ │ ├── _get_compressed_balance_by_owner_post_request_params.rs
│ │ ├── _get_compressed_mint_token_holders_post_200_response.rs
│ │ ├── _get_compressed_mint_token_holders_post_200_response_result.rs
│ │ ├── _get_compressed_mint_token_holders_post_request.rs
│ │ ├── _get_compressed_mint_token_holders_post_request_params.rs
│ │ ├── _get_compressed_token_account_balance_post_200_response.rs
│ │ ├── _get_compressed_token_account_balance_post_200_response_result.rs
│ │ ├── _get_compressed_token_account_balance_post_request.rs
│ │ ├── _get_compressed_token_accounts_by_delegate_post_200_response.rs
│ │ ├── _get_compressed_token_accounts_by_delegate_post_200_response_result.rs
│ │ ├── _get_compressed_token_accounts_by_delegate_post_request.rs
│ │ ├── _get_compressed_token_accounts_by_delegate_post_request_params.rs
│ │ ├── _get_compressed_token_accounts_by_delegate_v2_post_200_response.rs
│ │ ├── _get_compressed_token_accounts_by_delegate_v2_post_200_response_result.rs
│ │ ├── _get_compressed_token_accounts_by_delegate_v2_post_request.rs
│ │ ├── _get_compressed_token_accounts_by_owner_post_request.rs
│ │ ├── _get_compressed_token_accounts_by_owner_post_request_params.rs
│ │ ├── _get_compressed_token_accounts_by_owner_v2_post_request.rs
│ │ ├── _get_compressed_token_balances_by_owner_post_200_response.rs
│ │ ├── _get_compressed_token_balances_by_owner_post_200_response_result.rs
│ │ ├── _get_compressed_token_balances_by_owner_post_request.rs
│ │ ├── _get_compressed_token_balances_by_owner_v2_post_200_response.rs
│ │ ├── _get_compressed_token_balances_by_owner_v2_post_200_response_result.rs
│ │ ├── _get_compressed_token_balances_by_owner_v2_post_request.rs
│ │ ├── _get_compression_signatures_for_account_post_200_response.rs
│ │ ├── _get_compression_signatures_for_account_post_200_response_result.rs
│ │ ├── _get_compression_signatures_for_account_post_request.rs
│ │ ├── _get_compression_signatures_for_address_post_200_response.rs
│ │ ├── _get_compression_signatures_for_address_post_200_response_result.rs
│ │ ├── _get_compression_signatures_for_address_post_request.rs
│ │ ├── _get_compression_signatures_for_address_post_request_params.rs
│ │ ├── _get_compression_signatures_for_owner_post_request.rs
│ │ ├── _get_compression_signatures_for_owner_post_request_params.rs
│ │ ├── _get_compression_signatures_for_token_owner_post_request.rs
│ │ ├── _get_indexer_health_post_200_response.rs
│ │ ├── _get_indexer_health_post_request.rs
│ │ ├── _get_indexer_slot_post_200_response.rs
│ │ ├── _get_indexer_slot_post_request.rs
│ │ ├── _get_latest_compression_signatures_post_request.rs
│ │ ├── _get_latest_compression_signatures_post_request_params.rs
│ │ ├── _get_latest_non_voting_signatures_post_200_response.rs
│ │ ├── _get_latest_non_voting_signatures_post_200_response_result.rs
│ │ ├── _get_latest_non_voting_signatures_post_request.rs
│ │ ├── _get_multiple_compressed_account_proofs_post_200_response.rs
│ │ ├── _get_multiple_compressed_account_proofs_post_200_response_result.rs
│ │ ├── _get_multiple_compressed_account_proofs_post_request.rs
│ │ ├── _get_multiple_compressed_account_proofs_v2_post_200_response.rs
│ │ ├── _get_multiple_compressed_account_proofs_v2_post_200_response_result.rs
│ │ ├── _get_multiple_compressed_account_proofs_v2_post_request.rs
│ │ ├── _get_multiple_compressed_accounts_post_200_response.rs
│ │ ├── _get_multiple_compressed_accounts_post_200_response_result.rs
│ │ ├── _get_multiple_compressed_accounts_post_request.rs
│ │ ├── _get_multiple_compressed_accounts_post_request_params.rs
│ │ ├── _get_multiple_compressed_accounts_v2_post_200_response.rs
│ │ ├── _get_multiple_compressed_accounts_v2_post_200_response_result.rs
│ │ ├── _get_multiple_compressed_accounts_v2_post_request.rs
│ │ ├── _get_multiple_compressed_accounts_v2_post_request_params.rs
│ │ ├── _get_multiple_new_address_proofs_post_200_response.rs
│ │ ├── _get_multiple_new_address_proofs_post_200_response_result.rs
│ │ ├── _get_multiple_new_address_proofs_post_request.rs
│ │ ├── _get_multiple_new_address_proofs_v2_post_request.rs
│ │ ├── _get_queue_elements_post_200_response.rs
│ │ ├── _get_queue_elements_post_200_response_result.rs
│ │ ├── _get_queue_elements_post_request.rs
│ │ ├── _get_queue_elements_post_request_params.rs
│ │ ├── _get_transaction_with_compression_info_post_200_response.rs
│ │ ├── _get_transaction_with_compression_info_post_200_response_result.rs
│ │ ├── _get_transaction_with_compression_info_post_200_response_result_compression_info.rs
│ │ ├── _get_transaction_with_compression_info_post_request.rs
│ │ ├── _get_transaction_with_compression_info_post_request_params.rs
│ │ ├── _get_transaction_with_compression_info_v2_post_200_response.rs
│ │ ├── _get_transaction_with_compression_info_v2_post_200_response_result.rs
│ │ ├── _get_transaction_with_compression_info_v2_post_200_response_result_compression_info.rs
│ │ ├── _get_transaction_with_compression_info_v2_post_request.rs
│ │ ├── _get_validity_proof_post_200_response.rs
│ │ ├── _get_validity_proof_post_200_response_result.rs
│ │ ├── _get_validity_proof_post_request.rs
│ │ ├── _get_validity_proof_post_request_params.rs
│ │ ├── _get_validity_proof_v2_post_200_response.rs
│ │ ├── _get_validity_proof_v2_post_200_response_result.rs
│ │ ├── _get_validity_proof_v2_post_request.rs
│ │ ├── account.rs
│ │ ├── account_context.rs
│ │ ├── account_data.rs
│ │ ├── account_list.rs
│ │ ├── account_list_v2.rs
│ │ ├── account_state.rs
│ │ ├── account_v2.rs
│ │ ├── account_with_context.rs
│ │ ├── account_with_optional_token_data.rs
│ │ ├── account_with_optional_token_data_v2.rs
│ │ ├── address_queue_index.rs
│ │ ├── address_with_tree.rs
│ │ ├── closed_account_v2.rs
│ │ ├── closed_account_with_optional_token_data_v2.rs
│ │ ├── compressed_proof.rs
│ │ ├── compressed_proof_with_context.rs
│ │ ├── compressed_proof_with_context_v2.rs
│ │ ├── compression_info_v2.rs
│ │ ├── context.rs
│ │ ├── data_slice.rs
│ │ ├── filter_selector.rs
│ │ ├── get_compressed_account_proof_response_value.rs
│ │ ├── get_compressed_account_proof_response_value_v2.rs
│ │ ├── get_queue_elements_response_value.rs
│ │ ├── memcmp.rs
│ │ ├── merkle_context_v2.rs
│ │ ├── merkle_context_with_new_address_proof.rs
│ │ ├── mod.rs
│ │ ├── owner_balance.rs
│ │ ├── owner_balance_list.rs
│ │ ├── owner_balances_response.rs
│ │ ├── paginated_account_list.rs
│ │ ├── paginated_account_list_v2.rs
│ │ ├── paginated_signature_info_list.rs
│ │ ├── root_index.rs
│ │ ├── signature_info.rs
│ │ ├── signature_info_list.rs
│ │ ├── signature_info_list_with_error.rs
│ │ ├── signature_info_with_error.rs
│ │ ├── token_account.rs
│ │ ├── token_account_balance.rs
│ │ ├── token_account_list.rs
│ │ ├── token_account_list_v2.rs
│ │ ├── token_account_v2.rs
│ │ ├── token_balance.rs
│ │ ├── token_balance_list.rs
│ │ ├── token_balance_list_v2.rs
│ │ ├── token_data.rs
│ │ └── tree_context_info.rs
├── program-test
│ ├── Cargo.toml
│ └── src
│ │ ├── accounts
│ │ ├── address_tree.rs
│ │ ├── address_tree_v2.rs
│ │ ├── initialize.rs
│ │ ├── mod.rs
│ │ ├── register_program.rs
│ │ ├── registered_program_accounts.rs
│ │ ├── state_tree.rs
│ │ ├── state_tree_v2.rs
│ │ ├── test_accounts.rs
│ │ └── test_keypairs.rs
│ │ ├── indexer
│ │ ├── address_tree.rs
│ │ ├── extensions.rs
│ │ ├── mod.rs
│ │ ├── state_tree.rs
│ │ └── test_indexer.rs
│ │ ├── lib.rs
│ │ ├── program_test
│ │ ├── config.rs
│ │ ├── extensions.rs
│ │ ├── indexer.rs
│ │ ├── light_program_test.rs
│ │ ├── mod.rs
│ │ ├── rpc.rs
│ │ └── test_rpc.rs
│ │ └── utils
│ │ ├── assert.rs
│ │ ├── find_light_bin.rs
│ │ ├── mod.rs
│ │ └── setup_light_programs.rs
└── sdk
│ ├── Cargo.toml
│ ├── Xargo.toml
│ ├── readme.md
│ └── src
│ ├── account.rs
│ ├── account_info.rs
│ ├── address.rs
│ ├── constants.rs
│ ├── cpi
│ ├── accounts.rs
│ ├── accounts_small_ix.rs
│ ├── invoke.rs
│ └── mod.rs
│ ├── error.rs
│ ├── instruction
│ ├── account_meta.rs
│ ├── accounts.rs
│ ├── mod.rs
│ ├── pack_accounts.rs
│ └── tree_info.rs
│ ├── legacy.rs
│ ├── lib.rs
│ ├── token.rs
│ ├── transfer.rs
│ └── utils.rs
├── sparse-merkle-tree
├── Cargo.toml
├── src
│ ├── changelog.rs
│ ├── error.rs
│ ├── indexed_changelog.rs
│ ├── lib.rs
│ └── merkle_tree.rs
└── tests
│ ├── indexed_changelog.rs
│ └── test.rs
├── third-party
└── solana-program-library
│ └── spl_noop.so
├── tsconfig
├── README.md
├── base.json
└── package.json
└── xtask
├── Cargo.toml
└── src
├── bench.rs
├── create_batch_state_tree.rs
├── create_state_tree.rs
├── create_update_protocol_config_ix.rs
├── create_vkeyrs_from_gnark_key.rs
├── export_photon_test_data.rs
├── fee.rs
├── hash_set.rs
├── main.rs
├── new_deployment.rs
├── type_sizes.rs
├── utils.rs
├── zero_bytes.rs
└── zero_indexed_leaf.rs
/.dockerignore:
--------------------------------------------------------------------------------
1 | **/*.log
2 | .git/
3 | **/test-ledger/
4 | **/logs/
5 | target
6 | **/target/
7 | Dockerfile
8 | .dockerignore
9 | .git
--------------------------------------------------------------------------------
/.github/actionlint.yaml:
--------------------------------------------------------------------------------
1 | self-hosted-runner:
2 | # Labels of self-hosted runner in array of strings.
3 | labels:
4 | - buildjet-2vcpu-ubuntu-2204
5 | - buildjet-4vcpu-ubuntu-2204
6 | - buildjet-8vcpu-ubuntu-2204
7 | - buildjet-16vcpu-ubuntu-2204
8 | - warp-ubuntu-latest-x64-4x
9 | # Configuration variables in array of strings defined in your repository or
10 | # organization. `null` means disabling configuration variables check.
11 | # Empty array means no configuration variable is allowed.
12 | config-variables: null
13 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Please see the documentation for all configuration options:
2 | # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3 |
4 | version: 2
5 | updates:
6 | - package-ecosystem: "cargo"
7 | directory: "/"
8 | schedule:
9 | interval: "weekly"
10 | - package-ecosystem: "github-actions"
11 | directory: "/"
12 | schedule:
13 | interval: "weekly"
14 | # pnpm is handled by the "npm" package ecosystem
15 | - package-ecosystem: "npm"
16 | directory: "/"
17 | schedule:
18 | interval: "weekly"
19 |
--------------------------------------------------------------------------------
/.github/workflows/ci-lint.yml:
--------------------------------------------------------------------------------
1 | name: Lint GitHub Actions workflows
2 | on: [push, pull_request]
3 |
4 | jobs:
5 | actionlint:
6 | runs-on: ubuntu-latest
7 | steps:
8 | - uses: actions/checkout@v4
9 | - name: Download actionlint
10 | id: get_actionlint
11 | run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
12 | shell: bash
13 | - name: Check workflow files
14 | run: ${{ steps.get_actionlint.outputs.executable }} -color
15 | shell: bash
--------------------------------------------------------------------------------
/.github/workflows/delete-buildjet-cache.yml:
--------------------------------------------------------------------------------
1 | name: Manually Delete BuildJet Cache
2 | on:
3 | workflow_dispatch:
4 | inputs:
5 | cache_key:
6 | description: 'BuildJet Cache Key to Delete'
7 | required: true
8 | type: string
9 | jobs:
10 | manually-delete-buildjet-cache:
11 | runs-on: buildjet-2vcpu-ubuntu-2204
12 | steps:
13 | - name: Checkout
14 | uses: actions/checkout@v4
15 | - uses: buildjet/cache-delete@v1
16 | with:
17 | cache_key: ${{ inputs.cache_key }}
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | ./scripts/format.sh
5 |
--------------------------------------------------------------------------------
/.npmrc.example:
--------------------------------------------------------------------------------
1 | //registry.npmjs.org/:_authToken=YOUR_AUTH_TOKEN
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | pnpm-lock.yaml
2 |
3 | /.nx/cache
4 | /.nx/workspace-data
--------------------------------------------------------------------------------
/Anchor.toml:
--------------------------------------------------------------------------------
1 | [features]
2 | seeds = false
3 |
4 | [test.validator]
5 | url = "http://127.0.0.1:8899"
6 |
7 | [test]
8 | startup_wait = 10_000
9 |
10 | [registry]
11 | url = "https://anchor.projectserum.com"
12 |
13 | [provider]
14 | cluster = "localnet"
15 | wallet = "~/.config/solana/id.json"
16 | # --resolveJsonModule ./tsconfig.json
17 |
18 | # [workspace]
19 | # types = "./js/stateless.js/src/idls"
20 | # idls = "./js/stateless.js/src/idls"
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | assets/ @SwenSchaeferjohann
2 | program-libs/ @ananas-block @sergeytimoshin
3 | cli/ @ananas-block @sergeytimoshin
4 | programs/ @ananas-block
5 | prover.js/ @sergeytimoshin
6 | examples/ @ananas-block @SwenSchaeferjohann
7 | rpc/ @sergeytimoshin @SwenSchaeferjohann
8 | scripts/ @ananas-block @sergeytimoshin
9 | third-party/ @ananas-block
10 | tsconfig/ @SwenSchaeferjohann
11 | web/ @SwenSchaeferjohann
12 | xtask/ @ananans-block
13 |
--------------------------------------------------------------------------------
/anchor-programs/system/README.md:
--------------------------------------------------------------------------------
1 | # System program
2 |
3 | This is an anchor wrapper of the light system program. This program does not contain any functionality but its bindings are consistent with the deployed system program.
4 |
--------------------------------------------------------------------------------
/anchor-programs/system/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/anchor-programs/system/src/constants.rs:
--------------------------------------------------------------------------------
1 | pub const CPI_AUTHORITY_PDA_BUMP: u8 = 255;
2 |
3 | use anchor_lang::prelude::*;
4 |
5 | #[constant]
6 | pub const SOL_POOL_PDA_SEED: &[u8] = b"sol_pool_pda";
7 |
--------------------------------------------------------------------------------
/anchor-programs/system/src/instructions/initialize_cpi_context.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::prelude::*;
2 |
3 | use crate::cpi_context_account::CpiContextAccount;
4 |
5 | pub const CPI_SEED: &[u8] = b"cpi_signature_pda";
6 |
7 | #[derive(Accounts)]
8 | pub struct InitializeCpiContextAccount<'info> {
9 | #[account(mut)]
10 | pub fee_payer: Signer<'info>,
11 | #[account(zero)]
12 | pub cpi_context_account: Account<'info, CpiContextAccount>,
13 | /// CHECK: manually in instruction
14 | pub associated_merkle_tree: AccountInfo<'info>,
15 | }
16 |
--------------------------------------------------------------------------------
/anchor-programs/system/src/instructions/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod invoke;
2 | pub use invoke::*;
3 | pub mod invoke_cpi;
4 | pub use invoke_cpi::*;
5 |
6 | pub mod initialize_cpi_context;
7 | pub use initialize_cpi_context::*;
8 |
--------------------------------------------------------------------------------
/anchor-programs/system/src/utils.rs:
--------------------------------------------------------------------------------
1 | use account_compression::utils::constants::CPI_AUTHORITY_PDA_SEED;
2 | use anchor_lang::solana_program::pubkey::Pubkey;
3 |
4 | use crate::constants::SOL_POOL_PDA_SEED;
5 |
6 | pub fn get_registered_program_pda(program_id: &Pubkey) -> Pubkey {
7 | Pubkey::find_program_address(
8 | &[program_id.to_bytes().as_slice()],
9 | &account_compression::ID,
10 | )
11 | .0
12 | }
13 |
14 | pub fn get_cpi_authority_pda(program_id: &Pubkey) -> Pubkey {
15 | Pubkey::find_program_address(&[CPI_AUTHORITY_PDA_SEED], program_id).0
16 | }
17 |
18 | pub fn get_sol_pool_pda() -> Pubkey {
19 | Pubkey::find_program_address(&[SOL_POOL_PDA_SEED], &crate::ID).0
20 | }
21 |
--------------------------------------------------------------------------------
/audits/accretion_v1_update_audit.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lightprotocol/light-protocol/54f526454eb0147af9b3c0313b4a411e47b56a06/audits/accretion_v1_update_audit.pdf
--------------------------------------------------------------------------------
/audits/neodyme_v1_audit.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lightprotocol/light-protocol/54f526454eb0147af9b3c0313b4a411e47b56a06/audits/neodyme_v1_audit.pdf
--------------------------------------------------------------------------------
/audits/ottersec_v1_audit.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lightprotocol/light-protocol/54f526454eb0147af9b3c0313b4a411e47b56a06/audits/ottersec_v1_audit.pdf
--------------------------------------------------------------------------------
/audits/reilabs_circuits_formal_verification_report.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lightprotocol/light-protocol/54f526454eb0147af9b3c0313b4a411e47b56a06/audits/reilabs_circuits_formal_verification_report.pdf
--------------------------------------------------------------------------------
/audits/zellic_v1_audit.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lightprotocol/light-protocol/54f526454eb0147af9b3c0313b4a411e47b56a06/audits/zellic_v1_audit.pdf
--------------------------------------------------------------------------------
/cli/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 |
10 | [*.md]
11 | trim_trailing_whitespace = false
12 |
--------------------------------------------------------------------------------
/cli/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | test_bin
3 | test/**/*.js
4 | scripts
5 |
--------------------------------------------------------------------------------
/cli/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "env": {
4 | "node": true,
5 | "browser": true
6 | },
7 | "parser": "@typescript-eslint/parser",
8 | "parserOptions": {
9 | "ecmaVersion": 2021,
10 | "sourceType": "module"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/cli/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "ignorePatterns": ["node_modules", "dist", "bin", "accounts", "test"],
4 | "parser": "@typescript-eslint/parser",
5 | "parserOptions": {
6 | "project": ["./tsconfig.json", "./tsconfig.test.json"]
7 | },
8 | "plugins": [
9 | "@typescript-eslint"
10 | ],
11 | "extends": [
12 | "eslint:recommended",
13 | "plugin:@typescript-eslint/eslint-recommended",
14 | "plugin:@typescript-eslint/recommended"
15 | ],
16 | "rules": {
17 | "@typescript-eslint/ban-ts-comment": 0,
18 | "@typescript-eslint/no-explicit-any": 0,
19 | "@typescript-eslint/no-var-requires": 0,
20 | "@typescript-eslint/no-unused-vars": 0,
21 | "no-prototype-builtins": 0
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/cli/.gitignore:
--------------------------------------------------------------------------------
1 | *-debug.log
2 | *-error.log
3 | /.nyc_output
4 | /bin
5 | /dist
6 | /lib
7 | /package-lock.json
8 | /tmp
9 | node_modules
10 | oclif.manifest.json
11 | .yarn
12 | test-ledger
13 | .DS_store
14 | /**/.DS_store
15 | /bin
16 | /config.json
17 |
--------------------------------------------------------------------------------
/cli/.mocharc.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": ["test/helpers/init.js", "ts-node/register"],
3 | "watch-extensions": ["ts"],
4 | "recursive": true,
5 | "reporter": "spec",
6 | "timeout": 600000
7 | }
8 |
--------------------------------------------------------------------------------
/cli/.npmignore:
--------------------------------------------------------------------------------
1 |
2 | bin/proving-keys/append-with-proofs_26_10.key
3 | bin/proving-keys/append-with-proofs_26_10.vkey
4 | bin/proving-keys/update_26_10.key
5 | bin/proving-keys/update_26_10.vkey
6 | bin/proving-keys/address-append_26_1.vkey
7 | bin/proving-keys/address-append_26_1.vkey
8 | bin/proving-keys/address-append_26_10.vkey
9 | bin/proving-keys/address-append_26_10.vkey
10 |
--------------------------------------------------------------------------------
/cli/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | nodeLinker: node-modules
2 |
--------------------------------------------------------------------------------
/cli/accounts/epoch_pda_34w7KcLBXabMkHuXE2fY368vFe6kP3v5EJn8nPvQ8SKn.json:
--------------------------------------------------------------------------------
1 | {"pubkey":"34w7KcLBXabMkHuXE2fY368vFe6kP3v5EJn8nPvQ8SKn","account":{"lamports":2171520,"data":["QuAuAqeJeGsAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAKAAAAAAAAAGQAAAAAAAAAyAAAAAAAAABkAAAAAAAAAIgTAAAAAAAACFAAAAAAAABkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA==","base64"],"owner":"Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX","executable":false,"rentEpoch":18446744073709551615,"space":184}}
--------------------------------------------------------------------------------
/cli/accounts/forester_epoch_pda_3FBt1BPQHCQkS8k3wrUXMfB6JBhtMhEqQXueHRw2ojZV.json:
--------------------------------------------------------------------------------
1 | {"pubkey":"3FBt1BPQHCQkS8k3wrUXMfB6JBhtMhEqQXueHRw2ojZV","account":{"lamports":2735280,"data":["HXXTjWOP+nLMuMIVdedaPnWzorVHJCIvMcPXWnMDRUrSS6K/PzOqzAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAAAAABkAAAAAAAAAMgAAAAAAAAAZAAAAAAAAACIEwAAAAAAAAhQAAAAAAAAZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA==","base64"],"owner":"Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX","executable":false,"rentEpoch":18446744073709551615,"space":265}}
--------------------------------------------------------------------------------
/cli/accounts/governance_authority_pda_CuEtcKkkbTn6qy2qxqDswq5U2ADsqoipYDAYfRvxPjcp.json:
--------------------------------------------------------------------------------
1 | {"pubkey":"CuEtcKkkbTn6qy2qxqDswq5U2ADsqoipYDAYfRvxPjcp","account":{"lamports":2234160,"data":["YLDvkgH+Y5ICY+L7WEJcIRnY07lwy9TuaZBIebD9aqhznpq8Pv+mUf8AAAAAAAAAAAEAAAAAAAAACgAAAAAAAABkAAAAAAAAAMgAAAAAAAAAZAAAAAAAAACIEwAAAAAAAAhQAAAAAAAAZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"owner":"Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX","executable":false,"rentEpoch":18446744073709551615,"space":193}}
--------------------------------------------------------------------------------
/cli/accounts/group_pda_24rt4RgeyjUCWGS2eF7L7gyNMuz6JWdqYpAvb1KRoHxs.json:
--------------------------------------------------------------------------------
1 | {"pubkey":"24rt4RgeyjUCWGS2eF7L7gyNMuz6JWdqYpAvb1KRoHxs","account":{"lamports":1392000,"data":["D88EoH8mjqIQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz959gvYscJPdVIze1MSnf9YAGMXJWU+iA1NroPMILezQNi","base64"],"owner":"compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq","executable":false,"rentEpoch":18446744073709551615,"space":72}}
--------------------------------------------------------------------------------
/cli/accounts/group_pda_32tgQWfaASE7SfTQvMaSJDrqe728tJQ2SGzxtDDrpDwS.json:
--------------------------------------------------------------------------------
1 | {"pubkey":"32tgQWfaASE7SfTQvMaSJDrqe728tJQ2SGzxtDDrpDwS","account":{"lamports":1392000,"data":["D88EoH8mjqIQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz950vfSocYeLHitXp0BCgI+ALv3zEIJJy2OBeyZp+6b7UE","base64"],"owner":"compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq","executable":false,"rentEpoch":18446744073709551615,"space":72}}
--------------------------------------------------------------------------------
/cli/accounts/registered_forester_pda_2KNqEh23Se8AHecuzR1UkxL26euq2qXSpQPTH1jH7VqU.json:
--------------------------------------------------------------------------------
1 | {"pubkey":"2KNqEh23Se8AHecuzR1UkxL26euq2qXSpQPTH1jH7VqU","account":{"lamports":1670400,"data":["My+7VlKZdQXMuMIVdedaPnWzorVHJCIvMcPXWnMDRUrSS6K/PzOqzAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"owner":"Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX","executable":false,"rentEpoch":18446744073709551615,"space":112}}
--------------------------------------------------------------------------------
/cli/accounts/registered_program_pda_35hkDgaAKwMCaxRz2ocSZ6NaUrtKkyNqU6c4RV3tYJRh.json:
--------------------------------------------------------------------------------
1 | {"pubkey":"35hkDgaAKwMCaxRz2ocSZ6NaUrtKkyNqU6c4RV3tYJRh","account":{"lamports":1614720,"data":["H/u06wN0MgQGp1X4ITkFTUQksVrwxDDPL0t/mHk62hJS1I82ZsbLzg/Y1EfToz5VLJjxHxd2rjLiDsKHFAg5RA9dMMbnV0jY+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnU=","base64"],"owner":"compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq","executable":false,"rentEpoch":18446744073709551615,"space":104}}
--------------------------------------------------------------------------------
/cli/accounts/registered_registry_program_pda_DumMsyvkaGJG4QnQ1BhTgvoRMXsgGxfpKDUCr22Xqu4w.json:
--------------------------------------------------------------------------------
1 | {"pubkey":"DumMsyvkaGJG4QnQ1BhTgvoRMXsgGxfpKDUCr22Xqu4w","account":{"lamports":1614720,"data":["H/u06wN0MgQFDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bg/Y1EfToz5VLJjxHxd2rjLiDsKHFAg5RA9dMMbnV0jYEKZefdY5BPg4OtA83uB4uRTYcxiAOxU1gHDXkuBc/ec=","base64"],"owner":"compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq","executable":false,"rentEpoch":18446744073709551615,"space":104}}
--------------------------------------------------------------------------------
/cli/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "solanaRpcUrl": "http://127.0.0.1:8899"
3 | }
--------------------------------------------------------------------------------
/cli/scripts/checkAddProgram.ts:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 |
3 | function main() {
4 | const dir = process.argv[2];
5 | const name = process.argv[3];
6 |
7 | // check whether program Cargo.toml file exists
8 | const programDir = `${dir}/programs/${name}/Cargo.toml`;
9 | if (!fs.existsSync(programDir))
10 | throw new Error(`Program ${programDir} does not exist.`);
11 | console.log(`Checked ${programDir} success`);
12 | }
13 |
14 | main();
--------------------------------------------------------------------------------
/cli/scripts/copyLocalProgramBinaries.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | set -eux
4 |
5 | root_dir=$(git rev-parse --show-toplevel)
6 | out_dir="$root_dir/cli/bin"
7 | if [ ! -e "$out_dir" ]; then
8 | mkdir -p "$out_dir"
9 | fi
10 |
11 | keys="account_compression light_system_program_pinocchio light_compressed_token light_registry"
12 | for key in $keys
13 | do
14 | cp "$root_dir/target/deploy/$key.so" "$out_dir"/"$key".so
15 | done
16 | cp "$root_dir"/third-party/solana-program-library/spl_noop.so "$out_dir"/spl_noop.so
17 |
--------------------------------------------------------------------------------
/cli/src/commands/config/index.ts:
--------------------------------------------------------------------------------
1 | import ConfigCommand from "./config";
2 | export default ConfigCommand;
3 |
--------------------------------------------------------------------------------
/cli/src/index.ts:
--------------------------------------------------------------------------------
1 | export { run } from "@oclif/core";
2 |
3 | export * from "./utils";
4 | export * from "./psp-utils";
5 |
--------------------------------------------------------------------------------
/cli/src/psp-utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./download";
2 |
--------------------------------------------------------------------------------
/cli/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./utils";
2 | export * from "./initTestEnv";
3 | export * from "./processPhotonIndexer";
4 | export * from "./processProverServer";
5 | export * from "./constants";
6 |
--------------------------------------------------------------------------------
/cli/test/helpers/init.js:
--------------------------------------------------------------------------------
1 | const { execSync } = require("child_process");
2 | const path = require("path");
3 |
4 | process.env.TS_NODE_PROJECT = path.resolve("tsconfig.test.json");
5 | process.env.NODE_ENV = "development";
6 |
7 | global.oclif = global.oclif || {};
8 | global.oclif.columns = 80;
9 |
--------------------------------------------------------------------------------
/cli/test_bin/dev:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const oclif = require('@oclif/core')
4 |
5 | const path = require('path')
6 | const project = path.join(__dirname, '..', 'tsconfig.test.json')
7 |
8 | // In dev mode -> use ts-node and dev plugins
9 | process.env.NODE_ENV = 'development'
10 |
11 | require('ts-node').register({project})
12 |
13 | // In dev mode, always show stack traces
14 | oclif.settings.debug = true;
15 |
16 | // Start the CLI
17 | oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
18 |
--------------------------------------------------------------------------------
/cli/test_bin/run:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const oclif = require('@oclif/core')
4 |
5 | oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
6 |
--------------------------------------------------------------------------------
/cli/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "declaration": true,
4 | "esModuleInterop": true,
5 | "importHelpers": true,
6 | "module": "commonjs",
7 | "outDir": "dist",
8 | "rootDirs": ["src"],
9 | "strict": true,
10 | "target": "ES2020",
11 | "skipLibCheck": true,
12 | "resolveJsonModule": true
13 | },
14 | "include": ["src/**/*"]
15 | }
16 |
--------------------------------------------------------------------------------
/cli/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "compilerOptions": {
4 | "esModuleInterop": true,
5 | "noEmit": true,
6 | "rootDirs": ["src", "test"]
7 | },
8 |
9 | "include": ["./src/**/*", "./test/**/*"]
10 | }
11 |
--------------------------------------------------------------------------------
/examples/anchor/counter/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/examples/anchor/memo/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/examples/anchor/name-service-without-macros/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/examples/anchor/name-service/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/examples/anchor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@lightprotocol/anchor-examples",
3 | "version": "0.1.0",
4 | "description": "Anchor examples",
5 | "scripts": {
6 | "test": "pnpm test-counter && pnpm test-memo && pnpm test-name-service && pnpm test-token-escrow",
7 | "test-counter": "cargo test-sbf -p counter -- --test-threads 1",
8 | "test-memo": "cargo test-sbf -p memo -- --test-threads 1",
9 | "test-name-service": "cargo test-sbf -p name-service-without-macros -- --test-threads 1",
10 | "test-token-escrow": "cargo test-sbf -p token-escrow -- --test-threads 1"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/examples/anchor/token-escrow/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/examples/anchor/token-escrow/src/escrow_with_compressed_pda/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod escrow;
2 | pub mod sdk;
3 | pub mod withdrawal;
4 |
5 | pub use escrow::*;
6 |
--------------------------------------------------------------------------------
/examples/anchor/token-escrow/src/escrow_with_pda/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod escrow;
2 | pub mod sdk;
3 | pub mod withdrawal;
4 |
5 | pub use escrow::*;
6 |
--------------------------------------------------------------------------------
/examples/browser/nextjs/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/examples/browser/nextjs/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/examples/browser/nextjs/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": true,
3 | "trailingComma": "all",
4 | "singleQuote": true,
5 | "printWidth": 80,
6 | "useTabs": false,
7 | "tabWidth": 4,
8 | "bracketSpacing": true,
9 | "arrowParens": "avoid"
10 | }
11 |
--------------------------------------------------------------------------------
/examples/browser/nextjs/README.md:
--------------------------------------------------------------------------------
1 | This project demonstrates how to use `@lightprotocol/stateless.js` to interact
2 | with the ZK Compression API in a browser environment.
3 |
4 | 0. Build the Monorepo.
5 |
6 | ```bash
7 | cd ../../../ &&
8 | . ./scripts/devenv.sh &&
9 | ./scripts/install.sh &&
10 | ./scripts/build.sh
11 | ```
12 |
13 | 1. Start a light test-validator using the CLI
14 |
15 | ```bash
16 | cd cli &&
17 | light test-validator
18 | ```
19 |
20 | 2. Start the app
21 |
22 | ```bash
23 | cd ../examples/browser/nextjs &&
24 | pnpm dev
25 | ```
26 |
27 | This will serve and mount the app at http://localhost:1234 and run the code
28 | defined in `page.tsx`.
29 |
--------------------------------------------------------------------------------
/examples/browser/nextjs/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | webpack: (config, { isServer }) => {
4 | // Fix for Node.js modules in Webpack 5+
5 | if (!isServer) {
6 | config.resolve.fallback = {
7 | ...config.resolve.fallback,
8 | fs: false,
9 | path: false,
10 | os: false,
11 | };
12 | }
13 |
14 | return config;
15 | },
16 | };
17 |
18 | export default nextConfig;
19 |
--------------------------------------------------------------------------------
/examples/browser/nextjs/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/browser/nextjs/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lightprotocol/light-protocol/54f526454eb0147af9b3c0313b4a411e47b56a06/examples/browser/nextjs/src/app/favicon.ico
--------------------------------------------------------------------------------
/examples/browser/nextjs/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from 'next';
2 | import { Inter } from 'next/font/google';
3 | import './globals.css';
4 |
5 | const inter = Inter({ subsets: ['latin'] });
6 |
7 | export const metadata: Metadata = {
8 | title: 'Create Next App',
9 | description: 'Generated by create next app',
10 | };
11 |
12 | export default function RootLayout({
13 | children,
14 | }: Readonly<{
15 | children: React.ReactNode;
16 | }>) {
17 | return (
18 |
19 |
{children}
20 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/examples/node/esm/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | .DS_Store
4 | .idea
--------------------------------------------------------------------------------
/examples/node/esm/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "stateless.js-node-client",
3 | "type": "module",
4 | "version": "0.1.0",
5 | "description": "Example node client for stateless.js",
6 | "main": "index.js",
7 | "scripts": {
8 | "build": "tsc",
9 | "test-validator": "./../../../cli/test_bin/run test-validator",
10 | "test": "pnpm test-validator && node dist/index.js"
11 | },
12 | "keywords": [],
13 | "author": "",
14 | "license": "Apache-2.0",
15 | "devDependencies": {
16 | "@types/node": "^22.15.29",
17 | "typescript": "^5.7.2"
18 | },
19 | "dependencies": {
20 | "@coral-xyz/anchor": "^0.30.0",
21 | "@solana/web3.js": "1.98.0",
22 | "@lightprotocol/stateless.js": "workspace:*"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/examples/node/esm/src/index.ts:
--------------------------------------------------------------------------------
1 | import { airdropSol, compress, createRpc } from "@lightprotocol/stateless.js";
2 | import { Keypair } from "@solana/web3.js";
3 |
4 | const rpc = createRpc();
5 | const keypair = new Keypair();
6 |
7 | (async () => {
8 | await airdropSol({
9 | connection: rpc,
10 | lamports: 1e11,
11 | recipientPublicKey: keypair.publicKey,
12 | });
13 | const tx = await compress(rpc, keypair, 1e9, keypair.publicKey);
14 | console.log("compress tx", tx);
15 | })();
16 |
--------------------------------------------------------------------------------
/examples/node/esm/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "moduleResolution": "Node",
4 | "module": "ESNext",
5 | "outDir": "dist",
6 | "sourceMap": true,
7 | "allowSyntheticDefaultImports": true,
8 | "esModuleInterop": true
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/forester-spec.yaml:
--------------------------------------------------------------------------------
1 | alerts:
2 | - rule: DEPLOYMENT_FAILED
3 | name: forester
4 | region: fra
5 | services:
6 | - name: forester
7 | dockerfile_path: Dockerfile
8 | source_dir: .
9 | github:
10 | repo: lightprotocol/light-protocol
11 | branch: main
12 | deploy_on_push: true
13 | instance_count: 2
14 | instance_size_slug: basic-xxs
15 | routes:
16 | - path: /
--------------------------------------------------------------------------------
/forester-utils/src/error.rs:
--------------------------------------------------------------------------------
1 | use thiserror::Error;
2 |
3 | #[derive(Error, Debug)]
4 | pub enum ForesterUtilsError {
5 | #[error("parse error: {0:?}")]
6 | Parse(String),
7 | #[error("prover error: {0:?}")]
8 | Prover(String),
9 | #[error("rpc error: {0:?}")]
10 | Rpc(String),
11 | #[error("indexer error: {0:?}")]
12 | Indexer(String),
13 | #[error("invalid slot number")]
14 | InvalidSlotNumber,
15 | }
16 |
--------------------------------------------------------------------------------
/forester-utils/src/instructions/create_account.rs:
--------------------------------------------------------------------------------
1 | use account_compression::processor::initialize_address_merkle_tree::Pubkey;
2 | use anchor_lang::solana_program::{instruction::Instruction, system_instruction};
3 | use solana_sdk::signature::{Keypair, Signer};
4 |
5 | pub fn create_account_instruction(
6 | payer: &Pubkey,
7 | size: usize,
8 | rent: u64,
9 | id: &Pubkey,
10 | keypair: Option<&Keypair>,
11 | ) -> Instruction {
12 | let keypair = match keypair {
13 | Some(keypair) => keypair.insecure_clone(),
14 | None => Keypair::new(),
15 | };
16 | system_instruction::create_account(payer, &keypair.pubkey(), rent, size as u64, id)
17 | }
18 |
--------------------------------------------------------------------------------
/forester-utils/src/instructions/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod address_batch_update;
2 | pub mod create_account;
3 | pub mod state_batch_append;
4 | pub mod state_batch_nullify;
5 |
6 | pub use create_account::create_account_instruction;
7 |
--------------------------------------------------------------------------------
/forester-utils/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod account_zero_copy;
2 | pub mod address_merkle_tree_config;
3 | mod error;
4 | pub mod forester_epoch;
5 | pub mod instructions;
6 | pub mod rate_limiter;
7 | pub mod registry;
8 | pub mod rpc_pool;
9 | pub mod utils;
10 |
--------------------------------------------------------------------------------
/forester/.dockerignore:
--------------------------------------------------------------------------------
1 | **/*.log
2 | .git/
3 | **/test-ledger/
4 | **/logs/
5 | target
6 | **/target/
7 | node_modules
8 | **/node_modules
9 | Dockerfile
10 | .dockerignore
11 | .git
--------------------------------------------------------------------------------
/forester/.env.example:
--------------------------------------------------------------------------------
1 | export FORESTER_RPC_URL="http://localhost:8899"
2 | export FORESTER_WS_RPC_URL="ws://localhost:8900"
3 | export FORESTER_INDEXER_URL="http://localhost:8784"
4 | export FORESTER_PROVER_URL="http://localhost:3001"
5 | export FORESTER_PUSH_GATEWAY_URL="http://localhost:9092/metrics/job/forester"
6 | export FORESTER_PAYER=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64]
7 | export PHOTON_API_KEY="00000000-0000-0000-0000-000000000000"
--------------------------------------------------------------------------------
/forester/.gitignore:
--------------------------------------------------------------------------------
1 | logs
2 | /target
3 | .idea
4 | .env
5 | *.json
6 | !package.json
7 |
--------------------------------------------------------------------------------
/forester/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM rust:1.79 AS builder
2 | WORKDIR /app
3 | RUN apt-get update && apt install -y clang lld pkgconf libssl-dev
4 | ENV OPENSSL_DIR=/usr
5 | ENV OPENSSL_LIB_DIR=/usr/lib
6 | ENV OPENSSL_INCLUDE_DIR=/usr/include
7 |
8 | COPY .. .
9 | RUN cargo build --release --package forester
10 |
11 | FROM debian:12-slim
12 | RUN apt-get update && apt-get install -y ca-certificates libssl-dev && rm -rf /var/lib/apt/lists/*
13 | RUN mkdir -p /app/config
14 | COPY --from=builder /app/target/release/forester /usr/local/bin/forester
15 | WORKDIR /app
16 |
17 | ENTRYPOINT ["/usr/local/bin/forester"]
18 | CMD []
--------------------------------------------------------------------------------
/forester/src/processor/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod tx_cache;
2 | pub mod v1;
3 | pub mod v2;
4 |
--------------------------------------------------------------------------------
/forester/src/processor/v1/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod config;
2 | pub mod helpers;
3 | pub mod send_transaction;
4 | pub mod tx_builder;
5 |
--------------------------------------------------------------------------------
/forester/src/rollover/mod.rs:
--------------------------------------------------------------------------------
1 | mod operations;
2 | mod state;
3 |
4 | pub use operations::{
5 | get_tree_fullness, is_tree_ready_for_rollover, perform_address_merkle_tree_rollover,
6 | perform_state_merkle_tree_rollover_forester,
7 | };
8 | pub use state::RolloverState;
9 |
--------------------------------------------------------------------------------
/forester/test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ../cli/test_bin/run start-prover --run-mode forester
4 | ../cli/test_bin/run test-validator --skip-prover --skip-indexer
5 | sleep 10
6 | (cd ../../photon && cargo run 2>&1 > photon.log)
7 |
8 | sleep 60 * 5
9 |
10 | RUST_LOG=forester=debug,forester_utils=debug cargo test --package forester test_state_indexer_async_batched -- --nocapture
11 |
--------------------------------------------------------------------------------
/js/compressed-token/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | lib
3 | dist
--------------------------------------------------------------------------------
/js/compressed-token/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "ignorePatterns": ["node_modules", "lib"],
4 | "parser": "@typescript-eslint/parser",
5 | "parserOptions": {
6 | "project": ["./tsconfig.json", "./tsconfig.test.json"]
7 | },
8 | "plugins": ["@typescript-eslint"],
9 | "extends": [
10 | "eslint:recommended",
11 | "plugin:@typescript-eslint/eslint-recommended",
12 | "plugin:@typescript-eslint/recommended"
13 | ],
14 | "rules": {
15 | "@typescript-eslint/ban-ts-comment": 0,
16 | "@typescript-eslint/no-explicit-any": 0,
17 | "@typescript-eslint/no-var-requires": 0,
18 | "@typescript-eslint/no-unused-vars": 0,
19 | "no-prototype-builtins": 0
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/js/compressed-token/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | test-ledger
3 | lib
4 | **/lib/**
5 | **/lib/*
6 |
--------------------------------------------------------------------------------
/js/compressed-token/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": true,
3 | "trailingComma": "all",
4 | "singleQuote": true,
5 | "printWidth": 80,
6 | "useTabs": false,
7 | "tabWidth": 4,
8 | "bracketSpacing": true,
9 | "arrowParens": "avoid"
10 | }
11 |
--------------------------------------------------------------------------------
/js/compressed-token/src/actions/index.ts:
--------------------------------------------------------------------------------
1 | export * from './approve-and-mint-to';
2 | export * from './compress';
3 | export * from './decompress';
4 | export * from './create-mint';
5 | export * from './mint-to';
6 | export * from './merge-token-accounts';
7 | export * from './create-token-pool';
8 | export * from './transfer';
9 | export * from './create-token-program-lookup-table';
10 | export * from './compress-spl-token-account';
11 |
--------------------------------------------------------------------------------
/js/compressed-token/src/constants.ts:
--------------------------------------------------------------------------------
1 | export const POOL_SEED = Buffer.from('pool');
2 |
3 | export const CPI_AUTHORITY_SEED = Buffer.from('cpi_authority');
4 |
5 | export const SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE = 1461600;
6 |
7 | export const CREATE_TOKEN_POOL_DISCRIMINATOR = Buffer.from([
8 | 23, 169, 27, 122, 147, 169, 209, 152,
9 | ]);
10 | export const MINT_TO_DISCRIMINATOR = Buffer.from([
11 | 241, 34, 48, 186, 37, 179, 123, 192,
12 | ]);
13 | export const TRANSFER_DISCRIMINATOR = Buffer.from([
14 | 163, 52, 200, 231, 140, 3, 69, 186,
15 | ]);
16 | export const COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR = Buffer.from([
17 | 112, 230, 105, 101, 145, 202, 157, 97,
18 | ]);
19 |
--------------------------------------------------------------------------------
/js/compressed-token/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './instructions';
2 | export * from './constants';
3 | export * from './program';
4 | export * from './types';
5 | export * from './actions';
6 | export * from './layout';
7 | export * from './idl';
8 | export * from './utils';
9 |
--------------------------------------------------------------------------------
/js/compressed-token/src/instructions/index.ts:
--------------------------------------------------------------------------------
1 | export * from './pack-compressed-token-accounts';
2 |
--------------------------------------------------------------------------------
/js/compressed-token/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './select-input-accounts';
2 |
--------------------------------------------------------------------------------
/js/compressed-token/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "compilerOptions": {
4 | "importHelpers": true,
5 | "outDir": "./dist",
6 | "esModuleInterop": true,
7 | "allowSyntheticDefaultImports": true,
8 | "strict": true,
9 | "declaration": false,
10 | "target": "ESNext",
11 | "module": "ESNext",
12 | "moduleResolution": "Node",
13 | "lib": ["ESNext", "DOM"],
14 | "types": ["node"],
15 | "skipLibCheck": false,
16 | "typeRoots": ["types/", "./node_modules/@types"]
17 | },
18 | "include": ["./src/**/*.ts", "rollup.config.js"]
19 | }
20 |
--------------------------------------------------------------------------------
/js/compressed-token/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "rootDirs": ["src", "tests"]
5 | },
6 | "extends": "./tsconfig.json",
7 | "include": ["./tests/**/*.ts", "vitest.config.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/js/compressed-token/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config';
2 | import { resolve } from 'path';
3 |
4 | export default defineConfig({
5 | logLevel: 'info',
6 | test: {
7 | include: process.env.EXCLUDE_E2E
8 | ? []
9 | : ['src/**/__tests__/*.test.ts', 'tests/**/*.test.ts'],
10 | includeSource: ['src/**/*.{js,ts}'],
11 | exclude: ['src/program.ts'],
12 | testTimeout: 350000,
13 | hookTimeout: 100000,
14 | },
15 | define: {
16 | 'import.meta.vitest': false,
17 | },
18 | build: {
19 | lib: {
20 | formats: ['es', 'cjs'],
21 | entry: resolve(__dirname, 'src/index.ts'),
22 | fileName: 'index',
23 | },
24 | },
25 | });
26 |
--------------------------------------------------------------------------------
/js/stateless.js/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | lib
3 | dist
4 |
--------------------------------------------------------------------------------
/js/stateless.js/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "ignorePatterns": ["node_modules", "lib"],
4 | "parser": "@typescript-eslint/parser",
5 | "parserOptions": {
6 | "project": ["./tsconfig.json", "./tsconfig.test.json"]
7 | },
8 | "plugins": ["@typescript-eslint", "vitest"],
9 | "extends": [
10 | "eslint:recommended",
11 | "plugin:@typescript-eslint/eslint-recommended",
12 | "plugin:@typescript-eslint/recommended"
13 | ],
14 | "rules": {
15 | "@typescript-eslint/ban-ts-comment": 0,
16 | "@typescript-eslint/no-explicit-any": 0,
17 | "@typescript-eslint/no-var-requires": 0,
18 | "@typescript-eslint/no-unused-vars": 0,
19 | "no-prototype-builtins": 0
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/js/stateless.js/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | test-ledger
3 | lib
4 | **/lib/**
5 | **/lib/*
6 |
--------------------------------------------------------------------------------
/js/stateless.js/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": true,
3 | "trailingComma": "all",
4 | "singleQuote": true,
5 | "printWidth": 80,
6 | "useTabs": false,
7 | "tabWidth": 4,
8 | "bracketSpacing": true,
9 | "arrowParens": "avoid"
10 | }
11 |
--------------------------------------------------------------------------------
/js/stateless.js/playwright.config.ts:
--------------------------------------------------------------------------------
1 | import { PlaywrightTestConfig } from '@playwright/test';
2 |
3 | const config: PlaywrightTestConfig = {
4 | webServer: {
5 | command: 'npx http-server -p 4004 -c-1',
6 | port: 4004,
7 | cwd: '.',
8 | timeout: 15 * 1000,
9 | },
10 | testDir: './tests/e2e/browser',
11 | };
12 |
13 | export default config;
14 |
--------------------------------------------------------------------------------
/js/stateless.js/src/actions/common.ts:
--------------------------------------------------------------------------------
1 | import { Signer } from '@solana/web3.js';
2 |
3 | /** @internal remove signer from signers if part of signers */
4 | export function dedupeSigner(signer: Signer, signers: Signer[]): Signer[] {
5 | if (signers.includes(signer)) {
6 | return signers.filter(
7 | s => s.publicKey.toString() !== signer.publicKey.toString(),
8 | );
9 | }
10 | return signers;
11 | }
12 |
--------------------------------------------------------------------------------
/js/stateless.js/src/actions/index.ts:
--------------------------------------------------------------------------------
1 | export * from './compress';
2 | export * from './create-account';
3 | export * from './decompress';
4 | export * from './common';
5 | export * from './transfer';
6 |
--------------------------------------------------------------------------------
/js/stateless.js/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './actions';
2 | export * from './instruction';
3 | export * from './programs';
4 | export * from './state';
5 | export * from './utils';
6 | export * from './constants';
7 | export * from './errors';
8 | export * from './rpc-interface';
9 | export * from './rpc';
10 | export * from './test-helpers';
11 | export { LightSystemProgram as LightSystemProgramIDL, IDL } from './idl';
12 |
--------------------------------------------------------------------------------
/js/stateless.js/src/instruction/index.ts:
--------------------------------------------------------------------------------
1 | export * from './pack-compressed-accounts';
2 |
--------------------------------------------------------------------------------
/js/stateless.js/src/programs/index.ts:
--------------------------------------------------------------------------------
1 | export * from './system';
2 | export * from './layout';
3 |
--------------------------------------------------------------------------------
/js/stateless.js/src/state/index.ts:
--------------------------------------------------------------------------------
1 | export * from './BN254';
2 | export * from './compressed-account';
3 | export * from './types';
4 |
--------------------------------------------------------------------------------
/js/stateless.js/src/test-helpers/index.ts:
--------------------------------------------------------------------------------
1 | export * from './merkle-tree';
2 | export * from './test-rpc';
3 | export * from './test-utils';
4 |
--------------------------------------------------------------------------------
/js/stateless.js/src/test-helpers/merkle-tree/index.ts:
--------------------------------------------------------------------------------
1 | export * from './indexed-array';
2 | export * from './merkle-tree';
3 |
--------------------------------------------------------------------------------
/js/stateless.js/src/test-helpers/test-rpc/index.ts:
--------------------------------------------------------------------------------
1 | export * from './test-rpc';
2 | export * from './get-parsed-events';
3 | export * from './get-compressed-token-accounts';
4 |
--------------------------------------------------------------------------------
/js/stateless.js/src/utils/calculate-compute-unit-price.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @param targetLamports - Target priority fee in lamports
3 | * @param computeUnits - Expected compute units used by the transaction
4 | * @returns microLamports per compute unit (use in
5 | * `ComputeBudgetProgram.setComputeUnitPrice`)
6 | */
7 | export function calculateComputeUnitPrice(
8 | targetLamports: number,
9 | computeUnits: number,
10 | ): number {
11 | return Math.ceil((targetLamports * 1_000_000) / computeUnits);
12 | }
13 |
--------------------------------------------------------------------------------
/js/stateless.js/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './address';
2 | export * from './airdrop';
3 | export * from './conversion';
4 | export * from './parse-validity-proof';
5 | export * from './pipe';
6 | export * from './send-and-confirm';
7 | export * from './sleep';
8 | export * from './validation';
9 | export * from './calculate-compute-unit-price';
10 | export * from './get-light-state-tree-info';
11 |
--------------------------------------------------------------------------------
/js/stateless.js/src/utils/sleep.ts:
--------------------------------------------------------------------------------
1 | // zzz
2 | export function sleep(ms: number): Promise {
3 | return new Promise(resolve => setTimeout(resolve, ms));
4 | }
5 |
--------------------------------------------------------------------------------
/js/stateless.js/tests/e2e/browser/test-page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Test Page
6 |
7 |
8 |
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/js/stateless.js/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "compilerOptions": {
4 | "importHelpers": true,
5 | "outDir": "./dist",
6 | "esModuleInterop": true,
7 | "allowSyntheticDefaultImports": true,
8 | "strict": true,
9 | "declaration": true,
10 | "target": "ESNext",
11 | "module": "ESNext",
12 | "moduleResolution": "Node",
13 | "lib": ["ESNext", "DOM"],
14 | "types": ["node"],
15 | "skipLibCheck": false,
16 | "typeRoots": ["types/", "./node_modules/@types"]
17 | },
18 | "include": ["./src/**/*.ts", "playwright.config.ts", "rollup.config.js"]
19 | }
20 |
--------------------------------------------------------------------------------
/js/stateless.js/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "rootDirs": ["src", "tests"]
5 | },
6 | "extends": "./tsconfig.json",
7 | "include": ["./tests/**/*.ts", "vitest.config.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/js/stateless.js/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config';
2 |
3 | export default defineConfig({
4 | test: {
5 | include: ['tests/**/*.test.ts'],
6 | exclude: process.env.EXCLUDE_E2E ? ['tests/e2e/**'] : [],
7 | testTimeout: 35000,
8 | reporters: ['default', 'verbose'],
9 | },
10 | });
11 |
--------------------------------------------------------------------------------
/light_paper_v0.1.0.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lightprotocol/light-protocol/54f526454eb0147af9b3c0313b4a411e47b56a06/light_paper_v0.1.0.pdf
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "devDependencies": {
3 | "husky": "^9.1.7",
4 | "nx": "^20.8.1",
5 | "playwright": "^1.52.0",
6 | "prettier": "^3.5.3",
7 | "snarkjs": "^0.7.5",
8 | "syncpack": "^13.0.4",
9 | "typescript": "^5.8.3"
10 | },
11 | "packageManager": "pnpm@9.2.0"
12 | }
13 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - "tsconfig/**"
3 | - "programs/**"
4 | - "program-libs/**"
5 | - "cli/**"
6 | - "account-compression/programs/**"
7 | - "sdk/**"
8 | - "js/stateless.js/**"
9 | - "js/compressed-token/**"
10 | - "examples/**"
11 | - "forester/**"
12 | - "program-tests/**"
13 |
--------------------------------------------------------------------------------
/program-libs/account-checks/src/discriminator.rs:
--------------------------------------------------------------------------------
1 | pub const DISCRIMINATOR_LEN: usize = 8;
2 |
3 | pub trait Discriminator {
4 | const LIGHT_DISCRIMINATOR: [u8; 8];
5 | const LIGHT_DISCRIMINATOR_SLICE: &'static [u8];
6 | fn discriminator() -> [u8; 8] {
7 | Self::LIGHT_DISCRIMINATOR
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/program-libs/account-checks/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod checks;
2 | pub mod discriminator;
3 | pub mod error;
4 | pub mod test_account_info;
5 |
6 | #[cfg(feature = "pinocchio")]
7 | use pinocchio::{account_info::AccountInfo, program_error::ProgramError, pubkey::Pubkey};
8 | #[cfg(all(feature = "pinocchio", target_os = "solana"))]
9 | use pinocchio::{sysvars::rent::Rent, sysvars::Sysvar};
10 | #[cfg(all(not(feature = "pinocchio"), target_os = "solana"))]
11 | use solana_sysvar::{rent::Rent, Sysvar};
12 | #[cfg(not(feature = "pinocchio"))]
13 | use {solana_account_info::AccountInfo, solana_program_error::ProgramError, solana_pubkey::Pubkey};
14 |
--------------------------------------------------------------------------------
/program-libs/aligned-sized/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "aligned-sized"
3 | version = "1.1.0"
4 | description = "A macro which ensures the alignment and calculates the size of a struct"
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [lib]
10 | proc-macro = true
11 |
12 | [dependencies]
13 | proc-macro2 = { workspace = true }
14 | quote = { workspace = true }
15 | syn = { workspace = true }
16 |
--------------------------------------------------------------------------------
/program-libs/aligned-sized/README.md:
--------------------------------------------------------------------------------
1 | # aligned-sized
2 | A macro which ensures the alignment and calculates the size of a struct
3 |
--------------------------------------------------------------------------------
/program-libs/bloom-filter/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-bloom-filter"
3 | version = "0.2.0"
4 | description = "Experimental bloom filter."
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [features]
10 | solana = ["dep:solana-program-error"]
11 | pinocchio = ["dep:pinocchio"]
12 |
13 | [dependencies]
14 | bitvec = "1.0.1"
15 | fastmurmur3 = "0.2.0"
16 | num-bigint = { workspace = true }
17 | solana-program-error = { workspace = true, optional = true }
18 | pinocchio = { workspace = true, optional = true }
19 | thiserror = { workspace = true }
20 |
21 | [dev-dependencies]
22 | rand = { workspace = true }
23 | light-hasher = { workspace = true }
24 | num-bigint = { workspace = true, features = ["rand"] }
25 |
--------------------------------------------------------------------------------
/program-libs/compressed-account/src/discriminators.rs:
--------------------------------------------------------------------------------
1 | pub const DISCRIMINATOR_INSERT_INTO_QUEUES: [u8; 8] = [180, 143, 159, 153, 35, 46, 248, 163];
2 |
3 | pub const DISCRIMINATOR_INVOKE: [u8; 8] = [26, 16, 169, 7, 21, 202, 242, 25];
4 | pub const DISCRIMINATOR_INVOKE_CPI: [u8; 8] = [49, 212, 191, 129, 39, 194, 43, 196];
5 | pub const DISCRIMINATOR_INVOKE_CPI_WITH_READ_ONLY: [u8; 8] = [86, 47, 163, 166, 21, 223, 92, 8];
6 | pub const INVOKE_CPI_WITH_ACCOUNT_INFO_INSTRUCTION: [u8; 8] = [228, 34, 128, 84, 47, 139, 86, 240];
7 |
--------------------------------------------------------------------------------
/program-libs/compressed-account/src/indexer_event/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod error;
2 | pub mod event;
3 | pub mod parse;
4 |
--------------------------------------------------------------------------------
/program-libs/compressed-account/src/instruction_data/cpi_context.rs:
--------------------------------------------------------------------------------
1 | use crate::{AnchorDeserialize, AnchorSerialize};
2 |
3 | #[derive(AnchorSerialize, AnchorDeserialize, Debug, Clone, Copy, PartialEq, Eq, Default)]
4 | pub struct CompressedCpiContext {
5 | /// Is set by the program that is invoking the CPI to signal that is should
6 | /// set the cpi context.
7 | pub set_context: bool,
8 | /// Is set to clear the cpi context since someone could have set it before
9 | /// with unrelated data.
10 | pub first_set_context: bool,
11 | /// Index of cpi context account in remaining accounts.
12 | pub cpi_context_account_index: u8,
13 | }
14 |
--------------------------------------------------------------------------------
/program-libs/compressed-account/src/instruction_data/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod compressed_proof;
2 | pub mod cpi_context;
3 | pub mod data;
4 | pub mod insert_into_queues;
5 | pub mod invoke_cpi;
6 | pub mod traits;
7 | pub mod with_account_info;
8 | pub mod with_readonly;
9 | pub mod zero_copy;
10 |
--------------------------------------------------------------------------------
/program-libs/compressed-account/src/nullifier.rs:
--------------------------------------------------------------------------------
1 | use light_hasher::{Hasher, Poseidon};
2 |
3 | use crate::CompressedAccountError;
4 |
5 | /// Nullifer is a poseidon hash:
6 | /// H(account_hash, leaf_index, tx_hash)
7 | pub fn create_nullifier(
8 | account_hash: &[u8; 32],
9 | leaf_index: u64,
10 | tx_hash: &[u8; 32],
11 | ) -> Result<[u8; 32], CompressedAccountError> {
12 | let mut leaf_index_bytes = [0u8; 32];
13 | leaf_index_bytes[24..].copy_from_slice(leaf_index.to_be_bytes().as_slice());
14 | // Inclusion of the tx_hash enables zk proofs of how a value was spent.
15 | let nullifier = Poseidon::hashv(&[account_hash.as_slice(), &leaf_index_bytes, tx_hash])?;
16 | Ok(nullifier)
17 | }
18 |
--------------------------------------------------------------------------------
/program-libs/concurrent-merkle-tree/src/offset/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod copy;
2 | pub mod zero_copy;
3 |
--------------------------------------------------------------------------------
/program-libs/hash-set/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-hash-set"
3 | version = "2.0.0"
4 | description = "Hash set which can be stored on a Solana account"
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [features]
10 | solana = ["solana-program-error"]
11 |
12 | [dependencies]
13 | num-bigint = { workspace = true }
14 | num-traits = { workspace = true }
15 | solana-program-error = { workspace = true, optional = true }
16 | thiserror = { workspace = true }
17 | light-hasher = { workspace = true }
18 |
19 | [dev-dependencies]
20 | ark-bn254 = { workspace = true }
21 | ark-ff = { workspace = true }
22 | rand = { workspace = true }
23 |
--------------------------------------------------------------------------------
/program-libs/hasher/src/syscalls/mod.rs:
--------------------------------------------------------------------------------
1 | //! This module is a partial copy from
2 | //! [solana-program](https://github.com/solana-labs/solana/blob/master/sdk/program/src/syscalls/definitions.rs),
3 | //! which is licensed under Apache License 2.0.
4 | //!
5 | //! The purpose of the module is to provide definition of Poseidon syscall
6 | //! without upgrading solana-program and Anchor just yet.
7 |
8 | #[cfg(target_os = "solana")]
9 | mod definitions;
10 |
11 | #[cfg(target_os = "solana")]
12 | pub use definitions::*;
13 |
--------------------------------------------------------------------------------
/program-libs/hasher/src/zero_bytes/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod keccak;
2 | pub mod poseidon;
3 | pub mod sha256;
4 |
5 | pub const MAX_HEIGHT: usize = 40;
6 |
7 | pub type ZeroBytes = [[u8; 32]; MAX_HEIGHT + 1];
8 |
--------------------------------------------------------------------------------
/program-libs/hasher/src/zero_indexed_leaf/keccak.rs:
--------------------------------------------------------------------------------
1 | // This file is generated by xtask. Do not edit it manually.
2 |
3 | pub const ZERO_INDEXED_LEAF: [u8; 32] = [
4 | 60u8, 172u8, 49u8, 121u8, 8u8, 198u8, 153u8, 254u8, 135u8, 58u8, 127u8, 110u8, 228u8, 232u8,
5 | 205u8, 99u8, 251u8, 233u8, 145u8, 139u8, 35u8, 21u8, 201u8, 123u8, 233u8, 21u8, 133u8, 89u8,
6 | 1u8, 104u8, 227u8, 1u8,
7 | ];
8 |
--------------------------------------------------------------------------------
/program-libs/hasher/src/zero_indexed_leaf/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod keccak;
2 | pub mod poseidon;
3 | pub mod sha256;
4 |
--------------------------------------------------------------------------------
/program-libs/hasher/src/zero_indexed_leaf/poseidon.rs:
--------------------------------------------------------------------------------
1 | // This file is generated by xtask. Do not edit it manually.
2 |
3 | pub const ZERO_INDEXED_LEAF: [u8; 32] = [
4 | 11u8, 193u8, 136u8, 210u8, 125u8, 204u8, 234u8, 220u8, 29u8, 207u8, 182u8, 175u8, 10u8, 122u8,
5 | 240u8, 143u8, 226u8, 134u8, 78u8, 236u8, 236u8, 150u8, 197u8, 174u8, 124u8, 238u8, 109u8,
6 | 179u8, 27u8, 165u8, 153u8, 170u8,
7 | ];
8 |
--------------------------------------------------------------------------------
/program-libs/hasher/src/zero_indexed_leaf/sha256.rs:
--------------------------------------------------------------------------------
1 | // This file is generated by xtask. Do not edit it manually.
2 |
3 | pub const ZERO_INDEXED_LEAF: [u8; 32] = [
4 | 131u8, 74u8, 112u8, 155u8, 162u8, 83u8, 78u8, 190u8, 62u8, 225u8, 57u8, 127u8, 212u8, 247u8,
5 | 189u8, 40u8, 139u8, 42u8, 204u8, 29u8, 32u8, 160u8, 141u8, 108u8, 134u8, 45u8, 205u8, 153u8,
6 | 182u8, 240u8, 68u8, 0u8,
7 | ];
8 |
--------------------------------------------------------------------------------
/program-libs/heap/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-heap"
3 | version = "1.1.0"
4 | description = "Custom heap allocator used in Light Protocol"
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [dependencies]
10 | anchor-lang = { workspace = true }
11 |
12 | [lints.rust.unexpected_cfgs]
13 | level = "allow"
14 | check-cfg = [
15 | 'cfg(target_os, values("solana"))',
16 | 'cfg(feature, values("frozen-abi", "no-entrypoint"))',
17 | ]
18 |
--------------------------------------------------------------------------------
/program-libs/indexed-array/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-indexed-array"
3 | version = "0.1.0"
4 | description = "Implementation of indexed (and concurrent) Merkle tree in Rust"
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [dependencies]
10 | light-hasher = { workspace = true }
11 | num-bigint = { workspace = true }
12 | num-traits = { workspace = true }
13 | thiserror = { workspace = true }
14 |
15 | [dev-dependencies]
16 | rand = { workspace = true }
17 | num-bigint = { workspace = true, features = ["rand"] }
18 |
--------------------------------------------------------------------------------
/program-libs/indexed-array/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod array;
2 | pub mod changelog;
3 | pub mod errors;
4 |
5 | pub const HIGHEST_ADDRESS_PLUS_ONE: &str =
6 | "452312848583266388373324160190187140051835877600158453279131187530910662655";
7 |
--------------------------------------------------------------------------------
/program-libs/indexed-merkle-tree/src/changelog.rs:
--------------------------------------------------------------------------------
1 | use light_concurrent_merkle_tree::event::RawIndexedElement;
2 |
3 | /// NET_HEIGHT = HEIGHT - CANOPY_DEPTH
4 | #[derive(Clone, Debug, PartialEq, Eq)]
5 | pub struct IndexedChangelogEntry
6 | where
7 | I: Clone,
8 | {
9 | /// Element that was a subject to the change.
10 | pub element: RawIndexedElement,
11 | /// Merkle proof of that operation.
12 | pub proof: [[u8; 32]; NET_HEIGHT],
13 | /// Index of a changelog entry in `ConcurrentMerkleTree` corresponding to
14 | /// the same operation.
15 | pub changelog_index: usize,
16 | }
17 |
--------------------------------------------------------------------------------
/program-libs/macros/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-macros"
3 | version = "2.0.0"
4 | description = "Macros used in Light Protocol on-chain programs"
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [features]
10 | default = ["solana"]
11 | solana = []
12 | pinocchio = []
13 |
14 | [dependencies]
15 | bs58 = "0.5"
16 | proc-macro2 = { workspace = true }
17 | quote = { workspace = true }
18 | syn = { workspace = true }
19 |
20 | [lib]
21 | proc-macro = true
22 |
--------------------------------------------------------------------------------
/program-libs/macros/README.md:
--------------------------------------------------------------------------------
1 | # light-macros
2 | Set of proc-macros used in Light Protocol
3 |
--------------------------------------------------------------------------------
/program-libs/merkle-tree-metadata/src/events/batch.rs:
--------------------------------------------------------------------------------
1 | use crate::{AnchorDeserialize, AnchorSerialize};
2 |
3 | #[repr(C)]
4 | #[derive(AnchorDeserialize, AnchorSerialize, Debug, PartialEq, Clone, Eq)]
5 | pub struct BatchEvent {
6 | pub merkle_tree_pubkey: [u8; 32],
7 | pub batch_index: u64,
8 | pub zkp_batch_index: u64,
9 | pub zkp_batch_size: u64,
10 | pub old_next_index: u64,
11 | pub new_next_index: u64,
12 | pub new_root: [u8; 32],
13 | pub root_index: u32,
14 | pub sequence_number: u64,
15 | pub output_queue_pubkey: Option<[u8; 32]>,
16 | }
17 |
--------------------------------------------------------------------------------
/program-libs/merkle-tree-metadata/src/events/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod batch;
2 | pub mod concurrent;
3 |
4 | use batch::BatchEvent;
5 | use concurrent::*;
6 |
7 | use crate::{AnchorDeserialize, AnchorSerialize};
8 |
9 | #[derive(AnchorDeserialize, AnchorSerialize, Debug, PartialEq)]
10 | #[repr(C)]
11 | pub enum MerkleTreeEvent {
12 | V1(ChangelogEvent),
13 | V2(NullifierEvent),
14 | V3(IndexedMerkleTreeEvent),
15 | BatchAppend(BatchEvent),
16 | BatchNullify(BatchEvent),
17 | BatchAddressAppend(BatchEvent),
18 | }
19 |
--------------------------------------------------------------------------------
/program-libs/merkle-tree-metadata/src/utils.rs:
--------------------------------------------------------------------------------
1 | pub fn if_equals_zero_u64(value: u64) -> Option {
2 | if value == 0 {
3 | None
4 | } else {
5 | Some(value)
6 | }
7 | }
8 |
9 | pub fn if_equals_none(value: T, default: T) -> Option
10 | where
11 | T: PartialEq,
12 | {
13 | if value == default {
14 | None
15 | } else {
16 | Some(value)
17 | }
18 | }
19 |
20 | #[test]
21 | fn test_if_equals_zero_u64() {
22 | assert_eq!(if_equals_zero_u64(0), None);
23 | assert_eq!(if_equals_zero_u64(1), Some(1));
24 | }
25 |
26 | #[test]
27 | fn test_if_equals_none() {
28 | assert_eq!(if_equals_none(0, 0), None);
29 | assert_eq!(if_equals_none(1, 0), Some(1));
30 | }
31 |
--------------------------------------------------------------------------------
/program-libs/verifier/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | *.r1cs
3 | *.sym
4 |
--------------------------------------------------------------------------------
/program-libs/zero-copy/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-zero-copy"
3 | version = "0.2.0"
4 | description = "Zero copy vector and utils for Solana programs."
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [features]
10 | default = []
11 | solana = ["solana-program-error"]
12 | pinocchio = ["dep:pinocchio"]
13 | std = []
14 |
15 | [dependencies]
16 | solana-program-error = { workspace = true, optional = true }
17 | pinocchio = { workspace = true, optional = true }
18 | thiserror = { workspace = true }
19 | zerocopy = { workspace = true }
20 |
21 | [dev-dependencies]
22 | rand = { workspace = true }
23 | zerocopy = { workspace = true, features = ["derive"] }
24 |
--------------------------------------------------------------------------------
/program-libs/zero-copy/src/lib.rs:
--------------------------------------------------------------------------------
1 | #![no_std]
2 |
3 | pub mod cyclic_vec;
4 | pub mod errors;
5 | #[cfg(feature = "std")]
6 | pub mod num_trait;
7 | pub mod slice;
8 | pub mod slice_mut;
9 | pub mod vec;
10 | use core::mem::{align_of, size_of};
11 | #[cfg(feature = "std")]
12 | pub mod borsh;
13 |
14 | use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
15 |
16 | #[cfg(feature = "std")]
17 | extern crate std;
18 |
19 | pub fn add_padding(offset: &mut usize) {
20 | let padding = align_of::().saturating_sub(size_of::());
21 | *offset += padding;
22 | }
23 | pub trait ZeroCopyTraits: Copy + KnownLayout + Immutable + FromBytes + IntoBytes {}
24 |
25 | impl ZeroCopyTraits for T where T: Copy + KnownLayout + Immutable + FromBytes + IntoBytes {}
26 |
--------------------------------------------------------------------------------
/program-tests/account-compression-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/account-compression-test/src/lib.rs:
--------------------------------------------------------------------------------
1 | // placeholder
2 |
--------------------------------------------------------------------------------
/program-tests/client-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/client-test/src/lib.rs:
--------------------------------------------------------------------------------
1 | // Placeholder
2 |
--------------------------------------------------------------------------------
/program-tests/compressed-token-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/compressed-token-test/src/lib.rs:
--------------------------------------------------------------------------------
1 | // placeholder
2 |
--------------------------------------------------------------------------------
/program-tests/create-address-test-program/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/e2e-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/e2e-test/src/lib.rs:
--------------------------------------------------------------------------------
1 | // placeholder
2 |
--------------------------------------------------------------------------------
/program-tests/merkle-tree/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-merkle-tree-reference"
3 | version = "2.0.0"
4 | description = "Non-sparse reference Merkle tree implementation"
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 |
10 | [dependencies]
11 | light-hasher = { workspace = true }
12 | thiserror = { workspace = true }
13 | num-bigint = { workspace = true }
14 | num-traits = { workspace = true }
15 | light-indexed-array = { workspace = true }
16 |
17 | [dev-dependencies]
18 | rand = { workspace = true }
19 |
--------------------------------------------------------------------------------
/program-tests/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@lightprotocol/program-tests",
3 | "version": "0.1.0",
4 | "license": "Apache-2.0",
5 | "description": "Test programs for Light Protocol uses test-sbf to build because build-sbf -- -p creates an infinite loop.",
6 | "scripts": {
7 | "build": "cargo test-sbf -p create-address-test-program"
8 | },
9 | "nx": {
10 | "targets": {
11 | "build": {
12 | "outputs": [
13 | "{workspaceRoot}/target/deploy"
14 | ]
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/program-tests/registry-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/registry-test/src/lib.rs:
--------------------------------------------------------------------------------
1 | // placeholder
2 |
--------------------------------------------------------------------------------
/program-tests/sdk-anchor-test/.gitignore:
--------------------------------------------------------------------------------
1 | .anchor
2 | .DS_Store
3 | target
4 | **/*.rs.bk
5 | node_modules
6 | test-ledger
7 | .yarn
8 |
--------------------------------------------------------------------------------
/program-tests/sdk-anchor-test/.prettierignore:
--------------------------------------------------------------------------------
1 |
2 | .anchor
3 | .DS_Store
4 | target
5 | node_modules
6 | dist
7 | build
8 | test-ledger
9 |
--------------------------------------------------------------------------------
/program-tests/sdk-anchor-test/Anchor.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 |
3 | [features]
4 | seeds = false
5 | skip-lint = false
6 |
7 | [programs.localnet]
8 | sdk_test = "2tzfijPBGbrR5PboyFUFKzfEoLTwdDSHUjANCw929wyt"
9 |
10 | [registry]
11 | url = "https://api.apr.dev"
12 |
13 | [provider]
14 | cluster = "Localnet"
15 | wallet = "~/.config/solana/id.json"
16 |
17 | [scripts]
18 | test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
19 |
--------------------------------------------------------------------------------
/program-tests/sdk-anchor-test/README.md:
--------------------------------------------------------------------------------
1 | # SDK test program
2 |
--------------------------------------------------------------------------------
/program-tests/sdk-anchor-test/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "test": "cargo test-sbf -p sdk-test"
4 | },
5 | "dependencies": {
6 | "@coral-xyz/anchor": "^0.29.0"
7 | },
8 | "devDependencies": {
9 | "@lightprotocol/zk-compression-cli": "workspace:*",
10 |
11 | "chai": "^5.2.0",
12 | "mocha": "^11.5.0",
13 | "ts-mocha": "^11.1.0",
14 | "@types/bn.js": "^5.1.6",
15 | "@types/chai": "^5.0.1",
16 | "@types/mocha": "^10.0.7",
17 | "typescript": "^5.7.2",
18 | "prettier": "^3.4.2"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/program-tests/sdk-anchor-test/programs/sdk-anchor-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/sdk-anchor-test/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "types": ["mocha", "chai"],
4 | "typeRoots": ["./node_modules/@types"],
5 | "lib": ["es2015"],
6 | "module": "commonjs",
7 | "target": "es6",
8 | "esModuleInterop": true
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/program-tests/sdk-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/system-cpi-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/system-cpi-v2-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/system-cpi-v2-test/src/lib.rs:
--------------------------------------------------------------------------------
1 | // placeholder
2 |
--------------------------------------------------------------------------------
/program-tests/system-test/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/program-tests/system-test/src/lib.rs:
--------------------------------------------------------------------------------
1 | // placeholder
2 |
--------------------------------------------------------------------------------
/programs/account-compression/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/programs/account-compression/src/instructions/generic.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::prelude::*;
2 |
3 | #[derive(Accounts)]
4 | pub struct GenericInstruction<'info> {
5 | pub authority: Signer<'info>,
6 | }
7 |
--------------------------------------------------------------------------------
/programs/account-compression/src/instructions/initialize_group_authority.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::{prelude::*, solana_program::pubkey::Pubkey};
2 |
3 | use crate::{state::GroupAuthority, utils::constants::GROUP_AUTHORITY_SEED};
4 |
5 | #[derive(Accounts)]
6 | pub struct InitializeGroupAuthority<'info> {
7 | #[account(mut)]
8 | pub authority: Signer<'info>,
9 | /// Seed public key used to derive the group authority.
10 | pub seed: Signer<'info>,
11 | #[account(
12 | init,
13 | payer = authority,
14 | seeds = [GROUP_AUTHORITY_SEED, seed.key().to_bytes().as_slice()],
15 | bump,
16 | space = GroupAuthority::LEN,
17 | )]
18 | pub group_authority: Account<'info, GroupAuthority>,
19 | pub system_program: Program<'info, System>,
20 | }
21 |
--------------------------------------------------------------------------------
/programs/account-compression/src/instructions/update_group_authority.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::{prelude::*, solana_program::pubkey::Pubkey};
2 |
3 | use crate::GroupAuthority;
4 |
5 | #[derive(Accounts)]
6 | pub struct UpdateGroupAuthority<'info> {
7 | pub authority: Signer<'info>,
8 | #[account(
9 | mut,
10 | constraint = group_authority.authority == *authority.key,
11 | )]
12 | pub group_authority: Account<'info, GroupAuthority>,
13 | }
14 |
15 | pub fn set_group_authority(
16 | group_authority: &mut Account<'_, GroupAuthority>,
17 | authority: Pubkey,
18 | seed: Option,
19 | ) -> Result<()> {
20 | group_authority.authority = authority;
21 | if let Some(seed) = seed {
22 | group_authority.seed = seed;
23 | }
24 | Ok(())
25 | }
26 |
--------------------------------------------------------------------------------
/programs/account-compression/src/processor/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod initialize_address_merkle_tree;
2 | pub mod initialize_address_queue;
3 | pub mod initialize_concurrent_merkle_tree;
4 | pub mod initialize_nullifier_queue;
5 | pub mod insert_addresses;
6 | pub mod insert_into_queues;
7 | pub mod insert_leaves;
8 | pub mod insert_nullifiers;
9 |
--------------------------------------------------------------------------------
/programs/account-compression/src/state/change_log_event.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::{
2 | prelude::*,
3 | solana_program::{instruction::Instruction, program::invoke},
4 | };
5 |
6 | use crate::{errors::AccountCompressionErrorCode, utils::constants::NOOP_PUBKEY};
7 |
8 | #[inline(never)]
9 | pub fn emit_indexer_event(data: Vec, noop_program: &AccountInfo) -> Result<()> {
10 | if noop_program.key() != Pubkey::new_from_array(NOOP_PUBKEY) || !noop_program.executable {
11 | return err!(AccountCompressionErrorCode::InvalidNoopPubkey);
12 | }
13 | let instruction = Instruction {
14 | program_id: noop_program.key(),
15 | accounts: vec![],
16 | data,
17 | };
18 | invoke(&instruction, &[noop_program.to_account_info()])?;
19 | Ok(())
20 | }
21 |
--------------------------------------------------------------------------------
/programs/account-compression/src/state/group_authority.rs:
--------------------------------------------------------------------------------
1 | use aligned_sized::aligned_sized;
2 | use anchor_lang::{prelude::*, solana_program::pubkey::Pubkey};
3 |
4 | #[account]
5 | #[aligned_sized(anchor)]
6 | #[derive(Debug)]
7 | pub struct GroupAuthority {
8 | pub authority: Pubkey,
9 | pub seed: Pubkey,
10 | }
11 |
--------------------------------------------------------------------------------
/programs/account-compression/src/state/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod address;
2 | pub use address::*;
3 |
4 | pub mod public_state_merkle_tree;
5 | pub use public_state_merkle_tree::*;
6 |
7 | pub mod change_log_event;
8 | pub use change_log_event::*;
9 |
10 | pub mod queue;
11 | pub use queue::*;
12 |
13 | pub mod group_authority;
14 | pub use group_authority::*;
15 |
--------------------------------------------------------------------------------
/programs/account-compression/src/utils/check_discriminator.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::{error::ErrorCode, Owner, Result, ZeroCopy};
2 |
3 | pub fn check_discriminator(data: &[u8]) -> Result<()> {
4 | if &data[..8] != T::DISCRIMINATOR {
5 | return Err(ErrorCode::AccountDiscriminatorMismatch.into());
6 | }
7 | Ok(())
8 | }
9 |
--------------------------------------------------------------------------------
/programs/account-compression/src/utils/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod check_discriminator;
2 | pub mod check_signer_is_registered_or_authority;
3 | pub mod constants;
4 | pub mod queue;
5 | pub mod transfer_lamports;
6 |
--------------------------------------------------------------------------------
/programs/compressed-token/README.md:
--------------------------------------------------------------------------------
1 | # Compressed Token Program
2 |
3 | A token program on the Solana blockchain using ZK Compression.
4 |
5 | This program provides an interface and implementation that third parties can utilize to create and use compressed tokens on Solana.
6 |
7 | Documentation is available at https://zkcompression.com
8 |
9 | Source code: https://github.com/Lightprotocol/light-protocol/tree/main/programs/compressed-token
10 |
11 | ## Audit
12 |
13 | This code is unaudited. Use at your own risk.
14 |
--------------------------------------------------------------------------------
/programs/compressed-token/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/programs/compressed-token/src/constants.rs:
--------------------------------------------------------------------------------
1 | // 2 in little endian
2 | pub const TOKEN_COMPRESSED_ACCOUNT_DISCRIMINATOR: [u8; 8] = [2, 0, 0, 0, 0, 0, 0, 0];
3 | pub const BUMP_CPI_AUTHORITY: u8 = 254;
4 | pub const NOT_FROZEN: bool = false;
5 | pub const POOL_SEED: &[u8] = b"pool";
6 |
7 | /// Maximum number of pool accounts that can be created for each mint.
8 | pub const NUM_MAX_POOL_ACCOUNTS: u8 = 5;
9 |
--------------------------------------------------------------------------------
/programs/compressed-token/src/instructions/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod burn;
2 | pub mod create_token_pool;
3 | pub mod freeze;
4 | pub mod generic;
5 | pub mod transfer;
6 |
7 | pub use burn::*;
8 | pub use create_token_pool::*;
9 | pub use freeze::*;
10 | pub use generic::*;
11 | pub use transfer::*;
12 |
--------------------------------------------------------------------------------
/programs/registry/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/programs/registry/src/account_compression_cpi/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod batch_append;
2 | pub mod batch_nullify;
3 | pub mod batch_update_address_tree;
4 | pub mod initialize_batched_address_tree;
5 | pub mod initialize_batched_state_tree;
6 | pub mod initialize_tree_and_queue;
7 | pub mod migrate_state;
8 | pub mod nullify;
9 | pub mod register_program;
10 | pub mod rollover_batched_address_tree;
11 | pub mod rollover_batched_state_tree;
12 | pub mod rollover_state_tree;
13 | pub mod sdk;
14 | pub mod update_address_tree;
15 |
--------------------------------------------------------------------------------
/programs/registry/src/constants.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::prelude::*;
2 | #[constant]
3 | pub const FORESTER_SEED: &[u8] = b"forester";
4 |
5 | #[constant]
6 | pub const FORESTER_EPOCH_SEED: &[u8] = b"forester_epoch";
7 |
8 | #[constant]
9 | pub const PROTOCOL_CONFIG_PDA_SEED: &[u8] = b"authority";
10 |
11 | #[constant]
12 | pub const DEFAULT_WORK_V1: u64 = 1;
13 |
--------------------------------------------------------------------------------
/programs/registry/src/epoch/finalize_registration.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::prelude::*;
2 |
3 | use crate::{EpochPda, ForesterEpochPda};
4 |
5 | #[derive(Accounts)]
6 | pub struct FinalizeRegistration<'info> {
7 | pub authority: Signer<'info>,
8 | #[account(mut,has_one = authority)]
9 | pub forester_epoch_pda: Account<'info, ForesterEpochPda>,
10 | /// CHECK: instruction checks that the epoch is the current epoch.
11 | #[account(constraint = epoch_pda.epoch == forester_epoch_pda.epoch)]
12 | pub epoch_pda: Account<'info, EpochPda>,
13 | }
14 |
--------------------------------------------------------------------------------
/programs/registry/src/epoch/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod finalize_registration;
2 | pub mod register_epoch;
3 | pub mod report_work;
4 |
--------------------------------------------------------------------------------
/programs/registry/src/protocol_config/initialize.rs:
--------------------------------------------------------------------------------
1 | use anchor_lang::prelude::*;
2 |
3 | use crate::{
4 | constants::PROTOCOL_CONFIG_PDA_SEED, program::LightRegistry,
5 | protocol_config::state::ProtocolConfigPda,
6 | };
7 |
8 | #[derive(Accounts)]
9 | #[instruction(bump: u8)]
10 | pub struct InitializeProtocolConfig<'info> {
11 | #[account(mut)]
12 | pub fee_payer: Signer<'info>,
13 | pub authority: Signer<'info>,
14 | #[account(init, seeds = [PROTOCOL_CONFIG_PDA_SEED], bump, space = ProtocolConfigPda::LEN, payer = fee_payer)]
15 | pub protocol_config_pda: Account<'info, ProtocolConfigPda>,
16 | pub system_program: Program<'info, System>,
17 | pub self_program: Program<'info, LightRegistry>,
18 | }
19 |
--------------------------------------------------------------------------------
/programs/registry/src/protocol_config/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod initialize;
2 | pub mod state;
3 | pub mod update;
4 |
--------------------------------------------------------------------------------
/programs/registry/src/selection/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod forester;
2 |
--------------------------------------------------------------------------------
/programs/system/README.md:
--------------------------------------------------------------------------------
1 | # System program
2 |
3 | The Light Protocol system program, usable for ZK Compression on Solana.
4 |
5 | Documentation is available at https://zkcompression.com
6 |
7 | Source code: https://github.com/Lightprotocol/light-protocol/tree/main/programs/system
8 |
9 | ## Audit
10 |
11 | This code is unaudited. Use at your own risk.
12 |
--------------------------------------------------------------------------------
/programs/system/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/programs/system/src/account_compression_state/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod address;
2 | pub mod queue;
3 | pub mod state;
4 |
--------------------------------------------------------------------------------
/programs/system/src/account_compression_state/queue.rs:
--------------------------------------------------------------------------------
1 | use aligned_sized::aligned_sized;
2 | use bytemuck::{Pod, Zeroable};
3 | use light_merkle_tree_metadata::queue::QueueMetadata;
4 |
5 | #[repr(C)]
6 | #[aligned_sized(anchor)]
7 | #[derive(Pod, Debug, Default, Zeroable, Clone, Copy)]
8 | pub struct QueueAccount {
9 | pub metadata: QueueMetadata,
10 | }
11 |
--------------------------------------------------------------------------------
/programs/system/src/accounts/account_traits.rs:
--------------------------------------------------------------------------------
1 | use pinocchio::account_info::AccountInfo;
2 |
3 | pub trait InvokeAccounts<'info> {
4 | fn get_registered_program_pda(&self) -> &'info AccountInfo;
5 | fn get_account_compression_authority(&self) -> &'info AccountInfo;
6 | fn get_sol_pool_pda(&self) -> Option<&'info AccountInfo>;
7 | fn get_decompression_recipient(&self) -> Option<&'info AccountInfo>;
8 | }
9 |
10 | pub trait CpiContextAccountTrait<'info> {
11 | fn get_cpi_context_account(&self) -> Option<&'info AccountInfo>;
12 | }
13 |
14 | pub trait SignerAccounts<'info> {
15 | fn get_fee_payer(&self) -> &'info AccountInfo;
16 | fn get_authority(&self) -> &'info AccountInfo;
17 | }
18 |
--------------------------------------------------------------------------------
/programs/system/src/accounts/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod account_checks;
2 | pub mod account_traits;
3 | pub mod init_context_account;
4 | pub mod mode;
5 | pub mod remaining_account_checks;
6 |
--------------------------------------------------------------------------------
/programs/system/src/invoke/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod instruction;
2 | pub mod verify_signer;
3 |
--------------------------------------------------------------------------------
/programs/system/src/invoke_cpi/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod account;
2 | pub mod instruction;
3 |
4 | pub mod instruction_small;
5 | pub mod process_cpi_context;
6 | pub mod processor;
7 | pub mod verify_signer;
8 |
--------------------------------------------------------------------------------
/programs/system/src/processor/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod cpi;
2 | pub mod create_address_cpi_data;
3 | pub mod create_inputs_cpi_data;
4 | pub mod create_outputs_cpi_data;
5 | pub mod process;
6 | pub mod read_only_account;
7 | pub mod read_only_address;
8 | pub mod sol_compression;
9 | pub mod sum_check;
10 | pub mod verify_proof;
11 |
--------------------------------------------------------------------------------
/prover/client/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | *.r1cs
3 | *.sym
4 |
--------------------------------------------------------------------------------
/prover/client/scripts/rapidsnark_bench.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | LOG_FILE="execution_times.log"
4 | echo "Benchmarking started..." >> $LOG_FILE
5 |
6 | for ((i=1; i<10; i++))
7 | do
8 | echo "Running iteration $i"
9 | work_dir="test-data/merkle22_$i"
10 | start_time=$(date +%s%6N)
11 | prover "$work_dir/circuit.zkey" "$work_dir/22_$i.wtns" "$work_dir/proof_merkle22_$i.json" "$work_dir/public_inputs_merkle22_$i.json"
12 | sleep 1
13 | end_time=$(date +%s%6N)
14 | execution_time=$(echo "scale=3; ($end_time - $start_time) / 1000 - 1000" | bc)
15 | echo "Iteration $i took $execution_time milliseconds" >> $LOG_FILE
16 | done
17 |
--------------------------------------------------------------------------------
/prover/client/src/constants.rs:
--------------------------------------------------------------------------------
1 | pub const SERVER_ADDRESS: &str = "http://localhost:3001";
2 | pub const HEALTH_CHECK: &str = "/health";
3 | pub const PROVE_PATH: &str = "/prove";
4 |
5 | pub const DEFAULT_BATCH_ADDRESS_TREE_HEIGHT: u32 = 40;
6 |
7 | pub const DEFAULT_BATCH_STATE_TREE_HEIGHT: u32 = 32;
8 |
9 | pub const DEFAULT_V1_TREE_HEIGHT: u32 = 26;
10 |
--------------------------------------------------------------------------------
/prover/client/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod constants;
2 | pub mod errors;
3 | pub mod helpers;
4 | pub mod proof;
5 | pub mod proof_client;
6 | pub mod proof_type;
7 | pub mod proof_types;
8 | pub mod prover;
9 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/batch_address_append/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/batch_append/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/batch_update/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/combined/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod v1;
2 | pub mod v2;
3 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/combined/v1/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/combined/v1/proof_inputs.rs:
--------------------------------------------------------------------------------
1 | use crate::proof_types::{
2 | inclusion::v2::InclusionProofInputs, non_inclusion::v1::NonInclusionProofInputs,
3 | };
4 |
5 | #[derive(Clone, Debug)]
6 | pub struct CombinedProofInputs<'a> {
7 | pub inclusion_parameters: InclusionProofInputs<'a>,
8 | pub non_inclusion_parameters: NonInclusionProofInputs<'a>,
9 | }
10 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/combined/v2/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/inclusion/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod v1;
2 | pub mod v2;
3 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/inclusion/v1/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/inclusion/v2/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/merkle_tree_info.rs:
--------------------------------------------------------------------------------
1 | use std::fmt;
2 |
3 | #[derive(Clone, Debug)]
4 | pub enum MerkleTreeInfo {
5 | H26,
6 | H32,
7 | }
8 |
9 | impl MerkleTreeInfo {
10 | pub fn height(&self) -> u8 {
11 | match self {
12 | MerkleTreeInfo::H26 => 26,
13 | MerkleTreeInfo::H32 => 32,
14 | }
15 | }
16 | }
17 |
18 | impl fmt::Display for MerkleTreeInfo {
19 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
20 | write!(f, "{}", self.height())
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod batch_address_append;
2 | pub mod batch_append;
3 | pub mod batch_update;
4 | pub mod circuit_type;
5 | pub mod combined;
6 | pub mod inclusion;
7 | pub mod merkle_tree_info;
8 | pub mod non_inclusion;
9 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/non_inclusion/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod v1;
2 | pub mod v2;
3 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/non_inclusion/v1/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/src/proof_types/non_inclusion/v2/mod.rs:
--------------------------------------------------------------------------------
1 | mod json;
2 | mod proof_inputs;
3 |
4 | pub use json::*;
5 | pub use proof_inputs::*;
6 |
--------------------------------------------------------------------------------
/prover/client/tests/utils/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod init_merkle_tree;
2 | pub use init_merkle_tree::*;
3 |
--------------------------------------------------------------------------------
/prover/server/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea
3 | out
4 | light-prover
5 | light-prover.exe
6 | formal-verification/build
7 | formal-verification/.cache
8 | formal-verification/lean-packages/*
9 | formal-verification/lake-packages/*
10 | !formal-verification/lake-manifest.json
11 |
12 | inputs_*
13 | log.txt
14 |
15 | *.bin
16 |
17 | circuits
18 | proving-keys
19 |
--------------------------------------------------------------------------------
/prover/server/Dockerfile.light:
--------------------------------------------------------------------------------
1 | FROM golang:1.20.3-alpine AS builder
2 |
3 | WORKDIR /app
4 |
5 | COPY go.mod go.sum ./
6 | RUN go mod download && go mod verify
7 |
8 | COPY . .
9 |
10 | ENV CGO_ENABLED=0
11 | RUN go build -v -o /usr/local/bin/light-prover .
12 |
13 | RUN mkdir -p /tmp/empty_proving_keys
14 |
15 | FROM gcr.io/distroless/base-debian11:nonroot
16 |
17 | COPY --from=builder /usr/local/bin/light-prover /usr/local/bin/light-prover
18 |
19 | WORKDIR /proving-keys
20 |
21 | COPY --chown=nonroot:nonroot --from=builder /tmp/empty_proving_keys /proving-keys/
22 |
23 | WORKDIR /
24 |
25 | ENTRYPOINT [ "light-prover" ]
26 | CMD [ "start" ]
27 |
--------------------------------------------------------------------------------
/prover/server/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | redis:
3 | image: redis:7.4.4-alpine3.21
4 | container_name: redis
5 | ports:
6 | - "6379:6379"
7 | restart: unless-stopped
8 |
9 | prover:
10 | image: sergeytimoshin/prover-light:1.0.0
11 | container_name: prover
12 | ports:
13 | - "3001:3001"
14 | volumes:
15 | - ./proving-keys:/proving-keys/:ro
16 | command: >
17 | start
18 | --run-mode forester-test
19 | --redis-url=redis://redis:6379
20 | depends_on:
21 | - redis
22 | restart: unless-stopped
23 |
--------------------------------------------------------------------------------
/prover/server/formal-verification/.gitignore:
--------------------------------------------------------------------------------
1 | lakefile.olean
2 | .lake
3 |
--------------------------------------------------------------------------------
/prover/server/formal-verification/lean-toolchain:
--------------------------------------------------------------------------------
1 | leanprover/lean4:v4.16.0-rc2
--------------------------------------------------------------------------------
/prover/server/logging/logger.go:
--------------------------------------------------------------------------------
1 | package logging
2 |
3 | import (
4 | gnarkLogger "github.com/consensys/gnark/logger"
5 | "github.com/rs/zerolog"
6 | "os"
7 | )
8 |
9 | var log = zerolog.New(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: "15:04:05"}).With().Timestamp().Logger()
10 |
11 | func Logger() *zerolog.Logger {
12 | return &log
13 | }
14 |
15 | func SetJSONOutput() {
16 | log = zerolog.New(os.Stdout).With().Timestamp().Logger()
17 | gnarkLogger.Set(log)
18 | }
19 |
--------------------------------------------------------------------------------
/prover/server/scripts/server.sh:
--------------------------------------------------------------------------------
1 | # install goexec: go install github.com/shurcooL/goexec
2 | goexec 'http.ListenAndServe(`:8080`, http.FileServer(http.Dir(`.`)))'
--------------------------------------------------------------------------------
/prover/server/scripts/stress_load.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | PROVER_ADDRESS="localhost:3001"
4 | DURATION="60s"
5 | RATE="30/1s"
6 | TARGETS_FILE="targets.txt"
7 | BASE_OUTPUT_FILE="results_${DURATION}"
8 |
9 | if [ -e "${BASE_OUTPUT_FILE}*" ]; then
10 | rm ${BASE_OUTPUT_FILE}*
11 | fi
12 |
13 | echo "POST http://$PROVER_ADDRESS/inclusion" | vegeta attack -duration=$DURATION -rate $RATE -targets=$TARGETS_FILE | tee $BASE_OUTPUT_FILE.bin | vegeta report
14 |
15 | vegeta report $BASE_OUTPUT_FILE.bin >> $BASE_OUTPUT_FILE.txt
16 | vegeta report -type="hist[0,10ms,20ms,30ms,40ms,50ms,60ms,70ms,80ms,90ms,100ms,110ms,120ms,130ms,140ms,150ms,160ms,170ms,180ms,190ms,200ms]" $BASE_OUTPUT_FILE.bin >> $BASE_OUTPUT_FILE.txt
17 | vegeta plot -title=Results $BASE_OUTPUT_FILE.bin > $BASE_OUTPUT_FILE.html
18 |
--------------------------------------------------------------------------------
/prover/server/scripts/targets.txt:
--------------------------------------------------------------------------------
1 | POST http://localhost:3001/inclusion
2 | @inclusion_26_1.json
3 |
--------------------------------------------------------------------------------
/rust-toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | channel = "1.86"
3 |
--------------------------------------------------------------------------------
/rustfmt.toml:
--------------------------------------------------------------------------------
1 | imports_granularity = "Crate"
2 | group_imports = "StdExternalCrate"
3 | reorder_imports = true
4 |
--------------------------------------------------------------------------------
/scripts/build-verifiable.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Builds the verifiable solana-verify crate
4 | solana-verify build --library-name account_compression &&\
5 | solana-verify build --library-name light_compressed_token &&\
6 | solana-verify build --library-name light_system_program &&\
7 | solana-verify build --library-name light_registry
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | command -v pnpm >/dev/null 2>&1 || { echo >&2 "pnpm is not installed. Aborting."; exit 1; }
4 | command -v npx >/dev/null 2>&1 || { echo >&2 "npx is not installed. Aborting."; exit 1; }
5 |
6 | . "./scripts/devenv.sh" || { echo >&2 "Failed to source devenv.sh. Aborting."; exit 1; }
7 |
8 | set -eux
9 |
10 | pnpm install || { echo >&2 "Failed to install dependencies. Aborting."; exit 1; }
11 |
12 | if [ ! -f target/deploy/spl_noop.so ]; then
13 | mkdir -p target/deploy && cp third-party/solana-program-library/spl_noop.so target/deploy
14 | fi
15 |
16 | npx nx run-many --target=build --all
17 |
18 | echo "Build process completed successfully."
19 |
--------------------------------------------------------------------------------
/scripts/clean.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | find . -type d -name "test-ledger" -exec sh -c 'echo "Deleting {}"; rm -rf "{}"' \;
4 |
5 | npx nx reset
--------------------------------------------------------------------------------
/scripts/coverage.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | . "./scripts/devenv.sh" || { echo >&2 "Failed to source devenv.sh. Aborting."; exit 1; }
4 |
5 | set -eux
6 |
7 | export RUST_MIN_STACK=8388608
8 | export RUSTFLAGS="-D warnings"
9 |
10 | ROOT_DIR=$(git rev-parse --show-toplevel)
11 |
12 | cargo llvm-cov \
13 | --all-targets --workspace \
14 | --exclude light-concurrent-merkle-tree \
15 | --exclude photon-api \
16 | --exclude forester \
17 | --html \
18 | --output-dir "${ROOT_DIR}/target/llvm-cov" \
19 | --open
20 | cargo llvm-cov \
21 | --all-targets \
22 | --package light-concurrent-merkle-tree \
23 | --html \
24 | --output-dir "${ROOT_DIR}/target/llvm-cov-cmt" \
25 | --open
26 |
--------------------------------------------------------------------------------
/scripts/getAccountState.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # run this to regenerate the following accounts:
4 | # merkle_tree_pubkey
5 | # nullifier_queue_pubkey
6 | # governance_authority_pda
7 | # group_pda
8 | #
9 | # to add more accounts to regenerate, add them to setup_test_programs_with_accounts and test script
10 | cd program-tests/system-test && cargo test-sbf regenerate_accounts -- --ignored --nocapture && cd -
11 |
--------------------------------------------------------------------------------
/scripts/lint.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | npx nx run-many --target=format:check --all
5 | npx nx run-many --target=lint --all
6 |
7 | cargo +nightly fmt --all -- --check
8 | cargo clippy --workspace --all-targets --exclude light-system-program-pinocchio -- -D warnings
9 | # We import the same crates with different features in light-system-program-pinocchio than in account-compression
10 | # clippy cannot handle this. -> check light-system-program-pinocchio separately.
11 | cargo clippy --package light-system-program-pinocchio --all-targets -- -D warnings
12 |
--------------------------------------------------------------------------------
/scripts/test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | . "./scripts/devenv.sh" || { echo >&2 "Failed to source devenv.sh. Aborting."; exit 1; }
4 |
5 | set -eux
6 |
7 | npx nx run-many --target=test --all --parallel=false
--------------------------------------------------------------------------------
/sdk-libs/client/src/constants.rs:
--------------------------------------------------------------------------------
1 | use solana_pubkey::{pubkey, Pubkey};
2 |
3 | pub const STATE_TREE_LOOKUP_TABLE_MAINNET: Pubkey =
4 | pubkey!("7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st");
5 | pub const NULLIFIED_STATE_TREE_LOOKUP_TABLE_MAINNET: Pubkey =
6 | pubkey!("H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT");
7 |
8 | pub const STATE_TREE_LOOKUP_TABLE_DEVNET: Pubkey =
9 | pubkey!("8n8rH2bFRVA6cSGNDpgqcKHCndbFCT1bXxAQG89ejVsh");
10 | pub const NULLIFIED_STATE_TREE_LOOKUP_TABLE_DEVNET: Pubkey =
11 | pubkey!("5dhaJLBjnVBQFErr8oiCJmcVsx3Zj6xDekGB2zULPsnP");
12 |
--------------------------------------------------------------------------------
/sdk-libs/client/src/indexer/config.rs:
--------------------------------------------------------------------------------
1 | #[derive(Debug, Clone, PartialEq, Default)]
2 | pub struct IndexerRpcConfig {
3 | pub slot: u64,
4 | pub retry_config: RetryConfig,
5 | }
6 | impl IndexerRpcConfig {
7 | pub fn new(slot: u64) -> Self {
8 | Self {
9 | slot,
10 | retry_config: RetryConfig::default(),
11 | }
12 | }
13 | }
14 |
15 | #[derive(Debug, Clone, PartialEq)]
16 | pub struct RetryConfig {
17 | pub num_retries: u32,
18 | pub delay_ms: u64,
19 | pub max_delay_ms: u64,
20 | }
21 |
22 | impl Default for RetryConfig {
23 | fn default() -> Self {
24 | Self {
25 | num_retries: 10,
26 | delay_ms: 400,
27 | max_delay_ms: 8000,
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/sdk-libs/client/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod constants;
2 | pub mod fee;
3 | pub mod indexer;
4 | pub mod local_test_validator;
5 | pub mod rpc;
6 |
7 | /// Reexport for ProverConfig and other types.
8 | pub use light_prover_client;
9 |
--------------------------------------------------------------------------------
/sdk-libs/client/src/rpc/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod client;
2 | pub mod errors;
3 | pub mod indexer;
4 | pub mod merkle_tree;
5 | mod rpc_trait;
6 | pub mod state;
7 |
8 | pub use client::{LightClient, RetryConfig};
9 | pub use errors::RpcError;
10 | pub use rpc_trait::{Rpc, RpcConfig};
11 | pub mod get_light_state_tree_infos;
12 |
--------------------------------------------------------------------------------
/sdk-libs/client/src/rpc/state.rs:
--------------------------------------------------------------------------------
1 | pub use light_merkle_tree_metadata::{
2 | access::AccessMetadata, merkle_tree::MerkleTreeMetadata, rollover::RolloverMetadata,
3 | };
4 |
--------------------------------------------------------------------------------
/sdk-libs/macros/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-sdk-macros"
3 | version = "0.6.0"
4 | description = "Macros for Programs using the Light SDK for ZK Compression "
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [dependencies]
10 | proc-macro2 = { workspace = true }
11 | quote = { workspace = true }
12 | syn = { workspace = true }
13 |
14 | light-hasher = { workspace = true }
15 | ark-bn254 = { workspace = true }
16 | light-poseidon = { workspace = true }
17 |
18 | [dev-dependencies]
19 | light-compressed-account = { workspace = true }
20 | prettyplease = "0.2.29"
21 | solana-pubkey = { workspace = true, features = ["borsh"] }
22 | borsh = { workspace = true }
23 |
24 | [lib]
25 | proc-macro = true
26 |
--------------------------------------------------------------------------------
/sdk-libs/macros/fuzz/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | corpus
3 | artifacts
4 | coverage
5 |
--------------------------------------------------------------------------------
/sdk-libs/macros/src/account.rs:
--------------------------------------------------------------------------------
1 | use proc_macro2::TokenStream;
2 | use quote::quote;
3 | use syn::{ItemStruct, Result};
4 |
5 | pub(crate) fn account(input: ItemStruct) -> Result {
6 | Ok(quote! {
7 | #[derive(
8 | ::anchor_lang::AnchorDeserialize,
9 | ::anchor_lang::AnchorSerialize,
10 | ::light_sdk::LightDiscriminator,
11 | ::light_sdk::LightHasher,
12 | )]
13 | #input
14 | })
15 | }
16 |
--------------------------------------------------------------------------------
/sdk-libs/macros/src/hasher/mod.rs:
--------------------------------------------------------------------------------
1 | mod data_hasher;
2 | mod field_processor;
3 | mod input_validator;
4 | mod light_hasher;
5 | mod to_byte_array;
6 |
7 | pub(crate) use light_hasher::derive_light_hasher;
8 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | **/*.rs.bk
3 | Cargo.lock
4 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/.openapi-generator/VERSION:
--------------------------------------------------------------------------------
1 | 7.5.0
2 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/.travis.yml:
--------------------------------------------------------------------------------
1 | language: rust
2 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "photon-api"
3 | version = "0.50.0"
4 | authors = ["OpenAPI Generator team and contributors"]
5 | description = "Solana indexer for general compression"
6 | license = "Apache-2.0"
7 | edition = "2018"
8 |
9 | [dependencies]
10 | serde = "^1.0"
11 | serde_derive = "^1.0"
12 | serde_with = "^3.12"
13 | serde_json = "^1.0"
14 | url = "^2.2"
15 | uuid = { version = "^1.0", features = ["serde", "v4"] }
16 | [dependencies.reqwest]
17 | version = "^0.12"
18 | features = ["json", "multipart"]
19 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AccountData.md:
--------------------------------------------------------------------------------
1 | # AccountData
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **data** | **String** | A base 64 encoded string. | [default to SGVsbG8sIFdvcmxkIQ==]
8 | **data_hash** | **String** | A 32-byte hash represented as a base58 string. |
9 | **discriminator** | **i32** | | [default to 100]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AccountList.md:
--------------------------------------------------------------------------------
1 | # AccountList
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **items** | [**Vec**](Account.md) | |
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AccountListV2.md:
--------------------------------------------------------------------------------
1 | # AccountListV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **items** | [**Vec**](AccountV2.md) | |
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AccountState.md:
--------------------------------------------------------------------------------
1 | # AccountState
2 |
3 | ## Enum Variants
4 |
5 | | Name | Value |
6 | |---- | -----|
7 | | Initialized | initialized |
8 | | Frozen | frozen |
9 |
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AccountWithContext.md:
--------------------------------------------------------------------------------
1 | # AccountWithContext
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **account** | [**models::Account**](Account.md) | |
8 | **context** | [**models::AccountContext**](AccountContext.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AccountWithOptionalTokenData.md:
--------------------------------------------------------------------------------
1 | # AccountWithOptionalTokenData
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **account** | [**models::Account**](Account.md) | |
8 | **optional_token_data** | Option<[**models::TokenData**](TokenData.md)> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AccountWithOptionalTokenDataV2.md:
--------------------------------------------------------------------------------
1 | # AccountWithOptionalTokenDataV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **account** | [**models::AccountV2**](AccountV2.md) | |
8 | **optional_token_data** | Option<[**models::TokenData**](TokenData.md)> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AddressSeq.md:
--------------------------------------------------------------------------------
1 | # AddressSeq
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **address** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
8 | **seq** | **i32** | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/AddressWithTree.md:
--------------------------------------------------------------------------------
1 | # AddressWithTree
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **address** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
8 | **tree** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/ClosedAccountV2.md:
--------------------------------------------------------------------------------
1 | # ClosedAccountV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **account** | [**models::AccountV2**](AccountV2.md) | |
8 | **nullifier** | **String** | A 32-byte hash represented as a base58 string. |
9 | **tx_hash** | **String** | A 32-byte hash represented as a base58 string. |
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/ClosedAccountWithOptionalTokenDataV2.md:
--------------------------------------------------------------------------------
1 | # ClosedAccountWithOptionalTokenDataV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **account** | [**models::ClosedAccountV2**](ClosedAccountV2.md) | |
8 | **optional_token_data** | Option<[**models::TokenData**](TokenData.md)> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/CompressedProof.md:
--------------------------------------------------------------------------------
1 | # CompressedProof
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **a** | [**std::path::PathBuf**](std::path::PathBuf.md) | |
8 | **b** | [**std::path::PathBuf**](std::path::PathBuf.md) | |
9 | **c** | [**std::path::PathBuf**](std::path::PathBuf.md) | |
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/CompressedProofWithContext.md:
--------------------------------------------------------------------------------
1 | # CompressedProofWithContext
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **compressed_proof** | [**models::CompressedProof**](CompressedProof.md) | |
8 | **leaf_indices** | **Vec** | |
9 | **leaves** | **Vec** | |
10 | **merkle_trees** | **Vec** | |
11 | **root_indices** | **Vec** | |
12 | **roots** | **Vec** | |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/CompressedProofWithContextV2.md:
--------------------------------------------------------------------------------
1 | # CompressedProofWithContextV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **compressed_proof** | Option<[**models::CompressedProof**](CompressedProof.md)> | | [optional]
8 | **leaf_indices** | **Vec** | |
9 | **leaves** | **Vec** | |
10 | **merkle_contexts** | [**Vec**](MerkleContextV2.md) | |
11 | **root_indices** | [**Vec**](RootIndex.md) | |
12 | **roots** | **Vec** | |
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/CompressionInfoV2.md:
--------------------------------------------------------------------------------
1 | # CompressionInfoV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **closed_accounts** | [**Vec**](ClosedAccountWithOptionalTokenDataV2.md) | |
8 | **opened_accounts** | [**Vec**](AccountWithOptionalTokenDataV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/Context.md:
--------------------------------------------------------------------------------
1 | # Context
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **slot** | **i32** | | [default to 100]
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/DataSlice.md:
--------------------------------------------------------------------------------
1 | # DataSlice
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **length** | **u32** | |
8 | **offset** | **u32** | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/FilterSelector.md:
--------------------------------------------------------------------------------
1 | # FilterSelector
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **memcmp** | Option<[**models::Memcmp**](Memcmp.md)> | | [optional]
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200ResponseError.md:
--------------------------------------------------------------------------------
1 | # GetBatchAddressUpdateInfoPost200ResponseError
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **code** | Option<**i32**> | | [optional]
8 | **message** | Option<**String**> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetBatchAddressUpdateInfoPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **addresses** | [**Vec**](AddressSeq.md) | |
8 | **context** | [**models::Context**](Context.md) | |
9 | **non_inclusion_proofs** | [**Vec**](MerkleContextWithNewAddressProof.md) | |
10 | **start_index** | **i32** | |
11 | **subtrees** | [**Vec**](std::path::PathBuf.md) | |
12 |
13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14 |
15 |
16 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPost429Response.md:
--------------------------------------------------------------------------------
1 | # GetBatchAddressUpdateInfoPost429Response
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional]
8 | **id** | Option<**String**> | | [optional]
9 | **jsonrpc** | Option<**String**> | | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetBatchAddressUpdateInfoPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetBatchAddressUpdateInfoPostRequestParams**](_getBatchAddressUpdateInfo_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetBatchAddressUpdateInfoPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetBatchAddressUpdateInfoPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **batch_size** | **i32** | |
8 | **tree** | **String** | A 32-byte hash represented as a base58 string. |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountBalancePost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountBalancePost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | **i32** | | [default to 100]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountBalancePostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountBalancePostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountPostRequestParams**](_getCompressedAccount_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | Option<[**models::Account**](Account.md)> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountPostRequestParams**](_getCompressedAccount_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **address** | Option<**String**> | A Solana public key represented as a base58 string. | [optional]
8 | **hash** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountProofPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountProofPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::GetCompressedAccountProofResponseValue**](GetCompressedAccountProofResponseValue.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountProofPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountProofPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountProofPostRequestParams**](_getCompressedAccountProof_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountProofPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountProofPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **hash** | **String** | A 32-byte hash represented as a base58 string. |
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountProofResponseValueV2.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountProofResponseValueV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **hash** | **String** | A 32-byte hash represented as a base58 string. |
8 | **leaf_index** | **i32** | |
9 | **proof** | **Vec** | |
10 | **prove_by_index** | **bool** | |
11 | **root** | **String** | A 32-byte hash represented as a base58 string. |
12 | **root_seq** | **i32** | |
13 | **tree_context** | [**models::TreeContextInfo**](TreeContextInfo.md) | |
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountProofV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountProofV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::GetCompressedAccountProofResponseValueV2**](GetCompressedAccountProofResponseValueV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountProofV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountProofV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountProofPostRequestParams**](_getCompressedAccountProof_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | Option<[**models::AccountV2**](AccountV2.md)> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountPostRequestParams**](_getCompressedAccount_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountsByOwnerPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::PaginatedAccountList**](PaginatedAccountList.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountsByOwnerPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountsByOwnerPostRequestParams**](_getCompressedAccountsByOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountsByOwnerV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::PaginatedAccountListV2**](PaginatedAccountListV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedAccountsByOwnerV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedAccountsByOwnerV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountsByOwnerPostRequestParams**](_getCompressedAccountsByOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedBalanceByOwnerPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedBalanceByOwnerPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedBalanceByOwnerPostRequestParams**](_getCompressedBalanceByOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedBalanceByOwnerPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetCompressedBalanceByOwnerPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **owner** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedMintTokenHoldersPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::OwnerBalanceList**](OwnerBalanceList.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedMintTokenHoldersPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedMintTokenHoldersPostRequestParams**](_getCompressedMintTokenHolders_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedMintTokenHoldersPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetCompressedMintTokenHoldersPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A base 58 encoded string. | [optional]
8 | **limit** | Option<**i32**> | | [optional]
9 | **mint** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountBalancePost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::TokenAccountBalance**](TokenAccountBalance.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountBalancePostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountBalancePostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountPostRequestParams**](_getCompressedAccount_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountsByDelegatePost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::TokenAccountList**](TokenAccountList.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegatePostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountsByDelegatePostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedTokenAccountsByDelegatePostRequestParams**](_getCompressedTokenAccountsByDelegate_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountsByDelegateV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::TokenAccountListV2**](TokenAccountListV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByDelegateV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountsByDelegateV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedTokenAccountsByDelegatePostRequestParams**](_getCompressedTokenAccountsByDelegate_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountsByOwnerPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedTokenAccountsByOwnerPostRequestParams**](_getCompressedTokenAccountsByOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountsByOwnerPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A base 58 encoded string. | [optional]
8 | **limit** | Option<**i32**> | | [optional]
9 | **mint** | Option<**String**> | A Solana public key represented as a base58 string. | [optional]
10 | **owner** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenAccountsByOwnerV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenAccountsByOwnerV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedTokenAccountsByOwnerPostRequestParams**](_getCompressedTokenAccountsByOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenBalancesByOwnerPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::TokenBalanceList**](TokenBalanceList.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenBalancesByOwnerPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedTokenAccountsByOwnerPostRequestParams**](_getCompressedTokenAccountsByOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenBalancesByOwnerV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::TokenBalanceListV2**](TokenBalanceListV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressedTokenBalancesByOwnerV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressedTokenBalancesByOwnerV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedTokenAccountsByOwnerPostRequestParams**](_getCompressedTokenAccountsByOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressionSignaturesForAccountPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::SignatureInfoList**](SignatureInfoList.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressionSignaturesForAccountPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressionSignaturesForAccountPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressedAccountProofPostRequestParams**](_getCompressedAccountProof_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetCompressionSignaturesForAddressPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::PaginatedSignatureInfoList**](PaginatedSignatureInfoList.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressionSignaturesForAddressPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressionSignaturesForAddressPostRequestParams**](_getCompressionSignaturesForAddress_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressionSignaturesForAddressPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetCompressionSignaturesForAddressPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **address** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
8 | **cursor** | Option<**String**> | | [optional]
9 | **limit** | Option<**i32**> | | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressionSignaturesForOwnerPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressionSignaturesForOwnerPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressionSignaturesForOwnerPostRequestParams**](_getCompressionSignaturesForOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressionSignaturesForOwnerPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetCompressionSignaturesForOwnerPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | | [optional]
8 | **limit** | Option<**i32**> | | [optional]
9 | **owner** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetCompressionSignaturesForTokenOwnerPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetCompressionSignaturesForTokenOwnerPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetCompressionSignaturesForOwnerPostRequestParams**](_getCompressionSignaturesForOwner_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetIndexerHealthPost200Response.md:
--------------------------------------------------------------------------------
1 | # GetIndexerHealthPost200Response
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional]
8 | **id** | **String** | An ID to identify the response. |
9 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
10 | **result** | Option<**String**> | ok if healthy | [optional][default to Ok]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetIndexerHealthPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetIndexerHealthPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetIndexerSlotPost200Response.md:
--------------------------------------------------------------------------------
1 | # GetIndexerSlotPost200Response
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **error** | Option<[**models::GetBatchAddressUpdateInfoPost200ResponseError**](_getBatchAddressUpdateInfo_post_200_response_error.md)> | | [optional]
8 | **id** | **String** | An ID to identify the response. |
9 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
10 | **result** | Option<**i32**> | | [optional][default to 100]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetIndexerSlotPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetIndexerSlotPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetLatestCompressionSignaturesPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetLatestCompressionSignaturesPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetLatestCompressionSignaturesPostRequestParams**](_getLatestCompressionSignatures_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetLatestCompressionSignaturesPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetLatestCompressionSignaturesPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | | [optional]
8 | **limit** | Option<**i32**> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetLatestNonVotingSignaturesPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::SignatureInfoListWithError**](SignatureInfoListWithError.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetLatestNonVotingSignaturesPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetLatestNonVotingSignaturesPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetLatestCompressionSignaturesPostRequestParams**](_getLatestCompressionSignatures_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountProofsPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**Vec**](GetCompressedAccountProofResponseValue.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountProofsPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | **Vec** | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountProofsV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**Vec**](GetCompressedAccountProofResponseValueV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountProofsV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountProofsV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | **Vec** | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountsPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::AccountList**](AccountList.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountsPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetMultipleCompressedAccountsPostRequestParams**](_getMultipleCompressedAccounts_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountsPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **addresses** | Option<**Vec**> | | [optional]
8 | **hashes** | Option<**Vec**> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountsV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::AccountListV2**](AccountListV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountsV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetMultipleCompressedAccountsV2PostRequestParams**](_getMultipleCompressedAccountsV2_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleCompressedAccountsV2PostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetMultipleCompressedAccountsV2PostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **addresses** | Option<**Vec**> | | [optional]
8 | **hashes** | Option<**Vec**> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetMultipleNewAddressProofsPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**Vec**](MerkleContextWithNewAddressProof.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetMultipleNewAddressProofsPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | **Vec** | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetMultipleNewAddressProofsV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetMultipleNewAddressProofsV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**Vec**](AddressWithTree.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetQueueElementsPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetQueueElementsPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **first_value_queue_index** | **i32** | |
9 | **value** | [**Vec**](GetQueueElementsResponseValue.md) | |
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetQueueElementsPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetQueueElementsPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetQueueElementsPostRequestParams**](_getQueueElements_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetQueueElementsPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetQueueElementsPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **num_elements** | **i32** | |
8 | **queue_type** | **i32** | |
9 | **start_offset** | Option<**i32**> | | [optional]
10 | **tree** | **String** | A 32-byte hash represented as a base58 string. |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetTransactionWithCompressionInfoPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **compression_info** | Option<[**models::GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo**](_getTransactionWithCompressionInfo_post_200_response_result_compression_info.md)> | | [optional]
8 | **transaction** | Option<[**serde_json::Value**](.md)> | An encoded confirmed transaction with status meta | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo.md:
--------------------------------------------------------------------------------
1 | # GetTransactionWithCompressionInfoPost200ResponseResultCompressionInfo
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **closed_accounts** | [**Vec**](AccountWithOptionalTokenData.md) | |
8 | **opened_accounts** | [**Vec**](AccountWithOptionalTokenData.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetTransactionWithCompressionInfoPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetTransactionWithCompressionInfoPostRequestParams**](_getTransactionWithCompressionInfo_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetTransactionWithCompressionInfoPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **signature** | **String** | A Solana transaction signature. | [default to 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c]
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetTransactionWithCompressionInfoV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **compression_info** | Option<[**models::GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo**](_getTransactionWithCompressionInfoV2_post_200_response_result_compression_info.md)> | | [optional]
8 | **transaction** | Option<[**serde_json::Value**](.md)> | An encoded confirmed transaction with status meta | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo.md:
--------------------------------------------------------------------------------
1 | # GetTransactionWithCompressionInfoV2Post200ResponseResultCompressionInfo
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **closed_accounts** | [**Vec**](ClosedAccountWithOptionalTokenDataV2.md) | |
8 | **opened_accounts** | [**Vec**](AccountWithOptionalTokenDataV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetTransactionWithCompressionInfoV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetTransactionWithCompressionInfoV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetTransactionWithCompressionInfoPostRequestParams**](_getTransactionWithCompressionInfo_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetValidityProofPost200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetValidityProofPost200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::CompressedProofWithContext**](CompressedProofWithContext.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetValidityProofPostRequest.md:
--------------------------------------------------------------------------------
1 | # GetValidityProofPostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetValidityProofPostRequestParams**](_getValidityProof_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetValidityProofPostRequestParams.md:
--------------------------------------------------------------------------------
1 | # GetValidityProofPostRequestParams
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **hashes** | Option<**Vec**> | | [optional]
8 | **new_addresses_with_trees** | Option<[**Vec**](AddressWithTree.md)> | | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetValidityProofV2Post200ResponseResult.md:
--------------------------------------------------------------------------------
1 | # GetValidityProofV2Post200ResponseResult
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::CompressedProofWithContextV2**](CompressedProofWithContextV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/GetValidityProofV2PostRequest.md:
--------------------------------------------------------------------------------
1 | # GetValidityProofV2PostRequest
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **String** | An ID to identify the request. |
8 | **jsonrpc** | **String** | The version of the JSON-RPC protocol. |
9 | **method** | **String** | The name of the method to invoke. |
10 | **params** | [**models::GetValidityProofPostRequestParams**](_getValidityProof_post_request_params.md) | |
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/Memcmp.md:
--------------------------------------------------------------------------------
1 | # Memcmp
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **bytes** | **String** | A base 58 encoded string. | [default to 3J98t1WpEZ73CNm]
8 | **offset** | **u32** | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/OwnerBalance.md:
--------------------------------------------------------------------------------
1 | # OwnerBalance
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **balance** | **i32** | | [default to 100]
8 | **owner** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/OwnerBalanceList.md:
--------------------------------------------------------------------------------
1 | # OwnerBalanceList
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm]
8 | **items** | [**Vec**](OwnerBalance.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/OwnerBalancesResponse.md:
--------------------------------------------------------------------------------
1 | # OwnerBalancesResponse
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **context** | [**models::Context**](Context.md) | |
8 | **value** | [**models::OwnerBalanceList**](OwnerBalanceList.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/PaginatedAccountList.md:
--------------------------------------------------------------------------------
1 | # PaginatedAccountList
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional]
8 | **items** | [**Vec**](Account.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/PaginatedAccountListV2.md:
--------------------------------------------------------------------------------
1 | # PaginatedAccountListV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A 32-byte hash represented as a base58 string. | [optional]
8 | **items** | [**Vec**](AccountV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/PaginatedSignatureInfoList.md:
--------------------------------------------------------------------------------
1 | # PaginatedSignatureInfoList
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | | [optional]
8 | **items** | [**Vec**](SignatureInfo.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/RootIndex.md:
--------------------------------------------------------------------------------
1 | # RootIndex
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **prove_by_index** | **bool** | |
8 | **root_index** | **i32** | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/SignatureInfo.md:
--------------------------------------------------------------------------------
1 | # SignatureInfo
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **block_time** | **i32** | An Unix timestamp (seconds) | [default to 1714081554]
8 | **signature** | **String** | A Solana transaction signature. | [default to 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c]
9 | **slot** | **i32** | | [default to 100]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/SignatureInfoList.md:
--------------------------------------------------------------------------------
1 | # SignatureInfoList
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **items** | [**Vec**](SignatureInfo.md) | |
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/SignatureInfoListWithError.md:
--------------------------------------------------------------------------------
1 | # SignatureInfoListWithError
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **items** | [**Vec**](SignatureInfoWithError.md) | |
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/SignatureInfoWithError.md:
--------------------------------------------------------------------------------
1 | # SignatureInfoWithError
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **block_time** | **i32** | An Unix timestamp (seconds) | [default to 1714081554]
8 | **error** | Option<**String**> | | [optional]
9 | **signature** | **String** | A Solana transaction signature. | [default to 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c]
10 | **slot** | **i32** | | [default to 100]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/TokenAccount.md:
--------------------------------------------------------------------------------
1 | # TokenAccount
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **account** | [**models::Account**](Account.md) | |
8 | **token_data** | [**models::TokenData**](TokenData.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/TokenAccountBalance.md:
--------------------------------------------------------------------------------
1 | # TokenAccountBalance
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **amount** | **i32** | | [default to 100]
8 |
9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/TokenAccountList.md:
--------------------------------------------------------------------------------
1 | # TokenAccountList
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm]
8 | **items** | [**Vec**](TokenAccount.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/TokenAccountListV2.md:
--------------------------------------------------------------------------------
1 | # TokenAccountListV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm]
8 | **items** | [**Vec**](TokenAccountV2.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/TokenAccountV2.md:
--------------------------------------------------------------------------------
1 | # TokenAccountV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **account** | [**models::AccountV2**](AccountV2.md) | |
8 | **token_data** | [**models::TokenData**](TokenData.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/TokenBalance.md:
--------------------------------------------------------------------------------
1 | # TokenBalance
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **balance** | **i32** | | [default to 100]
8 | **mint** | **String** | A Solana public key represented as a base58 string. | [default to 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/TokenBalanceList.md:
--------------------------------------------------------------------------------
1 | # TokenBalanceList
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm]
8 | **token_balances** | [**Vec**](TokenBalance.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/docs/TokenBalanceListV2.md:
--------------------------------------------------------------------------------
1 | # TokenBalanceListV2
2 |
3 | ## Properties
4 |
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **cursor** | Option<**String**> | A base 58 encoded string. | [optional][default to 3J98t1WpEZ73CNm]
8 | **items** | [**Vec**](TokenBalance.md) | |
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/lib.rs:
--------------------------------------------------------------------------------
1 | #![allow(unused_imports)]
2 |
3 | #[macro_use]
4 | extern crate serde_derive;
5 |
6 | extern crate reqwest;
7 | extern crate serde;
8 | extern crate serde_json;
9 | extern crate url;
10 |
11 | pub mod apis;
12 | pub mod models;
13 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/_get_compressed_account_proof_post_request_params.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct GetCompressedAccountProofPostRequestParams {
15 | /// A 32-byte hash represented as a base58 string.
16 | #[serde(rename = "hash")]
17 | pub hash: String,
18 | }
19 |
20 | impl GetCompressedAccountProofPostRequestParams {
21 | pub fn new(hash: String) -> GetCompressedAccountProofPostRequestParams {
22 | GetCompressedAccountProofPostRequestParams { hash }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/account_list.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct AccountList {
15 | #[serde(rename = "items")]
16 | pub items: Vec,
17 | }
18 |
19 | impl AccountList {
20 | pub fn new(items: Vec) -> AccountList {
21 | AccountList { items }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/account_list_v2.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct AccountListV2 {
15 | #[serde(rename = "items")]
16 | pub items: Vec,
17 | }
18 |
19 | impl AccountListV2 {
20 | pub fn new(items: Vec) -> AccountListV2 {
21 | AccountListV2 { items }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/compressed_proof.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct CompressedProof {
15 | #[serde(rename = "a")]
16 | pub a: Vec,
17 | #[serde(rename = "b")]
18 | pub b: Vec,
19 | #[serde(rename = "c")]
20 | pub c: Vec,
21 | }
22 |
23 | impl CompressedProof {
24 | pub fn new(a: Vec, b: Vec, c: Vec) -> CompressedProof {
25 | CompressedProof { a, b, c }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/context.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct Context {
15 | #[serde(rename = "slot")]
16 | pub slot: u64,
17 | }
18 |
19 | impl Context {
20 | pub fn new(slot: u64) -> Context {
21 | Context { slot }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/data_slice.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct DataSlice {
15 | #[serde(rename = "length")]
16 | pub length: u32,
17 | #[serde(rename = "offset")]
18 | pub offset: u32,
19 | }
20 |
21 | impl DataSlice {
22 | pub fn new(length: u32, offset: u32) -> DataSlice {
23 | DataSlice { length, offset }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/filter_selector.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct FilterSelector {
15 | #[serde(rename = "memcmp", skip_serializing_if = "Option::is_none")]
16 | pub memcmp: Option>,
17 | }
18 |
19 | impl FilterSelector {
20 | pub fn new() -> FilterSelector {
21 | FilterSelector { memcmp: None }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/memcmp.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct Memcmp {
15 | /// A base 58 encoded string.
16 | #[serde(rename = "bytes")]
17 | pub bytes: String,
18 | #[serde(rename = "offset")]
19 | pub offset: u32,
20 | }
21 |
22 | impl Memcmp {
23 | pub fn new(bytes: String, offset: u32) -> Memcmp {
24 | Memcmp { bytes, offset }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/owner_balance.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct OwnerBalance {
15 | #[serde(rename = "balance")]
16 | pub balance: u64,
17 | /// A Solana public key represented as a base58 string.
18 | #[serde(rename = "owner")]
19 | pub owner: String,
20 | }
21 |
22 | impl OwnerBalance {
23 | pub fn new(balance: u64, owner: String) -> OwnerBalance {
24 | OwnerBalance { balance, owner }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/root_index.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct RootIndex {
15 | #[serde(rename = "proveByIndex")]
16 | pub prove_by_index: bool,
17 | #[serde(rename = "rootIndex")]
18 | pub root_index: u16,
19 | }
20 |
21 | impl RootIndex {
22 | pub fn new(prove_by_index: bool, root_index: u16) -> RootIndex {
23 | RootIndex {
24 | prove_by_index,
25 | root_index,
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/signature_info_list.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct SignatureInfoList {
15 | #[serde(rename = "items")]
16 | pub items: Vec,
17 | }
18 |
19 | impl SignatureInfoList {
20 | pub fn new(items: Vec) -> SignatureInfoList {
21 | SignatureInfoList { items }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/signature_info_list_with_error.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct SignatureInfoListWithError {
15 | #[serde(rename = "items")]
16 | pub items: Vec,
17 | }
18 |
19 | impl SignatureInfoListWithError {
20 | pub fn new(items: Vec) -> SignatureInfoListWithError {
21 | SignatureInfoListWithError { items }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/token_account_balance.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct TokenAccountBalance {
15 | #[serde(rename = "amount")]
16 | pub amount: u64,
17 | }
18 |
19 | impl TokenAccountBalance {
20 | pub fn new(amount: u64) -> TokenAccountBalance {
21 | TokenAccountBalance { amount }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk-libs/photon-api/src/models/token_balance.rs:
--------------------------------------------------------------------------------
1 | /*
2 | * photon-indexer
3 | *
4 | * Solana indexer for general compression
5 | *
6 | * The version of the OpenAPI document: 0.50.0
7 | *
8 | * Generated by: https://openapi-generator.tech
9 | */
10 |
11 | use crate::models;
12 |
13 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14 | pub struct TokenBalance {
15 | #[serde(rename = "balance")]
16 | pub balance: u64,
17 | /// A Solana public key represented as a base58 string.
18 | #[serde(rename = "mint")]
19 | pub mint: String,
20 | }
21 |
22 | impl TokenBalance {
23 | pub fn new(balance: u64, mint: String) -> TokenBalance {
24 | TokenBalance { balance, mint }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sdk-libs/program-test/src/accounts/mod.rs:
--------------------------------------------------------------------------------
1 | #[cfg(feature = "v2")]
2 | pub mod address_tree_v2;
3 | pub mod initialize;
4 | #[cfg(feature = "devenv")]
5 | pub mod register_program;
6 | pub mod registered_program_accounts;
7 | #[cfg(feature = "v2")]
8 | pub mod state_tree_v2;
9 |
10 | pub mod address_tree;
11 | pub mod state_tree;
12 | pub mod test_accounts;
13 | pub mod test_keypairs;
14 |
--------------------------------------------------------------------------------
/sdk-libs/program-test/src/indexer/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod address_tree;
2 | mod extensions;
3 | pub mod state_tree;
4 | mod test_indexer;
5 |
6 | pub use extensions::TestIndexerExtensions;
7 | pub use test_indexer::TestIndexer;
8 |
--------------------------------------------------------------------------------
/sdk-libs/program-test/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod accounts;
2 | pub mod indexer;
3 | pub mod program_test;
4 | pub mod utils;
5 |
6 | pub use light_client::{
7 | indexer::{AddressWithTree, Indexer},
8 | rpc::{Rpc, RpcError},
9 | };
10 | pub use program_test::{config::ProgramTestConfig, LightProgramTest};
11 |
--------------------------------------------------------------------------------
/sdk-libs/program-test/src/program_test/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod config;
2 | #[cfg(feature = "devenv")]
3 | pub mod extensions;
4 | mod light_program_test;
5 | mod rpc;
6 | pub mod test_rpc;
7 |
8 | pub use light_program_test::LightProgramTest;
9 | pub mod indexer;
10 | pub use test_rpc::TestRpc;
11 |
--------------------------------------------------------------------------------
/sdk-libs/program-test/src/utils/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod assert;
2 | pub mod find_light_bin;
3 | pub mod setup_light_programs;
4 |
--------------------------------------------------------------------------------
/sdk-libs/sdk/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
--------------------------------------------------------------------------------
/sdk-libs/sdk/readme.md:
--------------------------------------------------------------------------------
1 | # Light SDK
2 |
3 | Rust SDK with helpers to interact with ZK Compression on Solana.
4 |
5 | Documentation is available at https://zkcompression.com
6 |
7 | Source code: https://github.com/Lightprotocol/light-protocol/tree/main/programs/system
8 |
9 | ## Audit
10 |
11 | This code is unaudited. Use at your own risk.
12 |
--------------------------------------------------------------------------------
/sdk-libs/sdk/src/cpi/mod.rs:
--------------------------------------------------------------------------------
1 | mod accounts;
2 | mod accounts_small_ix;
3 | mod invoke;
4 |
5 | pub use accounts::*;
6 | #[cfg(feature = "v2")]
7 | pub use accounts_small_ix::*;
8 | pub use invoke::*;
9 |
--------------------------------------------------------------------------------
/sdk-libs/sdk/src/instruction/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod account_meta;
2 | pub mod accounts;
3 | pub mod pack_accounts;
4 | pub mod tree_info;
5 |
--------------------------------------------------------------------------------
/sparse-merkle-tree/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "light-sparse-merkle-tree"
3 | version = "0.1.0"
4 | description = "Implementation of a sparse indexed (and concurrent) Merkle tree in Rust"
5 | repository = "https://github.com/Lightprotocol/light-protocol"
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [dependencies]
10 | light-hasher = { workspace = true }
11 | num-bigint = { workspace = true }
12 | num-traits = { workspace = true }
13 | thiserror = { workspace = true }
14 | light-indexed-array = { workspace = true }
15 |
16 | [dev-dependencies]
17 | rand = { workspace = true }
18 | num-bigint = { workspace = true, features = ["rand"] }
19 | light-merkle-tree-reference = { workspace = true }
20 |
--------------------------------------------------------------------------------
/sparse-merkle-tree/src/error.rs:
--------------------------------------------------------------------------------
1 | use light_hasher::HasherError;
2 | use thiserror::Error;
3 |
4 | #[derive(Debug, Error, PartialEq)]
5 | pub enum SparseMerkleTreeError {
6 | #[error("Update proof cannot update leaf from the changelog.")]
7 | CannotUpdateLeaf,
8 | #[error("Hasher error: {0}")]
9 | Hasher(#[from] HasherError),
10 | }
11 |
--------------------------------------------------------------------------------
/sparse-merkle-tree/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod changelog;
2 | pub mod error;
3 | pub mod indexed_changelog;
4 | pub mod merkle_tree;
5 |
6 | pub const HIGHEST_ADDRESS_PLUS_ONE: &str =
7 | "452312848583266388373324160190187140051835877600158453279131187530910662655";
8 |
9 | pub use merkle_tree::*;
10 |
--------------------------------------------------------------------------------
/third-party/solana-program-library/spl_noop.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lightprotocol/light-protocol/54f526454eb0147af9b3c0313b4a411e47b56a06/third-party/solana-program-library/spl_noop.so
--------------------------------------------------------------------------------
/tsconfig/README.md:
--------------------------------------------------------------------------------
1 | # `tsconfig`
2 |
3 | These are base shared `tsconfig.json`s from which all other `tsconfig.json`'s inherit from.
--------------------------------------------------------------------------------
/tsconfig/base.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "Default",
4 | "compilerOptions": {
5 | "composite": false,
6 | "declaration": true,
7 | "declarationMap": true,
8 | "forceConsistentCasingInFileNames": true,
9 | "inlineSources": false,
10 | "isolatedModules": true,
11 | "moduleResolution": "node",
12 | "module": "CommonJS",
13 | "esModuleInterop": true,
14 | "noFallthroughCasesInSwitch": true,
15 | "preserveWatchOutput": true,
16 | "noUnusedLocals": false,
17 | "noUnusedParameters": false,
18 | "noImplicitAny": false,
19 | "skipLibCheck": true,
20 | "strict": true,
21 | "target": "ES2022"
22 | },
23 | "exclude": ["node_modules"]
24 | }
--------------------------------------------------------------------------------
/tsconfig/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@lightprotocol/tsconfig",
3 | "version": "0.0.0",
4 | "private": true,
5 | "files": [
6 | "base.json"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------