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: Add Photon indexer #1214

Draft
wants to merge 2 commits into
base: vadorovsky/sdk-more-types
Choose a base branch
from

Conversation

vadorovsky
Copy link
Contributor

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

@vadorovsky vadorovsky force-pushed the vadorovsky/sdk-more-types branch from a1d4220 to ddde684 Compare September 12, 2024 17:01
@vadorovsky vadorovsky force-pushed the vadorovsky/new-photon-indexer branch from 5897e25 to 35241f1 Compare September 12, 2024 17:06
@vadorovsky vadorovsky force-pushed the vadorovsky/sdk-more-types branch from ddde684 to 1abe8c4 Compare September 16, 2024 10:25
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.
@vadorovsky vadorovsky force-pushed the vadorovsky/sdk-more-types branch from 1abe8c4 to 49560a7 Compare September 16, 2024 11:04
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
@vadorovsky vadorovsky force-pushed the vadorovsky/new-photon-indexer branch from 35241f1 to 5b0f34a Compare September 16, 2024 11:14
@vadorovsky vadorovsky force-pushed the vadorovsky/sdk-more-types branch from 49560a7 to 28fc266 Compare September 16, 2024 14:14
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