{"data": [{"name": "graynjo/Heimdallr", "link": "https://github.com/graynjo/Heimdallr", "tags": [], "stars": 765, "description": "\u4e00\u6b3e\u5b8c\u5168\u88ab\u52a8\u76d1\u542c\u7684\u8c37\u6b4c\u63d2\u4ef6\uff0c\u7528\u4e8e\u9ad8\u5371\u6307\u7eb9\u8bc6\u522b\u3001\u871c\u7f50\u7279\u5f81\u544a\u8b66\u548c\u62e6\u622a\u3001\u673a\u5668\u7279\u5f81\u5bf9\u6297", "lang": "JavaScript", "repo_lang": "", "readme": "#Heimdallr\n\n## \u26a1 Introduction\n\n**Heimdallr** is a tool dedicated to passively sniffing browser traffic. It is used to **prompt vulnerability framework fingerprints**, **alarm and intercept honeypot requests**, **anti-browser feature tracking** (browser Persistence, webRTC, Canvas, etc.) Chrome plugin.\n\n![image-20221017154419189](README.assets/image-20221017154419189.png)\n\n![image-20221017154934546](README.assets/image-20221017154934546.png)\n\n## \ud83e\udd51 install\n\n1. GitHub Releases download the latest compiled version of the plugin\n2. Chrome browser - extension settings - developer mode - load the decompressed extension\n\n![image-20221017154934546](README.assets/image-20221104111153079.png)\n\n> Note: Chrome version needs to be higher than Chrome v96, some code logic is not suitable for edge and firefox, please do not mix it with non-Chrome browsers\n\n## \ud83d\ude80 use\n\n### basic skills\n\nThe high-risk vulnerability asset fingerprint identification and honeypot jsonp request identification functions do not need to be configured, as long as the plug-in is enabled, it will take effect.\n\n- 103 high-risk vulnerability asset fingerprinting rules, involving frameworks or products as follows:\n\n> ueditor, struts2, spring, weblogic, shiro, F5 BIG-IP, Zhiyuan OA, UFIDA NC, UFIDA Chanjet, Tongda OA, Xintongda OA, Xindian OA, Fanruan Report, Lanling OA, Hongfan OA, Huatian Power OA, Wanhu OA, Kingdee Cloud, Xiezhong OA, Jinhe OA, Haichang OA, Fanwei multiple products (ecology, eoffice, ebridge, emobile), TRS SSO, TRS content management system, Yimail mail, coremail mail, Exchange mail, Ruoyi background management system, Wordpress, Xiaoyu Yilianyun video, tomcat, iis, jboss, jetty, ibm websphere, weblogic, thinkphp, showdoc, Laravel, kindeditor, fckeditor, ewebeditor, jeesite, Hikvision multiple products (network camera, security management platform, integrated image application platform), dedecms, jira, confluence, java web, Boda Station Group, dubbo, sunflower client, pagoda waf, pagoda panel, rice Tuo cms, teleport bastion machine, Qizhi bastion machine, Paradis bastion machine, H3C bastion machine, NSFOCUS firewall, security dog \u200b\u200bWaf\n\n- There are 151 honeypot feature warning rules, involving sensitive domain name requests (jsonp), honeypot web resource features, honeypot detection requests for local special software (such as Burpsuite), website traffic analysis and tracking requests, sensitive keywords, and sensitive scripts call etc.\n\n> In order to ensure the most comprehensive capture of requests, Heimdallr does not filter request types (such as script, XMLHttpRequest, etc.), so the plug-in only recognizes honeypot requests by default and does not intercept them. If honeypot request interception is enabled, it will affect normal access to CSDN, Normal access to websites such as Github can be solved by pausing the plug-in during daily use (control-pause/enable plug-in) or turning off the honeypot interception function (policy configuration-honeypot interception configuration).\n>\n> Due to the normal use of some frameworks or products (such as Baidu website online customer service will call 5 sensitive domain names, Gaode map embedding will call Gaode domain names), Jsonp sensitive domain names will also be accessed normally, so there are more than 10 Jsonp requests on the same site , it can basically be determined as a honeypot site, and a system pop-up alarm will appear at this time (the pop-up window requires the operating system to enable the browser pop-up window permission, which is enabled by default). For sensitive domain name requests with less than 10 requests, users can judge according to the correlation between the current site content and the warning domain name. For example, a small enterprise\u2019s official website may call the Baidu Shangqiao interface to realize the online customer service function, but generally it will not call the Huya live account interface or China Unicom one-click login hotspot traceability interface.\n\n### control\n\nThe three options in the upper right corner are pausing/starting the plugin, clearing all sniffing result sets, and setting options.\n\n> After the plug-in is suspended, the sniffing result sets of all pages will be cleared, and the monitoring of requests and responses will be turned off. Among the extended functions, only the WebRTC protection function will not be closed, and other functions will be suspended when the plug-in is suspended.\n\n### extensions\n\nExtended functionality is configured by the policy configuration page\n\n![image-20221017093032294](README.assets/image-20221017093032294.png)\n\n#### Passive identification configuration - enable response body rule matching\n\n- Recommended setting: Only enable this option for pages that require high attention (holes, targets) during the attack, and turn it off when it is used up\n\n> By default, passive sniffing only matches the URL, Request Header, Request Body, and Response Header of the request response, and only a small number of high-risk fingerprints are detected in the Response Body. After enabling this option, devtools will be enabled to call the chrome devtools protocol , to detect the fingerprint in the Response Body. However, after enabling this option, a debugging prompt bar will appear. If you need to close it, refer to Advanced-4\n\n#### Passive Identification Configuration -Turn off browser page caching (force refresh)\n\n- Recommended setting: This option is enabled by default\n\n> Some static resources (such as JS files) containing feature rules will be stored on disk after one call, reducing the traffic and bandwidth consumed by repeated loading. This will cause the recognition rule to not be triggered repeatedly when the page is refreshed repeatedly. After enabling this option, more complete feature recognition can be achieved, which can also prevent access exceptions caused by static resource files not being updated in time in some cases\n\n#### Honeypot interception configuration - automatic interception of requests that meet the characteristics of honeypots\n\n- Recommended settings: On during attacks, off for daily use\n\n> In order to ensure that some new Jsonp requests can be identified and blocked, the plug-in intercepts according to the requested domain name, which will cause access to some daily websites (CSDN, GitHub, etc.) to be blocked after this option is enabled, affecting daily access. Therefore, by default, the plugin will not intercept Jsonp requests suspected of being honeypots, and you need to manually enable the interception option. Daily website interception can also be suspended through the pause plugin button in the upper right corner, and restart the plugin after the visit is complete. But the more recommended way is to separate the daily use browser from the attack use browser, and specialize in dedicated\n\n#### Feature confrontation configuration - clear all browser persistent item data\n\n- Recommended setting: Clear data when browser features are tracked by cookies or other persistent means\n\n> Cleared browser persistent items include: website application cache (appcache), website resource cache, website cache storage, cookies, network file system, form data records, index database (indexDB), localStorage, password records, network SQL data ( webSQL)\n>\n> **WARNING**: Cleared data includes password records, i.e. records of your browser's password manager. If you use the browser's built-in password manager and Google account for password record and maintenance, clearing the browser's password manager record may cause the password synchronized by the Google account to be empty. Again, it is recommended to separate the attack host from the daily use host, and not to log in or save any private accounts on the attack host.\n\n#### Feature Confrontation Configuration - WebRTC Strict Policy Against IP Leakage\n\n- Recommended setting: manually enable this option after installation\n\n> Prevent real IP leakage by increasing the strictness of WebRTC policy. It is known that Chrome v104 (as of 2022.9.1) still has this vulnerability. This option can be turned on and recommended for daily use\n> Do not use this policy with other WebRTC protection plug-ins (such as WebRTC Control or WebRTC Leak Prevent) at the same time. The adjustment of WebRTC policies by each plug-in will interfere with each other, and API calls when suspending the use of other plug-ins will also affect the adjustment logic of Heimdallr.\n\n#### Feature confrontation configuration - Canves noise interference script injection\n\n- Recommended settings: On during attacks, off for daily use\n\n> Increase Canvas canvas noise to prevent feature locking by injecting content scripts into the current web page. After opening, all web pages will be loaded with additional content.js for the function hook operation of the canvas class\n\n\n\n## \ud83d\udd14 Advanced\n\n1. The identification object of the plug-in is based on the [tab page]. When the tab page changes [(domain name + port) or (IP + port)], the results will be cleared. When switching tabs, the results will be temporarily saved, and the corresponding results will be deleted when the tab or window is closed. .\n2. The plug-in only has passive traffic monitoring by default, and will not trigger firewall processing due to the identification of sensitive fingerprints.\n3. The plug-in identification result is the request content of the page and the page sub-frame. When some pages give an alarm [request body data is in json format] and [request header Content-Type is in application/json format], it may not be the request of the current document. It may be that the interface request of the related page loaded by the current document page matches the rule.\n4. Due to the security restrictions of the Google Chrome API and the historical problems of the Chrome kernel, the plug-in\u2019s inspection of the body of the response body is different from the inspection of other fingerprint locations. A debugging prompt will appear at the top of the browser page, and the response packet inspection function can be turned off through the plug-in settings. Or add the startup item avoidance prompt of Google Chrome (right-click the Chrome shortcut to open the properties, and add the startup parameter `--silent-debugger-extension-api` in the [Target] box of the shortcut bar).\n5. The purpose of the plug-in is to discover components or frameworks that cannot be identified directly. Do not add the features of components that can be directly identified to the fingerprint library (such as spark unauthorized pages). Adding meaningless identification processes will increase the identification burden.\n\n\n## \ud83c\udf87 Continue development\n\n#### Add Fingerprint\n\nIn actual combat, if you encounter meaningful high-risk fingerprint features or honeypot request features that are not in the interception list, you can open a new issue submission. The author will add the fingerprint to the new version as soon as possible after verifying the availability.\n\n#### Secondary development\n\nVue3 front-end module\n\n```\ncd Vue_popup\\heimdallr_v3\nnpm install\nnpm run build:watch\nvim src\\App.vue\n```\n\nchrome plugin module\n\n```\ncd .\\Heimdallr\\\n```\n\nfingerprint module\n\n```\ncd .\\Heimdallr\\resource\\data\nvim-data.js\n```\n\n## \u2b50404 Starlink Project\n\n![image-20221017093032294](README.assets/404logo.png)\n\n**Heimdallr** has now joined [404 Starlink Project](https://github.com/knownsec/404StarLink)\n\n## \u2728Project Star Trend\n\n[![Stargazers over time](https://starchart.cc/graynjo/Heimdallr.svg)](https://starchart.cc/graynjo/Heimdallr)\n\n\n## \ud83c\udf8aThanks\n\nhttps://github.com/iiiusky/AntiHoneypot-Chrome-simple\n\nhttps://github.com/cnrstar/anti-honeypot\n\nhttps://github.com/Monyer/antiHoneyPot\n\nhttps://github.com/fuckjsonp/FuckJsonp-RCE-CVE-2022-26809-SQL-XSS-FuckJsonp\n\nhttps://github.com/aghorler/WebRTC-Leak-Prevent\n\nhttps://github.com/NS-Sp4ce/MoAn_Honey_Pot_Urls\n\nhttps://github.com/EdgeSecurityTeam/EHole\n\nhttps://mybrowseraddon.com/canvas-defender.html\n\nhttps://github.com/fuckhoneypot/fuckhoneypot\n\n## \ud83d\udca1 License\n\nReleased under the GPL V2 agreement, see LICENSE for details", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "hatnote/listen-to-wikipedia", "link": "https://github.com/hatnote/listen-to-wikipedia", "tags": ["sonification", "visualization", "wikipedia", "data", "sound"], "stars": 766, "description": "Live, generative music from Wikipedia edits", "lang": "JavaScript", "repo_lang": "", "readme": "# Listen to Wikipedia\n\nReal-time visualization and sonification of Wikipedia activity.\n\n## About\n\nBuilt by [Stephen LaPorte](https://twitter.com/sklaporte) and [Mahmoud Hashemi](https://twitter.com/mhashemi).\n\nListen to Wikipedia is inspired by Maximillian Laumeister's [BitListen](http://www.bitlisten.com/).\n\nWe fixed up some of the sounds using\n[Sound eXchange](http://sox.sourceforge.net/Docs/Documentation), which\nis some cool software.\n", "readme_type": "markdown", "hn_comments": "Nothing better than a website that starts playing sound as soon as you open it!Pro tip: You can link directly to multiple active sources. The following link marks all sources as active automatically. It is surprisingly harmonious: http://listen.hatnote.com/#uk,en,fr,sv,he,as,pa,ml,or,pl,sr,...You would have to click all 40 checkboxes manually otherwise...Great way to moderate vandalism. Half of the edits I clicked were defacement of articlesdiscussion from 2015: https://news.ycombinator.com/item?id=9972781Great project. I made a fork of this recently that starts in full-screen mode: http://skhg.github.io/listen-to-wikipedia/?fullscreen for ambient sound on our TVRepo at https://github.com/skhg/listen-to-wikipediaOh this is amazing. Very cool.Doesn't work on Safari (14.0.2). No sound. Had to fire up Firefox to hear the notes.Also, site is not secure (no https).I remember there was a website or app which let you listen to wikipedia articles whose subject was near you, based on geolocation info. Anyone remember what it was?What scale is it using? It sounds very harmoniousThis is beautiful.Definitely has a Crouching Tiger, Hidden Wiki vibe to it, thanks :-)Neat, although with Wikipedia dealing largely with sentence-based text, I was hoping for something that does text-to-speech. It would be cool if for each edit a voice would read the article title and the updated sentence(s).Similar projects have been inspired by this. Someone made a version of this, but for GitHub: https://github.audioAnd another, but for Twitter: https://iora.live (disclaimer: I'm the author)I seem to get about 50 or so entries that play, then nothing for many minutes. If I refresh, I get another burst of entries. Possibly HN is hugging the site to death?In Wikipedia, most large deletions are due to vandalism.Fortunately there are bots that detect and revert those.I was hoping this would be a way to listen to Wikipedia articles like audiobooks. Unfortunately, the iPhone screen reader is not optimized for reading Wikipedia:- It reads footnote links (\"one\", \"fourteen\", etc)- It reads years like numbers (\"One thousand, seven hundred and fifty six\" instead of \"seventeen fifty six\").- It reads introductory metadata, warnings, etc.- It reads tables.- It read image captions.Ideally it wouldn't do any of these things. Basically, it reads the screen from top to bottom, which isn't what a human would do if you asked somebody to read a Wikipedia article to you. If anyone knows a good way to synthesize Wikipedia to speech, that would be so nice!EDIT: I wonder if Apple would reject such an app from the App Store because it would compete with ebooks.How does the 'new user announcement' chord work? And pitching in general?The new user announcement seems to be on a 7th (always attractive for a short amount of time - mainly minor but not always - I've listened for a short amount of time). The deletes seem to be biased towards a minor chord.I might have mixed that all up, but the chord seems to show some dependency.Or it is just late a night.Where is the information being scraped from?I looked at the source but I'm hardly a JS/Web expert.Seems to be from here:https://meta.wikimedia.org/wiki/Special:RecentChangeshttps://wikitech.wikimedia.org/wiki/RCStreambut only found a list of weird addresses: https://github.com/hatnote/listen-to-wikipedia/search?utf8=%...This is brilliant and very soothing.Seems to slow/down animation after a couple hours - very laggy. Closed the tab and audio was still playing for about 40 seconds afterwards - was thinking I'd have to reboot the machine(!)Is there some way to be cleaning up old circles after X new ones (or X minutes?)WARNING: AUTOPLAY SOUND\"Bells indicate additions and string plucks indicate subtractions\", This is relaxing because the of the harmony determined especially by the bells.In addition, the WikiPedia is so powerful because the green dominates the purple..The \"Listen to Bitcoin\" link is broken, but this similar project is just as cool: http://www.bitlisten.com. Not sure if that's what the broken link used to point to.Flagged for autoplay sound.The music sounds terrible.Looking at the title, I assumed this was going to be about audio versions of Wikipedia articles. Obviously, this is much cooler!Those apes sitting at the base of the Obelisk in 2001 A Spacy Odyssey may have been on the something.Very nice, I think I'll use this as my background music when programming. Reminds me of a similar (real life!) thing: The Sea Organon in Zadar, Croatia: https://www.youtube.com/watch?v=mtDYTeB5J-8 Skip to 5:00 to listen.Love itListen to the English version and then the Chinese Version - you will see the Great Firewall of China in action. :/Starting to play sound without user confirmation is a default tab-close. I wont even take the time to look at it. Bonus point for not being flash that hijacks the browser shortcut.Is it just me or does it not work (anymore)?EDIT: Turns out you need to open TCP port 9000Posted it to Product Hunt http://www.producthunt.com/upcoming hopefully it gets on the main feed!amazing concept, and the fact that data is generating this music resulting in a mesmerizing effect gives me chills; maybe one day indeed we would listen to bots composing an entire piece on its own!I would have imagined it to have a much faster beat... maybe this is a bad time.Ok. This is cool... :)This is possibly one of the coolest things I have seen all day. And I was procrastinating nearly all day so I have seen a //bunch// of things ;)Makes for nice BG music and hasn't gotten annoying yet (10 mins in).", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "Cocos-BCX/JSSDK", "link": "https://github.com/Cocos-BCX/JSSDK", "tags": [], "stars": 766, "description": null, "lang": "JavaScript", "repo_lang": "", "readme": "# Part 1. Cocos-BCX\u94fe\u7cfb\u7edf\u4e92\u64cd\u4f5cAPI -- BCXJS\n\nJavascript API\uff0c\u7528\u4e8e\u4f7f\u7528COCOS-BCX RPC API\u4e0e\u57fa\u4e8eCOCOS-BCX\u7684\u533a\u5757\u94fe\u96c6\u6210\u3002\n\n## Preparation:\n\nNode.js\u7248\u672c8.9.3\u6216\u66f4\u9ad8\u7248\u672c\n\n## Build:\n\n\u4f7f\u7528npm install\u5b89\u88c5\u672c\u5730\u4f9d\u8d56\u9879\u3002 \n\u4f7f\u7528\u5f00\u53d1\u6784\u5efanpm run dev\u3002\n\n### Browser Distribution\n\n\u6784\u5efa\u7528\u4e8e\u53d1\u5e03npm run release\u3002\n\u6784\u5efa\u5c06\u5728`./build`\u4e2d\u627e\u5230\n### NPM\n\n\u6784\u5efa\u7528\u4e8e\u53d1\u5e03npm run release-npm\u3002\n\u6784\u5efa\u5c06\u5728`./build-npm`\u4e2d\u627e\u5230\n\n\n## Import\n\n### Browser\n\n```html\n \n ```\n \n### NPM\n\n\u5728\u7528 bcxjs \u6784\u5efa\u5927\u578b\u5e94\u7528\u65f6\u63a8\u8350\u4f7f\u7528 NPM \u5b89\u88c5\u3002NPM \u80fd\u5f88\u597d\u5730\u548c\u8bf8\u5982 webpack \u6216 Browserify \u6a21\u5757\u6253\u5305\u5668\u914d\u5408\u4f7f\u7528\n```js\n# \u6700\u65b0\u7a33\u5b9a\u7248\n$ npm install bcxjs-api\n```\n\n\u5982\u679c\u60a8\u6709\u4e00\u4e2a\u8f6c\u6362\u5668\uff0c\u4f8b\u5982Babel\uff0c\u5219\u652f\u6301\u5728\u6d4f\u89c8\u5668\u4e2d\u4f7f\u7528ES6\u6a21\u5757\u8bed\u6cd5\u5bfc\u5165\u3002\n```js\nimport BCX from \"bcxjs-api\"\n```\n\n\n## Start:\n\n### \u5b9e\u4f8b\u5316\u7c7b\u5e93\u5bf9\u8c61\n\n```JavaScript\nvar bcx=new BCX({\n\t\tdefault_ws_node:\u201dws://XXXXXXXXX\u201d //\u8282\u70b9rpc\u5730\u5740,\u9009\u586b\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u6b64\u9879\u5219\u4f1a\u81ea\u52a8\u8fde\u63a5ws_node_list\u4e2d\u901f\u5ea6\u6700\u5feb\u7684\u8282\u70b9\n\t\tws_node_list:[{url:\"ws://xxxxxxx\",name:\"xxxxx\"}]//API\u670d\u52a1\u5668\u8282\u70b9\u5217\u8868\uff0c\u5fc5\u586b\n\t\tfaucet_url:\"http://xxx.xxx.xxx.xxx:xxxx\", //\u6ce8\u518c\u5165\u53e3\n\t\tnetworks:[{\n\t\t\tcore_asset:\"xxx\",//\u6838\u5fc3\u8d44\u4ea7\u7b26\u53f7\n\t\t\tchain_id:\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"//\u94feid \n\t\t}], \n\t\tauto_reconnect:false,//\u5f53RPC\u65ad\u5f00\u65f6\u662f\u5426\u81ea\u52a8\u8fde\u63a5\uff0c\u9ed8\u8ba4\u4e3atrue\n\t\tapp_keys:[\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"],//\u5408\u7ea6\u6388\u6743\uff0c\u4e0d\u8fdb\u884c\u5408\u7ea6\u6388\u6743\uff0c\u5219\u4e0d\u7528\u914d\u7f6e\u6b64\u9009\u9879\n\t\treal_sub:true//true\uff1a\u5b9e\u65f6\u8ba2\u9605\uff0cfalse:\u533a\u5757\u8ba2\u9605\uff0c\u8ba2\u9605\u901a\u77e5\u9891\u7387\u4e3a\u51fa\u5757\u9891\u7387\n\t\tsub_max_op:13//\u8ba2\u9605\u65f6\u6700\u5927\u5904\u7406OP\u6570\u91cf\n});\n```\n\n### \u8c03\u7528\u5b9e\u4f8b-\u8f6c\u8d26\n\n```JavaScript\nbcx.transferAsset({\n to:\"test2\",\n amount:1,\n assetId:\"COCOS\",\n memo:\"\"\n}).then(res=>{\n console.log('transferAsset res',res);\n})\n``` \n\n\n## API\u8bf4\u660e\n#### 1.\u6ca1\u6709\u7279\u6b8a\u8bf4\u660e\u5747\u6709\u4e00\u4e2a\u53ef\u9009\u53c2\u6570callback\ncallback\u8fd4\u56de\u7684result\u4e3aObject\u5bf9\u8c61,\u7ed3\u6784\u4e3a{code:0,message:\u201d\u201d}\u3002\ncode=1\u65f6\u8868\u793a\u6210\u529f\uff0c\u65e0message\u72b6\u6001\u63cf\u8ff0\u3002\ncode!=1\u65f6\u610f\u5473\u6267\u884c\u5931\u8d25\uff0cmessage\u4e3a\u5931\u8d25\u72b6\u6001\u63cf\u8ff0\u3002\n#### 2.\u6ca1\u6709\u6b8a\u8bf4\u660e\u5747\u53ea\u6709\u4e00\u4e2a\u53c2\u6570\uff0c\u8be5\u53c2\u6570\u4e3a\u4e00\u4e2a\u5bf9\u8c61\uff0c\u5bf9\u8c61\u5305\u542b\u6240\u6709\u76f8\u5173\u53c2\u6570\uff0c\u5176\u4e2d\u4e5f\u5305\u542bcallback\n\u8c03\u7528\u793a\u4f8b\uff1a\n```js\nbcl.getPrivateKey().then(res=>{});\n``` \n#### 3.\u9664\u8ba2\u9605\u7c7b\u63a5\u53e3\uff0c\u5176\u4ed6\u63a5\u53e3\u5728\u4e0d\u4f20callback\u53c2\u6570\u65f6\u5747\u8fd4\u56depromise\u5bf9\u8c61\n#### 4.\u63a5\u53e3\u7684\u53c2\u6570\u7c7b\u578b\u6ca1\u6709\u7279\u6b8a\u8bf4\u660e\u5747\u4e3a\u5b57\u7b26\u4e32\n#### 5.\u63a5\u53e3\u7684\u53c2\u6570\u6ca1\u6709\u7279\u6b8a\u8bf4\u660e\u5747\u4e0d\u80fd\u4e3a\u7a7a\uff0ccallback\u4e3a\u53ef\u9009\u53c2\u6570\n#### 6.\u67e5\u8be2\u7c7b\u63a5\u53e3\u8fd4\u56de\u6570\u636e\u5b9e\u4f8b:{code:1,data:[]}\n#### 7.\u975e\u67e5\u8be2\u7c7b\u63a5\u53e3\u8fd4\u56de\u6570\u636e\u4f1a\u591a\u4e00\u4e2a\u6570\u636e\u5b57\u6bb5trxData,\u503c\u4e3a\u4e00\u4e2a\u5bf9\u8c61\n\u793a\u4f8b\uff1a\n```js\ntrx_data:{\n block_num:*****,//\u533a\u5757\u9ad8\u5ea6\n trx_id:\"************************\"//\u4ea4\u6613ID\n}\n```\n#### 8.\u975e\u67e5\u8be2\u7c7b\u63a5\u53e3\u82e5\u6d89\u53ca\u5173\u8054ID\u4e1a\u52a1(\u5982\u521b\u5efaNH\u8d44\u4ea7\u4ea7\u751f\u7684ID)\u8fd4\u56de\u7684\u6570\u636e\u4e2d\u5c06\u5305\u542bdata\u5bf9\u8c61\n//\u793a\u4f8b\n```js\ndata:{\n real_running_time: 387//\u8fd0\u884c\u65f6\u95f4\n result: \"4.2.288\"//\u5173\u8054\u4e1a\u52a1id\n}\n```\n\n## \u72b6\u6001\u7801\u8bf4\u660e\n\n| code | message | \u8bf4\u660e | \u5173\u8054API | \n| --- | --- | --- | --- |\n| 300 | Chain sync error, please check your system clock | \u94fe\u540c\u6b65\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u60a8\u7684\u7cfb\u7edf\u65f6\u949f | * | \n| 301 | RPC connection failed. Please check your network | \u8fde\u63a5RPC\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u4f60\u7684\u7f51\u7edc | * | \n| 1 | \u65e0 | \u64cd\u4f5c\u6210\u529f | *\u3000 | \n| 0 | failed | \u64cd\u4f5c\u5931\u8d25\uff0c\u8fd4\u56de\u9519\u8bef\u72b6\u6001\u63cf\u8ff0\u4e0d\u56fa\u5b9a\uff0c\u53ef\u76f4\u63a5\u63d0\u793ares.message\u6216\u7edf\u4e00\u63d0\u793a\u4e3a\u64cd\u4f5c\u5931\u8d25 | *\u3000 | \n| 101 | Parameter is missing | \u53c2\u6570\u7f3a\u5931 | *\u3000 | \n| 1011 | Parameter error | \u53c2\u6570\u9519\u8bef | * | \n| 102 | The network is busy, please check your network connection | \u7f51\u7edc\u7e41\u5fd9\uff0c\u8bf7\u68c0\u67e5\u4f60\u7684\u7f51\u7edc\u8fde\u63a5 | * | \n| 103 | Please enter the correct account name(/^[a-z]([a-z0-9\\.-]){4,63}/$) | \u8bf7\u8f93\u5165\u6b63\u786e\u7684\u8d26\u6237\u540d(\u6b63\u5219/^[a-z]([a-z0-9\\.-]){4,63}/$) | CreateAccountWithPassword | \n| 104 | XX not found | XX \u4e0d\u5b58\u5728 | passwordLogin\u7b49 | \n| 105 | wrong password | \u5bc6\u7801\u9519\u8bef | passwordLogin,unlockAccount | \n| 106 | The account is already unlocked | \u8d26\u6237\u5df2\u7ecf\u5904\u4e8e\u89e3\u9501\u72b6\u6001 | unlockAccount | \n| 107 | Please import the private key | \u8bf7\u5148\u5bfc\u5165\u79c1\u94a5 | unlockAccount | \n| 108 | User name or password error (please confirm that your account is registered in account mode, and the account registered in wallet mode cannot be logged in using account mode) | \u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef(\u8bf7\u786e\u8ba4\u4f60\u7684\u8d26\u6237\u662f\u901a\u8fc7\u8d26\u6237\u6a21\u5f0f\u6ce8\u518c\u7684\uff0c\u94b1\u5305\u6a21\u5f0f\u6ce8\u518c\u7684\u8d26\u6237\u4e0d\u80fd\u4f7f\u7528\u8d26\u6237\u6a21\u5f0f\u767b\u5f55) | passwordLogin | \n| 109 | Please enter the correct private key | \u8bf7\u8f93\u5165\u6b63\u786e\u7684\u79c1\u94a5 | keyLogin | \n| 110 | The private key has no account information | \u8be5\u79c1\u94a5\u6ca1\u6709\u5bf9\u5e94\u7684\u8d26\u6237\u4fe1\u606f | keyLogin | \n| 111 | Please login first | \u8bf7\u5148\u767b\u5f55 | changePassword | \n| 112 | Must have owner permission to change the password, please confirm that you imported the ownerPrivateKey | \u5fc5\u987b\u62e5\u6709owner\u6743\u9650\u624d\u53ef\u4ee5\u8fdb\u884c\u5bc6\u7801\u4fee\u6539,\u8bf7\u786e\u8ba4\u4f60\u5bfc\u5165\u7684\u662fownerPrivateKey | changePassword | \n| 113 | Please enter the correct original/temporary password | \u8bf7\u8f93\u5165\u6b63\u786e\u7684\u539f\u59cb\u5bc6\u7801/\u4e34\u65f6\u5bc6\u7801 | changePassword | \n| 114 | Account is locked or not logged in. | \u5e10\u6237\u88ab\u9501\u5b9a\u6216\u672a\u767b\u5f55 | changePasswor\u3001transferAsset\u3001getPrivateKey\u7b49 | \n| 115 | There is no asset XX on block chain | \u533a\u5757\u94fe\u4e0a\u4e0d\u5b58\u5728\u8d44\u4ea7 XX | transferAsset\u7b49 | \n| 116 | Account receivable does not exist | \u6536\u6b3e\u65b9\u8d26\u6237\u4e0d\u5b58\u5728 | transferAsset\u7b49 | \n| 117 | The current asset precision is configured as X ,and the decimal cannot exceed X | \u5f53\u524d\u8d44\u4ea7\u7cbe\u5ea6\u914d\u7f6e\u4e3a X \uff0c\u5c0f\u6570\u70b9\u4e0d\u80fd\u8d85\u8fc7 X | transferAsset\u7b49 | \n| 118 | Encrypt memo failed | \u5907\u6ce8\u52a0\u5bc6\u5931\u8d25 | transferAsset\u7b49 | \n| 119 | Expiry of the transaction | \u4ea4\u6613\u8fc7\u671f | transferAsset\u7b49 | \n| 120 | Error fetching account record | \u83b7\u53d6\u5e10\u6237\u8bb0\u5f55\u9519\u8bef | queryAccountOperations | \n| 121 | block and transaction information cannot be found | \u67e5\u8be2\u4e0d\u5230\u76f8\u5173\u533a\u5757\u53ca\u4ea4\u6613\u4fe1\u606f | queryBlockTXID | \n| 122 | Parameter blockOrTXID is incorrect | \u53c2\u6570blockOrTXID\u4e0d\u6b63\u786e | queryBlockTXID | \n| 123 | Parameter account can not be empty | \u53c2\u6570account\u4e0d\u80fd\u4e3a\u7a7a | queryAccountInfo | \n| 124 | Receivables account name can not be empty | \u6536\u6b3e\u65b9\u8d26\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a | transferAsset | \n| 125 | Users do not own XX assets | \u7528\u6237\u672a\u62e5\u6709 XX \u8d44\u4ea7 | queryAccountBalances | \n| 127 | No reward available | \u6ca1\u6709\u53ef\u9886\u53d6\u7684\u5956\u52b1 | getVestingBalances,claimVestingBalance | \n| 129 | Parameter 'memo' can not be empty | memo\u4e0d\u80fd\u4e3a\u7a7a | decodeMemo | \n| 130 | Please enter the correct contract name(/^[a-z]([a-z0-9\\.-]){4,63}$/) | \u8bf7\u8f93\u5165\u6b63\u786e\u7684\u5408\u7ea6\u540d\u79f0(\u6b63\u5219/^[a-z]([a-z0-9\\.-]){4,63}$/) | createContract | \n| 131 | Parameter 'worldView' can not be empty | \u4e16\u754c\u89c2\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a | creatWorldView | \n| 133 | Parameter 'toAccount' can not be empty | toAccount\u4e0d\u80fd\u4e3a\u7a7a | transferNHAsset | \n| 135 | Please check parameter data type | \u8bf7\u68c0\u67e5\u53c2\u6570\u6570\u636e\u7c7b\u578b | creatNHAssetOrder | \n| 136 | Parameter 'orderId' can not be empty | orderId\u4e0d\u80fd\u4e3a\u7a7a | cancelNHAssetOrder | \n| 137 | Parameter 'NHAssetHashOrIds' can not be empty | NHAssetHashOrIds\u4e0d\u80fd\u4e3a\u7a7a | lookupNHAssets | \n| 138 | Parameter 'url' can not be empty | \u63a5\u5165\u70b9\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a | switchAPINode | \n| 139 | Node address must start with ws:// or wss:// | \u8282\u70b9\u5730\u5740\u5fc5\u987b\u4ee5 ws:// \u6216 wss:// \u5f00\u5934 | addAPINode | \n| 140 | API server node address already exists | API\u670d\u52a1\u5668\u8282\u70b9\u5730\u5740\u5df2\u7ecf\u5b58\u5728 | switchAPINode | \n| 141 | Please check the data in parameter NHAssets | \u8bf7\u68c0\u67e5\u53c2\u6570NHAssets\u4e2d\u7684\u6570\u636e | creatNHAsset\u6279\u91cf\u521b\u5efaNH | \n| 142 | Please check the data type of parameter NHAssets | \u8bf7\u68c0\u67e5\u53c2\u6570NHAssets\u7684\u6570\u636e\u7c7b\u578b | creatNHAsset\u6279\u91cf\u521b\u5efaNH | \n| 144 | Your current batch creation / deletion / transfer number is X , and batch operations can not exceed X | \u60a8\u5f53\u524d\u6279\u91cf \u521b\u5efa/\u5220\u9664/\u8f6c\u79fb NH\u8d44\u4ea7\u6570\u91cf\u4e3a X \uff0c\u6279\u91cf\u64cd\u4f5c\u6570\u91cf\u4e0d\u80fd\u8d85\u8fc7 X | creatNHAsset\u3001deleteNHAsset\u3001transferNHAsset | \n| 145 | XX contract not found | XX \u5408\u7ea6\u4e0d\u5b58\u5728 | callContractFunction, queryContract, queryAccountContractData | \n| 146 | The account does not contain information about the contract | \u8d26\u6237\u6ca1\u6709\u8be5\u5408\u7ea6\u76f8\u5173\u7684\u4fe1\u606f | queryAccountContractData | \n| 147 | NHAsset do not exist | \u975e\u540c\u8d28\u8d44\u4ea7\u4e0d\u5b58\u5728 | queryNHAssets | \n| 148 | Request timeout, please try to unlock the account or login the account | \u8bf7\u6c42\u8d85\u65f6\uff0c\u8bf7\u5c1d\u8bd5\u89e3\u9501\u8d26\u6237\u6216\u767b\u5f55\u8d26\u6237 | queryVotes | \n| 149 | This wallet has already been imported | \u6b64\u79c1\u94a5\u5df2\u5bfc\u5165\u8fc7\u94b1\u5305 | importPrivateKey | \n| 150 | Key import error | \u5bfc\u5165\u79c1\u94a5\u5931\u8d25 | importPrivateKey | \n| 151 | File saving is not supported | \u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6587\u4ef6\u4fdd\u5b58 | backupDownload | \n| 152 | Invalid backup to download conversion | \u65e0\u6548\u7684\u5907\u4efd\u4e0b\u8f7d\u8f6c\u6362 | backupDownload | \n| 153 | Please unlock your wallet first | \u8bf7\u5148\u89e3\u9501\u94b1\u5305 | importPrivateKey | \n| 154 | Please restore your wallet first | \u8bf7\u5148\u6062\u590d\u4f60\u7684\u94b1\u5305 | backupDownload\u3001unlockAccount | \n| 155 | Your browser may not support wallet file recovery | \u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u94b1\u5305\u6587\u4ef6\u6062\u590d | loadWalletFile | \n| 156 | The wallet has been imported. Do not repeat import | \u8be5\u94b1\u5305\u5df2\u7ecf\u5bfc\u5165\uff0c\u8bf7\u52ff\u91cd\u590d\u5bfc\u5165 | restoreWallet | \n| 157 | Can't delete wallet, does not exist in index | \u8bf7\u6c42\u8d85\u65f6\uff0c\u8bf7\u5c1d\u8bd5\u89e3\u9501\u8d26\u6237\u6216\u767b\u5f55\u8d26\u6237 | deleteWallet | \n| 158 | Imported Wallet core assets can not be XX , and it should be XX | \u5bfc\u5165\u7684\u94b1\u5305\u6838\u5fc3\u8d44\u4ea7\u4e0d\u80fd\u4e3a XX \uff0c\u5e94\u4e3a XX | restoreWallet | \n| 159 | Account exists | \u8d26\u6237\u5df2\u5b58\u5728 | createAccountWithWallet | \n| 160 | You are not the creator of the Asset XX . | \u4f60\u4e0d\u662f\u8be5\u8d44\u4ea7\u7684\u521b\u5efa\u8005 | issueAsset | \n| 161 | Orders do not exist | \u8ba2\u5355\u4e0d\u5b58\u5728 | fillNHAssetOrder | \n| 162 | The asset already exists | \u8d44\u4ea7\u5df2\u5b58\u5728 | createAsset | \n| 163 | The wallet already exists. Please try importing the private key | \u94b1\u5305\u5df2\u7ecf\u5b58\u5728\uff0c\u8bf7\u5c1d\u8bd5\u5bfc\u5165\u79c1\u94a5 | restoreWallet | \n| 164 | worldViews do not exist | \u4e16\u754c\u89c2\u4e0d\u5b58\u5728 | queryWorldViews | \n| 165 | There is no wallet account information on the chain | \u94fe\u4e0a\u6ca1\u6709\u8be5\u94b1\u5305\u8d26\u6237\u4fe1\u606f | restoreWallet | \n| 166 | The Wallet Chain ID does not match the current chain configuration information. The chain ID of the wallet is: XX | \u8be5\u94b1\u5305\u94feid\u4e0e\u5f53\u524d\u94fe\u914d\u7f6e\u4fe1\u606f\u4e0d\u5339\u914d\uff0c\u8be5\u94b1\u5305\u7684\u94feid\u4e3a\uff1a XXX | restoreWallet | \n| 167 | The current contract version ID was not found | \u5f53\u524d\u5408\u7ea6\u7248\u672cid\u6ca1\u6709\u627e\u5230 X | queryContract | \n| 168 | This subscription does not exist | \u5f53\u524d\u6ca1\u6709\u8ba2\u9605\u6b64\u9879 | unsubscribe | \n| 169 | Method does not exist | API\u65b9\u6cd5\u4e0d\u5b58\u5728 | unsubscribe | \n\n# Part 2. \u533a\u5757\u94fe\u7cfb\u7edf\u7684\u4e92\u64cd\u4f5cAPI \n \n## \u94b1\u5305\u6a21\u5f0f \n \n### \u521b\u5efa\u8d26\u6237 \n\u65b9\u6cd5\uff1acreateAccountWithWallet \n\u529f\u80fd\uff1a\u94b1\u5305\u6a21\u5f0f\u521b\u5efa\u8d26\u6237\uff0c\u94b1\u5305\u6a21\u5f0f\u521b\u5efa\u7684\u8d26\u6237\u4e0d\u80fd\u7528\u8d26\u6237\u540d\u5bc6\u7801\u767b\u5f55\u3002\u5982\u679c\u94b1\u5305\u6a21\u5f0f\u5df2\u7ecf\u5b58\u5728\u8d26\u6237\uff0c\u8be5\u64cd\u4f5c\u4f1a\u521b\u5efa\u5b50\u8d26\u6237\uff0c\u521b\u5efa\u8be5\u5b50\u8d26\u6237\u9700\u8981\u5148\u6210\u4e3a\u7ec8\u8eab\u4f1a\u5458\u8d26\u6237 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d\u6ce8\u518c\u89c4\u5219\uff0c/^[a-z][a-z0-9\\.-]{4,63}$/\uff0c\u8d26\u6237\u540d\u957f\u5ea6\u4e3a4-63\u4f4d\uff0c\u7531\u5c0f\u5199\u5b57\u6bcd\u6216\u6570\u5b57\u6784\u6210\u4e14\u4ee5\u5b57\u6bcd\u5f00\u5934 \n\tpassword\uff1a\u5bc6\u7801 \n \n### \u5907\u4efd\u94b1\u5305 \n\u65b9\u6cd5\uff1abackupDownload \n\u529f\u80fd\uff1a\u5907\u4efd\u94b1\u5305\uff0c\u8c03\u7528\u8be5API\u4f1a\u751f\u6210\u4e00\u4e2a\u94b1\u5305\u6587\u4ef6\uff0c\u81ea\u52a8\u4e0b\u8f7d \n\u53c2\u6570\uff1a \n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u52a0\u8f7d\u5907\u4efd\u94b1\u5305\u6587\u4ef6 \n\u65b9\u6cd5\uff1aloadWalletFile \n\u529f\u80fd\uff1a\u5bf9\u4e8eweb\u6765\u8bf4\uff0cfile input\u7ed1\u5b9achange\u4e8b\u4ef6\uff0c\u8bfb\u53d6\u94b1\u5305\u6587\u4ef6 \n\u53c2\u6570\uff1a \n\tfile\uff1a\u5bbf\u4e3b\u73af\u5883\u82e5\u5728web => file input \u7684 change\u4e8b\u4ef6\u89e6\u53d1\u8fd4\u56de\u7684\u4e8b\u4ef6\u5bf9\u8c61event.target\uff0cfiles[0] \n \n### \u4ece\u5907\u4efd\u6587\u4ef6\u6062\u590d\u94b1\u5305 \n\u65b9\u6cd5\uff1arestoreWallet \n\u529f\u80fd\uff1a\u5907\u4efd\u94b1\u5305\uff0c\u8c03\u7528\u8be5API\u4f1a\u751f\u6210\u4e00\u4e2a\u94b1\u5305\u6587\u4ef6\uff0c\u81ea\u52a8\u4e0b\u8f7d\u3002\u8be5API\u8c03\u7528\u540e\uff0c\u94b1\u5305\u5904\u4e8e\u9501\u5b9a\u72b6\u6001\u3002 \n\u53c2\u6570\uff1a \n\tpassword\uff1a\u5907\u4efd\u6587\u4ef6\u7684\u94b1\u5305\u5bc6\u7801 \n \n### \u5bfc\u5165\u79c1\u94a5 \n\u65b9\u6cd5\uff1aimportPrivateKey \n\u529f\u80fd\uff1a\u5bfc\u5165\u79c1\u94a5\u5230\u94b1\u5305 \n\u53c2\u6570\uff1a \n\tprivateKey\uff1a\u660e\u6587\u79c1\u94a5 \n\tpassword\uff1a\u5982\u679c\u662f\u5df2\u7ecf\u521b\u5efa\u94b1\u5305\u6216\u6062\u590d\u94b1\u5305\uff0c\u6b64\u65f6\u7684\u5bc6\u7801\u4e3a\u539f\u6765\u94b1\u5305\u7684\u5bc6\u7801\uff0c\u5426\u5219\u662f\u53ef\u4ee5\u968f\u610f\u586b\u5199\u7684\u4e34\u65f6\u5bc6\u7801 \n \n### \u5220\u9664\u94b1\u5305 \n\u65b9\u6cd5\uff1adeleteWallet \n\u529f\u80fd\uff1a\u5220\u9664\u94b1\u5305\uff0c\u4f7f\u7528\u8d26\u6237\u6a21\u5f0f\u65f6\uff0c\u6700\u597d\u8ba9\u7528\u6237\u5148\u6267\u884c\u5220\u9664\u94b1\u5305 \n\u53c2\u6570\uff1a \n \n### \u83b7\u53d6\u94b1\u5305\u8d26\u6237\u5217\u8868 \n\u65b9\u6cd5\uff1agetAccounts \n\u529f\u80fd\uff1a\u83b7\u53d6\u94b1\u5305\u8d26\u6237\u5217\u8868 \n\u53c2\u6570\uff1a \ncallback:\u82e5\u6709\u8be5\u53c2\u6570\uff0c\u5219\u5185\u90e8\u4f1a\u81ea\u52a8\u5224\u65ad\u8fdb\u884c\u94fe\u521d\u59cb\u5316\uff0c\u5426\u5219\u76f4\u63a5\u8fd4\u56de\u6570\u636e\uff0c\u683c\u5f0f\u793a\u4f8b\uff1a \n```JavaScript\n { \n\t\t\"accounts\": [\"tom0002\"], \n\t\t\"currentAccount\": { \n\t\t\t\"account_id\": \"1.2.20\", \n\t\t\t\"locked\": true, \n\t\t\t\"account_name\": \"tom0002\" \n\t\t}\n } \n``` \n \n### \u5207\u6362\u8d26\u6237 \n\u65b9\u6cd5\uff1asetCurrentAccount \n\u529f\u80fd\uff1a\u94b1\u5305\u6a21\u5f0f\u5207\u6362\u5f53\u524d\u4f7f\u7528\u8d26\u6237 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8981\u5207\u6362\u7684\u8d26\u6237 \n \n### \u89e3\u9501\u8d26\u6237 \n\u65b9\u6cd5\uff1aunlockAccount \n\u529f\u80fd\uff1a\u5bfc\u5165\u79c1\u94a5\u6216\u94b1\u5305\u6a21\u5f0f\u624d\u53ef\u4ee5\u4f7f\u7528\u6b64\u65b9\u6cd5\u89e3\u9501\u8d26\u6237 \n\u53c2\u6570\uff1a \n\tpassword\uff1a\u5bfc\u5165\u79c1\u94a5\u65f6\u8bbe\u7f6e\u7684\u4e34\u65f6\u5bc6\u7801 \n \n### \u9501\u5b9a\u8d26\u6237 \n\u65b9\u6cd5\uff1alockAccount \n\u529f\u80fd\uff1a\u9501\u5b9a\u8d26\u6237 \n\u53c2\u6570\uff1a \n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n## \u8d26\u6237\u6a21\u5f0f \n \n### \u521b\u5efa\u8d26\u6237 \n\u65b9\u6cd5\uff1acreateAccountWithPassword \n\u529f\u80fd\uff1a\u8d26\u6237\u6ce8\u518c\u3002\u5982\u679c\u8d26\u6237\u6a21\u5f0f\u5df2\u7ecf\u6709\u8d26\u6237\u767b\u5f55\uff0c\u8be5\u64cd\u4f5c\u4f1a\u521b\u5efa\u5b50\u8d26\u6237\uff0c\u521b\u5efa\u8be5\u5b50\u8d26\u6237\u9700\u8981\u64cd\u4f5c\u8d26\u6237\u4e3a\u7ec8\u8eab\u4f1a\u5458\u8d26\u6237 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d\u6ce8\u518c\u89c4\u5219\uff0c/^[a-z][a-z0-9\\.-]{4,63}$/\uff0c\u8d26\u6237\u540d\u957f\u5ea6\u4e3a4-63\u4f4d\uff0c\u7531\u5c0f\u5199\u5b57\u6bcd\u6216\u6570\u5b57\u6784\u6210\u4e14\u4ee5\u5b57\u6bcd\u5f00\u5934 \n\tpassword\uff1a\u5bc6\u7801 \n\tautoLogin\uff1aboolean\u7c7b\u578b\uff0c\u6307\u5b9a\u662f\u5426\u81ea\u52a8\u767b\u5f55\uff0c\u9ed8\u8ba4\u503c\u4e3afalse \n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u8d26\u6237\u767b\u5f55 \n\u65b9\u6cd5\uff1apasswordLogin \n\u529f\u80fd\uff1a\u8d26\u6237\u767b\u5f55 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d \n\tpassword\uff1a\u5bc6\u7801 \n \n### \u79c1\u94a5\u767b\u5f55 \n\u65b9\u6cd5\uff1aprivateKeyLogin \n\u529f\u80fd\uff1a\u4e4b\u524d\u8fd9\u4e2aAPI\u53ea\u662f\u8fc7\u6e21\uff0c\u4e25\u683c\u4e0a\u5bfc\u5165\u79c1\u94a5\u53ea\u5b58\u5728\u4e8e\u94b1\u5305\u6a21\u5f0f\u3002\u73b0\u5728\u4e3a\u4e86\u517c\u5bb9\uff0c\u6b64API\u8fd8\u6682\u65f6\u7559\u5728\u8fd9\u91cc\uff0c\u4f9d\u7136\u53ef\u7528\u8c03\u7528 \n\u53c2\u6570\uff1a \n\tprivateKey\uff1a\u79c1\u94a5 \n\tpassword\uff1a\u8bbe\u7f6e\u7684\u4e34\u65f6\u5bc6\u7801 \n \n### \u9000\u51fa\u767b\u5f55 \n\u65b9\u6cd5\uff1alogout \n\u529f\u80fd\uff1a\u8be5\u65b9\u6cd5\u4f1a\u6e05\u9664\u7528\u6237\u76f8\u5173\u7f13\u5b58\uff0c\u5176\u4e2d\u5305\u62ec\u6e05\u9664\u52a0\u5bc6\u540e\u7684\u5bc6\u6587key \n\u53c2\u6570\uff1a \n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u4fee\u6539\u5bc6\u7801 \n\u65b9\u6cd5\uff1achangePassword \n\u529f\u80fd\uff1a\u53ea\u6709\u8d26\u6237\u6a21\u5f0f\uff0c\u624d\u80fd\u4fee\u6539\u5bc6\u7801\uff1b\u4fee\u6539\u5bc6\u7801\u6210\u529f\u540e\uff0cAPI\u5c06\u4f1a\u81ea\u52a8\u8c03\u7528\u9000\u51fa\u767b\u5f55\u3002 \n\u53c2\u6570\uff1a \n\toldPassword\uff1a\u65e7\u5bc6\u7801 \n\tnewPassword\uff1a\u65b0\u5bc6\u7801 \n \n### \u83b7\u53d6\u5f53\u524d\u8d26\u6237\u4fe1\u606f \n\u65b9\u6cd5\uff1agetAccountInfo \n\u529f\u80fd\uff1a\u5f53\u8d26\u6237\u5904\u4e8e\u89e3\u9501\u72b6\u6001\uff0c\u8fd4\u56de\u6570\u636e\u4e2d\u5c06\u5305\u542b\u8d26\u6237\u540dname \n\u53c2\u6570\uff1a\u65e0 \n \n## \u8d26\u6237\u64cd\u4f5c \n\n### \u516c\u94a5+\u8d26\u6237\u540d\u6ce8\u518c\u8d26\u6237 \n\u65b9\u6cd5\uff1acreateAccountWithPublicKey \n\u529f\u80fd\uff1a\u901a\u8fc7\u968f\u673a\u751f\u6210\u7684\u516c\u94a5\u548c\u8d26\u6237\u540d\u521b\u5efa\u8d26\u6237\u3002\u5982\u679c\u8d26\u6237\u6a21\u5f0f\u5df2\u7ecf\u6709\u8d26\u6237\u767b\u5f55\uff0c\u8be5\u64cd\u4f5c\u4f1a\u521b\u5efa\u5b50\u8d26\u6237\uff0c\u521b\u5efa\u8be5\u5b50\u8d26\u6237\u9700\u8981\u64cd\u4f5c\u8d26\u6237\u4e3a\u7ec8\u8eab\u4f1a\u5458\u8d26\u6237 \n\u53c2\u6570\uff1a \n\taccount(string):\u8d26\u6237\u540d\u6ce8\u518c\u89c4\u5219\uff0c/^[a-z][a-z0-9\\.-]{4,63}$/\uff0c\u8d26\u6237\u540d\u957f\u5ea6\u4e3a4-63\u4f4d\uff0c\u7531\u5c0f\u5199\u5b57\u6bcd\u6216\u6570\u5b57\u6784\u6210\u4e14\u4ee5\u5b57\u6bcd\u5f00\u5934 \n\townerPubkey(string):\u8d26\u6237\u6743\u9650\u516c\u94a5\n\tactivePubkey(string):\u8d44\u91d1\u6743\u9650\u516c\u94a5 \n\n### \u5347\u7ea7\u6210\u4e3a\u7ec8\u8eab\u4f1a\u5458\u8d26\u6237 \n\u65b9\u6cd5\uff1aupgradeAccount \n\u529f\u80fd\uff1a\u8d2d\u4e70\u7ec8\u8eab\u4f1a\u5458\u8d26\u6237\u540e\uff0c\u53ef\u4ee5\u521b\u5efa\u5b50\u8d26\u6237\uff0c\u6b64\u64cd\u4f5c\u9700\u6d88\u8017\u4e00\u5b9a\u7684\u624b\u7eed\u8d39 \n\u53c2\u6570\uff1a \n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u5bfc\u51fa\u7528\u6237\u79c1\u94a5 \n\u65b9\u6cd5\uff1agetPrivateKey \n\u529f\u80fd\uff1a\u83b7\u53d6\u7528\u6237active_private_key\uff0c\u672c\u79d8\u94a5\u53ef\u7528\u4e8e\u4e3a\u8d26\u6237\u6240\u6709\u82b1\u8d39\u884c\u4e3a\u7b7e\u540d\uff0c\u8fd4\u56de\u7684owner_private_key\uff1a\u53ef\u4fee\u6539\u8d26\u6237\u76f8\u5173\u7684\u5404\u79cd\u8bbe\u7f6e\uff0c\u5305\u62ec\u6743\u9650\u8bbe\u7f6e \n\u53c2\u6570\uff1a \n\tcallback\uff1a\u8bbe\u7f6e\u83b7\u53d6\u79c1\u94a5\u6210\u529f\u540e\u7684\u56de\u8c03\u51fd\u6570\n \n \n### \u67e5\u8be2\u8d26\u6237\u8bb0\u5f55 \n\u65b9\u6cd5\uff1aqueryAccountOperations \n\u529f\u80fd\uff1a\u67e5\u8be2\u7528\u6237\u8fd1\u671f\u64cd\u4f5c\u8bb0\u5f55 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d \n\tlimit\uff1a\u67e5\u8be2\u8bb0\u5f55\u6761\u6570 \n\tstartId:\u5f00\u59cb\u8d26\u6237\u8bb0\u5f55id,\u5982\u679c\u67e5\u8be2\u8303\u56f4\u662f\u6574\u4e2a\u8d26\u6237\u8bb0\u5f55\uff0c\u5219\u6700\u5f00\u59cb\u7684\u8d26\u6237\u8bb0\u5f55\u5219\u662fstartId \n\tendId:\u7ed3\u675f\u8d26\u6237\u8bb0\u5f55id,\u5982\u679c\u67e5\u8be2\u8303\u56f4\u662f\u6574\u4e2a\u8d26\u6237\u8bb0\u5f55\uff0c\u5219\u6700\u65b0\u7684\u8d26\u6237\u8bb0\u5f55\u5219\u662fendId \n \n### \u8ba2\u9605\u7528\u6237\u64cd\u4f5c\u8bb0\u5f55\u53d8\u66f4 \n\u65b9\u6cd5\uff1asubscribeToAccountOperations \n\u529f\u80fd\uff1a\u8ba2\u9605\u7528\u6237\u64cd\u4f5c\u8bb0\u5f55\u53d8\u66f4 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d \n\tcallback\uff1a\u53ea\u8981\u7528\u6237\u64cd\u4f5c\u8bb0\u5f55\u6709\u53d8\u5316\uff0c\u5c31\u8c03\u7528\u6b64callback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u67e5\u8be2\u8d26\u6237\u4fe1\u606f \n\u65b9\u6cd5\uff1aqueryAccountInfo \n\u529f\u80fd\uff1a\u8d26\u6237\u4fe1\u606f\u4e2d\u5305\u542b\u7528\u6237id\u7528\u6237\u540d\u7b49\u4fe1\u606f \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d \n \n \n## \u4ee3\u5e01\u64cd\u4f5c\u63a5\u53e3 \n \n### \u4ee3\u5e01\u8d44\u4ea7\u8f6c\u79fb \n\u65b9\u6cd5\uff1atransferAsset \n\u529f\u80fd\uff1a\u5411\u76ee\u6807\u5bf9\u8c61\u53d1\u9001\u4ee3\u5e01 \n\u53c2\u6570\uff1a \n\tfromAccount\uff1a\u53d1\u6b3e\u65b9\u8d26\u6237\u540d\uff0c\u4e0d\u662f\u53d1\u8d77\u63d0\u8bae\uff0c \n\ttoAccount\uff1a\u6536\u6b3e\u65b9\u8d26\u53f7\u540d \n\tamount\uff1a\u53d1\u9001\u7684\u4ee3\u5e01\u6570\u91cf \n\tassetId\uff1a\u8d44\u4ea7ID \uff08\u5982\uff1aX.X.X\uff09\u6216 \u4ee3\u5e01\u7b26\u53f7\uff08\u5982\uff1aBTC\uff09 \n\tmemo\uff1a\u8f6c\u8d26\u5907\u6ce8 \n\tisEncryption(boolean):\u662f\u5426\u52a0\u5bc6\u5907\u6ce8 \n\tisPropose(boolean)\uff1a\u662f\u5426\u53d1\u8d77\u63d0\u8bae \n\tcallback\uff1a\u8bbe\u7f6e\u8f6c\u8d26\u540e\u7684\u56de\u8c03\u51fd\u6570 \n \n### \u521b\u5efa\u8d44\u4ea7 \n\u65b9\u6cd5\uff1acreateAsset \n\u529f\u80fd\uff1a\u521b\u5efatoken \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u8d44\u4ea7\u7b26\u53f7\uff0c\u6b63\u5219^\\[\\.A-Z\\]+$ \n\tprecision\uff1a\u7cbe\u5ea6(\u5c0f\u6570\u4f4d\u6570) \n\tmaxSupply\uff1a\u6700\u5927\u8d44\u4ea7\u603b\u91cf \n\tdescription: \u8d44\u4ea7\u63cf\u8ff0\uff0c\u53ef\u4e0d\u586b \n\tisBitAsset:\u662f\u5426\u951a\u5b9a\u8d44\u4ea7 \n\tcallback\uff1a\u89c1\u7edf\u4e00API\u8bf4\u660e \n \tchargeMarketFee(Object)\uff1a \n```JavaScript \n\t\t{ \n\t\t\tmarketFeePercent:\u4ea4\u6613\u624b\u7eed\u8d39\u7387 (%), \n\t\t\tmaxMarketFee: \u6700\u5927\u4ea4\u6613\u624b\u7eed\u8d39 \n\t\t} \n``` \n bitassetOpts(Object)\uff1a \n```JavaScript \n\t\t{ \n\t\t\tfeedLifetimeSec(number):\u5582\u4ef7\u6709\u6548\u65f6\u95f4\uff08\u5206\u949f\uff09,\n\t\t\tminimumFeeds(number):\u6700\u5c11\u5582\u4ef7\u6b21\u6570,\n\t\t\tforceSettlementDelaySec(number):\u5f3a\u5236\u6e05\u7b97\u53d1\u751f\u524d\u5ef6\u8fdf\u65f6\u95f4\uff08\u5206\u949f\uff09,\n\t\t\tforceSettlementOffsetPercent(number):\u5f3a\u5236\u6e05\u7b97\u4ef7\u683c\u504f\u79bb\u767e\u5206\u6bd4,\n\t\t\tmaximumForceSettlementVolume(number):\u5f3a\u5236\u6e05\u7b97\u6700\u5927\u6570\u91cf(\u767e\u5206\u6bd4),\n\t\t} \n``` \n \n \n### \u66f4\u65b0\u8d44\u4ea7 \n\u65b9\u6cd5\uff1aupdateAsset \n\u529f\u80fd\uff1a\u66f4\u65b0token \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u8d44\u4ea7\u7b26\u53f7\uff0c\u6b63\u5219^\\[\\.A-Z\\]+$ \n\tmaxSupply\uff1a\u6700\u5927\u8d44\u4ea7\u603b\u91cf \n\tnewIssuer\uff1a\u66f4\u65b0\u53d1\u884c\u4eba \n description\uff1a\u8d44\u4ea7\u63cf\u8ff0\uff0c\u53ef\u4e0d\u586b \n\twhiteList:\u662f\u5426\u5f00\u542f\u9ed1\u767d\u540d\u5355 \n\ttransferRestricted:\u662f\u5426\u5f00\u542f\u9650\u5236\u4ea4\u6613 \n chargeMarketFee(Object)\uff1a \n```JavaScript \n\t\t{ \n\t\t\tmarketFeePercent:\u4ea4\u6613\u624b\u7eed\u8d39\u7387 (%), \n\t\t\tmaxMarketFee: \u6700\u5927\u4ea4\u6613\u624b\u7eed\u8d39 \n\t\t} \n``` \n bitassetOpts(Object)\uff1a \n```JavaScript \n\t\t{ \n\t\t\tfeedLifetimeSec(number):\u5582\u4ef7\u6709\u6548\u65f6\u95f4\uff08\u5206\u949f\uff09,\n\t\t\tminimumFeeds(number):\u6700\u5c11\u5582\u4ef7\u6b21\u6570,\n\t\t\tforceSettlementDelaySec(number):\u5f3a\u5236\u6e05\u7b97\u53d1\u751f\u524d\u5ef6\u8fdf\u65f6\u95f4\uff08\u5206\u949f\uff09,\n\t\t\tforceSettlementOffsetPercent(number):\u5f3a\u5236\u6e05\u7b97\u4ef7\u683c\u504f\u79bb\u767e\u5206\u6bd4,\n\t\t\tmaximumForceSettlementVolume(number):\u5f3a\u5236\u6e05\u7b97\u6700\u5927\u6570\u91cf(\u767e\u5206\u6bd4),\n\t\t} \n``` \n \n### \u8d44\u4ea7\u9500\u6bc1 \n\u65b9\u6cd5\uff1areserveAsset \n\u529f\u80fd\uff1a\u9500\u6bc1\u4ee3\u5e01\u8d44\u4ea7 \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u8d44\u4ea7\u7b26\u53f7 \n\tamount\uff1a\u9500\u6bc1\u6570\u91cf \n \n### \u8d44\u4ea7\u53d1\u884c \n\u65b9\u6cd5\uff1aissueAsset \n\u529f\u80fd\uff1a\u4ee3\u5e01\u8d44\u4ea7token\u53d1\u884c \n\u53c2\u6570\uff1a \n\ttoAccount\uff1a\u53d1\u884c\u5bf9\u8c61 \n\tamount\uff1a\u53d1\u884c\u6570\u91cf \n\tassetId\uff1a\u8d44\u4ea7\u7b26\u53f7 \n\tmemo\uff1a\u5907\u6ce8\u6d88\u606f\uff0c\u9009\u586b \n\n### \u9886\u53d6\u8d44\u4ea7\u624b\u7eed\u8d39 \n\u65b9\u6cd5\uff1aassetClaimFees \n\u529f\u80fd\uff1a\u8d44\u4ea7\u53d1\u884c\u4eba\u53ef\u4ee5\u5728\u8fd9\u91cc\u9886\u53d6\u7d2f\u79ef\u7684\u8d44\u4ea7\u624b\u7eed\u8d39\u3002 \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u9700\u8981\u9886\u53d6\u7684\u4e8c\u7ea7\u8d44\u4ea7\u4ee3\u5e01\u7b26\u53f7 \n\tamount\uff1a\u4e8c\u7ea7\u8d44\u4ea7\u4ee3\u5e01\u6570\u91cf \n\n### \u8d44\u4ea7\u53d7\u9650\u540d\u5355\u66f4\u65b0 \n\u65b9\u6cd5\uff1aassetUpdateRestricted \n\u529f\u80fd\uff1a\u6ce8:\u82e5\u662f\u53d1\u884c\u4eba\u4e0e\u9ed1\u540d\u5355\u4e2d\u7684\u8d26\u6237\u8fdb\u884c\u4ea4\u6613\u5219\u4e0d\u53d7\u9650\u5236\u3002 \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u8d44\u4ea7\u4ee3\u5e01\u7b26\u53f7 \n\tisadd:\u662f\u5426\u6dfb\u52a0\u540d\u5355\uff0c\u5426\u5219\u79fb\u9664 \n\trestrictedType\uff1a\u9650\u5236\u7c7b\u578b \n\trestrictedList\uff1a\u9650\u5236\u5217\u8868 \n\n### \u4e3agas\u8c03\u6574\u8d28\u62bc\u7269 \n\u65b9\u6cd5\uff1aupdateCollateralForGas \n\u529f\u80fd\uff1a\u4e3agas\u8c03\u6574\u8d28\u62bc\u7269\u3002 \n\u53c2\u6570\uff1a \n\tmortgager\uff1a\u62b5\u62bc\u4eba \n\tbeneficiary:\u53d7\u76ca\u4eba \n\tamount\uff1a\u62b5\u62bc\u6570\u91cf \n\tisPropose\uff1a\u662f\u5426\u63d0\u8bae \n\n### \u67e5\u8be2GAS\u5151\u6362\u7387 \n\u65b9\u6cd5\uff1aqueryGas \n\u529f\u80fd\uff1a\u67e5\u8be2\u6838\u5fc3\u8d44\u4ea7\u5bf9GAS\u5151\u6362\u7387 \n\u53c2\u6570\uff1a \n\tamount\uff1a\u6838\u5fc3\u8d44\u4ea7\u6570\u91cf \n\n### \u67e5\u8be2\u8d44\u4ea7\u53d7\u9650\u540d\u5355 \n\u65b9\u6cd5\uff1aqueryAssetRestricted \n\u529f\u80fd\uff1a\u67e5\u8be2\u8d44\u4ea7\u53d7\u9650\u540d\u5355 \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u8d44\u4ea7\u7b26\u53f7 \n\trestrictedType\uff1a\u9650\u5236\u7c7b\u578b \n\t\n### \u67e5\u8be2\u94fe\u4e0a\u53d1\u884c\u7684\u8d44\u4ea7 \n\u65b9\u6cd5\uff1aqueryAsset \n\u529f\u80fd\uff1a\u4ee3\u5e01\u8d44\u4ea7\u67e5\u8be2 \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u8d44\u4ea7\u7b26\u53f7\uff0c\u6b64\u53c2\u6570\u82e5\u4e3a\u7a7a\uff0c\u5219\u67e5\u8be2\u94fe\u4e0a\u53d1\u884c\u7684\u6240\u6709\u8d44\u4ea7 \n \n### \u67e5\u8be2\u8d26\u6237\u6307\u5b9a\u8d44\u4ea7\u4f59\u989d \n\u65b9\u6cd5\uff1aqueryAccountBalances \n\u529f\u80fd\uff1a\u83b7\u53d6\u7528\u6237\u5bf9\u5e94\u7684\u6570\u5b57\u8d44\u4ea7\uff0c\u5982\u679cassetId\u4e3a\u7a7a\uff0c\u5219\u8fd4\u56de\u7528\u6237\u6240\u6709\u4ee3\u5e01\u3002 \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u8d44\u4ea7ID\u6216\u4ee3\u5e01\u7b26\u53f7\uff0c\u8d44\u4ea7ID\uff1a\u6570\u5b57\u4ee3\u5e01\u7684\u552f\u4e00\u4ee3\u5e01\u6807\u8bc6ID\uff08\u5982\uff1a\"X.X.X\"\uff09\uff0c\u4ee3\u5e01\u7b26\u53f7\uff08\u5982\uff1a\u201dBTC\u201d\uff09 \n\taccount\uff1a\u7528\u6237\u540d \n \n### \u67e5\u8be2\u8d26\u6237\u6240\u6709\u8d44\u4ea7\u4f59\u989d\u5217\u8868 \n\u65b9\u6cd5\uff1aqueryAccountAllBalances \n\u529f\u80fd\uff1a\u67e5\u8be2\u7528\u6237\u62e5\u6709\u7684\u6240\u6709\u8d44\u4ea7\u5217\u8868\uff0c\u5217\u8868\u4e2d\u5305\u542b\u8d44\u4ea7\u5bf9\u8bb0\u8d26\u5355\u4f4d\u7684\u6362\u7b97\u503c\u3002\u5f53\u8d26\u6237\u65e0\u4efb\u4f55\u8d44\u4ea7\u4f59\u989d\u5c06\u4f1a\u8fd4\u56de\u4f59\u989d\u4e3a0\u7684\u6838\u5fc3\u8d44\u4ea7 \n\u53c2\u6570\uff1a \n\tunit\uff1a\u8bb0\u8d26\u5355\u4f4d\uff0c\u5c06\u4f1a\u6839\u636e\u624b\u7eed\u8d39\u6c47\u7387\u6216\u4ea4\u6613\u5e02\u573a\u4ef7\u683c\u6362\u7b97\u7b49\u4ef7\u7684\u8be5\u8d44\u4ea7\uff0c\u8d44\u4ea7ID\u6216\u4ee3\u5e01\u7b26\u53f7\uff0c\u8d44\u4ea7ID\uff1a\u6570\u5b57\u4ee3\u5e01\u7684\u552f\u4e00\u4ee3\u5e01\u6807\u8bc6ID\uff08\u5982\uff1a\"X.X.X\"\uff09\uff0c\u4ee3\u5e01\u7b26\u53f7\uff08\u5982\uff1a\u201dBTC\u201d\uff09 \n\taccount\uff1a\u7528\u6237\u540d \n \n## NH\u8d44\u4ea7\u64cd\u4f5c \n \n### \u6ce8\u518c\u5f00\u53d1\u8005 \n\u65b9\u6cd5\uff1aregisterCreator \n\u529f\u80fd\uff1a\u5c06\u5f53\u524d\u8d26\u6237\u6ce8\u518c\u6210\u4e3a\u5f00\u53d1\u8005 \n \n### \u521b\u5efa\u4e16\u754c\u89c2 \n\u65b9\u6cd5\uff1acreatWorldView \n\u529f\u80fd\uff1a\u521b\u5efa\u652f\u6301\u7684NH\u8d44\u4ea7\u4e16\u754c\u89c2\uff0c\u5411\u533a\u5757\u94fe\u7cfb\u7edf\u6ce8\u518c\u5f53\u524d\u8d26\u53f7\uff08\u901a\u5e38\u4e3a\u6e38\u620f\u7684\u8d26\u53f7\uff09\u652f\u6301\u7684NH\u8d44\u4ea7\u4e16\u754c\u89c2 \n\u53c2\u6570\uff1a \n\tworldView\uff1a\u4e16\u754c\u89c2\u540d\u79f0\uff0c\u533a\u5206\u5927\u5c0f\u5199; \n \n### \u521b\u9020NH\u8d44\u4ea7 \n\u65b9\u6cd5\uff1acreatNHAsset \n\u529f\u80fd\uff1a\u521b\u5efa\u4e00\u4e2a\u552f\u4e00\u7684NH\u8d44\u4ea7\uff0c\u5177\u6709\u552f\u4e00\u6027\u3002\u672c\u63a5\u53e3\u4ec5\u9650NH\u8d44\u4ea7\u5236\u9020\u5546\uff08\u94c1\u5320\u94fa\uff09\u4f7f\u7528\u3002 \n\u53c2\u6570\uff1a \n\tassetId\uff1a\u5f53\u524dNH\u8d44\u4ea7\u4ea4\u6613\u65f6\uff0c\u9002\u7528\u7684\u8d44\u4ea7ID\uff1b \n\tworldView\uff1a\u4e16\u754c\u89c2\uff1b \n\tbaseDescribe\uff1a\u5f53\u524dNH\u8d44\u4ea7\u7684\u5177\u4f53\u5185\u5bb9\u63cf\u8ff0\uff0c\u7531\u5236\u9020\u8005\u5b9a\u4e49; \n\townerAccount\uff1a\u6307\u5b9aNH\u8d44\u4ea7\u62e5\u6709\u8005(NH\u8d44\u4ea7\u5f52\u5c5e\u6743\u8d26\u6237\uff0c\u9ed8\u8ba4\u4e3aNH\u8d44\u4ea7\u521b\u5efa\u8005) \n\tNHAssetsCount (Number)\uff1a\u521b\u5efaNH\u8d44\u4ea7\u7684\u6570\u91cf\uff0c\u9ed8\u8ba4\u503c\u4e3a1\uff0c\u53ea\u6709type\u4e3a0\u5373\u521b\u5efa\u540c\u4e00\u79cdNH\u8d44\u4ea7\u751f\u6548 \n\ttype\uff1a\u521b\u5efaNH\u8d44\u4ea7\u65b9\u5f0f\u7684\u7c7b\u578b\uff0c\u9ed8\u8ba4\u503c\u4e3a0\u3002\u503c\u4e3a0\u65f6\u9ed8\u8ba4\u521b\u5efa\u540c\u4e00\u79cdNH\u8d44\u4ea7\uff0c1\u662f\u521b\u5efa\u4e0d\u540cNH\u8d44\u4ea7\u3002 \n\tNHAssets(Array)\u793a\u4f8b: \n```JavaScript \n\t[{ \n\t \"assetId\": \"X.X.X\", \n\t \"worldView\": \"TEST\", \n\t \"baseDescribe\": \"{name:\\\"\u9884\u8a00\u5bb6\\\"}\", \n\t \"ownerAccount\": \"test2\" \n\t}, { \n\t \"assetId\": \"X.X.X\", \n\t \"worldView\": \"TEST\", \n\t \"baseDescribe\": \"{name:\\\"\u5973\u5deb\\\"}\", \n\t \"ownerAccount\": \"test2\" \n\t}, { \n\t \"assetId\": \"X.X.X\", \n\t \"worldView\": \"TEST\", \n\t \"baseDescribe\": \"{name:\\\"\u730e\u4eba\\\"}\", \n\t \"ownerAccount\": \"test2\" \n\t}] \n``` \n \n \n### \u5220\u9664NH\u8d44\u4ea7 \n\u65b9\u6cd5\uff1adeleteNHAsset \n\u529f\u80fd\uff1a\u5220\u9664\u6574\u6761NH\u8d44\u4ea7\u6570\u636e\u8bb0\u5f55\uff0c\u901a\u5e38\u5728\u5546\u54c1\u9500\u6bc1\u65f6\u4f7f\u7528\uff08\u4ec5\u80fd\u7531\u7528\u6237\u81ea\u5df1\u6388\u6743\u5904\u7406\u81ea\u5df1\u60f3\u8981\u9500\u6bc1\u7684\u6570\u636e\uff09\u3002 \n\u53c2\u6570\uff1a \n\tNHAssetIds (Array)\uff1aNH\u8d44\u4ea7\u5b9e\u4f8b\u7684\u552f\u4e00\u6807\u8bc6ID;\u793a\u4f8b\uff1a\\[X.X.X, X.X.X\\] \n \n### \u8f6c\u79fbNH\u8d44\u4ea7 \n\u65b9\u6cd5\uff1atransferNHAsset \n\u529f\u80fd\uff1a\u7528\u6237\u53ef\u4ee5\u5c06\u81ea\u5df1\u7684NH\u8d44\u4ea7\u8f6c\u79fb\u5230\u53e6\u5916\u4e00\u4e2a\u7528\u6237 \n\u53c2\u6570\uff1a \n\ttoAccount\uff1a\u8f6c\u79fbNH\u8d44\u4ea7\u7684\u76ee\u6807\u7528\u6237\u540d \n\tNHAssetIds\uff08Array\uff09\uff1a\u591a\u4e2aNH\u8d44\u4ea7id\u7ec4\u6210\u7684\u6570\u7ec4\uff0c\u793a\u4f8b\uff1a\\[X.X.X, X.X.X\\] \n \n### \u63d0\u8bae\u5173\u8054\u4e16\u754c\u89c2 \n\u65b9\u6cd5\uff1aproposeRelateWorldView \n\u529f\u80fd\uff1a\u63d0\u8bae\u5173\u8054\u5230\u67d0\u4e00\u4e2a\u4e16\u754c\u89c2\uff0c\u9700\u8981\u8be5\u4e16\u754c\u89c2\u7684\u521b\u5efa\u4eba\u5ba1\u6279 \n\u53c2\u6570\uff1a \n\tworldView\uff1a\u9700\u8981\u5173\u8054\u7684\u4e16\u754c\u89c2\u540d \n \n### \u6279\u51c6\u5173\u8054\u4e16\u754c\u89c2\u7684\u63d0\u8bae \n\u65b9\u6cd5\uff1aapprovalProposal \n\u529f\u80fd\uff1a\u6279\u51c6\u5176\u4ed6\u7528\u6237\u5173\u8054\u81ea\u5df1\u7684\u4e16\u754c\u89c2\u7684\u63d0\u8bae \n\u53c2\u6570\uff1a \n\tproposalId\uff1a\u63d0\u8baeID \n \n### \u83b7\u53d6\u5f53\u524d\u7528\u6237\u6536\u5230\u7684\u63d0\u8bae \n\u65b9\u6cd5\uff1agetAccountProposals \n\u529f\u80fd\uff1a\u83b7\u53d6\u5f53\u524d\u64cd\u4f5c\u7528\u6237\u6536\u5230\u7684\u63d0\u8bae \n \n## NH\u8d44\u4ea7\u4e70\u5356\u63a5\u53e3 \n \n### \u521b\u5efaNH\u8d44\u4ea7\u51fa\u552e\u5355 \n\u65b9\u6cd5\uff1acreatNHAssetOrder \n\u529f\u80fd\uff1a\u5356\u51faNH\u8d44\u4ea7\uff08\u5728\u4ea4\u6613\u524d\u53ef\u8c03\u7528queryAccountGameItems\u51fd\u6570\uff0c\u5217\u4e3e\u7528\u6237NH\u8d44\u4ea7\uff0c\u4ee5\u4fbf\u7528\u6237\u9009\u7740\u5356\u51fa\uff09 \n\u53c2\u6570\uff1a \n\totcAccount\uff1aOTC\u4ea4\u6613\u5e73\u53f0\u8d26\u6237\uff0c\u7528\u4e8e\u6536\u53d6\u6302\u5355\u8d39\u7528\uff1b\uff08OTC\u5e73\u53f0\u586b\u5199\uff09 \n\torderFee\uff1a\u6302\u5355\u8d39\u7528\uff0c\u7528\u6237\u5411OTC\u5e73\u53f0\u8d26\u6237\u652f\u4ed8\u7684\u6302\u5355\u8d39\u7528\uff1b\uff08OTC\u5e73\u53f0\u586b\u5199\uff09 \n\tNHAssetId\uff1aNH\u8d44\u4ea7\u5b9e\u4f8b\u7684\u552f\u4e00\u6807\u8bc6ID; \uff08\u7528\u6237\u586b\u5199\uff09 \n\tprice\uff1a\u5546\u54c1\u6302\u5355\u4ef7\u683c\uff1b\uff08\u7528\u6237\u586b\u5199\uff09 \n\tpriceAssetId\uff1a\u5546\u54c1\u6302\u5355\u4ef7\u683c\u6240\u4f7f\u7528\u7684\u4ee3\u5e01\u79cd\u7c7b\uff1b\uff08\u7528\u6237\u586b\u5199\uff09 \n\texpiration\uff1a\u6302\u5355\u65f6\u95f4\uff0c\u59823600(\u79d2)\uff0c\u4e3a1\u5c0f\u65f6 \n\tmemo\uff1a\u6302\u5355\u5907\u6ce8\u4fe1\u606f\uff1b \n\tcallback\uff1a\u8bbe\u7f6e\u6267\u884c\u6302\u5355\u5356\u51fa\u540e\u7684\u56de\u8c03\u51fd\u6570 \n \n### \u8d2d\u4e70\u8ba2\u5355NH\u8d44\u4ea7 \n\u65b9\u6cd5\uff1afillNHAssetOrder \n\u529f\u80fd\uff1a\u4e70\u5165NH\u8d44\u4ea7\uff0c\u652f\u4ed8\u8d2d\u4e70\u6e38\u620f\u88c5\u5907\u7684\u4ee3\u5e01\u8d39\u7528\uff0c\u540c\u65f6\u4fee\u6539\u7528\u6237\u62e5\u6709\u7684\u5546\u54c1\u6570\u636e\u3002\u8be5\u64cd\u4f5c\u662f\u4e00\u4e2a\u591a\u6b65\u5408\u6210\u7684\u539f\u5b50\u64cd\u4f5c\uff0c\u5728\u652f\u4ed8\u8d39\u7528\u7684\u540c\u65f6\u5b8c\u6210\u7528\u6237\u8d26\u6237NH\u8d44\u4ea7\u6570\u636e\u7684\u66f4\u65b0\uff0c\u5982\u679c\u652f\u4ed8\u52a8\u4f5c\u6216\u8d26\u6237\u5546\u54c1\u6570\u636e\u66f4\u65b0\u52a8\u4f5c\u4e2d\u67d0\u4e00\u4e2a\u52a8\u4f5c\u4e0d\u88ab\u4e3b\u94fe\u533a\u5757\u8ba4\u53ef\uff0c\u5219\u6574\u4e2a\u4ea4\u6613\u5c06\u88ab\u56de\u6eda\uff0c\u907f\u514d\u5f02\u5e38\u4ea4\u6613\u3002 \n\u53c2\u6570\uff1a \n\torderId\uff1a\u8ba2\u5355ID \n \n### \u53d6\u6d88NH\u8d44\u4ea7\u51fa\u552e\u5355 \n\u65b9\u6cd5\uff1acancelNHAssetOrder \n\u529f\u80fd\uff1a\u53d6\u6d88NH\u8d44\u4ea7\u6302\u5356\u8ba2\u5355 \n\u53c2\u6570\uff1a \n\torderId\uff1a\u8ba2\u5355ID \n \n \n## NH\u8d44\u4ea7\u67e5\u8be2\u7c7b\u63a5\u53e3 \n \n### \u67e5\u8be2\u5168\u7f51\u7528\u6237NH\u8d44\u4ea7\u552e\u5356\u8ba2\u5355 \n\u65b9\u6cd5\uff1aqueryNHAssetOrders \n\u529f\u80fd\uff1a\u67e5\u8be2\u5168\u7f51\u7528\u6237NH\u8d44\u4ea7\u7684\u552e\u5356\u8ba2\u5355 \n\u53c2\u6570\uff1a \n\tassetIds(string\uff09\uff1a\u8d44\u4ea7\u7b26\u53f7\u6216id\u7b5b\u9009\u6761\u4ef6 \n\tworldViews(string)\uff1a\u7248\u672c\u540d\u79f0\u6216\u7248\u672cid\u7b5b\u9009\u6761\u4ef6 \n baseDescribe(string):\u57fa\u672c\u63cf\u8ff0\n\tpageSize\uff1a\u9875\u5bb9\u91cf \n\tpage\uff1a\u9875\u6570 \n \n### \u67e5\u8be2\u6307\u5b9a\u7528\u6237\u7684NH\u8d44\u4ea7\u552e\u5356\u8ba2\u5355 \n\u65b9\u6cd5\uff1aqueryAccountNHAssetOrders \n\u529f\u80fd\uff1a\u67e5\u8be2\u6307\u5b9a\u7528\u6237\u7684NH\u8d44\u4ea7\u552e\u5356\u8ba2\u5355 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u67e5\u8be2\u8d26\u6237\u540d\u6216\u8d26\u6237Id \n\tpageSize\uff1a\u9875\u5bb9\u91cf \n\tpage\uff1a\u9875\u6570 \n \n### \u67e5\u8be2\u8d26\u6237\u4e0b\u6240\u62e5\u6709\u7684\u9053\u5177NH\u8d44\u4ea7 \n\u65b9\u6cd5\uff1aqueryAccountNHAssets \n\u529f\u80fd\uff1a\u8bfb\u53d6\u5f53\u524d\u7528\u6237\u8d26\u6237\u4e0b\u6240\u6709\u53ef\u5728\u5bf9\u5e94\u6e38\u620f\u4e2d\u4f7f\u7528\u7684NH\u8d44\u4ea7 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d\u6216\u8d26\u6237id \n\tworldViews (array)\uff1a\u4e16\u754c\u89c2\u540d\u96c6\u5408 \n\tpage\uff1a\u9875\u6570 \n\tpageSize\uff1a\u9875\u5bb9\u91cf\uff0c\u6bcf\u9875\u7684\u6570\u636e\u6761\u6570 \n\tcallback\uff1a\u8fd4\u56de\u503c\u3002\u793a\u4f8b\uff1a \n\t\t{status:1,data:[],total:0} \n \n### \u67e5\u8be2\u5f00\u53d1\u8005\u6240\u5173\u8054\u7684\u4e16\u754c\u89c2 \n\u65b9\u6cd5\uff1aqueryNHCreator \n\u529f\u80fd\uff1a\u67e5\u8be2\u5f00\u53d1\u8005\u6240\u5173\u8054\u7684\u4e16\u754c\u89c2 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d\u6216\u8d26\u6237ID \n \n### \u67e5\u8be2\u5f00\u53d1\u8005\u521b\u5efa\u7684NH\u8d44\u4ea7 \n\u65b9\u6cd5\uff1aqueryNHCreator \n\u529f\u80fd\uff1a\u67e5\u8be2\u5f00\u53d1\u8005\u6240\u521b\u5efa\u7684\u4e16\u754c\u89c2 \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d\u6216\u8d26\u6237ID \n \n### \u67e5\u8be2NH\u8d44\u4ea7\u8be6\u7ec6\u4fe1\u606f \n\u65b9\u6cd5\uff1aqueryNHAssets \n\u529f\u80fd\uff1a\u67e5\u8be2NH\u8d44\u4ea7\u8be6\u7ec6\u4fe1\u606f \n\u53c2\u6570\uff1a \n\tNHAssetIds(Array)\uff1aNH\u8d44\u4ea7id\u6216hash \n \n### \u67e5\u8be2\u4e16\u754c\u89c2\u8be6\u7ec6\u4fe1\u606f \n\u65b9\u6cd5\uff1alookupWorldViews \n\u529f\u80fd\uff1a\u67e5\u8be2\u4e16\u754c\u89c2\u8be6\u7ec6\u4fe1\u606f \n\u53c2\u6570\uff1a \n\tworldViews (array)\uff1a\u4e16\u754c\u89c2\u540d\u79f0\u6216id \n \n## \u8282\u70b9\u6295\u7968 \n \n### \u67e5\u8be2\u8282\u70b9\u6295\u7968\u4fe1\u606f\u6570\u636e \n\u65b9\u6cd5\uff1aqueryVotes \n\u529f\u80fd\uff1a\u67e5\u8be2\u8282\u70b9\u6295\u7968\u4fe1\u606f\u6570\u636e \n\u53c2\u6570\uff1a \n\tqueryAccount\uff1a\u67e5\u8be2\u6307\u5b9a\u8d26\u6237\u7684\u6295\u7968\u4fe1\u606f \n\ttype\uff1awitnesses\u8868\u793a\u67e5\u8be2\u89c1\u8bc1\u4eba\uff0ccommittee\u8868\u793a\u67e5\u8be2\u7406\u4e8b\u4f1a \n \n### \u7528\u6237\u63d0\u4ea4\u6295\u7968\u4fe1\u606f \n\u65b9\u6cd5\uff1apublishVotes \n\u529f\u80fd\uff1a\u7528\u6237\u63d0\u4ea4\u6295\u7968\u4fe1\u606f \n\u53c2\u6570\uff1a \n\ttype\uff1a\u89c1\u8bc1\u4eba\u8d26\u6237id\u96c6\u5408\u6216\u7406\u4e8b\u4f1a\u8d26\u6237id\u96c6\u5408 \uff0c\u67e5\u8be2\u8282\u70b9\u6295\u7968\u4fe1\u606f\u6570\u636e\u4e2d\u4f1a\u6709\u6bcf\u4e2a\u89c1\u8bc1\u4eba\u548c\u7406\u4e8b\u4f1a\u6210\u5458\u7684\u8d26\u6237ID \n\tvote_ids:\u6295\u7968id\n\tvotes(Number):\u6295\u7968\u6570\u91cf \n \n## \u533a\u5757\u94fe\u6d4f\u89c8\u5668\u7c7b\u63a5\u53e3 \n \n### \u67e5\u8be2\u533a\u5757 \n\u65b9\u6cd5\uff1aqueryBlock \n\u529f\u80fd\uff1a\u901a\u8fc7\u533a\u5757\u9ad8\u5ea6\u67e5\u8be2\u533a\u5757\u4fe1\u606f \n\u53c2\u6570\uff1a \n\tblock\uff1a\u533a\u5757\u9ad8\u5ea6 \n \n### \u67e5\u8be2\u4ea4\u6613 \n\u65b9\u6cd5\uff1aqueryTransaction \n\u529f\u80fd\uff1a\u901a\u8fc7\u4ea4\u6613id\uff08\u5373\u4ea4\u6613hash\uff09\u67e5\u8be2\u4ea4\u6613\u4fe1\u606f \n\u53c2\u6570\uff1a \n\ttransactionId\uff1a\u4ea4\u6613id \n\n### \u67e5\u8be2\u4fe1\u606f\u901a\u8fc7id \n\u65b9\u6cd5\uff1aqueryDataByIds \n\u529f\u80fd\uff1a\u901a\u8fc7id\u67e5\u8be2\u76f8\u5173\u6570\u636e\u4fe1\u606f \n\u53c2\u6570\uff1a \n\tids(Array)\uff1aid\u6570\u7ec4\u96c6\u5408 \n\n### \u8ba2\u9605\u533a\u5757 \n\u65b9\u6cd5\uff1asubscribeToBlocks \n\u529f\u80fd\uff1a\u76d1\u542c\u5b9e\u65f6\u51fa\u5757\u4fe1\u606f \n\u53c2\u6570\uff1a \n\tisReqTrx:\u8ba2\u9605\u7684\u533a\u5757\u662f\u5426\u5305\u542b\u4ea4\u6613\u4fe1\u606f\uff0c\u9ed8\u8ba4\u5305\u542b\n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u8ba2\u9605\u533a\u5757\u94fe\u4ea4\u6613 \n\u65b9\u6cd5\uff1asubscribeToChainTranscation \n\u529f\u80fd\uff1a\u76d1\u542c\u533a\u5757\u94fe\u5168\u7f51\u53d1\u751f\u7684\u4ea4\u6613 \n\u53c2\u6570\uff1a \n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u67e5\u770b\u8282\u70b9\u51fa\u5757\u4fe1\u606f \n\u65b9\u6cd5\uff1alookupWitnessesForExplorer \n\u529f\u80fd\uff1a\u8fd9\u91cc\u91cd\u70b9\u662f\u53c2\u7167demo\u89e3\u6790\u8282\u70b9\u51fa\u5757\u4fe1\u606f\u6570\u636e \n\u53c2\u6570\uff1a \n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u67e5\u8be2\u53ef\u9886\u53d6\u7684\u89e3\u51bb\u8d44\u4ea7 \n\u65b9\u6cd5\uff1aqueryVestingBalance \n\u529f\u80fd\uff1a\u53c2\u7167demo\u89e3\u6790\u6570\u636e \n\u53c2\u6570\uff1a\n account:\u67e5\u8be2\u6307\u5b9a\u8d26\u6237\u7684\u53ef\u9886\u53d6\u7684\u89e3\u51bb\u8d44\u4ea7 \n\tcallback\uff1a\u56de\u8c03\u51fd\u6570 \n \n### \u9886\u53d6\u8282\u70b9\u51fa\u5757\u5956\u52b1 \n\u65b9\u6cd5\uff1aclaimVestingBalance \n\u529f\u80fd\uff1a\u9886\u53d6\u8282\u70b9\u51fa\u5757\u5956\u52b1 \n\u53c2\u6570\uff1a \n\tid\uff1a\u5956\u52b1id\uff0c\u67e5\u8be2\u8282\u70b9\u51fa\u5757\u5956\u52b1\u4e2d\u4f1a\u6709\u8fd9\u4e2aid \n \n## API\u670d\u52a1\u5668\u8282\u70b9\u76f8\u5173\u63a5\u53e3 \n \n### bcx\u521d\u59cb\u5316 \n\u65b9\u6cd5\uff1ainit \n\u529f\u80fd\uff1a\u521d\u59cb\u5316\u5185\u5bb9\u5305\u62ecRPC\u8fde\u63a5\u3001\u91cd\u65b0\u8f7d\u5165Indexedb\u6570\u636e\u7b49 \n\u53c2\u6570\uff1a \n\trefresh:\u9009\u586b\uff0c\u7b2c\u4e00\u6b21init\u540e\uff0c\u7b2c\u4e8c\u6b21init\u4f1a\u4f7f\u7528\u7f13\u5b58\u4fe1\u606f\u3002\u53ea\u6709\u5f53refresh\u4e3atrue\u624d\u4f1a\u91cd\u65b0\u8f7d\u5165\u6570\u636e\uff0c\u91cd\u65b0\u521d\u59cb\u5316RPC\u6a21\u5757 \n\tautoReconnect:\u9009\u586b\uff0cRPC\u65ad\u5f00\u540e\u662f\u5426\u8fdb\u884c\u91cd\u8fde \n\tsubscribeToRpcConnectionStatusCallback:\u9009\u586b\uff0c\u76d1\u542cRPC\u8fde\u63a5\u72b6\u6001,\u8fd4\u56de status=>closed\uff1arpc\u8fde\u63a5\u5173\u95ed,error\uff1arpc\u8fde\u63a5\u9519\u8bef\uff0crealopen\uff1arpc\u8fde\u63a5\u6210\u529f\u3002\u6b64\u76d1\u542c\u6709\u5355\u72ec\u7684\u65b9\u6cd5\u63d0\u4f9b \n\tcallback\uff1a\u9009\u586b\uff0c\u56de\u8c03\u51fd\u6570 \n\n### \u67e5\u770bAPI\u670d\u52a1\u5668\u8282\u70b9\u5217\u8868 \t\n\u65b9\u6cd5\uff1alookupWSNodeList \n\u529f\u80fd\uff1a\u67e5\u770bAPI\u670d\u52a1\u5668\u8282\u70b9\u5217\u8868\u4fe1\u606f \n\u53c2\u6570\uff1a \n\trefresh:\u662f\u5426\u5237\u65b0ping\uff0c\u6b64\u5237\u65b0\u53ea\u80fd\u5237\u65b0\u975e\u5f53\u524d\u8fde\u63a5\u8282\u70b9\uff0c\u82e5\u60f3\u5168\u5237\u65b0\u5219\u8c03\u7528init({refresh:true}) \n \n### \u8fde\u63a5API\u670d\u52a1\u5668\u8282\u70b9 \n\u65b9\u6cd5\uff1aswitchAPINode \n\u529f\u80fd\uff1a\u5207\u6362\u8282\u70b9 \n\u53c2\u6570\uff1a \n\turl\uff1aAPI\u670d\u52a1\u5668\u8282\u70b9\u5730\u5740\uff0c\u6b64\u5730\u5740\u5fc5\u987b\u662fAPI\u670d\u52a1\u5668\u8282\u70b9\u5217\u8868\u4e2d\u7684websoket\u5730\u5740 \n \n### \u6dfb\u52a0\u65b0\u7684API\u670d\u52a1\u5668\u8282\u70b9 \n\u65b9\u6cd5\uff1aaddAPINode \n\u529f\u80fd\uff1a\u6dfb\u52a0\u65b0\u8282\u70b9 \n\u53c2\u6570\uff1a \n\tname\uff1a\u65b0\u8282\u70b9\u540d\u79f0 \n\turl\uff1aAPI\u670d\u52a1\u5668\u8282\u70b9websoket\u5730\u5740 \n \n### \u5220\u9664API\u670d\u52a1\u5668\u8282\u70b9 \n\u65b9\u6cd5\uff1adeleteAPINode \n\u529f\u80fd\uff1a\u5220\u9664\u8282\u70b9 \n\u53c2\u6570\uff1a \n\turl\uff1aAPI\u670d\u52a1\u5668\u8282\u70b9websoket\u5730\u5740 \n \n### \u76d1\u542c\u4e0eAPI\u670d\u52a1\u5668\u8282\u70b9\u7684\u8fde\u63a5\u72b6\u6001\u53d8\u5316 \n\u65b9\u6cd5\uff1asubscribeToRpcConnectionStatus \n\u529f\u80fd\uff1a\u76d1\u542crpc\u8fde\u63a5\u72b6\u6001\u53d8\u5316 \n\u53c2\u6570\uff1a \n\tcallback\uff1a\u56de\u8c03\u4f1a\u8fd4\u56de\u72b6\u6001status\uff0c\u5305\u62ec\u4e0b\u8ff0\u7ed3\u679c: \n\tclosed\uff1arpc\u8fde\u63a5\u5173\u95ed \n\terror\uff1arpc\u8fde\u63a5\u9519\u8bef \n\trealopen\uff1arpc\u8fde\u63a5\u6210\u529f \n \n## \u5408\u7ea6 \n \n### \u4e00\u952e\u751f\u6210\u79c1\u94a5/\u516c\u94a5\uff08\u968f\u673a\u751f\u6210\uff09 \n\u65b9\u6cd5\uff1agenerateKeys \n\u529f\u80fd\uff1a\u968f\u673a\u751f\u6210\u4e00\u5bf9\u516c\u79c1\u94a5\uff0c\u521b\u5efa\u5e26\u6709\u6743\u9650\u7684\u5408\u7ea6\u4f1a\u7528\u5230\uff0c\u751f\u6210\u7684\u79c1\u94a5\u7528\u4e8eAPI\u521d\u59cb\u5316\u5bf9\u5408\u7ea6\u6388\u6743\uff0c\u6ca1\u6709\u56de\u8c03\uff0c\u76f4\u63a5\u8fd4\u56de \n \n### \u5408\u7ea6\u521b\u5efa \n\u65b9\u6cd5\uff1acreateContract \n\u529f\u80fd\uff1a\u521b\u5efa\u667a\u80fd\u5408\u7ea6\uff0c\u5982\u679c\u8981\u5bf9\u5408\u7ea6\u8bbe\u7f6e\u6743\u9650\uff0c\u521b\u5efa\u5408\u7ea6\u65f6\u5f97\u52a0\u5165\u7279\u5b9a\u7684\u5408\u7ea6\u6743\u9650\u76f8\u5173\u4ee3\u7801\uff0c\u5e76\u8c03\u7528\u5408\u7ea6\u51fd\u6570set_permissions_flag\uff0c\u5408\u7ea6\u6743\u9650\u76f8\u5173\u4ee3\u7801: \n```js\nfunction my_change_contract_authority(publickey) \n assert(chainhelper:is_owner()) \n chainhelper:change_contract_authority(publickey) \nend \n\nfunction set_permissions_flag(flag) \n assert(chainhelper:is_owner()) \n chainhelper:set_permissions_flag(flag) \nend\n```\n\u53c2\u6570\uff1a \n\tauthority\uff1a\u5408\u7ea6\u6743\u9650(\u4e00\u5bf9\u516c\u79c1\u94a5\u4e2d\u7684\u516c\u94a5publicKey)\uff0c\u5f00\u53d1\u8005\u5728\u4f7f\u7528API\u521d\u59cb\u5316\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u914d\u7f6e\u79c1\u94a5\uff0c\u914d\u7f6e\u4e86\u8be5\u516c\u94a5\u5bf9\u5e94\u7684\u79c1\u94a5\u624d\u53ef\u4ee5\u8c03\u7528\u5408\u7ea6\u3002 \n\tname\uff1a\u5408\u7ea6\u540d\u79f0\uff0c\u6b63\u5219/^[a-z][a-z0-9\\.-]{4,63}$/\uff0c\u9996\u5b57\u6bcd\u5f00\u5934+\u5b57\u6bcd\u6216\u6570\u5b57\u6216\u70b9.\u6216\u77ed\u6a2a\u7ebf-\uff0c\u957f\u5ea64\u81f363\n\tdata\uff1a\u5408\u7ea6lua\u4ee3\u7801 \n \n### \u5408\u7ea6\u66f4\u65b0 \n\u65b9\u6cd5\uff1aupdateContract \n\u529f\u80fd\uff1a\u66f4\u65b0\u5408\u7ea6\u4ee3\u7801 \n\u53c2\u6570\uff1a \n\tnameOrId\uff1a\u5408\u7ea6\u540d\u79f0\u6216Id\uff0c\u793a\u4f8b\uff1acontract.test02 \n\tdata\uff1a\u5408\u7ea6lua\u4ee3\u7801 \n \n### \u5408\u7ea6\u8c03\u7528 \n\u65b9\u6cd5\uff1acallContractFunction \n\u529f\u80fd\uff1a\u8c03\u7528\u5408\u7ea6\u51fd\u6570\u63a5\u53e3 \n\u53c2\u6570\uff1a \n\tnameOrId\uff1a\u5408\u7ea6\u540d\u79f0\u6216Id\uff0c\u793a\u4f8b\uff1acontract.test02 \n\tfunctionName\uff1a\u5408\u7ea6\u91cc\u7684\u51fd\u6570\u540d\u79f0\uff0cmy_nht_describe_change \uff08\u4fee\u6539\u9053\u5177\u5c5e\u6027\uff09 \n\tvalueList(array)\uff1a \u8c03\u7528\u5408\u7ea6\u51fd\u6570\u7684\u53c2\u6570\u5217\u8868\uff0c\u793a\u4f8b\uff1a[4.2.0,{\"size\":\"large\"}] \uff0c\u8fd9\u91cc\u7684\u53c2\u6570\u82e5\u4f20json\u5b57\u7b26\u4e32\uff0c\u5219\u5408\u7ea6\u9700\u8c03\u7528cjson\u89e3\u6790\uff0c\u82e5\u4f20\u5bf9\u8c61\u5219\u65e0\u9700cjson\u89e3\u6790 \n \n### \u67e5\u8be2\u5408\u7ea6\u4fe1\u606f \n\u65b9\u6cd5\uff1aqueryContract \n\u529f\u80fd\uff1a\u67e5\u8be2\u5408\u7ea6\u4fe1\u606f\u6570\u636e \n\u53c2\u6570\uff1a \n\tnameOrId\uff1a\u5408\u7ea6\u540d\u5b57\u6216Id \n \n### \u67e5\u8be2\u8d26\u6237\u5408\u7ea6\u6570\u636e \n\u65b9\u6cd5\uff1aqueryAccountContractData \n\u529f\u80fd\uff1a\u67e5\u8be2\u8d26\u6237\u5408\u7ea6\u91cc\u4ea7\u751f\u6570\u636e \n\u53c2\u6570\uff1a \n\taccount\uff1a\u8d26\u6237\u540d\u6216Id \n\tcontractNameOrId\uff1a\u5408\u7ea6\u540d\u5b57\u6216Id \n\n\n## \u4ea4\u6613\u5e02\u573a \n \n### \u4ee3\u5e01\u8d44\u4ea7\u201c\u9650\u4ef7\u5355\u201d\u4ea4\u6613 \n\u65b9\u6cd5\uff1acreateLimitOrder \n\u529f\u80fd\uff1a\u4ee3\u5e01\u8d44\u4ea7\u201c\u9650\u4ef7\u5355\u201d\u4ea4\u6613 \n\u53c2\u6570\uff1a \n\ttransactionPair:\u4ea4\u6613\u5bf9,\u793a\u4f8b\"TEST_USDT\",(TEST_USDT\u4e3a\u4e70\u5356USDT\u4ea4\u6613\u5e02\u573a\u7684TEST) \n\ttype(number)\uff1a\u4ea4\u6613\u7c7b\u578btype(0:\u5356\u5355\uff0c1:\u4e70\u5355) \n\tprice:\u4ef7\u683cprice(\u5355\u4f4d\u4e3a\u4ea4\u6613\u5e02\u573a\u9876\u7ea7\u8d44\u4ea7,\u5982USDT\u5e02\u573a\uff0c\u5355\u4f4d\u4e3aUSDT) \n\tamount\uff1a\u6570\u91cf(\u5355\u4f4d\u5982\u4e8c\u7ea7\u8d44\u4ea7TEST)\n\n### \u53d6\u6d88\u201c\u9650\u4ef7\u5355\u201d\u59d4\u6258\u8ba2\u5355\n\u65b9\u6cd5\uff1acancelLimitOrder \n\u529f\u80fd\uff1a\u53d6\u6d88\u201c\u9650\u4ef7\u5355\u201d\u59d4\u6258\u8ba2\u5355 \n\u53c2\u6570\uff1a \n\torderId:\u8ba2\u5355id \n\n### \u67e5\u8be2&\u8ba2\u9605\u5e02\u573a\u4ea4\u6613\u5bf9\u76f8\u5173\u6570\u636e \n\u65b9\u6cd5\uff1aqueryTransactionPair \n\u529f\u80fd\uff1a\u8fd4\u56de\u7684\u6570\u636e\u6709orders(\u5f53\u524d\u4e70\u5356\u76d8\u8ba2\u5355),my_orders(\u5f53\u524d\u8d26\u6237\u7684\u59d4\u6258\u8ba2\u5355),last_trade_history(\u8fd1\u671f\u8be5\u4ea4\u6613\u5bf9\u7684\u4ea4\u6613\u8bb0\u5f55),my_last_trade_history(\u5f53\u524d\u8d26\u6237\u8be5\u4ea4\u6613\u5bf9\u7684\u4ea4\u6613\u8bb0\u5f55) \n\u53c2\u6570\uff1a \n\ttransactionPair\uff1a\u4ea4\u6613\u5bf9,\u793a\u4f8b\"TEST_USDT\",(TEST_USDT\u4e3a\u4e70\u5356USDT\u4ea4\u6613\u5e02\u573a\u7684TEST) \n\tsubscribe(boolean)\uff1a\u662f\u5426\u5f00\u542f\u8ba2\u9605\n\thasMyTradeHistory\uff1a\u662f\u5426\u5305\u542b\u6211\u7684\u4ea4\u6613\u5386\u53f2 \n \n### \u67e5\u8be2&\u8ba2\u9605\u4ea4\u6613\u5e02\u573a\u884c\u60c5 \n\u65b9\u6cd5\uff1aqueryMarketStats \n\u529f\u80fd\uff1a\u67e5\u8be2&\u8ba2\u9605\u4ea4\u6613\u5e02\u573a\u884c\u60c5 \n\u53c2\u6570\uff1a \n\tbaseAsset:\u4ea4\u6613\u5e02\u573a\u8d44\u4ea7symbol \n\tquoteAssets(Array)\uff1a\u76f8\u5173\u4ea4\u6613\u5bf9\u7684\u5e01\u79cd,\u5982[COCOS,TEST] \n\tsubscribe(boolean):\u662f\u5426\u5f00\u542f\u8ba2\u9605 \n\tassetCache(boolean):\u662f\u5426\u7f13\u5b58\u8d44\u4ea7\u4fe1\u606f,\u82e5\u7f13\u5b58\uff0c\u5219\u624b\u7eed\u8d39\u6c47\u7387\u66f4\u65b0\u4e0d\u4f1a\u5f71\u54cd\u4ef7\u683c\n\n### \u67e5\u8be2\u4ea4\u6613\u5bf9K\u7ebf\u6570\u636e \n\u65b9\u6cd5\uff1aqueryPriceHistory \n\u529f\u80fd\uff1a\u67e5\u8be2\u4ea4\u6613\u5bf9K\u7ebf\u6570\u636e \n\u53c2\u6570\uff1a \n\ttrxSymbol:\u4ea4\u6613\u5bf9trx_symbol(TEST_USDT\u4e3a\u4e70\u5356USDT\u4ea4\u6613\u5e02\u573a\u7684TEST) \n\tstep(number)\uff1a\u5468\u671f(\u5355\u4f4d\u79d2) \n\tpage(number):\u7b2c\u51e0\u9875\n\tpageSize(number):\u8fd4\u56de\u6570\u636e\u6761\u6570\n\n### \u8d44\u4ea7\u5582\u4ef7\u63d0\u4f9b\u8005\u66f4\u65b0 \n\u65b9\u6cd5\uff1aassetUpdateFeedProducers \n\u529f\u80fd\uff1a\u8d44\u4ea7\u5582\u4ef7\u63d0\u4f9b\u8005\u66f4\u65b0 \n\u53c2\u6570\uff1a \n\tassetId:\u8d44\u4ea7id \n\tnewFeedProducers(Array)\uff1a\u5582\u4ef7\u8d26\u6237\u6570\u7ec4 \n\n### \u8d44\u4ea7\u5582\u4ef7 \n\u65b9\u6cd5\uff1aassetPublishFeed \n\u529f\u80fd\uff1a\u8d44\u4ea7\u5582\u4ef7 \n\u53c2\u6570\uff1a \n\tassetId:\u8d44\u4ea7id \n\tprice(Number)\uff1a\u4ef7\u683c\n\tmaintenanceCollateralRatio(Number):\u7ef4\u6301\u62b5\u62bc\u7387 \n\tmaximumShortSqueezeRatio(Number):\u5f3a\u5236\u5e73\u4ed3\u6bd4\u4f8b\u4e0a\u9650 \n\tcoreExchangeRate:{ //\u624b\u7eed\u8d39\u6c47\u7387\n\t\tquoteAmount(Number)://\u57fa\u51c6\u8d44\u4ea7\u6570\u91cf\n\t\tbaseAmount(Number)://\u6807\u4ef7\u8d44\u4ea7\u6570\u91cf(COCOS)\n\t}\n\n### \u62b5\u62bc\u503a\u4ed3 \n\u65b9\u6cd5\uff1acallOrderUpdate \n\u529f\u80fd\uff1a\u62b5\u62bc\u8d44\u4ea7\u501f\u5165\u951a\u5b9a\u8d44\u4ea7\uff0c\u5982\u679c\u7ed3\u7b97\u4ef7\u683c\u6ca1\u6709\u88ab\u6e05\u7a7a,\u5219\u4e0d\u80fd\u8fdb\u884c\u501f\u8d37\uff0c\u8981\u60f3\u6e05\u7a7a\u7ed3\u7b97\u4ef7\u683c\uff0c\u9700\u8981\u53d1\u5e03\u7ed3\u7b97\u4ef7\u683c\u4f4e\"\u7ef4\u6301\u62b5\u62bc\u7387\"\u500d\u6570\u7684\u4ef7\u683c\n\u53c2\u6570\uff1a \n\t collateralAmount:\u503a\u52a1\u91d1\u989d(\u501f\u5165\u91d1\u989d) \n\t collateralAssetId:\u503a\u52a1\u8d44\u4ea7id \n\t debtAmount:\u62b5\u62bc\u8d44\u4ea7\u91d1\u989d \n\t debtAssetId:\u62b5\u62bc\u8d44\u4ea7id\n\n\n### \u67e5\u8be2\u503a\u4ed3 \n\u65b9\u6cd5\uff1aqueryDebt \n\u529f\u80fd\uff1a\u67e5\u8be2\u503a\u4ed3 \n\u53c2\u6570\uff1a \n\t account:\u67e5\u8be2\u8d26\u6237 \n\t debtAssetId:\u503a\u52a1\u8d44\u4ea7id \n\t collateralAssetId:\u62b5\u62bc\u8d44\u4ea7id\n\n### \u4e2a\u4eba\u8d44\u4ea7\u6e05\u7b97 \n\u65b9\u6cd5\uff1aassetSettle \n\u529f\u80fd\uff1a\u4e2a\u4eba\u8d44\u4ea7\u6e05\u7b97 \n\u53c2\u6570\uff1a \n\t assetId:\u6e05\u7b97\u8d44\u4ea7\u7b26\u53f7 \n amount:\u6e05\u7b97\u8d44\u4ea7\u91d1\u989d \n\n### \u5168\u5c40\u8d44\u4ea7\u6e05\u7b97 \n\u65b9\u6cd5\uff1aassetGlobalSettle \n\u529f\u80fd\uff1a\u5168\u5c40\u6e05\u7b97\u6839\u636e\u5f53\u524d\u63d0\u4f9b\u7684\u4ef7\u683c\u7acb\u5373\u6e05\u7b97\uff0c\u4e2a\u4eba\u6e05\u7b97\u662f\u4ee5\u8d44\u4ea7\u8bbe\u5b9a\u7684\u5ef6\u8fdf\u6e05\u7b97\u65f6\u95f4\u5230\u6765\u65f6\u7684\u5582\u4ef7\u4ef7\u683c\u6267\u884c\u6e05\u7b97 \n\u53c2\u6570\uff1a \n\t assetId:\u6e05\u7b97\u8d44\u4ea7\u7b26\u53f7 \n price:\u6e05\u7b97\u8d44\u4ea7\u4ef7\u683c \n\n\n## \u5176\u4ed6 \n\n### API\u53c2\u6570\u914d\u7f6e \n\u65b9\u6cd5\uff1aapiConfig \n\u529f\u80fd\uff1aAPI\u53c2\u6570\u914d\u7f6e \n\u53c2\u6570\uff1a \nAPI\u521d\u59cb\u5316\u76f8\u5173\u53c2\u6570\n\n### \u53d6\u6d88\u8ba2\u9605 \n\u65b9\u6cd5\uff1aunsubscribe \n\u529f\u80fd\uff1a\u53d6\u6d88\u8ba2\u9605 \n\u53c2\u6570\uff1a \nmethod(Array)\uff1a\u53d6\u6d88\u6307\u5b9a\u8ba2\u9605\u7684\u65b9\u6cd5\u540d\uff0c\u5982\u53d6\u6d88\u8ba2\u9605\u533a\u5757\u548c\u533a\u5757\u94fe\u4ea4\u6613['subscribeToBlocks','subscribeToBlocks']\uff0c\u4e0d\u4f20\u8be5\u53c2\u6570\u5219\u53d6\u6d88\u6240\u6709\u8ba2\u9605\u3002\u8be5\u65b9\u6cd5\u4e0d\u4f20callback\u5219\u8fd4\u56depromise\u3002 \n\u6ce8\uff1a\u82e5\u9700\u6307\u5b9a\u53d6\u6d88\u67d0\u4e00\u7528\u6237\u7684\u8ba2\u9605,\u5219\u53c2\u6570\u4e3a['subscribeToAccountOperation|account'] \ncallback\uff1a\u56de\u8c03\u51fd\u6570 \n\n### \u4ea4\u6613\u5907\u6ce8\u89e3\u5bc6 \n\u65b9\u6cd5\uff1adecodeMemo \n\u529f\u80fd\uff1a\u65e0\u56de\u8c03\uff0c\u76f4\u63a5\u8fd4\u56de\u7ed3\u679c\uff0c\u7ed3\u679c\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u5bf9\u8c61\u4e2d\u5305\u542b\u5907\u6ce8\u6587\u672ctext\u3002\u8be5\u65b9\u6cd5\u4f20\u53c2\u662f\u76f4\u63a5\u4f20\u5165\uff0c\u975e\u5305\u88f9\u5f0foptions\u5bf9\u8c61\u4f20\u53c2\u3002 \u793a\u4f8b\uff1abcl.decodeMemo(raw_data.memo) ,\u5176\u4e2draw_data\u4e3a\u4ea4\u6613\u539f\u59cb\u6570\u636e\u3002\n\n### \u83b7\u53d6\u4ea4\u6613\u7c7b\u578b\u57fa\u7840\u624b\u7eed\u8d39 \n\u65b9\u6cd5\uff1aqueryTransactionBaseFee \n\u529f\u80fd\uff1a\t\u83b7\u53d6\u4ea4\u6613\u7c7b\u578b\u57fa\u7840\u624b\u7eed\u8d39 \n\u53c2\u6570\uff1a \ntransactionType\uff1a\u4ea4\u6613\u7c7b\u578b\uff0c\u793a\u4f8btransfer \nfeeAssetId\uff1a\u9009\u62e9\u652f\u4ed8\u624b\u7eed\u8d39\u7684\u4ee3\u5e01\u7c7b\u578b\u8d44\u4ea7\u7b26\u53f7\u6216ID \n\n### transactionType\u5217\u8868 \n \n| transactionType | \u5bf9\u5e94\u76f8\u5173API | \n|---|---| \n| transfer | transferAsset | \n| account_create | createAccountWithPassword | \n| account_update | changePassword | \n| account_upgrade | upgradeAccount | \n| asset_create | createAsset | \n| asset_issue | issueAsset | \n| proposal_update | submitProposal | \n| vesting_balance_withdraw | claimVestingBalance | \n| contract_create | createContract | \n| call_contract_function | callContractFunction | \n| register_creator | registerCreator | \n| creat_world_view | creatWorldView | \n| propose_relate_world_view | proposeRelateWorldView | \n| creat_nh_asset | creatNHAsset | \n| delete_nh_asset | delete_nh_asset | \n| transfer_nh_asset | transferNHAsset | \n| creat_nh_asset_order | creatNHAssetOrder | \n| cancel_nh_asset_order | cancelNHAssetOrder | \n| fill_nh_asset_order | fillNHAssetOrder | \n| limit_order_create | createLimitOrder | \n| limit_order_cancel | cancelLimitOrder | ", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "ncase/nothing-to-hide", "link": "https://github.com/ncase/nothing-to-hide", "tags": [], "stars": 765, "description": "All the newest work on Nothing To Hide goes here. It's not clean, it's not organized, but it's *everything*.", "lang": "JavaScript", "repo_lang": "", "readme": "![](https://pbs.twimg.com/media/CHzbQfKUcAA22C2.png:large)\n\n**UPDATE (June 18th, 2015)**\n\nBittersweet news. After two long years, I've finally put down Nothing To Hide.\nNTH may be over, but parts of it *will* be re-used and re-born in my future projects!\n[Here's a long post-mortem](http://eepurl.com/bqvfdb) explaining why, and what's next.\n\n---\n\n# Nothing To Hide has nothing to hide.\n\nAll the newest art and code from Nothing To Hide gets pushed into this public repo.\nIt's not clean, it's not organized, but it's *everything*.\nUnless stated otherwise, everything in this repository is dedicated to the public domain through the\n[Creative Commons Zero](http://creativecommons.org/publicdomain/zero/1.0/) license.\nYup, *zero* rights reserved.\n\n![](http://i.imgur.com/zRonTm3.png)\n\n### What's all this about, then?\n\nNothing To Hide is an \"anti-stealth\" game where you are forced to help in your own surveillance.\nThe puzzles are challenging but fair, with depth in a deceptively simple mechanic, similar to games such as Braid and Portal.\nIt's a story of a teenage girl riddled with insecurity in a world obsessed with security.\nShe's never had a private thought. If you can't hide who you are... you have to hide who you *really* are. \n\n### Links\n\n* [The Browser Demo (HTML5)](http://demo.nothingtohide.cc/)\n* [Website / Crowdfunding Campaign](http://back.nothingtohide.cc/)\n* [Nothing To Say Newsletter](http://tinyletter.com/nothingtohide/letters)\n\n### Credits\n\n* [NCASE](http://www.ncase.me): Animation, Code, Design\n* [HalcyonicFalconX](https://www.facebook.com/HalcyonicFalconX): Music\n* Code libraries:\n[Visibility-Polygon](https://code.google.com/p/visibility-polygon-js/),\n[SoundJS](http://createjs.com/#!/SoundJS),\n[Q](http://documentup.com/kriskowal/q/)\n* Sound effects from Freesound.org [(full credits list)](https://gist.github.com/ncase/8936191)\n", "readme_type": "markdown", "hn_comments": "A noble effort and looks like a decent game. As-of-yet though, I think \"Papers, Please\" is possibly the best take on a dystopian game. The oppression in that game isn't just some puzzle mechanic but the whole monotonous process and being a cog in a gigantic bureaucratic machine. Could something similar be made for surveillance?http://papersplea.se/http://www.youtube.com/watch?v=_QP5X6fcukMHoly crap.I just finished the demo.The mechanics feel like a Legend of Zelda puzzler level.The ambiance and storyline are a mix between Orwell and a new Snowden file.And it's open source. And crowdfunded. I'm in.The devs are also running a crowdfunding campaign for this, \\nwith 10% of the donations going to the EFF, Demand Progress, Mozilla, etc:\\nhttps://back.nothingtohide.cchttp://tvtropes.org/pmwiki/pmwiki.php/Main/Anviliciousclever puzzles though!Fans of shady government games should check out Floor 13, an early 90s game where you are in charge of a secret British agency charged with keeping the Prime Minister popular by any means necssary. I vaguely remember manipulating the press and torture being some of the options. Sadly, I was never able to play the game very much. My friends and I all had Macs, and were never able to get our Windows emulator to run it very long without crashing. And at some point afterwards, when we had access to PCs, we were defeated by its copy-protection scheme (despite having a legitimate copy!) and by then many more games were much more compelling.Even if we'd been able to play it, though, it's not clear we'd have gotten much more out of it than we'd gotten by reading 1984, Fahrenheit 451, and being at the mercy of the administration of an American public high school.As for this game, it seemed much more compelling in the intro screen, which resembled some sort of Twitter / Facebook wall and had some cool effects while scrolling. When the actual game started it seemed like a puzzle game combined with a paranoia game, which is great for those who are already convinced by the world the game depicts but not convincing otherwise. It might be a tougher game mechanic to figure out, but it might be more compelling if the UI were Facebook, Gmail, and Twitter clones, and the game was such that the player attempted to sift through volumes of intercepted correspondence and communication metadata, fingering bad guys, political opponents, and hapless citizens, and, with limited resources, decided who to investigate/hassle. The game could have real terrorists that need to be detected, rewarding real detections and penalizing false positives, or have super-cynic Floor 13 mode, where the player used the surveillance system to their own personal gain. Or, turn the system described in https://news.ycombinator.com/item?id=6882378 into a game (I posted then and still believe that the concerns there were, while possible, vague and improbable, but possibly a game could convince me and others otherwise).The game already exists, titled Hacker News:https://news.ycombinator.com/newestE.g., A play in today's game:https://news.ycombinator.com/item?id=7328214....................puppetmaster3 1 hour ago | link<\\nUsing Baysian type on data is very damaging on society, for those with strong maths:We'll move from causality( we noticed you are stocking up on baking powder, lets chat) to inference (according to our data there is 85% chance you are not compliant - w/o a cause).>Stardust\u2019s It Is Safe Law:1> IIS1: To be unknown and invisible is to be safe.2> IIS2: The Freedom Law: We enjoy the freedom of the press, \\nthe freedom of speech, \\nand the FREEDOM to use neither \\nin our Total Information Awareness \\ndigital surveillence state.3> IIS3: \"Oops! I did we again!%$%^$!\" Law:https://news.ycombinator.com/threads?id=puppetmaster3Hacker Newsnew | threads | comments | ask | jobs | submit | puppetmaster3's submissionsNot just a compelling political statement, actually a pretty clever puzzler. Reminds me a little of Portal.Really love the game. The puzzle mechanics are interesting, and I picked up the logics fairly intuitively. The ambiance and art sells it. The intro is cleverly set up, but the story about the father politician is a bit confusing.25$ via btc on coinbase. no brainer. should be required gaming for all public school kids.Backed. Sharp and satirical idea for a game. Reminds me of Papers Please and Closure.$20000 out of $40000 and 8 days left... hopefully he'll manage to raise it all. I played it soon after the demo was released and it got me super excited. Feels like Portal - when in some vlog entry the author admited to be a big fan of Portal series I wasn't surprised ;)I was liking the art style quite a bit already, but when the \"conveyor belt\" mechanics started - which kicked the challenge up (a good thing) - I was sold. This game has some surprisingly well-executed ideas in it!Anyone notice how prominently the game satirizes Twitter? What's up with that?Great job, and hopefully we'll get to see the rest of it.Play now online: http://demo.nothingtohide.cc/I really enjoyed playing the demo just now. Great atmosphere, incredible music, and clever game mechanics. I definitely felt something for the characters in the game, and I really enjoyed the story and cutscenes. I can't wait to see what a full version of the game looks like. Backed.", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "kyledrake/coinpunk", "link": "https://github.com/kyledrake/coinpunk", "tags": [], "stars": 765, "description": "Open source, self-hosted DIY Bitcoin wallet service", "lang": "JavaScript", "repo_lang": "", "readme": "## NOTICE: End of work notice\n\nDue to lack of time, support, and resources, the Coinpunk project is currently not under active development. See [the announcement](http://coinpunkblog.neocities.org).\n\nInstead of using this code, I suggest building a new wallet based on our work improving the excellent new version of [BitcoinJS](https://github.com/bitcoinjs/bitcoinjs-lib). Coinpunk was a product of it's time, and since then many improvements to the Bitcoin code ecosystem have happened.\n\n# ![Coinpunk](http://i.imgur.com/m1diPkP.png)\n\nRun your own Bitcoin wallet service.\n\nCoinpunk is a web application that allows anyone to run their own self-hosted Bitcoin wallet service that is accessible from your web browser anywhere in the world. It's free, open source, and you can install it on your server right now.\n\n## Who uses Coinpunk\n\nCoinpunk is aimed at developers, power users, and sysadmins interested in running their own web-based Bitcoin wallet.\n\nCoinpunk is also used to power [coinpunk.com](https://coinpunk.com), the first fully open source web-based wallet service.\n\n## Highlights\n\nThe latest version is a major rewrite that uses hybrid-wallets: encryption is done in the browser via a client-side application, which can be run separately from the server. This makes it much harder for hackers to steal Bitcoins by breaking into servers.\n\n**Coinpunk is in beta. It is set to testnet by default, and it is recommended that only developers and testers only use it at this time (especially in production).**\n\n* Fast, lightweight, efficient\n* Responsive design - works well on mobile devices\n* Easily create new accounts\n* Send and receive bitcoins\n* Detailed reports on transactions\n* Ability to create and name new receive addresses (\"Website Donations\", \"Bake Sale\", etc)\n* Built with Node.js and HTML5\n* Standards compliant, easy to upgrade - Uses bitcoind via the JSON RPC\n\n## Get Started\n\nSee the [Install Guide](docs/INSTALL.md), \nor the [OSX Install Guide](docs/INSTALL-OSX.md).\n\n## Coinpunk is for Advanced Users\n\nIf you've never worked on your own server before, and don't know how to do things like backup your database, I strongly recommend using a desktop client or hosted wallet provider like [coinpunk.com](https://coinpunk.com) instead. Coinpunk tries to be simple as possible, but like Gitlab, it does require a lot of knowledge to be run properly.\n\n## Author\n\n[Kyle Drake](http://kyledrake.net). Illustration by Kyle Wilson.\n\n## Contributors\n\n[Click here](https://github.com/kyledrake/coinpunk/graphs/contributors) to see the contributor list.\n\n## How You Can Help\n\n### Donations\n\nDonations help me to keep working on Coinpunk and keep it free and open source, without having to worry about income. Any amount is really helpful! Thank you so much.\n\nThe Coinpunk donation Bitcoin address is **1MHbxLgsgFQyvWkW1qiZs1HaXxU4S4LuWH**\n\nAlso if you are planning on running Coinpunk on a VPS, you can [use this link to sign up for DigitalOcean](https://www.digitalocean.com/?refcode=4be99ecc05b4) and it gives us a referral bonus we can use to pay for the servers.\n\nAgain, thank you. :heart:\n\n### Contributing\n\nHelp us build! We're in beta right now [and seeking help to find bugs](http://coinpunk.org/beta.html). If you are interested in contributing, jump in! Anyone is welcome to send pull requests. Issue reports are good too, but pull requests are much better. Here's how you do it:\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Write the code, **and tests to confirm it works**\n4. Commit your changes (`git commit -am 'Add some feature'`)\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create new Pull Request\n\n### Coinpunk H4XX0RZ Bounty\n\nSee [docs/H4XX0RZ.md](docs/H4XX0RZ.md).\n", "readme_type": "markdown", "hn_comments": "> Blockchain being pulled from the app store proves what we've been saying all along: Apple isn't banning Bitcoin apps because of \"legal grounds\" (nobody is talking about making Bitcoin illegal), they're banning Bitcoin apps to anti-competitively prop up their own payments service.What payment service? Apple runs no payment service, nor has announced that they intend to in the future. There can't be \"anti-competitor\" action if they don't even have a competing product to begin with.I don't understand how the challenge to Apple is supposed to work.Isn't this equivalent to, say, Wal-Mart deciding not to stock your widgets anymore because they're going to manufacture a competing widget? It sucks, sure, but it also seems like it's within their rights to do so.Is Apple in the clear or are they running afoul of the law somewhere?Wouldn't a better way to make a point be to simply stop buying Apple products?> they're banning Bitcoin apps to anti-competitively prop up their own payments serviceI found it very hard to continue reading after this, because Apple doesn't have a payments service. Not that they really had anything other to say beyond this laughable claim.Other wallet apps have been much more measured in their response to being removed from the store. Take the Coinjar folks response to Apple removing their app:\"Before you start DDOSing and trolling, Apple have done nothing wrong in this situation, they are just managing their own legal liability. We have had amicable discussions with them and hope they will support us in the future, when they have a more clear view of Bitcoin's place in their regulatory landscape.\"\\nhttps://blog.coinjar.com/2014/01/09/coinjar-wallet-to-be-rem...A petition will be ineffective, especially against Apple. The best way to show Apple it's a problem is by no longer being a customer & switching to another device. (I'm a long time Apple fan/user, but I now use a Nexus 5 partly to have more control over the apps I can install / use.)Until they post their actual emails from Apple, I'm taking this with a massive grain of salt.I'm a big Apple fan and I am disappointed in them. That they would be afraid of the legal consequences of Bitcoin apps is hogwash since they've fought tougher legal battles in the past (They even once pledged to protect developers against a patent troll too.). They are stifling a segment of innovation in the app marketplace. For shame Apple.It was my understanding that the App Store version of blochchain.app was missing all wallet functionality and was just a read only transaction tracker. I've run the blockchain.info wallet app from Cydia for over a year and still using it today. Jailbreak while you still can.That's a pure web-based QR code scanning Bitcoin wallet. Very impressive.awesome!Kyle, you're kind of a badass. This could be an important project for Bitcoin usability. I'll be sending you some satoshis in the next few days for a bounty to hand out.I find Bitcoin cool. I love open source and I love web services. That having been said, I will very happily use an offline client for my Bitcoin needs. Not one that connects to the Internet and not one that primarily or even secondarily works via it.(Yes, I'm more paranoid than most, I do keep them on an \"offline\" jump drive and sign transactions offline. But at the very least, I'd use Bitcoin-Qt, or Armory with encryption. I'll give this a closer look but it gives me the heebie-jeebies, maybe I'm wrong for feeling that.)It certainly looks nice and usable, though!This is the last thing we need in the Bitcoin world... online wallet services run by people not even smart enough to roll their own.Kudos to you and spending time on this project, it looks pretty slick, but it's a horrible thing for Bitcoin in general.If the only thing it manages to accomplish is accelerate the rejection of online wallet services then I suppose it's a good thing.Is this storing the private keys on the server ?>Help me buy cheap beer and fixed gear bikesI think the name you were looking for is \"Coin Hipster\"Sweet, exactly what I was looking for.Can somebody please describe the most basic use case for this server?I wonder how many people from hn will be at the Bitcoin 2013 conference this weekend. The Thursday meetup thing was pretty cool, standing in the conference reg line right now.", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "opensupports/opensupports", "link": "https://github.com/opensupports/opensupports", "tags": ["api", "javascript", "mysql", "php", "saas", "support", "ticketing-system", "webapp", "customer-care", "customer-support", "helpdesk", "opensupports", "ticketing"], "stars": 767, "description": "OpenSupports is a simple and beautiful open source ticket system", "lang": "JavaScript", "repo_lang": "", "readme": "
\n\n![OpenSupports](https://user-images.githubusercontent.com/25920622/172173126-f0a07319-0cc2-409b-aa22-120187fa4541.png)\n\nOpenSupports is a simple and beautiful open source ticket system.
\nLearn more \u00bb\n
\n

\n Website \u2022\n Docs \u2022\n Demo \u2022\n Official Subscription\n

\n\n
\n\n## \ud83c\udf31 About the Project\n\n### What Customers See\n\n![2022-06-08_10-32_demo](https://user-images.githubusercontent.com/25920622/172630004-988c914b-918e-455c-be48-11f96a00611e.gif)\n\n### What Staff Members See\n\n![2022-06-08_10-32_demo_staff](https://user-images.githubusercontent.com/25920622/172867706-3669c7db-ef86-48df-92a9-8c2bfb19f622.gif)\n\n## \ud83d\ude4c\ud83c\udffc Ticket System for Absolutely Everyone\n\nOpenSupports is a simple and beautiful open source ticket system.\n\nIt is a web application that provides you with a better management of your users\u2019 queries. They send you tickets through OpenSupports and you can handle them appropriately.\n\nSelf-hosted, or [hosted by us](https://www.opensupports.com/pricing/), API-driven, and ready to be deployed on your own domain.\n\n## \ud83e\uddd0 Stay Up-to-Date\n\nOpenSupports is growing and steadily incorporating new features. You might want to **add a star to the project** (or watch updates) to be notified about new releases.\n\n## \ud83d\udcaa\ud83c\udffc Features\n\nCheck out our [most important features](https://opensupports.com/features) at our website.\n\nAre we missing something? [Suggest an improvement](https://github.com/opensupports/opensupports/issues/new)!\n\n## \ud83d\udee0 Install\n\nOpenSupports can be hosted on your own servers, or [hosted by us](https://www.opensupports.com/pricing/).\n\nThere are multiple benefits to having the system hosted by its creators, including official support into any problem you might encounter.\n\nBut in the case you prefer your development team to deal with the installation, maintenance (upgrades, backups, etc.), and integrations, we charge you nothing for it, OpenSupports is **free and open-source**!\n\nCheck out our [installation guide](https://docs.opensupports.com/guides/installation/).\n\n## \ud83d\udc68\ud83c\udffc\u200d\ud83d\udcbb Development\n\nAre you a programmer? You can help us to fix bugs and build OpenSupports' features!\n\nCheck out our [development guide](./DEVELOPMENT.md) to get your development environment up and running.\n\nAnd even if you are not a programmer, you can help us by [reporting problems or suggesting improvements](https://github.com/opensupports/opensupports/issues/new), we love feedback and learn a lot from it!\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "gauntface/simple-push-demo", "link": "https://github.com/gauntface/simple-push-demo", "tags": [], "stars": 765, "description": "A simple example of use push notifications on the web using Service Workers", "lang": "JavaScript", "repo_lang": "", "readme": "![Simple Push Demo title card with a paper airplane](./default-social.png)\n\n# Simple Push Demo\n\nThe goal of this repo is to demonstrate how to implement push\nnotifications into your web app.\n\n## Relevant Docs Information\n\n- [Server Side Libraries to Help Send Push Messages ](https://github.com/web-push-libs/)\n- [Blog Post on Encrypting Payload Data](https://developers.google.com/web/updates/2016/03/web-push-encryption)\n- [Blog Post on VAPID](https://developers.google.com/web/updates/2016/07/web-push-interop-wins)\n- [Web Push Book](https://web-push-book.gauntface.com)\n\n## Demo\n\nVisit [the demo here](https://simple-push-demo.vercel.app/).\n\n## Development\n\nYou can develop this project locally by running the following:\n\n```shell\nnpm run install\nnpm run dev\n```\n\n## Testing\n\nTests can be run with `npm run test` which will run tests using puppeteer.\n\nIf you want to view and run the browser tests in your own browser, which\nis useful for debugging, start a server in the root of this project and\nnavigate to the `/test/browser-tests/index.html` page.\n\n## Hosting\n\nThis project is hosted on vercel and can be tested locally using the vercel\nCLI by running:\n\n```shell\nnpm run vercel\n```\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "yinjihuan/monkey-api-encrypt", "link": "https://github.com/yinjihuan/monkey-api-encrypt", "tags": ["spring-boot", "aes", "zuul", "java"], "stars": 765, "description": "monkey-api-encrypt\u662f\u5bf9\u57fa\u4e8eServlet\u7684Web\u6846\u67b6API\u8bf7\u6c42\u8fdb\u884c\u7edf\u4e00\u52a0\u89e3\u5bc6\u64cd\u4f5c", "lang": "JavaScript", "repo_lang": "", "readme": "## Preface\n\nWe use the interface as the standard to promote the development method of separating the front and back ends, define the interface, develop their own functions, and finally carry out joint adjustment and integration. Whether it is developing native APP, webapp or PC-side software, as long as the front-end and back-end are separated, it is inevitable to call the interface provided by the back-end for business interaction.\n\nFor web pages or apps, you can clearly know the data obtained by this request as long as you grab the package. Such an interface is a boon for crawler engineers. It is easy to grab your data.\n\nData security is very important, especially user-related information, which can be stolen by criminals if you are not careful, so we must attach great importance to this area and cannot tolerate sloppy.\n\nmonkey-api-encrypt is a framework for performing unified encryption and decryption operations on Servlet-based web framework API requests.\n\n## function points\n\n- Support all Servlet-based web frameworks (Spring Boot, Spring Cloud Zuul and other frameworks)\n- Built-in AES encryption algorithm\n- Support user-defined encryption algorithm\n- Easy to use, with operation examples\n\n## Documentation\n\n- [Documentation](https://github.com/yinjihuan/monkey-api-encrypt/wiki/%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3)\n\n- [Detailed documentation](https://github.com/yinjihuan/monkey-api-encrypt/wiki/%E8%AF%A6%E7%BB%86%E9%85%8D%E7%BD%AE% E4%BD%BF%E7%94%A8)\n\n- [Principle document](https://github.com/yinjihuan/monkey-api-encrypt/wiki/%E5%8E%9F%E7%90%86%E6%96%87%E6%A1%A3)\n\n- [Custom encryption algorithm](https://github.com/yinjihuan/monkey-api-encrypt/wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E5%8A%A0 %E5%AF%86%E7%AE%97%E6%B3%95)\n\n- [FAQ](https://github.com/yinjihuan/monkey-api-encrypt/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)\n\n## article\n- [Version 1.1.1 released](https://mp.weixin.qq.com/s/3HoHnzsdPIvNgjkLr9GSIw)\n- [Version 1.1.2 released](https://mp.weixin.qq.com/s/JJFxbkb9HtVMECByvMJ4Gg)\n- [Version 1.2 released](https://mp.weixin.qq.com/s/TbTr44Hc9gkJB40L9eHHYQ)\n\n\n# author\n- Yin Jihuan 1304489315@qq.com\n- Blog http://cxytiandi.com/blogs/yinjihuan\n- Technical exchange WeChat group, please add me WeChat to pull you into the group: jihuan900\n\n### Welcome to join my knowledge planet, exchange technology together, and learn the courses of Yuantiandi for free (http://cxytiandi.com/course)\n\n## PS: At present, the planet is learning Sentinel under the leadership of the star master, waiting for you!\n\n![WeChat scan code to join Ape World Knowledge Planet](https://upload-images.jianshu.io/upload_images/2685774-b11318670c1457fa.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n![Ape World](https://upload-images.jianshu.io/upload_images/2685774-17a60e1ead7fd232.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "knadh/localStorageDB", "link": "https://github.com/knadh/localStorageDB", "tags": [], "stars": 765, "description": "A simple database layer for localStorage and sessionStorage for creating structured data in the form of databases and tables", "lang": "JavaScript", "repo_lang": "", "readme": "# localStorageDB 2.3.2\nlocalStorageDB is a simple layer over localStorage (and sessionStorage) that provides\na set of functions to store structured data like databases and tables.\nIt provides basic insert/update/delete/query capabilities.\nlocalStorageDB has no dependencies, and is not based on WebSQL. Underneath it all,\nthe structured data is stored as serialized JSON in localStorage or sessionStorage.\n\n- Kailash Nadh\n- v 2.3.2 Mar 2018 Contribution: Ken Kohler\n- v 2.3.1 Mar 2015\n- v 2.3.0 Feb 2014 Contribution: Christian Kellner (http://orange-coding.net)\n- v 2.2 Jan 2014 Contribution: Andy Hawkins (http://a904guy.com)\n- v 2.1 Nov 2013\n- v 2.0 Jun 2013\n- v 1.9 Nov 2012\n- Documentation: [http://nadh.in/code/localstoragedb](http://nadh.in/code/localstoragedb)\n- Licensed: MIT license\n\n# Installation\n\n## NPM\n`npm install localstoragedb`\n\n## Yarn\n`yarn add localstoragedb`\n\n## Bower\n`bower install localstoragedb`\n\n\n# Run Test Cases\n\n```shell\nbower install # install mocha and chai for running test cases\n```\n`open test/local_storage_db_test.html in Browser to check the result`\n\n# Supported Browsers\nBrowsers need to support \"Local Storage\" in order to make localeStorageDB working.\n\n- IE 8<\n- Firefox 31<\n- Chrome 31<\n- Safari 7<\n- iOS Safari 7.1<\n- Android Browser 4.1<\n- Chrome for Android 42<\n\n# Usage / Examples\n### Creating a database, table, and populating the table\n\n```javascript\n// Initialise. If the database doesn't exist, it is created\nvar lib = new localStorageDB(\"library\", localStorage);\n\n// Check if the database was just created. Useful for initial database setup\nif( lib.isNew() ) {\n\n // create the \"books\" table\n\tlib.createTable(\"books\", [\"code\", \"title\", \"author\", \"year\", \"copies\"]);\n\n\t// insert some data\n\tlib.insert(\"books\", {code: \"B001\", title: \"Phantoms in the brain\", author: \"Ramachandran\", year: 1999, copies: 10});\n\tlib.insert(\"books\", {code: \"B002\", title: \"The tell-tale brain\", author: \"Ramachandran\", year: 2011, copies: 10});\n\tlib.insert(\"books\", {code: \"B003\", title: \"Freakonomics\", author: \"Levitt and Dubner\", year: 2005, copies: 10});\n\tlib.insert(\"books\", {code: \"B004\", title: \"Predictably irrational\", author: \"Ariely\", year: 2008, copies: 10});\n\tlib.insert(\"books\", {code: \"B005\", title: \"Tesla: Man out of time\", author: \"Cheney\", year: 2001, copies: 10});\n\tlib.insert(\"books\", {code: \"B006\", title: \"Salmon fishing in the Yemen\", author: \"Torday\", year: 2007, copies: 10});\n\tlib.insert(\"books\", {code: \"B007\", title: \"The user illusion\", author: \"Norretranders\", year: 1999, copies: 10});\n\tlib.insert(\"books\", {code: \"B008\", title: \"Hubble: Window of the universe\", author: \"Sparrow\", year: 2010, copies: 10});\n\n\t// commit the database to localStorage\n\t// all create/drop/insert/update/delete operations should be committed\n\tlib.commit();\n}\n```\n\n### Creating and populating a table in one go\n```\n\t// rows for pre-population\n\tvar rows = [\n\t\t{code: \"B001\", title: \"Phantoms in the brain\", author: \"Ramachandran\", year: 1999, copies: 10},\n\t\t{code: \"B002\", title: \"The tell-tale brain\", author: \"Ramachandran\", year: 2011, copies: 10},\n\t\t{code: \"B003\", title: \"Freakonomics\", author: \"Levitt and Dubner\", year: 2005, copies: 10},\n\t\t{code: \"B004\", title: \"Predictably irrational\", author: \"Ariely\", year: 2008, copies: 10},\n\t\t{code: \"B005\", title: \"Tesla: Man out of time\", author: \"Cheney\", year: 2001, copies: 10},\n\t\t{code: \"B006\", title: \"Salmon fishing in the Yemen\", author: \"Torday\", year: 2007, copies: 10},\n\t\t{code: \"B007\", title: \"The user illusion\", author: \"Norretranders\", year: 1999, copies: 10},\n\t\t{code: \"B008\", title: \"Hubble: Window of the universe\", author: \"Sparrow\", year: 2010, copies: 10}\n\t];\n\n\t// create the table and insert records in one go\n\tlib.createTableWithData(\"books\", rows);\n\n\tlib.commit();\n```\n### Altering\n```javascript\n// If database already exists, and want to alter existing tables\nif(! (lib.columnExists(\"books\", \"publication\")) ) {\n\tlib.alterTable(\"books\", \"publication\", \"McGraw-Hill Education\");\n\tlib.commit(); // commit the deletions to localStorage\n}\n\n// Multiple columns can also added at once\nif(! (lib.columnExists(\"books\", \"publication\") && lib.columnExists(\"books\", \"ISBN\")) ) {\n\tlib.alterTable(\"books\", [\"publication\", \"ISBN\"], {publication: \"McGraw-Hill Education\", ISBN: \"85-359-0277-5\"});\n\tlib.commit(); // commit the deletions to localStorage\n}\n```\n\n### Querying\n`query()` is deprecated. Use `queryAll()` instead.\n\n```javascript\n// simple select queries\nlib.queryAll(\"books\", {\n\tquery: {year: 2011}\n});\nlib.queryAll(\"books\", {\n\tquery: {year: 1999, author: \"Norretranders\"}\n});\n\n// select all books\nlib.queryAll(\"books\");\n\n// select all books published after 2003\nlib.queryAll(\"books\", {\n\tquery: function(row) { // the callback function is applied to every row in the table\n\t\tif(row.year > 2003) {\t\t// if it returns true, the row is selected\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n});\n\n// select all books by Torday and Sparrow\nlib.queryAll(\"books\", {\n query: function(row) {\n if(row.author == \"Torday\" || row.author == \"Sparrow\") {\n\t\t return true;\n\t } else {\n\t\t return false;\n\t }\n },\n limit: 5\n});\n```\n\n### Sorting\n```javascript\n// select 5 rows sorted in ascending order by author\nlib.queryAll(\"books\", { limit: 5,\n sort: [[\"author\", \"ASC\"]]\n });\n\n// select all rows first sorted in ascending order by author, and then, in descending, by year\nlib.queryAll(\"books\", { sort: [[\"author\", \"ASC\"], [\"year\", \"DESC\"]] });\n\nlib.queryAll(\"books\", { query: {\"year\": 2011},\n limit: 5,\n sort: [[\"author\", \"ASC\"]]\n });\n\n// or using query()'s positional arguments, which is a little messy (DEPRECATED)\nlib.query(\"books\", null, null, null, [[\"author\", \"ASC\"]]);\n```\n\n### Distinct records\n```javascript\nlib.queryAll(\"books\", { distinct: [\"year\", \"author\"]\n });\n\n```\n\n### Example results from a query\n```javascript\n// query results are returned as arrays of object literals\n// an ID field with the internal auto-incremented id of the row is also included\n// thus, ID is a reserved field name\n\nlib.queryAll(\"books\", {query: {author: \"ramachandran\"}});\n\n/* results\n[\n {\n ID: 1,\n code: \"B001\",\n title: \"Phantoms in the brain\",\n author: \"Ramachandran\",\n year: 1999,\n copies: 10\n },\n {\n ID: 2,\n code: \"B002\",\n title: \"The tell-tale brain\",\n author: \"Ramachandran\",\n year: 2011,\n copies: 10\n }\n]\n*/\n```\n\n\n### Updating\n```javascript\n// change the title of books published in 1999 to \"Unknown\"\nlib.update(\"books\", {year: 1999}, function(row) {\n\trow.title = \"Unknown\";\n\n\t// the update callback function returns to the modified record\n\treturn row;\n});\n\n// add +5 copies to all books published after 2003\nlib.update(\"books\",\n\tfunction(row) {\t// select condition callback\n\t\tif(row.year > 2003) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t},\n\tfunction(row) { // update function\n\t\trow.copies+=5;\n\t\treturn row;\n\t}\n);\n```\n\n### Insert or Update conditionally\n```javascript\n// if there's a book with code B003, update it, or insert it as a new row\nlib.insertOrUpdate(\"books\", {code: 'B003'}, {\tcode: \"B003\",\n\t\t\t\t\t\ttitle: \"Freakonomics\",\n\t\t\t\t\t\tauthor: \"Levitt and Dubner\",\n\t\t\t\t\t\tyear: 2005,\n\t\t\t\t\t\tcopies: 15});\n\nlib.commit();\n```\n\n### Deleting\n```javascript\n// delete all books published in 1999\nlib.deleteRows(\"books\", {year: 1999});\n\n// delete all books published before 2005\nlib.deleteRows(\"books\", function(row) {\n\tif(row.year < 2005) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n});\n\nlib.commit(); // commit the deletions to localStorage\n```\n\n\n# Methods\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n \t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n
MethodArgumentsDescription
localStorageDB()database_name, storage_engineConstructor
\n\t\t\t\t- storage_engine can either be localStorage (default) or sessionStorage\n\t\t\t
isNew()Returns true if a database was created at the time of initialisation with the constructor
drop()Deletes a database, and purges it from localStorage
tableCount()Returns the number of tables in a database
commit()Commits the database to localStorage. Returns true if successful, and false otherwise (highly unlikely)
serialize()Returns the entire database as serialized JSON
tableExists()table_nameChecks whether a table exists in the database
tableFields()table_nameReturns the list of fields of a table
createTable()table_name, fieldsCreates a table
\n\t\t\t\t- fields is an array of string fieldnames. 'ID' is a reserved fieldname.\n\t\t\t
createTableWithData()table_name, rowsCreates a table and populates it
\n\t\t\t\t- rows is an array of object literals where each object represents a record
\n\t\t\t\t[{field1: val, field2: val}, {field1: val, field2: val}]\n\t\t\t
alterTable()table_name, new_fields, default_valuesAlter a table
\n\t\t\t\t- new_fields can be a array of columns OR a string of single column.
\n\t\t\t\t- default_values (optional) can be a object of column's default values OR a default value string for single column for existing rows.\n\t\t\t
dropTable()table_nameDeletes a table from the database
truncate()table_nameEmpties all records in a table and resets the internal auto increment ID to 0
columnExists()table_name, field_nameChecks whether a column exists in database table.
rowCount()table_nameReturns the number of rows in a table
insert()table_name, dataInserts a row into a table and returns its numerical ID
\n\t\t\t\t- data is an object literal with field-values
\n\t\t\t\tEvery row is assigned an auto-incremented numerical ID automatically\n\t\t\t
query() DEPRECATEDtable_name, query, limit, start, sort
queryAll()table_name, params{}\n\t\t\t\tReturns an array of rows (object literals) from a table matching the query.
\n\t\t\t\t- query is either an object literal or null. If query is not supplied, all rows are returned
\n\t\t\t\t- limit is the maximum number of rows to be returned
\n \t\t\t- start is the number of rows to be skipped from the beginning (offset)
\n \t\t\t- sort is an array of sort conditions, each one of which is an array in itself with two values
\n \t\t\t- distinct is an array of fields whose values have to be unique in the returned rows
\n\t\t\t\tEvery returned row will have it's internal auto-incremented id assigned to the variable ID
update()table_name, query, update_functionUpdates existing records in a table matching query, and returns the number of rows affected
\n\t\t\t\t- query is an object literal or a function. If query is not supplied, all rows are updated
\n\t\t\t\t- update_function is a function that returns an object literal with the updated values\n\t\t\t
insertOrUpdate()table_name, query, dataInserts a row into a table if the given query matches no results, or updates the rows matching the query.
\n\t\t\t\t\t- query is either an object literal, function, or null.
\n\t\t\t\t\t- data is an object literal with field-values\n\t\t\t\t\t

\n\t\t\t\t\tReturns the numerical ID if a new row was inserted, or an array of IDs if rows were updated\n\t\t\t\t
deleteRows()table_name, queryDeletes rows from a table matching query, and returns the number of rows deleted
\n\t\t\t\t- query is either an object literal or a function. If query is not supplied, all rows are deleted\n\t\t\t
\n\n# Storing complex objects\nWhile the library is meant for storing fundamental types (strings, numbers, bools), it is possible to store object literals and arrays as column values, with certain caveats. Some comparison queries, distinct etc. may not work. In addition, if you retrieve a stored array in a query result and modify its values in place, these changes will persist throughout further queries until the page is refreshed. This is because localStorageDB loads and unserializes data and keeps it in memory in a global pool until the page is refreshed, and arrays and objects returned in results are passed by reference.\n\nIf you really need to store arrays and objects, you should implement a deep-copy function through which you pass the results before manipulation.\n", "readme_type": "markdown", "hn_comments": "How does this compare with TaffyDB?", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "alabid/flylatex", "link": "https://github.com/alabid/flylatex", "tags": [], "stars": 765, "description": "FlyLatex: A Realtime Collaborative Environment (with a concurrent editor) in node-js.", "lang": "JavaScript", "repo_lang": "", "readme": "FlyLatex\n========\n\n**This project is no longer being maintained**\n\nFlyLatex is a real-time collaborative environment for LaTeX built in nodejs.\nIt includes a beautiful LaTeX ACE Editor and a PDF renderer. \n\nFlyLatex gives you:\n\n* A Real Time Collaborative Code Editor\n\n* Real Time updates on status and privileges of Latex Documents\n\n* Easy way to Compile LaTeX to PDF Online\n\n* Easy LateX Debugging Online\n\n* Easy Manipulation of Compiled PDFs\n\n* Easy Sharing of PDFs\n\n* An Open Source product that's easy to Customize\n\n* Option to use images, additional packages (like .sty files) by specifying `configs.includes.path`\n\n\nScreen Shots of the Internals of the FlyLatex application\n---------------------------------------------------------\n\nCheck it out [here](http://alabidan.wordpress.com/2012/07/31/flylatex-a-real-time-collaborative-environment-some-screen-shots-of-the-app/)\n\nSetup\n-----\n\nTo use FlyLatex, you must have `node`, `npm`, `mongodb` installed. So if you haven't already installed all these, do so before moving on.\n\nAlso, if you want to store and render pdf's and not just edit your LaTeX\nfiles, you must\nhave the program `pdflatex` command line tool installed. If not, install\nit. FlyLatex stores compiled pdfs in the directory \n`config.directory.path` specified in `configs.js`.\n\nTo install FlyLatex, first clone the repository: `git clone https://github.com/alabid/flylatex.git`\n\n`cd` into the directory `flylatex`. Open the file `configs.js` with your favorite\neditor and edit the file to reflect your storage setup and your database\nsetup. Use `configs.pdfs.path` to specify where you want to store\nyour output pdfs in. Use `configs.includes.path` to specify what directory your TeX includes/packages/images are stored, for use during compilation of any LaTeX document.\n```js\nvar config = {\n port: 3001\n , pdfs: {\n // absolute path of where to store compiled pdfs\n // defaults to \"pdfs\" directory in \"flylatex\" repo\n path: \"\"\n }\n , db : {\n // for example: mongodb://localhost/flydb3\"\n url : \"mongodb://localhost/flydb\"\n }, docs: {\n // maximum number of documents per user\n MAX_NUM_PER_USER : 20\n }, includes: {\n // specify directory (absolute path) containing latex includes\n // defaults to \"texpackages\" directory in \"flylatex\" repo\n path: \"\"\n } \n};\n```\nThen run the command `npm install -d` to install all the dependencies for the\nFlyLatex nodejs app. This should take only a few minutes.\n\nFor more information on how to setup FlyLatex on Ubuntu, see\n[this](http://kaanaksit.wordpress.com/2013/05/10/en-how-to-use-and-install-flylatex-on-ubuntu/)\n\nUsage\n-----\n\nYou'd have to first start the `mongo` daemon using the command\n\n mongod --dbpath \n\n`` could be `~/mongodb` or any other place you have a mongodb\npath.\n\nThen `cd` into the directory (if you aren't already there) and run the command\n `foreman start`. This should invoke the `Procfile` in that directory (if you have the foreman gem installed) and start \nthe server via:\n\n web: node app.js\n\nYou should see a command-line message telling you the port number on which the app lives. For example, I saw the message\n\n 20:38:10 web.1 | Express server listening on port 5000 in development mode\n\nSo I had to visit `http://localhost:5000`. Yours might be different. Watch out.\n \nIf you don't have the foreman gem installed, start the app via `node app.js`.\n\n\nFeedback, Bugs, Suggestions\n---------------------------\n\nI'd really like your feedback, comments, and bug reports sent to me\nsomehow preferably by filing an issue (github feature).\n\n\nAuthor\n------\nDaniel Alabi\n\nVersion\n-------\n1.0\n\nMIT Open Source License\n-----------------------\n\nCopyright © 2012 Daniel Alabi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "readme_type": "markdown", "hn_comments": "I am actually very flattered that they say its a clone of my site (http://sharelatex.com) at the top of the read me, thanks! I think there are now about 107 different online LaTeX editors.I'm curious how you handle the LaTeX compilation, since in my experience this is one of the trickiest things to get set up securely. I created the \"Common LaTeX Service Interface (CLSI)\" (https://github.com/scribtex/clsi) as an open standard and open source HTTP API to provide access to a LaTeX compiler. I think it's one of these problems that people will keep solving again and again unless we work together to get it right. The CLSI currently powers ShareLaTeX, ScribTeX, and LaTeXLab (with a different implementation of a similar standard), so it's been well battle tested. If you'd be interested in integrating the CLSI with FlyLaTeX, I'd be more than happy to help out. Contact details are in my profile.Very nice!It would be really cool to hook-up some git functionality.Is there an option to generate PNGs or JPGs from a formula (without having to go through pdflatex)?Personally I think it's time to retire LaTeX. There's been a few solutions based on MathML and Markdown, which offer the power of LaTeX formulas without the convoluted language. A notable example is notepag.es (https://github.com/fivesixty/notepages).Dev of http://spandex.io here. Good to have more people in the space :)Is this bound to latex or is there something like formatting plugins? Can the latex formatting be easily exchanged to handle markdown or a wiki style markup or anythig else?A realtime frontend with a modular pandoc + git backend could finally solve many online editing pains.I understanding that it uses the command-line TeX compiler. If there is a way to hook it to https://github.com/manuels/texlive.js/ that'd be very interesting.", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "electron-userland/electron-prebuilt", "link": "https://github.com/electron-userland/electron-prebuilt", "tags": ["electron", "electron-prebuilt", "javascript", "nodejs", "desktop-app"], "stars": 765, "description": "\ud83c\udf82 Retired project. See README", "lang": "JavaScript", "repo_lang": "", "readme": "# electron-prebuilt\n\nThis project has been merged into the\n[electron/electron](https://github.com/electron/electron/tree/master/npm)\nrepository, and the `electron` module is now published to npm as part of the\nElectron release process.\n\nIf you're having trouble installing or using Electron, please \n[file an issue on the electron/electron repo](https://github.com/electron/electron/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20install%20).\n\n## Backstory\n\nIn the early days of Electron, back when it was still called `atom-shell`, there \nwas no module published to npm, nor was there even an Electron team at GitHub.\nElectron was used primarly by the [Atom](https://atom.io/) team, and it was up \nto early adopters to manually download compiled binary builds of Electron for \nuse in their apps.\n\nIn early 2015 [Max Ogden](https://github.com/maxogden) created \n[`electron-download`](https://github.com/electron-userland/electron-download) \nand `electron-prebuilt`, two npm modules to simplify the process of installing \nElectron. These tools quickly became de facto standards in the Electron \ncommunity.\n\nShortly after `electron-prebuilt` was written, \n[John Muhl](https://github.com/johnmuhl/) created\n[electron-prebuilt-updater](https://github.com/electron/electron-prebuilt-updater), \na Heroku app to publish the the prebuilt module to npm automatically as new \nversions of Electron were published on GitHub.\n\nFast forward to mid-2017, and GitHub now has a team working full-time on \nElectron. We are working towards a more regular release cadence, \nand are incrementally documenting and [improving our release process](https://github.com/electron/electron/blob/master/docs/development/releasing.md). \nAs we've added support for things like \n[TypeScript definitions](https://electron.atom.io/blog/2017/06/01/typescript),\nit's been challenging to work these additions into the `electron` -> `electron-prebuilt-updater` -> `electron-prebuilt` release flow.\n\nTo reduce the number of moving parts in the release process, we imported\nthe `electron-prebuilt` codebase into [`electron`](https://github.com/electron/electron/tree/master/npm) itself, and have \n[preserved the git history](https://github.com/electron/electron/pull/10172)\nto acknowledge the contributions of the 32 open-source community members who \nhave helped improve `electron-prebuilt` over the years.", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "paulirish/speedline", "link": "https://github.com/paulirish/speedline", "tags": [], "stars": 765, "description": "Calculate the speed index from devtools performance trace", "lang": "JavaScript", "repo_lang": "", "readme": "# speedline [![Build Status](https://travis-ci.org/paulirish/speedline.svg?branch=master)](https://travis-ci.org/paulirish/speedline) [![NPM speedline package](https://img.shields.io/npm/v/speedline.svg)](https://npmjs.org/package/speedline)\n\n\n![speedline screenshot](/screenshot.png?raw=true)\n\n## Background\n\nThe [Navigation Timing API](https://developer.mozilla.org/en-US/docs/Web/API/Navigation_timing_API) provides useful data that can be used to measure the performance of a website. Unfortunately this API has never been good at capturing the actual *user experience*.\n\nThe [Speed Index](https://github.com/WPO-Foundation/webpagetest-docs/blob/master/user/Metrics/SpeedIndex.md), introduced by [WebpageTest.org](http://www.webpagetest.org/), aims to solve this issue. It measures **how fast the page content is visually displayed**. The current implementation is based on the **Visual Progress from Video Capture** calculation method described on the [Speed Index](https://github.com/WPO-Foundation/webpagetest-docs/blob/master/user/Metrics/SpeedIndex.md) page. The visual progress is calculated by comparing the distance between the histogram of the current frame and the final frame.\n\nSpeedline also calculates the **perceptual speed index**, based on the same principal as the original speed index, but it computes the visual progression between frames using the [SSIM](https://en.wikipedia.org/wiki/Structural_similarity) instead of the histogram distance.\n\n## Install the CLI\n\n```bash\n$ npm install -g speedline\n```\n\n## Usage\n\n> **Note:** You should enable the `screenshot` options before recording the timeline.\n\n```bash\n$ speedline --help\n\n Usage\n $ speedline [options]\n\n Options\n --pretty Pretty print the output\n --fast Skip parsing frames between similar ones\n Disclaimer: may result in different metrics due to skipped frames\n\n Examples\n $ speedline ./timeline.json\n```\n\nBy default the CLI will output the same output as [visual metrics](https://github.com/WPO-Foundation/visualmetrics). You can use the `--pretty` option if you want to have the histogram.\n\n## The `speedline-core` module\n\nSee [readme of `speedline-core`](https://github.com/paulirish/speedline/blob/master/core/readme.md).\n\n## License\n\nMIT \u00a9 [Pierre-Marie Dartus](https://github.com/pmdartus)\n\n## Dev\n\nThe repo is split into CLI and core. The core dependencies are duplicated in both package.json files. It is what it is.\n\nTo install: \n```sh\nyarn && yarn install-all\n````\n\n#### Releasing\n\nReleasing both CLI and core:\n\n```sh\nyarn version # and bump appropriately\n# update the version in core/package.json\ngit commit --amend --all # to amend into the tagged commit\nnpm publish\ncd core && npm publish\ngit push\n```\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "hyperledger/fabric-sdk-node", "link": "https://github.com/hyperledger/fabric-sdk-node", "tags": ["fabric", "hyperledger", "blockchain", "distributed-ledger", "node"], "stars": 765, "description": "Hyperledger Fabric SDK for Node https://wiki.hyperledger.org/display/fabric", "lang": "JavaScript", "repo_lang": "", "readme": "## Hyperledger Fabric Client SDK for Node.js \"Build\n\nThe Hyperledger Fabric Client SDK makes it possible to use APIs to interact with a Hyperledger Fabric blockchain. This readme is directed towards a current or future contributor to this project, and gives an overview of setting up the project locally and running tests. For more information on the SDK, including features and an API reference, please visit the [SDK documentation](https://hyperledger.github.io/fabric-sdk-node/).\n\nThis project publishes the following npm packages:\n* `fabric-ca-client` - client for the optional component in Hyperledger Fabric, [fabric-ca](http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html). The fabric-ca component allows applications to enroll Peers and application users to establish trusted identities on the blockchain network. It also provides support for pseudonymous transaction submissions with Transaction Certificates. If the target blockchain network is configured with standard Certificate Authorities for trust anchors, the application does not need to use this package.\n* `fabric-common` - encapsulates the common code used by all fabric-sdk-node packages supporting fine grain interactions with the Fabric network to send transaction invocations\n* `fabric-network` - This package encapsulates the APIs to connect to a Fabric network, submit transactions and perform queries against the ledger at a higher level of abstraction than through the `fabric-common`.\n* `fabric-protos` - This package encapsulates the protobuffers that are used to communicate over gRPC\n\n> **Note:** When developing applications for Hyperledger Fabric v2.4 and later, you are strongly encouraged to use the new [Fabric Gateway client API](https://hyperledger.github.io/fabric-gateway/).\n\n## Build and Test\nTo build and test, the following pre-requisites must be installed first:\n* Node.js, version 14 is supported from 14.15.0 and higher\n* Node.js, version 16 is supported\n* npm tool version 6 or higher\n* docker (only required for running integration tests, see below)\n\n### Run unit tests\nClone the project and launch the following commands to install the dependencies and perform various tasks.\n\nIn the project root folder:\n* Install all dependencies via `npm install`\n* Optionally, to generate API docs via `npm run docs`\n* To generate the required crypto material used by the tests, use the npm task `npm run installAndGenerateCerts`\n* To run the unit tests that do not require any additional set up, use `npm run testHeadless`\n\n### Run Integration Tests\nIntegration tests run on the main branch require the most recent stable Fabric images, which are hosted on Artifactory. A utility script is provided to retrieve non-published docker images, which may be run using the command `npm run pullFabricImages`\n\nNow you are ready to run the integration tests. It is advisable to clear out any previous key value stores that may have cached user enrollment certificates using the command (`rm -rf /tmp/hfc-*`, `rm -rf ~/.hfc-key-store`) prior to testing in isolation.\n\nWe have functional and scenario based tests that may be run via the following commands:\n * end to end (tape) tests may be run via `npm run tapeIntegration`\n * scenario (cucumber) tests may be run via `npm run cucumberScenario`\n * You may run both integration test styles using `npm run tapeAndCucumber`\n * All tests (unit and integration) may be run using the command `npm test` or `npm run testNoHSM` when not using a HSM or HSM simulator\n\n### Special Tests for Hardware Security Module support via PKCS #11 interface\n\nThe SDK has support for Hardware Security Module (HSM) via PKCS #11 interface. See the test [README](test/README.md) for details of how to run HSM tests locally.\n\n### Pluggability\nHFC defines the following abstract classes for application developers to supply extensions or alternative implementations. For each abstract class, a built-in implementation is included with the ability to load alternative implementations via designated environment variables:\n\n1. To replace FileKeyValueStore with a different implementation, such as one that saves data to a database, specify \"KEY_VALUE_STORE\" and provide the full require() path to an alternative implementation of the api.KeyValueStore abstract class.\n\n2. The cryptography suite used by the default implementation uses ECDSA for asymmetric keys cryptography, AES for encryption and SHA2/3 for secure hashes. A different suite can be plugged in with \"CRYPTO_SUITE\" environment variable specifying full require() path to the alternative implementation of the api.CrytoSuite abstract class.\n\n3. If the user application uses an alternative membership service than the one provided by the component `fabric-ca`, the client code will likely need to use an alternative client to `fabric-ca-client` to interact with that membership service.\n\n### Continuous Integration\n\nOur Continuous Integration is run using [Azure Pipelines](https://dev.azure.com/Hyperledger/Fabric-SDK-Node/_build). Builds are automatically triggered on opening pull requests.\n\n### Release notes\n\nCheck the `./release_notes` directory for the release notes of the specified release.\n\n### Contributing\n\nCheck [the documentation](./CONTRIBUTING.md) on how to contribute to this project for the full details.\n\n\"Creative
This work is licensed under a Creative Commons Attribution 4.0 International License.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "wmzsoft/JXADF", "link": "https://github.com/wmzsoft/JXADF", "tags": [], "stars": 765, "description": "OSGi\u63d2\u4ef6\u5316\u5feb\u901f\u5f00\u53d1\u5e73\u53f0JXADF\uff0c\u57fa\u7840\u5e73\u53f0\u5168\u90e8\u5f00\u6e90\u3001\u514d\u8d39\uff08\u5546\u4e1a\u53cb\u597d\u534f\u8baeMIT\uff09\u3002All the basic platform open source, free \uff08MIT\uff09", "lang": "JavaScript", "repo_lang": "", "readme": "\ufeff![JXADF](doc/images/logo.png)\n\nPluggable (OSGi) open source rapid development platform JXADF Features:\n\nGetting Started\n\nOpen Source (:100:), Free (:free:)\n\n:one:, based on OSGi, J2EE\n\n:two: There are a lot of plug-ins in the plug-in market http://osgia.com/jxweb/pluginstore/index.action.\n\n:three:, front-end code (interface, CSS, JS, pictures, etc.), back-end code (JAVA business logic, SQL script [only need to provide a database script, it will be automatically converted according to the database type during installation]) are all packaged in In a Bundle (JAR), it is very convenient to distribute, test, accumulate, and deploy.\n\n:four:, supports hot deployment, distributed, multiple databases (Oracle\\MySQL\\MS SQLServer), skinning, internationalization, etc.\n\n:five:, supports a variety of workflow engines, including: the workflow engine developed by Jianxin Technology itself, Activiti, Oracle BPM, and can integrate its own workflow engine as needed.\n\n:six:, desktop and mobile self-adaptive, adopt template technology, develop once, resolve to desktop, mobile phone, tablet front-end interface.\n\n:seven:, low learning cost, high efficiency.\n\n:eight:, there are rich documents, see: http://wiki.osgi.help/display/JXADF/Home\n\n:nine:, Demo URL: http://demo.osgi.help Username: admin Password: 123456\n\n![http://osgi.hep](doc/images/osgi.help.png)\n\n------------------------------------\nOfficial website: house_with_garden:: http://osgia.com\n\nQQ group 1: 429895245 (:u6e80:) QQ group 2: 371832126 (:mens:)\n\nIf you like it, please add a star :star:,\n\nIf you have any suggestions, please add QQ to tell us,\n\nIf you don't like it, please let us know so we can improve it.\n\n-----------------------------------------------\nversion history\n========\n2016.06 Version 2.0, officially released, supports distributed deployment\n\n2015.06 Version 1.0, officially open source\n\n2014.10 Version 0.7, support plug-in development\n\n2014.01 Version 0.5, complete basic functions\n\n2013.08 Version 0.2, complete the basic functions\n\n2013.03 version 0.1, create this platform\n\n-------------------------------------------------- -\nplugin console\n======\n![Plugin Console](doc/images/console.png)\n\nworkflow\n=======\n![Workflow Drawing](doc/images/wf01.png)\n![Workflow History](doc/images/wf02.png)\n\nWorkflow more http://wiki.osgi.help/pages/viewpage.action?pageId=22054753\n\nMobile Adaptive Effects\n=======\n![Mobile adaptive access screenshot](doc/images/jxadf-mobile.demo.gif)\n\nThe compiled execution program can be found in the deploy directory\n\n\ndonate\n==========\nThe basic platform is all open source and free (commercial friendly agreement MIT)\n\nIt is very hard to develop an open source platform, so let\u2019s give the developer a little compensation, 1 yuan or 2 yuan is fine, and a like in the upper left corner is also fine, thank you for your support.\n\n![Donation](doc/images/donation.png)", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "eddyerburgh/avoriaz", "link": "https://github.com/eddyerburgh/avoriaz", "tags": ["vuejs", "vuejs2", "testing", "testing-tools", "test-driven-development", "tests", "vue-testing", "vue-testing-tools", "vuesjs2-testing", "vue-test-utils", "vue-testing-utilities", "vue-test-utilities", "vue", "vue-test", "avoriaz", "vue-testing-framework"], "stars": 765, "description": "\ud83d\udd2c a Vue.js testing utility library", "lang": "JavaScript", "repo_lang": "", "readme": "# avoriaz [![Build Status](https://travis-ci.org/eddyerburgh/avoriaz.svg?branch=master)](https://travis-ci.org/eddyerburgh/avoriaz)\n\n\n> a Vue.js testing utility library\n\n## Deprecation\n\nThis library will be deprecated once [vue-test-utils](https://github.com/vuejs/vue-test-utils) is released.\n\n## Installation\n\n```\nnpm install --save-dev avoriaz\n```\n\n## Documentation\n\n[Visit the docs](https://eddyerburgh.gitbooks.io/avoriaz/content/)\n\n## Examples\n\n- [Example using karma and mocha](https://github.com/eddyerburgh/avoriaz-karma-mocha-example)\n- [Example using karma and jasmine](https://github.com/eddyerburgh/avoriaz-karma-jasmine-example)\n- [Example using Jest](https://github.com/eddyerburgh/avoriaz-jest-example)\n- [Example using mocha-webpack](https://github.com/eddyerburgh/avoriaz-mocha-example)\n- [Example using tape](https://github.com/eddyerburgh/avoriaz-tape-example)\n- [Example using ava](https://github.com/eddyerburgh/avoriaz-ava-example)\n\n##### Assert wrapper contains a child\n```js\nimport { mount } from 'avoriaz'\nimport Foo from './Foo.vue'\n\nconst wrapper = mount(Foo)\nexpect(wrapper.contains('.bar')).to.equal(true)\n```\n\n##### Shallow render components\n```js\nimport { shallow } from 'avoriaz'\nimport Foo from './Foo.vue'\nimport Bar from './Bar.vue'\n\nconst wrapper = shallow(Foo)\nexpect(wrapper.contains(Bar)).to.equal(true)\n```\n\n##### Assert style is rendered\n```js\nconst button = wrapper.find('div > button .button-child')[0]\nexpect(button.hasStyle('color', 'red')).to.equal(true)\n```\n\n##### Assert method is called when DOM event is triggered\n```js\nconst clickHandler = sinon.stub()\nconst wrapper = mount(Foo, {\n propsData: { clickHandler }\n})\nwrapper.find('div .bar')[0].trigger('click')\nexpect(clickHandler.called).to.equal(true)\n```\n\n##### Assert wrapper contains text\n```js\nconst title = wrapper.find('h1.title')[0]\nexpect(title.text()).to.equal('some text')\n```\n\n##### Inject globals\n```js\nconst $route = { path: 'http://www.example-path.com' }\nconst wrapper = mount(Foo, { \n globals: {\n $route\n }\n})\nexpect(wrapper.vm.$route.path).to.equal($route.path)\n```\n\n##### Inject slots\n```js\nconst wrapper = mount(Foo, { \n slots: {\n default: Foo\n }\n})\n```\n\n##### Set data\n```js\nwrapper.setData({\n someData: 'some data'\n})\n\nexpect(wrapper.vm.someData).to.equal('some data')\n```\n\n##### Update props\n```js\nwrapper.setProps({\n someProp: 'some prop',\n anotherProp: 'another prop'\n})\n```\n\nFor more examples, [see the docs](https://eddyerburgh.gitbooks.io/avoriaz/content/)\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "mapbox/mapbox-gl-draw", "link": "https://github.com/mapbox/mapbox-gl-draw", "tags": ["mapbox-gl", "javascript", "drawing", "mapbox-gl-js"], "stars": 765, "description": "Draw tools for mapbox-gl-js", "lang": "JavaScript", "repo_lang": "", "readme": "# @mapbox/mapbox-gl-draw\n\n[![Build Status](https://travis-ci.org/mapbox/mapbox-gl-draw.svg?branch=main)](https://travis-ci.org/mapbox/mapbox-gl-draw)\n\nAdds support for drawing and editing features on [mapbox-gl.js](https://www.mapbox.com/mapbox-gl-js/) maps. [See a live example here](https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/)\n\n**Requires [mapbox-gl-js](https://github.com/mapbox/mapbox-gl-js).**\n\n### Installing\n\n```\nnpm install @mapbox/mapbox-gl-draw\n```\n\nDraw ships with CSS, make sure you include it in your build.\n\n### Usage in your application\n\n#### JavaScript\n\n**When using modules**\n\n```js\nimport mapboxgl from 'mapbox-gl';\nimport MapboxDraw from \"@mapbox/mapbox-gl-draw\";\n```\n\n**When using a CDN**\n\n```html\n\n```\n\n#### CSS\n\n**When using modules**\n ```js\nimport '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css'\n ```\n\n**When using CDN**\n```html\n\n```\n\n### Typescript\n\nTypescript definition files are available as part of the [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-draw) package.\n\n```\nnpm install @types/mapbox__mapbox-gl-draw\n```\n\n### Example usage\n\n```js\nmapboxgl.accessToken = 'YOUR_ACCESS_TOKEN';\n\nvar map = new mapboxgl.Map({\n container: 'map',\n style: 'mapbox://styles/mapbox/streets-v12',\n center: [40, -74.50],\n zoom: 9\n});\n\nvar Draw = new MapboxDraw();\n\n// Map#addControl takes an optional second argument to set the position of the control.\n// If no position is specified the control defaults to `top-right`. See the docs\n// for more details: https://docs.mapbox.com/mapbox-gl-js/api/#map#addcontrol\n\nmap.addControl(Draw, 'top-left');\n\nmap.on('load', function() {\n // ALL YOUR APPLICATION CODE\n});\n```\n\nhttps://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/\n\n### See [API.md](https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md) for complete reference.\n\n### Enhancements and New Interactions\n\nFor additional functionality [check out our list of custom modes](https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/MODES.md#available-custom-modes).\n\nMapbox Draw accepts functionality changes after the functionality has been proven out via a [custom mode](https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/MODES.md#creating-modes-for-mapbox-draw). This lets users experiment and validate their mode before entering a review process, hopefully promoting innovation. When you write a custom mode, please open a PR adding it to our [list of custom modes](https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/MODES.md#available-custom-modes).\n\n### Developing and testing\n\nInstall dependencies, build the source files and crank up a server via:\n\n```\ngit clone git@github.com:mapbox/mapbox-gl-draw.git\nyarn install\nyarn start & open \"http://localhost:9967/debug/?access_token=\"\n```\n\n### Testing\n\n```\nnpm run test\n```\n\n### Publishing\n\nTo GitHub and NPM:\n\n```\nnpm version (major|minor|patch)\ngit push --tags\ngit push\nnpm publish\n```\n\nTo CDN:\n\n```\n# make sure you are authenticated for AWS\ngit checkout v{x.y.z}\nyarn install\nyarn run prepublish\naws s3 cp --recursive --acl public-read dist s3://mapbox-gl-js/plugins/mapbox-gl-draw/v{x.y.z}\n```\n\nUpdate the version number in [the GL JS example](https://github.com/mapbox/mapbox-gl-js/blob/publisher-production/docs/pages/example/mapbox-gl-draw.html).\n\n### Naming actions\n\nWe're trying to follow standards when naming things. Here is a collection of links where we look for inspiration.\n\n- https://turfjs.org\n- https://shapely.readthedocs.io/en/latest/manual.html\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "sealninja/react-grid-system", "link": "https://github.com/sealninja/react-grid-system", "tags": ["react", "responsive-grid", "css-bootstrap", "css", "javascript", "grid"], "stars": 765, "description": " A powerful Bootstrap-like responsive grid system for React.", "lang": "JavaScript", "repo_lang": "", "readme": "# React Grid System\nA powerful Bootstrap-like responsive grid system for React.\n\n[![NPM version](https://img.shields.io/npm/v/react-grid-system.svg?style=flat-square)](https://npmjs.org/package/react-grid-system)\n[![Downloads](https://img.shields.io/npm/dm/react-grid-system.svg?style=flat-square)](https://npmjs.org/package/react-grid-system)\n\n## Migration guide\n\n### Upgrading to v8\n\n`react-grid-system` v8 removes the `nowrap` property of `Row` in favor of a new `wrap` property. If you were using ``, replace it with ``.\n\n### Upgrading to v7\n\n`react-grid-system` v7 adds a new screen class `xxl` for very large screens. This might have consequences for your app. To opt out of this new screen class, use this:\n\n```javascript\nimport { setConfiguration } from 'react-grid-system';\n\nsetConfiguration({ maxScreenClass: 'xl' });\n```\n\n## Installation\n\n```\nnpm install react-grid-system --save\n```\n## Getting started\n\n### Responsive grid\n\n`react-grid-system` provides a responsive grid for React inspired by [Bootstrap](https://getbootstrap.com/docs/4.5/layout/grid/). Moreover, it has various additional powerful features, such as setting breakpoints and gutter widths through React's context.\n\nThree components are provided for creating responsive grids: `Container`, `Row`, and `Col`.\n\nAn example on how to use these:\n\n```javascript\nimport { Container, Row, Col } from 'react-grid-system';\n\n\n \n \n One of three columns\n \n \n One of three columns\n \n \n One of three columns\n \n \n\n```\n\nFor all features of these components, please have a look at the API documentation: https://sealninja.github.io/react-grid-system/\n\n### Responsive utilities\n\nNext to the grid, two components are provided for showing or hiding content: `Visible` and `Hidden`.\nThe main difference between these two components and the similar CSS classes provided by Bootstrap is that these two components do not render the content at all when it should be hidden, instead of just hiding it with CSS.\n\nSome examples on how to use these components:\n\n```javascript\nimport { Visible } from 'react-grid-system';\n\n

\n Your current screen class is \n xs\n sm\n md\n lg\n xl\n xxl\n .\n

\n```\n\n```javascript\nimport { Visible, Hidden } from 'react-grid-system';\n\n\n

Paragraph visible on extra small and small.

\n
\n\n

Paragraph hidden on extra small and small.

\n
\n\n

Paragraph visible on medium and large.

\n
\n\n

Paragraph hidden on medium and large.

\n
\n```\n\nNext to that, the `ScreenClassRender` component is provided, for rendering a component differently based on the screen class. An example on how to use this:\n\n```javascript\nimport { ScreenClassRender } from 'react-grid-system';\n\n (\n

\n Screen class: {screenClass}\n

\n)} />\n```\n\nAlternatively, the `useScreenClass` hook can be used for rendering a component differently based on the screen class. Some examples on how to use this:\n\n```javascript\nimport React from 'react';\nimport { useScreenClass } from 'react-grid-system';\n\n// responsive component based the screen width\nfunction Example1() {\n const screenClass = useScreenClass();\n return (\n

\n Screen class: {screenClass}\n

\n );\n}\n\n// responsive component based the div width\nfunction Example2() {\n const elementRef = useRef(null);\n const screenClass = useScreenClass(elementRef);\n return (\n
\n

\n Screen class: {screenClass}\n

\n
\n );\n}\n```\n\n## Configuration\n\nThe following settings can be configured, to alter the responsive behavior of the grid components:\n\n| Setting | Default Value | Description |\n| -------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------- |\n| `breakpoints` | `[576, 768, 992, 1200, 1600, 1920]` | The breakpoints (minimum width) of devices in screen class `sm`, `md`, `lg`, `xl`, `xxl`, and `xxxl`. |\n| `containerWidths` | `[540, 740, 960, 1140, 1540, 1810]` | The container widths in pixels of devices in screen class `sm`, `md`, `lg`, `xl`, `xxl`, and `xxxl`. |\n| `gutterWidth` | `30` | The gutter width in pixels. A gutter width of 30 means 15px on each side of a column. |\n| `gridColumns` | `12` | The number of columns in the grid . |\n| `defaultScreenClass` | `xxl` | The screen class used when the view port cannot be determined using `window`. |\n| `maxScreenClass` | `xxl` | The maximum screen class to be used. |\n\nThese settings can be configured in the following way:\n\n```javascript\nimport { setConfiguration } from 'react-grid-system';\n\nsetConfiguration({ defaultScreenClass: 'sm', gridColumns: 20 });\n```\n\n An example on how to use them can be found in the [Example application with SSR](#example-application-with-ssr) below.\n\n## ScreenClass Context API\n\nInternally, every component that requires the current `screenClass` (which is a human-readable string version of the `window.innerWidth` relating to the user's breakpoints) subscribes to a `ScreenClassProvider`. The provider utilizes the [React Context API](https://reactjs.org/docs/context.html) to send down the current `screenClass` as it updates. By default, each instance of every component subscribes to a separate provider, creating `resize` listeners for each. This can cut down renders during a resize event from ~300 to 4 (one for each breakpoint) making the grid much more performant.\n\n### Do I need to change anything in my code?\n\nThis new API is entirely opt-in and current implementations will continue to work. However, for a signficiant performance increase, you will need to add the `ScreenClassProvider` to your application, typically at the highest level in the React node tree (i.e, App.js).\n\n\n### How do I use the ScreenClassProvider?\n\n```jsx static\nimport React from 'react';\nimport { ScreenClassProvider } from 'react-grid-system';\n\nexport default function App() {\n return (\n \n
\n \n