@blindmarket/sdk 0.4.0 → 0.5.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.
- package/dist/index.js +2 -2
- package/dist/tools/helpers.js +14 -5
- package/dist/types.d.ts +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -297,9 +297,9 @@ export class BlindMarket {
|
|
|
297
297
|
*/
|
|
298
298
|
async verify(params) {
|
|
299
299
|
return this.req('POST', '/api/v1/verification/verify', {
|
|
300
|
-
|
|
300
|
+
taskHash: params.taskHash,
|
|
301
301
|
taskCategory: params.taskCategory,
|
|
302
|
-
taskRequirements: params.taskRequirements,
|
|
302
|
+
...(params.taskRequirements ? { taskRequirements: params.taskRequirements } : {}),
|
|
303
303
|
evidenceSummary: params.evidenceSummary,
|
|
304
304
|
});
|
|
305
305
|
}
|
package/dist/tools/helpers.js
CHANGED
|
@@ -124,13 +124,22 @@ export function createBlindMarketTools(bb) {
|
|
|
124
124
|
return bb.updateAgent(a.agentId, a);
|
|
125
125
|
}, ['agentId']),
|
|
126
126
|
tool(bb, 'verify_task', 'Trigger AI/TEE verification for a submitted task result', {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
// taskHash, not a numeric id: ids collide across 0G and Base, so a number
|
|
128
|
+
// cannot identify a task. taskRequirements is optional and privileged —
|
|
129
|
+
// the backend builds the standard from the task the poster created and
|
|
130
|
+
// accepts this only from the poster or designated verifier.
|
|
131
|
+
taskHash: str('Task hash (bytes32 hex, 0x-prefixed)'),
|
|
132
|
+
taskCategory: str('Task category slug (letters, numbers, spaces, _ and - only)'),
|
|
133
|
+
taskRequirements: str('Optional supplemental requirements (poster/verifier only)'),
|
|
130
134
|
evidenceSummary: str('Summary of submitted evidence'),
|
|
131
135
|
}, async (a) => {
|
|
132
|
-
return bb.verify(
|
|
133
|
-
|
|
136
|
+
return bb.verify({
|
|
137
|
+
taskHash: a.taskHash,
|
|
138
|
+
taskCategory: a.taskCategory,
|
|
139
|
+
...(a.taskRequirements ? { taskRequirements: a.taskRequirements } : {}),
|
|
140
|
+
evidenceSummary: a.evidenceSummary,
|
|
141
|
+
});
|
|
142
|
+
}, ['taskHash', 'taskCategory', 'evidenceSummary']),
|
|
134
143
|
tool(bb, 'get_reputation', "Get an address's on-chain + off-chain reputation", {
|
|
135
144
|
address: str('Wallet address (0x...)'),
|
|
136
145
|
}, async (a) => {
|
package/dist/types.d.ts
CHANGED
|
@@ -228,9 +228,14 @@ export interface TaskTemplate {
|
|
|
228
228
|
estimatedReward?: string;
|
|
229
229
|
}
|
|
230
230
|
export interface VerifyTaskInput {
|
|
231
|
-
|
|
231
|
+
/** taskHash (bytes32 hex). Not the numeric on-chain id — those collide
|
|
232
|
+
* across 0G and Base, so they cannot identify a task. */
|
|
233
|
+
taskHash: string;
|
|
232
234
|
taskCategory: string;
|
|
233
|
-
|
|
235
|
+
/** Optional supplemental requirements. The backend builds the standard being
|
|
236
|
+
* judged against from the task the poster created; this is accepted only
|
|
237
|
+
* from the poster or the designated verifier, never the executor. */
|
|
238
|
+
taskRequirements?: string;
|
|
234
239
|
evidenceSummary: string;
|
|
235
240
|
}
|
|
236
241
|
/** Dot-notation access to valid capability strings. */
|