@leofcoin/chain 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/demo/151.browser.js +271 -0
  2. package/demo/205.browser.js +215 -0
  3. package/demo/427.browser.js +8092 -0
  4. package/demo/560.browser.js +3 -0
  5. package/demo/911.browser.js +11024 -0
  6. package/{dist → demo}/chain.browser.js +6765 -24164
  7. package/demo/index.html +4 -4
  8. package/demo/main.browser.js +8163 -0
  9. package/{dist → demo}/node.browser.js +3157 -2582
  10. package/{dist → demo}/pako.browser.js +0 -0
  11. package/demo/peernet-worker.browser.js +11330 -0
  12. package/demo/workers/machine-worker.js +12544 -0
  13. package/{dist → demo}/wrtc.browser.js +0 -0
  14. package/dist/chain.js +235 -143
  15. package/dist/module/chain.js +1189 -0
  16. package/dist/module/node.js +1 -0
  17. package/dist/module/workers/machine-worker.js +491 -0
  18. package/dist/node.js +1 -1
  19. package/package.json +11 -19
  20. package/rollup.config.js +87 -3
  21. package/src/chain.js +94 -61
  22. package/src/config/config.js +11 -16
  23. package/src/machine.js +96 -57
  24. package/src/node.js +2 -1
  25. package/src/workers/block-worker.js +71 -0
  26. package/src/workers/machine-worker.js +160 -0
  27. package/src/workers/pool-worker.js +37 -0
  28. package/src/workers/transaction-worker.js +26 -0
  29. package/test/chain.js +14 -14
  30. package/test/create-genesis.js +13 -5
  31. package/webpack.config.js +49 -6
  32. package/workers/block-worker.js +1 -0
  33. package/workers/machine-worker.js +1 -0
  34. package/workers/pool-worker.js +1 -0
  35. package/workers/transaction-worker.js +1 -0
  36. package/dist/protons.browser.js +0 -11429
  37. package/docs/@leofcoin/chain/1.0.22/chain.js.html +0 -891
  38. package/docs/@leofcoin/chain/1.0.22/contracts_factory.js.html +0 -182
  39. package/docs/@leofcoin/chain/1.0.22/contracts_nameService.js.html +0 -231
  40. package/docs/@leofcoin/chain/1.0.22/contracts_proxies_factoryProxy.js.html +0 -135
  41. package/docs/@leofcoin/chain/1.0.22/contracts_proxies_nameServiceProxy.js.html +0 -135
  42. package/docs/@leofcoin/chain/1.0.22/contracts_proxies_nativeTokenProxy.js.html +0 -135
  43. package/docs/@leofcoin/chain/1.0.22/contracts_proxies_validatorsProxy.js.html +0 -135
  44. package/docs/@leofcoin/chain/1.0.22/contracts_proxies_votingProxy.js.html +0 -135
  45. package/docs/@leofcoin/chain/1.0.22/contracts_validators.js.html +0 -242
  46. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Bold-webfont.eot +0 -0
  47. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Bold-webfont.svg +0 -1830
  48. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Bold-webfont.woff +0 -0
  49. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  50. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  51. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  52. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Italic-webfont.eot +0 -0
  53. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Italic-webfont.svg +0 -1830
  54. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Italic-webfont.woff +0 -0
  55. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Light-webfont.eot +0 -0
  56. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Light-webfont.svg +0 -1831
  57. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Light-webfont.woff +0 -0
  58. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  59. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  60. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  61. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Regular-webfont.eot +0 -0
  62. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Regular-webfont.svg +0 -1831
  63. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Regular-webfont.woff +0 -0
  64. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Semibold-webfont.eot +0 -0
  65. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Semibold-webfont.svg +0 -1830
  66. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  67. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-Semibold-webfont.woff +0 -0
  68. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  69. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
  70. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  71. package/docs/@leofcoin/chain/1.0.22/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  72. package/docs/@leofcoin/chain/1.0.22/global.html +0 -1805
  73. package/docs/@leofcoin/chain/1.0.22/icons/home.svg +0 -4
  74. package/docs/@leofcoin/chain/1.0.22/icons/search.svg +0 -4
  75. package/docs/@leofcoin/chain/1.0.22/index.html +0 -125
  76. package/docs/@leofcoin/chain/1.0.22/machine.js.html +0 -255
  77. package/docs/@leofcoin/chain/1.0.22/scripts/linenumber.js +0 -23
  78. package/docs/@leofcoin/chain/1.0.22/scripts/pagelocation.js +0 -89
  79. package/docs/@leofcoin/chain/1.0.22/standards_roles.js.html +0 -188
  80. package/docs/@leofcoin/chain/1.0.22/standards_token.js.html +0 -260
  81. package/docs/@leofcoin/chain/1.0.22/styles/collapse.css +0 -27
  82. package/docs/@leofcoin/chain/1.0.22/styles/jsdoc-default.css +0 -953
  83. package/docs/@leofcoin/chain/1.0.22/styles/prettify-jsdoc.css +0 -111
  84. package/docs/@leofcoin/chain/1.0.22/styles/prettify-tomorrow.css +0 -138
  85. package/docs/@leofcoin/chain/1.0.24/chain.js.html +0 -891
  86. package/docs/@leofcoin/chain/1.0.24/contracts_factory.js.html +0 -182
  87. package/docs/@leofcoin/chain/1.0.24/contracts_nameService.js.html +0 -231
  88. package/docs/@leofcoin/chain/1.0.24/contracts_proxies_factoryProxy.js.html +0 -135
  89. package/docs/@leofcoin/chain/1.0.24/contracts_proxies_nameServiceProxy.js.html +0 -135
  90. package/docs/@leofcoin/chain/1.0.24/contracts_proxies_nativeTokenProxy.js.html +0 -135
  91. package/docs/@leofcoin/chain/1.0.24/contracts_proxies_validatorsProxy.js.html +0 -135
  92. package/docs/@leofcoin/chain/1.0.24/contracts_proxies_votingProxy.js.html +0 -135
  93. package/docs/@leofcoin/chain/1.0.24/contracts_validators.js.html +0 -242
  94. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Bold-webfont.eot +0 -0
  95. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Bold-webfont.svg +0 -1830
  96. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Bold-webfont.woff +0 -0
  97. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  98. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  99. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  100. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Italic-webfont.eot +0 -0
  101. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Italic-webfont.svg +0 -1830
  102. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Italic-webfont.woff +0 -0
  103. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Light-webfont.eot +0 -0
  104. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Light-webfont.svg +0 -1831
  105. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Light-webfont.woff +0 -0
  106. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  107. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  108. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  109. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Regular-webfont.eot +0 -0
  110. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Regular-webfont.svg +0 -1831
  111. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Regular-webfont.woff +0 -0
  112. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Semibold-webfont.eot +0 -0
  113. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Semibold-webfont.svg +0 -1830
  114. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  115. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-Semibold-webfont.woff +0 -0
  116. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  117. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
  118. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  119. package/docs/@leofcoin/chain/1.0.24/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  120. package/docs/@leofcoin/chain/1.0.24/global.html +0 -1805
  121. package/docs/@leofcoin/chain/1.0.24/icons/home.svg +0 -4
  122. package/docs/@leofcoin/chain/1.0.24/icons/search.svg +0 -4
  123. package/docs/@leofcoin/chain/1.0.24/index.html +0 -125
  124. package/docs/@leofcoin/chain/1.0.24/machine.js.html +0 -255
  125. package/docs/@leofcoin/chain/1.0.24/scripts/linenumber.js +0 -23
  126. package/docs/@leofcoin/chain/1.0.24/scripts/pagelocation.js +0 -89
  127. package/docs/@leofcoin/chain/1.0.24/standards_roles.js.html +0 -188
  128. package/docs/@leofcoin/chain/1.0.24/standards_token.js.html +0 -260
  129. package/docs/@leofcoin/chain/1.0.24/styles/collapse.css +0 -27
  130. package/docs/@leofcoin/chain/1.0.24/styles/jsdoc-default.css +0 -953
  131. package/docs/@leofcoin/chain/1.0.24/styles/prettify-jsdoc.css +0 -111
  132. package/docs/@leofcoin/chain/1.0.24/styles/prettify-tomorrow.css +0 -138
