@steemit/steem-js 0.8.0 → 1.0.0

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 (126) hide show
  1. package/README.md +202 -105
  2. package/dist/api/index.d.ts +128 -0
  3. package/dist/api/methods.d.ts +9 -0
  4. package/dist/api/rpc-auth.d.ts +43 -0
  5. package/dist/api/transports/base.d.ts +13 -0
  6. package/dist/api/transports/http.d.ts +9 -0
  7. package/dist/api/transports/index.d.ts +9 -0
  8. package/dist/api/transports/types.d.ts +35 -0
  9. package/dist/api/transports/ws.d.ts +18 -0
  10. package/dist/auth/ecc/index.d.ts +9 -0
  11. package/dist/auth/ecc/src/address.d.ts +13 -0
  12. package/dist/auth/ecc/src/aes.d.ts +16 -0
  13. package/dist/auth/ecc/src/brain_key.d.ts +1 -0
  14. package/dist/auth/ecc/src/ecdsa.d.ts +28 -0
  15. package/dist/auth/ecc/src/ecsignature.d.ts +19 -0
  16. package/dist/auth/ecc/src/enforce_types.d.ts +5 -0
  17. package/dist/auth/ecc/src/hash.d.ts +25 -0
  18. package/dist/auth/ecc/src/index.d.ts +9 -0
  19. package/dist/auth/ecc/src/key_private.d.ts +38 -0
  20. package/dist/auth/ecc/src/key_public.d.ts +41 -0
  21. package/dist/auth/ecc/src/key_utils.d.ts +9 -0
  22. package/dist/auth/ecc/src/signature.d.ts +18 -0
  23. package/dist/auth/ecc.d.ts +3 -0
  24. package/dist/auth/index.d.ts +48 -0
  25. package/dist/auth/key_classes.d.ts +3 -0
  26. package/dist/auth/serializer.d.ts +19 -0
  27. package/dist/broadcast/helpers.d.ts +11 -0
  28. package/dist/broadcast/index.d.ts +43 -0
  29. package/dist/broadcast/operations.d.ts +6 -0
  30. package/dist/config.d.ts +25 -0
  31. package/dist/crypto/index.d.ts +25 -0
  32. package/dist/formatter/index.d.ts +92 -0
  33. package/dist/index.cjs +25848 -0
  34. package/dist/index.cjs.map +1 -0
  35. package/dist/index.d.ts +30 -0
  36. package/dist/index.js +25812 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/index.umd.js +57513 -0
  39. package/dist/index.umd.js.map +1 -0
  40. package/dist/memo/index.d.ts +11 -0
  41. package/dist/operations/index.d.ts +44 -0
  42. package/dist/serializer/convert.d.ts +12 -0
  43. package/dist/serializer/index.d.ts +11 -0
  44. package/dist/serializer/number_utils.d.ts +8 -0
  45. package/dist/serializer/precision.d.ts +5 -0
  46. package/dist/serializer/types.d.ts +36 -0
  47. package/dist/types/index.d.ts +131 -0
  48. package/dist/types.d.ts +34 -0
  49. package/dist/utils/index.d.ts +8 -0
  50. package/dist/utils.d.ts +2 -0
  51. package/package.json +68 -87
  52. package/.dockerignore +0 -12
  53. package/.editorconfig +0 -20
  54. package/.eslintrc +0 -27
  55. package/LICENSE +0 -21
  56. package/circle.yml +0 -3
  57. package/config.json +0 -10
  58. package/dist/steem-tests.min.js +0 -4097
  59. package/dist/steem.min.js +0 -2089
  60. package/docker-webpack.config.js +0 -44
  61. package/lib/api/index.js +0 -315
  62. package/lib/api/methods.js +0 -428
  63. package/lib/api/rpc-auth.js +0 -135
  64. package/lib/api/transports/base.js +0 -31
  65. package/lib/api/transports/http.js +0 -157
  66. package/lib/api/transports/index.js +0 -13
  67. package/lib/api/transports/ws.js +0 -128
  68. package/lib/auth/ecc/index.js +0 -13
  69. package/lib/auth/ecc/src/address.js +0 -54
  70. package/lib/auth/ecc/src/aes.js +0 -148
  71. package/lib/auth/ecc/src/brain_key.js +0 -13
  72. package/lib/auth/ecc/src/ecdsa.js +0 -193
  73. package/lib/auth/ecc/src/ecsignature.js +0 -102
  74. package/lib/auth/ecc/src/enforce_types.js +0 -42
  75. package/lib/auth/ecc/src/hash.js +0 -58
  76. package/lib/auth/ecc/src/key_private.js +0 -159
  77. package/lib/auth/ecc/src/key_public.js +0 -143
  78. package/lib/auth/ecc/src/key_utils.js +0 -70
  79. package/lib/auth/ecc/src/signature.js +0 -135
  80. package/lib/auth/index.js +0 -113
  81. package/lib/auth/memo.js +0 -119
  82. package/lib/auth/serializer/index.js +0 -15
  83. package/lib/auth/serializer/src/ChainTypes.js +0 -87
  84. package/lib/auth/serializer/src/convert.js +0 -34
  85. package/lib/auth/serializer/src/error_with_cause.js +0 -27
  86. package/lib/auth/serializer/src/fast_parser.js +0 -57
  87. package/lib/auth/serializer/src/number_utils.js +0 -43
  88. package/lib/auth/serializer/src/object_id.js +0 -43
  89. package/lib/auth/serializer/src/operations.js +0 -695
  90. package/lib/auth/serializer/src/precision.js +0 -77
  91. package/lib/auth/serializer/src/serializer.js +0 -165
  92. package/lib/auth/serializer/src/template.js +0 -22
  93. package/lib/auth/serializer/src/types.js +0 -1085
  94. package/lib/auth/serializer/src/validation.js +0 -300
  95. package/lib/broadcast/helpers.js +0 -140
  96. package/lib/broadcast/index.js +0 -106
  97. package/lib/broadcast/operations.js +0 -255
  98. package/lib/browser.js +0 -25
  99. package/lib/config.js +0 -23
  100. package/lib/formatter.js +0 -163
  101. package/lib/index.js +0 -21
  102. package/lib/utils.js +0 -50
  103. package/node-18.dockerfile +0 -28
  104. package/test/Crypto.js +0 -100
  105. package/test/KeyFormats.js +0 -105
  106. package/test/all_types.js +0 -115
  107. package/test/api.test.js +0 -363
  108. package/test/broadcast.test.js +0 -231
  109. package/test/browser/BrowserTests.js +0 -55
  110. package/test/comment.test.js +0 -83
  111. package/test/hf20-accounts.test.js +0 -76
  112. package/test/hf21-sps.test.js +0 -78
  113. package/test/memo.test.js +0 -37
  114. package/test/number_utils.js +0 -28
  115. package/test/operations_test.js +0 -39
  116. package/test/promise-broadcast.test.js +0 -86
  117. package/test/reputation.test.js +0 -68
  118. package/test/smt.test.js +0 -347
  119. package/test/test-post.json +0 -13
  120. package/test/test.html +0 -13
  121. package/test/test_helper.js +0 -19
  122. package/test/types_test.js +0 -139
  123. package/test-github-workflow.bat +0 -19
  124. package/test-github-workflow.sh +0 -15
  125. package/webpack/makeConfig.js +0 -113
  126. package/webpack.config.js +0 -2
