From cb5d8fd3378924363e4819f35ec956e29bfd2419 Mon Sep 17 00:00:00 2001 From: Fernando Sirni Date: Tue, 16 Aug 2022 11:50:52 -0300 Subject: [PATCH] adding decode function --- package-lock.json | 903 ++++++++++++---------------------------------- package.json | 2 +- src/index.ts | 96 +++-- 3 files changed, 298 insertions(+), 703 deletions(-) diff --git a/package-lock.json b/package-lock.json index ff3cd7e..2d86828 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@polkadot/api": "^9.1.1", + "@polkadot/api": "^8.14.1", "@substrate/txwrapper-core": "^3.1.7", "nodemon": "^2.0.19" } @@ -48,25 +48,25 @@ ] }, "node_modules/@polkadot/api": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-9.1.1.tgz", - "integrity": "sha512-5iHHdwo0/WunE8JgLeTn9ic27D1vFIwuutvIcx1gw6jYo+ggBpUG5iSW6j6ZYY8/i2v3KDbjB5eCcdjjNYGeiA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-8.14.1.tgz", + "integrity": "sha512-jg26eIKFYqVfDBTAopHL3aDaNw9j6TdUkXuvYJOnynpecU4xwbTVKcOtSOjJ2eRX4MgMQ4zlyMHJx3iKw0uUTA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/api-augment": "9.1.1", - "@polkadot/api-base": "9.1.1", - "@polkadot/api-derive": "9.1.1", - "@polkadot/keyring": "^10.1.3", - "@polkadot/rpc-augment": "9.1.1", - "@polkadot/rpc-core": "9.1.1", - "@polkadot/rpc-provider": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/types-augment": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/types-create": "9.1.1", - "@polkadot/types-known": "9.1.1", - "@polkadot/util": "^10.1.3", - "@polkadot/util-crypto": "^10.1.3", + "@polkadot/api-augment": "8.14.1", + "@polkadot/api-base": "8.14.1", + "@polkadot/api-derive": "8.14.1", + "@polkadot/keyring": "^10.1.1", + "@polkadot/rpc-augment": "8.14.1", + "@polkadot/rpc-core": "8.14.1", + "@polkadot/rpc-provider": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-augment": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/types-create": "8.14.1", + "@polkadot/types-known": "8.14.1", + "@polkadot/util": "^10.1.1", + "@polkadot/util-crypto": "^10.1.1", "eventemitter3": "^4.0.7", "rxjs": "^7.5.6" }, @@ -75,31 +75,31 @@ } }, "node_modules/@polkadot/api-augment": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-9.1.1.tgz", - "integrity": "sha512-oPFLSV/+Z5fAdJB9ku0pNtnB5lK4wrK5vuY6r4Uh2Rkols9pv5a5naXZFSXD0+5+zUakW5Fceh9gjCb0mMvwYg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-8.14.1.tgz", + "integrity": "sha512-65GMlgVnZd08Ifh8uAj+p/+MlXxvsAfBcCHjQhOmbCE0dki+rzTPUR31LsWyDKtuw+nUBj0iZN4PelO+wU4r0g==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/api-base": "9.1.1", - "@polkadot/rpc-augment": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/types-augment": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/api-base": "8.14.1", + "@polkadot/rpc-augment": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-augment": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/api-base": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-9.1.1.tgz", - "integrity": "sha512-Dy/mdyUPMgZjUYOv/jSg5VrQpNmS+3qF496wSHpacRT3xNXMZDDLl8R+ldJjvBYvsLVry4FnZ1Ge5dLzrITfmw==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-8.14.1.tgz", + "integrity": "sha512-EXFhNXIfpirf18IsqcG2pGQW1/Xn+bfjqVYQMMJ4ZONtYH4baZZlXk7SoXCCHonN2x1ixs4DOcRx5oVxjabdIQ==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/util": "^10.1.3", + "@polkadot/rpc-core": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/util": "^10.1.1", "rxjs": "^7.5.6" }, "engines": { @@ -107,19 +107,19 @@ } }, "node_modules/@polkadot/api-derive": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-9.1.1.tgz", - "integrity": "sha512-ZWPZgmT/YiK0DhTel261iZ+bTA19C15UTOlaMwm/ZkAjA/7GGPnbiYChIFJvdvaTQx8lu9vlmqK5QdjmrYlvMg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-8.14.1.tgz", + "integrity": "sha512-eWG1MrQhHMUjt9gDHN9/9/ZMATu1MolqcalPFhNoGtdON3+I0J3ntjQ4y5X7+p2OGwQplpYRKqbK4k7tKzu8tA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/api": "9.1.1", - "@polkadot/api-augment": "9.1.1", - "@polkadot/api-base": "9.1.1", - "@polkadot/rpc-core": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3", - "@polkadot/util-crypto": "^10.1.3", + "@polkadot/api": "8.14.1", + "@polkadot/api-augment": "8.14.1", + "@polkadot/api-base": "8.14.1", + "@polkadot/rpc-core": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1", + "@polkadot/util-crypto": "^10.1.1", "rxjs": "^7.5.6" }, "engines": { @@ -157,30 +157,30 @@ } }, "node_modules/@polkadot/rpc-augment": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-9.1.1.tgz", - "integrity": "sha512-hbT7XvK/BqDdt6NzFTHFebjimXCxN8g2VxRVgS0/xPCrZAwk3L9raLRptpEYN2/sAKsJlKykID4ATmWu3l1OUA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-8.14.1.tgz", + "integrity": "sha512-0dIsNVIMeCp0kV7+Obz0Odt6K32Ka2ygwhiV5jhhJthy8GJBPo94mKDed5gzln3Dgl2LEdJJt1h/pgCx4a2i4A==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/rpc-core": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/rpc-core": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-9.1.1.tgz", - "integrity": "sha512-FMywgTTso8evroA2RTVzbg+4h2K4A25hgjidpj49UzJYFtSVpvhFMzPJhcYoo6C8rrFvwH1eDmCLsj6DM0LRKg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-8.14.1.tgz", + "integrity": "sha512-deQ8Ob59ao/1fZQdaVtFjYR/HCBdxSYvQGt7/alBu1Uig9Sahx9oKcMkU5rWY36XqGZYos4zLay98W2hDlf+6Q==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-augment": "9.1.1", - "@polkadot/rpc-provider": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/util": "^10.1.3", + "@polkadot/rpc-augment": "8.14.1", + "@polkadot/rpc-provider": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/util": "^10.1.1", "rxjs": "^7.5.6" }, "engines": { @@ -188,20 +188,20 @@ } }, "node_modules/@polkadot/rpc-provider": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-9.1.1.tgz", - "integrity": "sha512-Xn/2ZeZDGnmvWK1VP9O610Hv5Ry6f5k9g200Q+2m/Aw+d9xw65EDuo3e/N/hB0NB+PKVp5KnTn0oDPFn0wxQgA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-8.14.1.tgz", + "integrity": "sha512-pAUSHZiSWLhBSYf4LmLc8iCaeqTu7Ajn8AzyqxvZDHGnIrzV5M7eTjpNDP84qno6jWRHKQ/IILr62hausEmS5w==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.3", - "@polkadot/types": "9.1.1", - "@polkadot/types-support": "9.1.1", - "@polkadot/util": "^10.1.3", - "@polkadot/util-crypto": "^10.1.3", - "@polkadot/x-fetch": "^10.1.3", - "@polkadot/x-global": "^10.1.3", - "@polkadot/x-ws": "^10.1.3", - "@substrate/connect": "0.7.10", + "@polkadot/keyring": "^10.1.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-support": "8.14.1", + "@polkadot/util": "^10.1.1", + "@polkadot/util-crypto": "^10.1.1", + "@polkadot/x-fetch": "^10.1.1", + "@polkadot/x-global": "^10.1.1", + "@polkadot/x-ws": "^10.1.1", + "@substrate/connect": "0.7.9", "eventemitter3": "^4.0.7", "mock-socket": "^9.1.5", "nock": "^13.2.9" @@ -211,17 +211,17 @@ } }, "node_modules/@polkadot/types": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-9.1.1.tgz", - "integrity": "sha512-hEA8Pnc6ipHKUHxMS0gtjpYuus5y+yzE+t14VnSfRiqDtug3lj8SfAuaKpMuWytsJzwuP8GvzdsOHgu8zu0gzg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-8.14.1.tgz", + "integrity": "sha512-Xza16ejKrSd4XhTOlbfISyxZ2sRmbMAZk5pX7VEMHVZHqV98o+bJ2f9Kk7F8YJijkHHGosCLDestP9R5nLoOoA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.3", - "@polkadot/types-augment": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/types-create": "9.1.1", - "@polkadot/util": "^10.1.3", - "@polkadot/util-crypto": "^10.1.3", + "@polkadot/keyring": "^10.1.1", + "@polkadot/types-augment": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/types-create": "8.14.1", + "@polkadot/util": "^10.1.1", + "@polkadot/util-crypto": "^10.1.1", "rxjs": "^7.5.6" }, "engines": { @@ -229,68 +229,68 @@ } }, "node_modules/@polkadot/types-augment": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-9.1.1.tgz", - "integrity": "sha512-Q5Ga0HORVehRhpeZEO6rckAPYpgUOp7Bu1qFH+eUbwOq3rQRlvYJJCUnBUsaHHNh1t7pUqmwMTEeCH90wrkH5g==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-8.14.1.tgz", + "integrity": "sha512-Xa4TUFqyZT+IJ6pBSwDjWcF42u/E34OyC+gbs5Z2vWQ4EzSDkq4xNoUKjJlEEgTemsD9lhPOIc4jvqTCefwxEw==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/types": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/types": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-codec": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-9.1.1.tgz", - "integrity": "sha512-dxNGtdY8ENvfqMp72cUV2ddjbHdEPfBSNYkWW160FX8X1zm9NREuM7TpVimNNfZ5K16wsTLDSMvYp59VcGjkQQ==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-8.14.1.tgz", + "integrity": "sha512-y6YDN4HwvEgSWlgrEV04QBBxDxES1cTuUQFzZJzOTuZCWpA371Mdj3M9wYxGXMnj0wa+rCQGECHPZZaNxBMiKg==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.3", - "@polkadot/x-bigint": "^10.1.3" + "@polkadot/util": "^10.1.1", + "@polkadot/x-bigint": "^10.1.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-create": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-9.1.1.tgz", - "integrity": "sha512-V8A/JQFU0ryz0KZqW0LAhW1fbtI5OvwZf5P9Q0iz2qansyyZkKQkMacDdV63g1XfphR2Nv/BhrHbZXgoNbTuhw==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-8.14.1.tgz", + "integrity": "sha512-fb9yyblj5AYAPzeCIq0kYSfzDxRDi/0ud9gN2UzB3H7M/O4n2mPC1vD4UOLF+B7l9QzCrt4e+k+/riGp7GfvyA==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-known": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-9.1.1.tgz", - "integrity": "sha512-8iGeKfYsitEMeh4h9wm3W/2RZHnPomtyCZo1VSzNVi0xioDPK+gIjO/7oqT4JCnt6ET8MH4NuHWUWw4WXvixAQ==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-8.14.1.tgz", + "integrity": "sha512-GP7gRo9nmitykkrRnoLF61Qm19UFdTwMsOnJkdm7AOeWDmZGxutacgO6k1tBsHr38hsiCCGsB/JiseUgywvGIw==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/networks": "^10.1.3", - "@polkadot/types": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/types-create": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/networks": "^10.1.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/types-create": "8.14.1", + "@polkadot/util": "^10.1.1" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@polkadot/types-support": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-9.1.1.tgz", - "integrity": "sha512-6zn0am9ywy9whsKgFYsGqu9JJjhpoU/kHNh9KtUpv1e3x9rTnpAuJh1tzeu5glV+3keBMa90r6uBfExXlsKq3A==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-8.14.1.tgz", + "integrity": "sha512-XqR4qq6pCZyNBuFVod8nFSNUmLssrjoU9bOIn4Ua2cqNlI9xsuKaI1X5ySEn/oWOtKQ2L5hbCm9vkXrEtXBl1w==", "dependencies": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.3" + "@polkadot/util": "^10.1.1" }, "engines": { "node": ">=14.0.0" @@ -532,12 +532,12 @@ ] }, "node_modules/@substrate/connect": { - "version": "0.7.10", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.10.tgz", - "integrity": "sha512-WNdW18e0I696/AQjrAXdMD9W8YaKLTcPr2Cu8scSwiUT40in84KEzi+g+P367cE2etAc+Dvu8vNDEQTbUPNqEg==", + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.9.tgz", + "integrity": "sha512-E6bdBhzsfHNAKlmQSvbTW1jyb0WcIvgbrEBfJ4B6FZ3t1wpGjldL6GrYtegVtKr9/ySQ/pFNn0uVbugukpMDjQ==", "dependencies": { "@substrate/connect-extension-protocol": "^1.0.1", - "@substrate/smoldot-light": "0.6.27", + "@substrate/smoldot-light": "0.6.25", "eventemitter3": "^4.0.7" } }, @@ -547,11 +547,10 @@ "integrity": "sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==" }, "node_modules/@substrate/smoldot-light": { - "version": "0.6.27", - "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.27.tgz", - "integrity": "sha512-Wy3fbyfZqR3HLynuxeBkUunZsrbqpsmFN+D0/8cVIHZbO7WDwJsmCUc32yO5r+v6s/T97L7FOJHEyMWmRfnKAQ==", + "version": "0.6.25", + "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.25.tgz", + "integrity": "sha512-OQ9/bnJJy90xSRg5Vp9MIvrgbrVt/r/FwXYSmyLeBBNbJt6o1gSeshVo8icD+2VWwd/TJ2oHl5CVQWe89MyByA==", "dependencies": { - "pako": "^2.0.4", "websocket": "^1.0.32" } }, @@ -569,243 +568,6 @@ "memoizee": "0.4.15" } }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/api": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-8.14.1.tgz", - "integrity": "sha512-jg26eIKFYqVfDBTAopHL3aDaNw9j6TdUkXuvYJOnynpecU4xwbTVKcOtSOjJ2eRX4MgMQ4zlyMHJx3iKw0uUTA==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/api-augment": "8.14.1", - "@polkadot/api-base": "8.14.1", - "@polkadot/api-derive": "8.14.1", - "@polkadot/keyring": "^10.1.1", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/rpc-provider": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/types-known": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "eventemitter3": "^4.0.7", - "rxjs": "^7.5.6" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/api-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-8.14.1.tgz", - "integrity": "sha512-65GMlgVnZd08Ifh8uAj+p/+MlXxvsAfBcCHjQhOmbCE0dki+rzTPUR31LsWyDKtuw+nUBj0iZN4PelO+wU4r0g==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/api-base": "8.14.1", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/api-base": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-8.14.1.tgz", - "integrity": "sha512-EXFhNXIfpirf18IsqcG2pGQW1/Xn+bfjqVYQMMJ4ZONtYH4baZZlXk7SoXCCHonN2x1ixs4DOcRx5oVxjabdIQ==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/util": "^10.1.1", - "rxjs": "^7.5.6" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/api-derive": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-8.14.1.tgz", - "integrity": "sha512-eWG1MrQhHMUjt9gDHN9/9/ZMATu1MolqcalPFhNoGtdON3+I0J3ntjQ4y5X7+p2OGwQplpYRKqbK4k7tKzu8tA==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/api": "8.14.1", - "@polkadot/api-augment": "8.14.1", - "@polkadot/api-base": "8.14.1", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "rxjs": "^7.5.6" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/rpc-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-8.14.1.tgz", - "integrity": "sha512-0dIsNVIMeCp0kV7+Obz0Odt6K32Ka2ygwhiV5jhhJthy8GJBPo94mKDed5gzln3Dgl2LEdJJt1h/pgCx4a2i4A==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/rpc-core": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-8.14.1.tgz", - "integrity": "sha512-deQ8Ob59ao/1fZQdaVtFjYR/HCBdxSYvQGt7/alBu1Uig9Sahx9oKcMkU5rWY36XqGZYos4zLay98W2hDlf+6Q==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/rpc-provider": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/util": "^10.1.1", - "rxjs": "^7.5.6" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/rpc-provider": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-8.14.1.tgz", - "integrity": "sha512-pAUSHZiSWLhBSYf4LmLc8iCaeqTu7Ajn8AzyqxvZDHGnIrzV5M7eTjpNDP84qno6jWRHKQ/IILr62hausEmS5w==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-support": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "@polkadot/x-fetch": "^10.1.1", - "@polkadot/x-global": "^10.1.1", - "@polkadot/x-ws": "^10.1.1", - "@substrate/connect": "0.7.9", - "eventemitter3": "^4.0.7", - "mock-socket": "^9.1.5", - "nock": "^13.2.9" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-8.14.1.tgz", - "integrity": "sha512-Xza16ejKrSd4XhTOlbfISyxZ2sRmbMAZk5pX7VEMHVZHqV98o+bJ2f9Kk7F8YJijkHHGosCLDestP9R5nLoOoA==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "rxjs": "^7.5.6" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-8.14.1.tgz", - "integrity": "sha512-Xa4TUFqyZT+IJ6pBSwDjWcF42u/E34OyC+gbs5Z2vWQ4EzSDkq4xNoUKjJlEEgTemsD9lhPOIc4jvqTCefwxEw==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-codec": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-8.14.1.tgz", - "integrity": "sha512-y6YDN4HwvEgSWlgrEV04QBBxDxES1cTuUQFzZJzOTuZCWpA371Mdj3M9wYxGXMnj0wa+rCQGECHPZZaNxBMiKg==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.1", - "@polkadot/x-bigint": "^10.1.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-create": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-8.14.1.tgz", - "integrity": "sha512-fb9yyblj5AYAPzeCIq0kYSfzDxRDi/0ud9gN2UzB3H7M/O4n2mPC1vD4UOLF+B7l9QzCrt4e+k+/riGp7GfvyA==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-known": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-8.14.1.tgz", - "integrity": "sha512-GP7gRo9nmitykkrRnoLF61Qm19UFdTwMsOnJkdm7AOeWDmZGxutacgO6k1tBsHr38hsiCCGsB/JiseUgywvGIw==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/networks": "^10.1.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/util": "^10.1.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-support": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-8.14.1.tgz", - "integrity": "sha512-XqR4qq6pCZyNBuFVod8nFSNUmLssrjoU9bOIn4Ua2cqNlI9xsuKaI1X5ySEn/oWOtKQ2L5hbCm9vkXrEtXBl1w==", - "dependencies": { - "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@substrate/connect": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.9.tgz", - "integrity": "sha512-E6bdBhzsfHNAKlmQSvbTW1jyb0WcIvgbrEBfJ4B6FZ3t1wpGjldL6GrYtegVtKr9/ySQ/pFNn0uVbugukpMDjQ==", - "dependencies": { - "@substrate/connect-extension-protocol": "^1.0.1", - "@substrate/smoldot-light": "0.6.25", - "eventemitter3": "^4.0.7" - } - }, - "node_modules/@substrate/txwrapper-core/node_modules/@substrate/smoldot-light": { - "version": "0.6.25", - "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.25.tgz", - "integrity": "sha512-OQ9/bnJJy90xSRg5Vp9MIvrgbrVt/r/FwXYSmyLeBBNbJt6o1gSeshVo8icD+2VWwd/TJ2oHl5CVQWe89MyByA==", - "dependencies": { - "websocket": "^1.0.32" - } - }, "node_modules/@types/bn.js": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", @@ -1410,11 +1172,6 @@ "node": ">=0.10.0" } }, - "node_modules/pako": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", - "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -1638,69 +1395,69 @@ "integrity": "sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ==" }, "@polkadot/api": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-9.1.1.tgz", - "integrity": "sha512-5iHHdwo0/WunE8JgLeTn9ic27D1vFIwuutvIcx1gw6jYo+ggBpUG5iSW6j6ZYY8/i2v3KDbjB5eCcdjjNYGeiA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-8.14.1.tgz", + "integrity": "sha512-jg26eIKFYqVfDBTAopHL3aDaNw9j6TdUkXuvYJOnynpecU4xwbTVKcOtSOjJ2eRX4MgMQ4zlyMHJx3iKw0uUTA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/api-augment": "9.1.1", - "@polkadot/api-base": "9.1.1", - "@polkadot/api-derive": "9.1.1", - "@polkadot/keyring": "^10.1.3", - "@polkadot/rpc-augment": "9.1.1", - "@polkadot/rpc-core": "9.1.1", - "@polkadot/rpc-provider": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/types-augment": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/types-create": "9.1.1", - "@polkadot/types-known": "9.1.1", - "@polkadot/util": "^10.1.3", - "@polkadot/util-crypto": "^10.1.3", + "@polkadot/api-augment": "8.14.1", + "@polkadot/api-base": "8.14.1", + "@polkadot/api-derive": "8.14.1", + "@polkadot/keyring": "^10.1.1", + "@polkadot/rpc-augment": "8.14.1", + "@polkadot/rpc-core": "8.14.1", + "@polkadot/rpc-provider": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-augment": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/types-create": "8.14.1", + "@polkadot/types-known": "8.14.1", + "@polkadot/util": "^10.1.1", + "@polkadot/util-crypto": "^10.1.1", "eventemitter3": "^4.0.7", "rxjs": "^7.5.6" } }, "@polkadot/api-augment": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-9.1.1.tgz", - "integrity": "sha512-oPFLSV/+Z5fAdJB9ku0pNtnB5lK4wrK5vuY6r4Uh2Rkols9pv5a5naXZFSXD0+5+zUakW5Fceh9gjCb0mMvwYg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-8.14.1.tgz", + "integrity": "sha512-65GMlgVnZd08Ifh8uAj+p/+MlXxvsAfBcCHjQhOmbCE0dki+rzTPUR31LsWyDKtuw+nUBj0iZN4PelO+wU4r0g==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/api-base": "9.1.1", - "@polkadot/rpc-augment": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/types-augment": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/api-base": "8.14.1", + "@polkadot/rpc-augment": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-augment": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1" } }, "@polkadot/api-base": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-9.1.1.tgz", - "integrity": "sha512-Dy/mdyUPMgZjUYOv/jSg5VrQpNmS+3qF496wSHpacRT3xNXMZDDLl8R+ldJjvBYvsLVry4FnZ1Ge5dLzrITfmw==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-8.14.1.tgz", + "integrity": "sha512-EXFhNXIfpirf18IsqcG2pGQW1/Xn+bfjqVYQMMJ4ZONtYH4baZZlXk7SoXCCHonN2x1ixs4DOcRx5oVxjabdIQ==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/util": "^10.1.3", + "@polkadot/rpc-core": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/util": "^10.1.1", "rxjs": "^7.5.6" } }, "@polkadot/api-derive": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-9.1.1.tgz", - "integrity": "sha512-ZWPZgmT/YiK0DhTel261iZ+bTA19C15UTOlaMwm/ZkAjA/7GGPnbiYChIFJvdvaTQx8lu9vlmqK5QdjmrYlvMg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-8.14.1.tgz", + "integrity": "sha512-eWG1MrQhHMUjt9gDHN9/9/ZMATu1MolqcalPFhNoGtdON3+I0J3ntjQ4y5X7+p2OGwQplpYRKqbK4k7tKzu8tA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/api": "9.1.1", - "@polkadot/api-augment": "9.1.1", - "@polkadot/api-base": "9.1.1", - "@polkadot/rpc-core": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3", - "@polkadot/util-crypto": "^10.1.3", + "@polkadot/api": "8.14.1", + "@polkadot/api-augment": "8.14.1", + "@polkadot/api-base": "8.14.1", + "@polkadot/rpc-core": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1", + "@polkadot/util-crypto": "^10.1.1", "rxjs": "^7.5.6" } }, @@ -1725,116 +1482,116 @@ } }, "@polkadot/rpc-augment": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-9.1.1.tgz", - "integrity": "sha512-hbT7XvK/BqDdt6NzFTHFebjimXCxN8g2VxRVgS0/xPCrZAwk3L9raLRptpEYN2/sAKsJlKykID4ATmWu3l1OUA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-8.14.1.tgz", + "integrity": "sha512-0dIsNVIMeCp0kV7+Obz0Odt6K32Ka2ygwhiV5jhhJthy8GJBPo94mKDed5gzln3Dgl2LEdJJt1h/pgCx4a2i4A==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/rpc-core": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1" } }, "@polkadot/rpc-core": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-9.1.1.tgz", - "integrity": "sha512-FMywgTTso8evroA2RTVzbg+4h2K4A25hgjidpj49UzJYFtSVpvhFMzPJhcYoo6C8rrFvwH1eDmCLsj6DM0LRKg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-8.14.1.tgz", + "integrity": "sha512-deQ8Ob59ao/1fZQdaVtFjYR/HCBdxSYvQGt7/alBu1Uig9Sahx9oKcMkU5rWY36XqGZYos4zLay98W2hDlf+6Q==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/rpc-augment": "9.1.1", - "@polkadot/rpc-provider": "9.1.1", - "@polkadot/types": "9.1.1", - "@polkadot/util": "^10.1.3", + "@polkadot/rpc-augment": "8.14.1", + "@polkadot/rpc-provider": "8.14.1", + "@polkadot/types": "8.14.1", + "@polkadot/util": "^10.1.1", "rxjs": "^7.5.6" } }, "@polkadot/rpc-provider": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-9.1.1.tgz", - "integrity": "sha512-Xn/2ZeZDGnmvWK1VP9O610Hv5Ry6f5k9g200Q+2m/Aw+d9xw65EDuo3e/N/hB0NB+PKVp5KnTn0oDPFn0wxQgA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-8.14.1.tgz", + "integrity": "sha512-pAUSHZiSWLhBSYf4LmLc8iCaeqTu7Ajn8AzyqxvZDHGnIrzV5M7eTjpNDP84qno6jWRHKQ/IILr62hausEmS5w==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.3", - "@polkadot/types": "9.1.1", - "@polkadot/types-support": "9.1.1", - "@polkadot/util": "^10.1.3", - "@polkadot/util-crypto": "^10.1.3", - "@polkadot/x-fetch": "^10.1.3", - "@polkadot/x-global": "^10.1.3", - "@polkadot/x-ws": "^10.1.3", - "@substrate/connect": "0.7.10", + "@polkadot/keyring": "^10.1.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-support": "8.14.1", + "@polkadot/util": "^10.1.1", + "@polkadot/util-crypto": "^10.1.1", + "@polkadot/x-fetch": "^10.1.1", + "@polkadot/x-global": "^10.1.1", + "@polkadot/x-ws": "^10.1.1", + "@substrate/connect": "0.7.9", "eventemitter3": "^4.0.7", "mock-socket": "^9.1.5", "nock": "^13.2.9" } }, "@polkadot/types": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-9.1.1.tgz", - "integrity": "sha512-hEA8Pnc6ipHKUHxMS0gtjpYuus5y+yzE+t14VnSfRiqDtug3lj8SfAuaKpMuWytsJzwuP8GvzdsOHgu8zu0gzg==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-8.14.1.tgz", + "integrity": "sha512-Xza16ejKrSd4XhTOlbfISyxZ2sRmbMAZk5pX7VEMHVZHqV98o+bJ2f9Kk7F8YJijkHHGosCLDestP9R5nLoOoA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.3", - "@polkadot/types-augment": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/types-create": "9.1.1", - "@polkadot/util": "^10.1.3", - "@polkadot/util-crypto": "^10.1.3", + "@polkadot/keyring": "^10.1.1", + "@polkadot/types-augment": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/types-create": "8.14.1", + "@polkadot/util": "^10.1.1", + "@polkadot/util-crypto": "^10.1.1", "rxjs": "^7.5.6" } }, "@polkadot/types-augment": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-9.1.1.tgz", - "integrity": "sha512-Q5Ga0HORVehRhpeZEO6rckAPYpgUOp7Bu1qFH+eUbwOq3rQRlvYJJCUnBUsaHHNh1t7pUqmwMTEeCH90wrkH5g==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-8.14.1.tgz", + "integrity": "sha512-Xa4TUFqyZT+IJ6pBSwDjWcF42u/E34OyC+gbs5Z2vWQ4EzSDkq4xNoUKjJlEEgTemsD9lhPOIc4jvqTCefwxEw==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/types": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/types": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1" } }, "@polkadot/types-codec": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-9.1.1.tgz", - "integrity": "sha512-dxNGtdY8ENvfqMp72cUV2ddjbHdEPfBSNYkWW160FX8X1zm9NREuM7TpVimNNfZ5K16wsTLDSMvYp59VcGjkQQ==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-8.14.1.tgz", + "integrity": "sha512-y6YDN4HwvEgSWlgrEV04QBBxDxES1cTuUQFzZJzOTuZCWpA371Mdj3M9wYxGXMnj0wa+rCQGECHPZZaNxBMiKg==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.3", - "@polkadot/x-bigint": "^10.1.3" + "@polkadot/util": "^10.1.1", + "@polkadot/x-bigint": "^10.1.1" } }, "@polkadot/types-create": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-9.1.1.tgz", - "integrity": "sha512-V8A/JQFU0ryz0KZqW0LAhW1fbtI5OvwZf5P9Q0iz2qansyyZkKQkMacDdV63g1XfphR2Nv/BhrHbZXgoNbTuhw==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-8.14.1.tgz", + "integrity": "sha512-fb9yyblj5AYAPzeCIq0kYSfzDxRDi/0ud9gN2UzB3H7M/O4n2mPC1vD4UOLF+B7l9QzCrt4e+k+/riGp7GfvyA==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/types-codec": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/types-codec": "8.14.1", + "@polkadot/util": "^10.1.1" } }, "@polkadot/types-known": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-9.1.1.tgz", - "integrity": "sha512-8iGeKfYsitEMeh4h9wm3W/2RZHnPomtyCZo1VSzNVi0xioDPK+gIjO/7oqT4JCnt6ET8MH4NuHWUWw4WXvixAQ==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-8.14.1.tgz", + "integrity": "sha512-GP7gRo9nmitykkrRnoLF61Qm19UFdTwMsOnJkdm7AOeWDmZGxutacgO6k1tBsHr38hsiCCGsB/JiseUgywvGIw==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/networks": "^10.1.3", - "@polkadot/types": "9.1.1", - "@polkadot/types-codec": "9.1.1", - "@polkadot/types-create": "9.1.1", - "@polkadot/util": "^10.1.3" + "@polkadot/networks": "^10.1.1", + "@polkadot/types": "8.14.1", + "@polkadot/types-codec": "8.14.1", + "@polkadot/types-create": "8.14.1", + "@polkadot/util": "^10.1.1" } }, "@polkadot/types-support": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-9.1.1.tgz", - "integrity": "sha512-6zn0am9ywy9whsKgFYsGqu9JJjhpoU/kHNh9KtUpv1e3x9rTnpAuJh1tzeu5glV+3keBMa90r6uBfExXlsKq3A==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-8.14.1.tgz", + "integrity": "sha512-XqR4qq6pCZyNBuFVod8nFSNUmLssrjoU9bOIn4Ua2cqNlI9xsuKaI1X5ySEn/oWOtKQ2L5hbCm9vkXrEtXBl1w==", "requires": { "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.3" + "@polkadot/util": "^10.1.1" } }, "@polkadot/util": { @@ -1998,12 +1755,12 @@ "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==" }, "@substrate/connect": { - "version": "0.7.10", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.10.tgz", - "integrity": "sha512-WNdW18e0I696/AQjrAXdMD9W8YaKLTcPr2Cu8scSwiUT40in84KEzi+g+P367cE2etAc+Dvu8vNDEQTbUPNqEg==", + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.9.tgz", + "integrity": "sha512-E6bdBhzsfHNAKlmQSvbTW1jyb0WcIvgbrEBfJ4B6FZ3t1wpGjldL6GrYtegVtKr9/ySQ/pFNn0uVbugukpMDjQ==", "requires": { "@substrate/connect-extension-protocol": "^1.0.1", - "@substrate/smoldot-light": "0.6.27", + "@substrate/smoldot-light": "0.6.25", "eventemitter3": "^4.0.7" } }, @@ -2013,11 +1770,10 @@ "integrity": "sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==" }, "@substrate/smoldot-light": { - "version": "0.6.27", - "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.27.tgz", - "integrity": "sha512-Wy3fbyfZqR3HLynuxeBkUunZsrbqpsmFN+D0/8cVIHZbO7WDwJsmCUc32yO5r+v6s/T97L7FOJHEyMWmRfnKAQ==", + "version": "0.6.25", + "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.25.tgz", + "integrity": "sha512-OQ9/bnJJy90xSRg5Vp9MIvrgbrVt/r/FwXYSmyLeBBNbJt6o1gSeshVo8icD+2VWwd/TJ2oHl5CVQWe89MyByA==", "requires": { - "pako": "^2.0.4", "websocket": "^1.0.32" } }, @@ -2033,206 +1789,6 @@ "requires": { "@polkadot/api": "8.14.1", "memoizee": "0.4.15" - }, - "dependencies": { - "@polkadot/api": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-8.14.1.tgz", - "integrity": "sha512-jg26eIKFYqVfDBTAopHL3aDaNw9j6TdUkXuvYJOnynpecU4xwbTVKcOtSOjJ2eRX4MgMQ4zlyMHJx3iKw0uUTA==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/api-augment": "8.14.1", - "@polkadot/api-base": "8.14.1", - "@polkadot/api-derive": "8.14.1", - "@polkadot/keyring": "^10.1.1", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/rpc-provider": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/types-known": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "eventemitter3": "^4.0.7", - "rxjs": "^7.5.6" - } - }, - "@polkadot/api-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-8.14.1.tgz", - "integrity": "sha512-65GMlgVnZd08Ifh8uAj+p/+MlXxvsAfBcCHjQhOmbCE0dki+rzTPUR31LsWyDKtuw+nUBj0iZN4PelO+wU4r0g==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/api-base": "8.14.1", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" - } - }, - "@polkadot/api-base": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-8.14.1.tgz", - "integrity": "sha512-EXFhNXIfpirf18IsqcG2pGQW1/Xn+bfjqVYQMMJ4ZONtYH4baZZlXk7SoXCCHonN2x1ixs4DOcRx5oVxjabdIQ==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/util": "^10.1.1", - "rxjs": "^7.5.6" - } - }, - "@polkadot/api-derive": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-8.14.1.tgz", - "integrity": "sha512-eWG1MrQhHMUjt9gDHN9/9/ZMATu1MolqcalPFhNoGtdON3+I0J3ntjQ4y5X7+p2OGwQplpYRKqbK4k7tKzu8tA==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/api": "8.14.1", - "@polkadot/api-augment": "8.14.1", - "@polkadot/api-base": "8.14.1", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "rxjs": "^7.5.6" - } - }, - "@polkadot/rpc-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-8.14.1.tgz", - "integrity": "sha512-0dIsNVIMeCp0kV7+Obz0Odt6K32Ka2ygwhiV5jhhJthy8GJBPo94mKDed5gzln3Dgl2LEdJJt1h/pgCx4a2i4A==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-core": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" - } - }, - "@polkadot/rpc-core": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-8.14.1.tgz", - "integrity": "sha512-deQ8Ob59ao/1fZQdaVtFjYR/HCBdxSYvQGt7/alBu1Uig9Sahx9oKcMkU5rWY36XqGZYos4zLay98W2hDlf+6Q==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/rpc-augment": "8.14.1", - "@polkadot/rpc-provider": "8.14.1", - "@polkadot/types": "8.14.1", - "@polkadot/util": "^10.1.1", - "rxjs": "^7.5.6" - } - }, - "@polkadot/rpc-provider": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-8.14.1.tgz", - "integrity": "sha512-pAUSHZiSWLhBSYf4LmLc8iCaeqTu7Ajn8AzyqxvZDHGnIrzV5M7eTjpNDP84qno6jWRHKQ/IILr62hausEmS5w==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-support": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "@polkadot/x-fetch": "^10.1.1", - "@polkadot/x-global": "^10.1.1", - "@polkadot/x-ws": "^10.1.1", - "@substrate/connect": "0.7.9", - "eventemitter3": "^4.0.7", - "mock-socket": "^9.1.5", - "nock": "^13.2.9" - } - }, - "@polkadot/types": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-8.14.1.tgz", - "integrity": "sha512-Xza16ejKrSd4XhTOlbfISyxZ2sRmbMAZk5pX7VEMHVZHqV98o+bJ2f9Kk7F8YJijkHHGosCLDestP9R5nLoOoA==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/keyring": "^10.1.1", - "@polkadot/types-augment": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/util": "^10.1.1", - "@polkadot/util-crypto": "^10.1.1", - "rxjs": "^7.5.6" - } - }, - "@polkadot/types-augment": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-8.14.1.tgz", - "integrity": "sha512-Xa4TUFqyZT+IJ6pBSwDjWcF42u/E34OyC+gbs5Z2vWQ4EzSDkq4xNoUKjJlEEgTemsD9lhPOIc4jvqTCefwxEw==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" - } - }, - "@polkadot/types-codec": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-8.14.1.tgz", - "integrity": "sha512-y6YDN4HwvEgSWlgrEV04QBBxDxES1cTuUQFzZJzOTuZCWpA371Mdj3M9wYxGXMnj0wa+rCQGECHPZZaNxBMiKg==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.1", - "@polkadot/x-bigint": "^10.1.1" - } - }, - "@polkadot/types-create": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-8.14.1.tgz", - "integrity": "sha512-fb9yyblj5AYAPzeCIq0kYSfzDxRDi/0ud9gN2UzB3H7M/O4n2mPC1vD4UOLF+B7l9QzCrt4e+k+/riGp7GfvyA==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/types-codec": "8.14.1", - "@polkadot/util": "^10.1.1" - } - }, - "@polkadot/types-known": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-8.14.1.tgz", - "integrity": "sha512-GP7gRo9nmitykkrRnoLF61Qm19UFdTwMsOnJkdm7AOeWDmZGxutacgO6k1tBsHr38hsiCCGsB/JiseUgywvGIw==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/networks": "^10.1.1", - "@polkadot/types": "8.14.1", - "@polkadot/types-codec": "8.14.1", - "@polkadot/types-create": "8.14.1", - "@polkadot/util": "^10.1.1" - } - }, - "@polkadot/types-support": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-8.14.1.tgz", - "integrity": "sha512-XqR4qq6pCZyNBuFVod8nFSNUmLssrjoU9bOIn4Ua2cqNlI9xsuKaI1X5ySEn/oWOtKQ2L5hbCm9vkXrEtXBl1w==", - "requires": { - "@babel/runtime": "^7.18.9", - "@polkadot/util": "^10.1.1" - } - }, - "@substrate/connect": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.7.9.tgz", - "integrity": "sha512-E6bdBhzsfHNAKlmQSvbTW1jyb0WcIvgbrEBfJ4B6FZ3t1wpGjldL6GrYtegVtKr9/ySQ/pFNn0uVbugukpMDjQ==", - "requires": { - "@substrate/connect-extension-protocol": "^1.0.1", - "@substrate/smoldot-light": "0.6.25", - "eventemitter3": "^4.0.7" - } - }, - "@substrate/smoldot-light": { - "version": "0.6.25", - "resolved": "https://registry.npmjs.org/@substrate/smoldot-light/-/smoldot-light-0.6.25.tgz", - "integrity": "sha512-OQ9/bnJJy90xSRg5Vp9MIvrgbrVt/r/FwXYSmyLeBBNbJt6o1gSeshVo8icD+2VWwd/TJ2oHl5CVQWe89MyByA==", - "requires": { - "websocket": "^1.0.32" - } - } } }, "@types/bn.js": { @@ -2691,11 +2247,6 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, - "pako": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", - "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" - }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", diff --git a/package.json b/package.json index 5c1ef61..a1713db 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "homepage": "https://github.com/fersirni/substrate-decode-extrinsics#readme", "dependencies": { - "@polkadot/api": "^9.1.1", + "@polkadot/api": "^8.14.1", "@substrate/txwrapper-core": "^3.1.7", "nodemon": "^2.0.19" } diff --git a/src/index.ts b/src/index.ts index 623d506..88f46cb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,43 +1,87 @@ import { ApiPromise, WsProvider } from "@polkadot/api"; -import { Extrinsic, Header } from "@polkadot/types/interfaces"; -import { decodeSignedTx } from "@substrate/txwrapper-core/lib/core/decode/decodeSignedTx" -import { OptionsWithMeta, TypeRegistry } from "@substrate/txwrapper-core/lib/types"; -import metadata from './erc20/metadata' - +import { hexToU8a } from "@polkadot/util"; +//import { decodeSignedTx } from "@substrate/txwrapper-core/lib/core/decode/decodeSignedTx" +import { + DecodedSignedTx, + OptionsWithMeta, + TypeRegistry, +} from "@substrate/txwrapper-core/lib/types"; +import { createMetadata, toTxMethod } from "@substrate/txwrapper-core"; const main = async () => { const provider = new WsProvider("ws://127.0.0.1:9944"); const api = await ApiPromise.create({ provider }); - await api.rpc.chain.subscribeNewHeads(async (header: Header) => { + const options: OptionsWithMeta = { + metadataRpc: api.runtimeMetadata.toHex(), + registry: api.registry as unknown as TypeRegistry, + }; + await api.rpc.chain.subscribeNewHeads(async (header) => { const { block: { extrinsics }, } = await api.rpc.chain.getBlock(header.hash); extrinsics .filter((e) => e.method.section === "contracts") - .forEach((extrinsic: Extrinsic) => { - /* args: { - dest: [Object], - value: '0', - gas_limit: '75,000,000,001', - storage_deposit_limit: null, - data: '0x0b396f18d43593c715fdd31c61......' - }, - */ - // At least for this example, data is on index 4 - const dataToDecode = extrinsic.method.args[4].toHuman(); - console.log(dataToDecode); - - const metadataRpc = metadata.source.wasm as `0x${string}` // I think this should work - const registry: TypeRegistry = new TypeRegistry() // How do I get this value?? + .forEach((extrinsic) => { + try { + /* args: { + dest: [Object], + value: '0', + gas_limit: '75,000,000,001', + storage_deposit_limit: null, + data: '0x0b396f18d43593c715fdd31c61......' + }, + */ + // At least for this example, data is on index 4 + const dataToDecode = extrinsic.method.args[4].toHuman(); + console.log("TO DECODE: %j", dataToDecode); - const options: OptionsWithMeta = { - metadataRpc, - registry + const decoded = decodeSignedTx(extrinsic.toJSON(), options); + console.log("DECODED: %j", decoded) + // not sure if extrinsics.toString() will work + //decodeSignedTx(extrinsic.toString(), options); + } catch (error) { + console.log(error); } - // not sure if extrinsics.toString() will work - decodeSignedTx(extrinsic.toString(), options) }); }); }; +function decodeSignedTx( + signedTx: string, + options: OptionsWithMeta +): DecodedSignedTx { + const { metadataRpc, registry, asCallsOnlyArg, asSpecifiedCallsOnlyV14 } = + options; + + console.log("1"); + registry.setMetadata( + createMetadata( + registry, + metadataRpc, + asCallsOnlyArg, + asSpecifiedCallsOnlyV14 + ) + ); + console.log("2"); + const tx = registry.createType("Extrinsic", hexToU8a(signedTx), { + isSigned: true, + }); + console.log("TX %j", tx); + console.log("\nARGS: %j", { args: tx.method.args}) + console.log("\nTYPES: %j", { args: tx.method.argsDef}) + const methodCall = registry.createType("Call", tx.method); + // Here is where I guess the decoding should be happening + const method = toTxMethod(registry, methodCall); + + console.log("\nMETHOD %j", method); + return { + address: tx.signer.toString(), + eraPeriod: tx.era.asMortalEra.period.toNumber(), + metadataRpc: '0x', // hardcoding this because it is too long + method, + nonce: tx.nonce.toNumber(), + tip: tx.tip.toNumber(), + }; +} + main();