diff --git a/.vscode/# Code Citations.md b/.vscode/# Code Citations.md new file mode 100644 index 0000000..3cde854 --- /dev/null +++ b/.vscode/# Code Citations.md @@ -0,0 +1,58 @@ +# Code Citations + +## License: GPL_3_0 +https://github.com/modster/paganaye-babylonjs-vite-boiler/tree/3e3e0110bea8c90a3eb22006bee0323ac6f96e9a/.vscode/vs.code-workspace + +``` +: { + "hidden": true + } + }, + { + "type": "msedge", + "name": "Launch Microsoft Edge in headless mode", + "request": "launch", + "runtimeArgs": [ + "--headless", + "--remote +``` + + +## License: MIT +https://github.com/MicrosoftDocs/edge-developer/tree/718fd3ddd94494a8ad024362afaaf1706dc615f0/microsoft-edge/visual-studio-code/microsoft-edge-devtools-extension/launch-json.md + +``` +{ + "name": "Launch Edge Headless and attach DevTools", + "configurations": [ + "Launch Microsoft Edge in headless mode", + "Open Edge DevTools" + ] + }, + { + "name": "Launch Edge and attach DevTools", + "configurations": [ + " +``` + + +## License: unknown +https://github.com/nickmybw/personal-projects/tree/d51361003f8cdbeef920c44080eca52d4a0010e0/personal-projects.code-workspace + +``` +hidden": true + } + } + ], + "compounds": [ + { + "name": "Launch Edge Headless and attach DevTools", + "configurations": [ + "Launch Microsoft Edge in headless mode", + "Open Edge DevTools" + ] + }, + { + "name": " +``` + diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..fa7624b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,401 @@ +{ + "configurations": [ + { + "configurations": [ + { + "type": "msedge", + "name": "Launch with Custom URL", + "request": "launch", + "url": "http://localhost:3000", // Replace with your development server URL + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + }, + { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + }, + { + "type": "msedge", + "name": "Launch Microsoft Edge", + "request": "launch", + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's URL to finish configuring + "presentation": { + "hidden": true + } + }, + { + "type": "msedge", + "name": "Launch Microsoft Edge in headless mode", + "request": "launch", + "runtimeArgs": [ + "--headless", + "--remote-debugging-port=9222" + ], + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's URL to finish configuring + "presentation": { + "hidden": true + } + }, + { + "type": "vscode-edge-devtools.debug", + "name": "Open Edge DevTools", + "request": "attach", + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's URL to finish configuring + "presentation": { + "hidden": true + } + } + ], + // Removed invalid compounds property + } + { + "version": "0.2.0", + "configurations": [ + { + "type": "msedge", + "name": "Launch with Custom URL", + "request": "launch", + "url": "http://localhost:3000", // Replace with your development server URL + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + }, + { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + }, + { + "type": "msedge", + "name": "Launch Microsoft Edge", + "request": "launch", + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's URL to finish configuring + "presentation": { + "hidden": true + } + }, + { + "type": "msedge", + "name": "Launch Microsoft Edge in headless mode", + "request": "launch", + "runtimeArgs": [ + "--headless", + "--remote-debugging-port=9222" + ], + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's URL to finish configuring + "presentation": { + "hidden": true + } + }, + { + "type": "vscode-edge-devtools.debug", + "name": "Open Edge DevTools", + "request": "attach", + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's URL to finish configuring + "presentation": { + "hidden": true + } + } + ], + "compounds": [ + { + "name": "Launch Edge Headless and attach DevTools", + "configurations": [ + "Launch Microsoft Edge in headless mode", + "Open Edge DevTools" + ] + }, + { + "name": "Launch Edge and attach DevTools", + "configurations": [ + "Launch Microsoft Edge", + "Open Edge DevTools" + ] + } + ] + } + "configurations": [ + // ...existing configurations... + { + "type": "msedge", + "name": "Launch with Custom URL", + "request": "launch", + "url": "http://localhost:3000", + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } + ], + "compounds": [ + // ...existing compounds... + ] + } + { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + // Removed redundant compounds property + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } { + "type": "msedge", + "name": "Launch Local Web App", + "request": "launch", + "file": "${workspaceFolder}/index.html", // Adjust the path to your local file + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "presentation": { + "hidden": false + } + } + { + "type": "msedge", + "name": "Launch Microsoft Edge", + "request": "launch", + "runtimeArgs": [ + "--remote-debugging-port=9222" + ], + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's url to finish configuring + "presentation": { + "hidden": true + } + }, + { + "type": "msedge", + "name": "Launch Microsoft Edge in headless mode", + "request": "launch", + "runtimeArgs": [ + "--headless", + "--remote-debugging-port=9222" + ], + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's url to finish configuring + "presentation": { + "hidden": true + } + }, + { + "type": "vscode-edge-devtools.debug", + "name": "Open Edge DevTools", + "request": "attach", + "url": "c:\\Users\\zthim\\.vscode\\extensions\\ms-edgedevtools.vscode-edge-devtools-2.1.8\\out\\startpage\\index.html", // Provide your project's url to finish configuring + "presentation": { + "hidden": true + } + } + ], + "compounds": [ + { + "name": "Launch Edge Headless and attach DevTools", + "configurations": [ + "Launch Microsoft Edge in headless mode", + "Open Edge DevTools" + ] + }, + { + "name": "Launch Edge and attach DevTools", + "configurations": [ + "Launch Microsoft Edge", + "Open Edge DevTools" + ] + } + ] +} \ No newline at end of file diff --git a/README_EN.md b/README_EN.md index 3eb7e79..99b7872 100644 --- a/README_EN.md +++ b/README_EN.md @@ -1,5 +1,7 @@ + # TokenPocket SDK Wallet Protocol -#### Version:v2.0 + +## Version:v2.0 ### Authorize @@ -20,25 +22,26 @@ ### Transfer + ~~~ { - protocol string // protocol name TokenPocket - version string // - dappName string // - dappIcon string // - blockchain string // network "eos evm tron iost" - blockchains array // network [{"chainId": "1","network": "ethereum"}],if you want do action with evm network, use blockchains replace blockchain - action string // transfer - actionId string // - from string // - to string // - amount number // - contract string - symbol string - decimal number // evm network decimal - precision number // eos network precison - memo string - callbackUrl string // provided by dapp server to get result + protocol string // protocol name TokenPocket + version string // + dappName string // + dappIcon string // + blockchain string // network "eos evm tron iost" + blockchains array // network [{"chainId": "1","network": "ethereum"}],if you want do action with evm network, use blockchains replace blockchain + action string // transfer + actionId string // + from string // + to string // + amount number // + contract string + symbol string + decimal number // evm network decimal + precision number // eos network precison + memo string + callbackUrl string // provided by dapp server to get result } ~~~ @@ -46,40 +49,42 @@ ~~~ { - protocol string // protocol name TokenPocket - version string // - dappName string // - dappIcon string // - blockchain string // network "eos evm tron iost" - blockchains array // network [{"chainId": "1","network": "ethereum"}],if you want do action with evm network, use blockchains replace blockchain - action string // sign - actionId string // - message string // message to sign - signType string // for evm network,support ethSign and ethPersonalSign - callbackUrl string // provided by dapp server to get result + protocol string // protocol name TokenPocket + version string // + dappName string // + dappIcon string // + blockchain string // network "eos evm tron iost" + blockchains array // network [{"chainId": "1","network": "ethereum"}],if you want do action with evm network, use blockchains replace blockchain + action string // sign + actionId string // + message string // message to sign + signType string // for evm network,support ethSign and ethPersonalSign + callbackUrl string // provided by dapp server to get result } ~~~ ### Sign and push common tx -~~~ - protocol string // protocol name TokenPocket - version string // - dappName string // - dappIcon string // - blockchain string // network "eos evm tron iost" - blockchains array // network [{"chainId": "1","network": "ethereum"}],if you want do action with evm network, use blockchains replace blockchain - action string // transfer - actionId string // - - payload string // used by iost network to set tx data - actions string // used by eos network to set tx data - txData string // used by evm and tron network to set tx data - callbackUrl string // provided by dapp server to get result ~~~ -About "txData": [DEMO](https://github.com/TP-Lab/tp-wallet-sdk/blob/master/TxData%20Example.md) +protocol string // protocol name TokenPocket +version string // + dappName string // + dappIcon string // + blockchain string // network "eos evm tron iost" +blockchains array // network [{"chainId": "1","network": "ethereum"}],if you want do action with evm network, use blockchains replace blockchain +action string // transfer +actionId string // + + payload string // used by iost network to set tx data +actions string // used by eos network to set tx data +txData string // used by evm and tron network to set tx data +callbackUrl string // provided by dapp server to get result +~~~ +About "txData": [DEMO][transactionDataLink] -SDK details:https://github.com/TP-Lab/Mobile-SDK +SDK details: + + [transactionDataLink]: https://github.com/TP-Lab/tp-wallet-sdk/blob/master/TxData%20Example.md diff --git a/TokenPocket Protocol EN.md b/TokenPocket Protocol EN.md index c314538..6c28731 100644 --- a/TokenPocket Protocol EN.md +++ b/TokenPocket Protocol EN.md @@ -1,77 +1,91 @@ + # TokenPocket Protocol -#### Version:v1.0 + +## Version:v1.0 ### Login -- Param -~~~ +-Param + +~~~javascript,python,html,text + { - protocol string //protocol name here is TokenPocket - version string // protocol version here is v1.0 - dappName string // optional - dappIcon string // optional - blockchain string // wallet type(eos bos eth moac ) - wallet string // account name - action string // neccessary here is login - actionId string // optional - callbackUrl string // optional - expired string //expire time in seconds - memo string // optional +protocol string //protocol name here is TokenPocket +version string // protocol version here is v1.0 +dappName string // optional +dappIcon string // optional +blockchain string // wallet type(eos bos eth moac ) +wallet string // account name +action string // neccessary here is login +actionId string // optional +callbackUrl string // optional +expired string //expire time in seconds +memo string // optional } -~~~ -- Success data ~~~ + +-Success data + +~~~javascript,python,html,text + { - "sign": "SIG_K1_KZL9eR4cCQCJHpYHbh44yGrDqu4w8hHzQwb1xTk4Mcd4czqpw4jJUgg9DnWXzE3r", - "timestamp": "1546613919", //in seconds - "wallet": "eoseoseosacc", //account name - "ref": "TokenPocket", - "action":"login", - "actionId":"ljsdjljdljf-xjlsdjfkj" //actionId from dapp - "publickey": "EOS2TtWv19a9eYEQYB8NbGCM28nQNngWP4UcSjVYqtEz6kF7yCnPX", - "permissions": ["active", "owner"], - "result": 1 +"sign": "SIG_K1_KZL9eR4cCQCJHpYHbh44yGrDqu4w8hHzQwb1xTk4Mcd4czqpw4jJUgg9DnWXzE3r", +"timestamp": "1546613919", //in seconds +"wallet": "eoseoseosacc", //account name +"ref": "TokenPocket", +"action":"login", +"actionId":"ljsdjljdljf-xjlsdjfkj" //actionId from dapp +"publickey": "EOS2TtWv19a9eYEQYB8NbGCM28nQNngWP4UcSjVYqtEz6kF7yCnPX", +"permissions": ["active", "owner"], +"result": 1 } + ~~~ Cancel data -~~~ + +~~~javasript,python,text,html + { - "action":"login", - "actionId":"ljsdjljdljf-xjlsdjfkj" - "result": 0 +"action":"login", +"actionId":"ljsdjljdljf-xjlsdjfkj" +"result": 0 } -~~~ +~~~ ### Token transfer -- Param -~~~ +-Param + +~~~javascript,python,html,text + { - protocol string //protocol name here is TokenPocket - version string // protocol version here is v1.0 - dappName string // optional - dappIcon string // optional - action string // neccessary here is transfer - actionId string // optional - blockchain string //wallet type(eos bos eth moac ) - from string // optional - to string // neccessary - amount number // neccessary - contract string // neccessary - symbol string // neccessary - precision number // neccessary - memo string //optional - expired string // expire time in seconds +protocol string //protocol name here is TokenPocket +version string // protocol version here is v1.0 +dappName string // optional +dappIcon string // optional +action string // neccessary here is transfer +actionId string // optional +blockchain string //wallet type(eos bos eth moac ) +from string // optional +to string // neccessary +amount number // neccessary +contract string // neccessary +symbol string // neccessary +precision number // neccessary +memo string //optional +expired string // expire time in seconds } + ~~~ +-Success data + +~~~javacript,python,html,text -- Success data -~~~ "ref": "TokenPocket", "txID": "588c6797534d09e8e0b149c06c11bfd6ca7b96f0d4bba87700fffe7a87b0d988", "publickey": "EOSX1tWv19a9eKEQQB8Nb2wM28nYNngWP3UcSjVYqtjz6kF7yCnQ", @@ -80,34 +94,38 @@ Cancel data "wallet": "eoseoseostes", "permissions": ["active", "owner"], "result": 1 -~~~ -- Cancel data ~~~ + +-Cancel data + +~~~javascript,python,html,text "action":"transfer", "actionId":"ljsdljf-xljlsdjfl" //from dapp "result": 0 ~~~ - ### Push transaction -- Param -~~~ - protocol string //protocol name here is TokenPocket - version string // protocol version here is v1.0 - dappName string // optional - dappIcon string // optional - action string // neccessary here is pushTransaction - actionId string // optional - blockchain string //wallet type(eos bos eth moac ) - actions string //actions data - memo string -~~~ +-Param +~~~javascript,python,html,text +protocol string //protocol name here is TokenPocket +version string // protocol version here is v1.0 +dappName string // optional +dappIcon string // optional +action string // neccessary here is pushTransaction +actionId string // optional +blockchain string //wallet type(eos bos eth moac ) +actions string //actions data +memo string -- Success data ~~~ + +-Success data + +~~~javascript,python,html,text + "ref": "TokenPocket", "txID": "588c6797534d09e8e0b149c06c11bfd6ca7b96f0d4bba87700fffe7a87b0d988", "publickey": "EOSX1tWv19a9eKEQQB8Nb2wM28nYNngWP3UcSjVYqtjz6kF7yCnQ", @@ -116,11 +134,16 @@ Cancel data "wallet": "eoseoseostes", "permissions": ["active", "owner"], "result": 1 -~~~ -- Cancel data ~~~ + + +-Cancel data + +~~~javascript,python,html,text + "action":"pushTransaction", "actionId":"ljsdljf-xljlsdjfl" "result": 0 + ~~~