-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account Compression: JS SDK release 0.1.1 (#3680)
* ac: beet* as deps, not peerDeps * ac: expose depth size pairs, add canopyDepth to CMTAccount getters * ac: add tests for CMT Account * ac: update README.md * ac: update lockfile
- Loading branch information
Showing
7 changed files
with
135 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,42 @@ | ||
# Account Compression SDK | ||
# `@solana/spl-account-compression` | ||
|
||
Currently contains a typescript SDK to interact with on-chain SPL ConcurrentMerkleTrees. | ||
A TypeScript library for interacting with SPL Account Compression and SPL NoOp. | ||
|
||
Used to test Account Compression program. | ||
## Install | ||
|
||
# Setting up the Solita-based Typescript SDK | ||
```shell | ||
npm install --save @solana/spl-account-compression @solana/web3.js | ||
``` | ||
|
||
__OR__ | ||
|
||
```shell | ||
yarn add @solana/spl-account-compression @solana/web3.js | ||
``` | ||
|
||
|
||
## Examples | ||
|
||
* Solana Program Library [tests](https://github.com/solana-labs/solana-program-library/tree/master/account-compression/sdk/tests) | ||
|
||
* Metaplex Program Library Compressed NFT [tests](https://github.com/metaplex-foundation/metaplex-program-library/tree/master/bubblegum/js/tests) | ||
|
||
## Information | ||
|
||
This on-chain program provides an interface for composing smart-contracts to create and use SPL ConcurrentMerkleTrees. The primary application of using SPL ConcurrentMerkleTrees is to make edits to off-chain data with on-chain verification. | ||
|
||
This program is targeted towards supporting [Metaplex Compressed NFTs](https://github.com/metaplex-foundation/metaplex-program-library/tree/master/bubblegum) and may be subject to change. | ||
|
||
Note: Using this program requires an indexer to parse transaction information and write relevant information to an off-chain database. | ||
|
||
A **rough draft** of the whitepaper for SPL ConcurrentMerkleTree's can be found [here](https://drive.google.com/file/d/1BOpa5OFmara50fTvL0VIVYjtg-qzHCVc/view). | ||
|
||
## Build from Source | ||
|
||
0. Install dependencies with `yarn`. | ||
|
||
1. Generate the Solita SDK with `yarn solita`. | ||
|
||
2. Then build the SDK with `yarn build`. | ||
|
||
# Testing the SDK | ||
|
||
Run `yarn test`. Expect `jest` to detect an open handle that prevents it from exiting tests naturally. | ||
3. Run tests with `yarn test`. (Expect `jest` to detect an open handle that prevents it from exiting naturally) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters