From c903442d7ee8d85dc84a3b56357f305646edf55e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 2 Dec 2022 23:53:12 +0000 Subject: [PATCH 01/20] chore(deps): update dependency eslint to v8.29.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d7be677..582dc2b 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/node": "18.11.9", "@typescript-eslint/parser": "5.45.0", "babel-eslint": "10.1.0", - "eslint": "8.28.0", + "eslint": "8.29.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "4.2.1", diff --git a/yarn.lock b/yarn.lock index 932f75e..9c4199c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -776,10 +776,10 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.28.0: - version "8.28.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.28.0.tgz#81a680732634677cc890134bcdd9fdfea8e63d6e" - integrity sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ== +eslint@8.29.0: + version "8.29.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.29.0.tgz#d74a88a20fb44d59c51851625bc4ee8d0ec43f87" + integrity sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg== dependencies: "@eslint/eslintrc" "^1.3.3" "@humanwhocodes/config-array" "^0.11.6" From 39546250b1f5db317ecb29b5dfff638294193776 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:25:12 +0000 Subject: [PATCH 02/20] fix(deps): update dependency @nervina-labs/cota-sdk to v0.8.0 --- example/aggregator/package.json | 2 +- example/aggregator/yarn.lock | 34 +++++++++++++++++++-------------- example/mainnet/package.json | 2 +- example/mainnet/yarn.lock | 33 +++++++++++++++++++++----------- 4 files changed, 44 insertions(+), 27 deletions(-) diff --git a/example/aggregator/package.json b/example/aggregator/package.json index 46f3018..f69151f 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -8,7 +8,7 @@ "build": "tsc" }, "dependencies": { - "@nervina-labs/cota-sdk": "0.7.1", + "@nervina-labs/cota-sdk": "0.8.0", "@types/node": "18.11.9", "ts-node": "10.9.1", "tslib": "2.4.1", diff --git a/example/aggregator/yarn.lock b/example/aggregator/yarn.lock index 074db62..6fc0116 100644 --- a/example/aggregator/yarn.lock +++ b/example/aggregator/yarn.lock @@ -27,15 +27,15 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@nervina-labs/cota-sdk@0.7.1": - version "0.7.1" - resolved "https://registry.yarnpkg.com/@nervina-labs/cota-sdk/-/cota-sdk-0.7.1.tgz#a083a390ac514e56139a356701a368fe964f6e2e" - integrity sha512-EBnhifgro41OsSCBFF6s/f3cJP5CVv/aRv/9L3x5nm471ePZ2cHNMXNBIkjjlfximfmQnV29Mrt3kctV82EvjQ== +"@nervina-labs/cota-sdk@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@nervina-labs/cota-sdk/-/cota-sdk-0.8.0.tgz#89028c2874e2bf1f226f3fc95bbc567bca8f34ac" + integrity sha512-3DwI26csftPtvnjFS8Cauf2ybu+8ESLVsGEUQn69aK5m3PKhXJqfuT2DpsXK2v4dmDEQ8MojgK2S0OooH/37ng== dependencies: "@nervosnetwork/ckb-sdk-core" "^0.103.0" "@nervosnetwork/ckb-sdk-utils" "^0.103.0" "@nervosnetwork/ckb-types" "^0.103.0" - axios "^0.27.2" + axios "^1.0.0" camelcase-keys "^7.0.2" convert-keys "1.3.4" @@ -126,13 +126,14 @@ axios@0.21.4: dependencies: follow-redirects "^1.14.0" -axios@^0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== +axios@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.0.tgz#1cb65bd75162c70e9f8d118a905126c4a201d383" + integrity sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw== dependencies: - follow-redirects "^1.14.9" + follow-redirects "^1.15.0" form-data "^4.0.0" + proxy-from-env "^1.1.0" bech32@2.0.0: version "2.0.0" @@ -214,10 +215,10 @@ follow-redirects@^1.14.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== -follow-redirects@^1.14.9: - version "1.15.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4" - integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ== +follow-redirects@^1.15.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== form-data@^4.0.0: version "4.0.0" @@ -307,6 +308,11 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + quick-lru@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" diff --git a/example/mainnet/package.json b/example/mainnet/package.json index 92b355c..a3c31b3 100644 --- a/example/mainnet/package.json +++ b/example/mainnet/package.json @@ -4,6 +4,6 @@ "description": "The examples for mainnet", "license": "MIT", "dependencies": { - "@nervina-labs/cota-sdk": "0.7.1" + "@nervina-labs/cota-sdk": "0.8.0" } } \ No newline at end of file diff --git a/example/mainnet/yarn.lock b/example/mainnet/yarn.lock index 6354df9..366cef7 100644 --- a/example/mainnet/yarn.lock +++ b/example/mainnet/yarn.lock @@ -2,15 +2,15 @@ # yarn lockfile v1 -"@nervina-labs/cota-sdk@0.7.1": - version "0.7.1" - resolved "https://registry.yarnpkg.com/@nervina-labs/cota-sdk/-/cota-sdk-0.7.1.tgz#a083a390ac514e56139a356701a368fe964f6e2e" - integrity sha512-EBnhifgro41OsSCBFF6s/f3cJP5CVv/aRv/9L3x5nm471ePZ2cHNMXNBIkjjlfximfmQnV29Mrt3kctV82EvjQ== +"@nervina-labs/cota-sdk@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@nervina-labs/cota-sdk/-/cota-sdk-0.8.0.tgz#89028c2874e2bf1f226f3fc95bbc567bca8f34ac" + integrity sha512-3DwI26csftPtvnjFS8Cauf2ybu+8ESLVsGEUQn69aK5m3PKhXJqfuT2DpsXK2v4dmDEQ8MojgK2S0OooH/37ng== dependencies: "@nervosnetwork/ckb-sdk-core" "^0.103.0" "@nervosnetwork/ckb-sdk-utils" "^0.103.0" "@nervosnetwork/ckb-types" "^0.103.0" - axios "^0.27.2" + axios "^1.0.0" camelcase-keys "^7.0.2" convert-keys "1.3.4" @@ -61,13 +61,14 @@ axios@0.21.4: dependencies: follow-redirects "^1.14.0" -axios@^0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== +axios@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.0.tgz#1cb65bd75162c70e9f8d118a905126c4a201d383" + integrity sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw== dependencies: - follow-redirects "^1.14.9" + follow-redirects "^1.15.0" form-data "^4.0.0" + proxy-from-env "^1.1.0" bech32@2.0.0: version "2.0.0" @@ -134,11 +135,16 @@ elliptic@6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -follow-redirects@^1.14.0, follow-redirects@^1.14.9: +follow-redirects@^1.14.0: version "1.15.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4" integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ== +follow-redirects@^1.15.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -222,6 +228,11 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + quick-lru@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" From 048f127e85d4138efd60496abdf1872d0f8d76de Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 5 Dec 2022 21:11:15 +0000 Subject: [PATCH 03/20] chore(deps): update dependency @typescript-eslint/parser to v5.45.1 --- package.json | 2 +- yarn.lock | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index c3431cc..47a848b 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/node": "18.11.9", - "@typescript-eslint/parser": "5.45.0", + "@typescript-eslint/parser": "5.45.1", "babel-eslint": "10.1.0", "eslint": "8.28.0", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index 932f75e..7adad6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -269,48 +269,48 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== -"@typescript-eslint/parser@5.45.0": - version "5.45.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.45.0.tgz#b18a5f6b3cf1c2b3e399e9d2df4be40d6b0ddd0e" - integrity sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ== - dependencies: - "@typescript-eslint/scope-manager" "5.45.0" - "@typescript-eslint/types" "5.45.0" - "@typescript-eslint/typescript-estree" "5.45.0" +"@typescript-eslint/parser@5.45.1": + version "5.45.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.45.1.tgz#6440ec283fa1373a12652d4e2fef4cb6e7b7e8c6" + integrity sha512-JQ3Ep8bEOXu16q0ztsatp/iQfDCtvap7sp/DKo7DWltUquj5AfCOpX2zSzJ8YkAVnrQNqQ5R62PBz2UtrfmCkA== + dependencies: + "@typescript-eslint/scope-manager" "5.45.1" + "@typescript-eslint/types" "5.45.1" + "@typescript-eslint/typescript-estree" "5.45.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.45.0": - version "5.45.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.45.0.tgz#7a4ac1bfa9544bff3f620ab85947945938319a96" - integrity sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw== +"@typescript-eslint/scope-manager@5.45.1": + version "5.45.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.45.1.tgz#5b87d025eec7035d879b99c260f03be5c247883c" + integrity sha512-D6fCileR6Iai7E35Eb4Kp+k0iW7F1wxXYrOhX/3dywsOJpJAQ20Fwgcf+P/TDtvQ7zcsWsrJaglaQWDhOMsspQ== dependencies: - "@typescript-eslint/types" "5.45.0" - "@typescript-eslint/visitor-keys" "5.45.0" + "@typescript-eslint/types" "5.45.1" + "@typescript-eslint/visitor-keys" "5.45.1" -"@typescript-eslint/types@5.45.0": - version "5.45.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.45.0.tgz#794760b9037ee4154c09549ef5a96599621109c5" - integrity sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA== +"@typescript-eslint/types@5.45.1": + version "5.45.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.45.1.tgz#8e1883041cee23f1bb7e1343b0139f97f6a17c14" + integrity sha512-HEW3U0E5dLjUT+nk7b4lLbOherS1U4ap+b9pfu2oGsW3oPu7genRaY9dDv3nMczC1rbnRY2W/D7SN05wYoGImg== -"@typescript-eslint/typescript-estree@5.45.0": - version "5.45.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.0.tgz#f70a0d646d7f38c0dfd6936a5e171a77f1e5291d" - integrity sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ== +"@typescript-eslint/typescript-estree@5.45.1": + version "5.45.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.1.tgz#b3dc37f0c4f0fe73e09917fc735e6f96eabf9ba4" + integrity sha512-76NZpmpCzWVrrb0XmYEpbwOz/FENBi+5W7ipVXAsG3OoFrQKJMiaqsBMbvGRyLtPotGqUfcY7Ur8j0dksDJDng== dependencies: - "@typescript-eslint/types" "5.45.0" - "@typescript-eslint/visitor-keys" "5.45.0" + "@typescript-eslint/types" "5.45.1" + "@typescript-eslint/visitor-keys" "5.45.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.45.0": - version "5.45.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz#e0d160e9e7fdb7f8da697a5b78e7a14a22a70528" - integrity sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg== +"@typescript-eslint/visitor-keys@5.45.1": + version "5.45.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.1.tgz#204428430ad6a830d24c5ac87c71366a1cfe1948" + integrity sha512-cy9ln+6rmthYWjH9fmx+5FU/JDpjQb586++x2FZlveq7GdGuLLW9a2Jcst2TGekH82bXpfmRNSwP9tyEs6RjvQ== dependencies: - "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/types" "5.45.1" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: From c3579faf5ea3c7d3dd1862fad7f41e578b0af4ee Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 02:01:24 +0000 Subject: [PATCH 04/20] chore(deps): update dependency @types/node to v18.11.11 --- example/aggregator/package.json | 2 +- example/aggregator/yarn.lock | 8 ++++---- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/aggregator/package.json b/example/aggregator/package.json index f69151f..6995044 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@nervina-labs/cota-sdk": "0.8.0", - "@types/node": "18.11.9", + "@types/node": "18.11.11", "ts-node": "10.9.1", "tslib": "2.4.1", "typescript": "4.8.3" diff --git a/example/aggregator/yarn.lock b/example/aggregator/yarn.lock index 6fc0116..01f0a0e 100644 --- a/example/aggregator/yarn.lock +++ b/example/aggregator/yarn.lock @@ -94,10 +94,10 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== -"@types/node@18.11.9": - version "18.11.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" - integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== +"@types/node@18.11.11": + version "18.11.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc" + integrity sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g== acorn-walk@^8.1.1: version "8.2.0" diff --git a/package.json b/package.json index 59f718c..0b6b231 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/crypto-js": "4.1.1", - "@types/node": "18.11.9", + "@types/node": "18.11.11", "@typescript-eslint/parser": "5.45.1", "babel-eslint": "10.1.0", "eslint": "8.29.0", diff --git a/yarn.lock b/yarn.lock index ff32ee0..93c74aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -264,10 +264,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node@18.11.9": - version "18.11.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" - integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== +"@types/node@18.11.11": + version "18.11.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc" + integrity sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g== "@typescript-eslint/parser@5.45.1": version "5.45.1" From 238b73e25eb5d3ff748eca36e9edff53ea49a178 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 6 Dec 2022 14:02:34 +0800 Subject: [PATCH 05/20] refactor: Upgrade dependices --- .gitignore | 2 + .husky/pre-commit | 1 + package.json | 14 ++-- src/service/cota/extension.ts | 149 +++++++++++++++++----------------- src/service/registry/index.ts | 4 +- src/utils/case-parser.ts | 2 +- yarn.lock | 64 +++++++-------- 7 files changed, 117 insertions(+), 119 deletions(-) diff --git a/.gitignore b/.gitignore index f363516..6ac5530 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,6 @@ dist # TernJS port file .tern-port +.vscode/ + lib \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index 2bccb3c..1bc36df 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,4 +2,5 @@ . "$(dirname "$0")/_/husky.sh" yarn lint +yarn format yarn check \ No newline at end of file diff --git a/package.json b/package.json index 0b6b231..f6f1588 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,11 @@ "prepare": "husky install" }, "dependencies": { - "@nervosnetwork/ckb-sdk-core": "^0.103.0", - "@nervosnetwork/ckb-sdk-utils": "^0.103.0", - "@nervosnetwork/ckb-types": "^0.103.0", - "axios": "^1.0.0", - "camelcase-keys": "^7.0.2", + "@nervosnetwork/ckb-sdk-core": "^0.103.1", + "@nervosnetwork/ckb-sdk-utils": "^0.103.1", + "@nervosnetwork/ckb-types": "^0.103.1", + "axios": "^1.2.1", + "camelcase-keys": "^8.0.2", "convert-keys": "1.3.4" }, "devDependencies": { @@ -44,7 +44,7 @@ "prettier": "2.8.0", "ts-node": "10.9.1", "tslib": "2.4.1", - "typescript": "4.8.3" + "typescript": "4.9.3" }, "homepage": "https://github.com/nervina-labs/cota-sdk-js#readme" -} \ No newline at end of file +} diff --git a/src/service/cota/extension.ts b/src/service/cota/extension.ts index 40638fc..3cf9c5e 100644 --- a/src/service/cota/extension.ts +++ b/src/service/cota/extension.ts @@ -1,76 +1,73 @@ -import { serializeScript } from '@nervosnetwork/ckb-sdk-utils' -import { Service } from '../..' -import { FEE, getCotaTypeScript, getCotaCellDep } from '../../constants' -import { ExtensionReq } from '../../types' - - -enum Action { - Add, - Update -} - -const generateExtensionTx = async ( - service: Service, - cotaLock: CKBComponents.Script, - fee = FEE, - isMainnet = false, - action: Action, -) => { - const cotaType = getCotaTypeScript(isMainnet) - const cotaCells = await service.collector.getCells(cotaLock, cotaType) - if (!cotaCells || cotaCells.length === 0) { - throw new Error("Cota cell doesn't exist") - } - const cotaCell = cotaCells[0] - const inputs = [ - { - previousOutput: cotaCell.outPoint, - since: '0x0', - }, - ] - - const outputs = [cotaCell.output] - outputs[0].capacity = `0x${(BigInt(outputs[0].capacity) - fee).toString(16)}` - - const extensionReq: ExtensionReq = { - lockScript: serializeScript(cotaLock), - } - - const { smtRootHash, extensionSmtEntry } = await service.aggregator.generateExtensionSmt(extensionReq) - const cotaCellData = `0x02${smtRootHash}` - - const outputsData = [cotaCellData] - const cellDeps = [getCotaCellDep(isMainnet)] - - const rawTx = { - version: '0x0', - cellDeps, - headerDeps: [], - inputs, - outputs, - outputsData, - witnesses: [], - } as any - - const prefix = action == Action.Add ? '0xF0' : '0xF1' - rawTx.witnesses = rawTx.inputs.map((_, i) => - i > 0 ? '0x' : { lock: '', inputType: `${prefix}${extensionSmtEntry}`, outputType: '' }, - ) - return rawTx -} - - -export const generateAddExtensionTx = async ( - service: Service, - cotaLock: CKBComponents.Script, - fee = FEE, - isMainnet = false -) => await generateExtensionTx(service, cotaLock, fee, isMainnet, Action.Add) - - - export const generateUpdateExtensionTx = async ( - service: Service, - cotaLock: CKBComponents.Script, - fee = FEE, - isMainnet = false -) => await generateExtensionTx(service, cotaLock, fee, isMainnet, Action.Update) \ No newline at end of file +import { serializeScript } from '@nervosnetwork/ckb-sdk-utils' +import { Service } from '../..' +import { FEE, getCotaTypeScript, getCotaCellDep } from '../../constants' +import { ExtensionReq } from '../../types' + +enum Action { + Add, + Update, +} + +const generateExtensionTx = async ( + service: Service, + cotaLock: CKBComponents.Script, + fee = FEE, + isMainnet = false, + action: Action, +) => { + const cotaType = getCotaTypeScript(isMainnet) + const cotaCells = await service.collector.getCells(cotaLock, cotaType) + if (!cotaCells || cotaCells.length === 0) { + throw new Error("Cota cell doesn't exist") + } + const cotaCell = cotaCells[0] + const inputs = [ + { + previousOutput: cotaCell.outPoint, + since: '0x0', + }, + ] + + const outputs = [cotaCell.output] + outputs[0].capacity = `0x${(BigInt(outputs[0].capacity) - fee).toString(16)}` + + const extensionReq: ExtensionReq = { + lockScript: serializeScript(cotaLock), + } + + const { smtRootHash, extensionSmtEntry } = await service.aggregator.generateExtensionSmt(extensionReq) + const cotaCellData = `0x02${smtRootHash}` + + const outputsData = [cotaCellData] + const cellDeps = [getCotaCellDep(isMainnet)] + + const rawTx = { + version: '0x0', + cellDeps, + headerDeps: [], + inputs, + outputs, + outputsData, + witnesses: [], + } as any + + const prefix = action == Action.Add ? '0xF0' : '0xF1' + rawTx.witnesses = rawTx.inputs.map((_, i) => + i > 0 ? '0x' : { lock: '', inputType: `${prefix}${extensionSmtEntry}`, outputType: '' }, + ) + return rawTx +} + +export const generateAddExtensionTx = async ( + service: Service, + cotaLock: CKBComponents.Script, + fee = FEE, + isMainnet = false, +) => await generateExtensionTx(service, cotaLock, fee, isMainnet, Action.Add) + +export const generateUpdateExtensionTx = async ( + service: Service, + cotaLock: CKBComponents.Script, + fee = FEE, + isMainnet = false, +) => await generateExtensionTx(service, cotaLock, fee, isMainnet, Action.Update) diff --git a/src/service/registry/index.ts b/src/service/registry/index.ts index 6aff5b1..28de560 100644 --- a/src/service/registry/index.ts +++ b/src/service/registry/index.ts @@ -75,9 +75,7 @@ export const generateRegisterCotaTx = async ( outputs[length - 1].capacity = `0x${(BigInt(outputs[length - 1].capacity) - fee).toString(16)}` const lockHashes = cotaLocks.map(lock => scriptToHash(lock)) - const { smtRootHash, registrySmtEntry } = await service.aggregator.generateRegisterCotaSmt( - lockHashes, - ) + const { smtRootHash, registrySmtEntry } = await service.aggregator.generateRegisterCotaSmt(lockHashes) const registryCellData = `0x02${smtRootHash}` const outputsData = outputs.map((_, i) => (i === 0 ? registryCellData : i !== outputs.length - 1 ? '0x02' : '0x')) diff --git a/src/utils/case-parser.ts b/src/utils/case-parser.ts index 2dd668b..5045ed0 100644 --- a/src/utils/case-parser.ts +++ b/src/utils/case-parser.ts @@ -1,4 +1,4 @@ -import * as camelcaseKeys from 'camelcase-keys' +import camelcaseKeys from 'camelcase-keys' import { toSnake } from 'convert-keys' export const toCamelcase = (object: any) => { diff --git a/yarn.lock b/yarn.lock index 93c74aa..c020556 100644 --- a/yarn.lock +++ b/yarn.lock @@ -178,7 +178,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@nervosnetwork/ckb-sdk-core@^0.103.0": +"@nervosnetwork/ckb-sdk-core@^0.103.1": version "0.103.1" resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-core/-/ckb-sdk-core-0.103.1.tgz#136d616ec53af96d3b93dcbce593e6db484c802d" integrity sha512-LeNwId3GaQILVpnY1zfNBY897XQJPODKeP6d7w6tww9anu0jSxrvXVxGMDTTn3Yz5mixzBgpFGo4SXRrH0eiaQ== @@ -197,7 +197,7 @@ axios "0.21.4" tslib "2.3.1" -"@nervosnetwork/ckb-sdk-utils@0.103.1", "@nervosnetwork/ckb-sdk-utils@^0.103.0": +"@nervosnetwork/ckb-sdk-utils@0.103.1", "@nervosnetwork/ckb-sdk-utils@^0.103.1": version "0.103.1" resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-utils/-/ckb-sdk-utils-0.103.1.tgz#8356f88027a4054835fee0648617cc7020c8db1b" integrity sha512-OzpFNKkOOqYWDHDjPf11uOfOf8EQOEstOBxVtyFjrGEx3B9FwsGxItlHYeuTfpFkHF2Ut+G9M3X71w8h/IApdQ== @@ -208,7 +208,7 @@ jsbi "3.1.3" tslib "2.3.1" -"@nervosnetwork/ckb-types@0.103.1", "@nervosnetwork/ckb-types@^0.103.0": +"@nervosnetwork/ckb-types@0.103.1", "@nervosnetwork/ckb-types@^0.103.1": version "0.103.1" resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-types/-/ckb-types-0.103.1.tgz#b5626ce905353e70136bfaccf9def0819b76ca27" integrity sha512-gGRR1VvUS/KRq2ChhXHPiHpgyLYazPM2R8lK87shQI82Gp2/m6k1HVDeNR5XOYwQ3YmBbxHGQtQr/kMq7DUlZA== @@ -405,10 +405,10 @@ axios@0.21.4: dependencies: follow-redirects "^1.14.0" -axios@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.0.0.tgz#16ded6096c1d37650db9f6a8d48a2f7c1bb58622" - integrity sha512-SsHsGFN1qNPFT5QhSoSD37SHDfGyLSW5AESmyLk2JeCMHv5g0I9g0Hz/zQHx2KNe0jGXh2q2hAm7OdkXm360CA== +axios@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.1.tgz#44cf04a3c9f0c2252ebd85975361c026cb9f864a" + integrity sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A== dependencies: follow-redirects "^1.15.0" form-data "^4.0.0" @@ -474,20 +474,20 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase-keys@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-7.0.2.tgz#d048d8c69448745bb0de6fc4c1c52a30dfbe7252" - integrity sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg== +camelcase-keys@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-8.0.2.tgz#a7140ba7c797aea32161d4ce5cdbda11d09eb414" + integrity sha512-qMKdlOfsjlezMqxkUGGMaWWs17i2HoL15tM+wtx8ld4nLrUwU58TFdvyGOz/piNP842KeO8yXvggVQSdQ828NA== dependencies: - camelcase "^6.3.0" - map-obj "^4.1.0" - quick-lru "^5.1.1" - type-fest "^1.2.1" + camelcase "^7.0.0" + map-obj "^4.3.0" + quick-lru "^6.1.1" + type-fest "^2.13.0" -camelcase@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== +camelcase@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-7.0.0.tgz#fd112621b212126741f998d614cbc2a8623fd174" + integrity sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ== chalk@^2.0.0: version "2.4.2" @@ -1366,7 +1366,7 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -map-obj@^4.1.0: +map-obj@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== @@ -1593,10 +1593,10 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== +quick-lru@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-6.1.1.tgz#f8e5bf9010376c126c80c1a62827a526c0e60adf" + integrity sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q== regexp.prototype.flags@^1.4.3: version "1.4.3" @@ -1812,15 +1812,15 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^1.2.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" - integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== +type-fest@^2.13.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== -typescript@4.8.3: - version "4.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" - integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== +typescript@4.9.3: + version "4.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db" + integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA== unbox-primitive@^1.0.2: version "1.0.2" From c258764141f65a1ca840a51cd46c52c1c6ed8564 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 6 Dec 2022 14:07:56 +0800 Subject: [PATCH 06/20] refactor: Format example code --- example/aggregator.ts | 4 +- example/aggregator/index.js | 5 +- example/aggregator/package.json | 2 +- example/claim-update.ts | 22 ++++--- example/claim.ts | 22 ++++--- example/issuer.ts | 28 ++++---- example/mainnet/define.js | 18 ++++-- example/mainnet/mint.js | 28 ++++++-- example/mainnet/package.json | 2 +- example/mainnet/registry.js | 20 ++++-- example/mainnet/transfer.js | 24 +++++-- example/mint.ts | 22 ++++--- example/registry-ccids.ts | 6 +- example/registry.js | 26 +++++--- example/registry.ts | 22 ++++--- example/transfer-update.ts | 24 ++++--- example/transfer.ts | 27 ++++---- example/update-cota-meta.ts | 111 +++++++++++++++++--------------- example/update.ts | 22 ++++--- example/withdraw.ts | 22 ++++--- 20 files changed, 286 insertions(+), 171 deletions(-) diff --git a/example/aggregator.ts b/example/aggregator.ts index 332c04d..ebd24b0 100644 --- a/example/aggregator.ts +++ b/example/aggregator.ts @@ -23,7 +23,7 @@ const run = async () => { '0x490000001000000030000000310000009bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce80114000000dc70f33de86fdf381b4fc5bf092bb23d02774801', page: 0, pageSize: 3, - cotaId: "0xb066e0f068aa8be6548063a18d811c489a9e2141", + cotaId: '0xb066e0f068aa8be6548063a18d811c489a9e2141', }) console.log(JSON.stringify(holdsWithCotaId)) @@ -63,7 +63,7 @@ const run = async () => { const cotaCount = await aggregator.getCotaCount({ lockScript: '0x490000001000000030000000310000009bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce80114000000dc70f33de86fdf381b4fc5bf092bb23d02774801', - cotaId: '0xb22585a8053af3fed0fd39127f5b1487ce08b756', + cotaId: '0xb22585a8053af3fed0fd39127f5b1487ce08b756', }) console.log(JSON.stringify(cotaCount)) } diff --git a/example/aggregator/index.js b/example/aggregator/index.js index a400a31..c762d7e 100644 --- a/example/aggregator/index.js +++ b/example/aggregator/index.js @@ -1,7 +1,10 @@ const { Aggregator } = require('@nervina-labs/cota-sdk') const run = async () => { - const aggregator = new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }) + const aggregator = new Aggregator({ + registryUrl: 'http://localhost:3050', + cotaUrl: 'https://cota.nervina.dev/mainnet-aggregator', + }) const holds = await aggregator.getHoldCotaNft({ lockScript: '0x490000001000000030000000310000009bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce80114000000dc70f33de86fdf381b4fc5bf092bb23d02774801', diff --git a/example/aggregator/package.json b/example/aggregator/package.json index 6995044..ef597bd 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -14,4 +14,4 @@ "tslib": "2.4.1", "typescript": "4.8.3" } -} \ No newline at end of file +} diff --git a/example/claim-update.ts b/example/claim-update.ts index 7842130..6a9ec1e 100644 --- a/example/claim-update.ts +++ b/example/claim-update.ts @@ -10,15 +10,21 @@ const RECEIVER_ADDRESS = 'ckt1qyqy6xew5q449zg5du7wdjhgrxschjkg3n2q8h5ycc' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { diff --git a/example/claim.ts b/example/claim.ts index 3e6758a..f9017f9 100644 --- a/example/claim.ts +++ b/example/claim.ts @@ -10,15 +10,21 @@ const RECEIVER_ADDRESS = 'ckt1qyqy6xew5q449zg5du7wdjhgrxschjkg3n2q8h5ycc' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { diff --git a/example/issuer.ts b/example/issuer.ts index 4210c9a..4bbc81f 100644 --- a/example/issuer.ts +++ b/example/issuer.ts @@ -9,15 +9,21 @@ const TEST_ADDRESS = 'ckt1qyq0scej4vn0uka238m63azcel7cmcme7f2sxj5ska' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { @@ -32,9 +38,9 @@ const run = async () => { const cotaLock = addressToScript(TEST_ADDRESS) const issuer: IssuerInfo = { - name: "Nervina Labs", - description: "Melting Two Worlds Together.", - avatar: "https://i.loli.net/2021/04/29/IigbpOWP8fw9qDn.png", + name: 'Nervina Labs', + description: 'Melting Two Worlds Together.', + avatar: 'https://i.loli.net/2021/04/29/IigbpOWP8fw9qDn.png', } let rawTx = await generateIssuerInfoTx(service, cotaLock, issuer, FEE, isMainnet) diff --git a/example/mainnet/define.js b/example/mainnet/define.js index 638259a..28c8c36 100644 --- a/example/mainnet/define.js +++ b/example/mainnet/define.js @@ -2,7 +2,7 @@ const { addressToScript } = require('@nervosnetwork/ckb-sdk-utils') const { Collector, Aggregator, generateDefineCotaTx, FEE } = require('@nervina-labs/cota-sdk') // AliceMainnet -const TEST_PRIVATE_KEY = '0x-example' +const TEST_PRIVATE_KEY = '0x65e4b4dc59d93349f0ceb3926ffcb8338808a54afe51338292ea6baa3784619f' const TEST_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' const secp256k1CellDep = isMainnet => { @@ -29,8 +29,14 @@ const run = async () => { const isMainnet = true const service = { - collector: new Collector({ ckbNodeUrl: 'http://localhost:8114', ckbIndexerUrl: 'http://localhost:8116' }), - aggregator: new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }), + collector: new Collector({ + ckbNodeUrl: 'https://mainnet.ckb.dev/rpc', + ckbIndexerUrl: 'https://mainnet.ckb.dev/indexer', + }), + aggregator: new Aggregator({ + registryUrl: 'http://localhost:3050', + cotaUrl: 'https://cota.nervina.dev/mainnet-aggregator', + }), } const ckb = service.collector.getCkb() const defineLock = addressToScript(TEST_ADDRESS) @@ -48,10 +54,12 @@ const run = async () => { console.log(`cotaId: ${cotaId}`) rawTx.cellDeps.push(secp256k1CellDep(isMainnet)) + console.log(JSON.stringify(rawTx)) + const signedTx = ckb.signTransaction(TEST_PRIVATE_KEY)(rawTx) console.log(JSON.stringify(signedTx)) - let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') - console.info(`Define cota nft tx has been sent with tx hash ${txHash}`) + // let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') + // console.info(`Define cota nft tx has been sent with tx hash ${txHash}`) } run() diff --git a/example/mainnet/mint.js b/example/mainnet/mint.js index dbd019c..cd82dba 100644 --- a/example/mainnet/mint.js +++ b/example/mainnet/mint.js @@ -2,10 +2,18 @@ const { addressToScript, serializeScript } = require('@nervosnetwork/ckb-sdk-uti const { Collector, Aggregator, generateMintCotaTx, FEE } = require('@nervina-labs/cota-sdk') // AliceMainnet -const TEST_PRIVATE_KEY = '0x-example' +const TEST_PRIVATE_KEY = '0x65e4b4dc59d93349f0ceb3926ffcb8338808a54afe51338292ea6baa3784619f' const TEST_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' const RECEIVER_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' +const withdrawals = Array(100) + .fill(0) + .map(() => ({ + state: '0x00', + characteristic: '0x0505050505050505050505050505050505050505', + toLockScript: serializeScript(addressToScript(RECEIVER_ADDRESS)), + })) + const secp256k1CellDep = isMainnet => { if (isMainnet) { return { @@ -30,15 +38,21 @@ const run = async () => { const isMainnet = true const service = { - collector: new Collector({ ckbNodeUrl: 'http://localhost:8114', ckbIndexerUrl: 'http://localhost:8116' }), - aggregator: new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }), + collector: new Collector({ + ckbNodeUrl: 'https://mainnet.ckb.dev/rpc', + ckbIndexerUrl: 'https://mainnet.ckb.dev/indexer', + }), + aggregator: new Aggregator({ + registryUrl: 'http://localhost:3050', + cotaUrl: 'https://cota.nervina.dev/mainnet-aggregator', + }), } const ckb = service.collector.getCkb() const mintLock = addressToScript(TEST_ADDRESS) // If any tokenIndex of MintCotaInfo is not set, the tokenIndex will be set automatically with issued count. const mintCotaInfo = { - cotaId: '0xae223946058e5b148045d11483df60b36dc28a30', + cotaId: '0xc4a5cbf26b597acf3b35c74f61931c33aa16a55e', withdrawals: [ { // tokenIndex: '0x00000000', @@ -58,10 +72,12 @@ const run = async () => { let rawTx = await generateMintCotaTx(service, mintLock, mintCotaInfo, FEE, isMainnet) rawTx.cellDeps.push(secp256k1CellDep(isMainnet)) + console.log(JSON.stringify(rawTx)) + const signedTx = ckb.signTransaction(TEST_PRIVATE_KEY)(rawTx) console.log(JSON.stringify(signedTx)) - let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') - console.info(`Mint cota nft tx has been sent with tx hash ${txHash}`) + // let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') + // console.info(`Mint cota nft tx has been sent with tx hash ${txHash}`) } run() diff --git a/example/mainnet/package.json b/example/mainnet/package.json index a3c31b3..0993ee5 100644 --- a/example/mainnet/package.json +++ b/example/mainnet/package.json @@ -6,4 +6,4 @@ "dependencies": { "@nervina-labs/cota-sdk": "0.8.0" } -} \ No newline at end of file +} diff --git a/example/mainnet/registry.js b/example/mainnet/registry.js index 4cd1ba3..61538ab 100644 --- a/example/mainnet/registry.js +++ b/example/mainnet/registry.js @@ -7,7 +7,7 @@ const { const { Collector, Aggregator, getAlwaysSuccessLock, generateRegisterCotaTx, FEE } = require('@nervina-labs/cota-sdk') // AliceMainnet -const TEST_PRIVATE_KEY = '0x-example' +const TEST_PRIVATE_KEY = '0x65e4b4dc59d93349f0ceb3926ffcb8338808a54afe51338292ea6baa3784619f' const TEST_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' const secp256k1CellDep = isMainnet => { @@ -34,12 +34,20 @@ const run = async () => { const isMainnet = true const service = { - collector: new Collector({ ckbNodeUrl: 'http://localhost:8114', ckbIndexerUrl: 'http://localhost:8116' }), - aggregator: new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }), + collector: new Collector({ + ckbNodeUrl: 'https://mainnet.ckb.dev/rpc', + ckbIndexerUrl: 'https://mainnet.ckb.dev/indexer', + }), + aggregator: new Aggregator({ + registryUrl: 'https://cota.nervina.dev/mainnet-registry-aggregator', + cotaUrl: 'https://cota.nervina.dev/mainnet-aggregator', + }), } const ckb = service.collector.getCkb() const provideCKBLock = addressToScript(TEST_ADDRESS) - const unregisteredCotaLock = addressToScript(TEST_ADDRESS) + const unregisteredCotaLock = addressToScript( + 'ckb1qzl58smqy32hnrq6vxjedcxe2fugvnz497h7yvwqvwel40uh4rltcqdjejyul32m2jmnu86w4esltzkg5k3ej3gpwhzrx', + ) let rawTx = await generateRegisterCotaTx(service, [unregisteredCotaLock], provideCKBLock, FEE, isMainnet) rawTx.cellDeps.push(secp256k1CellDep(isMainnet)) @@ -68,8 +76,8 @@ const run = async () => { witnesses: signedWitnesses.map(witness => (typeof witness === 'string' ? witness : serializeWitnessArgs(witness))), } console.log(JSON.stringify(signedTx)) - let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') - console.log(`Register cota cell tx has been sent with tx hash ${txHash}`) + // let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') + // console.log(`Register cota cell tx has been sent with tx hash ${txHash}`) } run() diff --git a/example/mainnet/transfer.js b/example/mainnet/transfer.js index fb30088..035db1e 100644 --- a/example/mainnet/transfer.js +++ b/example/mainnet/transfer.js @@ -2,7 +2,7 @@ const { addressToScript, serializeScript } = require('@nervosnetwork/ckb-sdk-uti const { Collector, Aggregator, generateTransferCotaTx, FEE } = require('@nervina-labs/cota-sdk') const TEST_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' -const RECEIVER_PRIVATE_KEY = '0x-example' +const RECEIVER_PRIVATE_KEY = '0x65e4b4dc59d93349f0ceb3926ffcb8338808a54afe51338292ea6baa3784619f' const RECEIVER_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' const OTHER_ADDRESS = 'ckb1qyq0xt2728kgl0pfvqgvul92209z7vkxwezsmqz650' @@ -30,8 +30,14 @@ const run = async () => { const isMainnet = true const service = { - collector: new Collector({ ckbNodeUrl: 'http://localhost:8114', ckbIndexerUrl: 'http://localhost:8116' }), - aggregator: new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }), + collector: new Collector({ + ckbNodeUrl: 'https://mainnet.ckb.dev/rpc', + ckbIndexerUrl: 'https://mainnet.ckb.dev/indexer', + }), + aggregator: new Aggregator({ + registryUrl: 'https://cota.nervina.dev/mainnet-registry-aggregator', + cotaUrl: 'https://cota.nervina.dev/mainnet-aggregator', + }), } const ckb = service.collector.getCkb() const cotaLock = addressToScript(RECEIVER_ADDRESS) @@ -39,18 +45,22 @@ const run = async () => { const transfers = [ { - cotaId: '0xae223946058e5b148045d11483df60b36dc28a30', - tokenIndex: '0x00000000', + cotaId: '0xc4a5cbf26b597acf3b35c74f61931c33aa16a55e', + tokenIndex: '0x00000008', toLockScript: serializeScript(addressToScript(OTHER_ADDRESS)), }, ] let rawTx = await generateTransferCotaTx(service, cotaLock, withdrawLock, transfers, FEE, isMainnet) rawTx.cellDeps.push(secp256k1CellDep(isMainnet)) + console.log(JSON.stringify(rawTx)) + const signedTx = ckb.signTransaction(RECEIVER_PRIVATE_KEY)(rawTx) console.log(JSON.stringify(signedTx)) - let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') - console.info(`Transfer cota nft tx has been sent with tx hash ${txHash}`) + const result = await ckb.rpc.dryRunTransaction(signedTx) + console.log(JSON.stringify(result)) + // let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') + // console.info(`Transfer cota nft tx has been sent with tx hash ${txHash}`) } run() diff --git a/example/mint.ts b/example/mint.ts index beb5473..de53fc0 100644 --- a/example/mint.ts +++ b/example/mint.ts @@ -10,15 +10,21 @@ const RECEIVER_ADDRESS = 'ckt1qyqy6xew5q449zg5du7wdjhgrxschjkg3n2q8h5ycc' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { diff --git a/example/registry-ccids.ts b/example/registry-ccids.ts index 870bed5..9b2e1e8 100644 --- a/example/registry-ccids.ts +++ b/example/registry-ccids.ts @@ -6,13 +6,15 @@ import { generateUpdateCcidsTx } from '../src/service/registry' import { Service } from '../src' import signWitnesses from '@nervosnetwork/ckb-sdk-core/lib/signWitnesses' - const run = async () => { // True for mainnet and false for testnet const isMainnet = false const service: Service = { - collector: new Collector({ ckbNodeUrl: 'https://testnet.ckb.dev/rpc', ckbIndexerUrl: 'https://testnet.ckb.dev/indexer' }), + collector: new Collector({ + ckbNodeUrl: 'https://testnet.ckb.dev/rpc', + ckbIndexerUrl: 'https://testnet.ckb.dev/indexer', + }), aggregator: new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }), } const ckb = service.collector.getCkb() diff --git a/example/registry.js b/example/registry.js index f05c6e8..88c24ab 100644 --- a/example/registry.js +++ b/example/registry.js @@ -13,17 +13,23 @@ const signWitnesses = require('@nervosnetwork/ckb-sdk-core/lib/signWitnesses') const TEST_PRIVATE_KEY = '0xc5bd09c9b954559c70a77d68bde95369e2ce910556ddc20f739080cde3b62ef2' const TEST_ADDRESS = 'ckt1qyq0scej4vn0uka238m63azcel7cmcme7f2sxj5ska' -const secp256k1CellDep = (isMainnet) => { +const secp256k1CellDep = isMainnet => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { @@ -37,7 +43,7 @@ const run = async () => { const ckb = service.collector.getCkb() const provideCKBLock = addressToScript(TEST_ADDRESS) const unregisteredCotaLock = addressToScript(TEST_ADDRESS) - + let rawTx = await generateRegisterCotaTx(service, [unregisteredCotaLock], provideCKBLock, FEE, isMainnet) rawTx.cellDeps.push(secp256k1CellDep(isMainnet)) diff --git a/example/registry.ts b/example/registry.ts index ae56fd2..d16c183 100644 --- a/example/registry.ts +++ b/example/registry.ts @@ -11,15 +11,21 @@ const TEST_ADDRESS = 'ckt1qyq0scej4vn0uka238m63azcel7cmcme7f2sxj5ska' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { diff --git a/example/transfer-update.ts b/example/transfer-update.ts index cdc1356..eabbbe7 100644 --- a/example/transfer-update.ts +++ b/example/transfer-update.ts @@ -2,7 +2,7 @@ import { addressToScript, serializeScript } from '@nervosnetwork/ckb-sdk-utils' import { Collector } from '../src/collector' import { Aggregator } from '../src/aggregator' import { generateTransferUpdateCotaTx } from '../src/service/cota' -import { Service, TransferUpdate, FEE } from '../src' +import { Service, TransferUpdate, FEE } from '../src' const TEST_ADDRESS = 'ckt1qyq0scej4vn0uka238m63azcel7cmcme7f2sxj5ska' const RECEIVER_PRIVATE_KEY = '0xf0d72b5e3a27e603efb304aa16608ba3e480cb1c6790bced80fb82c53a822cee' @@ -11,15 +11,21 @@ const OTHER_ADDRESS = 'ckt1qyqz8vxeyrv4nur4j27ktp34fmwnua9wuyqqggd748' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { diff --git a/example/transfer.ts b/example/transfer.ts index 3b6513c..d05ae66 100644 --- a/example/transfer.ts +++ b/example/transfer.ts @@ -11,15 +11,21 @@ const OTHER_ADDRESS = 'ckt1qyqz8vxeyrv4nur4j27ktp34fmwnua9wuyqqggd748' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { @@ -37,7 +43,7 @@ const run = async () => { const transfers: TransferWithdrawal[] = [ { cotaId: '0xc27328c95e27723d42770261d05355977aa5c89a', - tokenIndex: "0x00000013", + tokenIndex: '0x00000013', toLockScript: serializeScript(addressToScript(OTHER_ADDRESS)), }, ] @@ -50,5 +56,4 @@ const run = async () => { console.info(`Transfer cota nft tx has been sent with tx hash ${txHash}`) } - - run() \ No newline at end of file +run() diff --git a/example/update-cota-meta.ts b/example/update-cota-meta.ts index 1933fe9..9697849 100644 --- a/example/update-cota-meta.ts +++ b/example/update-cota-meta.ts @@ -1,51 +1,60 @@ -import { addressToScript } from '@nervosnetwork/ckb-sdk-utils' -import { Collector } from '../src/collector' -import { Aggregator } from '../src/aggregator' -import { Service, FEE, CotaInfo } from '../src' -import { generateCotaMetadataTx } from '../src/service/cota/cota-meta' - -const TEST_PRIVATE_KEY = '0xc5bd09c9b954559c70a77d68bde95369e2ce910556ddc20f739080cde3b62ef2' -const TEST_ADDRESS = 'ckt1qyq0scej4vn0uka238m63azcel7cmcme7f2sxj5ska' - -const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { - if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } - } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } -} - -const run = async () => { - // True for mainnet and false for testnet - const isMainnet = false - - const service: Service = { - collector: new Collector({ ckbNodeUrl: 'https://testnet.ckb.dev/rpc', ckbIndexerUrl: 'https://testnet.ckb.dev/indexer' }), - aggregator: new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }), - } - const ckb = service.collector.getCkb() - const cotaLock = addressToScript(TEST_ADDRESS) - - const cotaInfo: CotaInfo = { - name: 'Update First Step', - description: - 'First step to Blockchain mass adoption. NFT platform launch memento.\n\n-- Nervina Labs & Lay2 Tech, 4/30/2021.', - image: 'https://i.loli.net/2021/04/29/qyJNSE4iHAas7GL.png', - } - const cotaId = '0x36cd7eb40416a61b1f90631b4ddfedd95aea6820' - - let rawTx = await generateCotaMetadataTx(service, cotaLock, cotaId, cotaInfo, FEE, isMainnet) - rawTx.cellDeps.push(secp256k1CellDep(isMainnet)) - - const signedTx = ckb.signTransaction(TEST_PRIVATE_KEY)(rawTx) - console.log(JSON.stringify(signedTx)) - let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') - console.info(`Update cota metadata information tx has been sent with tx hash ${txHash}`) -} - -run() +import { addressToScript } from '@nervosnetwork/ckb-sdk-utils' +import { Collector } from '../src/collector' +import { Aggregator } from '../src/aggregator' +import { Service, FEE, CotaInfo } from '../src' +import { generateCotaMetadataTx } from '../src/service/cota/cota-meta' + +const TEST_PRIVATE_KEY = '0xc5bd09c9b954559c70a77d68bde95369e2ce910556ddc20f739080cde3b62ef2' +const TEST_ADDRESS = 'ckt1qyq0scej4vn0uka238m63azcel7cmcme7f2sxj5ska' + +const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { + if (isMainnet) { + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', + } +} + +const run = async () => { + // True for mainnet and false for testnet + const isMainnet = false + + const service: Service = { + collector: new Collector({ + ckbNodeUrl: 'https://testnet.ckb.dev/rpc', + ckbIndexerUrl: 'https://testnet.ckb.dev/indexer', + }), + aggregator: new Aggregator({ registryUrl: 'http://localhost:3050', cotaUrl: 'http://localhost:3030' }), + } + const ckb = service.collector.getCkb() + const cotaLock = addressToScript(TEST_ADDRESS) + + const cotaInfo: CotaInfo = { + name: 'Update First Step', + description: + 'First step to Blockchain mass adoption. NFT platform launch memento.\n\n-- Nervina Labs & Lay2 Tech, 4/30/2021.', + image: 'https://i.loli.net/2021/04/29/qyJNSE4iHAas7GL.png', + } + const cotaId = '0x36cd7eb40416a61b1f90631b4ddfedd95aea6820' + + let rawTx = await generateCotaMetadataTx(service, cotaLock, cotaId, cotaInfo, FEE, isMainnet) + rawTx.cellDeps.push(secp256k1CellDep(isMainnet)) + + const signedTx = ckb.signTransaction(TEST_PRIVATE_KEY)(rawTx) + console.log(JSON.stringify(signedTx)) + let txHash = await ckb.rpc.sendTransaction(signedTx, 'passthrough') + console.info(`Update cota metadata information tx has been sent with tx hash ${txHash}`) +} + +run() diff --git a/example/update.ts b/example/update.ts index febf462..9797e61 100644 --- a/example/update.ts +++ b/example/update.ts @@ -9,15 +9,21 @@ const RECEIVER_ADDRESS = 'ckt1qyqy6xew5q449zg5du7wdjhgrxschjkg3n2q8h5ycc' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { diff --git a/example/withdraw.ts b/example/withdraw.ts index f607524..9e6c25a 100644 --- a/example/withdraw.ts +++ b/example/withdraw.ts @@ -10,15 +10,21 @@ const RECEIVER_ADDRESS = 'ckt1qyqy6xew5q449zg5du7wdjhgrxschjkg3n2q8h5ycc' const secp256k1CellDep = (isMainnet: boolean): CKBComponents.CellDep => { if (isMainnet) { - return { outPoint: { - txHash: "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", - index: "0x0", - }, depType: 'depGroup' } + return { + outPoint: { + txHash: '0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c', + index: '0x0', + }, + depType: 'depGroup', + } + } + return { + outPoint: { + txHash: '0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37', + index: '0x0', + }, + depType: 'depGroup', } - return { outPoint: { - txHash: "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", - index: "0x0", - }, depType: 'depGroup' } } const run = async () => { From 38cbbe6e956d5e6a82c78489c4e8852d9fd69acc Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 6 Dec 2022 15:01:54 +0800 Subject: [PATCH 07/20] refactor: Update mainnet keys --- example/mainnet/define.js | 2 +- example/mainnet/mint.js | 2 +- example/mainnet/registry.js | 2 +- example/mainnet/transfer.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/mainnet/define.js b/example/mainnet/define.js index 28c8c36..e26f6ac 100644 --- a/example/mainnet/define.js +++ b/example/mainnet/define.js @@ -2,7 +2,7 @@ const { addressToScript } = require('@nervosnetwork/ckb-sdk-utils') const { Collector, Aggregator, generateDefineCotaTx, FEE } = require('@nervina-labs/cota-sdk') // AliceMainnet -const TEST_PRIVATE_KEY = '0x65e4b4dc59d93349f0ceb3926ffcb8338808a54afe51338292ea6baa3784619f' +const TEST_PRIVATE_KEY = '0x-example' const TEST_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' const secp256k1CellDep = isMainnet => { diff --git a/example/mainnet/mint.js b/example/mainnet/mint.js index cd82dba..e3c0d82 100644 --- a/example/mainnet/mint.js +++ b/example/mainnet/mint.js @@ -2,7 +2,7 @@ const { addressToScript, serializeScript } = require('@nervosnetwork/ckb-sdk-uti const { Collector, Aggregator, generateMintCotaTx, FEE } = require('@nervina-labs/cota-sdk') // AliceMainnet -const TEST_PRIVATE_KEY = '0x65e4b4dc59d93349f0ceb3926ffcb8338808a54afe51338292ea6baa3784619f' +const TEST_PRIVATE_KEY = '0x-example' const TEST_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' const RECEIVER_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' diff --git a/example/mainnet/registry.js b/example/mainnet/registry.js index 61538ab..2759acc 100644 --- a/example/mainnet/registry.js +++ b/example/mainnet/registry.js @@ -7,7 +7,7 @@ const { const { Collector, Aggregator, getAlwaysSuccessLock, generateRegisterCotaTx, FEE } = require('@nervina-labs/cota-sdk') // AliceMainnet -const TEST_PRIVATE_KEY = '0x65e4b4dc59d93349f0ceb3926ffcb8338808a54afe51338292ea6baa3784619f' +const TEST_PRIVATE_KEY = '0x-example' const TEST_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' const secp256k1CellDep = isMainnet => { diff --git a/example/mainnet/transfer.js b/example/mainnet/transfer.js index 035db1e..bd72d0e 100644 --- a/example/mainnet/transfer.js +++ b/example/mainnet/transfer.js @@ -2,7 +2,7 @@ const { addressToScript, serializeScript } = require('@nervosnetwork/ckb-sdk-uti const { Collector, Aggregator, generateTransferCotaTx, FEE } = require('@nervina-labs/cota-sdk') const TEST_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' -const RECEIVER_PRIVATE_KEY = '0x65e4b4dc59d93349f0ceb3926ffcb8338808a54afe51338292ea6baa3784619f' +const RECEIVER_PRIVATE_KEY = '0x-example' const RECEIVER_ADDRESS = 'ckb1qyqxx0xdw7g67eu35nuj0f237eg8skpdctuqwx39xm' const OTHER_ADDRESS = 'ckb1qyq0xt2728kgl0pfvqgvul92209z7vkxwezsmqz650' From 9e097605d9eebbb46b408039711580fea27e96b0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 19:02:54 +0000 Subject: [PATCH 08/20] chore(deps): update dependency prettier to v2.8.1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f6f1588..4dc1c91 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "4.2.1", "husky": "8.0.2", - "prettier": "2.8.0", + "prettier": "2.8.1", "ts-node": "10.9.1", "tslib": "2.4.1", "typescript": "4.9.3" diff --git a/yarn.lock b/yarn.lock index c020556..ff19f95 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1573,10 +1573,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9" - integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA== +prettier@2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" + integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== proxy-from-env@^1.1.0: version "1.1.0" From d35b7c6eea844558bb9595741f16e7ddba7d581c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 01:05:40 +0000 Subject: [PATCH 09/20] chore(deps): update dependency typescript to v4.9.4 --- example/aggregator/package.json | 2 +- example/aggregator/yarn.lock | 8 ++++---- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/aggregator/package.json b/example/aggregator/package.json index ef597bd..0cd1074 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -12,6 +12,6 @@ "@types/node": "18.11.11", "ts-node": "10.9.1", "tslib": "2.4.1", - "typescript": "4.8.3" + "typescript": "4.9.4" } } diff --git a/example/aggregator/yarn.lock b/example/aggregator/yarn.lock index 01f0a0e..a89a6d8 100644 --- a/example/aggregator/yarn.lock +++ b/example/aggregator/yarn.lock @@ -352,10 +352,10 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -typescript@4.8.3: - version "4.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" - integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== +typescript@4.9.4: + version "4.9.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" + integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== v8-compile-cache-lib@^3.0.1: version "3.0.1" diff --git a/package.json b/package.json index 4dc1c91..f1fef46 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "prettier": "2.8.1", "ts-node": "10.9.1", "tslib": "2.4.1", - "typescript": "4.9.3" + "typescript": "4.9.4" }, "homepage": "https://github.com/nervina-labs/cota-sdk-js#readme" } diff --git a/yarn.lock b/yarn.lock index ff19f95..c82bdd1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1817,10 +1817,10 @@ type-fest@^2.13.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== -typescript@4.9.3: - version "4.9.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db" - integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA== +typescript@4.9.4: + version "4.9.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" + integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== unbox-primitive@^1.0.2: version "1.0.2" From dc5f409992032fe0e39cf645363862ec7ddff55a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 21:10:13 +0000 Subject: [PATCH 10/20] chore(deps): update dependency @types/node to v18.11.12 --- example/aggregator/package.json | 2 +- example/aggregator/yarn.lock | 8 ++++---- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/aggregator/package.json b/example/aggregator/package.json index ef597bd..8582b60 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@nervina-labs/cota-sdk": "0.8.0", - "@types/node": "18.11.11", + "@types/node": "18.11.12", "ts-node": "10.9.1", "tslib": "2.4.1", "typescript": "4.8.3" diff --git a/example/aggregator/yarn.lock b/example/aggregator/yarn.lock index 01f0a0e..b720873 100644 --- a/example/aggregator/yarn.lock +++ b/example/aggregator/yarn.lock @@ -94,10 +94,10 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== -"@types/node@18.11.11": - version "18.11.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc" - integrity sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g== +"@types/node@18.11.12": + version "18.11.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.12.tgz#89e7f8aa8c88abf432f9bd594888144d7dba10aa" + integrity sha512-FgD3NtTAKvyMmD44T07zz2fEf+OKwutgBCEVM8GcvMGVGaDktiLNTDvPwC/LUe3PinMW+X6CuLOF2Ui1mAlSXg== acorn-walk@^8.1.1: version "8.2.0" diff --git a/package.json b/package.json index 4dc1c91..445ec16 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/crypto-js": "4.1.1", - "@types/node": "18.11.11", + "@types/node": "18.11.12", "@typescript-eslint/parser": "5.45.1", "babel-eslint": "10.1.0", "eslint": "8.29.0", diff --git a/yarn.lock b/yarn.lock index ff19f95..f3e5070 100644 --- a/yarn.lock +++ b/yarn.lock @@ -264,10 +264,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node@18.11.11": - version "18.11.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc" - integrity sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g== +"@types/node@18.11.12": + version "18.11.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.12.tgz#89e7f8aa8c88abf432f9bd594888144d7dba10aa" + integrity sha512-FgD3NtTAKvyMmD44T07zz2fEf+OKwutgBCEVM8GcvMGVGaDktiLNTDvPwC/LUe3PinMW+X6CuLOF2Ui1mAlSXg== "@typescript-eslint/parser@5.45.1": version "5.45.1" From e253fecbe3499871fbcf85d275093063ce4b12b4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:25:06 +0000 Subject: [PATCH 11/20] chore(deps): update dependency @types/node to v18.11.13 --- example/aggregator/package.json | 2 +- example/aggregator/yarn.lock | 8 ++++---- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/aggregator/package.json b/example/aggregator/package.json index cfa02ef..ed1c318 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@nervina-labs/cota-sdk": "0.8.0", - "@types/node": "18.11.12", + "@types/node": "18.11.13", "ts-node": "10.9.1", "tslib": "2.4.1", "typescript": "4.9.4" diff --git a/example/aggregator/yarn.lock b/example/aggregator/yarn.lock index 17fd4af..cfb7e5b 100644 --- a/example/aggregator/yarn.lock +++ b/example/aggregator/yarn.lock @@ -94,10 +94,10 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== -"@types/node@18.11.12": - version "18.11.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.12.tgz#89e7f8aa8c88abf432f9bd594888144d7dba10aa" - integrity sha512-FgD3NtTAKvyMmD44T07zz2fEf+OKwutgBCEVM8GcvMGVGaDktiLNTDvPwC/LUe3PinMW+X6CuLOF2Ui1mAlSXg== +"@types/node@18.11.13": + version "18.11.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.13.tgz#dff34f226ec1ac0432ae3b136ec5552bd3b9c0fe" + integrity sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w== acorn-walk@^8.1.1: version "8.2.0" diff --git a/package.json b/package.json index 34cda46..f6acaab 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/crypto-js": "4.1.1", - "@types/node": "18.11.12", + "@types/node": "18.11.13", "@typescript-eslint/parser": "5.45.1", "babel-eslint": "10.1.0", "eslint": "8.29.0", diff --git a/yarn.lock b/yarn.lock index a9d094e..14f8faa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -264,10 +264,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node@18.11.12": - version "18.11.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.12.tgz#89e7f8aa8c88abf432f9bd594888144d7dba10aa" - integrity sha512-FgD3NtTAKvyMmD44T07zz2fEf+OKwutgBCEVM8GcvMGVGaDktiLNTDvPwC/LUe3PinMW+X6CuLOF2Ui1mAlSXg== +"@types/node@18.11.13": + version "18.11.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.13.tgz#dff34f226ec1ac0432ae3b136ec5552bd3b9c0fe" + integrity sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w== "@typescript-eslint/parser@5.45.1": version "5.45.1" From e0e50f6af45a16c415d789963c4a451d8d72e842 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 02:12:38 +0000 Subject: [PATCH 12/20] chore(deps): update dependency @typescript-eslint/parser to v5.46.0 --- package.json | 2 +- yarn.lock | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index f6acaab..9f2ad39 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/node": "18.11.13", - "@typescript-eslint/parser": "5.45.1", + "@typescript-eslint/parser": "5.46.0", "babel-eslint": "10.1.0", "eslint": "8.29.0", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index 14f8faa..ca24cf5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -269,48 +269,48 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.13.tgz#dff34f226ec1ac0432ae3b136ec5552bd3b9c0fe" integrity sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w== -"@typescript-eslint/parser@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.45.1.tgz#6440ec283fa1373a12652d4e2fef4cb6e7b7e8c6" - integrity sha512-JQ3Ep8bEOXu16q0ztsatp/iQfDCtvap7sp/DKo7DWltUquj5AfCOpX2zSzJ8YkAVnrQNqQ5R62PBz2UtrfmCkA== - dependencies: - "@typescript-eslint/scope-manager" "5.45.1" - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/typescript-estree" "5.45.1" +"@typescript-eslint/parser@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.46.0.tgz#002d8e67122947922a62547acfed3347cbf2c0b6" + integrity sha512-joNO6zMGUZg+C73vwrKXCd8usnsmOYmgW/w5ZW0pG0RGvqeznjtGDk61EqqTpNrFLUYBW2RSBFrxdAZMqA4OZA== + dependencies: + "@typescript-eslint/scope-manager" "5.46.0" + "@typescript-eslint/types" "5.46.0" + "@typescript-eslint/typescript-estree" "5.46.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.45.1.tgz#5b87d025eec7035d879b99c260f03be5c247883c" - integrity sha512-D6fCileR6Iai7E35Eb4Kp+k0iW7F1wxXYrOhX/3dywsOJpJAQ20Fwgcf+P/TDtvQ7zcsWsrJaglaQWDhOMsspQ== +"@typescript-eslint/scope-manager@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.46.0.tgz#60790b14d0c687dd633b22b8121374764f76ce0d" + integrity sha512-7wWBq9d/GbPiIM6SqPK9tfynNxVbfpihoY5cSFMer19OYUA3l4powA2uv0AV2eAZV6KoAh6lkzxv4PoxOLh1oA== dependencies: - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/visitor-keys" "5.45.1" + "@typescript-eslint/types" "5.46.0" + "@typescript-eslint/visitor-keys" "5.46.0" -"@typescript-eslint/types@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.45.1.tgz#8e1883041cee23f1bb7e1343b0139f97f6a17c14" - integrity sha512-HEW3U0E5dLjUT+nk7b4lLbOherS1U4ap+b9pfu2oGsW3oPu7genRaY9dDv3nMczC1rbnRY2W/D7SN05wYoGImg== +"@typescript-eslint/types@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.46.0.tgz#f4d76622a996b88153bbd829ea9ccb9f7a5d28bc" + integrity sha512-wHWgQHFB+qh6bu0IAPAJCdeCdI0wwzZnnWThlmHNY01XJ9Z97oKqKOzWYpR2I83QmshhQJl6LDM9TqMiMwJBTw== -"@typescript-eslint/typescript-estree@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.1.tgz#b3dc37f0c4f0fe73e09917fc735e6f96eabf9ba4" - integrity sha512-76NZpmpCzWVrrb0XmYEpbwOz/FENBi+5W7ipVXAsG3OoFrQKJMiaqsBMbvGRyLtPotGqUfcY7Ur8j0dksDJDng== +"@typescript-eslint/typescript-estree@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.46.0.tgz#a6c2b84b9351f78209a1d1f2d99ca553f7fa29a5" + integrity sha512-kDLNn/tQP+Yp8Ro2dUpyyVV0Ksn2rmpPpB0/3MO874RNmXtypMwSeazjEN/Q6CTp8D7ExXAAekPEcCEB/vtJkw== dependencies: - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/visitor-keys" "5.45.1" + "@typescript-eslint/types" "5.46.0" + "@typescript-eslint/visitor-keys" "5.46.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.1.tgz#204428430ad6a830d24c5ac87c71366a1cfe1948" - integrity sha512-cy9ln+6rmthYWjH9fmx+5FU/JDpjQb586++x2FZlveq7GdGuLLW9a2Jcst2TGekH82bXpfmRNSwP9tyEs6RjvQ== +"@typescript-eslint/visitor-keys@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.46.0.tgz#36d87248ae20c61ef72404bcd61f14aa2563915f" + integrity sha512-E13gBoIXmaNhwjipuvQg1ByqSAu/GbEpP/qzFihugJ+MomtoJtFAJG/+2DRPByf57B863m0/q7Zt16V9ohhANw== dependencies: - "@typescript-eslint/types" "5.45.1" + "@typescript-eslint/types" "5.46.0" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: From 9359c41f934f18d6d39e1d01a59d1fba7edbbcec Mon Sep 17 00:00:00 2001 From: duanyytop Date: Tue, 20 Dec 2022 17:11:06 +0800 Subject: [PATCH 13/20] fix: Update camelcase version --- package.json | 2 +- src/utils/case-parser.ts | 2 +- yarn.lock | 42 ++++++++++++++++++++-------------------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 9f2ad39..32f4073 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@nervosnetwork/ckb-sdk-utils": "^0.103.1", "@nervosnetwork/ckb-types": "^0.103.1", "axios": "^1.2.1", - "camelcase-keys": "^8.0.2", + "camelcase-keys": "7.0.2", "convert-keys": "1.3.4" }, "devDependencies": { diff --git a/src/utils/case-parser.ts b/src/utils/case-parser.ts index 5045ed0..2dd668b 100644 --- a/src/utils/case-parser.ts +++ b/src/utils/case-parser.ts @@ -1,4 +1,4 @@ -import camelcaseKeys from 'camelcase-keys' +import * as camelcaseKeys from 'camelcase-keys' import { toSnake } from 'convert-keys' export const toCamelcase = (object: any) => { diff --git a/yarn.lock b/yarn.lock index ca24cf5..02aaa27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -474,20 +474,20 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase-keys@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-8.0.2.tgz#a7140ba7c797aea32161d4ce5cdbda11d09eb414" - integrity sha512-qMKdlOfsjlezMqxkUGGMaWWs17i2HoL15tM+wtx8ld4nLrUwU58TFdvyGOz/piNP842KeO8yXvggVQSdQ828NA== +camelcase-keys@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-7.0.2.tgz#d048d8c69448745bb0de6fc4c1c52a30dfbe7252" + integrity sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg== dependencies: - camelcase "^7.0.0" - map-obj "^4.3.0" - quick-lru "^6.1.1" - type-fest "^2.13.0" + camelcase "^6.3.0" + map-obj "^4.1.0" + quick-lru "^5.1.1" + type-fest "^1.2.1" -camelcase@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-7.0.0.tgz#fd112621b212126741f998d614cbc2a8623fd174" - integrity sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ== +camelcase@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== chalk@^2.0.0: version "2.4.2" @@ -1366,7 +1366,7 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -map-obj@^4.3.0: +map-obj@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== @@ -1593,10 +1593,10 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -quick-lru@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-6.1.1.tgz#f8e5bf9010376c126c80c1a62827a526c0e60adf" - integrity sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q== +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== regexp.prototype.flags@^1.4.3: version "1.4.3" @@ -1812,10 +1812,10 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^2.13.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" - integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== +type-fest@^1.2.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" + integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== typescript@4.9.4: version "4.9.4" From 30fb1fe40d3e93863ecbf1629434afbba189b334 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Jan 2023 17:18:54 +0000 Subject: [PATCH 14/20] chore(deps): update dependency eslint-config-prettier to v8.6.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 32f4073..b117b68 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@typescript-eslint/parser": "5.46.0", "babel-eslint": "10.1.0", "eslint": "8.29.0", - "eslint-config-prettier": "8.5.0", + "eslint-config-prettier": "8.6.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "4.2.1", "husky": "8.0.2", diff --git a/yarn.lock b/yarn.lock index 02aaa27..26905b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -699,10 +699,10 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" - integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== +eslint-config-prettier@8.6.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" + integrity sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA== eslint-import-resolver-node@^0.3.6: version "0.3.6" From 51b31d4d055fbc33a624866d8640682a13fb23b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Jan 2023 21:42:25 +0000 Subject: [PATCH 15/20] chore(deps): update dependency @typescript-eslint/parser to v5.48.0 --- package.json | 2 +- yarn.lock | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 32f4073..a219341 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/node": "18.11.13", - "@typescript-eslint/parser": "5.46.0", + "@typescript-eslint/parser": "5.48.0", "babel-eslint": "10.1.0", "eslint": "8.29.0", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index 02aaa27..5d2ad43 100644 --- a/yarn.lock +++ b/yarn.lock @@ -269,48 +269,48 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.13.tgz#dff34f226ec1ac0432ae3b136ec5552bd3b9c0fe" integrity sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w== -"@typescript-eslint/parser@5.46.0": - version "5.46.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.46.0.tgz#002d8e67122947922a62547acfed3347cbf2c0b6" - integrity sha512-joNO6zMGUZg+C73vwrKXCd8usnsmOYmgW/w5ZW0pG0RGvqeznjtGDk61EqqTpNrFLUYBW2RSBFrxdAZMqA4OZA== - dependencies: - "@typescript-eslint/scope-manager" "5.46.0" - "@typescript-eslint/types" "5.46.0" - "@typescript-eslint/typescript-estree" "5.46.0" +"@typescript-eslint/parser@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.48.0.tgz#02803355b23884a83e543755349809a50b7ed9ba" + integrity sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg== + dependencies: + "@typescript-eslint/scope-manager" "5.48.0" + "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/typescript-estree" "5.48.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.46.0": - version "5.46.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.46.0.tgz#60790b14d0c687dd633b22b8121374764f76ce0d" - integrity sha512-7wWBq9d/GbPiIM6SqPK9tfynNxVbfpihoY5cSFMer19OYUA3l4powA2uv0AV2eAZV6KoAh6lkzxv4PoxOLh1oA== +"@typescript-eslint/scope-manager@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.48.0.tgz#607731cb0957fbc52fd754fd79507d1b6659cecf" + integrity sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow== dependencies: - "@typescript-eslint/types" "5.46.0" - "@typescript-eslint/visitor-keys" "5.46.0" + "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/visitor-keys" "5.48.0" -"@typescript-eslint/types@5.46.0": - version "5.46.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.46.0.tgz#f4d76622a996b88153bbd829ea9ccb9f7a5d28bc" - integrity sha512-wHWgQHFB+qh6bu0IAPAJCdeCdI0wwzZnnWThlmHNY01XJ9Z97oKqKOzWYpR2I83QmshhQJl6LDM9TqMiMwJBTw== +"@typescript-eslint/types@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.48.0.tgz#d725da8dfcff320aab2ac6f65c97b0df30058449" + integrity sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw== -"@typescript-eslint/typescript-estree@5.46.0": - version "5.46.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.46.0.tgz#a6c2b84b9351f78209a1d1f2d99ca553f7fa29a5" - integrity sha512-kDLNn/tQP+Yp8Ro2dUpyyVV0Ksn2rmpPpB0/3MO874RNmXtypMwSeazjEN/Q6CTp8D7ExXAAekPEcCEB/vtJkw== +"@typescript-eslint/typescript-estree@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.0.tgz#a7f04bccb001003405bb5452d43953a382c2fac2" + integrity sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw== dependencies: - "@typescript-eslint/types" "5.46.0" - "@typescript-eslint/visitor-keys" "5.46.0" + "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/visitor-keys" "5.48.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.46.0": - version "5.46.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.46.0.tgz#36d87248ae20c61ef72404bcd61f14aa2563915f" - integrity sha512-E13gBoIXmaNhwjipuvQg1ByqSAu/GbEpP/qzFihugJ+MomtoJtFAJG/+2DRPByf57B863m0/q7Zt16V9ohhANw== +"@typescript-eslint/visitor-keys@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.0.tgz#4446d5e7f6cadde7140390c0e284c8702d944904" + integrity sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q== dependencies: - "@typescript-eslint/types" "5.46.0" + "@typescript-eslint/types" "5.48.0" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: From 596cd6e9e454234947cd02a01df1d089b131ba01 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 08:39:17 +0000 Subject: [PATCH 16/20] chore(deps): update dependency husky to v8.0.3 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 32f4073..d3f0a53 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "eslint-config-prettier": "8.5.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "4.2.1", - "husky": "8.0.2", + "husky": "8.0.3", "prettier": "2.8.1", "ts-node": "10.9.1", "tslib": "2.4.1", diff --git a/yarn.lock b/yarn.lock index 02aaa27..df3384c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1108,10 +1108,10 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -husky@8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.2.tgz#5816a60db02650f1f22c8b69b928fd6bcd77a236" - integrity sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg== +husky@8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== ignore@^5.2.0: version "5.2.0" From fad561e7acc0768a969a97aa23a55ddf582f8c3d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 09:18:11 +0000 Subject: [PATCH 17/20] chore(deps): update dependency eslint to v8.31.0 --- package.json | 2 +- yarn.lock | 40 ++++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 65b6fe3..7621c73 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/node": "18.11.13", "@typescript-eslint/parser": "5.46.0", "babel-eslint": "10.1.0", - "eslint": "8.29.0", + "eslint": "8.31.0", "eslint-config-prettier": "8.6.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "4.2.1", diff --git a/yarn.lock b/yarn.lock index 6ebd182..94043da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -104,25 +104,25 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@eslint/eslintrc@^1.3.3": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" - integrity sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg== +"@eslint/eslintrc@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" + integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== dependencies: ajv "^6.12.4" debug "^4.3.2" espree "^9.4.0" - globals "^13.15.0" + globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.11.6": - version "0.11.7" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.7.tgz#38aec044c6c828f6ed51d5d7ae3d9b9faf6dbb0f" - integrity sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw== +"@humanwhocodes/config-array@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" + integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -776,13 +776,13 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.29.0: - version "8.29.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.29.0.tgz#d74a88a20fb44d59c51851625bc4ee8d0ec43f87" - integrity sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg== +eslint@8.31.0: + version "8.31.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.31.0.tgz#75028e77cbcff102a9feae1d718135931532d524" + integrity sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA== dependencies: - "@eslint/eslintrc" "^1.3.3" - "@humanwhocodes/config-array" "^0.11.6" + "@eslint/eslintrc" "^1.4.1" + "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" ajv "^6.10.0" @@ -801,7 +801,7 @@ eslint@8.29.0: file-entry-cache "^6.0.1" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.15.0" + globals "^13.19.0" grapheme-splitter "^1.0.4" ignore "^5.2.0" import-fresh "^3.0.0" @@ -1026,10 +1026,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.15.0: - version "13.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" - integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== +globals@^13.19.0: + version "13.19.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.19.0.tgz#7a42de8e6ad4f7242fbcca27ea5b23aca367b5c8" + integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== dependencies: type-fest "^0.20.2" From 3b763384653d18fbc545634be3301814c561037f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 20:32:32 +0000 Subject: [PATCH 18/20] chore(deps): update dependency @typescript-eslint/parser to v5.49.0 --- package.json | 2 +- yarn.lock | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index c6f9ccf..cd22124 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/node": "18.11.13", - "@typescript-eslint/parser": "5.48.0", + "@typescript-eslint/parser": "5.49.0", "babel-eslint": "10.1.0", "eslint": "8.31.0", "eslint-config-prettier": "8.6.0", diff --git a/yarn.lock b/yarn.lock index f433d29..2e7fbcc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -269,48 +269,48 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.13.tgz#dff34f226ec1ac0432ae3b136ec5552bd3b9c0fe" integrity sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w== -"@typescript-eslint/parser@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.48.0.tgz#02803355b23884a83e543755349809a50b7ed9ba" - integrity sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg== - dependencies: - "@typescript-eslint/scope-manager" "5.48.0" - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/typescript-estree" "5.48.0" +"@typescript-eslint/parser@5.49.0": + version "5.49.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.49.0.tgz#d699734b2f20e16351e117417d34a2bc9d7c4b90" + integrity sha512-veDlZN9mUhGqU31Qiv2qEp+XrJj5fgZpJ8PW30sHU+j/8/e5ruAhLaVDAeznS7A7i4ucb/s8IozpDtt9NqCkZg== + dependencies: + "@typescript-eslint/scope-manager" "5.49.0" + "@typescript-eslint/types" "5.49.0" + "@typescript-eslint/typescript-estree" "5.49.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.48.0.tgz#607731cb0957fbc52fd754fd79507d1b6659cecf" - integrity sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow== +"@typescript-eslint/scope-manager@5.49.0": + version "5.49.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.49.0.tgz#81b5d899cdae446c26ddf18bd47a2f5484a8af3e" + integrity sha512-clpROBOiMIzpbWNxCe1xDK14uPZh35u4QaZO1GddilEzoCLAEz4szb51rBpdgurs5k2YzPtJeTEN3qVbG+LRUQ== dependencies: - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/visitor-keys" "5.48.0" + "@typescript-eslint/types" "5.49.0" + "@typescript-eslint/visitor-keys" "5.49.0" -"@typescript-eslint/types@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.48.0.tgz#d725da8dfcff320aab2ac6f65c97b0df30058449" - integrity sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw== +"@typescript-eslint/types@5.49.0": + version "5.49.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.49.0.tgz#ad66766cb36ca1c89fcb6ac8b87ec2e6dac435c3" + integrity sha512-7If46kusG+sSnEpu0yOz2xFv5nRz158nzEXnJFCGVEHWnuzolXKwrH5Bsf9zsNlOQkyZuk0BZKKoJQI+1JPBBg== -"@typescript-eslint/typescript-estree@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.0.tgz#a7f04bccb001003405bb5452d43953a382c2fac2" - integrity sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw== +"@typescript-eslint/typescript-estree@5.49.0": + version "5.49.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.49.0.tgz#ebd6294c0ea97891fce6af536048181e23d729c8" + integrity sha512-PBdx+V7deZT/3GjNYPVQv1Nc0U46dAHbIuOG8AZ3on3vuEKiPDwFE/lG1snN2eUB9IhF7EyF7K1hmTcLztNIsA== dependencies: - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/visitor-keys" "5.48.0" + "@typescript-eslint/types" "5.49.0" + "@typescript-eslint/visitor-keys" "5.49.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.0.tgz#4446d5e7f6cadde7140390c0e284c8702d944904" - integrity sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q== +"@typescript-eslint/visitor-keys@5.49.0": + version "5.49.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.49.0.tgz#2561c4da3f235f5c852759bf6c5faec7524f90fe" + integrity sha512-v9jBMjpNWyn8B6k/Mjt6VbUS4J1GvUlR4x3Y+ibnP1z7y7V4n0WRz+50DY6+Myj0UaXVSuUlHohO+eZ8IJEnkg== dependencies: - "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/types" "5.49.0" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: From 0877d7b164713671a4f0634a3b276576bac46098 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 22:57:27 +0000 Subject: [PATCH 19/20] chore(deps): update dependency typescript to v4.9.5 --- example/aggregator/package.json | 2 +- example/aggregator/yarn.lock | 8 ++++---- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/aggregator/package.json b/example/aggregator/package.json index ed1c318..47d4a00 100644 --- a/example/aggregator/package.json +++ b/example/aggregator/package.json @@ -12,6 +12,6 @@ "@types/node": "18.11.13", "ts-node": "10.9.1", "tslib": "2.4.1", - "typescript": "4.9.4" + "typescript": "4.9.5" } } diff --git a/example/aggregator/yarn.lock b/example/aggregator/yarn.lock index cfb7e5b..11b7900 100644 --- a/example/aggregator/yarn.lock +++ b/example/aggregator/yarn.lock @@ -352,10 +352,10 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -typescript@4.9.4: - version "4.9.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" - integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== +typescript@4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== v8-compile-cache-lib@^3.0.1: version "3.0.1" diff --git a/package.json b/package.json index c6f9ccf..496797a 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "prettier": "2.8.1", "ts-node": "10.9.1", "tslib": "2.4.1", - "typescript": "4.9.4" + "typescript": "4.9.5" }, "homepage": "https://github.com/nervina-labs/cota-sdk-js#readme" } diff --git a/yarn.lock b/yarn.lock index f433d29..1d0d6ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1817,10 +1817,10 @@ type-fest@^1.2.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -typescript@4.9.4: - version "4.9.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" - integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== +typescript@4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== unbox-primitive@^1.0.2: version "1.0.2" From 8f3e4082a1f42b4bdd06779c7ad8e97dda9ed1a1 Mon Sep 17 00:00:00 2001 From: Dylan Duan Date: Tue, 21 Mar 2023 20:28:33 +0800 Subject: [PATCH 20/20] chore: Bump version to v0.9.0 --- package.json | 2 +- src/constants/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9353a91..d97cddf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nervina-labs/cota-sdk", - "version": "0.8.0", + "version": "0.9.0", "description": "The SDK of CoTA", "repository": "git@github.com:nervina-labs/cota-sdk-js.git", "author": "duanyytop ", diff --git a/src/constants/index.ts b/src/constants/index.ts index b9ba838..d251bf2 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -45,7 +45,7 @@ const MainnetInfo = { } as CKBComponents.Script, CotaTypeDep: { - outPoint: { txHash: '0x875db3381ebe7a730676c110e1c0d78ae1bdd0c11beacb7db4db08e368c2cd95', index: '0x0' }, + outPoint: { txHash: '0xabaa25237554f0d6c586dc010e7e85e6870bcfd9fb8773257ecacfbe1fd738a0', index: '0x0' }, depType: 'depGroup', } as CKBComponents.CellDep,