@@ -1,1805 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
-
8
- <title>
9
- Global - Documentation
10
- </title>
11
-
12
- <link href="https://www.braintreepayments.com/images/favicon-ccda0b14.png" rel="icon" type="image/png">
13
-
14
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
15
- <script>hljs.initHighlightingOnLoad();</script>
16
-
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
18
-
19
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
20
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
21
-
22
- <link type="text/css" rel="stylesheet" href="styles/collapse.css">
23
-
24
-
25
-
26
-
27
- <!-- start Mixpanel -->
28
- <script type="text/javascript">(function(e,a){if(!a.__SV){var b=window;try{var c,l,i,j=b.location,g=j.hash;c=function(a,b){return(l=a.match(RegExp(b+"=([^&]*)")))?l[1]:null};g&&c(g,"state")&&(i=JSON.parse(decodeURIComponent(c(g,"state"))),"mpeditor"===i.action&&(b.sessionStorage.setItem("_mpcehash",g),history.replaceState(i.desiredHash||"",e.title,j.pathname+j.search)))}catch(m){}var k,h;window.mixpanel=a;a._i=[];a.init=function(b,c,f){function e(b,a){var c=a.split(".");2==c.length&&(b=b[c[0]],a=c[1]);b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,
29
- 0)))}}var d=a;"undefined"!==typeof f?d=a[f]=[]:f="mixpanel";d.people=d.people||[];d.toString=function(b){var a="mixpanel";"mixpanel"!==f&&(a+="."+f);b||(a+=" (stub)");return a};d.people.toString=function(){return d.toString(1)+".people (stub)"};k="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
30
- for(h=0;h<k.length;h++)e(d,k[h]);a._i.push([b,c,f])};a.__SV=1.2;b=e.createElement("script");b.type="text/javascript";b.async=!0;b.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";c=e.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)}})(document,window.mixpanel||[]);
31
- mixpanel.init("1919205b2da72e4da3b9b6639b444d59");</script>
32
- <!-- end Mixpanel -->
33
- </head>
34
-
35
- <body>
36
- <svg style="display: none;">
37
- <defs>
38
- <symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
39
- <path d="M0 0h24v24H0z" fill="none"/>
40
- <path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
41
- </symbol>
42
- </defs>
43
- </svg>
44
-
45
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
46
- <label for="nav-trigger" class="navicon-button x">
47
- <div class="navicon"></div>
48
- </label>
49
-
50
- <label for="nav-trigger" class="overlay"></label>
51
-
52
- <div class="top-nav-wrapper">
53
- <ul>
54
- <li >
55
- <a href="index.html">
56
-
57
- <svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
58
- <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
59
- <path d="M0 0h24v24H0z" fill="none"/>
60
- </svg>
61
-
62
-
63
- </a>
64
- </li>
65
-
66
-
67
-
68
- </ul>
69
- </div>
70
-
71
- <nav>
72
- <h3 class="reference-title">
73
- @leofcoin/chain
74
- </h3>
75
-
76
-
77
- <h3>
78
- Resources
79
- </h3>
80
-
81
- <a href="https://github.com/arteontoken/monorepo/tree/main/chain">github</a>
82
-
83
-
84
-
85
- <h3 id="global-nav">Global</h3><ul><li><a href="global.html#addContract">addContract</a></li><li><a href="global.html#createRawTransaction">createRawTransaction</a></li><li><a href="global.html#createTransaction">createTransaction</a></li><li><a href="global.html#createTransactionFrom">createTransactionFrom</a></li><li><a href="global.html#createTransactionHash">createTransactionHash</a></li><li><a href="global.html#deployContract">deployContract</a></li><li><a href="global.html#lookup">lookup</a></li><li><a href="global.html#state">state</a></li></ul>
86
- </nav>
87
-
88
- <div id="main">
89
-
90
- <h1 class="page-title">
91
- Global
92
- </h1>
93
-
94
-
95
-
96
-
97
- <section>
98
- <header>
99
-
100
- <h2>
101
-
102
-
103
-
104
- </h2>
105
-
106
-
107
-
108
- </header>
109
-
110
- <article>
111
- <div class="container-overview">
112
-
113
-
114
-
115
-
116
-
117
- <dl class="details">
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
- </dl>
151
-
152
-
153
-
154
-
155
- </div>
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
- <h3 class="subsection-title">Members</h3>
169
-
170
-
171
-
172
-
173
- <h4 class="name" id="state">
174
- <span class="type-signature"></span>state<span class="type-signature"></span>
175
- </h4>
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
- <dl class="details">
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
- <dt class="tag-source">Source:</dt>
211
- <dd class="tag-source">
212
- <ul class="dummy">
213
- <li>
214
- <a href="standards_token.js.html">standards/token.js</a>, <a href="standards_token.js.html#line47">line 47</a>
215
- </li>
216
- </ul>
217
- </dd>
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
- </dl>
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
- <h3 class="subsection-title">Methods</h3>
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
- <span class='name-container'>
246
- <a class="link-icon" href="#addContract">
247
- <svg height="20" width="20" style="fill: black;">
248
- <use xlink:href="#linkIcon"></use>
249
- </svg>
250
- </a>
251
- <h4 class="name" id="addContract">
252
- <span class="type-signature">(async) </span>addContract<span class="signature">()</span><span class="type-signature"></span>
253
- </h4>
254
- </span>
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
- <dl class="details">
270
-
271
-
272
-
273
-
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
-
295
-
296
- <dt class="tag-source">Source:</dt>
297
- <dd class="tag-source">
298
- <ul class="dummy">
299
- <li>
300
- <a href="machine.js.html">machine.js</a>, <a href="machine.js.html#line79">line 79</a>
301
- </li>
302
- </ul>
303
- </dd>
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
- </dl>
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
- <span class='name-container'>
333
- <a class="link-icon" href="#createRawTransaction">
334
- <svg height="20" width="20" style="fill: black;">
335
- <use xlink:href="#linkIcon"></use>
336
- </svg>
337
- </a>
338
- <h4 class="name" id="createRawTransaction">
339
- <span class="type-signature">(async) </span>createRawTransaction<span class="signature">(transaction)</span><span class="type-signature"> &rarr; {Object}</span>
340
- </h4>
341
- </span>
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
- <h5>Parameters:</h5>
354
-
355
-
356
- <table class="params">
357
- <thead>
358
- <tr>
359
-
360
- <th>Name</th>
361
-
362
-
363
- <th>Type</th>
364
-
365
-
366
-
367
-
368
-
369
- <th class="last">Description</th>
370
- </tr>
371
- </thead>
372
-
373
- <tbody>
374
-
375
- <tr>
376
-
377
- <td class="name"><code>transaction</code></td>
378
-
379
-
380
- <td class="type">
381
-
382
-
383
- <span class="param-type">
384
- Object
385
- </span>
386
-
387
-
388
-
389
-
390
-
391
- </td>
392
-
393
-
394
-
395
-
396
-
397
- <td class="description last">
398
-
399
-
400
- <h6>Properties</h6>
401
-
402
-
403
- <table class="params">
404
- <thead>
405
- <tr>
406
-
407
- <th>Name</th>
408
-
409
-
410
- <th>Type</th>
411
-
412
-
413
-
414
-
415
-
416
- <th class="last">Description</th>
417
- </tr>
418
- </thead>
419
-
420
- <tbody>
421
-
422
- <tr>
423
-
424
- <td class="name"><code>from</code></td>
425
-
426
-
427
- <td class="type">
428
-
429
-
430
- <span class="param-type">
431
- Address
432
- </span>
433
-
434
-
435
-
436
-
437
-
438
- </td>
439
-
440
-
441
-
442
-
443
-
444
- <td class="description last">
445
-
446
-
447
- </td>
448
- </tr>
449
-
450
-
451
- <tr>
452
-
453
- <td class="name"><code>to</code></td>
454
-
455
-
456
- <td class="type">
457
-
458
-
459
- <span class="param-type">
460
- Address
461
- </span>
462
-
463
-
464
-
465
-
466
-
467
- </td>
468
-
469
-
470
-
471
-
472
-
473
- <td class="description last">
474
-
475
-
476
- </td>
477
- </tr>
478
-
479
-
480
- <tr>
481
-
482
- <td class="name"><code>method</code></td>
483
-
484
-
485
- <td class="type">
486
-
487
-
488
- <span class="param-type">
489
- String
490
- </span>
491
-
492
-
493
-
494
-
495
-
496
- </td>
497
-
498
-
499
-
500
-
501
-
502
- <td class="description last">
503
-
504
-
505
- </td>
506
- </tr>
507
-
508
-
509
- <tr>
510
-
511
- <td class="name"><code>params</code></td>
512
-
513
-
514
- <td class="type">
515
-
516
-
517
- <span class="param-type">
518
- Array
519
- </span>
520
-
521
-
522
-
523
-
524
-
525
- </td>
526
-
527
-
528
-
529
-
530
-
531
- <td class="description last">
532
-
533
-
534
- </td>
535
- </tr>
536
-
537
-
538
- <tr>
539
-
540
- <td class="name"><code>nonce</code></td>
541
-
542
-
543
- <td class="type">
544
-
545
-
546
- <span class="param-type">
547
- Number
548
- </span>
549
-
550
-
551
-
552
-
553
-
554
- </td>
555
-
556
-
557
-
558
-
559
-
560
- <td class="description last">
561
-
562
-
563
- </td>
564
- </tr>
565
-
566
-
567
- </tbody>
568
- </table>
569
-
570
-
571
- </td>
572
- </tr>
573
-
574
-
575
- </tbody>
576
- </table>
577
-
578
-
579
-
580
-
581
-
582
- <dl class="details">
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
-
609
- <dt class="tag-source">Source:</dt>
610
- <dd class="tag-source">
611
- <ul class="dummy">
612
- <li>
613
- <a href="chain.js.html">chain.js</a>, <a href="chain.js.html#line606">line 606</a>
614
- </li>
615
- </ul>
616
- </dd>
617
-
618
-
619
-
620
-
621
-
622
-
623
-
624
- </dl>
625
-
626
-
627
-
628
-
629
-
630
-
631
-
632
-
633
-
634
-
635
-
636
-
637
-
638
-
639
-
640
-
641
-
642
-
643
-
644
-
645
- <span class='name-container'>
646
- <a class="link-icon" href="#createTransaction">
647
- <svg height="20" width="20" style="fill: black;">
648
- <use xlink:href="#linkIcon"></use>
649
- </svg>
650
- </a>
651
- <h4 class="name" id="createTransaction">
652
- <span class="type-signature">(async) </span>createTransaction<span class="signature">(to, method, params, nonce)</span><span class="type-signature"></span>
653
- </h4>
654
- </span>
655
-
656
-
657
-
658
-
659
-
660
- <div class="description">
661
- <p>whenever method = createContract params should hold the contract hash</p>
662
- <p>example: [hash]
663
- createTransaction('0x0', 'createContract', [hash])</p>
664
- </div>
665
-
666
-
667
-
668
-
669
-
670
-
671
-
672
- <h5>Parameters:</h5>
673
-
674
-
675
- <table class="params">
676
- <thead>
677
- <tr>
678
-
679
- <th>Name</th>
680
-
681
-
682
- <th>Type</th>
683
-
684
-
685
-
686
-
687
-
688
- <th class="last">Description</th>
689
- </tr>
690
- </thead>
691
-
692
- <tbody>
693
-
694
- <tr>
695
-
696
- <td class="name"><code>to</code></td>
697
-
698
-
699
- <td class="type">
700
-
701
-
702
- <span class="param-type">
703
- String
704
- </span>
705
-
706
-
707
-
708
-
709
-
710
- </td>
711
-
712
-
713
-
714
-
715
-
716
- <td class="description last">
717
- <p>the contract address for the contract to interact with</p>
718
-
719
- </td>
720
- </tr>
721
-
722
-
723
- <tr>
724
-
725
- <td class="name"><code>method</code></td>
726
-
727
-
728
- <td class="type">
729
-
730
-
731
- <span class="param-type">
732
- String
733
- </span>
734
-
735
-
736
-
737
-
738
-
739
- </td>
740
-
741
-
742
-
743
-
744
-
745
- <td class="description last">
746
- <p>the method/function to run</p>
747
-
748
- </td>
749
- </tr>
750
-
751
-
752
- <tr>
753
-
754
- <td class="name"><code>params</code></td>
755
-
756
-
757
- <td class="type">
758
-
759
-
760
- <span class="param-type">
761
- Array
762
- </span>
763
-
764
-
765
-
766
-
767
-
768
- </td>
769
-
770
-
771
-
772
-
773
-
774
- <td class="description last">
775
- <p>array of paramters to apply to the contract method</p>
776
-
777
- </td>
778
- </tr>
779
-
780
-
781
- <tr>
782
-
783
- <td class="name"><code>nonce</code></td>
784
-
785
-
786
- <td class="type">
787
-
788
-
789
- <span class="param-type">
790
- Number
791
- </span>
792
-
793
-
794
-
795
-
796
-
797
- </td>
798
-
799
-
800
-
801
-
802
-
803
- <td class="description last">
804
- <p>total transaction count [optional]</p>
805
-
806
- </td>
807
- </tr>
808
-
809
-
810
- </tbody>
811
- </table>
812
-
813
-
814
-
815
-
816
-
817
- <dl class="details">
818
-
819
-
820
-
821
-
822
-
823
-
824
-
825
-
826
-
827
-
828
-
829
-
830
-
831
-
832
-
833
-
834
-
835
-
836
-
837
-
838
-
839
-
840
-
841
-
842
-
843
-
844
- <dt class="tag-source">Source:</dt>
845
- <dd class="tag-source">
846
- <ul class="dummy">
847
- <li>
848
- <a href="chain.js.html">chain.js</a>, <a href="chain.js.html#line554">line 554</a>
849
- </li>
850
- </ul>
851
- </dd>
852
-
853
-
854
-
855
-
856
-
857
-
858
-
859
- </dl>
860
-
861
-
862
-
863
-
864
-
865
-
866
-
867
-
868
-
869
-
870
-
871
-
872
-
873
-
874
-
875
-
876
-
877
-
878
-
879
-
880
- <span class='name-container'>
881
- <a class="link-icon" href="#createTransactionFrom">
882
- <svg height="20" width="20" style="fill: black;">
883
- <use xlink:href="#linkIcon"></use>
884
- </svg>
885
- </a>
886
- <h4 class="name" id="createTransactionFrom">
887
- <span class="type-signature">(async) </span>createTransactionFrom<span class="signature">(from, to, method, params, nonce)</span><span class="type-signature"></span>
888
- </h4>
889
- </span>
890
-
891
-
892
-
893
-
894
-
895
- <div class="description">
896
- <p>every tx done is trough contracts so no need for amount
897
- data is undefined when nothing is returned
898
- error is thrown on error so undefined data doesn't mean there is an error...</p>
899
- </div>
900
-
901
-
902
-
903
-
904
-
905
-
906
-
907
- <h5>Parameters:</h5>
908
-
909
-
910
- <table class="params">
911
- <thead>
912
- <tr>
913
-
914
- <th>Name</th>
915
-
916
-
917
- <th>Type</th>
918
-
919
-
920
-
921
-
922
-
923
- <th class="last">Description</th>
924
- </tr>
925
- </thead>
926
-
927
- <tbody>
928
-
929
- <tr>
930
-
931
- <td class="name"><code>from</code></td>
932
-
933
-
934
- <td class="type">
935
-
936
-
937
- <span class="param-type">
938
- String
939
- </span>
940
-
941
-
942
-
943
-
944
-
945
- </td>
946
-
947
-
948
-
949
-
950
-
951
- <td class="description last">
952
- <p>the sender address</p>
953
-
954
- </td>
955
- </tr>
956
-
957
-
958
- <tr>
959
-
960
- <td class="name"><code>to</code></td>
961
-
962
-
963
- <td class="type">
964
-
965
-
966
- <span class="param-type">
967
- String
968
- </span>
969
-
970
-
971
-
972
-
973
-
974
- </td>
975
-
976
-
977
-
978
-
979
-
980
- <td class="description last">
981
- <p>the contract address for the contract to interact with</p>
982
-
983
- </td>
984
- </tr>
985
-
986
-
987
- <tr>
988
-
989
- <td class="name"><code>method</code></td>
990
-
991
-
992
- <td class="type">
993
-
994
-
995
- <span class="param-type">
996
- String
997
- </span>
998
-
999
-
1000
-
1001
-
1002
-
1003
- </td>
1004
-
1005
-
1006
-
1007
-
1008
-
1009
- <td class="description last">
1010
- <p>the method/function to run</p>
1011
-
1012
- </td>
1013
- </tr>
1014
-
1015
-
1016
- <tr>
1017
-
1018
- <td class="name"><code>params</code></td>
1019
-
1020
-
1021
- <td class="type">
1022
-
1023
-
1024
- <span class="param-type">
1025
- Array
1026
- </span>
1027
-
1028
-
1029
-
1030
-
1031
-
1032
- </td>
1033
-
1034
-
1035
-
1036
-
1037
-
1038
- <td class="description last">
1039
- <p>array of paramters to apply to the contract method</p>
1040
-
1041
- </td>
1042
- </tr>
1043
-
1044
-
1045
- <tr>
1046
-
1047
- <td class="name"><code>nonce</code></td>
1048
-
1049
-
1050
- <td class="type">
1051
-
1052
-
1053
- <span class="param-type">
1054
- Number
1055
- </span>
1056
-
1057
-
1058
-
1059
-
1060
-
1061
- </td>
1062
-
1063
-
1064
-
1065
-
1066
-
1067
- <td class="description last">
1068
- <p>total transaction count [optional]</p>
1069
-
1070
- </td>
1071
- </tr>
1072
-
1073
-
1074
- </tbody>
1075
- </table>
1076
-
1077
-
1078
-
1079
-
1080
-
1081
- <dl class="details">
1082
-
1083
-
1084
-
1085
-
1086
-
1087
-
1088
-
1089
-
1090
-
1091
-
1092
-
1093
-
1094
-
1095
-
1096
-
1097
-
1098
-
1099
-
1100
-
1101
-
1102
-
1103
-
1104
-
1105
-
1106
-
1107
-
1108
- <dt class="tag-source">Source:</dt>
1109
- <dd class="tag-source">
1110
- <ul class="dummy">
1111
- <li>
1112
- <a href="chain.js.html">chain.js</a>, <a href="chain.js.html#line633">line 633</a>
1113
- </li>
1114
- </ul>
1115
- </dd>
1116
-
1117
-
1118
-
1119
-
1120
-
1121
-
1122
-
1123
- </dl>
1124
-
1125
-
1126
-
1127
-
1128
-
1129
-
1130
-
1131
-
1132
-
1133
-
1134
-
1135
-
1136
-
1137
-
1138
-
1139
-
1140
-
1141
-
1142
-
1143
-
1144
- <span class='name-container'>
1145
- <a class="link-icon" href="#createTransactionHash">
1146
- <svg height="20" width="20" style="fill: black;">
1147
- <use xlink:href="#linkIcon"></use>
1148
- </svg>
1149
- </a>
1150
- <h4 class="name" id="createTransactionHash">
1151
- <span class="type-signature">(async) </span>createTransactionHash<span class="signature">(transaction)</span><span class="type-signature"></span>
1152
- </h4>
1153
- </span>
1154
-
1155
-
1156
-
1157
-
1158
-
1159
-
1160
-
1161
-
1162
-
1163
-
1164
-
1165
- <h5>Parameters:</h5>
1166
-
1167
-
1168
- <table class="params">
1169
- <thead>
1170
- <tr>
1171
-
1172
- <th>Name</th>
1173
-
1174
-
1175
- <th>Type</th>
1176
-
1177
-
1178
-
1179
-
1180
-
1181
- <th class="last">Description</th>
1182
- </tr>
1183
- </thead>
1184
-
1185
- <tbody>
1186
-
1187
- <tr>
1188
-
1189
- <td class="name"><code>transaction</code></td>
1190
-
1191
-
1192
- <td class="type">
1193
-
1194
-
1195
- <span class="param-type">
1196
- Object
1197
- </span>
1198
-
1199
-
1200
-
1201
-
1202
-
1203
- </td>
1204
-
1205
-
1206
-
1207
-
1208
-
1209
- <td class="description last">
1210
- <p>{}</p>
1211
-
1212
- <h6>Properties</h6>
1213
-
1214
-
1215
- <table class="params">
1216
- <thead>
1217
- <tr>
1218
-
1219
- <th>Name</th>
1220
-
1221
-
1222
- <th>Type</th>
1223
-
1224
-
1225
-
1226
-
1227
-
1228
- <th class="last">Description</th>
1229
- </tr>
1230
- </thead>
1231
-
1232
- <tbody>
1233
-
1234
- <tr>
1235
-
1236
- <td class="name"><code>from</code></td>
1237
-
1238
-
1239
- <td class="type">
1240
-
1241
-
1242
- <span class="param-type">
1243
- String
1244
- </span>
1245
-
1246
-
1247
-
1248
-
1249
-
1250
- </td>
1251
-
1252
-
1253
-
1254
-
1255
-
1256
- <td class="description last">
1257
- <p>address</p>
1258
-
1259
- </td>
1260
- </tr>
1261
-
1262
-
1263
- <tr>
1264
-
1265
- <td class="name"><code>to</code></td>
1266
-
1267
-
1268
- <td class="type">
1269
-
1270
-
1271
- <span class="param-type">
1272
- String
1273
- </span>
1274
-
1275
-
1276
-
1277
-
1278
-
1279
- </td>
1280
-
1281
-
1282
-
1283
-
1284
-
1285
- <td class="description last">
1286
- <p>address</p>
1287
-
1288
- </td>
1289
- </tr>
1290
-
1291
-
1292
- <tr>
1293
-
1294
- <td class="name"><code>params</code></td>
1295
-
1296
-
1297
- <td class="type">
1298
-
1299
-
1300
- <span class="param-type">
1301
- Object
1302
- </span>
1303
-
1304
-
1305
-
1306
-
1307
-
1308
- </td>
1309
-
1310
-
1311
-
1312
-
1313
-
1314
- <td class="description last">
1315
- <p>{}</p>
1316
-
1317
- <h6>Properties</h6>
1318
-
1319
-
1320
- <table class="params">
1321
- <thead>
1322
- <tr>
1323
-
1324
- <th>Name</th>
1325
-
1326
-
1327
- <th>Type</th>
1328
-
1329
-
1330
-
1331
-
1332
-
1333
- <th class="last">Description</th>
1334
- </tr>
1335
- </thead>
1336
-
1337
- <tbody>
1338
-
1339
- <tr>
1340
-
1341
- <td class="name"><code>method</code></td>
1342
-
1343
-
1344
- <td class="type">
1345
-
1346
-
1347
- <span class="param-type">
1348
- String
1349
- </span>
1350
-
1351
-
1352
-
1353
-
1354
-
1355
- </td>
1356
-
1357
-
1358
-
1359
-
1360
-
1361
- <td class="description last">
1362
- <p>get, call</p>
1363
-
1364
- </td>
1365
- </tr>
1366
-
1367
-
1368
- <tr>
1369
-
1370
- <td class="name"><code>data</code></td>
1371
-
1372
-
1373
- <td class="type">
1374
-
1375
-
1376
- <span class="param-type">
1377
- Buffer
1378
- </span>
1379
-
1380
-
1381
-
1382
-
1383
-
1384
- </td>
1385
-
1386
-
1387
-
1388
-
1389
-
1390
- <td class="description last">
1391
-
1392
-
1393
- </td>
1394
- </tr>
1395
-
1396
-
1397
- </tbody>
1398
- </table>
1399
-
1400
-
1401
- </td>
1402
- </tr>
1403
-
1404
-
1405
- </tbody>
1406
- </table>
1407
-
1408
-
1409
- </td>
1410
- </tr>
1411
-
1412
-
1413
- </tbody>
1414
- </table>
1415
-
1416
-
1417
-
1418
-
1419
-
1420
- <dl class="details">
1421
-
1422
-
1423
-
1424
-
1425
-
1426
-
1427
-
1428
-
1429
-
1430
-
1431
-
1432
-
1433
-
1434
-
1435
-
1436
-
1437
-
1438
-
1439
-
1440
-
1441
-
1442
-
1443
-
1444
-
1445
-
1446
-
1447
- <dt class="tag-source">Source:</dt>
1448
- <dd class="tag-source">
1449
- <ul class="dummy">
1450
- <li>
1451
- <a href="chain.js.html">chain.js</a>, <a href="chain.js.html#line570">line 570</a>
1452
- </li>
1453
- </ul>
1454
- </dd>
1455
-
1456
-
1457
-
1458
-
1459
-
1460
-
1461
-
1462
- </dl>
1463
-
1464
-
1465
-
1466
-
1467
-
1468
-
1469
-
1470
-
1471
-
1472
-
1473
-
1474
-
1475
-
1476
-
1477
-
1478
-
1479
-
1480
-
1481
-
1482
-
1483
- <span class='name-container'>
1484
- <a class="link-icon" href="#deployContract">
1485
- <svg height="20" width="20" style="fill: black;">
1486
- <use xlink:href="#linkIcon"></use>
1487
- </svg>
1488
- </a>
1489
- <h4 class="name" id="deployContract">
1490
- <span class="type-signature">(async) </span>deployContract<span class="signature">(contract)</span><span class="type-signature"></span>
1491
- </h4>
1492
- </span>
1493
-
1494
-
1495
-
1496
-
1497
-
1498
-
1499
-
1500
-
1501
-
1502
-
1503
-
1504
- <h5>Parameters:</h5>
1505
-
1506
-
1507
- <table class="params">
1508
- <thead>
1509
- <tr>
1510
-
1511
- <th>Name</th>
1512
-
1513
-
1514
- <th>Type</th>
1515
-
1516
-
1517
-
1518
-
1519
-
1520
- <th class="last">Description</th>
1521
- </tr>
1522
- </thead>
1523
-
1524
- <tbody>
1525
-
1526
- <tr>
1527
-
1528
- <td class="name"><code>contract</code></td>
1529
-
1530
-
1531
- <td class="type">
1532
-
1533
-
1534
- <span class="param-type">
1535
- String
1536
- </span>
1537
-
1538
-
1539
-
1540
-
1541
-
1542
- </td>
1543
-
1544
-
1545
-
1546
-
1547
-
1548
- <td class="description last">
1549
- <p>a contract string (see plugins/deployContract)</p>
1550
-
1551
- </td>
1552
- </tr>
1553
-
1554
-
1555
- </tbody>
1556
- </table>
1557
-
1558
-
1559
-
1560
-
1561
-
1562
- <dl class="details">
1563
-
1564
-
1565
-
1566
-
1567
-
1568
-
1569
-
1570
-
1571
-
1572
-
1573
-
1574
-
1575
-
1576
-
1577
-
1578
-
1579
-
1580
-
1581
-
1582
-
1583
-
1584
-
1585
-
1586
-
1587
-
1588
-
1589
- <dt class="tag-source">Source:</dt>
1590
- <dd class="tag-source">
1591
- <ul class="dummy">
1592
- <li>
1593
- <a href="chain.js.html">chain.js</a>, <a href="chain.js.html#line688">line 688</a>
1594
- </li>
1595
- </ul>
1596
- </dd>
1597
-
1598
-
1599
-
1600
-
1601
-
1602
-
1603
-
1604
- </dl>
1605
-
1606
-
1607
-
1608
-
1609
-
1610
-
1611
-
1612
-
1613
-
1614
-
1615
-
1616
-
1617
-
1618
-
1619
-
1620
-
1621
-
1622
-
1623
-
1624
-
1625
- <span class='name-container'>
1626
- <a class="link-icon" href="#lookup">
1627
- <svg height="20" width="20" style="fill: black;">
1628
- <use xlink:href="#linkIcon"></use>
1629
- </svg>
1630
- </a>
1631
- <h4 class="name" id="lookup">
1632
- <span class="type-signature"></span>lookup<span class="signature">(name)</span><span class="type-signature"> &rarr; {String}</span>
1633
- </h4>
1634
- </span>
1635
-
1636
-
1637
-
1638
-
1639
-
1640
- <div class="description">
1641
- <p>lookup an address for a registered name using the builtin nameService</p>
1642
- </div>
1643
-
1644
-
1645
-
1646
-
1647
-
1648
-
1649
-
1650
- <h5>Parameters:</h5>
1651
-
1652
-
1653
- <table class="params">
1654
- <thead>
1655
- <tr>
1656
-
1657
- <th>Name</th>
1658
-
1659
-
1660
- <th>Type</th>
1661
-
1662
-
1663
-
1664
-
1665
-
1666
- <th class="last">Description</th>
1667
- </tr>
1668
- </thead>
1669
-
1670
- <tbody>
1671
-
1672
- <tr>
1673
-
1674
- <td class="name"><code>name</code></td>
1675
-
1676
-
1677
- <td class="type">
1678
-
1679
-
1680
- <span class="param-type">
1681
- String
1682
- </span>
1683
-
1684
-
1685
-
1686
-
1687
-
1688
- </td>
1689
-
1690
-
1691
-
1692
-
1693
-
1694
- <td class="description last">
1695
- <p>contractName</p>
1696
-
1697
- </td>
1698
- </tr>
1699
-
1700
-
1701
- </tbody>
1702
- </table>
1703
-
1704
-
1705
-
1706
-
1707
-
1708
- <dl class="details">
1709
-
1710
-
1711
-
1712
-
1713
-
1714
-
1715
-
1716
-
1717
-
1718
-
1719
-
1720
-
1721
-
1722
-
1723
-
1724
-
1725
-
1726
-
1727
-
1728
-
1729
-
1730
-
1731
-
1732
-
1733
-
1734
-
1735
- <dt class="tag-source">Source:</dt>
1736
- <dd class="tag-source">
1737
- <ul class="dummy">
1738
- <li>
1739
- <a href="chain.js.html">chain.js</a>, <a href="chain.js.html#line765">line 765</a>
1740
- </li>
1741
- </ul>
1742
- </dd>
1743
-
1744
-
1745
-
1746
-
1747
-
1748
-
1749
-
1750
- </dl>
1751
-
1752
-
1753
-
1754
-
1755
-
1756
-
1757
-
1758
-
1759
-
1760
-
1761
-
1762
-
1763
-
1764
- <div class="example-container">
1765
- <a class="link-icon" href="#lookup-examples">
1766
- <svg height="20" width="20" style="fill: black;">
1767
- <use xlink:href="#linkIcon"></use>
1768
- </svg>
1769
- </a>
1770
- <h5 id="lookup-examples">Example</h5>
1771
-
1772
-
1773
- <pre class="prettyprint"><code>chain.lookup('myCoolContractName') // qmqsfddfdgfg...</code></pre>
1774
-
1775
-
1776
- </div>
1777
-
1778
-
1779
-
1780
-
1781
-
1782
-
1783
-
1784
-
1785
- </article>
1786
- </section>
1787
-
1788
-
1789
-
1790
-
1791
- </div>
1792
-
1793
- <br class="clear">
1794
-
1795
- <footer>
1796
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a>
1797
- </footer>
1798
-
1799
- <script src="scripts/linenumber.js"></script>
1800
- <script src="scripts/pagelocation.js"></script>
1801
-
1802
-
1803
-
1804
- </body>
1805
- </html>