viz-js-lib 0.11.0 → 0.12.4

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 (60) hide show
  1. package/.qoder/docs/spec/viz-dns-nameserver-spec.md +982 -0
  2. package/.qoder/docs/viz-cpp-node-docs/data-types.md +322 -0
  3. package/.qoder/docs/viz-cpp-node-docs/index.md +160 -0
  4. package/.qoder/docs/viz-cpp-node-docs/op-account-market.md +236 -0
  5. package/.qoder/docs/viz-cpp-node-docs/op-account.md +199 -0
  6. package/.qoder/docs/viz-cpp-node-docs/op-award.md +162 -0
  7. package/.qoder/docs/viz-cpp-node-docs/op-committee.md +193 -0
  8. package/.qoder/docs/viz-cpp-node-docs/op-content.md +157 -0
  9. package/.qoder/docs/viz-cpp-node-docs/op-escrow.md +224 -0
  10. package/.qoder/docs/viz-cpp-node-docs/op-invite.md +219 -0
  11. package/.qoder/docs/viz-cpp-node-docs/op-proposal.md +229 -0
  12. package/.qoder/docs/viz-cpp-node-docs/op-recovery.md +188 -0
  13. package/.qoder/docs/viz-cpp-node-docs/op-subscription.md +146 -0
  14. package/.qoder/docs/viz-cpp-node-docs/op-transfer-vesting.md +224 -0
  15. package/.qoder/docs/viz-cpp-node-docs/op-witness.md +252 -0
  16. package/.qoder/docs/viz-cpp-node-docs/plugins.md +887 -0
  17. package/.qoder/docs/viz-cpp-node-docs/virtual-operations.md +513 -0
  18. package/.qoder/repowiki/en/content/API Reference/API Reference.md +724 -0
  19. package/.qoder/repowiki/en/content/API Reference/Configuration Options.md +410 -0
  20. package/.qoder/repowiki/en/content/API Reference/Core API Methods.md +547 -0
  21. package/.qoder/repowiki/en/content/API Reference/Streaming APIs.md +380 -0
  22. package/.qoder/repowiki/en/content/API Reference/Transport Layer.md +341 -0
  23. package/.qoder/repowiki/en/content/API Reference/VIZ Blockchain Operations Coverage Status.md +427 -0
  24. package/.qoder/repowiki/en/content/Authentication & Cryptography/Authentication & Cryptography.md +430 -0
  25. package/.qoder/repowiki/en/content/Authentication & Cryptography/Digital Signatures.md +462 -0
  26. package/.qoder/repowiki/en/content/Authentication & Cryptography/Key Management.md +456 -0
  27. package/.qoder/repowiki/en/content/Authentication & Cryptography/Memo Encryption.md +331 -0
  28. package/.qoder/repowiki/en/content/Authentication & Cryptography/Security Practices.md +488 -0
  29. package/.qoder/repowiki/en/content/Broadcast Transactions/Broadcast Transactions.md +432 -0
  30. package/.qoder/repowiki/en/content/Broadcast Transactions/Network Broadcasting.md +418 -0
  31. package/.qoder/repowiki/en/content/Broadcast Transactions/Operation Construction.md +352 -0
  32. package/.qoder/repowiki/en/content/Broadcast Transactions/Transaction Preparation.md +353 -0
  33. package/.qoder/repowiki/en/content/Broadcast Transactions/Transaction Signing.md +404 -0
  34. package/.qoder/repowiki/en/content/Data Serialization/Data Serialization.md +540 -0
  35. package/.qoder/repowiki/en/content/Data Serialization/Encoding & Decoding.md +463 -0
  36. package/.qoder/repowiki/en/content/Data Serialization/Object Templates.md +413 -0
  37. package/.qoder/repowiki/en/content/Data Serialization/Type System.md +514 -0
  38. package/.qoder/repowiki/en/content/Data Serialization/Validation Rules.md +439 -0
  39. package/.qoder/repowiki/en/content/Examples & Tutorials.md +485 -0
  40. package/.qoder/repowiki/en/content/Getting Started.md +345 -0
  41. package/.qoder/repowiki/en/content/Testing & Development.md +637 -0
  42. package/.qoder/repowiki/en/content/Utilities & Helpers.md +557 -0
  43. package/.qoder/repowiki/en/meta/repowiki-metadata.json +1 -0
  44. package/VIZ-JS-LIB-COVERAGE-STATUS.md +356 -0
  45. package/config.json +3 -1
  46. package/dist/statistics.html +1 -1
  47. package/dist/viz-tests.min.js +32 -42
  48. package/dist/viz-tests.min.js.gz +0 -0
  49. package/dist/viz.min.js +8 -18
  50. package/dist/viz.min.js.gz +0 -0
  51. package/lib/api/methods.js +24 -0
  52. package/lib/auth/serializer/src/ChainTypes.js +2 -1
  53. package/lib/auth/serializer/src/operations.js +35 -2
  54. package/lib/broadcast/index.js +29 -15
  55. package/lib/broadcast/operations.js +4 -0
  56. package/lib/dns.js +658 -0
  57. package/lib/index.js +3 -1
  58. package/package.json +3 -2
  59. package/test/dns.test.js +395 -0
  60. package/webpack/makeConfig.js +3 -0
