wowok 1.4.18 → 1.4.19
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.
- package/package.json +1 -1
- package/src/guard.ts +137 -136
- package/src/passport.ts +10 -9
- package/src/progress.ts +2 -3
- package/src/protocol.ts +4 -4
package/package.json
CHANGED
package/src/guard.ts
CHANGED
|
@@ -108,126 +108,144 @@ export class Guard {
|
|
|
108
108
|
[MODULES.permission, 'Number of Entities', 8, [], ValueType.TYPE_U64, 'Number of entities in the personnel permission table.'],
|
|
109
109
|
[MODULES.permission, 'Number of Admin', 9, [], ValueType.TYPE_U64, 'Number of administrators.'],
|
|
110
110
|
|
|
111
|
-
[MODULES.repository, 'Permission',
|
|
112
|
-
[MODULES.repository, 'Contains Policy',
|
|
113
|
-
[MODULES.repository, 'Is Permission set of Policy',
|
|
114
|
-
[MODULES.repository, 'Permission of Policy',
|
|
115
|
-
[MODULES.repository, 'Value Type of Policy',
|
|
116
|
-
[MODULES.repository, 'Contains Data for An Address',
|
|
117
|
-
[MODULES.repository, 'Contains Data',
|
|
118
|
-
[MODULES.repository, 'Raw data without Type',
|
|
119
|
-
[MODULES.repository, 'Raw data',
|
|
120
|
-
[MODULES.repository, 'Type',
|
|
121
|
-
[MODULES.repository, 'Policy Mode',
|
|
122
|
-
[MODULES.repository, 'Reference Count',
|
|
123
|
-
[MODULES.repository, 'Is Referenced by An Object',
|
|
124
|
-
[MODULES.repository, 'Data Number',
|
|
125
|
-
[MODULES.repository, 'Data String',
|
|
126
|
-
[MODULES.repository, 'Data Address',
|
|
127
|
-
[MODULES.repository, 'Data Bool',
|
|
128
|
-
[MODULES.repository, 'Data Number Vector',
|
|
129
|
-
[MODULES.repository, 'Data String Vector',
|
|
130
|
-
[MODULES.repository, 'Data Address Vector',
|
|
131
|
-
[MODULES.repository, 'Data Bool Vector',
|
|
132
|
-
|
|
111
|
+
[MODULES.repository, 'Permission', 100, [], ValueType.TYPE_ADDRESS, 'Permission object address.'],
|
|
112
|
+
[MODULES.repository, 'Contains Policy', 101, [ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Is a consensus policy included?', 'Input:the filed name'],
|
|
113
|
+
[MODULES.repository, 'Is Permission set of Policy', 102, [ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Does a certain consensus policy set data operation permissions?', 'Input:the policy name'],
|
|
114
|
+
[MODULES.repository, 'Permission of Policy', 103, [ValueType.TYPE_STRING], ValueType.TYPE_U64, 'The permission index of a certain consensus policy in the Permission object.', 'Input:the policy name'],
|
|
115
|
+
[MODULES.repository, 'Value Type of Policy', 104, [ValueType.TYPE_STRING], ValueType.TYPE_U8, 'Data types defined by consensus policy.', 'Input:the policy name'],
|
|
116
|
+
[MODULES.repository, 'Contains Data for An Address', 105, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether data exists at a certain address?', 'Input:address'],
|
|
117
|
+
[MODULES.repository, 'Contains Data', 106, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Does it contain data for a certain field of an address?', 'Input 1:address, Input 2:the field name'],
|
|
118
|
+
[MODULES.repository, 'Raw data without Type', 107, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_VEC_U8, 'Data for a field at an address and does not contain data type information.', 'Input 1:address, Input 2:the field name'],
|
|
119
|
+
[MODULES.repository, 'Raw data', 108, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_VEC_U8, 'Data for a field at an address, and the first byte contains data type information.', 'Input 1:address, Input 2:the field name'],
|
|
120
|
+
[MODULES.repository, 'Type', 109, [], ValueType.TYPE_U8, 'The repository Type. 0: Normal; 1: Wowok greenee.'],
|
|
121
|
+
[MODULES.repository, 'Policy Mode', 110, [], ValueType.TYPE_U8, 'Policy Mode. 0: Free mode; 1: Strict mode.'],
|
|
122
|
+
[MODULES.repository, 'Reference Count', 111, [], ValueType.TYPE_U64, 'The number of times it is referenced by other objects.'],
|
|
123
|
+
[MODULES.repository, 'Is Referenced by An Object', 112, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Is it referenced by an object?', 'Input:address'],
|
|
124
|
+
[MODULES.repository, 'Data Number', 113, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_U256, 'Data for a field at an address and get unsigned integer type data.', 'Input 1:address, Input 2:the field name'],
|
|
125
|
+
[MODULES.repository, 'Data String', 114, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_STRING, 'Data for a field at an address and get string type data.', 'Input 1:address, Input 2:the field name'],
|
|
126
|
+
[MODULES.repository, 'Data Address', 115, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'Data for a field at an address and get address type data.', 'Input 1:address, Input 2:the field name'],
|
|
127
|
+
[MODULES.repository, 'Data Bool', 116, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Data for a field at an address and get bool type data.', 'Input 1:address, Input 2:the field name'],
|
|
128
|
+
[MODULES.repository, 'Data Number Vector', 117, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_VEC_U256, 'Data for a field at an address and get unsigned integer vector type data.', 'Input 1:address, Input 2:the field name'],
|
|
129
|
+
[MODULES.repository, 'Data String Vector', 118, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_VEC_STRING, 'Data for a field at an address and get string vector type data.', 'Input 1:address, Input 2:the field name'],
|
|
130
|
+
[MODULES.repository, 'Data Address Vector', 119, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_VEC_ADDRESS, 'Data for a field at an address and get address vector type data.', 'Input 1:address, Input 2:the field name'],
|
|
131
|
+
[MODULES.repository, 'Data Bool Vector', 120, [ValueType.TYPE_ADDRESS, ValueType.TYPE_STRING], ValueType.TYPE_VEC_BOOL, 'Data for a field at an address and get bool vector type data.', 'Input 1:address, Input 2:the field name'],
|
|
132
|
+
|
|
133
|
+
[MODULES.entity, 'Contains Entity?', 200, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Is an entity already registered?', 'Input:address'],
|
|
134
|
+
[MODULES.entity, 'Likes', 201, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The number of likes for an address by other addresses.', 'Input:address'],
|
|
135
|
+
[MODULES.entity, 'Dislikes', 202, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The number of dislikes for an address by other addresses.', 'Input:address'],
|
|
136
|
+
[MODULES.entity, 'Entity Info', 203, [ValueType.TYPE_ADDRESS], ValueType.TYPE_VEC_U8, 'Public information about an entity.', 'Input:address'],
|
|
137
|
+
[MODULES.entity, 'Has Resource by Entity?', 204, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether an entity created a resource?', 'Input:address'],
|
|
138
|
+
[MODULES.entity, 'Entity Resource', 205, [ValueType.TYPE_ADDRESS], ValueType.TYPE_ADDRESS, 'The address of a resource object created by an entity.', 'Input:address'],
|
|
139
|
+
|
|
140
|
+
[MODULES.demand, 'Permission', 300, [], ValueType.TYPE_ADDRESS, 'Permission object address.'],
|
|
141
|
+
[MODULES.demand, 'Has Deadline', 301, [], ValueType.TYPE_BOOL, 'Whether to set the expiration time of presenting?'],
|
|
142
|
+
[MODULES.demand, 'Deadline', 302, [], ValueType.TYPE_U64, 'The expiration time of presenting.'],
|
|
143
|
+
[MODULES.demand, 'Bounty Count', 303, [], ValueType.TYPE_U64, 'Number of Bounties.'],
|
|
144
|
+
[MODULES.demand, 'Has Guard', 304, [], ValueType.TYPE_BOOL, 'Whether the present guard is set?'],
|
|
145
|
+
[MODULES.demand, 'Guard', 305, [], ValueType.TYPE_ADDRESS, 'The present guard address.'],
|
|
146
|
+
[MODULES.demand, 'Has Service Picked', 306, [], ValueType.TYPE_BOOL, 'Whether a service has been picked and bounties given?'],
|
|
147
|
+
[MODULES.demand, 'Service Picked', 307, [], ValueType.TYPE_ADDRESS, 'Service address that has been picked.'],
|
|
148
|
+
[MODULES.demand, 'Presenter Count', 308, [], ValueType.TYPE_U64, 'Number of presenters.'],
|
|
149
|
+
[MODULES.demand, 'Has Presenter', 309, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Is a certain address a presenter?', 'Input:address'],
|
|
150
|
+
[MODULES.demand, 'Who Got Bounty', 310, [ValueType.TYPE_ADDRESS], ValueType.TYPE_ADDRESS, 'The address that bounties given.', 'Input:address'],
|
|
151
|
+
|
|
152
|
+
[MODULES.service, 'Permission', 400, [], ValueType.TYPE_ADDRESS, 'Permission object address.'],
|
|
153
|
+
[MODULES.service, 'Payee', 401, [], ValueType.TYPE_ADDRESS, 'Payee address, that all order withdrawals will be collected to this address.'],
|
|
154
|
+
[MODULES.service, 'Has Buying Guard', 402, [], ValueType.TYPE_BOOL, 'Is the guard condition of buying set?'],
|
|
155
|
+
[MODULES.service, 'Buying Guard', 403, [], ValueType.TYPE_ADDRESS, 'Buying guard, that Purchase only if you meet the conditions of the guard.'],
|
|
156
|
+
[MODULES.service, 'Contains Repository', 404, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, "Is a certain repository one of the service's consensus repositories?", 'Input:address'],
|
|
157
|
+
[MODULES.service, 'Has Withdrawing Guard', 405, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether a certain guard is set when withdrawing money?', 'Input:address'],
|
|
158
|
+
[MODULES.service, 'Withdrawing Guard Percent', 406, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The percentage of withdrawals allowed by a certain withdrawal guard.', 'Input:address'],
|
|
159
|
+
[MODULES.service, 'Has Refunding Guard', 407, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether a certain guard is set when refunding money?', 'Input:address'],
|
|
160
|
+
[MODULES.service, 'Refunding Guard Percent', 408, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The percentage of refund allowed by a certain refund guard.', 'Input:address'],
|
|
161
|
+
[MODULES.service, 'Has Sales Item', 409, [ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Is there a sales item for the service?', 'Input:the item name'],
|
|
162
|
+
[MODULES.service, 'Sale Item Price', 410, [ValueType.TYPE_STRING], ValueType.TYPE_U64, 'What is the price of a certain sale item?', 'Input:the item name'],
|
|
163
|
+
[MODULES.service, 'Sale Item Inventory', 411, [ValueType.TYPE_STRING], ValueType.TYPE_U64, 'How much inventory is there for a certain sales item?', 'Input:the item name'],
|
|
164
|
+
[MODULES.service, 'Has Machine', 412, [], ValueType.TYPE_BOOL, "Has the machine(progress generator) that serves the order been set up?"],
|
|
165
|
+
[MODULES.service, 'Machine', 413, [], ValueType.TYPE_ADDRESS, 'Machine address, that generate progresses serving the execution process of order.'],
|
|
166
|
+
[MODULES.service, 'Paused', 414, [], ValueType.TYPE_BOOL, 'Pause the creation of new order?'],
|
|
167
|
+
[MODULES.service, 'Published', 415, [], ValueType.TYPE_BOOL, 'Is it allowed to create orders?'],
|
|
168
|
+
[MODULES.service, 'Has Required Info', 416, [], ValueType.TYPE_BOOL, 'Whether the necessary information that needs to be provided by the customer is set?'],
|
|
169
|
+
[MODULES.service, 'Required Info of Service-Pubkey', 417, [], ValueType.TYPE_STRING, 'The public key used to encrypt customer information, and only the service provider can decrypt and view customer information.'],
|
|
170
|
+
[MODULES.service, 'Required Info', 418, [], ValueType.TYPE_VEC_STRING, 'Names of the required information item that needs to be provided by the customer.'],
|
|
171
|
+
|
|
172
|
+
[MODULES.order, 'Amount', 500, [], ValueType.TYPE_U64, 'Order amount.'],
|
|
173
|
+
[MODULES.order, 'Payer', 501, [], ValueType.TYPE_ADDRESS, 'Order payer.'],
|
|
174
|
+
[MODULES.order, 'Service', 502, [], ValueType.TYPE_ADDRESS, 'Service for creating orders.'],
|
|
175
|
+
[MODULES.order, 'Has Progress', 503, [], ValueType.TYPE_BOOL, 'Is there a Progress for executing the order process?'],
|
|
176
|
+
[MODULES.order, 'Progress', 504, [], ValueType.TYPE_ADDRESS, 'Progress address for executing the order process.'],
|
|
177
|
+
[MODULES.order, 'Required Info Counts', 505, [], ValueType.TYPE_U64, 'How much customer information is required for this order?'],
|
|
178
|
+
[MODULES.order, 'Discount Used', 506, [], ValueType.TYPE_BOOL, 'Discount coupon used for this order?'],
|
|
179
|
+
[MODULES.order, 'Discount', 507, [], ValueType.TYPE_ADDRESS, 'Discount address that already used.'],
|
|
180
|
+
[MODULES.order, 'Balance', 508, [], ValueType.TYPE_U64, 'The amount currently in the order.'],
|
|
181
|
+
[MODULES.order, 'Refunded', 509, [], ValueType.TYPE_BOOL, 'Whether a refund has occurred?'],
|
|
182
|
+
[MODULES.order, 'Withdrawed', 510, [], ValueType.TYPE_BOOL, 'Whether a service provider withdrawal has occurred?'],
|
|
183
|
+
|
|
184
|
+
[MODULES.reward, 'Permission', 600, [], ValueType.TYPE_ADDRESS, 'Permission object address.'],
|
|
185
|
+
[MODULES.reward, 'Rewards Remaining', 601, [], ValueType.TYPE_U64, 'Number of rewards to be claimed.'],
|
|
186
|
+
[MODULES.reward, 'Reward Count Supplied', 602, [], ValueType.TYPE_U64, 'Total rewards supplied.'],
|
|
187
|
+
[MODULES.reward, 'Guard Count', 603, [], ValueType.TYPE_U64, 'The number of claiming guards.'],
|
|
188
|
+
[MODULES.reward, 'Has Guard', 604, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether a claiming guard is set up?', 'Input:address'],
|
|
189
|
+
[MODULES.reward, 'Guard Portion', 605, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The portions of rewards, that can be claimed if a certain guard condition is met.', 'Input:address'],
|
|
190
|
+
[MODULES.reward, 'Deadline', 606, [], ValueType.TYPE_U64, 'The expiration time of claiming.'],
|
|
191
|
+
[MODULES.reward, 'Has Claimed by An Address', 607, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether a certain address has claimed rewards?', 'Input:address'],
|
|
192
|
+
[MODULES.reward, 'Portions Claimed by An Address', 608, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The portions of rewards that have been claimed by a certain address.'],
|
|
193
|
+
[MODULES.reward, 'Number of Addresses Claimed', 609, [], ValueType.TYPE_U64, 'Number of addresses that have claimed rewards.'],
|
|
194
|
+
[MODULES.reward, 'Is Sponsor', 620, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether an address is a sponsor of the reward pool?', 'Input:address'],
|
|
195
|
+
[MODULES.reward, 'Portions by A Sponsor', 611, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The portions of sponsorship reward pools for a certain address.', 'Input:address'],
|
|
196
|
+
[MODULES.reward, 'Number of Sponsors', 612, [], ValueType.TYPE_U64, 'Number of sponsors in the sponsorship reward pool.'],
|
|
197
|
+
[MODULES.reward, 'Allow Repeated Claims', 613, [], ValueType.TYPE_BOOL, 'Whether to allow repeated claims?'],
|
|
198
|
+
|
|
133
199
|
// , means that data fields and data outside the consensus policy definition are allowed to be written
|
|
134
200
|
// , means that only data fields and data defined by the consensus policy are allowed to be written.
|
|
135
|
-
[MODULES.machine, 'Permission',
|
|
136
|
-
[MODULES.machine, 'Paused',
|
|
137
|
-
[MODULES.machine, 'Published',
|
|
138
|
-
[MODULES.machine, 'Is Consensus Repository',
|
|
139
|
-
[MODULES.machine, 'Has Endpoint',
|
|
140
|
-
[MODULES.machine, 'Endpoint',
|
|
141
|
-
|
|
142
|
-
[MODULES.progress, 'Machine', 51, [], ValueType.TYPE_ADDRESS, 'The Machine object that created this Progress.'],
|
|
143
|
-
[MODULES.progress, 'Current Node', 52, [], ValueType.TYPE_STRING, 'The name of the currently running node.'],
|
|
144
|
-
[MODULES.progress, 'Has Parent', 53, [], ValueType.TYPE_BOOL, 'Is the parent Progress defined?'],
|
|
145
|
-
[MODULES.progress, 'Parent', 54, [], ValueType.TYPE_ADDRESS, 'The parent Progress, that contains some child Progress.'],
|
|
146
|
-
[MODULES.progress, 'Has Task', 55, [], ValueType.TYPE_BOOL, 'Does it contain clear task(eg. an Order)?'],
|
|
147
|
-
[MODULES.progress, 'Task', 56, [], ValueType.TYPE_ADDRESS, 'Task object address.'],
|
|
148
|
-
[MODULES.progress, 'Has Unique Permission', 57, [ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Does Progress define a unique operation permission?', 'Input:opertor name'],
|
|
149
|
-
[MODULES.progress, 'Is Unique Permission Operator', 58, [ValueType.TYPE_STRING, ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Is an address an operator with unique permissions?', 'Input 1:operator name; Input 2:address'],
|
|
150
|
-
[MODULES.progress, 'Has Context Repository', 59, [], ValueType.TYPE_BOOL, 'Whether the repository reference for Progress is set?'],
|
|
151
|
-
[MODULES.progress, 'Context Repository', 60, [], ValueType.TYPE_ADDRESS, 'Repository reference for Progress.'],
|
|
152
|
-
[MODULES.progress, 'Last Session Time', 61, [], ValueType.TYPE_U64, 'Time when the previous session was completed.'],
|
|
153
|
-
[MODULES.progress, 'Last Session Node', 62, [], ValueType.TYPE_STRING, 'The name of the last completed node.'],
|
|
154
|
-
[MODULES.progress, 'Current Session-id', 63, [], ValueType.TYPE_U64, 'The session id of ongoing node.'],
|
|
155
|
-
[MODULES.progress, 'Parent Session-id', 64, [], ValueType.TYPE_U64, 'The child process was started in the Session-id phase of the parent process.'],
|
|
156
|
-
[MODULES.progress, 'Parent Next Node', 65, [], ValueType.TYPE_STRING, 'The child process is started at the next node stage of the parent process.'],
|
|
157
|
-
[MODULES.progress, 'Parent Forward', 66, [], ValueType.TYPE_STRING, 'The child process is started in the Forward phase of the next node of the parent process.'],
|
|
158
|
-
[MODULES.progress, 'Parent Node', 67, [], ValueType.TYPE_STRING, 'The node name of the parent process where the child process is located.'],
|
|
159
|
-
[MODULES.progress, 'Forward Accomplished', 68, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Has a forward been accomplished?', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
160
|
-
[MODULES.progress, 'Forward Operator', 69, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The forward operator.', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
161
|
-
[MODULES.progress, 'Forward Sub-progress', 70, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The forward child process address(if set).', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
162
|
-
[MODULES.progress, 'Forward Deliverables', 71, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The forward deliverable(if set).', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
163
|
-
[MODULES.progress, 'Forward time', 72, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_U64, 'The time when the forward was last triggered.', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
164
|
-
[MODULES.progress, 'Closest Session Time', 73, [ValueType.TYPE_STRING], ValueType.TYPE_U64, 'The time a node that closest time to the current node completes its session.', 'Input:the node name'],
|
|
165
|
-
[MODULES.progress, 'Closest Forward Accomplished', 74, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Has a forward been accomplished?', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
166
|
-
[MODULES.progress, 'Closest Forward Operator', 75, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The operator of the forward that closest time to the current node.', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
167
|
-
[MODULES.progress, 'Closest Forward Sub-progress', 76, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The child process address(if set) of the forward that closest time to the current node.', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
168
|
-
[MODULES.progress, 'Closest Forward Deliverables', 77, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The deliverable(if set) of the forward that closest time to the current node.', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
169
|
-
[MODULES.progress, 'Closest Forward time', 78, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_U64, 'The time when the forward that closest time to the current node was last triggered.', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
170
|
-
|
|
171
|
-
[MODULES.order, 'Amount', 91, [], ValueType.TYPE_U64, 'Order amount.'],
|
|
172
|
-
[MODULES.order, 'Payer', 92, [], ValueType.TYPE_ADDRESS, 'Order payer.'],
|
|
173
|
-
[MODULES.order, 'Service', 93, [], ValueType.TYPE_ADDRESS, 'Service for creating orders.'],
|
|
174
|
-
[MODULES.order, 'Has Progress', 94, [], ValueType.TYPE_BOOL, 'Is there a Progress for executing the order process?'],
|
|
175
|
-
[MODULES.order, 'Progress', 95, [], ValueType.TYPE_ADDRESS, 'Progress address for executing the order process.'],
|
|
176
|
-
[MODULES.order, 'Required Info Counts', 96, [], ValueType.TYPE_U64, 'How much customer information is required for this order?'],
|
|
177
|
-
[MODULES.order, 'Discount Used', 97, [], ValueType.TYPE_BOOL, 'Discount coupon used for this order?'],
|
|
178
|
-
[MODULES.order, 'Discount', 98, [], ValueType.TYPE_ADDRESS, 'Discount address that already used.'],
|
|
179
|
-
[MODULES.order, 'Balance', 99, [], ValueType.TYPE_U64, 'The amount currently in the order.'],
|
|
180
|
-
[MODULES.order, 'Refunded', 100, [], ValueType.TYPE_BOOL, 'Whether a refund has occurred?'],
|
|
181
|
-
[MODULES.order, 'Withdrawed', 101, [], ValueType.TYPE_BOOL, 'Whether a service provider withdrawal has occurred?'],
|
|
201
|
+
[MODULES.machine, 'Permission', 700, [], ValueType.TYPE_ADDRESS, 'Permission object address.'],
|
|
202
|
+
[MODULES.machine, 'Paused', 701, [], ValueType.TYPE_BOOL, 'Pause the creation of new Progress?'],
|
|
203
|
+
[MODULES.machine, 'Published', 702, [], ValueType.TYPE_BOOL, 'Is it allowed to create Progress?'],
|
|
204
|
+
[MODULES.machine, 'Is Consensus Repository', 703, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether an address is a consensus repository?', 'Input:adddress'],
|
|
205
|
+
[MODULES.machine, 'Has Endpoint', 704, [], ValueType.TYPE_BOOL, 'Is the endpoint set?'],
|
|
206
|
+
[MODULES.machine, 'Endpoint', 705, [], ValueType.TYPE_STRING, 'Endpoint url/ipfs.'],
|
|
182
207
|
|
|
183
|
-
[MODULES.
|
|
184
|
-
[MODULES.
|
|
185
|
-
[MODULES.
|
|
186
|
-
[MODULES.
|
|
187
|
-
[MODULES.
|
|
188
|
-
[MODULES.
|
|
189
|
-
[MODULES.
|
|
190
|
-
[MODULES.
|
|
191
|
-
[MODULES.
|
|
192
|
-
[MODULES.
|
|
193
|
-
[MODULES.
|
|
194
|
-
[MODULES.
|
|
195
|
-
[MODULES.
|
|
196
|
-
[MODULES.
|
|
197
|
-
[MODULES.
|
|
198
|
-
[MODULES.
|
|
199
|
-
[MODULES.
|
|
200
|
-
[MODULES.
|
|
201
|
-
[MODULES.
|
|
208
|
+
[MODULES.progress, 'Machine', 800, [], ValueType.TYPE_ADDRESS, 'The Machine object that created this Progress.'],
|
|
209
|
+
[MODULES.progress, 'Current Node', 801, [], ValueType.TYPE_STRING, 'The name of the currently running node.'],
|
|
210
|
+
[MODULES.progress, 'Has Parent', 802, [], ValueType.TYPE_BOOL, 'Is the parent Progress defined?'],
|
|
211
|
+
[MODULES.progress, 'Parent', 803, [], ValueType.TYPE_ADDRESS, 'The parent Progress, that contains some child Progress.'],
|
|
212
|
+
[MODULES.progress, 'Has Task', 804, [], ValueType.TYPE_BOOL, 'Does it contain clear task(eg. an Order)?'],
|
|
213
|
+
[MODULES.progress, 'Task', 805, [], ValueType.TYPE_ADDRESS, 'Task object address.'],
|
|
214
|
+
[MODULES.progress, 'Has Unique Permission', 806, [ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Does Progress define a unique operation permission?', 'Input:opertor name'],
|
|
215
|
+
[MODULES.progress, 'Is Unique Permission Operator', 807, [ValueType.TYPE_STRING, ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Is an address an operator with unique permissions?', 'Input 1:operator name; Input 2:address'],
|
|
216
|
+
[MODULES.progress, 'Has Context Repository', 808, [], ValueType.TYPE_BOOL, 'Whether the repository reference for Progress is set?'],
|
|
217
|
+
[MODULES.progress, 'Context Repository', 809, [], ValueType.TYPE_ADDRESS, 'Repository reference for Progress.'],
|
|
218
|
+
[MODULES.progress, 'Last Session Time', 810, [], ValueType.TYPE_U64, 'Time when the previous session was completed.'],
|
|
219
|
+
[MODULES.progress, 'Last Session Node', 811, [], ValueType.TYPE_STRING, 'The name of the last completed node.'],
|
|
220
|
+
[MODULES.progress, 'Current Session-id', 812, [], ValueType.TYPE_U64, 'The session id of ongoing node.'],
|
|
221
|
+
[MODULES.progress, 'Parent Session-id', 813, [], ValueType.TYPE_U64, 'The child process was started in the Session-id phase of the parent process.'],
|
|
222
|
+
[MODULES.progress, 'Parent Next Node', 814, [], ValueType.TYPE_STRING, 'The child process is started at the next node stage of the parent process.'],
|
|
223
|
+
[MODULES.progress, 'Parent Forward', 815, [], ValueType.TYPE_STRING, 'The child process is started in the Forward phase of the next node of the parent process.'],
|
|
224
|
+
[MODULES.progress, 'Parent Node', 816, [], ValueType.TYPE_STRING, 'The node name of the parent process where the child process is located.'],
|
|
225
|
+
[MODULES.progress, 'Forward Accomplished', 817, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Has a forward been accomplished?', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
226
|
+
[MODULES.progress, 'Forward Operator', 818, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The forward operator.', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
227
|
+
[MODULES.progress, 'Forward Sub-progress', 819, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The forward child process address(if set).', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
228
|
+
[MODULES.progress, 'Forward Deliverables', 820, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The forward deliverable(if set).', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
229
|
+
[MODULES.progress, 'Forward time', 821, [ValueType.TYPE_U64, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_U64, 'The time when the forward was last triggered.', 'Input 1:session-id; Input 2:next node name; Input 3:forward name'],
|
|
230
|
+
[MODULES.progress, 'Closest Session Time', 822, [ValueType.TYPE_STRING], ValueType.TYPE_U64, 'The time a node that closest time to the current node completes its session.', 'Input:the node name'],
|
|
231
|
+
[MODULES.progress, 'Closest Forward Accomplished', 823, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_BOOL, 'Has a forward been accomplished?', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
232
|
+
[MODULES.progress, 'Closest Forward Operator', 824, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The operator of the forward that closest time to the current node.', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
233
|
+
[MODULES.progress, 'Closest Forward Sub-progress', 825, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The child process address(if set) of the forward that closest time to the current node.', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
234
|
+
[MODULES.progress, 'Closest Forward Deliverables', 826, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_ADDRESS, 'The deliverable(if set) of the forward that closest time to the current node.', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
235
|
+
[MODULES.progress, 'Closest Forward time', 827, [ValueType.TYPE_STRING, ValueType.TYPE_STRING, ValueType.TYPE_STRING], ValueType.TYPE_U64, 'The time when the forward that closest time to the current node was last triggered.', 'Input 1:node name; Input 2:next node name; Input 3:forward name'],
|
|
236
|
+
|
|
237
|
+
[MODULES.wowok, 'Builder', 900, [], ValueType.TYPE_ADDRESS, 'Builder address of Wowok.'],
|
|
238
|
+
[MODULES.wowok, 'Everyone Guard', 901, [], ValueType.TYPE_ADDRESS, 'A guard that all addresses can pass through.'],
|
|
239
|
+
[MODULES.wowok, 'Object of Entities', 902, [], ValueType.TYPE_ADDRESS, 'The address of entity information object.'],
|
|
240
|
+
[MODULES.wowok, 'Grantor Count', 903, [], ValueType.TYPE_U64, 'Number of registered grantors.'],
|
|
241
|
+
[MODULES.wowok, 'Has Grantor', 904, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether an address has been registered as a grantor?', , 'Input:address'],
|
|
242
|
+
[MODULES.wowok, 'Grantor Name', 905, [ValueType.TYPE_ADDRESS], ValueType.TYPE_STRING, "Name of a grantor.", 'Input:address'],
|
|
243
|
+
[MODULES.wowok, 'Grantor Registration Time', 906, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'Registration time of a grantor.', 'Input:address'],
|
|
244
|
+
[MODULES.wowok, 'Grantor Expired Time', 907, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The expiration time of a grantor.', 'Input:address'],
|
|
245
|
+
[MODULES.wowok, 'Grantee Object for Grantor', 908, [ValueType.TYPE_ADDRESS], ValueType.TYPE_ADDRESS, 'Grantee repository address of a grantor.', 'Input:address'],
|
|
202
246
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
[MODULES.demand, 'Deadline', 137, [], ValueType.TYPE_U64, 'The expiration time of presenting.'],
|
|
206
|
-
[MODULES.demand, 'Bounty Count', 138, [], ValueType.TYPE_U64, 'Number of Bounties.'],
|
|
207
|
-
[MODULES.demand, 'Has Guard', 139, [], ValueType.TYPE_BOOL, 'Whether the present guard is set?'],
|
|
208
|
-
[MODULES.demand, 'Guard', 140, [], ValueType.TYPE_ADDRESS, 'The present guard address.'],
|
|
209
|
-
[MODULES.demand, 'Has Service Picked', 141, [], ValueType.TYPE_BOOL, 'Whether a service has been picked and bounties given?'],
|
|
210
|
-
[MODULES.demand, 'Service Picked', 142, [], ValueType.TYPE_ADDRESS, 'Service address that has been picked.'],
|
|
211
|
-
[MODULES.demand, 'Presenter Count', 143, [], ValueType.TYPE_U64, 'Number of presenters.'],
|
|
212
|
-
[MODULES.demand, 'Has Presenter', 144, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Is a certain address a presenter?', 'Input:address'],
|
|
213
|
-
[MODULES.demand, 'Who Got Bounty', 145, [ValueType.TYPE_ADDRESS], ValueType.TYPE_ADDRESS, 'The address that bounties given.', 'Input:address'],
|
|
214
|
-
|
|
215
|
-
[MODULES.reward, 'Permission', 151, [], ValueType.TYPE_ADDRESS, 'Permission object address.'],
|
|
216
|
-
[MODULES.reward, 'Rewards Remaining', 152, [], ValueType.TYPE_U64, 'Number of rewards to be claimed.'],
|
|
217
|
-
[MODULES.reward, 'Reward Count Supplied', 153, [], ValueType.TYPE_U64, 'Total rewards supplied.'],
|
|
218
|
-
[MODULES.reward, 'Guard Count', 154, [], ValueType.TYPE_U64, 'The number of claiming guards.'],
|
|
219
|
-
[MODULES.reward, 'Has Guard', 155, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether a claiming guard is set up?', 'Input:address'],
|
|
220
|
-
[MODULES.reward, 'Guard Portion', 156, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The portions of rewards, that can be claimed if a certain guard condition is met.', 'Input:address'],
|
|
221
|
-
[MODULES.reward, 'Deadline', 157, [], ValueType.TYPE_U64, 'The expiration time of claiming.'],
|
|
222
|
-
[MODULES.reward, 'Has Claimed by An Address', 158, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether a certain address has claimed rewards?', 'Input:address'],
|
|
223
|
-
[MODULES.reward, 'Portions Claimed by An Address', 159, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The portions of rewards that have been claimed by a certain address.'],
|
|
224
|
-
[MODULES.reward, 'Number of Addresses Claimed', 160, [], ValueType.TYPE_U64, 'Number of addresses that have claimed rewards.'],
|
|
225
|
-
[MODULES.reward, 'Is Sponsor', 161, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether an address is a sponsor of the reward pool?', 'Input:address'],
|
|
226
|
-
[MODULES.reward, 'Portions by A Sponsor', 162, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The portions of sponsorship reward pools for a certain address.', 'Input:address'],
|
|
227
|
-
[MODULES.reward, 'Number of Sponsors', 163, [], ValueType.TYPE_U64, 'Number of sponsors in the sponsorship reward pool.'],
|
|
228
|
-
[MODULES.reward, 'Allow Repeated Claims', 164, [], ValueType.TYPE_BOOL, 'Whether to allow repeated claims?'],
|
|
229
|
-
|
|
230
|
-
/* [MODULES.vote, 'Permission', 171, [], ValueType.TYPE_ADDRESS],
|
|
247
|
+
|
|
248
|
+
/* [MODULES.vote, 'Permission', 171, [], ValueType.TYPE_ADDRESS],
|
|
231
249
|
[MODULES.vote, 'Options Locked', 172, [], ValueType.TYPE_BOOL],
|
|
232
250
|
[MODULES.vote, 'Deadline Locked', 173, [], ValueType.TYPE_BOOL],
|
|
233
251
|
[MODULES.vote, 'Vote-Guard Locked', 174, [], ValueType.TYPE_BOOL],
|
|
@@ -249,23 +267,6 @@ export class Guard {
|
|
|
249
267
|
[MODULES.vote, 'Top1 Count by Addresses', 190, [], ValueType.TYPE_U64],
|
|
250
268
|
[MODULES.vote, 'Top1 Option by Votes', 191, [], ValueType.TYPE_STRING],
|
|
251
269
|
[MODULES.vote, 'Top1 Count by Votes', 192, [], ValueType.TYPE_U64], */
|
|
252
|
-
|
|
253
|
-
[MODULES.wowok, 'Builder', 210, [], ValueType.TYPE_ADDRESS, 'Builder address of Wowok.'],
|
|
254
|
-
[MODULES.wowok, 'Everyone Guard', 211, [], ValueType.TYPE_ADDRESS, 'A guard that all addresses can pass through.'],
|
|
255
|
-
[MODULES.wowok, 'Object of Entities', 212, [], ValueType.TYPE_ADDRESS, 'The address of entity information object.'],
|
|
256
|
-
[MODULES.wowok, 'Grantor Count', 213, [], ValueType.TYPE_U64, 'Number of registered grantors.'],
|
|
257
|
-
[MODULES.wowok, 'Has Grantor', 214, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether an address has been registered as a grantor?', , 'Input:address'],
|
|
258
|
-
[MODULES.wowok, 'Grantor Name', 215, [ValueType.TYPE_ADDRESS], ValueType.TYPE_STRING, "Name of a grantor.", 'Input:address'],
|
|
259
|
-
[MODULES.wowok, 'Grantor Registration Time', 216, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'Registration time of a grantor.', 'Input:address'],
|
|
260
|
-
[MODULES.wowok, 'Grantor Expired Time', 217, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The expiration time of a grantor.', 'Input:address'],
|
|
261
|
-
[MODULES.wowok, 'Grantee Object for Grantor', 218, [ValueType.TYPE_ADDRESS], ValueType.TYPE_ADDRESS, 'Grantee repository address of a grantor.', 'Input:address'],
|
|
262
|
-
|
|
263
|
-
[MODULES.entity, 'Contains Entity?', 230, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Is an entity already registered?', 'Input:address'],
|
|
264
|
-
[MODULES.entity, 'Likes', 231, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The number of likes for an address by other addresses.', 'Input:address'],
|
|
265
|
-
[MODULES.entity, 'Dislikes', 232, [ValueType.TYPE_ADDRESS], ValueType.TYPE_U64, 'The number of dislikes for an address by other addresses.', 'Input:address'],
|
|
266
|
-
[MODULES.entity, 'Entity Info', 233, [ValueType.TYPE_ADDRESS], ValueType.TYPE_VEC_U8, 'Public information about an entity.', 'Input:address'],
|
|
267
|
-
[MODULES.entity, 'Has Resource by Entity?', 234, [ValueType.TYPE_ADDRESS], ValueType.TYPE_BOOL, 'Whether an entity created a resource?', 'Input:address'],
|
|
268
|
-
[MODULES.entity, 'Entity Resource', 235, [ValueType.TYPE_ADDRESS], ValueType.TYPE_ADDRESS, 'The address of a resource object created by an entity.', 'Input:address'],
|
|
269
270
|
];
|
|
270
271
|
|
|
271
272
|
static BoolCmd = Guard.QUERIES.filter(q => q[4] === ValueType.TYPE_BOOL);
|
|
@@ -438,10 +439,10 @@ export class GuardMaker {
|
|
|
438
439
|
protected type_validator : Data_Type[] = [];
|
|
439
440
|
protected constant : GuardConstant = new Map<number, Guard_Variable>();
|
|
440
441
|
|
|
441
|
-
private static index: number =
|
|
442
|
+
private static index: number = 1;
|
|
442
443
|
private static get_index() {
|
|
443
444
|
if (GuardMaker.index == 256) {
|
|
444
|
-
GuardMaker.index =
|
|
445
|
+
GuardMaker.index = 1;
|
|
445
446
|
}
|
|
446
447
|
return GuardMaker.index++
|
|
447
448
|
}
|
|
@@ -584,7 +585,7 @@ export class GuardMaker {
|
|
|
584
585
|
}
|
|
585
586
|
}
|
|
586
587
|
|
|
587
|
-
this.data.push(Bcs.getInstance().ser(
|
|
588
|
+
this.data.push(Bcs.getInstance().ser('u16', Guard.QUERIES[query_index][2])); // cmd(u16)
|
|
588
589
|
this.type_validator.splice(offset, Guard.QUERIES[query_index][3].length); // delete type stack
|
|
589
590
|
this.type_validator.push(Guard.QUERIES[query_index][4]); // add the return value type to type stack
|
|
590
591
|
return this;
|
package/src/passport.ts
CHANGED
|
@@ -210,7 +210,7 @@ export class GuardParser {
|
|
|
210
210
|
let addr = '0x' + Bcs.getInstance().de(ValueType.TYPE_ADDRESS, Uint8Array.from(arr)).toString();
|
|
211
211
|
arr.splice(0, 32); // address
|
|
212
212
|
value = addr;
|
|
213
|
-
cmd = arr.
|
|
213
|
+
cmd = Bcs.getInstance().de('u16', Uint8Array.from(arr.splice(0, 2))) as number; // cmd(u16)
|
|
214
214
|
} else if (t[0] == ContextType.TYPE_CONSTANT) {
|
|
215
215
|
let id = arr.splice(0, 1); // key
|
|
216
216
|
let v = constants.find((v) =>
|
|
@@ -218,7 +218,7 @@ export class GuardParser {
|
|
|
218
218
|
((v.type == ValueType.TYPE_ADDRESS) || (v.type == ContextType.TYPE_WITNESS_ID)));
|
|
219
219
|
if (!v) { ERROR(Errors.Fail, 'GuardObject: indentifier not in constant')}
|
|
220
220
|
identifier = id[0];
|
|
221
|
-
cmd = arr.
|
|
221
|
+
cmd = Bcs.getInstance().de('u16', Uint8Array.from(arr.splice(0, 2))) as number; // cmd(u16)
|
|
222
222
|
} else {
|
|
223
223
|
ERROR(Errors.Fail, 'GuardObject: constant type invalid');
|
|
224
224
|
}
|
|
@@ -258,7 +258,7 @@ export class GuardParser {
|
|
|
258
258
|
value = read.value;
|
|
259
259
|
break;
|
|
260
260
|
default:
|
|
261
|
-
ERROR(Errors.Fail, 'GuardObject: parse_bcs types')
|
|
261
|
+
ERROR(Errors.Fail, 'GuardObject: parse_bcs types ' + type)
|
|
262
262
|
}
|
|
263
263
|
data.push({type:type as number, value:value, cmd:cmd, identifier:identifier, child:[]});
|
|
264
264
|
}
|
|
@@ -611,14 +611,15 @@ export class GuardParser {
|
|
|
611
611
|
let type = arr.splice(0, 1);
|
|
612
612
|
if (type[0] == ValueType.TYPE_ADDRESS || type[0] == ContextType.TYPE_WITNESS_ID) {
|
|
613
613
|
let addr = '0x' + Bcs.getInstance().de(ValueType.TYPE_ADDRESS, Uint8Array.from(arr)).toString();
|
|
614
|
-
const offset = arr.splice(0,
|
|
614
|
+
const offset = arr.splice(0, 34); // address + cmd(U16)
|
|
615
615
|
if (type[0] == ValueType.TYPE_ADDRESS) {
|
|
616
616
|
info.query_list.push(addr);
|
|
617
617
|
} else if (type[0] == ContextType.TYPE_WITNESS_ID){
|
|
618
618
|
info.query_list.push({index:this.get_index(), type:type[0], value_or_witness:addr, cmd:offset[offset.length-1]});
|
|
619
619
|
}
|
|
620
620
|
} else if (type[0] == ContextType.TYPE_CONSTANT) {
|
|
621
|
-
const identifer = arr.splice(0,
|
|
621
|
+
const identifer = arr.splice(0, 1); // key
|
|
622
|
+
const cmd:number = Bcs.getInstance().de('u16', Uint8Array.from(arr.splice(0, 2)));
|
|
622
623
|
let constant = info.constant.find((v) =>
|
|
623
624
|
(v.identifier == identifer[0]) &&
|
|
624
625
|
((v.type == ValueType.TYPE_ADDRESS) || (v.type == ContextType.TYPE_WITNESS_ID)));
|
|
@@ -628,17 +629,17 @@ export class GuardParser {
|
|
|
628
629
|
} else if (constant?.type == ContextType.TYPE_WITNESS_ID) {
|
|
629
630
|
const index = this.get_index();
|
|
630
631
|
info.query_list.push({identifier:identifer[0], type:constant.type, value_or_witness:constant.value_or_witness,
|
|
631
|
-
index:index, cmd:
|
|
632
|
-
constant.cmd =
|
|
632
|
+
index:index, cmd:cmd}); // query witness in constant
|
|
633
|
+
constant.cmd = cmd; // mark this is a cmd in querylist(avoid multi input future by singer)
|
|
633
634
|
constant.index = index;
|
|
634
635
|
}
|
|
635
636
|
} else {
|
|
636
|
-
ERROR(Errors.Fail, 'constant type invalid');
|
|
637
|
+
ERROR(Errors.Fail, 'constant type invalid ' + type);
|
|
637
638
|
}
|
|
638
639
|
|
|
639
640
|
break;
|
|
640
641
|
default:
|
|
641
|
-
ERROR(Errors.Fail, 'parse_bcs types')
|
|
642
|
+
ERROR(Errors.Fail, 'parse_bcs types ' + arr)
|
|
642
643
|
}
|
|
643
644
|
}
|
|
644
645
|
}
|
package/src/progress.ts
CHANGED
|
@@ -238,7 +238,7 @@ export class Progress {
|
|
|
238
238
|
this.txb.moveCall({
|
|
239
239
|
target:Protocol.Instance().ProgressFn('parent_set_with_passport') as FnCallType,
|
|
240
240
|
arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.machine),
|
|
241
|
-
this.txb.
|
|
241
|
+
this.txb.object(parent.parent_id),
|
|
242
242
|
this.txb.pure.u64(parent.parent_session_id),
|
|
243
243
|
this.txb.pure.string(parent.next_node),
|
|
244
244
|
this.txb.pure.string(parent.forward),
|
|
@@ -248,7 +248,7 @@ export class Progress {
|
|
|
248
248
|
this.txb.moveCall({
|
|
249
249
|
target:Protocol.Instance().ProgressFn('parent_set') as FnCallType,
|
|
250
250
|
arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.machine),
|
|
251
|
-
this.txb.
|
|
251
|
+
this.txb.object(parent.parent_id),
|
|
252
252
|
this.txb.pure.u64(parent.parent_session_id),
|
|
253
253
|
this.txb.pure.string(parent.next_node),
|
|
254
254
|
this.txb.pure.string(parent.forward),
|
|
@@ -258,7 +258,6 @@ export class Progress {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
next(next:ProgressNext, deliverables_address?:string, sub_id?:string, passport?:PassportObject) {
|
|
261
|
-
console.log(next)
|
|
262
261
|
if (!Progress.IsValidProgressNext(next)) {
|
|
263
262
|
ERROR(Errors.InvalidParam, 'next')
|
|
264
263
|
}
|
package/src/protocol.ts
CHANGED
|
@@ -208,10 +208,10 @@ const TESTNET = {
|
|
|
208
208
|
}
|
|
209
209
|
*/
|
|
210
210
|
const TESTNET = {
|
|
211
|
-
package: "
|
|
212
|
-
wowok_object: '
|
|
213
|
-
entity_object: '
|
|
214
|
-
treasury_cap:'
|
|
211
|
+
package: "0x46e9a55686124138132d83098a1ae0b9d63d91e93d96d636c47b5e6f7f00a3d4",
|
|
212
|
+
wowok_object: '0xa78e02dd7d537ddeab3a33bb9b40df4663f58b4e835dfa5dc430f5ae4e71b4fe',
|
|
213
|
+
entity_object: '0x487524f61ed9dd3f4a02ae7311b2879f3b0ebeef1a9a4cd36f291dcd351e8e56',
|
|
214
|
+
treasury_cap:'0xf5ecc294e9e5524c55a5775c7fb3e8aa8e7d4b6bb4fc2f91712f8610d02e0287',
|
|
215
215
|
}
|
|
216
216
|
const MAINNET = {
|
|
217
217
|
package: "",
|