@@ -1,695 +0,0 @@
1
- "use strict";
2
-
3
- // This file is merge updated from steemd's js_operation_serializer program.
4
- /*
5
-
6
- ./js_operation_serializer |
7
- sed 's/void/future_extensions/g'|
8
- sed 's/steemit_protocol:://g'|
9
- sed 's/14static_variantIJNS_12fixed_stringINSt3__14pairIyyEEEEEEE/string/g'|
10
- sed 's/steemit_future_extensions/future_extensions/g'|
11
- sed 's/steemit_protocol_//g' > tmp.coffee
12
-
13
- */
14
- // coffee tmp.coffee # fix errors until you see: `ChainTypes is not defined`
15
-
16
- /*
17
-
18
- remove these 7 lines from tmp.coffee:
19
-
20
- static_variant [
21
- pow2
22
- equihash_pow
23
- ] = static_variant [
24
- pow2
25
- equihash_pow
26
- ]
27
-
28
- */
29
-
30
- // npm i -g decaffeinate
31
- // decaffeinate tmp.coffee
32
-
33
- // Merge tmp.js - See "Generated code follows" below
34
-
35
- const types = require("./types");
36
- const SerializerImpl = require("./serializer");
37
- const {
38
- //id_type,
39
- //varint32, uint8, int64, fixed_array, object_id_type, vote_id, address,
40
- uint8,
41
- uint16,
42
- int16,
43
- uint32,
44
- uint64,
45
- int64,
46
- uint128,
47
- string,
48
- string_binary,
49
- bytes,
50
- bool,
51
- array,
52
- // protocol_id_type,
53
- static_variant,
54
- map,
55
- set,
56
- public_key,
57
- time_point_sec,
58
- optional,
59
- asset,
60
- asset_symbol
61
- } = types;
62
- const future_extensions = types.void;
63
- const hardfork_version_vote = types.void;
64
- const version = types.void;
65
- const required_automated_actions = types.void;
66
- const optional_automated_actions = types.void;
67
-
68
- // Place-holder, their are dependencies on "operation" .. The final list of
69
- // operations is not avialble until the very end of the generated code.
70
- // See: operation.st_operations = ...
71
- const operation = static_variant();
72
- module.exports.operation = operation;
73
-
74
- // For module.exports
75
- const Serializer = function (operation_name, serilization_types_object) {
76
- const s = new SerializerImpl(operation_name, serilization_types_object);
77
- return module.exports[operation_name] = s;
78
- };
79
- const beneficiaries = new Serializer("beneficiaries", {
80
- account: string,
81
- weight: uint16
82
- });
83
- const comment_payout_beneficiaries = new Serializer(0, {
84
- beneficiaries: set(beneficiaries)
85
- });
86
- const votable_asset_options = new Serializer("votable_asset_options", {
87
- max_accepted_payout: int64,
88
- allow_curation_rewards: bool,
89
- beneficiaries: comment_payout_beneficiaries
90
- });
91
- const allowed_vote_assets = new Serializer(1, {
92
- votable_assets: map(asset_symbol, votable_asset_options)
93
- });
94
- const smt_generation_unit = new Serializer("smt_generation_unit", {
95
- steem_unit: map(string, uint16),
96
- token_unit: map(string, uint16)
97
- });
98
- const smt_capped_generation_policy = new Serializer(0, {
99
- generation_unit: smt_generation_unit,
100
- extensions: set(future_extensions)
101
- });
102
- const smt_emissions_unit = new Serializer("smt_emissions_unit", {
103
- token_unit: map(string, uint16)
104
- });
105
- const smt_param_allow_voting = new Serializer(0, {
106
- value: bool
107
- });
108
- const smt_param_windows_v1 = new Serializer(0, {
109
- cashout_window_seconds: uint32,
110
- reverse_auction_window_seconds: uint32
111
- });
112
- const smt_param_vote_regeneration_period_seconds_v1 = new Serializer(1, {
113
- vote_regeneration_period_seconds: uint32,
114
- votes_per_regeneration_period: uint32
115
- });
116
- const smt_param_rewards_v1 = new Serializer(2, {
117
- content_constant: uint128,
118
- percent_curation_rewards: uint16,
119
- author_reward_curve: int64,
120
- curation_reward_curve: int64
121
- });
122
- const smt_param_allow_downvotes = new Serializer(3, {
123
- value: bool
124
- });
125
-
126
- // Custom-types after Generated code
127
-
128
- // ## Generated code follows
129
- // -------------------------------
130
- /*
131
- When updating generated code (fix closing notation)
132
- Replace: var operation = static_variant([
133
- with: operation.st_operations = [
134
-
135
- Delete (these are custom types instead):
136
- let public_key = new Serializer(
137
- "public_key",
138
- {key_data: bytes(33)}
139
- );
140
-
141
- let asset = new Serializer(
142
- "asset",
143
- {amount: int64,
144
- symbol: uint64}
145
- );
146
-
147
- Replace: authority.prototype.account_authority_map
148
- With: map((string), (uint16))
149
- */
150
- let signed_transaction = new Serializer("signed_transaction", {
151
- ref_block_num: uint16,
152
- ref_block_prefix: uint32,
153
- expiration: time_point_sec,
154
- operations: array(operation),
155
- extensions: set(future_extensions),
156
- signatures: array(bytes(65))
157
- });
158
- let signed_block = new Serializer("signed_block", {
159
- previous: bytes(20),
160
- timestamp: time_point_sec,
161
- witness: string,
162
- transaction_merkle_root: bytes(20),
163
- extensions: set(static_variant([future_extensions, version, hardfork_version_vote, required_automated_actions, optional_automated_actions])),
164
- witness_signature: bytes(65),
165
- transactions: array(signed_transaction)
166
- });
167
- let block_header = new Serializer("block_header", {
168
- previous: bytes(20),
169
- timestamp: time_point_sec,
170
- witness: string,
171
- transaction_merkle_root: bytes(20),
172
- extensions: set(static_variant([future_extensions, version, hardfork_version_vote]))
173
- });
174
- let signed_block_header = new Serializer("signed_block_header", {
175
- previous: bytes(20),
176
- timestamp: time_point_sec,
177
- witness: string,
178
- transaction_merkle_root: bytes(20),
179
- extensions: set(static_variant([future_extensions, version, hardfork_version_vote, required_automated_actions, optional_automated_actions])),
180
- witness_signature: bytes(65)
181
- });
182
- let vote = new Serializer("vote", {
183
- voter: string,
184
- author: string,
185
- permlink: string,
186
- weight: int16
187
- });
188
- let comment = new Serializer("comment", {
189
- parent_author: string,
190
- parent_permlink: string,
191
- author: string,
192
- permlink: string,
193
- title: string,
194
- body: string,
195
- json_metadata: string
196
- });
197
- let transfer = new Serializer("transfer", {
198
- from: string,
199
- to: string,
200
- amount: asset,
201
- memo: string
202
- });
203
- let transfer_to_vesting = new Serializer("transfer_to_vesting", {
204
- from: string,
205
- to: string,
206
- amount: asset
207
- });
208
- let withdraw_vesting = new Serializer("withdraw_vesting", {
209
- account: string,
210
- vesting_shares: asset
211
- });
212
- let limit_order_create = new Serializer("limit_order_create", {
213
- owner: string,
214
- orderid: uint32,
215
- amount_to_sell: asset,
216
- min_to_receive: asset,
217
- fill_or_kill: bool,
218
- expiration: time_point_sec
219
- });
220
- let limit_order_cancel = new Serializer("limit_order_cancel", {
221
- owner: string,
222
- orderid: uint32
223
- });
224
- let price = new Serializer("price", {
225
- base: asset,
226
- quote: asset
227
- });
228
- let feed_publish = new Serializer("feed_publish", {
229
- publisher: string,
230
- exchange_rate: price
231
- });
232
- let convert = new Serializer("convert", {
233
- owner: string,
234
- requestid: uint32,
235
- amount: asset
236
- });
237
- var authority = new Serializer("authority", {
238
- weight_threshold: uint32,
239
- account_auths: map(string, uint16),
240
- key_auths: map(public_key, uint16)
241
- });
242
- let account_create = new Serializer("account_create", {
243
- fee: asset,
244
- creator: string,
245
- new_account_name: string,
246
- owner: authority,
247
- active: authority,
248
- posting: authority,
249
- memo_key: public_key,
250
- json_metadata: string
251
- });
252
- let account_update = new Serializer("account_update", {
253
- account: string,
254
- owner: optional(authority),
255
- active: optional(authority),
256
- posting: optional(authority),
257
- memo_key: public_key,
258
- json_metadata: string
259
- });
260
- let chain_properties = new Serializer("chain_properties", {
261
- account_creation_fee: asset,
262
- maximum_block_size: uint32,
263
- sbd_interest_rate: uint16
264
- });
265
- let witness_update = new Serializer("witness_update", {
266
- owner: string,
267
- url: string,
268
- block_signing_key: public_key,
269
- props: chain_properties,
270
- fee: asset
271
- });
272
- let account_witness_vote = new Serializer("account_witness_vote", {
273
- account: string,
274
- witness: string,
275
- approve: bool
276
- });
277
- let account_witness_proxy = new Serializer("account_witness_proxy", {
278
- account: string,
279
- proxy: string
280
- });
281
- let pow = new Serializer("pow", {
282
- worker: public_key,
283
- input: bytes(32),
284
- signature: bytes(65),
285
- work: bytes(32)
286
- });
287
- let custom = new Serializer("custom", {
288
- required_auths: set(string),
289
- id: uint16,
290
- data: bytes()
291
- });
292
- let report_over_production = new Serializer("report_over_production", {
293
- reporter: string,
294
- first_block: signed_block_header,
295
- second_block: signed_block_header
296
- });
297
- let delete_comment = new Serializer("delete_comment", {
298
- author: string,
299
- permlink: string
300
- });
301
- let custom_json = new Serializer("custom_json", {
302
- required_auths: set(string),
303
- required_posting_auths: set(string),
304
- id: string,
305
- json: string
306
- });
307
- let comment_options = new Serializer("comment_options", {
308
- author: string,
309
- permlink: string,
310
- max_accepted_payout: asset,
311
- percent_steem_dollars: uint16,
312
- allow_votes: bool,
313
- allow_curation_rewards: bool,
314
- extensions: set(static_variant([comment_payout_beneficiaries, allowed_vote_assets]))
315
- });
316
- let set_withdraw_vesting_route = new Serializer("set_withdraw_vesting_route", {
317
- from_account: string,
318
- to_account: string,
319
- percent: uint16,
320
- auto_vest: bool
321
- });
322
- let limit_order_create2 = new Serializer("limit_order_create2", {
323
- owner: string,
324
- orderid: uint32,
325
- amount_to_sell: asset,
326
- exchange_rate: price,
327
- fill_or_kill: bool,
328
- expiration: time_point_sec
329
- });
330
- let claim_account = new Serializer("claim_account", {
331
- creator: string,
332
- fee: asset,
333
- extensions: set(future_extensions)
334
- });
335
- let create_claimed_account = new Serializer("create_claimed_account", {
336
- creator: string,
337
- new_account_name: string,
338
- owner: authority,
339
- active: authority,
340
- posting: authority,
341
- memo_key: public_key,
342
- json_metadata: string,
343
- extensions: set(future_extensions)
344
- });
345
- let request_account_recovery = new Serializer("request_account_recovery", {
346
- recovery_account: string,
347
- account_to_recover: string,
348
- new_owner_authority: authority,
349
- extensions: set(future_extensions)
350
- });
351
- let recover_account = new Serializer("recover_account", {
352
- account_to_recover: string,
353
- new_owner_authority: authority,
354
- recent_owner_authority: authority,
355
- extensions: set(future_extensions)
356
- });
357
- let change_recovery_account = new Serializer("change_recovery_account", {
358
- account_to_recover: string,
359
- new_recovery_account: string,
360
- extensions: set(future_extensions)
361
- });
362
- let escrow_transfer = new Serializer("escrow_transfer", {
363
- from: string,
364
- to: string,
365
- sbd_amount: asset,
366
- steem_amount: asset,
367
- escrow_id: uint32,
368
- agent: string,
369
- fee: asset,
370
- json_meta: string,
371
- ratification_deadline: time_point_sec,
372
- escrow_expiration: time_point_sec
373
- });
374
- let escrow_dispute = new Serializer("escrow_dispute", {
375
- from: string,
376
- to: string,
377
- agent: string,
378
- who: string,
379
- escrow_id: uint32
380
- });
381
- let escrow_release = new Serializer("escrow_release", {
382
- from: string,
383
- to: string,
384
- agent: string,
385
- who: string,
386
- receiver: string,
387
- escrow_id: uint32,
388
- sbd_amount: asset,
389
- steem_amount: asset
390
- });
391
- let pow2_input = new Serializer("pow2_input", {
392
- worker_account: string,
393
- prev_block: bytes(20),
394
- nonce: uint64
395
- });
396
- let pow2 = new Serializer("pow2", {
397
- input: pow2_input,
398
- pow_summary: uint32
399
- });
400
- let equihash_proof = new Serializer("equihash_proof", {
401
- n: uint32,
402
- k: uint32,
403
- seed: bytes(32),
404
- inputs: array(uint32)
405
- });
406
- let equihash_pow = new Serializer("equihash_pow", {
407
- input: pow2_input,
408
- proof: equihash_proof,
409
- prev_block: bytes(20),
410
- pow_summary: uint32
411
- });
412
- let escrow_approve = new Serializer("escrow_approve", {
413
- from: string,
414
- to: string,
415
- agent: string,
416
- who: string,
417
- escrow_id: uint32,
418
- approve: bool
419
- });
420
- let transfer_to_savings = new Serializer("transfer_to_savings", {
421
- from: string,
422
- to: string,
423
- amount: asset,
424
- memo: string
425
- });
426
- let transfer_from_savings = new Serializer("transfer_from_savings", {
427
- from: string,
428
- request_id: uint32,
429
- to: string,
430
- amount: asset,
431
- memo: string
432
- });
433
- let cancel_transfer_from_savings = new Serializer("cancel_transfer_from_savings", {
434
- from: string,
435
- request_id: uint32
436
- });
437
- let custom_binary = new Serializer("custom_binary", {
438
- required_owner_auths: set(string),
439
- required_active_auths: set(string),
440
- required_posting_auths: set(string),
441
- required_auths: array(authority),
442
- id: string,
443
- data: bytes()
444
- });
445
- let decline_voting_rights = new Serializer("decline_voting_rights", {
446
- account: string,
447
- decline: bool
448
- });
449
- let reset_account = new Serializer("reset_account", {
450
- reset_account: string,
451
- account_to_reset: string,
452
- new_owner_authority: authority
453
- });
454
- let set_reset_account = new Serializer("set_reset_account", {
455
- account: string,
456
- current_reset_account: string,
457
- reset_account: string
458
- });
459
- let claim_reward_balance = new Serializer("claim_reward_balance", {
460
- account: string,
461
- reward_steem: asset,
462
- reward_sbd: asset,
463
- reward_vests: asset
464
- });
465
- let delegate_vesting_shares = new Serializer("delegate_vesting_shares", {
466
- delegator: string,
467
- delegatee: string,
468
- vesting_shares: asset
469
- });
470
- let account_create_with_delegation = new Serializer("account_create_with_delegation", {
471
- fee: asset,
472
- delegation: asset,
473
- creator: string,
474
- new_account_name: string,
475
- owner: authority,
476
- active: authority,
477
- posting: authority,
478
- memo_key: public_key,
479
- json_metadata: string,
480
- extensions: set(future_extensions)
481
- });
482
- let witness_set_properties = new Serializer("witness_set_properties", {
483
- owner: string,
484
- props: string,
485
- extensions: set(future_extensions)
486
- });
487
- let account_update2 = new Serializer("account_update2", {
488
- account: string,
489
- owner: optional(authority),
490
- active: optional(authority),
491
- posting: optional(authority),
492
- memo_key: optional(public_key),
493
- json_metadata: string,
494
- posting_json_metadata: string,
495
- extensions: set(future_extensions)
496
- });
497
- let create_proposal = new Serializer("create_proposal", {
498
- creator: string,
499
- receiver: string,
500
- start_date: time_point_sec,
501
- end_date: time_point_sec,
502
- daily_pay: asset,
503
- subject: string,
504
- permlink: string,
505
- extensions: set(future_extensions)
506
- });
507
- let update_proposal_votes = new Serializer("update_proposal_votes", {
508
- voter: string,
509
- proposal_ids: array(uint64),
510
- approve: bool,
511
- extensions: set(future_extensions)
512
- });
513
- let remove_proposal = new Serializer("remove_proposal", {
514
- proposal_owner: string,
515
- proposal_ids: array(uint64),
516
- extensions: set(future_extensions)
517
- });
518
- let claim_reward_balance2 = new Serializer("claim_reward_balance2", {
519
- account: string,
520
- reward_tokens: array(asset),
521
- extensions: set(future_extensions)
522
- });
523
- let vote2 = new Serializer("vote2", {
524
- voter: string,
525
- author: string,
526
- permlink: string,
527
- rshares: map(asset_symbol, int64),
528
- extensions: set(future_extensions)
529
- });
530
- let smt_create = new Serializer("smt_create", {
531
- control_account: string,
532
- symbol: asset_symbol,
533
- smt_creation_fee: asset,
534
- precision: uint8,
535
- extensions: set(future_extensions)
536
- });
537
- let smt_setup = new Serializer("smt_setup", {
538
- control_account: string,
539
- symbol: asset_symbol,
540
- max_supply: int64,
541
- contribution_begin_time: time_point_sec,
542
- contribution_end_time: time_point_sec,
543
- launch_time: time_point_sec,
544
- steem_units_min: int64,
545
- min_unit_ratio: uint32,
546
- max_unit_ratio: uint32,
547
- extensions: set(future_extensions)
548
- });
549
- let smt_setup_emissions = new Serializer("smt_setup_emissions", {
550
- control_account: string,
551
- symbol: asset_symbol,
552
- schedule_time: time_point_sec,
553
- emissions_unit: smt_emissions_unit,
554
- interval_seconds: uint32,
555
- emission_count: uint32,
556
- lep_time: time_point_sec,
557
- rep_time: time_point_sec,
558
- lep_abs_amount: int64,
559
- rep_abs_amount: int64,
560
- lep_rel_amount_numerator: uint32,
561
- rep_rel_amount_numerator: uint32,
562
- rel_amount_denom_bits: uint8,
563
- remove: bool,
564
- floor_emissions: bool,
565
- extensions: set(future_extensions)
566
- });
567
- let smt_setup_ico_tier = new Serializer("smt_setup_ico_tier", {
568
- control_account: string,
569
- symbol: asset_symbol,
570
- steem_units_cap: int64,
571
- generation_policy: static_variant([smt_capped_generation_policy]),
572
- remove: bool,
573
- extensions: set(future_extensions)
574
- });
575
- let smt_set_setup_parameters = new Serializer("smt_set_setup_parameters", {
576
- control_account: string,
577
- symbol: asset_symbol,
578
- setup_parameters: set(static_variant([smt_param_allow_voting])),
579
- extensions: set(future_extensions)
580
- });
581
- let smt_set_runtime_parameters = new Serializer("smt_set_runtime_parameters", {
582
- control_account: string,
583
- symbol: asset_symbol,
584
- runtime_parameters: set(static_variant([smt_param_windows_v1, smt_param_vote_regeneration_period_seconds_v1, smt_param_rewards_v1, smt_param_allow_downvotes])),
585
- extensions: set(future_extensions)
586
- });
587
- let smt_contribute = new Serializer("smt_contribute", {
588
- contributor: string,
589
- symbol: asset_symbol,
590
- contribution_id: uint32,
591
- contribution: asset,
592
- extensions: set(future_extensions)
593
- });
594
- let fill_convert_request = new Serializer("fill_convert_request", {
595
- owner: string,
596
- requestid: uint32,
597
- amount_in: asset,
598
- amount_out: asset
599
- });
600
- let author_reward = new Serializer("author_reward", {
601
- author: string,
602
- permlink: string,
603
- sbd_payout: asset,
604
- steem_payout: asset,
605
- vesting_payout: asset
606
- });
607
- let curation_reward = new Serializer("curation_reward", {
608
- curator: string,
609
- reward: asset,
610
- comment_author: string,
611
- comment_permlink: string
612
- });
613
- let comment_reward = new Serializer("comment_reward", {
614
- author: string,
615
- permlink: string,
616
- payout: asset
617
- });
618
- let liquidity_reward = new Serializer("liquidity_reward", {
619
- owner: string,
620
- payout: asset
621
- });
622
- let interest = new Serializer("interest", {
623
- owner: string,
624
- interest: asset
625
- });
626
- let fill_vesting_withdraw = new Serializer("fill_vesting_withdraw", {
627
- from_account: string,
628
- to_account: string,
629
- withdrawn: asset,
630
- deposited: asset
631
- });
632
- let fill_order = new Serializer("fill_order", {
633
- current_owner: string,
634
- current_orderid: uint32,
635
- current_pays: asset,
636
- open_owner: string,
637
- open_orderid: uint32,
638
- open_pays: asset
639
- });
640
- let shutdown_witness = new Serializer("shutdown_witness", {
641
- owner: string
642
- });
643
- let fill_transfer_from_savings = new Serializer("fill_transfer_from_savings", {
644
- from: string,
645
- to: string,
646
- amount: asset,
647
- request_id: uint32,
648
- memo: string
649
- });
650
- let hardfork = new Serializer("hardfork", {
651
- hardfork_id: uint32
652
- });
653
- let comment_payout_update = new Serializer("comment_payout_update", {
654
- author: string,
655
- permlink: string
656
- });
657
- let return_vesting_delegation = new Serializer("return_vesting_delegation", {
658
- account: string,
659
- vesting_shares: asset
660
- });
661
- let comment_benefactor_reward = new Serializer("comment_benefactor_reward", {
662
- benefactor: string,
663
- author: string,
664
- permlink: string,
665
- reward: asset
666
- });
667
- operation.st_operations = [vote, comment, transfer, transfer_to_vesting, withdraw_vesting, limit_order_create, limit_order_cancel, feed_publish, convert, account_create, account_update, witness_update, account_witness_vote, account_witness_proxy, pow, custom, report_over_production, delete_comment, custom_json, comment_options, set_withdraw_vesting_route, limit_order_create2, claim_account, create_claimed_account, request_account_recovery, recover_account, change_recovery_account, escrow_transfer, escrow_dispute, escrow_release, pow2, escrow_approve, transfer_to_savings, transfer_from_savings, cancel_transfer_from_savings, custom_binary, decline_voting_rights, reset_account, set_reset_account, claim_reward_balance, delegate_vesting_shares, account_create_with_delegation, witness_set_properties, account_update2, create_proposal, update_proposal_votes, remove_proposal, claim_reward_balance2, vote2, smt_setup, smt_setup_emissions, smt_setup_ico_tier, smt_set_setup_parameters, smt_set_runtime_parameters, smt_create, smt_contribute, fill_convert_request, author_reward, curation_reward, comment_reward, liquidity_reward, interest, fill_vesting_withdraw, fill_order, shutdown_witness, fill_transfer_from_savings, hardfork, comment_payout_update, return_vesting_delegation, comment_benefactor_reward];
668
- let transaction = new Serializer("transaction", {
669
- ref_block_num: uint16,
670
- ref_block_prefix: uint32,
671
- expiration: time_point_sec,
672
- operations: array(operation),
673
- extensions: set(future_extensions)
674
- });
675
-
676
- //# -------------------------------
677
- //# Generated code end S T O P
678
- //# -------------------------------
679
-
680
- // Custom Types (do not over-write)
681
-
682
- const encrypted_memo = new Serializer("encrypted_memo", {
683
- from: public_key,
684
- to: public_key,
685
- nonce: uint64,
686
- check: uint32,
687
- encrypted: string_binary
688
- });
689
- /*
690
-
691
- // Make sure all tests pass
692
-
693
- npm test
694
-
695
- */