@@ -0,0 +1,146 @@
1
+ # VIZ Blockchain — Paid Subscription Operations
2
+
3
+ Spec for implementing paid subscription operations in PHP/Node.js libraries.
4
+
5
+ Paid subscriptions allow accounts to offer tiered subscription services payable in VIZ tokens, with optional auto-renewal.
6
+
7
+ ---
8
+
9
+ ## `set_paid_subscription_operation`
10
+
11
+ **Type ID:** `50`
12
+ **Required authority:** `active` of `account`
13
+
14
+ Creates or updates a paid subscription offering for an account. Subscribers can then subscribe via `paid_subscribe_operation`.
15
+
16
+ ### Fields
17
+
18
+ | Field | Type | Required | Description |
19
+ |---|---|---|---|
20
+ | `account` | `account_name_type` | yes | Account offering the subscription |
21
+ | `url` | `string` | yes | URL with subscription details |
22
+ | `levels` | `uint16_t` | yes | Number of subscription tiers (1–N) |
23
+ | `amount` | `asset` (VIZ) | yes | Price per period per unit level |
24
+ | `period` | `uint16_t` | yes | Subscription period in days |
25
+
26
+ ### JSON Example
27
+
28
+ ```json
29
+ [50, {
30
+ "account": "alice",
31
+ "url": "https://alice.example.com/subscribe",
32
+ "levels": 3,
33
+ "amount": "10.000 VIZ",
34
+ "period": 30
35
+ }]
36
+ ```
37
+
38
+ ### PHP Example
39
+
40
+ ```php
41
+ $op = [
42
+ 'type' => 'set_paid_subscription_operation',
43
+ 'value' => [
44
+ 'account' => 'alice',
45
+ 'url' => 'https://alice.example.com/subscribe',
46
+ 'levels' => 3,
47
+ 'amount' => '10.000 VIZ',
48
+ 'period' => 30,
49
+ ],
50
+ ];
51
+ ```
52
+
53
+ ### Node.js Example
54
+
55
+ ```js
56
+ const op = ['set_paid_subscription', {
57
+ account: 'alice',
58
+ url: 'https://alice.example.com/subscribe',
59
+ levels: 3,
60
+ amount: '10.000 VIZ',
61
+ period: 30,
62
+ }];
63
+ ```
64
+
65
+ ### Checklist
66
+ - [ ] `amount.symbol` must be `VIZ`
67
+ - [ ] `amount.amount` must be > 0
68
+ - [ ] `levels` must be >= 1
69
+ - [ ] `period` must be >= 1 (days)
70
+ - [ ] Fee (`create_paid_subscription_fee`) charged on first creation
71
+ - [ ] Actual subscription cost = `amount * level` per period
72
+ - [ ] Sign with `account`'s active key
73
+
74
+ ---
75
+
76
+ ## `paid_subscribe_operation`
77
+
78
+ **Type ID:** `51`
79
+ **Required authority:** `active` of `subscriber`
80
+
81
+ Subscribes to or renews a paid subscription. Tokens are transferred from `subscriber` to `account`.
82
+
83
+ ### Fields
84
+
85
+ | Field | Type | Required | Description |
86
+ |---|---|---|---|
87
+ | `subscriber` | `account_name_type` | yes | Subscribing account |
88
+ | `account` | `account_name_type` | yes | Account offering the subscription |
89
+ | `level` | `uint16_t` | yes | Subscription tier (1–max_levels) |
90
+ | `amount` | `asset` (VIZ) | yes | Payment amount |
91
+ | `period` | `uint16_t` | yes | Number of periods to subscribe |
92
+ | `auto_renewal` | `bool` | yes | Whether to auto-renew |
93
+
94
+ ### JSON Example
95
+
96
+ ```json
97
+ [51, {
98
+ "subscriber": "bob",
99
+ "account": "alice",
100
+ "level": 2,
101
+ "amount": "20.000 VIZ",
102
+ "period": 1,
103
+ "auto_renewal": true
104
+ }]
105
+ ```
106
+
107
+ ### PHP Example
108
+
109
+ ```php
110
+ $op = [
111
+ 'type' => 'paid_subscribe_operation',
112
+ 'value' => [
113
+ 'subscriber' => 'bob',
114
+ 'account' => 'alice',
115
+ 'level' => 2,
116
+ 'amount' => '20.000 VIZ',
117
+ 'period' => 1,
118
+ 'auto_renewal' => true,
119
+ ],
120
+ ];
121
+ ```
122
+
123
+ ### Node.js Example
124
+
125
+ ```js
126
+ const op = ['paid_subscribe', {
127
+ subscriber: 'bob',
128
+ account: 'alice',
129
+ level: 2,
130
+ amount: '20.000 VIZ',
131
+ period: 1,
132
+ auto_renewal: true,
133
+ }];
134
+ ```
135
+
136
+ ### Checklist
137
+ - [ ] `amount.symbol` must be `VIZ`
138
+ - [ ] `amount` must match `subscription_amount * level * period`
139
+ - [ ] `level` must be in range [1, subscription.levels]
140
+ - [ ] `period` >= 1
141
+ - [ ] `auto_renewal: true` → tokens deducted automatically each period
142
+ - [ ] `auto_renewal: false` → one-time subscription
143
+ - [ ] If already subscribed: upgrading level requires matching payment for remaining time difference
144
+ - [ ] Virtual `paid_subscription_action_operation` fires on payment
145
+ - [ ] Virtual `cancel_paid_subscription_operation` fires on cancellation/expiry
146
+ - [ ] Sign with `subscriber`'s active key
@@ -0,0 +1,224 @@
1
+ # VIZ Blockchain — Transfer & Vesting Operations
2
+
3
+ Spec for implementing transfer and vesting-related operations in PHP/Node.js libraries.
4
+
5
+ ---
6
+
7
+ ## `transfer_operation`
8
+
9
+ **Type ID:** `2`
10
+ **Required authority:** `active` of `from` (for VIZ tokens), `master` of `from` (for SHARES)
11
+
12
+ Transfers tokens (VIZ or SHARES) from one account to another.
13
+
14
+ ### Fields
15
+
16
+ | Field | Type | Required | Description |
17
+ |---|---|---|---|
18
+ | `from` | `account_name_type` | yes | Sending account |
19
+ | `to` | `account_name_type` | yes | Receiving account |
20
+ | `amount` | `asset` | yes | Amount to transfer (VIZ or SHARES) |
21
+ | `memo` | `string` | yes | Optional memo (plain text or encrypted) |
22
+
23
+ ### JSON Example
24
+
25
+ ```json
26
+ [2, {
27
+ "from": "alice",
28
+ "to": "bob",
29
+ "amount": "10.000 VIZ",
30
+ "memo": "payment for services"
31
+ }]
32
+ ```
33
+
34
+ ### PHP Example
35
+
36
+ ```php
37
+ $op = [
38
+ 'type' => 'transfer_operation',
39
+ 'value' => [
40
+ 'from' => 'alice',
41
+ 'to' => 'bob',
42
+ 'amount' => '10.000 VIZ',
43
+ 'memo' => 'payment for services',
44
+ ],
45
+ ];
46
+ ```
47
+
48
+ ### Node.js Example
49
+
50
+ ```js
51
+ const op = ['transfer', {
52
+ from: 'alice',
53
+ to: 'bob',
54
+ amount: '10.000 VIZ',
55
+ memo: 'payment for services',
56
+ }];
57
+ ```
58
+
59
+ ### Checklist
60
+ - [ ] `amount.symbol` must be `VIZ` or `SHARES`
61
+ - [ ] If `amount.symbol == SHARES` → sign with **master** key
62
+ - [ ] If `amount.symbol == VIZ` → sign with **active** key
63
+ - [ ] `amount.amount` must be > 0
64
+ - [ ] `memo` may be empty string `""`
65
+ - [ ] Encrypted memo format starts with `#` followed by base58 ciphertext
66
+
67
+ ---
68
+
69
+ ## `transfer_to_vesting_operation`
70
+
71
+ **Type ID:** `3`
72
+ **Required authority:** `active` of `from`
73
+
74
+ Converts liquid VIZ tokens into SHARES (staking/vesting). Can vest into another account's balance.
75
+
76
+ ### Fields
77
+
78
+ | Field | Type | Required | Description |
79
+ |---|---|---|---|
80
+ | `from` | `account_name_type` | yes | Account providing VIZ |
81
+ | `to` | `account_name_type` | yes | Account receiving SHARES (same as `from` if empty) |
82
+ | `amount` | `asset` (VIZ) | yes | Amount of VIZ to convert to SHARES |
83
+
84
+ ### JSON Example
85
+
86
+ ```json
87
+ [3, {
88
+ "from": "alice",
89
+ "to": "alice",
90
+ "amount": "100.000 VIZ"
91
+ }]
92
+ ```
93
+
94
+ ### Checklist
95
+ - [ ] `amount.symbol` must be `VIZ`
96
+ - [ ] `amount.amount` must be > 0
97
+ - [ ] `to` can equal `from` (self-vesting) or be a different account
98
+ - [ ] Sign with `from`'s active key
99
+
100
+ ---
101
+
102
+ ## `withdraw_vesting_operation`
103
+
104
+ **Type ID:** `4`
105
+ **Required authority:** `active` of `account`
106
+
107
+ Initiates a vesting withdrawal — schedules gradual conversion of SHARES back to VIZ over multiple intervals.
108
+
109
+ ### Fields
110
+
111
+ | Field | Type | Required | Description |
112
+ |---|---|---|---|
113
+ | `account` | `account_name_type` | yes | Account initiating withdrawal |
114
+ | `vesting_shares` | `asset` (SHARES) | yes | Total SHARES to withdraw (0 to cancel) |
115
+
116
+ ### JSON Example
117
+
118
+ ```json
119
+ [4, {
120
+ "account": "alice",
121
+ "vesting_shares": "1000.000000 SHARES"
122
+ }]
123
+ ```
124
+
125
+ ### Checklist
126
+ - [ ] `vesting_shares.symbol` must be `SHARES`
127
+ - [ ] Set `vesting_shares` to `"0.000000 SHARES"` to **cancel** an active withdrawal
128
+ - [ ] Withdrawal is spread over `withdraw_intervals` intervals (default 28 days)
129
+ - [ ] Each interval: `vesting_shares / withdraw_intervals` SHARES are withdrawn
130
+ - [ ] Sign with `account`'s active key
131
+
132
+ ---
133
+
134
+ ## `set_withdraw_vesting_route_operation`
135
+
136
+ **Type ID:** `11`
137
+ **Required authority:** `active` of `from_account`
138
+
139
+ Routes a percentage of vesting withdrawals to another account (optionally re-vesting immediately).
140
+
141
+ ### Fields
142
+
143
+ | Field | Type | Required | Description |
144
+ |---|---|---|---|
145
+ | `from_account` | `account_name_type` | yes | Account whose withdrawals are being routed |
146
+ | `to_account` | `account_name_type` | yes | Account receiving routed funds |
147
+ | `percent` | `uint16_t` | yes | Percentage to route (0–10000, basis points) |
148
+ | `auto_vest` | `bool` | yes | If true, immediately re-vest the routed tokens |
149
+
150
+ ### JSON Example
151
+
152
+ ```json
153
+ [11, {
154
+ "from_account": "alice",
155
+ "to_account": "bob",
156
+ "percent": 5000,
157
+ "auto_vest": false
158
+ }]
159
+ ```
160
+
161
+ ### Checklist
162
+ - [ ] `percent` range: 0 (remove route) to 10000 (100%)
163
+ - [ ] Multiple routes allowed, but total percent across all routes must be <= 10000
164
+ - [ ] `auto_vest: true` means Bob receives SHARES, not VIZ
165
+ - [ ] Set `percent: 0` to delete the route to `to_account`
166
+ - [ ] Sign with `from_account`'s active key
167
+
168
+ ---
169
+
170
+ ## `delegate_vesting_shares_operation`
171
+
172
+ **Type ID:** `19`
173
+ **Required authority:** `active` of `delegator`
174
+
175
+ Delegates SHARES from one account to another. The delegator retains ownership but the delegatee gains bandwidth and voting power.
176
+
177
+ ### Fields
178
+
179
+ | Field | Type | Required | Description |
180
+ |---|---|---|---|
181
+ | `delegator` | `account_name_type` | yes | Account delegating SHARES |
182
+ | `delegatee` | `account_name_type` | yes | Account receiving delegation |
183
+ | `vesting_shares` | `asset` (SHARES) | yes | Amount to delegate (0 removes delegation) |
184
+
185
+ ### JSON Example
186
+
187
+ ```json
188
+ [19, {
189
+ "delegator": "alice",
190
+ "delegatee": "bob",
191
+ "vesting_shares": "500.000000 SHARES"
192
+ }]
193
+ ```
194
+
195
+ ### PHP Example
196
+
197
+ ```php
198
+ $op = [
199
+ 'type' => 'delegate_vesting_shares_operation',
200
+ 'value' => [
201
+ 'delegator' => 'alice',
202
+ 'delegatee' => 'bob',
203
+ 'vesting_shares' => '500.000000 SHARES',
204
+ ],
205
+ ];
206
+ ```
207
+
208
+ ### Node.js Example
209
+
210
+ ```js
211
+ const op = ['delegate_vesting_shares', {
212
+ delegator: 'alice',
213
+ delegatee: 'bob',
214
+ vesting_shares: '500.000000 SHARES',
215
+ }];
216
+ ```
217
+
218
+ ### Checklist
219
+ - [ ] `vesting_shares.symbol` must be `SHARES`
220
+ - [ ] Set `vesting_shares` to `"0.000000 SHARES"` to **remove** delegation
221
+ - [ ] `vesting_shares` must be >= chain `min_delegation` property (unless 0)
222
+ - [ ] When delegation is removed, SHARES enter a 1-week limbo period before returning
223
+ - [ ] Virtual operation `return_vesting_delegation_operation` fires when limbo period ends
224
+ - [ ] Sign with `delegator`'s active key
@@ -0,0 +1,252 @@
1
+ # VIZ Blockchain — Witness Operations
2
+
3
+ Spec for implementing witness-related operations in PHP/Node.js libraries.
4
+
5
+ ---
6
+
7
+ ## `witness_update_operation`
8
+
9
+ **Type ID:** `6`
10
+ **Required authority:** `active` of `owner`
11
+
12
+ Registers or updates a witness. Setting `block_signing_key` to the null key removes the witness from block production contention.
13
+
14
+ ### Fields
15
+
16
+ | Field | Type | Required | Description |
17
+ |---|---|---|---|
18
+ | `owner` | `account_name_type` | yes | Witness account name |
19
+ | `url` | `string` | yes | Witness website or info URL |
20
+ | `block_signing_key` | `public_key_type` | yes | Key used to sign blocks (set to null key to deactivate) |
21
+
22
+ **Null key** (deactivate witness): `"VIZ1111111111111111111111111111111114T1Anm"`
23
+
24
+ ### JSON Example
25
+
26
+ ```json
27
+ [6, {
28
+ "owner": "alice",
29
+ "url": "https://alice.example.com",
30
+ "block_signing_key": "VIZ5hqSa4NkEZGAMUpoH5EaEr64mBJuMcPpGjvk8qb7hcPFTbXSQ9"
31
+ }]
32
+ ```
33
+
34
+ ### PHP Example
35
+
36
+ ```php
37
+ $op = [
38
+ 'type' => 'witness_update_operation',
39
+ 'value' => [
40
+ 'owner' => 'alice',
41
+ 'url' => 'https://alice.example.com',
42
+ 'block_signing_key' => 'VIZ5hq...',
43
+ ],
44
+ ];
45
+ ```
46
+
47
+ ### Node.js Example
48
+
49
+ ```js
50
+ const op = ['witness_update', {
51
+ owner: 'alice',
52
+ url: 'https://alice.example.com',
53
+ block_signing_key: 'VIZ5hq...',
54
+ }];
55
+ ```
56
+
57
+ ### Checklist
58
+ - [ ] `block_signing_key` must be a valid VIZ public key or the null key
59
+ - [ ] Null key = `VIZ1111111111111111111111111111111114T1Anm` (deactivates witness)
60
+ - [ ] `url` must be non-empty and < `CHAIN_MAX_URL_LENGTH` (256) bytes
61
+ - [ ] Requires `witness_declaration_fee` paid to committee (see chain properties)
62
+ - [ ] Sign with `owner`'s active key
63
+
64
+ ---
65
+
66
+ ## `chain_properties_update_operation`
67
+
68
+ **Type ID:** `25`
69
+ **Required authority:** `active` of `owner`
70
+
71
+ Witness votes on base chain properties (`chain_properties_init` format only). Use `versioned_chain_properties_update_operation` for extended properties.
72
+
73
+ ### Fields
74
+
75
+ | Field | Type | Required | Description |
76
+ |---|---|---|---|
77
+ | `owner` | `account_name_type` | yes | Witness account voting |
78
+ | `props` | `chain_properties_init` | yes | Proposed chain properties |
79
+
80
+ ### JSON Example
81
+
82
+ ```json
83
+ [25, {
84
+ "owner": "alice",
85
+ "props": {
86
+ "account_creation_fee": "1.000 VIZ",
87
+ "maximum_block_size": 65536,
88
+ "create_account_delegation_ratio": 10,
89
+ "create_account_delegation_time": 2592000,
90
+ "min_delegation": "1.000 VIZ",
91
+ "min_curation_percent": 0,
92
+ "max_curation_percent": 10000,
93
+ "bandwidth_reserve_percent": 1000,
94
+ "bandwidth_reserve_below": "1.000000 SHARES",
95
+ "flag_energy_additional_cost": 1000,
96
+ "vote_accounting_min_rshares": 0,
97
+ "committee_request_approve_min_percent": 1000
98
+ }
99
+ }]
100
+ ```
101
+
102
+ ### Checklist
103
+ - [ ] `account_creation_fee.symbol` must be `VIZ`
104
+ - [ ] `min_delegation.symbol` must be `VIZ`
105
+ - [ ] `bandwidth_reserve_below.symbol` must be `SHARES`
106
+ - [ ] `min_curation_percent` <= `max_curation_percent`
107
+ - [ ] All percent fields in basis points (0–10000)
108
+ - [ ] Median of all active witness values is used as actual chain property
109
+
110
+ ---
111
+
112
+ ## `versioned_chain_properties_update_operation`
113
+
114
+ **Type ID:** `46`
115
+ **Required authority:** `active` of `owner`
116
+
117
+ Witness votes on versioned chain properties (supports all hardfork extensions).
118
+
119
+ ### Fields
120
+
121
+ | Field | Type | Required | Description |
122
+ |---|---|---|---|
123
+ | `owner` | `account_name_type` | yes | Witness account voting |
124
+ | `props` | `versioned_chain_properties` | yes | Versioned props variant |
125
+
126
+ ### JSON Example (using hf9 = index 3)
127
+
128
+ ```json
129
+ [46, {
130
+ "owner": "alice",
131
+ "props": [3, {
132
+ "account_creation_fee": "1.000 VIZ",
133
+ "maximum_block_size": 65536,
134
+ "create_account_delegation_ratio": 10,
135
+ "create_account_delegation_time": 2592000,
136
+ "min_delegation": "1.000 VIZ",
137
+ "min_curation_percent": 0,
138
+ "max_curation_percent": 10000,
139
+ "bandwidth_reserve_percent": 1000,
140
+ "bandwidth_reserve_below": "1.000000 SHARES",
141
+ "flag_energy_additional_cost": 1000,
142
+ "vote_accounting_min_rshares": 0,
143
+ "committee_request_approve_min_percent": 1000,
144
+ "inflation_witness_percent": 2000,
145
+ "inflation_ratio_committee_vs_reward_fund": 1000,
146
+ "inflation_recalc_period": 28800,
147
+ "data_operations_cost_additional_bandwidth": 0,
148
+ "witness_miss_penalty_percent": 100,
149
+ "witness_miss_penalty_duration": 86400,
150
+ "create_invite_min_balance": "1.000 VIZ",
151
+ "committee_create_request_fee": "1.000 VIZ",
152
+ "create_paid_subscription_fee": "1.000 VIZ",
153
+ "account_on_sale_fee": "10.000 VIZ",
154
+ "subaccount_on_sale_fee": "1.000 VIZ",
155
+ "witness_declaration_fee": "1.000 VIZ",
156
+ "withdraw_intervals": 28
157
+ }]
158
+ }]
159
+ ```
160
+
161
+ ### Checklist
162
+ - [ ] `props` is serialized as a static_variant: `[index, object]`
163
+ - [ ] Use index `3` for `chain_properties_hf9` (current latest)
164
+ - [ ] See `data-types.md` for full field list per version
165
+
166
+ ---
167
+
168
+ ## `account_witness_vote_operation`
169
+
170
+ **Type ID:** `7`
171
+ **Required authority:** `active` of `account`
172
+
173
+ Votes for or against a witness to be included in block production.
174
+
175
+ ### Fields
176
+
177
+ | Field | Type | Required | Description |
178
+ |---|---|---|---|
179
+ | `account` | `account_name_type` | yes | Voting account |
180
+ | `witness` | `account_name_type` | yes | Witness to vote for/against |
181
+ | `approve` | `bool` | yes | `true` to add vote, `false` to remove vote |
182
+
183
+ ### JSON Example
184
+
185
+ ```json
186
+ [7, {
187
+ "account": "alice",
188
+ "witness": "bob",
189
+ "approve": true
190
+ }]
191
+ ```
192
+
193
+ ### PHP Example
194
+
195
+ ```php
196
+ $op = [
197
+ 'type' => 'account_witness_vote_operation',
198
+ 'value' => [
199
+ 'account' => 'alice',
200
+ 'witness' => 'bob',
201
+ 'approve' => true,
202
+ ],
203
+ ];
204
+ ```
205
+
206
+ ### Node.js Example
207
+
208
+ ```js
209
+ const op = ['account_witness_vote', {
210
+ account: 'alice',
211
+ witness: 'bob',
212
+ approve: true,
213
+ }];
214
+ ```
215
+
216
+ ### Checklist
217
+ - [ ] Account must have SHARES to have meaningful voting weight
218
+ - [ ] `approve: false` removes a previously cast vote
219
+ - [ ] Top 21 witnesses by vote weight produce blocks
220
+ - [ ] Sign with `account`'s active key
221
+
222
+ ---
223
+
224
+ ## `account_witness_proxy_operation`
225
+
226
+ **Type ID:** `8`
227
+ **Required authority:** `active` of `account`
228
+
229
+ Assigns a proxy account for witness voting. All existing votes are removed when a proxy is set.
230
+
231
+ ### Fields
232
+
233
+ | Field | Type | Required | Description |
234
+ |---|---|---|---|
235
+ | `account` | `account_name_type` | yes | Account setting the proxy |
236
+ | `proxy` | `account_name_type` | yes | Proxy account (empty string `""` to remove proxy) |
237
+
238
+ ### JSON Example
239
+
240
+ ```json
241
+ [8, {
242
+ "account": "alice",
243
+ "proxy": "bob"
244
+ }]
245
+ ```
246
+
247
+ ### Checklist
248
+ - [ ] Setting `proxy` to `""` (empty string) removes the proxy
249
+ - [ ] Cannot set proxy to self
250
+ - [ ] Proxy chains are resolved (A→B→C); max depth is limited
251
+ - [ ] Setting a proxy removes all direct witness votes
252
+ - [ ] Sign with `account`'s active key