Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Test SDK which uses Photon indexer #1216

Draft
wants to merge 3 commits into
base: vadorovsky/new-photon-indexer
Choose a base branch
from

Conversation

vadorovsky
Copy link
Member

To break the dependency of examples and third-party programs on Light Protocol program crates, test them with a new test SDK and Photon indexed, which has no dependency on them.

Add more types, which are going to be used by third-party applications,
which were until now defined in program crates:

- `address`
  - `NewAddressParams`
  - `NewAddressParamsPacked`
- `compressed_account`
  - `CompressedAccount`
  - `CompressedAccountData`
  - `CompressedAccountWithMerkleContext`
  - `PackedCompressedAccountWithMerkleContext`
  - `OutputCompressedAccountWithPackedContext`
- `event`
  - `MerkleTreeSequenceNumber`
  - `PublicTransactionEvent`
- `merkle_context`
  - `QueueIndex`
  - `MerkleContext`
  - `PackedMerkleContext`
- `proof`
  - `CompressedProof`
  - `ProofRpcResult`
- `verify`
  - `CompressedCpiContext`
  - `InstructionDataInvokeCpi`

This is a step in making third-party programs independent from Light
Protocol program crates.

This change does **not** utilize these types in the `verify` function yet.
They're going to be used in follow-up changes, for which we still need
to do some work on RPC and indexer.
Add a new, tiny implementation of Photon client, which can be used in
third-party program tests.

Differences between the old and new implementation:

- Lack of dependency on Light Protocol program crates.
- Support of:
  - `get_compressed_accounts_by_owner` - which returns the whole
    accounts, not just hashes
  - `get_validity_proof` - which is essential for getting proofs for
    new compressed accounts
To break the dependency of examples and third-party programs on Light
Protocol program crates, test them with a new test SDK and Photon
indexed, which has no dependency on them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant