@lucid-agents/taskmarket 0.6.0 → 0.6.1
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { loadKeystore } from '../../lib/keystore.js';
|
|
3
|
+
import { signMessage } from '../../lib/signer.js';
|
|
3
4
|
import { apiPost } from '../../lib/api.js';
|
|
4
5
|
import { printResult } from '../../lib/output.js';
|
|
5
6
|
export const claimCmd = new Command('claim')
|
|
@@ -7,8 +8,11 @@ export const claimCmd = new Command('claim')
|
|
|
7
8
|
.argument('<taskId>', 'Task ID (0x-prefixed hex)')
|
|
8
9
|
.action(async (taskId) => {
|
|
9
10
|
const keystore = await loadKeystore();
|
|
11
|
+
const message = `taskmarket:claim:${taskId}`;
|
|
12
|
+
const signature = await signMessage(message, keystore);
|
|
10
13
|
const result = (await apiPost(`/api/tasks/${taskId}/claim`, {
|
|
11
14
|
workerAddress: keystore.walletAddress,
|
|
15
|
+
signature,
|
|
12
16
|
}));
|
|
13
17
|
printResult({ claimId: result.claimId });
|
|
14
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim.js","sourceRoot":"","sources":["../../../src/commands/task/claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;KACzC,WAAW,CAAC,0BAA0B,CAAC;KACvC,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC;KACjD,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE;IAC/B,MAAM,QAA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