feat(wallet) integrate Wallet Connect sign APIs
Bump status-go that brings the sign APIs support for send transaction and personal sign Extend SDK - simple SDK event handling in QML - support session request response APIs - pairing management Closes #12637
This commit is contained in:
parent
9743fb2537
commit
783a755230
|
@ -7,6 +7,9 @@
|
|||
"": {
|
||||
"name": "nim-status-client",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"nodemon": "3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"create-dmg": "status-im/create-dmg#678fbd4",
|
||||
"fileicon": "0.3.0"
|
||||
|
@ -16,6 +19,11 @@
|
|||
"npm": ">=7"
|
||||
}
|
||||
},
|
||||
"node_modules/abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
|
@ -40,6 +48,18 @@
|
|||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/anymatch": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
||||
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
||||
"dependencies": {
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/appdmg": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/appdmg/-/appdmg-0.6.4.tgz",
|
||||
|
@ -104,6 +124,11 @@
|
|||
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
},
|
||||
"node_modules/base32-encode": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/base32-encode/-/base32-encode-1.2.0.tgz",
|
||||
|
@ -133,6 +158,14 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/bplist-creator": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz",
|
||||
|
@ -142,6 +175,26 @@
|
|||
"stream-buffers": "~2.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"dependencies": {
|
||||
"fill-range": "^7.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/camelcase": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
|
||||
|
@ -178,6 +231,32 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/chokidar": {
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
||||
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.10.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/cli-cursor": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
||||
|
@ -229,6 +308,11 @@
|
|||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||
},
|
||||
"node_modules/create-dmg": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "git+ssh://git@github.com/status-im/create-dmg.git#678fbd411585c87a92a74b4314190b85037b66eb",
|
||||
|
@ -295,7 +379,6 @@
|
|||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
|
@ -414,6 +497,17 @@
|
|||
"fileicon": "bin/fileicon"
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/find-up": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
||||
|
@ -457,6 +551,19 @@
|
|||
"node": ">=8.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
|
@ -493,6 +600,17 @@
|
|||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/gm": {
|
||||
"version": "1.23.1",
|
||||
"resolved": "https://registry.npmjs.org/gm/-/gm-1.23.1.tgz",
|
||||
|
@ -560,6 +678,11 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/ignore-by-default": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
|
||||
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA=="
|
||||
},
|
||||
"node_modules/image-size": {
|
||||
"version": "0.7.5",
|
||||
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.7.5.tgz",
|
||||
|
@ -596,6 +719,17 @@
|
|||
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"dependencies": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz",
|
||||
|
@ -608,6 +742,25 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-glob": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
||||
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
||||
"dependencies": {
|
||||
"is-extglob": "^2.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-interactive": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
|
||||
|
@ -636,6 +789,14 @@
|
|||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-plain-obj": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
|
||||
|
@ -866,6 +1027,17 @@
|
|||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||
|
@ -888,8 +1060,7 @@
|
|||
"node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||
},
|
||||
"node_modules/murmur-32": {
|
||||
"version": "0.2.0",
|
||||
|
@ -920,6 +1091,96 @@
|
|||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/nodemon": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz",
|
||||
"integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==",
|
||||
"dependencies": {
|
||||
"chokidar": "^3.5.2",
|
||||
"debug": "^3.2.7",
|
||||
"ignore-by-default": "^1.0.1",
|
||||
"minimatch": "^3.1.2",
|
||||
"pstree.remy": "^1.1.8",
|
||||
"semver": "^7.5.3",
|
||||
"simple-update-notifier": "^2.0.0",
|
||||
"supports-color": "^5.5.0",
|
||||
"touch": "^3.1.0",
|
||||
"undefsafe": "^2.0.5"
|
||||
},
|
||||
"bin": {
|
||||
"nodemon": "bin/nodemon.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/nodemon"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dependencies": {
|
||||
"has-flag": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon/node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"node_modules/nopt": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
|
||||
"integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
|
||||
"dependencies": {
|
||||
"abbrev": "1"
|
||||
},
|
||||
"bin": {
|
||||
"nopt": "bin/nopt.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-package-data": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
|
||||
|
@ -932,6 +1193,14 @@
|
|||
"validate-npm-package-license": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
|
@ -1096,6 +1365,17 @@
|
|||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/pify": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||
|
@ -1124,6 +1404,11 @@
|
|||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/pstree.remy": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
|
||||
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
|
||||
},
|
||||
"node_modules/pump": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
|
@ -1180,6 +1465,17 @@
|
|||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/redent": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
|
||||
|
@ -1268,6 +1564,47 @@
|
|||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/simple-update-notifier": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
|
||||
"integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
|
||||
"dependencies": {
|
||||
"semver": "^7.5.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-update-notifier/node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-update-notifier/node_modules/semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-update-notifier/node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"node_modules/spdx-correct": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
|
||||
|
@ -1413,6 +1750,28 @@
|
|||
"integrity": "sha512-1eAdufMg6mwgmlojAx3QeMnzB/BTVp7Tbndi3U7ftcT2zCZadjxkkmLmd97zmaxWi+sgGcgWrokmpEoy0Dn0vQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dependencies": {
|
||||
"is-number": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/touch": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
|
||||
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
|
||||
"dependencies": {
|
||||
"nopt": "~1.0.10"
|
||||
},
|
||||
"bin": {
|
||||
"nodetouch": "bin/nodetouch.js"
|
||||
}
|
||||
},
|
||||
"node_modules/trim-newlines": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
|
||||
|
@ -1431,6 +1790,11 @@
|
|||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/undefsafe": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
|
||||
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA=="
|
||||
},
|
||||
"node_modules/unique-string": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz",
|
||||
|
@ -1524,6 +1888,11 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
|
@ -1539,6 +1908,15 @@
|
|||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"anymatch": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
||||
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
||||
"requires": {
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"appdmg": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/appdmg/-/appdmg-0.6.4.tgz",
|
||||
|
@ -1588,6 +1966,11 @@
|
|||
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
|
||||
"dev": true
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
},
|
||||
"base32-encode": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/base32-encode/-/base32-encode-1.2.0.tgz",
|
||||
|
@ -1603,6 +1986,11 @@
|
|||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"dev": true
|
||||
},
|
||||
"binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
|
||||
},
|
||||
"bplist-creator": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz",
|
||||
|
@ -1612,6 +2000,23 @@
|
|||
"stream-buffers": "~2.2.0"
|
||||
}
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"requires": {
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"camelcase": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
|
||||
|
@ -1639,6 +2044,21 @@
|
|||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"chokidar": {
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
||||
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
|
||||
"requires": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"fsevents": "~2.3.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
}
|
||||
},
|
||||
"cli-cursor": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
||||
|
@ -1675,6 +2095,11 @@
|
|||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||
},
|
||||
"create-dmg": {
|
||||
"version": "git+ssh://git@github.com/status-im/create-dmg.git#678fbd411585c87a92a74b4314190b85037b66eb",
|
||||
"dev": true,
|
||||
|
@ -1722,7 +2147,6 @@
|
|||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
|
@ -1822,6 +2246,14 @@
|
|||
"integrity": "sha512-sIDuHQjKkM9UA5szqdCqcMbIfImg7jRVb83+0mWESRl6x3DTRxuAwYCUxXNhAJ2NdvALSxh9xlgARWBNRt8NMw==",
|
||||
"dev": true
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"requires": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"find-up": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
||||
|
@ -1855,6 +2287,12 @@
|
|||
"integrity": "sha512-UVqkrEW0GfDabw4C3HOrFlxKfx0eeigfRne69FxSBdHIP8Qt5Sq6Pu3RM9KmMlkygtC4pPKkj5CiPO5USnj2GA==",
|
||||
"dev": true
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||
"optional": true
|
||||
},
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
|
@ -1888,6 +2326,14 @@
|
|||
"pump": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"gm": {
|
||||
"version": "1.23.1",
|
||||
"resolved": "https://registry.npmjs.org/gm/-/gm-1.23.1.tgz",
|
||||
|
@ -1945,6 +2391,11 @@
|
|||
"integrity": "sha512-J7+RDRQApG/vChY5TP043NitBcNC7QMn1kOgGvlAkyrK65hozAaSwTNsTZ2HJh+br9e1NlzpBreAOpk4YuhOJA==",
|
||||
"dev": true
|
||||
},
|
||||
"ignore-by-default": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
|
||||
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA=="
|
||||
},
|
||||
"image-size": {
|
||||
"version": "0.7.5",
|
||||
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.7.5.tgz",
|
||||
|
@ -1969,6 +2420,14 @@
|
|||
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
|
||||
"dev": true
|
||||
},
|
||||
"is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"requires": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz",
|
||||
|
@ -1978,6 +2437,19 @@
|
|||
"has": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="
|
||||
},
|
||||
"is-glob": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
||||
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
||||
"requires": {
|
||||
"is-extglob": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"is-interactive": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
|
||||
|
@ -2003,6 +2475,11 @@
|
|||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
|
||||
},
|
||||
"is-plain-obj": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
|
||||
|
@ -2188,6 +2665,14 @@
|
|||
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
|
||||
"dev": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||
|
@ -2207,8 +2692,7 @@
|
|||
"ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||
},
|
||||
"murmur-32": {
|
||||
"version": "0.2.0",
|
||||
|
@ -2239,6 +2723,67 @@
|
|||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
||||
"dev": true
|
||||
},
|
||||
"nodemon": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz",
|
||||
"integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==",
|
||||
"requires": {
|
||||
"chokidar": "^3.5.2",
|
||||
"debug": "^3.2.7",
|
||||
"ignore-by-default": "^1.0.1",
|
||||
"minimatch": "^3.1.2",
|
||||
"pstree.remy": "^1.1.8",
|
||||
"semver": "^7.5.3",
|
||||
"simple-update-notifier": "^2.0.0",
|
||||
"supports-color": "^5.5.0",
|
||||
"touch": "^3.1.0",
|
||||
"undefsafe": "^2.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"requires": {
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"nopt": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
|
||||
"integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
|
||||
"requires": {
|
||||
"abbrev": "1"
|
||||
}
|
||||
},
|
||||
"normalize-package-data": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
|
||||
|
@ -2251,6 +2796,11 @@
|
|||
"validate-npm-package-license": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
|
||||
},
|
||||
"npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
|
@ -2378,6 +2928,11 @@
|
|||
"pify": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"picomatch": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
|
||||
},
|
||||
"pify": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||
|
@ -2400,6 +2955,11 @@
|
|||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
|
||||
"dev": true
|
||||
},
|
||||
"pstree.remy": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
|
||||
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
|
||||
},
|
||||
"pump": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
|
@ -2447,6 +3007,14 @@
|
|||
"read-pkg": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"requires": {
|
||||
"picomatch": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"redent": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
|
||||
|
@ -2511,6 +3079,37 @@
|
|||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||
"dev": true
|
||||
},
|
||||
"simple-update-notifier": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
|
||||
"integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
|
||||
"requires": {
|
||||
"semver": "^7.5.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"requires": {
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"spdx-correct": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
|
||||
|
@ -2623,6 +3222,22 @@
|
|||
"integrity": "sha512-1eAdufMg6mwgmlojAx3QeMnzB/BTVp7Tbndi3U7ftcT2zCZadjxkkmLmd97zmaxWi+sgGcgWrokmpEoy0Dn0vQ==",
|
||||
"dev": true
|
||||
},
|
||||
"to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"requires": {
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"touch": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
|
||||
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
|
||||
"requires": {
|
||||
"nopt": "~1.0.10"
|
||||
}
|
||||
},
|
||||
"trim-newlines": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
|
||||
|
@ -2635,6 +3250,11 @@
|
|||
"integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==",
|
||||
"dev": true
|
||||
},
|
||||
"undefsafe": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
|
||||
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA=="
|
||||
},
|
||||
"unique-string": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz",
|
||||
|
|
|
@ -10,5 +10,8 @@
|
|||
"engines": {
|
||||
"node": ">=10",
|
||||
"npm": ">=7"
|
||||
},
|
||||
"dependencies": {
|
||||
"nodemon": "3.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import backend/wallet_connect as backend
|
|||
import app/core/eventemitter
|
||||
import app/core/signals/types
|
||||
|
||||
import app_service/common/utils as common_utils
|
||||
|
||||
import constants
|
||||
|
||||
QtObject:
|
||||
|
@ -45,6 +47,20 @@ QtObject:
|
|||
if not ok:
|
||||
error "Failed to pair session"
|
||||
|
||||
proc respondSessionRequest*(self: Controller, sessionRequestJson: string, signedJson: string, error: bool) {.signal.}
|
||||
|
||||
proc sessionRequest*(self: Controller, sessionRequestJson: string, password: string) {.slot.} =
|
||||
let hashedPasssword = common_utils.hashPassword(password)
|
||||
let ok = backend.sessionRequest(sessionRequestJson, hashedPasssword, proc (res: JsonNode) =
|
||||
let sessionRequestJson = if res.hasKey("sessionRequest"): $res["sessionRequest"] else: ""
|
||||
let signedJson = if res.hasKey("signed"): $res["signed"] else: ""
|
||||
|
||||
self.respondSessionRequest(sessionRequestJson, signedJson, false)
|
||||
)
|
||||
|
||||
if not ok:
|
||||
self.respondSessionRequest(sessionRequestJson, "", true)
|
||||
|
||||
proc getProjectId*(self: Controller): string {.slot.} =
|
||||
return constants.WALLET_CONNECT_PROJECT_ID
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import options
|
||||
import options, logging
|
||||
import json
|
||||
import core, response_type
|
||||
|
||||
|
@ -14,6 +14,10 @@ const ErrorChainsNotSupported*: string = "chains not supported"
|
|||
rpc(wCPairSessionProposal, "wallet"):
|
||||
sessionProposalJson: string
|
||||
|
||||
rpc(wCSessionRequest, "wallet"):
|
||||
sessionRequestJson: string
|
||||
hashedPassword: string
|
||||
|
||||
# TODO #12434: async answer
|
||||
proc pair*(sessionProposalJson: string, callback: proc(response: JsonNode): void): bool =
|
||||
try:
|
||||
|
@ -22,5 +26,15 @@ proc pair*(sessionProposalJson: string, callback: proc(response: JsonNode): void
|
|||
callback(response.result)
|
||||
return response.error == nil
|
||||
except Exception as e:
|
||||
echo "@dd wCPairSessionProposal response: ", e.msg
|
||||
warn e.msg
|
||||
return false
|
||||
|
||||
proc sessionRequest*(sessionRequestJson: string, hashedPassword: string, callback: proc(response: JsonNode): void): bool =
|
||||
try:
|
||||
let response = wCSessionRequest(sessionRequestJson, hashedPassword)
|
||||
if response.error == nil and response.result != nil:
|
||||
callback(response.result)
|
||||
return response.error == nil
|
||||
except Exception as e:
|
||||
warn e.msg
|
||||
return false
|
|
@ -39,7 +39,13 @@ Item {
|
|||
pairSessionProposal: function(sessionProposalJson) {
|
||||
proposeUserPair(sessionProposalJson, `{"eip155":{"methods":["eth_sendTransaction","personal_sign"],"chains":["eip155:5"],"events":["accountsChanged","chainChanged"],"accounts":["eip155:5:0x53780d79E83876dAA21beB8AFa87fd64CC29990b","eip155:5:0xBd54A96c0Ae19a220C8E1234f54c940DFAB34639","eip155:5:0x5D7905390b77A937Ae8c444aA8BF7Fa9a6A7DBA0"]}}`)
|
||||
}
|
||||
projectId: SystemUtils.getEnvVar("STATUS_BUILD_WALLET_CONNECT_PROJECT_ID")
|
||||
|
||||
sessionRequest: function(sessionRequestJson, password) {
|
||||
const signedJson = "0x1234567890"
|
||||
this.respondSessionRequest(sessionRequestJson, signedJson, respondError.checked)
|
||||
}
|
||||
|
||||
projectId: "87815d72a81d739d2a7ce15c2cfdefb3"
|
||||
}
|
||||
|
||||
clip: true
|
||||
|
@ -58,6 +64,11 @@ Item {
|
|||
font.bold: true
|
||||
}
|
||||
}
|
||||
CheckBox {
|
||||
id: respondError
|
||||
text: "Respond Error"
|
||||
checked: false
|
||||
}
|
||||
// spacer
|
||||
ColumnLayout {}
|
||||
}
|
||||
|
|
|
@ -11,5 +11,11 @@ Item {
|
|||
// function pairSessionProposal(/*string*/ sessionProposalJson)
|
||||
required property var pairSessionProposal
|
||||
|
||||
signal respondSessionRequest(string sessionRequestJson, string signedJson, bool error)
|
||||
|
||||
// function sessionRequest(/*string*/ sessionRequestJson, /*string*/ password)
|
||||
required property var sessionRequest
|
||||
|
||||
|
||||
required property string projectId
|
||||
}
|
|
@ -1977,8 +1977,8 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y
|
|||
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/status-im/doubleratchet v3.0.0+incompatible h1:aJ1ejcSERpSzmWZBgtfYtiU2nF0Q8ZkGyuEPYETXkCY=
|
||||
github.com/status-im/doubleratchet v3.0.0+incompatible/go.mod h1:1sqR0+yhiM/bd+wrdX79AOt2csZuJOni0nUDzKNuqOU=
|
||||
github.com/status-im/go-ethereum v1.10.25-status.9 h1:NDuRs5TC4JjqPcYE8/sUtspdA+OwV1JRy3bbRLdIcL0=
|
||||
github.com/status-im/go-ethereum v1.10.25-status.9/go.mod h1:Dt4K5JYMhJRdtXJwBEyGZLZn9iz/chSOZyjVmt5ZhwQ=
|
||||
github.com/status-im/go-ethereum v1.10.25-status.11 h1:casDsgnrkXzyO9SQVyFsT+63XuInyFXzfEHRW/9eEVY=
|
||||
github.com/status-im/go-ethereum v1.10.25-status.11/go.mod h1:Dt4K5JYMhJRdtXJwBEyGZLZn9iz/chSOZyjVmt5ZhwQ=
|
||||
github.com/status-im/go-multiaddr-ethv4 v1.2.5 h1:pN+ey6wYKbvNNu5/xq9+VL0N8Yq0pZUTbZp0URg+Yn4=
|
||||
github.com/status-im/go-multiaddr-ethv4 v1.2.5/go.mod h1:Fhe/18yWU5QwlAYiOO3Bb1BLe0bn5YobcNBHsjRr4kk=
|
||||
github.com/status-im/go-sqlcipher/v4 v4.5.4-status.2 h1:Oi9JTAI2DZEe5UKlpUcvKBCCSn3ULsLIrix7jPnEoPE=
|
||||
|
@ -2088,8 +2088,8 @@ github.com/waku-org/go-discover v0.0.0-20221209174356-61c833f34d98 h1:xwY0kW5XZF
|
|||
github.com/waku-org/go-discover v0.0.0-20221209174356-61c833f34d98/go.mod h1:eBHgM6T4EG0RZzxpxKy+rGz/6Dw2Nd8DWxS0lm9ESDw=
|
||||
github.com/waku-org/go-libp2p-rendezvous v0.0.0-20230628220917-7b4e5ae4c0e7 h1:0e1h+p84yBp0IN7AqgbZlV7lgFBjm214lgSOE7CeJmE=
|
||||
github.com/waku-org/go-libp2p-rendezvous v0.0.0-20230628220917-7b4e5ae4c0e7/go.mod h1:pFvOZ9YTFsW0o5zJW7a0B5tr1owAijRWJctXJ2toL04=
|
||||
github.com/waku-org/go-waku v0.8.1-0.20230930175749-dcc828749f67 h1:EL0KljfCIFPXbY1IfT0JjVIjJekuF951ys1WL2WnWyM=
|
||||
github.com/waku-org/go-waku v0.8.1-0.20230930175749-dcc828749f67/go.mod h1:MnMLFtym7XUt+GNN4zTkjm5NJCsm7TERLWVPOV/Ct6w=
|
||||
github.com/waku-org/go-waku v0.8.1-0.20231103161423-351dd55a1498 h1:2Y06Ni3tBj2LQA0ys1o1PspZxZPM9GOKwNEGolbueQ4=
|
||||
github.com/waku-org/go-waku v0.8.1-0.20231103161423-351dd55a1498/go.mod h1:hem2hnXK5BdabxwJULszM0Rh1Yj+gD9IxjwLCGPPaxs=
|
||||
github.com/waku-org/go-zerokit-rln v0.1.14-0.20230916173259-d284a3d8f2fd h1:cu7CsUo7BK6ac/v193RIaqAzUcmpa6MNY4xYW9AenQI=
|
||||
github.com/waku-org/go-zerokit-rln v0.1.14-0.20230916173259-d284a3d8f2fd/go.mod h1:1PdBdPzyTaKt3VnpAHk3zj+r9dXPFOr3IHZP9nFle6E=
|
||||
github.com/waku-org/go-zerokit-rln-apple v0.0.0-20230916172309-ee0ee61dde2b h1:KgZVhsLkxsj5gb/FfndSCQu6VYwALrCOgYI3poR95yE=
|
||||
|
|
|
@ -1,227 +1,300 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Wallet Connect status-go test</title>
|
||||
<style></style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<input
|
||||
type="text"
|
||||
id="pairLinkInput"
|
||||
placeholder="Insert pair link"
|
||||
disabled
|
||||
/>
|
||||
|
||||
<div id="buttonRow">
|
||||
<!-- TODO DEV <button id="pairButton" disabled>Pair</button>-->
|
||||
<button id="pairButton">Pair</button>
|
||||
<button id="authButton" disabled>Auth</button>
|
||||
<button id="acceptButton" style="display: none">Accept</button>
|
||||
<button id="rejectButton" style="display: none">Reject</button>
|
||||
</div>
|
||||
|
||||
<div id="statusRow">
|
||||
skd: <span id="statusText">-</span> ; status-go
|
||||
<span id="statusGoStatusText">-</span>
|
||||
</div>
|
||||
<textarea id="echoTextArea" rows="10" cols="80"></textarea>
|
||||
|
||||
<script
|
||||
src="bundle.js"
|
||||
type="module"
|
||||
onload="sdkLoaded()"
|
||||
onerror="sdkFailLoading()"
|
||||
></script>
|
||||
|
||||
<div id="log"></div>
|
||||
<script src="bundle.js" type="module"></script>
|
||||
<script>
|
||||
function statusGoReady() {}
|
||||
</script>
|
||||
<script>
|
||||
function sdkLoaded() {
|
||||
if (window.wc === undefined) {
|
||||
goEcho(`FAILED missing "window.wc" SDK`);
|
||||
setStatus(`FAILED missing "window.wc" SDK`);
|
||||
} else {
|
||||
window.getConfiguration().then(
|
||||
(conf) => {
|
||||
window.wc.init(conf.projectId).then(
|
||||
(wc) => {
|
||||
pairLinkInput.disabled = false;
|
||||
setStatus("initialized");
|
||||
},
|
||||
(err) => {
|
||||
setStatus(`SDK error: ${JSON.stringify(err)}`, "red");
|
||||
}
|
||||
);
|
||||
},
|
||||
(err) => {
|
||||
goEcho(`SDK getConfiguration error: ${JSON.stringify(err)}`);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const pairLinkInput = document.getElementById("pairLinkInput");
|
||||
const pairButton = document.getElementById("pairButton");
|
||||
const authButton = document.getElementById("authButton");
|
||||
const acceptButton = document.getElementById("acceptButton");
|
||||
const rejectButton = document.getElementById("rejectButton");
|
||||
|
||||
pairLinkInput.addEventListener("input", function () {
|
||||
pairButton.disabled = !(pairLinkInput.value.length > 0);
|
||||
/*authButton.disabled = !(
|
||||
pairLinkInput.value.length > 0
|
||||
);*/
|
||||
});
|
||||
|
||||
pairButton.addEventListener("click", function () {
|
||||
setStatus("Pairing...");
|
||||
try {
|
||||
// TODO DEV: remove harcode
|
||||
wc.pair(pairLinkInput.value)
|
||||
.then((sessionProposal) => {
|
||||
//let sessionProposal = JSON.parse(`{"id":1698771618724119,"params":{"id":1698771618724119,"pairingTopic":"4c36da43ac0d351336663276de6b5e2182f42068b7021e3cd1a460d9d7077e20","expiry":1698771923,"requiredNamespaces":{"eip155":{"methods":["eth_sendTransaction","personal_sign"],"chains":["eip155:5"],"events":["chainChanged","accountsChanged"]}},"optionalNamespaces":{"eip155":{"methods":["eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v4"],"chains":["eip155:5"],"events":[]}},"relays":[{"protocol":"irn"}],"proposer":{"publicKey":"5d648503f2ec0e5a263578c347e490dcacb4e4359f59d66f12905bb91b9f182d","metadata":{"description":"React App for WalletConnect","url":"https://react-app.walletconnect.com","icons":["https://avatars.githubusercontent.com/u/37784886"],"name":"React App","verifyUrl":"https://verify.walletconnect.com"}}},"verifyContext":{"verified":{"verifyUrl":"https://verify.walletconnect.com","validation":"UNKNOWN","origin":"https://react-app.walletconnect.com"}}}`);
|
||||
setStatus(`Wait user pair`);
|
||||
setDetails(
|
||||
`Pair ID: ${sessionProposal.id} ; Topic: ${sessionProposal.params.pairingTopic}`
|
||||
);
|
||||
|
||||
window
|
||||
.pairSessionProposal(JSON.stringify(sessionProposal))
|
||||
.then((success) => {
|
||||
if (!success) {
|
||||
goEcho(
|
||||
`GO.pairSessionProposal call failed ${sessionProposal.id}`
|
||||
);
|
||||
setGoStatus(`GO.pairSessionProposal failed`, "red");
|
||||
return;
|
||||
}
|
||||
});
|
||||
// Waiting for "proposeUserPair" event
|
||||
})
|
||||
.catch((error) => {
|
||||
goEcho(`Pairing error ${JSON.stringify(error)}`);
|
||||
setStatus(`Pairing error: ${error.message}`, "red");
|
||||
});
|
||||
} catch (err) {
|
||||
goEcho(`Pairing error ${JSON.stringify(err)}`);
|
||||
setStatus(`Pairing error: ${err.message}`, "red");
|
||||
}
|
||||
});
|
||||
|
||||
authButton.addEventListener("click", function () {
|
||||
setStatus("Authenticating...");
|
||||
window.auth();
|
||||
});
|
||||
|
||||
window.wc.registerForSessionRequest((event) => {
|
||||
setStatus(`Session topic ${event.topic}`);
|
||||
window.sessionRequest(event).then((success) => {
|
||||
if (!success) {
|
||||
goEcho(`Session request status-go call failed ${event.topic}`);
|
||||
setGoStatus(`Session ${event.id} rejected`, "purple");
|
||||
return;
|
||||
}
|
||||
// Waiting for userApproveSession event
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function goEcho(message) {
|
||||
window.echo(message);
|
||||
}
|
||||
|
||||
function setStatusForElement(element, message, color) {
|
||||
const statusText = document.getElementById(element);
|
||||
statusText.textContent = message;
|
||||
if (color === undefined) color = "green";
|
||||
statusText.style.color = color;
|
||||
// If not null add to it
|
||||
var logEntries = null;
|
||||
|
||||
var newSessionButton;
|
||||
var hashedPasswordInput;
|
||||
|
||||
function addHtmlEntry(htmlContent, color = null, entry = null) {
|
||||
const logDiv = document.getElementById("log");
|
||||
if (entry) {
|
||||
entry.remove();
|
||||
}
|
||||
function setStatus(message, color) {
|
||||
setStatusForElement("statusText", message, color);
|
||||
entry = document.createElement("div");
|
||||
logDiv.appendChild(entry);
|
||||
entry.innerHTML = htmlContent;
|
||||
if (color) {
|
||||
entry.style.color = color;
|
||||
}
|
||||
function setGoStatus(message, color) {
|
||||
setStatusForElement("statusGoStatusText", message, color);
|
||||
entry.scrollIntoView();
|
||||
if (logEntries) {
|
||||
logEntries.push(entry);
|
||||
}
|
||||
function setDetails(message) {
|
||||
const echoTextArea = document.getElementById("echoTextArea");
|
||||
echoTextArea.value = message;
|
||||
return entry;
|
||||
}
|
||||
|
||||
function sdkFailLoading() {
|
||||
setStatus("FAILED loading SDK", "red");
|
||||
function addLogEntry(message, color = "black", entry = null) {
|
||||
return addHtmlEntry(`${message}`, color, entry);
|
||||
}
|
||||
|
||||
function logComponentStatusChange(componentName, statusMessage, color = "black", entry = null) {
|
||||
const componentHtml = `<span style="color: fuchsia;">${componentName}</span>: `;
|
||||
const statusHtml = `<span style="color: ${color};">${statusMessage}</span>`;
|
||||
return addHtmlEntry(`${componentHtml}${statusHtml}`, null, entry);
|
||||
}
|
||||
|
||||
const statusGoEntry = logComponentStatusChange("status-go", "Initializing...");
|
||||
var eventCount = 0;
|
||||
const readyToPairEventName = "readyToPair";
|
||||
async function initializeSDK() {
|
||||
try {
|
||||
const sdkEntry = logComponentStatusChange("SDK", "Initializing...");
|
||||
const conf = await window.getConfiguration();
|
||||
const wc = await window.wc.init(conf.projectId);
|
||||
logComponentStatusChange("SDK", "Initialized", "green", sdkEntry);
|
||||
eventCount++;
|
||||
} catch (error) {
|
||||
logComponentStatusChange("SDK", "FAIL initializing ${error.message}", "red", sdkEntry);
|
||||
}
|
||||
}
|
||||
|
||||
var pairLinkInput = null;
|
||||
var pairButton = null;
|
||||
function newPairWorkflow() {
|
||||
if (logEntries) {
|
||||
for (let i = 0; i < logEntries.length; i++) {
|
||||
logEntries[i].remove();
|
||||
}
|
||||
}
|
||||
|
||||
logEntries = [];
|
||||
eventCount++;
|
||||
|
||||
addHtmlEntry(
|
||||
`<input type="text" id="pairLinkInput" placeholder="Insert pair link" /><button id="pairButton" disabled>Pair</button>`
|
||||
);
|
||||
|
||||
// List existing pairing sessions
|
||||
const pairings = window.wc.getPairings();
|
||||
if (pairings.length > 0) {
|
||||
addHtmlEntry(`Existing pairings:`, "fuchsia");
|
||||
}
|
||||
for (let i = 0; i < pairings.length; i++) {
|
||||
const p = pairings[i];
|
||||
const disconnectEntry = addHtmlEntry(
|
||||
`[${i + 1}] <span style="color: ${p.active ? "green" : "orange"};">${
|
||||
p.active ? "ACTIVE" : "INACTIVE"
|
||||
}</span> <span class="elide-text">${
|
||||
p.topic
|
||||
}</span>; Expires: ${timestampToStr(p.expiry)} <button id="unpairButton${i}">Disconnect</button>`
|
||||
);
|
||||
const unpairButton = document.getElementById(`unpairButton${i}`);
|
||||
unpairButton.addEventListener("click", function () {
|
||||
window.wc.disconnect(p.topic).then(
|
||||
() => {
|
||||
addLogEntry(`Pairing ${p.topic} disconnected`, "green", disconnectEntry);
|
||||
unpairButton.remove();
|
||||
},
|
||||
(err) => {
|
||||
addLogEntry(`Pairing ${p.topic} disconnect error: ${err.message}`, "red", disconnectEntry);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
pairLinkInput = document.getElementById(`pairLinkInput`);
|
||||
pairButton = document.getElementById(`pairButton`);
|
||||
pairLinkInput.addEventListener("input", function () {
|
||||
pairButton.disabled = !(pairLinkInput.value.length > 0);
|
||||
});
|
||||
pairButton.addEventListener("click", function () {
|
||||
newSessionButton.style.display = "inline";
|
||||
pairButton.disabled = true;
|
||||
pairLinkInput.disabled = true;
|
||||
|
||||
const sdkEntry = logComponentStatusChange("SDK", "Pairing...");
|
||||
window.wc
|
||||
.pair(pairLinkInput.value)
|
||||
.then((sessionProposal) => {
|
||||
logComponentStatusChange("SDK", "got Pair session proposal", "green", sdkEntry);
|
||||
addLogEntry(`Pair ID: ${sessionProposal.id} ; Topic: ${sessionProposal.params.pairingTopic}`);
|
||||
const goSession = logComponentStatusChange("GO.pairSessionProposal", "waiting status-go", "pink");
|
||||
|
||||
document.addEventListener(`proposeUserPair`, function (event) {
|
||||
pairProposalEntry = logComponentStatusChange(
|
||||
"GO.proposeUserPair",
|
||||
`received "proposeUserPair"`,
|
||||
"green"
|
||||
);
|
||||
addLogEntry(JSON.stringify(event.detail.supportedNamespaces));
|
||||
addHtmlEntry(
|
||||
`<button id="acceptPairButton">Accept</button><button id="rejectPairButton">Reject</button>`
|
||||
);
|
||||
const acceptPairButton = document.getElementById(`acceptPairButton`);
|
||||
const rejectPairButton = document.getElementById(`rejectPairButton`);
|
||||
acceptPairButton.addEventListener("click", function () {
|
||||
window.wc.approvePairSession(sessionProposal, event.detail.supportedNamespaces).then(
|
||||
() => {
|
||||
logComponentStatusChange(
|
||||
"GO.pairSessionProposal",
|
||||
`Pair session ${sessionProposal.id} approved`,
|
||||
"green",
|
||||
pairProposalEntry
|
||||
);
|
||||
acceptPairButton.remove();
|
||||
rejectPairButton.remove();
|
||||
},
|
||||
(err) => {
|
||||
logComponentStatusChange(
|
||||
"GO.pairSessionProposal",
|
||||
`Pair session ${sessionProposal.id} approve error: ${err.message}`,
|
||||
"red",
|
||||
pairProposalEntry
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
rejectPairButton.addEventListener("click", function () {
|
||||
window.wc.rejectPairSession(sessionProposal.id).then(
|
||||
() => {
|
||||
logComponentStatusChange(
|
||||
"GO.pairSessionProposal",
|
||||
`Pair session ${sessionProposal.id} rejected`,
|
||||
"green",
|
||||
pairProposalEntry
|
||||
);
|
||||
acceptPairButton.remove();
|
||||
rejectPairButton.remove();
|
||||
},
|
||||
(err) => {
|
||||
logComponentStatusChange(
|
||||
"GO.pairSessionProposal",
|
||||
`Pair session ${sessionProposal.id} reject error: ${err.message}`,
|
||||
"red",
|
||||
pairProposalEntry
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
window.pairSessionProposal(JSON.stringify(sessionProposal)).then((success) => {
|
||||
if (!success) {
|
||||
logComponentStatusChange(
|
||||
"GO.pairSessionProposal",
|
||||
`call failed ${sessionProposal.id}`,
|
||||
"red",
|
||||
goSession
|
||||
);
|
||||
return;
|
||||
}
|
||||
logComponentStatusChange("GO.pairSessionProposal", `waiting for "proposeUserPair"`, "black", goSession);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
logComponentStatusChange("SDK", `Pairing error ${error.message}`, "red", sdkEntry);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function sdkReady() {
|
||||
window.wc.registerForSessionRequest((event) => {
|
||||
eventCount++;
|
||||
|
||||
logComponentStatusChange("SDK", `received "session_request" event`, "green");
|
||||
addLogEntry(`Event: ${JSON.stringify(event)}`);
|
||||
|
||||
addHtmlEntry(
|
||||
`<button id="acceptSessionButton${eventCount}">Accept</button> <button id="rejectSessionButton${eventCount}">Reject</button>`
|
||||
);
|
||||
|
||||
const acceptSessionButton = document.getElementById(`acceptSessionButton${eventCount}`);
|
||||
const rejectSessionButton = document.getElementById(`rejectSessionButton${eventCount}`);
|
||||
acceptSessionButton.addEventListener("click", function () {
|
||||
const sessionReqEntry = logComponentStatusChange("status-go", `sessionRequest called`, "orange");
|
||||
window.sessionRequest(JSON.stringify(event), hashedPasswordInput.value).then((success) => {
|
||||
acceptSessionButton.disabled = true;
|
||||
rejectSessionButton.disabled = true;
|
||||
|
||||
if (success) {
|
||||
logComponentStatusChange("status-go", `sessionRequest OK`, "green", sessionReqEntry);
|
||||
// waiting for "sessionRequestResult" event
|
||||
} else {
|
||||
logComponentStatusChange(
|
||||
"status-go",
|
||||
`sessionRequest call failed for topic ${event.topic}`,
|
||||
"red",
|
||||
sessionReqEntry
|
||||
);
|
||||
window.wc.rejectSessionRequest(event.topic, event.id, true);
|
||||
setStatus(`Session ${event.id} rejected, internal error`, "purple");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
rejectSessionButton.addEventListener("click", function () {
|
||||
acceptSessionButton.disabled = true;
|
||||
rejectSessionButton.disabled = true;
|
||||
window.wc.rejectSessionRequest(event.topic, event.id).then(
|
||||
() => {
|
||||
addLogEntry(`Session ${event.id} rejected`);
|
||||
},
|
||||
(err) => {
|
||||
addLogEntry(`Session ${event.id} reject error: ${err.message}`, "red");
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("sessionRequestResult", function (event) {
|
||||
let req = event.detail.sessionRequest;
|
||||
const res = window.wc.respondSessionRequest(req.topic, req.id, event.detail.signed);
|
||||
addLogEntry(`Session ${req.topic} approval accepted`);
|
||||
addHtmlEntry(
|
||||
`</br><a href="https://goerli.etherscan.io/tx/${event.detail.signed}" target="_blank">${event.detail.signed}</a>`
|
||||
);
|
||||
});
|
||||
|
||||
// Add start from scratch option
|
||||
document.addEventListener(readyToPairEventName, function () {
|
||||
addHtmlEntry(`<button id="newSessionButton" style="display: none;">New Session</button>`);
|
||||
newSessionButton = document.getElementById("newSessionButton");
|
||||
newSessionButton.addEventListener("click", function () {
|
||||
newPairWorkflow();
|
||||
});
|
||||
addHtmlEntry(
|
||||
`<input type="text" id="hashedPasswordInput" placeholder="Insert hashed password" value="0x38301fb0b5fcf3aaa4b97c4771bb6c75546e313b4ce7057c51a8cc6a3ace9d7e"/>`
|
||||
);
|
||||
hashedPasswordInput = document.getElementById(`hashedPasswordInput`);
|
||||
sdkReady();
|
||||
newPairWorkflow();
|
||||
});
|
||||
|
||||
async function processGoEvents() {
|
||||
while (true) {
|
||||
try {
|
||||
const event = await window.popNextEvent();
|
||||
switch (event.name) {
|
||||
case "nodeReady":
|
||||
setGoStatus("ready");
|
||||
statusGoReady();
|
||||
break;
|
||||
case "proposeUserPair":
|
||||
setGoStatus("Session proposed");
|
||||
setDetails(JSON.stringify(event.payload.supportedNamespaces));
|
||||
let sessionProposal = event.payload.sessionProposal;
|
||||
acceptButton.addEventListener("click", function () {
|
||||
try {
|
||||
window.wc
|
||||
.approveSession(
|
||||
sessionProposal,
|
||||
event.payload.supportedNamespaces
|
||||
)
|
||||
.then(
|
||||
() => {
|
||||
goEcho(`Session ${sessionProposal.id} approved`);
|
||||
setStatus(`Session ${sessionProposal.id} approved`);
|
||||
acceptButton.style.display = "none";
|
||||
rejectButton.style.display = "none";
|
||||
},
|
||||
(err) => {
|
||||
goEcho(
|
||||
`Session ${sessionProposal.id} approve error: ${err}`
|
||||
);
|
||||
setStatus(
|
||||
`Session ${sessionProposal.id} approve error: ${err}`
|
||||
);
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
goEcho(`WTF error: ${err.message}`);
|
||||
setStatus(`WTF error: ${err.message}`);
|
||||
}
|
||||
});
|
||||
|
||||
rejectButton.addEventListener("click", function () {
|
||||
try {
|
||||
window.wc.rejectSession(sessionProposal.id).then(
|
||||
() => {
|
||||
goEcho(`Session ${sessionProposal.id} rejected`);
|
||||
setStatus(`Session ${sessionProposal.id} rejected`);
|
||||
acceptButton.style.display = "none";
|
||||
rejectButton.style.display = "none";
|
||||
},
|
||||
(err) => {
|
||||
goEcho(`Session ${sessionProposal.id} reject error`);
|
||||
setStatus(`Session ${sessionProposal.id} reject error`);
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
goEcho(
|
||||
`Session ${sessionProposal.id} reject error: ${err.message}`
|
||||
);
|
||||
setStatus(
|
||||
`Session ${sessionProposal.id} reject error: ${err.message}`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
acceptButton.style.display = "inline";
|
||||
rejectButton.style.display = "inline";
|
||||
logComponentStatusChange("status-go", "Ready", "green", statusGoEntry);
|
||||
eventCount++;
|
||||
break;
|
||||
default:
|
||||
// Handle status-go and SDK bootstrap events
|
||||
if (eventCount == 2) {
|
||||
eventCount++;
|
||||
document.dispatchEvent(new CustomEvent(readyToPairEventName, {}));
|
||||
} else if (event.name != "") {
|
||||
goEcho(`GO event: ${event.name}`);
|
||||
document.dispatchEvent(new CustomEvent(event.name, { detail: event.payload }));
|
||||
} else {
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (err) {
|
||||
|
@ -231,6 +304,36 @@
|
|||
}
|
||||
|
||||
processGoEvents();
|
||||
|
||||
// Call the initializeSDK function on page load
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
initializeSDK();
|
||||
});
|
||||
|
||||
function timestampToStr(timestamp) {
|
||||
const date = new Date(timestamp * 1000);
|
||||
const readableDate = date.toLocaleDateString();
|
||||
const readableTime = date.toLocaleTimeString();
|
||||
|
||||
return `${readableDate} - ${readableTime}`
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<style>
|
||||
.elide-text {
|
||||
max-width: 100px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
transition: max-width 0.3s ease;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.elide-text:hover {
|
||||
max-width: none;
|
||||
background-color: #f0f0f0;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
</html>
|
||||
|
|
|
@ -15,6 +15,14 @@ import (
|
|||
"github.com/status-im/status-go/signal"
|
||||
)
|
||||
|
||||
// l is used for local logging
|
||||
var l log.Logger
|
||||
|
||||
func init() {
|
||||
l = log.New()
|
||||
l.SetHandler(log.CallerFileHandler(log.StreamHandler(os.Stdout, log.TerminalFormat(false))))
|
||||
}
|
||||
|
||||
type PairResult struct {
|
||||
SessionProposal string `json:"sessionProposal"`
|
||||
}
|
||||
|
@ -39,7 +47,7 @@ func signalHandler(jsonEvent string) {
|
|||
apiResponse := statusgo.APIResponse{}
|
||||
err = json.Unmarshal([]byte(jsonEvent), &apiResponse)
|
||||
if err != nil {
|
||||
fmt.Println("@dd Error parsing the event: ", err)
|
||||
log.Error("Error parsing the signal event: ", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +59,7 @@ func signalHandler(jsonEvent string) {
|
|||
walletEvent := walletevent.Event{}
|
||||
err := json.Unmarshal([]byte(jsonEvent), &walletEvent)
|
||||
if err != nil {
|
||||
fmt.Println("@dd Error parsing the wallet event: ", err)
|
||||
log.Error("Error parsing the wallet event: ", err)
|
||||
return
|
||||
}
|
||||
// TODO: continue from here
|
||||
|
@ -63,7 +71,7 @@ func signalHandler(jsonEvent string) {
|
|||
|
||||
func main() {
|
||||
// Setup status-go logger
|
||||
log.Root().SetHandler(log.StdoutHandler)
|
||||
log.Root().SetHandler(log.CallerFileHandler(log.StdoutHandler))
|
||||
|
||||
signal.SetDefaultNodeNotificationHandler(signalHandler)
|
||||
config, nodeConfigJson, userFolder, err := processConfigArgs()
|
||||
|
@ -81,14 +89,14 @@ func main() {
|
|||
w := webview.New(true)
|
||||
defer w.Destroy()
|
||||
w.SetTitle("WC status-go test")
|
||||
w.SetSize(620, 480, webview.HintNone)
|
||||
w.SetSize(1280, 1024, webview.HintNone)
|
||||
|
||||
w.Bind("pairSessionProposal", func(sessionProposalJson string) bool {
|
||||
sessionReqRes := callPrivateMethod("wallet_wCPairSessionProposal", []interface{}{sessionProposalJson})
|
||||
sessionProposalRes := callPrivateMethod("wallet_wCPairSessionProposal", []interface{}{sessionProposalJson})
|
||||
var apiResponse wc.PairSessionResponse
|
||||
err = getRPCAPIResponse(sessionReqRes, &apiResponse)
|
||||
err = getRPCAPIResponse(sessionProposalRes, &apiResponse)
|
||||
if err != nil {
|
||||
log.Error("Error parsing the API response", "error", err)
|
||||
l.Error("Error parsing the API response", "error", err)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -99,13 +107,32 @@ func main() {
|
|||
return true
|
||||
})
|
||||
|
||||
w.Bind("sessionRequest", func(sessionRequestJson, hashedPassword string) bool {
|
||||
sessionReqRes := callPrivateMethod("wallet_wCSessionRequest", []interface{}{sessionRequestJson, hashedPassword})
|
||||
var apiResponse wc.SessionRequestResponse
|
||||
err = getRPCAPIResponse(sessionReqRes, &apiResponse)
|
||||
if err != nil {
|
||||
l.Error("Error parsing the API response", "error", err)
|
||||
return false
|
||||
}
|
||||
|
||||
go func() {
|
||||
eventQueue <- GoEvent{Name: "sessionRequestResult", Payload: apiResponse}
|
||||
}()
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
w.Bind("getConfiguration", func() Configuration {
|
||||
projectID := os.Getenv("STATUS_BUILD_WALLET_CONNECT_PROJECT_ID")
|
||||
if projectID == "" {
|
||||
projectID = "87815d72a81d739d2a7ce15c2cfdefb3"
|
||||
}
|
||||
return Configuration{ProjectId: projectID}
|
||||
})
|
||||
|
||||
w.Bind("echo", func(message string) bool {
|
||||
fmt.Println("@dd WebView:", message)
|
||||
fmt.Println("<D> WebView:", message)
|
||||
return true
|
||||
})
|
||||
|
||||
|
|
|
@ -7,11 +7,17 @@ QtObject {
|
|||
|
||||
PairSuccess,
|
||||
PairError,
|
||||
|
||||
ApprovePairSuccess,
|
||||
ApprovePairError,
|
||||
|
||||
RejectPairSuccess,
|
||||
RejectPairError
|
||||
RejectPairError,
|
||||
|
||||
AcceptSessionSuccess,
|
||||
AcceptSessionError,
|
||||
RejectSessionSuccess,
|
||||
RejectSessionError,
|
||||
|
||||
GetPairings,
|
||||
GetPairingsError
|
||||
}
|
||||
}
|
|
@ -15,6 +15,13 @@ Item {
|
|||
|
||||
required property color backgroundColor
|
||||
|
||||
property bool sdkReady: state === d.sdkReadyState
|
||||
|
||||
function setUriAndPair(wcUri) {
|
||||
pairLinkInput.text = wcUri
|
||||
d.sdkView.pair(wcUri)
|
||||
}
|
||||
|
||||
// wallet_connect.Controller \see wallet_section/wallet_connect/controller.nim
|
||||
required property var controller
|
||||
|
||||
|
@ -42,31 +49,31 @@ Item {
|
|||
text: "Pair"
|
||||
onClicked: {
|
||||
statusText.text = "Pairing..."
|
||||
sdkView.pair(pairLinkInput.text)
|
||||
d.sdkView.pair(pairLinkInput.text)
|
||||
}
|
||||
enabled: pairLinkInput.text.length > 0 && sdkView.sdkReady
|
||||
enabled: pairLinkInput.text.length > 0 && d.sdkView.sdkReady
|
||||
}
|
||||
|
||||
StatusButton {
|
||||
text: "Auth"
|
||||
onClicked: {
|
||||
statusText.text = "Authenticating..."
|
||||
sdkView.auth()
|
||||
d.sdkView.auth()
|
||||
}
|
||||
enabled: false && pairLinkInput.text.length > 0 && sdkView.sdkReady
|
||||
enabled: false && pairLinkInput.text.length > 0 && d.sdkView.sdkReady
|
||||
}
|
||||
|
||||
StatusButton {
|
||||
text: "Accept"
|
||||
onClicked: {
|
||||
sdkView.approvePairSession(d.sessionProposal, d.supportedNamespaces)
|
||||
d.sdkView.approvePairSession(d.sessionProposal, d.supportedNamespaces)
|
||||
}
|
||||
visible: root.state === d.waitingPairState
|
||||
}
|
||||
StatusButton {
|
||||
text: "Reject"
|
||||
onClicked: {
|
||||
sdkView.rejectPairSession(d.sessionProposal.id)
|
||||
d.sdkView.rejectPairSession(d.sessionProposal.id)
|
||||
}
|
||||
visible: root.state === d.waitingPairState
|
||||
}
|
||||
|
@ -77,6 +84,22 @@ Item {
|
|||
id: statusText
|
||||
text: "-"
|
||||
}
|
||||
StatusBaseText {
|
||||
text: "Pairings"
|
||||
visible: d.sdkView.pairingsModel.count > 0
|
||||
}
|
||||
StatusListView {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: contentHeight
|
||||
Layout.maximumHeight: 200
|
||||
|
||||
model: d.sdkView.pairingsModel
|
||||
|
||||
delegate: StatusBaseText {
|
||||
text: `${SQUtils.Utils.elideText(topic, 6, 6)} - ${new Date(expiry * 1000).toLocaleString()}`
|
||||
color: active ? "green" : "orange"
|
||||
}
|
||||
}
|
||||
Flickable {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 200
|
||||
|
@ -97,6 +120,32 @@ Item {
|
|||
|
||||
clip: true
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
StatusButton {
|
||||
text: "Accept"
|
||||
onClicked: {
|
||||
root.controller.sessionRequest(JSON.stringify(d.sessionRequest), passwordInput.text)
|
||||
}
|
||||
visible: root.state === d.waitingUserResponseToSessionRequest
|
||||
}
|
||||
StatusButton {
|
||||
text: "Reject"
|
||||
onClicked: {
|
||||
d.sdkView.rejectSessionRequest(d.sessionRequest.topic, d.sessionRequest.id, false)
|
||||
}
|
||||
visible: root.state === d.waitingUserResponseToSessionRequest
|
||||
}
|
||||
StatusInput {
|
||||
id: passwordInput
|
||||
|
||||
text: "1234567890"
|
||||
placeholderText: "Insert account password"
|
||||
visible: root.state === d.waitingUserResponseToSessionRequest
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout { /* spacer */ }
|
||||
}
|
||||
|
||||
// TODO: DEBUG JS Loading in DMG
|
||||
|
@ -111,7 +160,7 @@ Item {
|
|||
// Button {
|
||||
// text: "Set URL"
|
||||
// onClicked: {
|
||||
// sdkView.url = urlInput.text
|
||||
// d.sdkView.url = urlInput.text
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -119,7 +168,7 @@ Item {
|
|||
// Button {
|
||||
// text: "Set HTML"
|
||||
// onClicked: {
|
||||
// sdkView.loadHtml(htmlContent.text, "http://status.im")
|
||||
// d.sdkView.loadHtml(htmlContent.text, "http://status.im")
|
||||
// }
|
||||
// }
|
||||
|
||||
|
@ -142,16 +191,22 @@ Item {
|
|||
// Separator
|
||||
ColumnLayout {}
|
||||
|
||||
WalletConnectSDK {
|
||||
id: sdkView
|
||||
|
||||
projectId: controller.projectId
|
||||
backgroundColor: root.backgroundColor
|
||||
// TODO: use it in tests to load a dummy SDK
|
||||
Loader {
|
||||
id: sdkViewLoader
|
||||
|
||||
Layout.fillWidth: true
|
||||
// Note that a too smaller height might cause the webview to generate rendering errors
|
||||
Layout.preferredHeight: 10
|
||||
|
||||
sourceComponent: SdkViewComponent {}
|
||||
}
|
||||
}
|
||||
|
||||
component SdkViewComponent: WalletConnectSDK {
|
||||
projectId: controller.projectId
|
||||
backgroundColor: root.backgroundColor
|
||||
|
||||
onSdkInit: function(success, info) {
|
||||
d.setDetailsText(info)
|
||||
if (success) {
|
||||
|
@ -195,14 +250,34 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
onStatusChanged: function(message) {
|
||||
statusText.text = message
|
||||
onSessionRequestUserAnswerResult: function(accept, error) {
|
||||
if (error) {
|
||||
d.setStatusText(`Session Request ${accept ? "Accept" : "Reject"} error`, "red")
|
||||
return
|
||||
}
|
||||
root.state = d.pairedState
|
||||
if (accept) {
|
||||
d.setStatusText(`Session Request accepted`)
|
||||
} else {
|
||||
d.setStatusText(`Session Request rejected`)
|
||||
}
|
||||
}
|
||||
|
||||
onSessionRequestEvent: function(sessionRequest) {
|
||||
d.setStatusText("Approve session request")
|
||||
d.setDetailsText(JSON.stringify(sessionRequest, null, 2))
|
||||
d.sessionRequest = sessionRequest
|
||||
root.state = d.waitingUserResponseToSessionRequest
|
||||
}
|
||||
|
||||
onResponseTimeout: {
|
||||
d.setStatusText(`Timeout waiting for response. Reusing URI?`, "red")
|
||||
}
|
||||
|
||||
onStatusChanged: function(message) {
|
||||
statusText.text = message
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QtObject {
|
||||
|
@ -211,10 +286,16 @@ Item {
|
|||
property var sessionProposal: null
|
||||
property var supportedNamespaces: null
|
||||
|
||||
property var sessionRequest: null
|
||||
property var signedData: null
|
||||
|
||||
readonly property string sdkReadyState: "sdk_ready"
|
||||
readonly property string waitingPairState: "waiting_pairing"
|
||||
readonly property string waitingUserResponseToSessionRequest: "waiting_user_response_to_session_request"
|
||||
readonly property string pairedState: "paired"
|
||||
|
||||
property var sdkView: sdkViewLoader.item
|
||||
|
||||
function setStatusText(message, textColor) {
|
||||
statusText.text = message
|
||||
if (textColor === undefined) {
|
||||
|
@ -234,6 +315,7 @@ Item {
|
|||
|
||||
Connections {
|
||||
target: root.controller
|
||||
|
||||
function onProposeUserPair(sessionProposalJson, supportedNamespacesJson) {
|
||||
d.setStatusText("Waiting user accept")
|
||||
|
||||
|
@ -245,4 +327,25 @@ Item {
|
|||
root.state = d.waitingPairState
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.controller
|
||||
|
||||
function onRespondSessionRequest(sessionRequestJson, signedJson, error) {
|
||||
console.log("@dd respondSessionRequest", sessionRequestJson, signedJson, error)
|
||||
if (error) {
|
||||
d.setStatusText("Session Request error", "red")
|
||||
d.sdkView.rejectSessionRequest(d.sessionRequest.topic, d.sessionRequest.id, true)
|
||||
return
|
||||
}
|
||||
|
||||
d.sessionRequest = JSON.parse(sessionRequestJson)
|
||||
d.signedData = JSON.parse(signedJson)
|
||||
|
||||
d.sdkView.acceptSessionRequest(d.sessionRequest.topic, d.sessionRequest.id, d.signedData)
|
||||
|
||||
d.setStatusText("Session Request accepted")
|
||||
d.setDetailsText(d.signedData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,11 +23,14 @@ WebView {
|
|||
required property color backgroundColor
|
||||
|
||||
readonly property alias sdkReady: d.sdkReady
|
||||
readonly property alias pairingsModel: d.pairingsModel
|
||||
|
||||
signal sdkInit(bool success, var result)
|
||||
signal pairSessionProposal(bool success, var sessionProposal)
|
||||
signal pairAcceptedResult(bool success, var sessionType)
|
||||
signal pairRejectedResult(bool success, var result)
|
||||
signal sessionRequestEvent(var sessionRequest)
|
||||
signal sessionRequestUserAnswerResult(bool accept, string error)
|
||||
signal responseTimeout()
|
||||
|
||||
// TODO: proper report
|
||||
|
@ -35,19 +38,31 @@ WebView {
|
|||
|
||||
function pair(pairLink) {
|
||||
let callStr = d.generateSdkCall("pair", `"${pairLink}"`, RequestCodes.PairSuccess, RequestCodes.PairError)
|
||||
d.requestSdk(callStr)
|
||||
d.requestSdkAsync(callStr)
|
||||
}
|
||||
|
||||
function approvePairSession(sessionProposal, supportedNamespaces) {
|
||||
let callStr = d.generateSdkCall("approvePairSession", `${JSON.stringify(sessionProposal)}, ${JSON.stringify(supportedNamespaces)}`, RequestCodes.ApprovePairSuccess, RequestCodes.ApprovePairSuccess)
|
||||
|
||||
d.requestSdk(callStr)
|
||||
d.requestSdkAsync(callStr)
|
||||
}
|
||||
|
||||
function rejectPairSession(id) {
|
||||
let callStr = d.generateSdkCall("rejectPairSession", id, RequestCodes.RejectPairSuccess, RequestCodes.RejectPairError)
|
||||
|
||||
d.requestSdk(callStr)
|
||||
d.requestSdkAsync(callStr)
|
||||
}
|
||||
|
||||
function acceptSessionRequest(topic, id, signature) {
|
||||
let callStr = d.generateSdkCall("respondSessionRequest", `"${topic}", ${id}, "${signature}"`, RequestCodes.AcceptSessionSuccess, RequestCodes.AcceptSessionError)
|
||||
|
||||
d.requestSdkAsync(callStr)
|
||||
}
|
||||
|
||||
function rejectSessionRequest(topic, id, error) {
|
||||
let callStr = d.generateSdkCall("rejectSessionRequest", `"${topic}", ${id}, ${error}`, RequestCodes.RejectSessionSuccess, RequestCodes.RejectSessionError)
|
||||
|
||||
d.requestSdkAsync(callStr)
|
||||
}
|
||||
|
||||
// TODO #12434: remove debugging WebEngineView code
|
||||
|
@ -66,9 +81,6 @@ WebView {
|
|||
// case WebEngineView.LoadStartedStatus:
|
||||
root.statusChanged(`<font color="blue">Loading SDK JS code</font>`)
|
||||
break
|
||||
// case WebEngineView.LoadStoppedStatus:
|
||||
// root.statusChanged(`<font color="pink">STOPPED loading SDK JS code</font>`)
|
||||
// break
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,7 +99,7 @@ WebView {
|
|||
let htmlSrc = `<!DOCTYPE html><html><head><!--<title>TODO: Test</title>--><script type='text/javascript'>${scriptSrc}</script></head><body style='background-color: ${root.backgroundColor.toString()};'></body></html>`
|
||||
|
||||
console.debug(`@dd WalletConnectSDK.loadHtml; htmlSrc len: ${htmlSrc.length}`)
|
||||
root.loadHtml(htmlSrc, "http://status.im")
|
||||
root.loadHtml(htmlSrc, "https://status.app")
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
@ -110,7 +122,7 @@ WebView {
|
|||
|
||||
let done = false
|
||||
if (wcResult.error) {
|
||||
console.debug(`@dd wcResult - ${JSON.stringify(wcResult)}`)
|
||||
console.debug(`WC JS error response - ${JSON.stringify(wcResult)}`)
|
||||
done = true
|
||||
if (!d.sdkReady) {
|
||||
root.statusChanged(`<font color="red">[${timer.errorCount++}] Failed SDK init; error: ${wcResult.error}</font>`)
|
||||
|
@ -124,6 +136,7 @@ WebView {
|
|||
case RequestCodes.SdkInitSuccess:
|
||||
d.sdkReady = true
|
||||
root.sdkInit(true, "")
|
||||
d.startListeningForEvents()
|
||||
break
|
||||
case RequestCodes.SdkInitError:
|
||||
d.sdkReady = false
|
||||
|
@ -131,15 +144,18 @@ WebView {
|
|||
break
|
||||
case RequestCodes.PairSuccess:
|
||||
root.pairSessionProposal(true, wcResult.result)
|
||||
d.getPairings()
|
||||
break
|
||||
case RequestCodes.PairError:
|
||||
root.pairSessionProposal(false, wcResult.error)
|
||||
break
|
||||
case RequestCodes.ApprovePairSuccess:
|
||||
root.pairAcceptedResult(true, "")
|
||||
d.getPairings()
|
||||
break
|
||||
case RequestCodes.ApprovePairError:
|
||||
root.pairAcceptedResult(false, wcResult.error)
|
||||
d.getPairings()
|
||||
break
|
||||
case RequestCodes.RejectPairSuccess:
|
||||
root.pairRejectedResult(true, "")
|
||||
|
@ -147,6 +163,24 @@ WebView {
|
|||
case RequestCodes.RejectPairError:
|
||||
root.pairRejectedResult(false, wcResult.error)
|
||||
break
|
||||
case RequestCodes.AcceptSessionSuccess:
|
||||
root.sessionRequestUserAnswerResult(true, "")
|
||||
break
|
||||
case RequestCodes.AcceptSessionError:
|
||||
root.sessionRequestUserAnswerResult(true, wcResult.error)
|
||||
break
|
||||
case RequestCodes.RejectSessionSuccess:
|
||||
root.sessionRequestUserAnswerResult(false, "")
|
||||
break
|
||||
case RequestCodes.RejectSessionError:
|
||||
root.sessionRequestUserAnswerResult(false, wcResult.error)
|
||||
break
|
||||
case RequestCodes.GetPairings:
|
||||
d.populatePairingsModel(wcResult.result)
|
||||
break
|
||||
case RequestCodes.GetPairingsError:
|
||||
console.error(`WalletConnectSDK - getPairings error: ${wcResult.error}`)
|
||||
break
|
||||
default: {
|
||||
root.statusChanged(`<font color="red">[${timer.errorCount++}] Unknown state: ${wcResult.state}</font>`)
|
||||
}
|
||||
|
@ -176,6 +210,29 @@ WebView {
|
|||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: eventsTimer
|
||||
|
||||
interval: 100
|
||||
repeat: true
|
||||
running: false
|
||||
|
||||
onTriggered: {
|
||||
root.runJavaScript("window.wcEventResult ? window.wcEventResult.shift() : null", function(event) {
|
||||
if (event) {
|
||||
switch(event.name) {
|
||||
case "session_request":
|
||||
root.sessionRequestEvent(event.payload)
|
||||
break
|
||||
default:
|
||||
console.error("WC unknown event type: ", event.type)
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
||||
|
@ -183,15 +240,34 @@ WebView {
|
|||
property var sessionType: null
|
||||
property bool sdkReady: false
|
||||
|
||||
property ListModel pairingsModel: pairings
|
||||
|
||||
onSdkReadyChanged: {
|
||||
if (sdkReady) {
|
||||
d.getPairings()
|
||||
}
|
||||
}
|
||||
|
||||
function populatePairingsModel(pairList) {
|
||||
pairings.clear();
|
||||
for (let i = 0; i < pairList.length; i++) {
|
||||
pairings.append({
|
||||
active: pairList[i].active,
|
||||
topic: pairList[i].topic,
|
||||
expiry: pairList[i].expiry
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function isWaitingForSdk() {
|
||||
return timer.running
|
||||
}
|
||||
|
||||
|
||||
function generateSdkCall(methodName, paramsStr, successState, errorState) {
|
||||
return "wcResult = {error: null}; try { wc." + methodName + "(" + paramsStr + ").then((callRes) => { wcResult = {state: " + successState + ", error: null, result: callRes}; }).catch((error) => { wcResult = {state: " + errorState + ", error: error}; }); } catch (e) { wcResult = {state: " + errorState + ", error: \"Exception: \" + e.message}; }; wcResult"
|
||||
return "wcResult = {}; try { wc." + methodName + "(" + paramsStr + ").then((callRes) => { wcResult = {state: " + successState + ", error: null, result: callRes}; }).catch((error) => { wcResult = {state: " + errorState + ", error: error}; }); } catch (e) { wcResult = {state: " + errorState + ", error: \"Exception: \" + e.message}; }; wcResult"
|
||||
}
|
||||
function requestSdk(jsCode) {
|
||||
function requestSdkAsync(jsCode) {
|
||||
root.runJavaScript(jsCode,
|
||||
function(result) {
|
||||
timer.restart()
|
||||
|
@ -199,9 +275,52 @@ WebView {
|
|||
)
|
||||
}
|
||||
|
||||
function init(projectId) {
|
||||
console.debug(`@dd WC projectId - ${projectId}`)
|
||||
d.requestSdk(generateSdkCall("init", `"${projectId}"`, RequestCodes.SdkInitSuccess, RequestCodes.SdkInitError))
|
||||
function requestSdk(methodName, paramsStr, successState, errorState) {
|
||||
const jsCode = "wcResult = {}; try { const callRes = wc." + methodName + "(" + (paramsStr ? (paramsStr) : "") + "); wcResult = {state: " + successState + ", error: null, result: callRes}; } catch (e) { wcResult = {state: " + errorState + ", error: \"Exception: \" + e.message}; }; wcResult"
|
||||
root.runJavaScript(jsCode,
|
||||
function(result) {
|
||||
timer.restart()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
function startListeningForEvents() {
|
||||
const jsCode = "
|
||||
try {
|
||||
function processWCEvents() {
|
||||
window.wcEventResult = [];
|
||||
window.wcEventError = null
|
||||
window.wc.registerForSessionRequest((event) => {
|
||||
window.wcEventResult.push({name: 'session_request', payload: event});
|
||||
});
|
||||
}
|
||||
processWCEvents();
|
||||
} catch (e) {
|
||||
window.wcEventError = e
|
||||
}
|
||||
window.wcEventError"
|
||||
|
||||
root.runJavaScript(jsCode,
|
||||
function(result) {
|
||||
if (result) {
|
||||
console.error("startListeningForEvents: processWCEvents error", result)
|
||||
return
|
||||
}
|
||||
}
|
||||
)
|
||||
eventsTimer.start()
|
||||
}
|
||||
|
||||
function init(projectId) {
|
||||
d.requestSdkAsync(generateSdkCall("init", `"${projectId}"`, RequestCodes.SdkInitSuccess, RequestCodes.SdkInitError))
|
||||
}
|
||||
|
||||
function getPairings(projectId) {
|
||||
d.requestSdk("getPairings", `null`, RequestCodes.GetPairings, RequestCodes.GetPairingsError)
|
||||
}
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: pairings
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- [ ] test namespaces implementation https://se-sdk-dapp.vercel.app/
|
||||
|
||||
Design questions
|
||||
### Design questions
|
||||
|
||||
- [ ] Do we report all chains and all accounts combination or let user select?
|
||||
- Wallet Connect require to report all chainIDs that were requested
|
||||
|
@ -12,7 +12,7 @@ Design questions
|
|||
- [ ] Can't respond to sign messages if the wallet-connect dialog/view is closed (app is minimized)
|
||||
- Only apps that use deep links are expected to work seamlessly
|
||||
- [ ] Do we report **disabled chains**? **Update session** in case of enabled/disabled chains?
|
||||
- [ ] Allow user to **disconnect session**?
|
||||
- [ ] Allow user to **disconnect session**? Manage sessions?
|
||||
- [ ] Support update session if one account is added/removed?
|
||||
- [ ] User awareness of session expiration?
|
||||
- Support extend session?
|
||||
|
@ -37,7 +37,6 @@ Install dependencies steps by executing commands in this directory:
|
|||
|
||||
Use the web demo test client https://react-app.walletconnect.com/ for wallet pairing and https://react-auth-dapp.walletconnect.com/ for authentication
|
||||
|
||||
|
||||
## Log
|
||||
|
||||
Initial setup
|
||||
|
@ -47,6 +46,7 @@ npm init -y
|
|||
npm install --save-dev webpack webpack-cli webpack-dev-server
|
||||
npm install --save @walletconnect/web3wallet
|
||||
npm run build
|
||||
# npm run build:dev # for development
|
||||
```
|
||||
|
||||
## Dev - to be removed
|
||||
|
@ -69,8 +69,7 @@ StatusDialog {
|
|||
|
||||
backgroundColor: wcHelperDialog.backgroundColor
|
||||
|
||||
projectId: "<Project ID>"
|
||||
controller: WalletStores.RootStore.wcController
|
||||
controller: WalletStores.RootStore.walletConnectController
|
||||
}
|
||||
|
||||
clip: true
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,7 +11,9 @@
|
|||
"license": "MPL-2.0",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "webpack"
|
||||
"build": "webpack --mode production",
|
||||
"build:dev": "webpack --mode development",
|
||||
"start": "webpack serve --mode development --open"
|
||||
},
|
||||
"dependencies": {
|
||||
"@walletconnect/auth-client": "^2.1.2",
|
||||
|
|
|
@ -5,6 +5,7 @@ import AuthClient from '@walletconnect/auth-client'
|
|||
|
||||
// import the builder util
|
||||
import { buildApprovedNamespaces, getSdkError } from "@walletconnect/utils";
|
||||
import { formatJsonRpcResult, formatJsonRpcError } from "@walletconnect/jsonrpc-utils";
|
||||
|
||||
// "Export" API to window
|
||||
// Workaround, tried using export via output.module: true in webpack.config.js, but it didn't work
|
||||
|
@ -24,7 +25,7 @@ window.wc = {
|
|||
metadata: {
|
||||
name: "Status",
|
||||
description: "Status Wallet",
|
||||
url: "https://status.app",
|
||||
url: "http://localhost",
|
||||
icons: ['https://status.im/img/status-footer-logo.svg'],
|
||||
},
|
||||
});
|
||||
|
@ -58,7 +59,6 @@ window.wc = {
|
|||
let pairPromise = window.wc.web3wallet
|
||||
.pair({ uri: uri })
|
||||
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
pairPromise
|
||||
.then(() => {
|
||||
|
@ -72,6 +72,14 @@ window.wc = {
|
|||
});
|
||||
},
|
||||
|
||||
getPairings: function () {
|
||||
return window.wc.core.pairing.getPairings();
|
||||
},
|
||||
|
||||
disconnect: function (topic) {
|
||||
return window.wc.core.pairing.disconnect({ topic: topic});
|
||||
},
|
||||
|
||||
registerForSessionRequest: function (callback) {
|
||||
window.wc.web3wallet.on("session_request", callback);
|
||||
},
|
||||
|
@ -158,10 +166,20 @@ window.wc = {
|
|||
return window.wc.authClient.reject(id);
|
||||
},
|
||||
|
||||
respondSessionRequest: function (topic, response) {
|
||||
window.wc.web3wallet.respondSessionRequest({ topic, response });
|
||||
respondSessionRequest: function (topic, id, signature) {
|
||||
const response = formatJsonRpcResult(id, signature)
|
||||
return window.wc.web3wallet.respondSessionRequest({ topic, response });
|
||||
},
|
||||
|
||||
rejectSessionRequest: function (topic, id, error = false) {
|
||||
const errorType = error ? "SESSION_SETTLEMENT_FAILED" : "USER_REJECTED";
|
||||
return window.wc.web3wallet.respondSessionRequest({
|
||||
topic: topic,
|
||||
response: formatJsonRpcError(id, getSdkError(errorType)),
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
disconnectAll: function () {
|
||||
const pairings = window.wc.core.pairing.getPairings();
|
||||
pairings.forEach((p) => {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 5381ec4a767750034722c6611686f69215110366
|
||||
Subproject commit b994cedfc3980940fef94563ec835a1439d2586e
|
Loading…
Reference in New Issue