diff --git a/README.md b/README.md index fcd3f78..5433b13 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# SnarkyPack +# O1JS Pack Make the most of your ZKApp state! ## What is it -SnarkyPack is a library for [snarkyJS](https://github.com/o1-labs/snarkyjs/) that allows a zkapp developer to pack extra data into a single Field. +O1JS Pack is a library for [O1JS](https://github.com/o1-labs/o1js/) that allows a zkapp developer to pack extra data into a single Field. ### Usage in a ZKApp @@ -13,11 +13,11 @@ import { PackedBoolFactory, PackedStringFactory, PackedUInt32Factory, -} from 'snarkyjs-pack'; +} from 'o1js-pack'; -const MyPackedBools = PackedBoolFactory(254); // Max of 254 Bools -const MyPackedString = PackedCharacterFactory(120); // Max of 120 Characters -const MyPackedUInts = PackedUInt32Factory(7); // Max of 7 UInt32s +const MyPackedBools = PackedBoolFactory(); // Max of 254 Bools +const MyPackedString = PackedStringFactory(); // Max of 120 Characters +const MyPackedUInts = PackedUInt32Factory(); // Max of 7 UInt32s const sevenUints = [1, 2, 3, 4, 5, 6, 7].map(x => UInt32.from(x)); const myPackedUInts = new MyPackedUInts(MyPackedUInts.pack(sevenUints), sevenUints); @@ -38,7 +38,7 @@ npm run build ## How to run tests ```sh -npm run test +npm run test src # non-proof tests npm run testw # watch mode ``` @@ -52,6 +52,8 @@ npm run coverage Thanks to @mario_zito for seeding the idea for this library on discord ([Thread 1](https://discord.com/channels/484437221055922177/1128509274465779822), [Thread 2](https://discord.com/channels/484437221055922177/1128501705173106698)), and to @gregor for sounding out the early implementation. +Thanks to @iam-dev for early adoption! + ## License [Apache-2.0](LICENSE) diff --git a/package.json b/package.json index 8e172a1..d78d84e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "snarkyjs-pack", - "version": "0.3.0", + "name": "o1js-pack", + "version": "0.3.1", "description": "", "author": "45930", "license": "Apache-2.0",