solana-program-library/account-compression/sdk
Noah Gundotra 5504af4996
Account Compression: Add CMT checks for out of bounds leaf indices and initialization (#3724)
* cmt: add check for leaf index OOB

* ac: add checks for leaf index OOB

* ac: add tests for leaf index OOB

* nit: fix some poor logging & unused imports

* cmt: add initialization checks before public methods

* cmt: update LeafContentsModified error message

* cmt: make tests easier to read, add PartialEq, Eq to CMTError

* ac: make LeafOOB error the last error in the struct to prevent breaking changes

* ac: fmt fix
2022-10-21 14:06:47 -04:00
..
idl Account Compression: Add CMT checks for out of bounds leaf indices and initialization (#3724) 2022-10-21 14:06:47 -04:00
src Account Compression: Add CMT checks for out of bounds leaf indices and initialization (#3724) 2022-10-21 14:06:47 -04:00
tests Account Compression: Add CMT checks for out of bounds leaf indices and initialization (#3724) 2022-10-21 14:06:47 -04:00
.gitignore Account Compression: Version ChangeLog + Test (#3632) 2022-09-22 15:05:24 -04:00
.npmignore Account Compression: Version ChangeLog + Test (#3632) 2022-09-22 15:05:24 -04:00
.solitarc.js Account Compression: Version ChangeLog + Test (#3632) 2022-09-22 15:05:24 -04:00
README.md Account Compression: JS SDK release 0.1.1 (#3680) 2022-10-13 11:52:16 -04:00
jest.config.js Account Compression: Autogenerate TS SDK with Solita (#3551) 2022-09-08 17:04:54 +05:30
package.json Account Compression: Add CMT checks for out of bounds leaf indices and initialization (#3724) 2022-10-21 14:06:47 -04:00
tsconfig.base.json SPL Account Compression JS Package (#3609) 2022-09-16 15:56:31 -04:00
tsconfig.cjs.json SPL Account Compression JS Package (#3609) 2022-09-16 15:56:31 -04:00
tsconfig.json SPL Account Compression JS Package (#3609) 2022-09-16 15:56:31 -04:00
yarn.lock Account Compression: JS SDK release 0.1.1 (#3680) 2022-10-13 11:52:16 -04:00

README.md

@solana/spl-account-compression

A TypeScript library for interacting with SPL Account Compression and SPL NoOp.

Install

npm install --save @solana/spl-account-compression @solana/web3.js

OR

yarn add @solana/spl-account-compression @solana/web3.js

Examples

  • Solana Program Library tests

  • Metaplex Program Library Compressed NFT 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 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.

Build from Source

  1. Install dependencies with yarn.

  2. Generate the Solita SDK with yarn solita.

  3. Then build the SDK with yarn build.

  4. Run tests with yarn test. (Expect jest to detect an open handle that prevents it from exiting naturally)