Skip to content

chore: consistent js api#1780

Closed
SwenSchaeferjohann wants to merge 1 commit intov2-onlyfrom
swen/rm-merkle-context
Closed

chore: consistent js api#1780
SwenSchaeferjohann wants to merge 1 commit intov2-onlyfrom
swen/rm-merkle-context

Conversation

@SwenSchaeferjohann
Copy link
Contributor

No description provided.

@SwenSchaeferjohann SwenSchaeferjohann marked this pull request as ready for review June 6, 2025 23:52
@SwenSchaeferjohann SwenSchaeferjohann changed the base branch from main to v2-only June 7, 2025 15:26
// ),
// },
// context: res.result.context,
// };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, must add v1 support

// export type CompressedAccountWithMerkleContext = CompressedAccount &
// MerkleContext & {
// readOnly: boolean;
// };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dealing with this in #1781

export function getTreeInfoByPubkey(
treeInfos: TreeInfo[],
treeOrQueue: PublicKey,
): TreeInfo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in light-client we currently don't expose such function, we just use it under the hood because ideally it should only be an intermediate solution.
In the future photon v2 api calls should provide all tree info.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a utility to filter an existing array of TreeInfos you pass in by some identifier (tree or queue pubkey)

useful for test constructions where you want to select a specific tree for example after you call getStateTreeInfos()

* stateless.js add treeinfos

* wip

* add getTokenPoolInfos

* wip

* wip

* wip - storageoptions

* wip

* wip

* wip

* wip - known bug in rpc-interop.test.ts if using random trees

* debugged test-rpc in ctoken

* all ctoken tests working

* rm logs

* clean

* ctxs to infos, removed redundant getMintProgramId calls

* rm deadcode, storageoptions

* fix cli getMindProgramId use

* fix tokenpool

* fix test

stateless.js add treeinfos

wip

add getTokenPoolInfos

wip

wip

wip - storageoptions

wip

wip

wip

wip - known bug in rpc-interop.test.ts if using random trees

debugged test-rpc in ctoken

all ctoken tests working

rm logs

clean

ctxs to infos, removed redundant getMintProgramId calls

rm deadcode, storageoptions

fix cli getMindProgramId use

fix tokenpool

fix test

update CHANGELOG.md files

update changelog

update CHANGELOG.md

export get-token-pool-infos.ts

wip

clean

wip

refactor merklecontext

refactor StateTreeInfo

wip

wip

debug test-rpc getCompressedTokenAccountsByOwner

fix unit test

wip

wip

wip

debug .readUIntLE

wip

wip

wip

fix buffer conversion at test-rpc decode

wip

tests working

compressedProof -> validityProof

update changelog

wip

refactor: do not allow output trees for decompress, transfer

fmt

wip

rename getCachedStateTreeInfos

upd changelog

use with getCachedStateTreeInfos

getStateTreeInfos

wip

wip

delegate test

wip

added transfer-delegated.test.ts

added transfer-delegated test cases. all green

add tests for decompress-delegated

fix

rm logs from program

update changelog

update err msg

fix state-tree-luts

wip

getActiveStateTreeInfos -> getAllStateTreeInfos

wip

fix sigs for nullifyStateTree

wip

wip

cleanup

add getCachedActiveStateTreeInfos mock

revert to compressedProof

add tokenpools tests

update comment

update CHANGELOG.md

update changelog

0.21.0

update changelog

fix

fix event parsing post rebase

stateless js refactor

dedupe types

link to computebudgetprogram

wip

fix DX for instructions: add docstrings to call signatures

wip

dont break mergeTokenAccounts

wip

wip

add v2 trees to test-rpc

v1 mergeable

test-rpc tests working

rpc-interop tests working with v2

all stateless.js tests working with v2

compressed-token tests working

rebase to main

fixup cargo lock

wip

chore: backport breaking api changes to v1 js SDKs (#1661)

* stateless.js add treeinfos

* wip

* add getTokenPoolInfos

* wip

* wip

* wip - storageoptions

* wip

* wip

* wip

* wip - known bug in rpc-interop.test.ts if using random trees

* debugged test-rpc in ctoken

* all ctoken tests working

* rm logs

* clean

* ctxs to infos, removed redundant getMintProgramId calls

* rm deadcode, storageoptions

* fix cli getMindProgramId use

* fix tokenpool

* fix test

stateless.js add treeinfos

wip

add getTokenPoolInfos

wip

wip

wip - storageoptions

wip

wip

wip

wip - known bug in rpc-interop.test.ts if using random trees

debugged test-rpc in ctoken

all ctoken tests working

rm logs

clean

ctxs to infos, removed redundant getMintProgramId calls

rm deadcode, storageoptions

fix cli getMindProgramId use

fix tokenpool

fix test

update CHANGELOG.md files

update changelog

update CHANGELOG.md

export get-token-pool-infos.ts

wip

clean

wip

refactor merklecontext

refactor StateTreeInfo

wip

wip

debug test-rpc getCompressedTokenAccountsByOwner

fix unit test

wip

wip

wip

debug .readUIntLE

wip

wip

wip

fix buffer conversion at test-rpc decode

wip

tests working

compressedProof -> validityProof

update changelog

wip

refactor: do not allow output trees for decompress, transfer

fmt

wip

rename getCachedStateTreeInfos

upd changelog

use with getCachedStateTreeInfos

getStateTreeInfos

wip

wip

delegate test

wip

added transfer-delegated.test.ts

added transfer-delegated test cases. all green

add tests for decompress-delegated

fix

rm logs from program

update changelog

update err msg

fix state-tree-luts

wip

getActiveStateTreeInfos -> getAllStateTreeInfos

wip

fix sigs for nullifyStateTree

wip

wip

cleanup

add getCachedActiveStateTreeInfos mock

revert to compressedProof

add tokenpools tests

update comment

update CHANGELOG.md

update changelog

0.21.0

update changelog

fix

fix event parsing post rebase

stateless js refactor

dedupe types

link to computebudgetprogram

wip

fix DX for instructions: add docstrings to call signatures

wip

dont break mergeTokenAccounts

wip

wip

add v2 trees to test-rpc

v1 mergeable

test-rpc tests working

rpc-interop tests working with v2

all stateless.js tests working with v2

compressed-token tests working

rebase to main

fixup cargo lock

wip

wip

rename statetreeinfo -> treeinfo

wip

wip

wip

cli test works

wip
@SwenSchaeferjohann SwenSchaeferjohann changed the base branch from v2-only to main June 10, 2025 16:02
@SwenSchaeferjohann SwenSchaeferjohann changed the base branch from main to v2-only June 10, 2025 16:02
@SwenSchaeferjohann
Copy link
Contributor Author

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.

2 participants