Skip to content

Commit

Permalink
pump scryptlib (#169)
Browse files Browse the repository at this point in the history
* pump  scryptlib

* Fix ci

---------

Co-authored-by: catdev2024 <catdev2024@catprotocol.org>
  • Loading branch information
catdev2024 and catdev2024 authored Nov 4, 2024
1 parent 24ed24f commit 61f2af9
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"@cat-protocol/cat-smartcontracts": "0.2.1",
"@cat-protocol/cat-smartcontracts": "0.2.2",
"@types/inquirer": "^8.1.3",
"bigi": "^1.4.2",
"bip32": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/smartcontracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cat-protocol/cat-smartcontracts",
"version": "0.2.1",
"version": "0.2.2",
"description": "CAT protocol smart contracts.",
"author": "",
"main": "./dist/index.js",
Expand Down Expand Up @@ -40,7 +40,7 @@
"ecpair": "^2.1.0",
"ecurve": "^1.0.6",
"js-sha256": "^0.9.0",
"scrypt-ts": "1.4.0",
"scrypt-ts": "^1.4.1",
"varuint-bitcoin": "=1.1.2"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
hash160,
int2ByteString,
method,
Ripemd160,
SmartContractLib,
toByteString,
} from 'scrypt-ts'
Expand Down Expand Up @@ -97,7 +98,13 @@ export class NftOpenMinterMerkleTreeData {
return this.hashNodes[this.hashNodes.length - 1][0]
}

getMerklePath(leafIndex: number) {
getMerklePath(leafIndex: number): {
leaf: Ripemd160,
leafNode: NftMerkleLeaf,
neighbor: string[],
neighborType: boolean[],
merkleRoot: string,
} {
const leafNode = this.leafArray[leafIndex]
let prevHash = this.hashNodes[0]
const neighbor: string[] = []
Expand Down
2 changes: 1 addition & 1 deletion packages/tracker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@bitcoin-js/tiny-secp256k1-asmjs": "^2.2.3",
"@cat-protocol/cat-smartcontracts": "0.2.1",
"@cat-protocol/cat-smartcontracts": "0.2.2",
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.2.3",
"@nestjs/core": "^10.0.0",
Expand Down
46 changes: 41 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,22 @@
inherits "2.0.3"
unorm "1.4.1"

"@scrypt-inc/bsv@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@scrypt-inc/bsv/-/bsv-1.0.2.tgz#af6b9c069575af83fb76f56bcf36deb39f2e3c20"
integrity sha512-uegmZ6PieSoiQEjSysidII4z+JZKmJTh3K8P+KYvfstrH0mCzJOvsZXZllhYpwL0F3SfWhDvZ18PVQ3I18Gbmw==
dependencies:
aes-js "^3.1.2"
assert "^2.1.0"
bn.js "=4.11.9"
bs58 "=4.0.1"
buffer "^6.0.3"
clone-deep "^4.0.1"
elliptic "6.5.4"
hash.js "^1.1.7"
inherits "2.0.3"
unorm "1.4.1"

"@scure/base@^1.1.1", "@scure/base@^1.1.5":
version "1.1.7"
resolved "https://registry.npmjs.org/@scure/base/-/base-1.1.7.tgz"
Expand Down Expand Up @@ -7084,17 +7100,17 @@ scrypt-ts-transpiler@^1.2.26:
ts-patch "=3.0.1"
typescript "~5.3.0"

scrypt-ts@1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/scrypt-ts/-/scrypt-ts-1.4.0.tgz#d72b9aa4e28ba16d2b33e58e93c503f10d97f448"
integrity sha512-mmdnJ0zDopUo44sfXbgUOlxBF1mXNJhL8lyTy77GgC/rez85vS1nzeLf9SuKe9/BZJDM/vu7rIu08mpMkS/8ag==
scrypt-ts@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/scrypt-ts/-/scrypt-ts-1.4.1.tgz#6fd969a7beb34f67671c67b680e9c2ec59aab52a"
integrity sha512-xiHw5rT7lyi3zkwpQ/CTNHkWvmMmoZrtTGutpEqdfIuscAFh6DEHH+QBd7fK1nUD1L0Q1vIcNmMKy3Gl+l+93Q==
dependencies:
deep-equal "^2.2.0"
fast-diff "^1.2.0"
lodash "^4.17.21"
object-hash "^3.0.0"
reflect-metadata "^0.1.13"
scryptlib "^2.2.0"
scryptlib "^2.2.2"
socket.io-client "^4.6.1"
superagent "^8.0.9"

Expand All @@ -7118,6 +7134,26 @@ scryptlib@^2.2.0, scryptlib@~2.2.1:
rimraf "^3.0.2"
yargs "^17.6.2"

scryptlib@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/scryptlib/-/scryptlib-2.2.2.tgz#7f47ddfe0a1379897631f38243fb414a680d451e"
integrity sha512-pvckNQYy4dXum8U2jFKL4XAtyeBWmjwY1BqV3lAaDT9mCy0kgCpyWokEGoCyfXDYji1tA8HvctYDz37tLdjq0A==
dependencies:
"@discoveryjs/json-ext" "^0.5.7"
"@jridgewell/sourcemap-codec" "^1.4.15"
"@scrypt-inc/bsv" "^1.0.2"
chalk "2.4.2"
compare-versions "^3.6.0"
find-node-modules "^2.1.3"
get-proxy-settings "^0.1.13"
glob "^7.2.3"
https-proxy-agent "^7.0.2"
json-bigint "^1.0.0"
node-fetch "^3.0.0"
patch-package "^6.4.7"
rimraf "^3.0.2"
yargs "^17.6.2"

semver-diff@^3.1.1:
version "3.1.1"
resolved "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz"
Expand Down

0 comments on commit 61f2af9

Please sign in to comment.