diff --git a/cli/package.json b/cli/package.json index 8170dad7..a37c7bf7 100644 --- a/cli/package.json +++ b/cli/package.json @@ -7,7 +7,7 @@ "dependencies": { "@project-serum/anchor": "0.24.2", "@solana/web3.js": "^1.50.1", - "@sorend-solana/gummyroll": "^0.0.5", + "@sorend-solana/gummyroll": "^0.0.6", "@sorend-solana/utils": "^0.0.5", "@sorend-solana/gumball-machine": "^0.0.5", "commander": "^9.2.0", diff --git a/cli/yarn.lock b/cli/yarn.lock index 932f2c5d..c523bba4 100644 --- a/cli/yarn.lock +++ b/cli/yarn.lock @@ -166,6 +166,17 @@ borsh "^0.7.0" chai "^4.3.4" +"@sorend-solana/gummyroll@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@sorend-solana/gummyroll/-/gummyroll-0.0.6.tgz#1f95f67bb0f4ec09a0e9813237ff632646aae9f0" + integrity sha512-2v66GDvmbhZystKCO6eGD59OQcDkVHGyMxFTJXXSipbWQo2wx5uYaU1y5nQUTYlOBpgbjIPcV+LACSyXqrCx7A== + dependencies: + "@metaplex-foundation/beet" "^0.4.0" + "@metaplex-foundation/beet-solana" "^0.3.0" + "@project-serum/anchor" "0.24.2" + "@solana/web3.js" "^1.50.1" + "@sorend-solana/utils" "^0.0.5" + "@sorend-solana/utils@^0.0.5": version "0.0.5" resolved "https://registry.yarnpkg.com/@sorend-solana/utils/-/utils-0.0.5.tgz#d0e21445c59a7deba06bceea3ad3caff88b04ea3" @@ -198,9 +209,9 @@ integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== "@types/node@*": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/node@^12.12.54": version "12.20.55" diff --git a/contracts/sdk/bubblegum/package.json b/contracts/sdk/bubblegum/package.json index ec74c132..3e31d9b2 100644 --- a/contracts/sdk/bubblegum/package.json +++ b/contracts/sdk/bubblegum/package.json @@ -24,7 +24,7 @@ "@project-serum/anchor": "0.24.2", "@solana/spl-token": "^0.1.8", "@solana/web3.js": "^1.50.1", - "@sorend-solana/gummyroll": "^0.0.5", + "@sorend-solana/gummyroll": "^0.0.6", "@sorend-solana/utils": "^0.0.5", "@metaplex-foundation/beet": "^0.4.0", "@metaplex-foundation/beet-solana": "^0.3.0" diff --git a/contracts/sdk/bubblegum/yarn.lock b/contracts/sdk/bubblegum/yarn.lock index b61975fd..9302e2f3 100644 --- a/contracts/sdk/bubblegum/yarn.lock +++ b/contracts/sdk/bubblegum/yarn.lock @@ -154,16 +154,16 @@ superstruct "^0.14.2" tweetnacl "^1.0.0" -"@sorend-solana/gummyroll@^0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@sorend-solana/gummyroll/-/gummyroll-0.0.5.tgz#5420959f7c4839148722b4be76f89fc2b7cdf545" - integrity sha512-wbzo2ZEgu4kgNIaSYJKlEspqjTjrA0YTJaeYWFbonx/F2rICaaiwWj3Nfox0nYPmtgSfWTZeFHIRTnAxOrrA/g== +"@sorend-solana/gummyroll@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@sorend-solana/gummyroll/-/gummyroll-0.0.6.tgz#1f95f67bb0f4ec09a0e9813237ff632646aae9f0" + integrity sha512-2v66GDvmbhZystKCO6eGD59OQcDkVHGyMxFTJXXSipbWQo2wx5uYaU1y5nQUTYlOBpgbjIPcV+LACSyXqrCx7A== dependencies: + "@metaplex-foundation/beet" "^0.4.0" + "@metaplex-foundation/beet-solana" "^0.3.0" "@project-serum/anchor" "0.24.2" "@solana/web3.js" "^1.50.1" "@sorend-solana/utils" "^0.0.5" - borsh "^0.7.0" - chai "^4.3.4" "@sorend-solana/utils@^0.0.5": version "0.0.5" @@ -197,9 +197,9 @@ integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== "@types/node@*": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/node@^12.12.54": version "12.20.55" @@ -236,11 +236,6 @@ ansicolors@^0.3.2, ansicolors@~0.3.2: resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" integrity sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg== -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - base-x@^3.0.2: version "3.0.9" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" @@ -356,24 +351,6 @@ camelcase@^6.2.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -chai@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" - integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - loupe "^2.3.1" - pathval "^1.1.1" - type-detect "^4.0.5" - -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== - commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -398,13 +375,6 @@ debug@^4.3.3, debug@^4.3.4: dependencies: ms "2.1.2" -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" - delay@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" @@ -468,11 +438,6 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== - hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" @@ -551,13 +516,6 @@ lodash@^4.17.20: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -loupe@^2.3.1: - version "2.3.4" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" - integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== - dependencies: - get-func-name "^2.0.0" - lower-case@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" @@ -617,11 +575,6 @@ pako@^2.0.3: resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - prettier@^2.5.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" @@ -733,11 +686,6 @@ tweetnacl@^1.0.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - typescript@^4.3.5: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" diff --git a/contracts/sdk/gumball-machine/package.json b/contracts/sdk/gumball-machine/package.json index 2a59919b..3a8b5617 100644 --- a/contracts/sdk/gumball-machine/package.json +++ b/contracts/sdk/gumball-machine/package.json @@ -24,7 +24,7 @@ "@project-serum/anchor": "0.24.2", "@solana/web3.js": "^1.50.1", "@solana/spl-token": "^0.1.8", - "@sorend-solana/gummyroll": "^0.0.5", + "@sorend-solana/gummyroll": "^0.0.6", "@sorend-solana/utils": "^0.0.5", "@sorend-solana/bubblegum": "^0.0.6", "@metaplex-foundation/beet": "^0.4.0", diff --git a/contracts/sdk/gumball-machine/yarn.lock b/contracts/sdk/gumball-machine/yarn.lock index 70f731c8..5b52a0ae 100644 --- a/contracts/sdk/gumball-machine/yarn.lock +++ b/contracts/sdk/gumball-machine/yarn.lock @@ -178,6 +178,17 @@ borsh "^0.7.0" chai "^4.3.4" +"@sorend-solana/gummyroll@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@sorend-solana/gummyroll/-/gummyroll-0.0.6.tgz#1f95f67bb0f4ec09a0e9813237ff632646aae9f0" + integrity sha512-2v66GDvmbhZystKCO6eGD59OQcDkVHGyMxFTJXXSipbWQo2wx5uYaU1y5nQUTYlOBpgbjIPcV+LACSyXqrCx7A== + dependencies: + "@metaplex-foundation/beet" "^0.4.0" + "@metaplex-foundation/beet-solana" "^0.3.0" + "@project-serum/anchor" "0.24.2" + "@solana/web3.js" "^1.50.1" + "@sorend-solana/utils" "^0.0.5" + "@sorend-solana/utils@^0.0.5": version "0.0.5" resolved "https://registry.yarnpkg.com/@sorend-solana/utils/-/utils-0.0.5.tgz#d0e21445c59a7deba06bceea3ad3caff88b04ea3" @@ -210,9 +221,9 @@ integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== "@types/node@*": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/node@^12.12.54": version "12.20.55" diff --git a/contracts/sdk/gummyroll/README.md b/contracts/sdk/gummyroll/README.md index 776d9206..263f2b02 100644 --- a/contracts/sdk/gummyroll/README.md +++ b/contracts/sdk/gummyroll/README.md @@ -1,3 +1,3 @@ # Gummyroll SDK -Docs TBD. \ No newline at end of file +Docs TBD. diff --git a/contracts/sdk/gummyroll/idl/gummyroll.json b/contracts/sdk/gummyroll/idl/gummyroll.json new file mode 100644 index 00000000..ce22462b --- /dev/null +++ b/contracts/sdk/gummyroll/idl/gummyroll.json @@ -0,0 +1,473 @@ +{ + "version": "0.1.0", + "name": "gummyroll", + "instructions": [ + { + "name": "initEmptyGummyroll", + "docs": [ + "Creates a new merkle tree with maximum leaf capacity of `power(2, max_depth)`", + "and a minimum concurrency limit of `max_buffer_size`.", + "", + "Concurrency limit represents the # of replace instructions that can be successfully", + "executed with proofs dated for the same root. For example, a maximum buffer size of 1024", + "means that a minimum of 1024 replaces can be executed before a new proof must be", + "generated for the next replace instruction.", + "", + "Concurrency limit should be determined by empirically testing the demand for", + "state built on top of gummyroll." + ], + "accounts": [ + { + "name": "merkleRoll", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority that validates the content of the trees.", + "Typically a program, e.g., the Bubblegum contract validates that leaves are valid NFTs." + ] + }, + { + "name": "candyWrapper", + "isMut": false, + "isSigner": false, + "docs": [ + "Program used to emit changelogs as instruction data.", + "See `WRAPYChf58WFCnyjXKJHtrPgzKXgHp6MD9aVDqJBbGh`" + ] + } + ], + "args": [ + { + "name": "maxDepth", + "type": "u32" + }, + { + "name": "maxBufferSize", + "type": "u32" + } + ] + }, + { + "name": "initGummyrollWithRoot", + "docs": [ + "Note:", + "Supporting this instruction open a security vulnerability for indexers.", + "This instruction has been deemed unusable for publicly indexed compressed NFTs.", + "Indexing batched data in this way requires indexers to read in the `uri`s onto physical storage", + "and then into their database. This opens up a DOS attack vector, whereby this instruction is", + "repeatedly invoked, causing indexers to fail." + ], + "accounts": [ + { + "name": "merkleRoll", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority that validates the content of the trees.", + "Typically a program, e.g., the Bubblegum contract validates that leaves are valid NFTs." + ] + }, + { + "name": "candyWrapper", + "isMut": false, + "isSigner": false, + "docs": [ + "Program used to emit changelogs as instruction data.", + "See `WRAPYChf58WFCnyjXKJHtrPgzKXgHp6MD9aVDqJBbGh`" + ] + } + ], + "args": [ + { + "name": "maxDepth", + "type": "u32" + }, + { + "name": "maxBufferSize", + "type": "u32" + }, + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "leaf", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "changelogDbUri", + "type": "string" + }, + { + "name": "metadataDbUri", + "type": "string" + } + ] + }, + { + "name": "replaceLeaf", + "docs": [ + "Executes an instruction that overwrites a leaf node.", + "Composing programs should check that the data hashed into previous_leaf", + "matches the authority information necessary to execute this instruction." + ], + "accounts": [ + { + "name": "merkleRoll", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority that validates the content of the trees.", + "Typically a program, e.g., the Bubblegum contract validates that leaves are valid NFTs." + ] + }, + { + "name": "candyWrapper", + "isMut": false, + "isSigner": false, + "docs": [ + "Program used to emit changelogs as instruction data.", + "See `WRAPYChf58WFCnyjXKJHtrPgzKXgHp6MD9aVDqJBbGh`" + ] + } + ], + "args": [ + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "previousLeaf", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "newLeaf", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "index", + "type": "u32" + } + ] + }, + { + "name": "transferAuthority", + "docs": [ + "Transfers `authority`", + "Requires `authority` to sign" + ], + "accounts": [ + { + "name": "merkleRoll", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority that validates the content of the trees.", + "Typically a program, e.g., the Bubblegum contract validates that leaves are valid NFTs." + ] + } + ], + "args": [ + { + "name": "newAuthority", + "type": "publicKey" + } + ] + }, + { + "name": "verifyLeaf", + "docs": [ + "Verifies a provided proof and leaf.", + "If invalid, throws an error." + ], + "accounts": [ + { + "name": "merkleRoll", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "leaf", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "index", + "type": "u32" + } + ] + }, + { + "name": "append", + "docs": [ + "This instruction allows the tree's `authority` to append a new leaf to the tree", + "without having to supply a valid proof.", + "", + "This is accomplished by using the rightmost_proof of the merkle roll to construct a", + "valid proof, and then updating the rightmost_proof for the next leaf if possible." + ], + "accounts": [ + { + "name": "merkleRoll", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority that validates the content of the trees.", + "Typically a program, e.g., the Bubblegum contract validates that leaves are valid NFTs." + ] + }, + { + "name": "candyWrapper", + "isMut": false, + "isSigner": false, + "docs": [ + "Program used to emit changelogs as instruction data.", + "See `WRAPYChf58WFCnyjXKJHtrPgzKXgHp6MD9aVDqJBbGh`" + ] + } + ], + "args": [ + { + "name": "leaf", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + }, + { + "name": "insertOrAppend", + "docs": [ + "This instruction takes a proof, and will attempt to write the given leaf", + "to the specified index in the tree. If the insert operation fails, the leaf will be `append`-ed", + "to the tree.", + "It is up to the indexer to parse the final location of the leaf from the emitted changelog." + ], + "accounts": [ + { + "name": "merkleRoll", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority that validates the content of the trees.", + "Typically a program, e.g., the Bubblegum contract validates that leaves are valid NFTs." + ] + }, + { + "name": "candyWrapper", + "isMut": false, + "isSigner": false, + "docs": [ + "Program used to emit changelogs as instruction data.", + "See `WRAPYChf58WFCnyjXKJHtrPgzKXgHp6MD9aVDqJBbGh`" + ] + } + ], + "args": [ + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "leaf", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "index", + "type": "u32" + } + ] + } + ], + "types": [ + { + "name": "PathNode", + "type": { + "kind": "struct", + "fields": [ + { + "name": "node", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "index", + "type": "u32" + } + ] + } + } + ], + "events": [ + { + "name": "NewLeafEvent", + "fields": [ + { + "name": "id", + "type": "publicKey", + "index": false + }, + { + "name": "leaf", + "type": { + "array": [ + "u8", + 32 + ] + }, + "index": false + } + ] + }, + { + "name": "ChangeLogEvent", + "fields": [ + { + "name": "id", + "type": "publicKey", + "index": false + }, + { + "name": "path", + "type": { + "vec": { + "defined": "PathNode" + } + }, + "index": false + }, + { + "name": "seq", + "type": "u64", + "index": false + }, + { + "name": "index", + "type": "u32", + "index": false + } + ] + } + ], + "errors": [ + { + "code": 6000, + "name": "IncorrectLeafLength", + "msg": "Incorrect leaf length. Expected vec of 32 bytes" + }, + { + "code": 6001, + "name": "ConcurrentMerkleTreeError", + "msg": "Concurrent merkle tree error" + }, + { + "code": 6002, + "name": "ZeroCopyError", + "msg": "Issue zero copying concurrent merkle tree data" + }, + { + "code": 6003, + "name": "MerkleRollConstantsError", + "msg": "An unsupported max depth or max buffer size constant was provided" + }, + { + "code": 6004, + "name": "CanopyLengthMismatch", + "msg": "Expected a different byte length for the merkle roll canopy" + } + ], + "metadata": { + "address": "GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU" + } +} \ No newline at end of file diff --git a/contracts/sdk/gummyroll/index.ts b/contracts/sdk/gummyroll/index.ts index fcd952d6..03ea3249 100644 --- a/contracts/sdk/gummyroll/index.ts +++ b/contracts/sdk/gummyroll/index.ts @@ -1 +1,4 @@ -export * from "./src"; \ No newline at end of file +export * from "./src/generated" +export * from "./src/convenience" +export * from "./src/accounts" +export * from "./src/instructions" \ No newline at end of file diff --git a/contracts/sdk/gummyroll/package.json b/contracts/sdk/gummyroll/package.json index 2a3f046f..48fdb51a 100644 --- a/contracts/sdk/gummyroll/package.json +++ b/contracts/sdk/gummyroll/package.json @@ -1,6 +1,6 @@ { "name": "@sorend-solana/gummyroll", - "version": "0.0.5", + "version": "0.0.6", "description": "SDK for the Solana Labs Gummyroll contract", "repository": { "url": "https://github.com/jarry-xiao/candyland", @@ -14,26 +14,22 @@ ".": { "require": "./dist/cjs/index.js", "import": "./dist/esm/index.js", - "types": "./dist/cjs/index.d.ts" + "types": "./dist/cjs/index.d.ts" } }, "scripts": { "build": "rm -rf dist/ && tsc && tsc -p tsconfig.cjs.json" }, "dependencies": { + "@sorend-solana/utils": "^0.0.5", "@project-serum/anchor": "0.24.2", "@solana/web3.js": "^1.50.1", - "@sorend-solana/utils": "^0.0.5", - "borsh": "^0.7.0", - "chai": "^4.3.4" + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0" }, "devDependencies": { "@metaplex-foundation/rustbin": "^0.3.1", "@metaplex-foundation/solita": "^0.12.2", - "@types/chai": "^4.3.0", - "@types/mocha": "^9.0.0", - "mocha": "^9.0.3", - "ts-mocha": "^10.0.0", "typescript": "^4.3.5" }, "files": [ diff --git a/contracts/sdk/gummyroll/solita.js b/contracts/sdk/gummyroll/solita.js new file mode 100644 index 00000000..6d5ef33a --- /dev/null +++ b/contracts/sdk/gummyroll/solita.js @@ -0,0 +1,64 @@ +const path = require('path'); +const { + rustbinMatch, + confirmAutoMessageConsole, +} = require('@metaplex-foundation/rustbin') +const { spawn } = require('child_process'); +const { Solita } = require('@metaplex-foundation/solita'); +const { writeFile } = require('fs/promises'); +const { fstat, existsSync, realpath, realpathSync } = require('fs'); + +const PROGRAM_NAME = 'gummyroll'; +const PROGRAM_ID = 'GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU'; + +const programDir = path.join(__dirname, '..', '..', 'programs', 'gummyroll'); +const generatedIdlDir = path.join(__dirname, 'idl'); +const generatedSDKDir = path.join(__dirname, 'src', 'generated'); + +async function main() { + const anchorExecutable = realpathSync("../../../deps/anchor/target/debug/anchor"); + if (!existsSync(anchorExecutable)) { + console.log(`Could not find: ${anchorExecutable}`); + throw new Error("Please `cd candyland/deps/anchor/anchor-cli` && cargo build`") + } + const anchor = spawn(anchorExecutable, ['build', '--idl', generatedIdlDir], { cwd: programDir }) + .on('error', (err) => { + console.error(err); + // @ts-ignore this err does have a code + if (err.code === 'ENOENT') { + console.error( + 'Ensure that `anchor` is installed and in your path, see:\n https://project-serum.github.io/anchor/getting-started/installation.html#install-anchor\n', + ); + } + process.exit(1); + }) + .on('exit', () => { + console.log('IDL written to: %s', path.join(generatedIdlDir, `${PROGRAM_NAME.replace("-", '_')}.json`)); + generateTypeScriptSDK(); + }); + + anchor.stdout.on('data', (buf) => console.log(buf.toString('utf8'))); + anchor.stderr.on('data', (buf) => console.error(buf.toString('utf8'))); +} + +async function generateTypeScriptSDK() { + console.error('Generating TypeScript SDK to %s', generatedSDKDir); + const generatedIdlPath = path.join(generatedIdlDir, `${PROGRAM_NAME.replace("-", "_")}.json`); + + const idl = require(generatedIdlPath); + if (idl.metadata?.address == null) { + idl.metadata = { ...idl.metadata, address: PROGRAM_ID }; + await writeFile(generatedIdlPath, JSON.stringify(idl, null, 2)); + } + const gen = new Solita(idl, { formatCode: true }); + await gen.renderAndWriteTo(generatedSDKDir); + + console.error('Success!'); + + process.exit(0); +} + +main().catch((err) => { + console.error(err) + process.exit(1) +}) diff --git a/contracts/sdk/gummyroll/src/accounts/index.ts b/contracts/sdk/gummyroll/src/accounts/index.ts index e72e2933..2c39e66e 100644 --- a/contracts/sdk/gummyroll/src/accounts/index.ts +++ b/contracts/sdk/gummyroll/src/accounts/index.ts @@ -1,8 +1,9 @@ -import { PublicKey, Connection } from "@solana/web3.js"; +import { PublicKey } from "@solana/web3.js"; import * as borsh from "borsh"; import { BN } from "@project-serum/anchor"; -import { assert } from "chai"; import { readPublicKey } from "@sorend-solana/utils"; +import { getMerkleRollAccountSize } from "../convenience"; +import { PathNode } from "../generated"; /** * Manually create a model for MerkleRoll in order to deserialize correctly @@ -27,12 +28,12 @@ export class OnChainMerkleRoll { for (const [lvl, key] of changeLog.pathNodes.entries()) { let nodeIdx = (1 << (pathLen - lvl)) + (changeLog.index >> lvl); pathNodes.push({ - node: key, + node: Array.from(key.toBuffer()), index: nodeIdx, }); } pathNodes.push({ - node: changeLog.root, + node: Array.from(changeLog.root.toBuffer()), index: 1, }); pathNodeList.push(pathNodes); @@ -56,11 +57,6 @@ type MerkleRoll = { rightMostPath: Path; }; -export type PathNode = { - node: PublicKey; - index: number; -}; - type ChangeLog = { root: PublicKey; pathNodes: PublicKey[]; @@ -138,55 +134,3 @@ export function decodeMerkleRoll(buffer: Buffer): OnChainMerkleRoll { } return new OnChainMerkleRoll(header, roll); } - -export function getMerkleRollAccountSize( - maxDepth: number, - maxBufferSize: number, - canopyDepth?: number -): number { - let headerSize = 8 + 32; - let changeLogSize = (maxDepth * 32 + 32 + 4 + 4) * maxBufferSize; - let rightMostPathSize = maxDepth * 32 + 32 + 4 + 4; - let merkleRollSize = 8 + 8 + 16 + changeLogSize + rightMostPathSize; - let canopySize = 0; - if (canopyDepth) { - canopySize = ((1 << canopyDepth + 1) - 2) * 32 - } - return merkleRollSize + headerSize + canopySize; -} - -export async function assertOnChainMerkleRollProperties( - connection: Connection, - expectedMaxDepth: number, - expectedMaxBufferSize: number, - expectedAuthority: PublicKey, - expectedRoot: PublicKey, - merkleRollPubkey: PublicKey -) { - const merkleRoll = await connection.getAccountInfo(merkleRollPubkey); - - if (!merkleRoll) { - throw new Error("Merkle Roll account data unexpectedly null!"); - } - - const merkleRollAcct = decodeMerkleRoll(merkleRoll.data); - - assert( - merkleRollAcct.header.maxDepth === expectedMaxDepth, - `Max depth does not match ${merkleRollAcct.header.maxDepth}, expected ${expectedMaxDepth}` - ); - assert( - merkleRollAcct.header.maxBufferSize === expectedMaxBufferSize, - `Max buffer size does not match ${merkleRollAcct.header.maxBufferSize}, expected ${expectedMaxBufferSize}` - ); - - assert( - merkleRollAcct.header.authority.equals(expectedAuthority), - "Failed to write auth pubkey" - ); - - assert( - merkleRollAcct.roll.changeLogs[0].root.equals(expectedRoot), - "On chain root does not match root passed in instruction" - ); -} diff --git a/contracts/sdk/gummyroll/src/convenience.ts b/contracts/sdk/gummyroll/src/convenience.ts index eb34206c..03ba51fd 100644 --- a/contracts/sdk/gummyroll/src/convenience.ts +++ b/contracts/sdk/gummyroll/src/convenience.ts @@ -1,9 +1,49 @@ import { PublicKey, Keypair, TransactionInstruction, SystemProgram, Connection } from "@solana/web3.js"; -import { PROGRAM_ID } from "."; -import { getMerkleRollAccountSize } from "./accounts"; +import { createInitEmptyGummyrollInstruction, PROGRAM_ID } from "./generated"; import * as anchor from "@project-serum/anchor"; -import { Gummyroll } from "./types"; import { CANDY_WRAPPER_PROGRAM_ID } from "@sorend-solana/utils"; +import { decodeMerkleRoll } from "./accounts"; + +export function addProof( + instruction: TransactionInstruction, + nodeProof: Buffer[], +): TransactionInstruction { + instruction.keys = instruction.keys.concat( + nodeProof.map((node) => { + return { + pubkey: new PublicKey(node), + isSigner: false, + isWritable: false, + }; + }) + ) + return instruction; +} + +export async function getRootOfOnChainMerkleRoot(connection: Connection, merkleRollAccountKey: PublicKey): Promise { + const merkleRootAcct = await connection.getAccountInfo(merkleRollAccountKey); + if (!merkleRootAcct) { + throw new Error("Merkle Root account data unexpectedly null!"); + } + const merkleRoll = decodeMerkleRoll(merkleRootAcct.data); + return merkleRoll.roll.changeLogs[merkleRoll.roll.activeIndex].root.toBuffer(); +} + +export function getMerkleRollAccountSize( + maxDepth: number, + maxBufferSize: number, + canopyDepth?: number +): number { + let headerSize = 8 + 32; + let changeLogSize = (maxDepth * 32 + 32 + 4 + 4) * maxBufferSize; + let rightMostPathSize = maxDepth * 32 + 32 + 4 + 4; + let merkleRollSize = 8 + 8 + 16 + changeLogSize + rightMostPathSize; + let canopySize = 0; + if (canopyDepth) { + canopySize = ((1 << canopyDepth + 1) - 2) * 32 + } + return merkleRollSize + headerSize + canopySize; +} export async function createAllocTreeIx( connection: Connection, @@ -30,36 +70,3 @@ export async function createAllocTreeIx( }); } -export async function getCreateTreeIxs( - gummyroll: anchor.Program, - maxBufferSize: number, - maxDepth: number, - canopyDepth: number, - payer: PublicKey, - merkleRoll: PublicKey, - authority: Keypair, - appendAuthority: PublicKey, -): Promise { - const allocAccountIx = await createAllocTreeIx( - gummyroll.provider.connection, - maxBufferSize, - maxDepth, - canopyDepth, - payer, - merkleRoll, - ); - const initIx = gummyroll.instruction.initEmptyGummyroll( - maxDepth, - maxBufferSize, - { - accounts: { - merkleRoll, - authority: authority.publicKey, - candyWrapper: CANDY_WRAPPER_PROGRAM_ID - }, - signers: [authority], - }, - ) - - return [allocAccountIx, initIx]; -} diff --git a/contracts/sdk/gummyroll/src/generated/errors/index.ts b/contracts/sdk/gummyroll/src/generated/errors/index.ts new file mode 100644 index 00000000..c6ab71bc --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/errors/index.ts @@ -0,0 +1,147 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +type ErrorWithCode = Error & { code: number } +type MaybeErrorWithCode = ErrorWithCode | null | undefined + +const createErrorFromCodeLookup: Map ErrorWithCode> = new Map() +const createErrorFromNameLookup: Map ErrorWithCode> = new Map() + +/** + * IncorrectLeafLength: 'Incorrect leaf length. Expected vec of 32 bytes' + * + * @category Errors + * @category generated + */ +export class IncorrectLeafLengthError extends Error { + readonly code: number = 0x1770 + readonly name: string = 'IncorrectLeafLength' + constructor() { + super('Incorrect leaf length. Expected vec of 32 bytes') + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, IncorrectLeafLengthError) + } + } +} + +createErrorFromCodeLookup.set(0x1770, () => new IncorrectLeafLengthError()) +createErrorFromNameLookup.set( + 'IncorrectLeafLength', + () => new IncorrectLeafLengthError() +) + +/** + * ConcurrentMerkleTreeError: 'Concurrent merkle tree error' + * + * @category Errors + * @category generated + */ +export class ConcurrentMerkleTreeErrorError extends Error { + readonly code: number = 0x1771 + readonly name: string = 'ConcurrentMerkleTreeError' + constructor() { + super('Concurrent merkle tree error') + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ConcurrentMerkleTreeErrorError) + } + } +} + +createErrorFromCodeLookup.set( + 0x1771, + () => new ConcurrentMerkleTreeErrorError() +) +createErrorFromNameLookup.set( + 'ConcurrentMerkleTreeError', + () => new ConcurrentMerkleTreeErrorError() +) + +/** + * ZeroCopyError: 'Issue zero copying concurrent merkle tree data' + * + * @category Errors + * @category generated + */ +export class ZeroCopyErrorError extends Error { + readonly code: number = 0x1772 + readonly name: string = 'ZeroCopyError' + constructor() { + super('Issue zero copying concurrent merkle tree data') + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, ZeroCopyErrorError) + } + } +} + +createErrorFromCodeLookup.set(0x1772, () => new ZeroCopyErrorError()) +createErrorFromNameLookup.set('ZeroCopyError', () => new ZeroCopyErrorError()) + +/** + * MerkleRollConstantsError: 'An unsupported max depth or max buffer size constant was provided' + * + * @category Errors + * @category generated + */ +export class MerkleRollConstantsErrorError extends Error { + readonly code: number = 0x1773 + readonly name: string = 'MerkleRollConstantsError' + constructor() { + super('An unsupported max depth or max buffer size constant was provided') + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, MerkleRollConstantsErrorError) + } + } +} + +createErrorFromCodeLookup.set(0x1773, () => new MerkleRollConstantsErrorError()) +createErrorFromNameLookup.set( + 'MerkleRollConstantsError', + () => new MerkleRollConstantsErrorError() +) + +/** + * CanopyLengthMismatch: 'Expected a different byte length for the merkle roll canopy' + * + * @category Errors + * @category generated + */ +export class CanopyLengthMismatchError extends Error { + readonly code: number = 0x1774 + readonly name: string = 'CanopyLengthMismatch' + constructor() { + super('Expected a different byte length for the merkle roll canopy') + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, CanopyLengthMismatchError) + } + } +} + +createErrorFromCodeLookup.set(0x1774, () => new CanopyLengthMismatchError()) +createErrorFromNameLookup.set( + 'CanopyLengthMismatch', + () => new CanopyLengthMismatchError() +) + +/** + * Attempts to resolve a custom program error from the provided error code. + * @category Errors + * @category generated + */ +export function errorFromCode(code: number): MaybeErrorWithCode { + const createError = createErrorFromCodeLookup.get(code) + return createError != null ? createError() : null +} + +/** + * Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'. + * @category Errors + * @category generated + */ +export function errorFromName(name: string): MaybeErrorWithCode { + const createError = createErrorFromNameLookup.get(name) + return createError != null ? createError() : null +} diff --git a/contracts/sdk/gummyroll/src/index.ts b/contracts/sdk/gummyroll/src/generated/index.ts similarity index 61% rename from contracts/sdk/gummyroll/src/index.ts rename to contracts/sdk/gummyroll/src/generated/index.ts index be3d5a84..17a61e3f 100644 --- a/contracts/sdk/gummyroll/src/index.ts +++ b/contracts/sdk/gummyroll/src/generated/index.ts @@ -1,9 +1,7 @@ -import { PublicKey } from '@solana/web3.js'; -export * from './instructions'; -export * from './accounts'; -export * from './types'; -export * from './utils'; -export * from './convenience'; +import { PublicKey } from '@solana/web3.js' +export * from './errors' +export * from './instructions' +export * from './types' /** * Program address diff --git a/contracts/sdk/gummyroll/src/generated/instructions/append.ts b/contracts/sdk/gummyroll/src/generated/instructions/append.ts new file mode 100644 index 00000000..0b90403b --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/instructions/append.ts @@ -0,0 +1,98 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet' +import * as web3 from '@solana/web3.js' + +/** + * @category Instructions + * @category Append + * @category generated + */ +export type AppendInstructionArgs = { + leaf: number[] /* size: 32 */ +} +/** + * @category Instructions + * @category Append + * @category generated + */ +export const appendStruct = new beet.BeetArgsStruct< + AppendInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */ + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['leaf', beet.uniformFixedSizeArray(beet.u8, 32)], + ], + 'AppendInstructionArgs' +) +/** + * Accounts required by the _append_ instruction + * + * @property [_writable_] merkleRoll + * @property [**signer**] authority + * @property [] candyWrapper + * @category Instructions + * @category Append + * @category generated + */ +export type AppendInstructionAccounts = { + merkleRoll: web3.PublicKey + authority: web3.PublicKey + candyWrapper: web3.PublicKey +} + +export const appendInstructionDiscriminator = [ + 149, 120, 18, 222, 236, 225, 88, 203, +] + +/** + * Creates a _Append_ instruction. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category Append + * @category generated + */ +export function createAppendInstruction( + accounts: AppendInstructionAccounts, + args: AppendInstructionArgs, + programId = new web3.PublicKey('GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU') +) { + const [data] = appendStruct.serialize({ + instructionDiscriminator: appendInstructionDiscriminator, + ...args, + }) + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.merkleRoll, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.candyWrapper, + isWritable: false, + isSigner: false, + }, + ] + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }) + return ix +} diff --git a/contracts/sdk/gummyroll/src/generated/instructions/index.ts b/contracts/sdk/gummyroll/src/generated/instructions/index.ts new file mode 100644 index 00000000..d7b59a18 --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/instructions/index.ts @@ -0,0 +1,7 @@ +export * from './append' +export * from './initEmptyGummyroll' +export * from './initGummyrollWithRoot' +export * from './insertOrAppend' +export * from './replaceLeaf' +export * from './transferAuthority' +export * from './verifyLeaf' diff --git a/contracts/sdk/gummyroll/src/generated/instructions/initEmptyGummyroll.ts b/contracts/sdk/gummyroll/src/generated/instructions/initEmptyGummyroll.ts new file mode 100644 index 00000000..77f73155 --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/instructions/initEmptyGummyroll.ts @@ -0,0 +1,100 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet' +import * as web3 from '@solana/web3.js' + +/** + * @category Instructions + * @category InitEmptyGummyroll + * @category generated + */ +export type InitEmptyGummyrollInstructionArgs = { + maxDepth: number + maxBufferSize: number +} +/** + * @category Instructions + * @category InitEmptyGummyroll + * @category generated + */ +export const initEmptyGummyrollStruct = new beet.BeetArgsStruct< + InitEmptyGummyrollInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */ + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['maxDepth', beet.u32], + ['maxBufferSize', beet.u32], + ], + 'InitEmptyGummyrollInstructionArgs' +) +/** + * Accounts required by the _initEmptyGummyroll_ instruction + * + * @property [_writable_] merkleRoll + * @property [**signer**] authority + * @property [] candyWrapper + * @category Instructions + * @category InitEmptyGummyroll + * @category generated + */ +export type InitEmptyGummyrollInstructionAccounts = { + merkleRoll: web3.PublicKey + authority: web3.PublicKey + candyWrapper: web3.PublicKey +} + +export const initEmptyGummyrollInstructionDiscriminator = [ + 147, 113, 217, 25, 81, 205, 253, 184, +] + +/** + * Creates a _InitEmptyGummyroll_ instruction. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category InitEmptyGummyroll + * @category generated + */ +export function createInitEmptyGummyrollInstruction( + accounts: InitEmptyGummyrollInstructionAccounts, + args: InitEmptyGummyrollInstructionArgs, + programId = new web3.PublicKey('GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU') +) { + const [data] = initEmptyGummyrollStruct.serialize({ + instructionDiscriminator: initEmptyGummyrollInstructionDiscriminator, + ...args, + }) + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.merkleRoll, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.candyWrapper, + isWritable: false, + isSigner: false, + }, + ] + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }) + return ix +} diff --git a/contracts/sdk/gummyroll/src/generated/instructions/initGummyrollWithRoot.ts b/contracts/sdk/gummyroll/src/generated/instructions/initGummyrollWithRoot.ts new file mode 100644 index 00000000..2c0be0ed --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/instructions/initGummyrollWithRoot.ts @@ -0,0 +1,110 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet' +import * as web3 from '@solana/web3.js' + +/** + * @category Instructions + * @category InitGummyrollWithRoot + * @category generated + */ +export type InitGummyrollWithRootInstructionArgs = { + maxDepth: number + maxBufferSize: number + root: number[] /* size: 32 */ + leaf: number[] /* size: 32 */ + index: number + changelogDbUri: string + metadataDbUri: string +} +/** + * @category Instructions + * @category InitGummyrollWithRoot + * @category generated + */ +export const initGummyrollWithRootStruct = new beet.FixableBeetArgsStruct< + InitGummyrollWithRootInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */ + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['maxDepth', beet.u32], + ['maxBufferSize', beet.u32], + ['root', beet.uniformFixedSizeArray(beet.u8, 32)], + ['leaf', beet.uniformFixedSizeArray(beet.u8, 32)], + ['index', beet.u32], + ['changelogDbUri', beet.utf8String], + ['metadataDbUri', beet.utf8String], + ], + 'InitGummyrollWithRootInstructionArgs' +) +/** + * Accounts required by the _initGummyrollWithRoot_ instruction + * + * @property [_writable_] merkleRoll + * @property [**signer**] authority + * @property [] candyWrapper + * @category Instructions + * @category InitGummyrollWithRoot + * @category generated + */ +export type InitGummyrollWithRootInstructionAccounts = { + merkleRoll: web3.PublicKey + authority: web3.PublicKey + candyWrapper: web3.PublicKey +} + +export const initGummyrollWithRootInstructionDiscriminator = [ + 31, 99, 16, 253, 13, 51, 162, 190, +] + +/** + * Creates a _InitGummyrollWithRoot_ instruction. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category InitGummyrollWithRoot + * @category generated + */ +export function createInitGummyrollWithRootInstruction( + accounts: InitGummyrollWithRootInstructionAccounts, + args: InitGummyrollWithRootInstructionArgs, + programId = new web3.PublicKey('GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU') +) { + const [data] = initGummyrollWithRootStruct.serialize({ + instructionDiscriminator: initGummyrollWithRootInstructionDiscriminator, + ...args, + }) + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.merkleRoll, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.candyWrapper, + isWritable: false, + isSigner: false, + }, + ] + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }) + return ix +} diff --git a/contracts/sdk/gummyroll/src/generated/instructions/insertOrAppend.ts b/contracts/sdk/gummyroll/src/generated/instructions/insertOrAppend.ts new file mode 100644 index 00000000..91cb5ead --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/instructions/insertOrAppend.ts @@ -0,0 +1,102 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet' +import * as web3 from '@solana/web3.js' + +/** + * @category Instructions + * @category InsertOrAppend + * @category generated + */ +export type InsertOrAppendInstructionArgs = { + root: number[] /* size: 32 */ + leaf: number[] /* size: 32 */ + index: number +} +/** + * @category Instructions + * @category InsertOrAppend + * @category generated + */ +export const insertOrAppendStruct = new beet.BeetArgsStruct< + InsertOrAppendInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */ + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['root', beet.uniformFixedSizeArray(beet.u8, 32)], + ['leaf', beet.uniformFixedSizeArray(beet.u8, 32)], + ['index', beet.u32], + ], + 'InsertOrAppendInstructionArgs' +) +/** + * Accounts required by the _insertOrAppend_ instruction + * + * @property [_writable_] merkleRoll + * @property [**signer**] authority + * @property [] candyWrapper + * @category Instructions + * @category InsertOrAppend + * @category generated + */ +export type InsertOrAppendInstructionAccounts = { + merkleRoll: web3.PublicKey + authority: web3.PublicKey + candyWrapper: web3.PublicKey +} + +export const insertOrAppendInstructionDiscriminator = [ + 6, 42, 50, 190, 51, 109, 178, 168, +] + +/** + * Creates a _InsertOrAppend_ instruction. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category InsertOrAppend + * @category generated + */ +export function createInsertOrAppendInstruction( + accounts: InsertOrAppendInstructionAccounts, + args: InsertOrAppendInstructionArgs, + programId = new web3.PublicKey('GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU') +) { + const [data] = insertOrAppendStruct.serialize({ + instructionDiscriminator: insertOrAppendInstructionDiscriminator, + ...args, + }) + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.merkleRoll, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.candyWrapper, + isWritable: false, + isSigner: false, + }, + ] + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }) + return ix +} diff --git a/contracts/sdk/gummyroll/src/generated/instructions/replaceLeaf.ts b/contracts/sdk/gummyroll/src/generated/instructions/replaceLeaf.ts new file mode 100644 index 00000000..3567a57e --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/instructions/replaceLeaf.ts @@ -0,0 +1,104 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet' +import * as web3 from '@solana/web3.js' + +/** + * @category Instructions + * @category ReplaceLeaf + * @category generated + */ +export type ReplaceLeafInstructionArgs = { + root: number[] /* size: 32 */ + previousLeaf: number[] /* size: 32 */ + newLeaf: number[] /* size: 32 */ + index: number +} +/** + * @category Instructions + * @category ReplaceLeaf + * @category generated + */ +export const replaceLeafStruct = new beet.BeetArgsStruct< + ReplaceLeafInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */ + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['root', beet.uniformFixedSizeArray(beet.u8, 32)], + ['previousLeaf', beet.uniformFixedSizeArray(beet.u8, 32)], + ['newLeaf', beet.uniformFixedSizeArray(beet.u8, 32)], + ['index', beet.u32], + ], + 'ReplaceLeafInstructionArgs' +) +/** + * Accounts required by the _replaceLeaf_ instruction + * + * @property [_writable_] merkleRoll + * @property [**signer**] authority + * @property [] candyWrapper + * @category Instructions + * @category ReplaceLeaf + * @category generated + */ +export type ReplaceLeafInstructionAccounts = { + merkleRoll: web3.PublicKey + authority: web3.PublicKey + candyWrapper: web3.PublicKey +} + +export const replaceLeafInstructionDiscriminator = [ + 204, 165, 76, 100, 73, 147, 0, 128, +] + +/** + * Creates a _ReplaceLeaf_ instruction. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category ReplaceLeaf + * @category generated + */ +export function createReplaceLeafInstruction( + accounts: ReplaceLeafInstructionAccounts, + args: ReplaceLeafInstructionArgs, + programId = new web3.PublicKey('GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU') +) { + const [data] = replaceLeafStruct.serialize({ + instructionDiscriminator: replaceLeafInstructionDiscriminator, + ...args, + }) + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.merkleRoll, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.candyWrapper, + isWritable: false, + isSigner: false, + }, + ] + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }) + return ix +} diff --git a/contracts/sdk/gummyroll/src/generated/instructions/transferAuthority.ts b/contracts/sdk/gummyroll/src/generated/instructions/transferAuthority.ts new file mode 100644 index 00000000..3af75341 --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/instructions/transferAuthority.ts @@ -0,0 +1,92 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as web3 from '@solana/web3.js' +import * as beetSolana from '@metaplex-foundation/beet-solana' +import * as beet from '@metaplex-foundation/beet' + +/** + * @category Instructions + * @category TransferAuthority + * @category generated + */ +export type TransferAuthorityInstructionArgs = { + newAuthority: web3.PublicKey +} +/** + * @category Instructions + * @category TransferAuthority + * @category generated + */ +export const transferAuthorityStruct = new beet.BeetArgsStruct< + TransferAuthorityInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */ + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['newAuthority', beetSolana.publicKey], + ], + 'TransferAuthorityInstructionArgs' +) +/** + * Accounts required by the _transferAuthority_ instruction + * + * @property [_writable_] merkleRoll + * @property [**signer**] authority + * @category Instructions + * @category TransferAuthority + * @category generated + */ +export type TransferAuthorityInstructionAccounts = { + merkleRoll: web3.PublicKey + authority: web3.PublicKey +} + +export const transferAuthorityInstructionDiscriminator = [ + 48, 169, 76, 72, 229, 180, 55, 161, +] + +/** + * Creates a _TransferAuthority_ instruction. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category TransferAuthority + * @category generated + */ +export function createTransferAuthorityInstruction( + accounts: TransferAuthorityInstructionAccounts, + args: TransferAuthorityInstructionArgs, + programId = new web3.PublicKey('GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU') +) { + const [data] = transferAuthorityStruct.serialize({ + instructionDiscriminator: transferAuthorityInstructionDiscriminator, + ...args, + }) + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.merkleRoll, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: true, + }, + ] + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }) + return ix +} diff --git a/contracts/sdk/gummyroll/src/generated/instructions/verifyLeaf.ts b/contracts/sdk/gummyroll/src/generated/instructions/verifyLeaf.ts new file mode 100644 index 00000000..62a66a24 --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/instructions/verifyLeaf.ts @@ -0,0 +1,88 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet' +import * as web3 from '@solana/web3.js' + +/** + * @category Instructions + * @category VerifyLeaf + * @category generated + */ +export type VerifyLeafInstructionArgs = { + root: number[] /* size: 32 */ + leaf: number[] /* size: 32 */ + index: number +} +/** + * @category Instructions + * @category VerifyLeaf + * @category generated + */ +export const verifyLeafStruct = new beet.BeetArgsStruct< + VerifyLeafInstructionArgs & { + instructionDiscriminator: number[] /* size: 8 */ + } +>( + [ + ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], + ['root', beet.uniformFixedSizeArray(beet.u8, 32)], + ['leaf', beet.uniformFixedSizeArray(beet.u8, 32)], + ['index', beet.u32], + ], + 'VerifyLeafInstructionArgs' +) +/** + * Accounts required by the _verifyLeaf_ instruction + * + * @property [] merkleRoll + * @category Instructions + * @category VerifyLeaf + * @category generated + */ +export type VerifyLeafInstructionAccounts = { + merkleRoll: web3.PublicKey +} + +export const verifyLeafInstructionDiscriminator = [ + 124, 220, 22, 223, 104, 10, 250, 224, +] + +/** + * Creates a _VerifyLeaf_ instruction. + * + * @param accounts that will be accessed while the instruction is processed + * @param args to provide as instruction data to the program + * + * @category Instructions + * @category VerifyLeaf + * @category generated + */ +export function createVerifyLeafInstruction( + accounts: VerifyLeafInstructionAccounts, + args: VerifyLeafInstructionArgs, + programId = new web3.PublicKey('GRoLLzvxpxxu2PGNJMMeZPyMxjAUH9pKqxGXV9DGiceU') +) { + const [data] = verifyLeafStruct.serialize({ + instructionDiscriminator: verifyLeafInstructionDiscriminator, + ...args, + }) + const keys: web3.AccountMeta[] = [ + { + pubkey: accounts.merkleRoll, + isWritable: false, + isSigner: false, + }, + ] + + const ix = new web3.TransactionInstruction({ + programId, + keys, + data, + }) + return ix +} diff --git a/contracts/sdk/gummyroll/src/generated/types/PathNode.ts b/contracts/sdk/gummyroll/src/generated/types/PathNode.ts new file mode 100644 index 00000000..11b2dc37 --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/types/PathNode.ts @@ -0,0 +1,24 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + +import * as beet from '@metaplex-foundation/beet' +export type PathNode = { + node: number[] /* size: 32 */ + index: number +} + +/** + * @category userTypes + * @category generated + */ +export const pathNodeBeet = new beet.BeetArgsStruct( + [ + ['node', beet.uniformFixedSizeArray(beet.u8, 32)], + ['index', beet.u32], + ], + 'PathNode' +) diff --git a/contracts/sdk/gummyroll/src/generated/types/index.ts b/contracts/sdk/gummyroll/src/generated/types/index.ts new file mode 100644 index 00000000..54e42aa4 --- /dev/null +++ b/contracts/sdk/gummyroll/src/generated/types/index.ts @@ -0,0 +1 @@ +export * from './PathNode' diff --git a/contracts/sdk/gummyroll/src/instructions/index.ts b/contracts/sdk/gummyroll/src/instructions/index.ts index fc095962..5b61eba5 100644 --- a/contracts/sdk/gummyroll/src/instructions/index.ts +++ b/contracts/sdk/gummyroll/src/instructions/index.ts @@ -1,107 +1,45 @@ -import { Program } from "@project-serum/anchor"; -import { Gummyroll } from "../types"; import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { CANDY_WRAPPER_PROGRAM_ID } from "@sorend-solana/utils"; +import { + InitGummyrollWithRootInstructionArgs, + InitGummyrollWithRootInstructionAccounts, + createInitGummyrollWithRootInstruction, + VerifyLeafInstructionAccounts, + VerifyLeafInstructionArgs, + createVerifyLeafInstruction, + ReplaceLeafInstructionAccounts, + ReplaceLeafInstructionArgs, + createReplaceLeafInstruction +} from "../generated" +import { + addProof +} from "../convenience" -/** - * Modifies given instruction - */ -export function addProof( - instruction: TransactionInstruction, - nodeProof: Buffer[], +export function createInitGummyrollWithRootWithProofInstruction( + accts: InitGummyrollWithRootInstructionAccounts, + args: InitGummyrollWithRootInstructionArgs, + proof: Buffer[] ): TransactionInstruction { - instruction.keys = instruction.keys.concat( - nodeProof.map((node) => { - return { - pubkey: new PublicKey(node), - isSigner: false, - isWritable: false, - }; - }) - ) - return instruction; + let ix = createInitGummyrollWithRootInstruction(accts, args); + ix = addProof(ix, proof); + return ix } -export function createReplaceIx( - gummyroll: Program, - authority: Keypair, - merkleRoll: PublicKey, - treeRoot: Buffer, - previousLeaf: Buffer, - newLeaf: Buffer, - index: number, - proof: Buffer[] +export function createVerifyLeafWithProofInstruction( + accts: VerifyLeafInstructionAccounts, + args: VerifyLeafInstructionArgs, + proof: Buffer[] ): TransactionInstruction { - return addProof(gummyroll.instruction.replaceLeaf( - Array.from(treeRoot), - Array.from(previousLeaf), - Array.from(newLeaf), - index, - { - accounts: { - merkleRoll, - authority: authority.publicKey, - candyWrapper: CANDY_WRAPPER_PROGRAM_ID, - }, - signers: [authority], - } - ), proof); + let ix = createVerifyLeafInstruction(accts, args); + ix = addProof(ix, proof); + return ix } -export function createAppendIx( - gummyroll: Program, - newLeaf: Buffer | ArrayLike, - authority: Keypair, - merkleRoll: PublicKey, +export function createReplaceLeafWithProofInstruction( + accts: ReplaceLeafInstructionAccounts, + args: ReplaceLeafInstructionArgs, + proof: Buffer[] ): TransactionInstruction { - return gummyroll.instruction.append( - Array.from(newLeaf), - { - accounts: { - merkleRoll, - authority: authority.publicKey, - candyWrapper: CANDY_WRAPPER_PROGRAM_ID, - }, - signers: [authority], - } - ); -} - -export function createTransferAuthorityIx( - gummyroll: Program, - authority: Keypair, - merkleRoll: PublicKey, - newAuthority: PublicKey, -): TransactionInstruction { - return gummyroll.instruction.transferAuthority( - newAuthority, - { - accounts: { - merkleRoll, - authority: authority.publicKey, - }, - signers: [authority], - } - ); -} - -export function createVerifyLeafIx( - gummyroll: Program, - merkleRoll: PublicKey, - root: Buffer, - leaf: Buffer, - index: number, - proof: Buffer[], -): TransactionInstruction { - return addProof(gummyroll.instruction.verifyLeaf( - Array.from(root), - Array.from(leaf), - index, - { - accounts: { - merkleRoll - }, - signers: [], - } - ), proof); -} + let ix = createReplaceLeafInstruction(accts, args); + ix = addProof(ix, proof); + return ix +} \ No newline at end of file diff --git a/contracts/sdk/gummyroll/src/types/index.ts b/contracts/sdk/gummyroll/src/types/index.ts deleted file mode 100644 index 1ee87038..00000000 --- a/contracts/sdk/gummyroll/src/types/index.ts +++ /dev/null @@ -1,762 +0,0 @@ -// TODO(sorend): do we want to export the Anchor type in the SDK? We can modify all imports from contracts/target if so, but then we might need to custom hook into anchor build/test to keep this up to date. -export type Gummyroll = { - "version": "0.1.0", - "name": "gummyroll", - "instructions": [ - { - "name": "initEmptyGummyroll", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "maxDepth", - "type": "u32" - }, - { - "name": "maxBufferSize", - "type": "u32" - } - ] - }, - { - "name": "initGummyrollWithRoot", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "maxDepth", - "type": "u32" - }, - { - "name": "maxBufferSize", - "type": "u32" - }, - { - "name": "root", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - }, - { - "name": "changelogDbUri", - "type": "string" - }, - { - "name": "metadataDbUri", - "type": "string" - } - ] - }, - { - "name": "replaceLeaf", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "root", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "previousLeaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "newLeaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - } - ] - }, - { - "name": "transferAuthority", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "newAuthority", - "type": "publicKey" - } - ] - }, - { - "name": "verifyLeaf", - "accounts": [ - { - "name": "merkleRoll", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "root", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - } - ] - }, - { - "name": "append", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - }, - { - "name": "insertOrAppend", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "root", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - } - ] - } - ], - "types": [ - { - "name": "PathNode", - "type": { - "kind": "struct", - "fields": [ - { - "name": "node", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - } - ] - } - } - ], - "events": [ - { - "name": "NewLeafEvent", - "fields": [ - { - "name": "id", - "type": "publicKey", - "index": false - }, - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - }, - "index": false - } - ] - }, - { - "name": "ChangeLogEvent", - "fields": [ - { - "name": "id", - "type": "publicKey", - "index": false - }, - { - "name": "path", - "type": { - "vec": { - "defined": "PathNode" - } - }, - "index": false - }, - { - "name": "seq", - "type": "u64", - "index": false - }, - { - "name": "index", - "type": "u32", - "index": false - } - ] - } - ], - "errors": [ - { - "code": 6000, - "name": "IncorrectLeafLength", - "msg": "Incorrect leaf length. Expected vec of 32 bytes" - }, - { - "code": 6001, - "name": "ConcurrentMerkleTreeError", - "msg": "Concurrent merkle tree error" - }, - { - "code": 6002, - "name": "ZeroCopyError", - "msg": "Issue zero copying concurrent merkle tree data" - }, - { - "code": 6003, - "name": "MerkleRollConstantsError", - "msg": "An unsupported max depth or max buffer size constant was provided" - }, - { - "code": 6004, - "name": "CanopyLengthMismatch", - "msg": "Expected a different byte length for the merkle roll canopy" - } - ] -}; - -export const IDL: Gummyroll = { - "version": "0.1.0", - "name": "gummyroll", - "instructions": [ - { - "name": "initEmptyGummyroll", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "maxDepth", - "type": "u32" - }, - { - "name": "maxBufferSize", - "type": "u32" - } - ] - }, - { - "name": "initGummyrollWithRoot", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "maxDepth", - "type": "u32" - }, - { - "name": "maxBufferSize", - "type": "u32" - }, - { - "name": "root", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - }, - { - "name": "changelogDbUri", - "type": "string" - }, - { - "name": "metadataDbUri", - "type": "string" - } - ] - }, - { - "name": "replaceLeaf", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "root", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "previousLeaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "newLeaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - } - ] - }, - { - "name": "transferAuthority", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "newAuthority", - "type": "publicKey" - } - ] - }, - { - "name": "verifyLeaf", - "accounts": [ - { - "name": "merkleRoll", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "root", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - } - ] - }, - { - "name": "append", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - }, - { - "name": "insertOrAppend", - "accounts": [ - { - "name": "merkleRoll", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "candyWrapper", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "root", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - } - ] - } - ], - "types": [ - { - "name": "PathNode", - "type": { - "kind": "struct", - "fields": [ - { - "name": "node", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "index", - "type": "u32" - } - ] - } - } - ], - "events": [ - { - "name": "NewLeafEvent", - "fields": [ - { - "name": "id", - "type": "publicKey", - "index": false - }, - { - "name": "leaf", - "type": { - "array": [ - "u8", - 32 - ] - }, - "index": false - } - ] - }, - { - "name": "ChangeLogEvent", - "fields": [ - { - "name": "id", - "type": "publicKey", - "index": false - }, - { - "name": "path", - "type": { - "vec": { - "defined": "PathNode" - } - }, - "index": false - }, - { - "name": "seq", - "type": "u64", - "index": false - }, - { - "name": "index", - "type": "u32", - "index": false - } - ] - } - ], - "errors": [ - { - "code": 6000, - "name": "IncorrectLeafLength", - "msg": "Incorrect leaf length. Expected vec of 32 bytes" - }, - { - "code": 6001, - "name": "ConcurrentMerkleTreeError", - "msg": "Concurrent merkle tree error" - }, - { - "code": 6002, - "name": "ZeroCopyError", - "msg": "Issue zero copying concurrent merkle tree data" - }, - { - "code": 6003, - "name": "MerkleRollConstantsError", - "msg": "An unsupported max depth or max buffer size constant was provided" - }, - { - "code": 6004, - "name": "CanopyLengthMismatch", - "msg": "Expected a different byte length for the merkle roll canopy" - } - ] -}; diff --git a/contracts/sdk/gummyroll/src/utils/index.ts b/contracts/sdk/gummyroll/src/utils/index.ts deleted file mode 100644 index dbbf0519..00000000 --- a/contracts/sdk/gummyroll/src/utils/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { - decodeMerkleRoll, - getMerkleRollAccountSize, -} from "../accounts"; -import { - PublicKey, - Keypair, - SystemProgram, - Transaction, - Connection as web3Connection, - LAMPORTS_PER_SOL, - Connection, - } from "@solana/web3.js"; - -export async function getRootOfOnChainMerkleRoot(connection: Connection, merkleRollAccountKey: PublicKey): Promise { - const merkleRootAcct = await connection.getAccountInfo(merkleRollAccountKey); - if (!merkleRootAcct) { - throw new Error("Merkle Root account data unexpectedly null!"); - } - const merkleRoll = decodeMerkleRoll(merkleRootAcct.data); - return merkleRoll.roll.changeLogs[merkleRoll.roll.activeIndex].root.toBuffer(); -} - diff --git a/contracts/sdk/gummyroll/tsconfig.base.json b/contracts/sdk/gummyroll/tsconfig.base.json index 4d9dbac2..86f87ff3 100644 --- a/contracts/sdk/gummyroll/tsconfig.base.json +++ b/contracts/sdk/gummyroll/tsconfig.base.json @@ -15,7 +15,7 @@ "downlevelIteration": true, "baseUrl": ".", "typeRoots": [ - "src/types", + "src/generated/types", "node_modules/@types" ], } diff --git a/contracts/sdk/gummyroll/yarn.lock b/contracts/sdk/gummyroll/yarn.lock index 308c5818..24a330ff 100644 --- a/contracts/sdk/gummyroll/yarn.lock +++ b/contracts/sdk/gummyroll/yarn.lock @@ -152,11 +152,6 @@ "@solana/web3.js" "^1.50.1" borsh "^0.7.0" -"@types/chai@^4.3.0": - version "4.3.1" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" - integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== - "@types/connect@^3.4.33": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -173,25 +168,15 @@ "@types/qs" "*" "@types/range-parser" "*" -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - "@types/lodash@^4.14.159": version "4.14.182" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== -"@types/mocha@^9.0.0": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" - integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== - "@types/node@*": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/node@^12.12.54": version "12.20.55" @@ -215,11 +200,6 @@ dependencies: "@types/node" "*" -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -228,56 +208,11 @@ JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - ansicolors@^0.3.2, ansicolors@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" integrity sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg== -anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - base-x@^3.0.2: version "3.0.9" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" @@ -302,11 +237,6 @@ bigint-buffer@^1.1.5: dependencies: bindings "^1.3.0" -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - bindings@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -333,31 +263,11 @@ borsh@^0.7.0: bs58 "^4.0.0" text-encoding-utf-8 "^1.0.2" -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -372,11 +282,6 @@ bs58@^5.0.0: dependencies: base-x "^4.0.0" -buffer-from@^1.0.0, buffer-from@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - buffer-layout@^1.2.0, buffer-layout@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" @@ -418,83 +323,16 @@ camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0, camelcase@^6.2.1: +camelcase@^6.2.1: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -chai@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" - integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - loupe "^2.3.1" - pathval "^1.1.1" - type-detect "^4.0.5" - -chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== - -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - cross-fetch@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" @@ -507,13 +345,6 @@ crypto-hash@^1.3.0: resolved "https://registry.yarnpkg.com/crypto-hash/-/crypto-hash-1.3.0.tgz#b402cb08f4529e9f4f09346c3e275942f845e247" integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== -debug@4.3.3: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -521,33 +352,11 @@ debug@^4.3.3, debug@^4.3.4: dependencies: ms "2.1.2" -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" - delay@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -diff@^3.1.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - dot-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" @@ -569,11 +378,6 @@ elliptic@^6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -586,16 +390,6 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - eventemitter3@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -616,75 +410,6 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" @@ -693,11 +418,6 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -712,63 +432,11 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.3, inherits@^2.0.4: +inherits@^2.0.3, inherits@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" @@ -805,57 +473,21 @@ js-sha3@^0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - lodash@^4.17.20: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -loupe@^2.3.1: - version "2.3.4" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" - integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== - dependencies: - get-func-name "^2.0.0" - lower-case@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" @@ -870,11 +502,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -885,77 +512,11 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" - integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^3.0.4: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0, minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -mkdirp@^0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mocha@^9.0.3: - version "9.2.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" - integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.3" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - growl "1.10.5" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "4.2.1" - ms "2.1.3" - nanoid "3.3.1" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - which "2.0.2" - workerpool "6.2.0" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -nanoid@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" - integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== - no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" @@ -981,57 +542,11 @@ node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - pako@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - prettier@^2.5.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" @@ -1042,13 +557,6 @@ punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - react-native-url-polyfill@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/react-native-url-polyfill/-/react-native-url-polyfill-1.3.0.tgz#c1763de0f2a8c22cc3e959b654c8790622b6ef6a" @@ -1056,23 +564,11 @@ react-native-url-polyfill@^1.3.0: dependencies: whatwg-url-without-unicode "8.0.0-3" -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - regenerator-runtime@^0.13.4: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - rpc-websockets@^7.5.0: version "7.5.0" resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.0.tgz#bbeb87572e66703ff151e50af1658f98098e2748" @@ -1086,7 +582,7 @@ rpc-websockets@^7.5.0: bufferutil "^4.0.1" utf-8-validate "^5.0.2" -safe-buffer@^5.0.1, safe-buffer@^5.1.0: +safe-buffer@^5.0.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -1107,13 +603,6 @@ semver@^7.3.7: dependencies: lru-cache "^6.0.0" -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - snake-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" @@ -1122,19 +611,6 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -source-map-support@^0.5.6: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - spok@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/spok/-/spok-1.4.3.tgz#8516234e6bd8caf0e10567bd675e15fd03b5ceb8" @@ -1142,51 +618,11 @@ spok@^1.4.3: dependencies: ansicolors "~0.3.2" -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - -strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - superstruct@^0.14.2: version "0.14.2" resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - text-encoding-utf-8@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" @@ -1202,13 +638,6 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - toml@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" @@ -1219,39 +648,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -ts-mocha@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-10.0.0.tgz#41a8d099ac90dbbc64b06976c5025ffaebc53cb9" - integrity sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw== - dependencies: - ts-node "7.0.1" - optionalDependencies: - tsconfig-paths "^3.5.0" - -ts-node@7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" - integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== - dependencies: - arrify "^1.0.0" - buffer-from "^1.1.0" - diff "^3.1.0" - make-error "^1.1.1" - minimist "^1.2.0" - mkdirp "^0.5.1" - source-map-support "^0.5.6" - yn "^2.0.0" - -tsconfig-paths@^3.5.0: - version "3.14.1" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" - integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.6" - strip-bom "^3.0.0" - tslib@^2.0.3: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" @@ -1262,11 +658,6 @@ tweetnacl@^1.0.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - typescript@^4.3.5: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" @@ -1311,32 +702,6 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -workerpool@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" - integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - ws@^7.4.5: version "7.5.9" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" @@ -1347,55 +712,7 @@ ws@^8.5.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yn@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" - integrity sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/contracts/sdk/indexer/package.json b/contracts/sdk/indexer/package.json index 0027b5a5..a1752655 100644 --- a/contracts/sdk/indexer/package.json +++ b/contracts/sdk/indexer/package.json @@ -9,7 +9,7 @@ "@project-serum/anchor": "0.24.2", "@solana/web3.js": "^1.50.1", "@solana/spl-token": "^0.1.8", - "@sorend-solana/gummyroll": "^0.0.5", + "@sorend-solana/gummyroll": "^0.0.6", "@sorend-solana/utils": "^0.0.5", "@sorend-solana/bubblegum": "^0.0.6", "@sorend-solana/gumball-machine": "^0.0.5", diff --git a/contracts/sdk/indexer/yarn.lock b/contracts/sdk/indexer/yarn.lock index 35f9e1d8..b3ba03b2 100644 --- a/contracts/sdk/indexer/yarn.lock +++ b/contracts/sdk/indexer/yarn.lock @@ -202,6 +202,17 @@ borsh "^0.7.0" chai "^4.3.4" +"@sorend-solana/gummyroll@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@sorend-solana/gummyroll/-/gummyroll-0.0.6.tgz#1f95f67bb0f4ec09a0e9813237ff632646aae9f0" + integrity sha512-2v66GDvmbhZystKCO6eGD59OQcDkVHGyMxFTJXXSipbWQo2wx5uYaU1y5nQUTYlOBpgbjIPcV+LACSyXqrCx7A== + dependencies: + "@metaplex-foundation/beet" "^0.4.0" + "@metaplex-foundation/beet-solana" "^0.3.0" + "@project-serum/anchor" "0.24.2" + "@solana/web3.js" "^1.50.1" + "@sorend-solana/utils" "^0.0.5" + "@sorend-solana/utils@^0.0.5": version "0.0.5" resolved "https://registry.yarnpkg.com/@sorend-solana/utils/-/utils-0.0.5.tgz#d0e21445c59a7deba06bceea3ad3caff88b04ea3" @@ -239,9 +250,9 @@ integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== "@types/node@*": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/node@^12.12.54": version "12.20.55" @@ -1620,9 +1631,9 @@ socks@^2.6.2: smart-buffer "^4.2.0" sqlite3@^5.0.8: - version "5.0.10" - resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.0.10.tgz#64e1efb1b5a1ae343d2cc64ce9e582e5f5db24ba" - integrity sha512-xG4XPp7+b/lIlb/acs4XzBmmahI1Qq3Yhy+jZnZJivwB6DXpoOpGR6QinRbsQkHJIvMZyUsJDXouSva/JXcWFA== + version "5.0.11" + resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.0.11.tgz#102c835d70be66da9d95a383fd6ea084a082ef7f" + integrity sha512-4akFOr7u9lJEeAWLJxmwiV43DJcGV7w3ab7SjQFAFaTVyknY3rZjvXTKIVtWqUoY4xwhjwoHKYs2HDW2SoHVsA== dependencies: "@mapbox/node-pre-gyp" "^1.0.0" node-addon-api "^4.2.0" diff --git a/contracts/sdk/sugar-shack/yarn.lock b/contracts/sdk/sugar-shack/yarn.lock index 59aa7aec..82aca709 100644 --- a/contracts/sdk/sugar-shack/yarn.lock +++ b/contracts/sdk/sugar-shack/yarn.lock @@ -155,9 +155,9 @@ integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== "@types/node@*": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/node@^12.12.54": version "12.20.55" diff --git a/contracts/sdk/utils/yarn.lock b/contracts/sdk/utils/yarn.lock index 7b8bf50c..c88d3d8f 100644 --- a/contracts/sdk/utils/yarn.lock +++ b/contracts/sdk/utils/yarn.lock @@ -119,9 +119,9 @@ integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== "@types/node@*": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/node@^12.12.54": version "12.20.55" diff --git a/contracts/tests/bubblegum-test.ts b/contracts/tests/bubblegum-test.ts index ce0cbf22..bbcabbfa 100644 --- a/contracts/tests/bubblegum-test.ts +++ b/contracts/tests/bubblegum-test.ts @@ -35,13 +35,11 @@ import { } from "@sorend-solana/bubblegum"; import { buildTree, Tree } from "./merkle-tree"; import { - decodeMerkleRoll, - getMerkleRollAccountSize, getRootOfOnChainMerkleRoot, - assertOnChainMerkleRollProperties, - createTransferAuthorityIx, - createAllocTreeIx, } from "@sorend-solana/gummyroll"; +import { + assertOnChainMerkleRollProperties +} from "./utils"; import NodeWallet from "@project-serum/anchor/dist/cjs/nodewallet"; import { ASSOCIATED_TOKEN_PROGRAM_ID, diff --git a/contracts/tests/gumball-machine-test.ts b/contracts/tests/gumball-machine-test.ts index c883189a..221ec1bd 100644 --- a/contracts/tests/gumball-machine-test.ts +++ b/contracts/tests/gumball-machine-test.ts @@ -17,8 +17,10 @@ import { assert } from "chai"; import { buildTree } from "./merkle-tree"; import { getMerkleRollAccountSize, - assertOnChainMerkleRollProperties, } from "@sorend-solana/gummyroll"; +import { + assertOnChainMerkleRollProperties +} from "./utils"; import { decodeGumballMachine, OnChainGumballMachine, diff --git a/contracts/tests/gummyroll-test.ts b/contracts/tests/gummyroll-test.ts index c9ef5611..f69b5b5b 100644 --- a/contracts/tests/gummyroll-test.ts +++ b/contracts/tests/gummyroll-test.ts @@ -11,7 +11,6 @@ import { } from "@solana/web3.js"; import { assert } from "chai"; import * as crypto from "crypto"; -import { Gummyroll } from "../target/types/gummyroll"; import { buildTree, hash, @@ -20,21 +19,25 @@ import { Tree, } from "./merkle-tree"; import { - createReplaceIx, - createAppendIx, - createTransferAuthorityIx, - decodeMerkleRoll, - getMerkleRollAccountSize, - createVerifyLeafIx, - assertOnChainMerkleRollProperties, createAllocTreeIx, + getMerkleRollAccountSize, + createInitGummyrollWithRootInstruction, + createInitGummyrollWithRootWithProofInstruction, + createInitEmptyGummyrollInstruction, + createAppendInstruction, + createVerifyLeafInstruction, + createVerifyLeafWithProofInstruction, + createReplaceLeafInstruction, + createReplaceLeafWithProofInstruction, + createTransferAuthorityInstruction, + decodeMerkleRoll } from "@sorend-solana/gummyroll"; +import { + assertOnChainMerkleRollProperties +} from "./utils" import { bs58 } from "@project-serum/anchor/dist/cjs/utils/bytes"; import { CANDY_WRAPPER_PROGRAM_ID, execute, logTx } from "@sorend-solana/utils"; -// @ts-ignore -let Gummyroll; - describe("gummyroll", () => { // Configure the client to use the local cluster. let offChainTree: Tree; @@ -68,7 +71,7 @@ describe("gummyroll", () => { const tree = buildTree(leaves); const allocAccountIx = await createAllocTreeIx( - Gummyroll.provider.connection, + connection, maxSize, maxDepth, canopyDepth, @@ -79,57 +82,56 @@ describe("gummyroll", () => { const ixs = [allocAccountIx]; if (numLeaves > 0) { const root = Array.from(tree.root.map((x) => x)); - const leaf = Array.from(leaves[numLeaves - 1]); + const leaf: number[] = Array.from(leaves[numLeaves - 1]); const proof = getProofOfLeaf(tree, numLeaves - 1).map((node) => { - return { - pubkey: new PublicKey(node.node), - isSigner: false, - isWritable: false, - }; + return node.node }); - ixs.push( - Gummyroll.instruction.initGummyrollWithRoot( + let initGummyRollWithRootInstr = createInitGummyrollWithRootWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID, + }, + { maxDepth, - maxSize, + maxBufferSize: maxSize, root, leaf, - numLeaves - 1, - "https://arweave.net/", - "https://arweave.net/", - { - accounts: { - merkleRoll: merkleRollKeypair.publicKey, - authority: payer.publicKey, - candyWrapper: CANDY_WRAPPER_PROGRAM_ID, - }, - signers: [payer], - remainingAccounts: proof, - } - ) + index: numLeaves-1, + changelogDbUri: "https://arweave.net/", + metadataDbUri: "https://arweave.net/" + }, + proof + ); + ixs.push( + initGummyRollWithRootInstr ); } else { ixs.push( - Gummyroll.instruction.initEmptyGummyroll(maxDepth, maxSize, { - accounts: { + createInitEmptyGummyrollInstruction( + { merkleRoll: merkleRollKeypair.publicKey, authority: payer.publicKey, candyWrapper: CANDY_WRAPPER_PROGRAM_ID, }, - signers: [payer], - }) + { + maxDepth, + maxBufferSize: maxSize + } + ) ); } - let txId = await execute(Gummyroll.provider, ixs, [ + let txId = await execute(anchor.getProvider(), ixs, [ payer, merkleRollKeypair, ]); if (canopyDepth) { - await logTx(Gummyroll.provider, txId as string); + await logTx(anchor.getProvider(), txId as string); } await assertOnChainMerkleRollProperties( - Gummyroll.provider.connection, + connection, maxDepth, maxSize, payer.publicKey, @@ -152,10 +154,9 @@ describe("gummyroll", () => { skipPreflight: true, }) ); - Gummyroll = anchor.workspace.Gummyroll as Program; - await Gummyroll.provider.connection.confirmTransaction( - await Gummyroll.provider.connection.requestAirdrop(payer.publicKey, 1e10), + await connection.confirmTransaction( + await connection.requestAirdrop(payer.publicKey, 1e10), "confirmed" ); }); @@ -166,19 +167,23 @@ describe("gummyroll", () => { }); it("Append single leaf", async () => { const newLeaf = crypto.randomBytes(32); - const appendIx = createAppendIx( - Gummyroll, - newLeaf, - payer, - merkleRollKeypair.publicKey - ); + const appendIx = createAppendInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID, + }, + { + leaf: Array.from(newLeaf) + } + ) - await execute(Gummyroll.provider, [appendIx], [payer]); + await execute(anchor.getProvider(), [appendIx], [payer]); updateTree(offChainTree, newLeaf, 1); const merkleRollAccount = - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ); const merkleRoll = decodeMerkleRoll(merkleRollAccount.data); @@ -198,30 +203,39 @@ describe("gummyroll", () => { return treeNode.node; }); - const verifyLeafIx = createVerifyLeafIx( - Gummyroll, - merkleRollKeypair.publicKey, - offChainTree.root, - previousLeaf, - index, + let verifyLeafIx = createVerifyLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + }, + { + root: Array.from(offChainTree.root), + leaf: Array.from(previousLeaf), + index + }, proof - ); - const replaceLeafIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - offChainTree.root, - previousLeaf, - newLeaf, - index, + ) + + let replaceLeafIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(offChainTree.root), + previousLeaf: Array.from(previousLeaf), + newLeaf: Array.from(newLeaf), + index + }, proof - ); - await execute(Gummyroll.provider, [verifyLeafIx, replaceLeafIx], [payer]); + ) + + await execute(anchor.getProvider(), [verifyLeafIx, replaceLeafIx], [payer]); updateTree(offChainTree, newLeaf, index); const merkleRollAccount = - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ); const merkleRoll = decodeMerkleRoll(merkleRollAccount.data); @@ -242,37 +256,43 @@ describe("gummyroll", () => { return crypto.randomBytes(32); }); - // Verify proof is invalid - const verifyLeafIx = createVerifyLeafIx( - Gummyroll, - merkleRollKeypair.publicKey, - offChainTree.root, - previousLeaf, - index, + let verifyLeafIx = createVerifyLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + }, + { + root: Array.from(offChainTree.root), + leaf: Array.from(previousLeaf), + index + }, proof - ); + ) try { - await execute(Gummyroll.provider, [verifyLeafIx], [payer]); + await execute(anchor.getProvider(), [verifyLeafIx], [payer]); assert(false, "Proof should have failed to verify"); } catch {} // Replace instruction with same proof fails - const replaceLeafIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - offChainTree.root, - previousLeaf, - newLeaf, - index, + let replaceLeafIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(offChainTree.root), + previousLeaf: Array.from(previousLeaf), + newLeaf: Array.from(newLeaf), + index + }, proof - ); + ) try { - await execute(Gummyroll.provider, [replaceLeafIx], [payer]); + await execute(anchor.getProvider(), [replaceLeafIx], [payer]); assert(false, "Replace should have failed to verify"); } catch {} const merkleRollAccount = - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ); const merkleRoll = decodeMerkleRoll(merkleRollAccount.data); @@ -289,29 +309,34 @@ describe("gummyroll", () => { const newLeaf = crypto.randomBytes(32); const index = 0; - const replaceLeafIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - offChainTree.root, - previousLeaf, - newLeaf, - index, + let replaceLeafIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(offChainTree.root), + previousLeaf: Array.from(previousLeaf), + newLeaf: Array.from(newLeaf), + index + }, getProofOfLeaf(offChainTree, index, false, -1).map((treeNode) => { return treeNode.node; }) - ); + ) + assert( replaceLeafIx.keys.length == 3 + MAX_DEPTH, `Failed to create proof for ${MAX_DEPTH}` ); - await execute(Gummyroll.provider, [replaceLeafIx], [payer]); + await execute(anchor.getProvider(), [replaceLeafIx], [payer]); updateTree(offChainTree, newLeaf, index); const merkleRollAccount = - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ); const merkleRoll = decodeMerkleRoll(merkleRollAccount.data); @@ -329,28 +354,32 @@ describe("gummyroll", () => { const newLeaf = crypto.randomBytes(32); const index = 0; - const replaceLeafIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - offChainTree.root, - previousLeaf, - newLeaf, - index, + let replaceLeafIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(offChainTree.root), + previousLeaf: Array.from(previousLeaf), + newLeaf: Array.from(newLeaf), + index + }, getProofOfLeaf(offChainTree, index, true, 1).map((treeNode) => { return treeNode.node; }) - ); + ) assert( replaceLeafIx.keys.length == 3 + 1, "Failed to minimize proof to expected size of 1" ); - await execute(Gummyroll.provider, [replaceLeafIx], [payer]); + await execute(anchor.getProvider(), [replaceLeafIx], [payer]); updateTree(offChainTree, newLeaf, index); const merkleRollAccount = - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ); const merkleRoll = decodeMerkleRoll(merkleRollAccount.data); @@ -369,7 +398,7 @@ describe("gummyroll", () => { const randomSigner = Keypair.generate(); describe("Examples transferring authority", () => { it("... initializing tree ...", async () => { - await Gummyroll.provider.connection.confirmTransaction( + await connection.confirmTransaction( await (connection as Connection).requestAirdrop( authority.publicKey, 1e10 @@ -381,17 +410,20 @@ describe("gummyroll", () => { ); }); it("Can transfer authority", async () => { - const transferAuthorityIx = createTransferAuthorityIx( - Gummyroll, - authority, - merkleRollKeypair.publicKey, - randomSigner.publicKey - ); - await execute(Gummyroll.provider, [transferAuthorityIx], [authority]); + const transferAuthorityIx = createTransferAuthorityInstruction( + { + authority: authority.publicKey, + merkleRoll: merkleRollKeypair.publicKey + }, + { + newAuthority: randomSigner.publicKey + } + ) + await execute(anchor.getProvider(), [transferAuthorityIx], [authority]); const merkleRoll = decodeMerkleRoll( ( - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ) ).data @@ -407,21 +439,24 @@ describe("gummyroll", () => { const newLeaf = crypto.randomBytes(32); const replaceIndex = 0; const proof = getProofOfLeaf(offChainTree, replaceIndex); - const replaceIx = createReplaceIx( - Gummyroll, - randomSigner, - merkleRollKeypair.publicKey, - offChainTree.root, - offChainTree.leaves[replaceIndex].node, - newLeaf, - replaceIndex, + let replaceIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: randomSigner.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(offChainTree.root), + previousLeaf: Array.from(offChainTree.leaves[replaceIndex].node), + newLeaf: Array.from(newLeaf), + index: replaceIndex + }, proof.map((treeNode) => { return treeNode.node; }) - ); - + ) try { - await execute(Gummyroll.provider, [replaceIx], [randomSigner]); + await execute(anchor.getProvider(), [replaceIx], [randomSigner]); assert( false, "Transaction should have failed since incorrect authority cannot execute replaces" @@ -454,25 +489,29 @@ describe("gummyroll", () => { ); leavesToUpdate.push(newLeaf); const proof = getProofOfLeaf(offChainTree, index); - const replaceIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - offChainTree.root, - offChainTree.leaves[i].node, - newLeaf, - index, + let replaceIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(offChainTree.root), + previousLeaf: Array.from(offChainTree.leaves[i].node), + newLeaf: Array.from(newLeaf), + index + }, proof.map((treeNode) => { return treeNode.node; }) - ); + ) ixArray.push(replaceIx); } // Execute all replaces in a "single block" ixArray.map((ix) => { txList.push( - execute(Gummyroll.provider, [ix], [payer]) + execute(anchor.getProvider(), [ix], [payer]) ); }); await Promise.all(txList); @@ -484,7 +523,7 @@ describe("gummyroll", () => { // Compare on-chain & off-chain roots const merkleRoll = decodeMerkleRoll( ( - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ) ).data @@ -511,19 +550,23 @@ describe("gummyroll", () => { for (let i = 0; i < 2 ** DEPTH; i++) { const newLeaf = Array.from(Buffer.alloc(32, i + 1)); - const appendIx = createAppendIx( - Gummyroll, - newLeaf, - payer, - merkleRollKeypair.publicKey - ); - await execute(Gummyroll.provider, [appendIx], [payer]); + const appendIx = createAppendInstruction( + { + authority: payer.publicKey, + merkleRoll: merkleRollKeypair.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + leaf: newLeaf + } + ) + await execute(anchor.getProvider(), [appendIx], [payer]); } // Compare on-chain & off-chain roots const merkleRoll = decodeMerkleRoll( ( - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ) ).data @@ -548,19 +591,23 @@ describe("gummyroll", () => { } // Root - make this nonsense so it won't match what's in CL, and force proof autocompletion - const replaceIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - Buffer.alloc(32), - maliciousLeafHash, - maliciousLeafHash1, - 0, + let replaceIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(Buffer.alloc(32)), + previousLeaf: Array.from(maliciousLeafHash), + newLeaf: Array.from(maliciousLeafHash1), + index: 0 + }, nodeProof - ); + ) try { - await execute(Gummyroll.provider, [replaceIx], [payer]); + await execute(anchor.getProvider(), [replaceIx], [payer]); assert( false, "Attacker was able to succesfully write fake existence of a leaf" @@ -569,7 +616,7 @@ describe("gummyroll", () => { const merkleRoll = decodeMerkleRoll( ( - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ) ).data @@ -589,19 +636,23 @@ describe("gummyroll", () => { } // Root - make this nonsense so it won't match what's in CL, and force proof autocompletion - const replaceIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - Buffer.alloc(32), - maliciousLeafHash, - maliciousLeafHash1, - 0, + let replaceIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(Buffer.alloc(32)), + previousLeaf: Array.from(maliciousLeafHash), + newLeaf: Array.from(maliciousLeafHash1), + index: 0 + }, nodeProof - ); + ) try { - await execute(Gummyroll.provider, [replaceIx], [payer]); + await execute(anchor.getProvider(), [replaceIx], [payer]); assert( false, "Attacker was able to succesfully write fake existence of a leaf" @@ -610,7 +661,7 @@ describe("gummyroll", () => { const merkleRoll = decodeMerkleRoll( ( - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ) ).data @@ -641,15 +692,19 @@ describe("gummyroll", () => { for (let j = 0; j < stepSize; ++j) { const newLeaf = Array.from(Buffer.alloc(32, i + 1)); leaves.push(newLeaf); - const appendIx = createAppendIx( - Gummyroll, - newLeaf, - payer, - merkleRollKeypair.publicKey - ); + const appendIx = createAppendInstruction( + { + authority: payer.publicKey, + merkleRoll: merkleRollKeypair.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + leaf: Array.from(newLeaf) + } + ) ixs.push(appendIx); } - await execute(Gummyroll.provider, ixs, [payer]); + await execute(anchor.getProvider(), ixs, [payer]); i += stepSize; console.log("Appended", i, "leaves"); } @@ -658,7 +713,7 @@ describe("gummyroll", () => { let ixs = []; const merkleRoll = decodeMerkleRoll( ( - await Gummyroll.provider.connection.getAccountInfo( + await connection.getAccountInfo( merkleRollKeypair.publicKey ) ).data @@ -672,20 +727,23 @@ describe("gummyroll", () => { for (const [i, leaf] of leafList) { const newLeaf = crypto.randomBytes(32); newLeaves[i] = newLeaf; - const replaceIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - root.toBuffer(), - leaf, - newLeaf, - i, - [] // No proof necessary - ); + const replaceIx = createReplaceLeafInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(root.toBuffer()), + previousLeaf: Array.from(leaf), + newLeaf: Array.from(newLeaf), + index: i + } + ) ixs.push(replaceIx); if (ixs.length == stepSize) { replaces++; - await execute(Gummyroll.provider, ixs, [payer]); + await execute(anchor.getProvider(), ixs, [payer]); console.log("Replaced", replaces * stepSize, "leaves"); ixs = []; } @@ -709,29 +767,39 @@ describe("gummyroll", () => { for (const [level, node] of Object.entries(partialProof)) { console.log(` ${level}: ${bs58.encode(node)}`) } - const replaceIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - root.toBuffer(), - newLeaves[i], - newLeaf, - i, - partialProof, - ); + + let replaceIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(root.toBuffer()), + previousLeaf: Array.from(newLeaves[i]), + newLeaf: Array.from(newLeaf), + index: i + }, + partialProof + ) + updateTree(tree, newLeaf, i); - const replaceBackIx = createReplaceIx( - Gummyroll, - payer, - merkleRollKeypair.publicKey, - tree.root, - newLeaf, - newLeaves[i], - i, - partialProof, - ); + let replaceBackIx = createReplaceLeafWithProofInstruction( + { + merkleRoll: merkleRollKeypair.publicKey, + authority: payer.publicKey, + candyWrapper: CANDY_WRAPPER_PROGRAM_ID + }, + { + root: Array.from(tree.root), + previousLeaf: Array.from(newLeaf), + newLeaf: Array.from(newLeaves[i]), + index: i + }, + partialProof + ) updateTree(tree, leaf, i); - await execute(Gummyroll.provider, [replaceIx, replaceBackIx], [payer], true, true); + await execute(anchor.getProvider(), [replaceIx, replaceBackIx], [payer], true, true); } }); }); diff --git a/contracts/tests/package.json b/contracts/tests/package.json index 0b0d57c5..9f19dafa 100644 --- a/contracts/tests/package.json +++ b/contracts/tests/package.json @@ -5,7 +5,7 @@ "@project-serum/anchor": "0.24.2", "@solana/web3.js": "^1.50.1", "@solana/spl-token": "^0.1.8", - "@sorend-solana/gummyroll": "^0.0.5", + "@sorend-solana/gummyroll": "^0.0.6", "@sorend-solana/utils": "^0.0.5", "@sorend-solana/bubblegum": "^0.0.6", "@sorend-solana/gumball-machine": "^0.0.5", diff --git a/contracts/tests/utils.ts b/contracts/tests/utils.ts new file mode 100644 index 00000000..c3ad712c --- /dev/null +++ b/contracts/tests/utils.ts @@ -0,0 +1,49 @@ +import * as anchor from "@project-serum/anchor"; +import { BN, AnchorProvider, Program } from "@project-serum/anchor"; +import NodeWallet from "@project-serum/anchor/dist/cjs/nodewallet"; +import { + Connection, + PublicKey, + Keypair, + SystemProgram, + Transaction, + Connection as web3Connection, +} from "@solana/web3.js"; +import { assert } from "chai"; +import { decodeMerkleRoll } from "@sorend-solana/gummyroll"; + +export async function assertOnChainMerkleRollProperties( + connection: Connection, + expectedMaxDepth: number, + expectedMaxBufferSize: number, + expectedAuthority: PublicKey, + expectedRoot: PublicKey, + merkleRollPubkey: PublicKey +) { + const merkleRoll = await connection.getAccountInfo(merkleRollPubkey); + + if (!merkleRoll) { + throw new Error("Merkle Roll account data unexpectedly null!"); + } + + const merkleRollAcct = decodeMerkleRoll(merkleRoll.data); + + assert( + merkleRollAcct.header.maxDepth === expectedMaxDepth, + `Max depth does not match ${merkleRollAcct.header.maxDepth}, expected ${expectedMaxDepth}` + ); + assert( + merkleRollAcct.header.maxBufferSize === expectedMaxBufferSize, + `Max buffer size does not match ${merkleRollAcct.header.maxBufferSize}, expected ${expectedMaxBufferSize}` + ); + + assert( + merkleRollAcct.header.authority.equals(expectedAuthority), + "Failed to write auth pubkey" + ); + + assert( + merkleRollAcct.roll.changeLogs[0].root.equals(expectedRoot), + "On chain root does not match root passed in instruction" + ); +} \ No newline at end of file diff --git a/contracts/tests/yarn.lock b/contracts/tests/yarn.lock index cf4050c8..c07d5715 100644 --- a/contracts/tests/yarn.lock +++ b/contracts/tests/yarn.lock @@ -300,6 +300,17 @@ borsh "^0.7.0" chai "^4.3.4" +"@sorend-solana/gummyroll@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@sorend-solana/gummyroll/-/gummyroll-0.0.6.tgz#1f95f67bb0f4ec09a0e9813237ff632646aae9f0" + integrity sha512-2v66GDvmbhZystKCO6eGD59OQcDkVHGyMxFTJXXSipbWQo2wx5uYaU1y5nQUTYlOBpgbjIPcV+LACSyXqrCx7A== + dependencies: + "@metaplex-foundation/beet" "^0.4.0" + "@metaplex-foundation/beet-solana" "^0.3.0" + "@project-serum/anchor" "0.24.2" + "@solana/web3.js" "^1.50.1" + "@sorend-solana/utils" "^0.0.5" + "@sorend-solana/sugar-shack@^0.0.2": version "0.0.2" resolved "https://registry.yarnpkg.com/@sorend-solana/sugar-shack/-/sugar-shack-0.0.2.tgz#1ba330f7d520d1a2e5a3cbeac4fe25be17fa381a" @@ -372,9 +383,9 @@ integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== "@types/node@*", "@types/node@>=10.0.0": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/node@^12.12.54": version "12.20.55" diff --git a/contracts/yarn.lock b/contracts/yarn.lock index a772fb31..ffda0c8a 100644 --- a/contracts/yarn.lock +++ b/contracts/yarn.lock @@ -3,45 +3,45 @@ "@types/chai@^4.3.0": - version "4.3.0" - resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz" - integrity sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw== + version "4.3.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" + integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== "@types/json5@^0.0.29": version "0.0.29" - resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/mocha@^9.0.0": - version "9.0.0" - resolved "https://registry.npmjs.org/@types/mocha/-/mocha-9.0.0.tgz" - integrity sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA== + version "9.1.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== "@ungap/promise-all-settled@1.1.2": version "1.1.2" - resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== ansi-colors@4.1.1: version "4.1.1" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" anymatch@~3.1.2: version "3.1.2" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" @@ -49,32 +49,32 @@ anymatch@~3.1.2: argparse@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== arrify@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== assertion-error@^1.1.0: version "1.1.0" - resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== binary-extensions@^2.0.0: version "2.2.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -82,19 +82,19 @@ brace-expansion@^1.1.7: braces@~3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" browser-stdout@1.3.1: version "1.3.1" - resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== buffer-from@^1.0.0, buffer-from@^1.1.0: version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== camelcase@^6.0.0: @@ -104,7 +104,7 @@ camelcase@^6.0.0: chai@^4.3.4: version "4.3.6" - resolved "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== dependencies: assertion-error "^1.1.0" @@ -117,7 +117,7 @@ chai@^4.3.4: chalk@^4.1.0: version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -125,13 +125,13 @@ chalk@^4.1.0: check-error@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== -chokidar@3.5.2: - version "3.5.2" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz" - integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -145,7 +145,7 @@ chokidar@3.5.2: cliui@^7.0.2: version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" @@ -154,75 +154,75 @@ cliui@^7.0.2: color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@~1.1.4: version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== concat-map@0.0.1: version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -debug@4.3.2: - version "4.3.2" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== +debug@4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" decamelize@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== deep-eql@^3.0.1: version "3.0.1" - resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== dependencies: type-detect "^4.0.0" diff@5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== diff@^3.1.0: version "3.5.0" - resolved "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== escalade@^3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-string-regexp@4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" find-up@5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -230,40 +230,40 @@ find-up@5.0.0: flat@^5.0.2: version "5.0.2" - resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2: version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-func-name@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== glob-parent@~5.1.2: version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" -glob@7.1.7: - version "7.1.7" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -274,100 +274,100 @@ glob@7.1.7: growl@1.10.5: version "1.10.5" - resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== he@1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" inherits@2: version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== is-binary-path@~2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: binary-extensions "^2.0.0" is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-number@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-plain-obj@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== is-unicode-supported@^0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== isexe@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== js-yaml@4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" json5@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== dependencies: minimist "^1.2.0" locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" log-symbols@4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: chalk "^4.1.0" @@ -375,61 +375,68 @@ log-symbols@4.1.0: loupe@^2.3.1: version "2.3.4" - resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== dependencies: get-func-name "^2.0.0" make-error@^1.1.1: version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -minimatch@3.0.4, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: - minimist "^1.2.5" + minimist "^1.2.6" mocha@^9.0.3: - version "9.1.3" - resolved "https://registry.npmjs.org/mocha/-/mocha-9.1.3.tgz" - integrity sha512-Xcpl9FqXOAYqI3j79pEtHBBnQgVXIhpULjGQa7DVb0Po+VzmSIK9kanAiWLHoRR/dbZ2qpdPshuXr8l1VaHCzw== + version "9.2.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" + integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.5.2" - debug "4.3.2" + chokidar "3.5.3" + debug "4.3.3" diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" - glob "7.1.7" + glob "7.2.0" growl "1.10.5" he "1.2.0" js-yaml "4.1.0" log-symbols "4.1.0" - minimatch "3.0.4" + minimatch "4.2.1" ms "2.1.3" - nanoid "3.1.25" + nanoid "3.3.1" serialize-javascript "6.0.0" strip-json-comments "3.1.1" supports-color "8.1.1" which "2.0.2" - workerpool "6.1.5" + workerpool "6.2.0" yargs "16.2.0" yargs-parser "20.2.4" yargs-unparser "2.0.0" @@ -441,94 +448,94 @@ ms@2.1.2: ms@2.1.3: version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoid@3.1.25: - version "3.1.25" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz" - integrity sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q== +nanoid@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== once@^1.3.0: version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" p-limit@^3.0.2: version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== pathval@^1.1.1: version "1.1.1" - resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== randombytes@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" readdirp@~3.6.0: version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== safe-buffer@^5.1.0: version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== serialize-javascript@6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== dependencies: randombytes "^2.1.0" source-map-support@^0.5.6: version "0.5.21" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" @@ -536,12 +543,12 @@ source-map-support@^0.5.6: source-map@^0.6.0: version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" @@ -550,45 +557,45 @@ string-width@^4.1.0, string-width@^4.2.0: strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-bom@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== strip-json-comments@3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== supports-color@8.1.1: version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" ts-mocha@^10.0.0: version "10.0.0" - resolved "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz" + resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-10.0.0.tgz#41a8d099ac90dbbc64b06976c5025ffaebc53cb9" integrity sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw== dependencies: ts-node "7.0.1" @@ -597,7 +604,7 @@ ts-mocha@^10.0.0: ts-node@7.0.1: version "7.0.1" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== dependencies: arrify "^1.0.0" @@ -610,40 +617,40 @@ ts-node@7.0.1: yn "^2.0.0" tsconfig-paths@^3.5.0: - version "3.12.0" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz" - integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.1" - minimist "^1.2.0" + minimist "^1.2.6" strip-bom "^3.0.0" type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== typescript@^4.3.5: - version "4.5.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz" - integrity sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg== + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== which@2.0.2: version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" -workerpool@6.1.5: - version "6.1.5" - resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz" - integrity sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw== +workerpool@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" + integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" @@ -652,27 +659,27 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== y18n@^5.0.5: version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yargs-parser@20.2.4: version "20.2.4" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs-parser@^20.2.2: version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-unparser@2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== dependencies: camelcase "^6.0.0" @@ -682,7 +689,7 @@ yargs-unparser@2.0.0: yargs@16.2.0: version "16.2.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: cliui "^7.0.2" @@ -695,10 +702,10 @@ yargs@16.2.0: yn@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz" - integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= + resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" + integrity sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ== yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/link-local-sdks.sh b/link-local-sdks.sh index 26a05c91..e6d28dd1 100755 --- a/link-local-sdks.sh +++ b/link-local-sdks.sh @@ -3,12 +3,16 @@ # plz update this script so all devs can easily get setup rm -rf cli/node_modules +rm -rf cli/yarn.lock rm -rf contracts/node_modules +rm -rf contracts/yarn.lock rm -rf contracts/sdk/indexer/node_modules +rm -rf contracts/sdk/indexer/yarn.lock rm -rf contracts/sdk/utils/node_modules +rm -rf contracts/sdk/utils/yarn.lock cd contracts/sdk/utils/ yarn yarn run build @@ -16,6 +20,7 @@ yarn link cd ../../../ rm -rf contracts/sdk/gummyroll/node_modules +rm -rf contracts/sdk/gummyroll/yarn.lock cd contracts/sdk/gummyroll/ yarn link "@sorend-solana/utils" yarn @@ -24,6 +29,7 @@ yarn link cd ../../../ rm -rf contracts/sdk/bubblegum/node_modules +rm -rf contracts/sdk/bubblegum/yarn.lock cd contracts/sdk/bubblegum/ yarn link "@sorend-solana/utils" yarn link "@sorend-solana/gummyroll" @@ -33,6 +39,7 @@ yarn link cd ../../../ rm -rf contracts/sdk/gumball-machine/node_modules +rm -rf contracts/sdk/gumball-machine/yarn.lock cd contracts/sdk/gumball-machine/ yarn link "@sorend-solana/utils" yarn link "@sorend-solana/gummyroll" @@ -43,6 +50,7 @@ yarn link cd ../../../ rm -rf contracts/sdk/sugar-shack/node_modules +rm -rf contracts/sdk/sugar-shack/yarn.lock cd contracts/sdk/sugar-shack/ yarn yarn run build