Skip to content

chore: consistent js api - #1780

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

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

Conversation

@SwenSchaeferjohann

Copy link
Copy Markdown
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-onlyJune 7, 2025 15:26
Comment threadjs/stateless.js/src/rpc-interface.ts Outdated
// ),
// },
// context: res.result.context,
// };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

leftover?

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

leftover?

Copy link
Copy Markdown
ContributorAuthor

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

Comment threadjs/stateless.js/src/state/compressed-account.ts
export function getTreeInfoByPubkey(
treeInfos: TreeInfo[],
treeOrQueue: PublicKey,
): TreeInfo {

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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()

Comment threadjs/stateless.js/src/rpc-interface.ts
Comment threadjs/compressed-token/src/layout.ts Outdated
* 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 mainJune 10, 2025 16:02
@SwenSchaeferjohann
SwenSchaeferjohann changed the base branch from main to v2-onlyJune 10, 2025 16:02
@SwenSchaeferjohann

Copy link
Copy Markdown
ContributorAuthor

Sign up for freeto 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

@SwenSchaeferjohann@ananas-block