@nosana/kit 2.3.1 → 2.4.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.
Files changed (45) hide show
  1. package/dist/index.d.ts +13 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +8 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/services/programs/jobs/JobsProgram.d.ts +208 -1
  6. package/dist/services/programs/jobs/JobsProgram.d.ts.map +1 -1
  7. package/dist/services/programs/jobs/JobsProgram.js +108 -0
  8. package/dist/services/programs/jobs/JobsProgram.js.map +1 -1
  9. package/dist/services/programs/jobs/computeUnits.d.ts +16 -0
  10. package/dist/services/programs/jobs/computeUnits.d.ts.map +1 -0
  11. package/dist/services/programs/jobs/computeUnits.generated.d.ts +39 -0
  12. package/dist/services/programs/jobs/computeUnits.generated.d.ts.map +1 -0
  13. package/dist/services/programs/jobs/computeUnits.generated.js +34 -0
  14. package/dist/services/programs/jobs/computeUnits.generated.js.map +1 -0
  15. package/dist/services/programs/jobs/computeUnits.js +20 -0
  16. package/dist/services/programs/jobs/computeUnits.js.map +1 -0
  17. package/dist/services/programs/jobs/decode.d.ts +29 -0
  18. package/dist/services/programs/jobs/decode.d.ts.map +1 -0
  19. package/dist/services/programs/jobs/decode.js +48 -0
  20. package/dist/services/programs/jobs/decode.js.map +1 -0
  21. package/dist/services/programs/jobs/discriminators.d.ts +21 -0
  22. package/dist/services/programs/jobs/discriminators.d.ts.map +1 -0
  23. package/dist/services/programs/jobs/discriminators.js +47 -0
  24. package/dist/services/programs/jobs/discriminators.js.map +1 -0
  25. package/dist/services/programs/jobs/index.d.ts +4 -0
  26. package/dist/services/programs/jobs/index.d.ts.map +1 -1
  27. package/dist/services/programs/jobs/index.js +4 -0
  28. package/dist/services/programs/jobs/index.js.map +1 -1
  29. package/dist/services/programs/jobs/instructions/complete.d.ts +1 -1
  30. package/dist/services/programs/jobs/instructions/complete.d.ts.map +1 -1
  31. package/dist/services/programs/jobs/instructions/complete.js +3 -3
  32. package/dist/services/programs/jobs/instructions/complete.js.map +1 -1
  33. package/dist/services/solana/SolanaService.d.ts +134 -0
  34. package/dist/services/solana/SolanaService.d.ts.map +1 -1
  35. package/dist/services/solana/SolanaService.js +155 -0
  36. package/dist/services/solana/SolanaService.js.map +1 -1
  37. package/dist/utils/index.d.ts +1 -0
  38. package/dist/utils/index.d.ts.map +1 -1
  39. package/dist/utils/index.js +1 -0
  40. package/dist/utils/index.js.map +1 -1
  41. package/dist/utils/packInstructions.d.ts +79 -0
  42. package/dist/utils/packInstructions.d.ts.map +1 -0
  43. package/dist/utils/packInstructions.js +110 -0
  44. package/dist/utils/packInstructions.js.map +1 -0
  45. package/package.json +2 -2
@@ -0,0 +1,39 @@
1
+ /**
2
+ * AUTO-GENERATED compute-unit costs for the Nosana jobs program instructions.
3
+ *
4
+ * Please DO NOT EDIT THIS FILE by hand. Regenerate it with:
5
+ *
6
+ * pnpm gen:cu
7
+ *
8
+ * which measures each instruction's real `unitsConsumed` against a local validator
9
+ * (see packages/scenario/scripts/measure-compute-units.ts) and applies a margin.
10
+ *
11
+ * measuredAt: 2026-06-18T06:08:49.565Z
12
+ * margin: max of 3 samples + 20%, rounded up to 1,000 CU
13
+ */
14
+ /**
15
+ * Measured compute-unit cost per jobs instruction, keyed by the operation name.
16
+ * Each value is a conservative upper bound that includes the safety margin,
17
+ * suitable for use directly as a `SetComputeUnitLimit`.
18
+ * @group @nosana/kit
19
+ */
20
+ export declare const JOBS_COMPUTE_UNITS: {
21
+ readonly open: 37000;
22
+ readonly list: 23000;
23
+ readonly assign: 30000;
24
+ readonly work: 17000;
25
+ readonly complete: 5000;
26
+ readonly finish: 17000;
27
+ readonly quit: 7000;
28
+ readonly stop: 5000;
29
+ readonly extend: 17000;
30
+ readonly delist: 13000;
31
+ readonly close: 26000;
32
+ readonly end: 16000;
33
+ };
34
+ /**
35
+ * Name of a jobs instruction with a known compute-unit cost.
36
+ * @group @nosana/kit
37
+ */
38
+ export type JobsInstructionName = keyof typeof JOBS_COMPUTE_UNITS;
39
+ //# sourceMappingURL=computeUnits.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeUnits.generated.d.ts","sourceRoot":"","sources":["../../../../src/services/programs/jobs/computeUnits.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;CAarB,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * AUTO-GENERATED compute-unit costs for the Nosana jobs program instructions.
3
+ *
4
+ * Please DO NOT EDIT THIS FILE by hand. Regenerate it with:
5
+ *
6
+ * pnpm gen:cu
7
+ *
8
+ * which measures each instruction's real `unitsConsumed` against a local validator
9
+ * (see packages/scenario/scripts/measure-compute-units.ts) and applies a margin.
10
+ *
11
+ * measuredAt: 2026-06-18T06:08:49.565Z
12
+ * margin: max of 3 samples + 20%, rounded up to 1,000 CU
13
+ */
14
+ /**
15
+ * Measured compute-unit cost per jobs instruction, keyed by the operation name.
16
+ * Each value is a conservative upper bound that includes the safety margin,
17
+ * suitable for use directly as a `SetComputeUnitLimit`.
18
+ * @group @nosana/kit
19
+ */
20
+ export const JOBS_COMPUTE_UNITS = {
21
+ open: 37000, // measured
22
+ list: 23000, // measured
23
+ assign: 30000, // measured
24
+ work: 17000, // measured
25
+ complete: 5000, // measured
26
+ finish: 17000, // measured
27
+ quit: 7000, // measured
28
+ stop: 5000, // measured
29
+ extend: 17000, // measured
30
+ delist: 13000, // measured
31
+ close: 26000, // measured
32
+ end: 16000, // measured
33
+ };
34
+ //# sourceMappingURL=computeUnits.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeUnits.generated.js","sourceRoot":"","sources":["../../../../src/services/programs/jobs/computeUnits.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,KAAK,EAAE,WAAW;IACxB,IAAI,EAAE,KAAK,EAAE,WAAW;IACxB,MAAM,EAAE,KAAK,EAAE,WAAW;IAC1B,IAAI,EAAE,KAAK,EAAE,WAAW;IACxB,QAAQ,EAAE,IAAI,EAAE,WAAW;IAC3B,MAAM,EAAE,KAAK,EAAE,WAAW;IAC1B,IAAI,EAAE,IAAI,EAAE,WAAW;IACvB,IAAI,EAAE,IAAI,EAAE,WAAW;IACvB,MAAM,EAAE,KAAK,EAAE,WAAW;IAC1B,MAAM,EAAE,KAAK,EAAE,WAAW;IAC1B,KAAK,EAAE,KAAK,EAAE,WAAW;IACzB,GAAG,EAAE,KAAK,EAAE,WAAW;CACf,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { JOBS_COMPUTE_UNITS } from './computeUnits.generated.js';
2
+ import { getJobsInstructionName } from './discriminators.js';
3
+ /**
4
+ * Resolve the compute-unit cost of a jobs instruction by matching its 8-byte
5
+ * Anchor discriminator against the generated {@link JOBS_COMPUTE_UNITS} table.
6
+ *
7
+ * Works on any raw {@link Instruction} regardless of how it was built, so it can
8
+ * price a mixed batch. Returns a default value for instructions that are not jobs
9
+ * instructions (or whose cost has not been measured), letting the caller apply a
10
+ * fallback.
11
+ *
12
+ * @param instruction The instruction to price.
13
+ * @returns The estimated compute units, or a default value if unknown.
14
+ * @group @nosana/kit
15
+ */
16
+ export function getJobsInstructionComputeUnits(instruction) {
17
+ const name = getJobsInstructionName(instruction);
18
+ return name ? JOBS_COMPUTE_UNITS[name] : 200000;
19
+ }
20
+ //# sourceMappingURL=computeUnits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeUnits.js","sourceRoot":"","sources":["../../../../src/services/programs/jobs/computeUnits.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,8BAA8B,CAAC,WAAwB;IACrE,MAAM,IAAI,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;IACjD,OAAO,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAClD,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { Address, Instruction } from '@solana/kit';
2
+ import type { JobsInstructionName } from './computeUnits.generated.js';
3
+ /** A decoded jobs instruction: its name plus its labelled accounts and arguments. */
4
+ export interface DecodedJobsInstruction {
5
+ /** The jobs instruction name (e.g. `'list'`, `'delist'`). */
6
+ name: JobsInstructionName;
7
+ /**
8
+ * The instruction's accounts keyed by their program-defined role name
9
+ * (e.g. `accounts.job`, `accounts.run`, `accounts.market`).
10
+ */
11
+ accounts: Record<string, Address>;
12
+ /** The decoded instruction arguments (values may include `bigint`). */
13
+ data: Record<string, unknown>;
14
+ }
15
+ /**
16
+ * Decode a jobs instruction into its name and labelled accounts/arguments.
17
+ *
18
+ * This is what lets a bulk `sendBatch` caller recover the accounts an instruction
19
+ * created or acted on — for example the freshly generated `job` and `run`
20
+ * addresses of a `list` — without threading that state through by hand. Account
21
+ * keys match the program's account names.
22
+ *
23
+ * @param instruction The instruction to decode.
24
+ * @returns The decoded instruction, or `undefined` if it is not a recognised
25
+ * jobs instruction (or cannot be decoded).
26
+ * @group @nosana/kit
27
+ */
28
+ export declare function decodeJobsInstruction(instruction: Instruction): DecodedJobsInstruction | undefined;
29
+ //# sourceMappingURL=decode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../../src/services/programs/jobs/decode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAexD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,qFAAqF;AACrF,MAAM,WAAW,sBAAsB;IACrC,6DAA6D;IAC7D,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AA0BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,GACvB,sBAAsB,GAAG,SAAS,CAapC"}
@@ -0,0 +1,48 @@
1
+ import { parseAssignInstruction, parseCloseInstruction, parseCompleteInstruction, parseDelistInstruction, parseEndInstruction, parseExtendInstruction, parseFinishInstruction, parseListInstruction, parseOpenInstruction, parseQuitInstruction, parseStopInstruction, parseWorkInstruction, } from '@nosana/jobs-program';
2
+ import { getJobsInstructionName } from './discriminators.js';
3
+ // name -> generated parser. The casts bridge each parser's specific generic
4
+ // signature to a uniform one; we only ever call the parser matched by name.
5
+ const PARSERS = {
6
+ open: parseOpenInstruction,
7
+ list: parseListInstruction,
8
+ assign: parseAssignInstruction,
9
+ work: parseWorkInstruction,
10
+ complete: parseCompleteInstruction,
11
+ finish: parseFinishInstruction,
12
+ quit: parseQuitInstruction,
13
+ stop: parseStopInstruction,
14
+ extend: parseExtendInstruction,
15
+ delist: parseDelistInstruction,
16
+ close: parseCloseInstruction,
17
+ end: parseEndInstruction,
18
+ };
19
+ /**
20
+ * Decode a jobs instruction into its name and labelled accounts/arguments.
21
+ *
22
+ * This is what lets a bulk `sendBatch` caller recover the accounts an instruction
23
+ * created or acted on — for example the freshly generated `job` and `run`
24
+ * addresses of a `list` — without threading that state through by hand. Account
25
+ * keys match the program's account names.
26
+ *
27
+ * @param instruction The instruction to decode.
28
+ * @returns The decoded instruction, or `undefined` if it is not a recognised
29
+ * jobs instruction (or cannot be decoded).
30
+ * @group @nosana/kit
31
+ */
32
+ export function decodeJobsInstruction(instruction) {
33
+ const name = getJobsInstructionName(instruction);
34
+ if (!name)
35
+ return undefined;
36
+ try {
37
+ const parsed = PARSERS[name](instruction);
38
+ const accounts = {};
39
+ for (const [role, meta] of Object.entries(parsed.accounts)) {
40
+ accounts[role] = meta.address;
41
+ }
42
+ return { name, accounts, data: parsed.data };
43
+ }
44
+ catch {
45
+ return undefined;
46
+ }
47
+ }
48
+ //# sourceMappingURL=decode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode.js","sourceRoot":"","sources":["../../../../src/services/programs/jobs/decode.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAsB7D,4EAA4E;AAC5E,4EAA4E;AAC5E,MAAM,OAAO,GAAmD;IAC9D,IAAI,EAAE,oBAAoD;IAC1D,IAAI,EAAE,oBAAoD;IAC1D,MAAM,EAAE,sBAAsD;IAC9D,IAAI,EAAE,oBAAoD;IAC1D,QAAQ,EAAE,wBAAwD;IAClE,MAAM,EAAE,sBAAsD;IAC9D,IAAI,EAAE,oBAAoD;IAC1D,IAAI,EAAE,oBAAoD;IAC1D,MAAM,EAAE,sBAAsD;IAC9D,MAAM,EAAE,sBAAsD;IAC9D,KAAK,EAAE,qBAAqD;IAC5D,GAAG,EAAE,mBAAmD;CACzD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,qBAAqB,CACnC,WAAwB;IAExB,MAAM,IAAI,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;IACjD,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC;QAC1C,MAAM,QAAQ,GAA4B,EAAE,CAAC;QAC7C,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3D,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QAChC,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type Instruction, type ReadonlyUint8Array } from '@solana/kit';
2
+ import type { JobsInstructionName } from './computeUnits.generated.js';
3
+ /** The number of leading bytes that make up an Anchor instruction discriminator. */
4
+ export declare const DISCRIMINATOR_LENGTH = 8;
5
+ /** The 8-byte Anchor discriminator for each named jobs instruction. */
6
+ export declare const DISCRIMINATORS: Record<JobsInstructionName, ReadonlyUint8Array>;
7
+ /** Hex-encode the first {@link DISCRIMINATOR_LENGTH} bytes of a byte array. */
8
+ export declare function discriminatorHex(bytes: ReadonlyUint8Array): string;
9
+ /**
10
+ * Identify a jobs instruction by matching its 8-byte Anchor discriminator.
11
+ *
12
+ * Works on any raw {@link Instruction} regardless of how it was built, so it can
13
+ * identify instructions in a mixed batch. Returns `undefined` for instructions
14
+ * that are not recognised jobs instructions.
15
+ *
16
+ * @param instruction The instruction to identify.
17
+ * @returns The jobs instruction name, or `undefined` if unrecognised.
18
+ * @group @nosana/kit
19
+ */
20
+ export declare function getJobsInstructionName(instruction: Instruction): JobsInstructionName | undefined;
21
+ //# sourceMappingURL=discriminators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discriminators.d.ts","sourceRoot":"","sources":["../../../../src/services/programs/jobs/discriminators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAe1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,uEAAuE;AACvE,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,mBAAmB,EAAE,kBAAkB,CAa1E,CAAC;AAIF,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAElE;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG,mBAAmB,GAAG,SAAS,CAIhG"}
@@ -0,0 +1,47 @@
1
+ import { getBase16Decoder } from '@solana/kit';
2
+ import { ASSIGN_DISCRIMINATOR, CLOSE_DISCRIMINATOR, COMPLETE_DISCRIMINATOR, DELIST_DISCRIMINATOR, END_DISCRIMINATOR, EXTEND_DISCRIMINATOR, FINISH_DISCRIMINATOR, LIST_DISCRIMINATOR, OPEN_DISCRIMINATOR, QUIT_DISCRIMINATOR, STOP_DISCRIMINATOR, WORK_DISCRIMINATOR, } from '@nosana/jobs-program';
3
+ /** The number of leading bytes that make up an Anchor instruction discriminator. */
4
+ export const DISCRIMINATOR_LENGTH = 8;
5
+ /** The 8-byte Anchor discriminator for each named jobs instruction. */
6
+ export const DISCRIMINATORS = {
7
+ open: OPEN_DISCRIMINATOR,
8
+ list: LIST_DISCRIMINATOR,
9
+ assign: ASSIGN_DISCRIMINATOR,
10
+ work: WORK_DISCRIMINATOR,
11
+ complete: COMPLETE_DISCRIMINATOR,
12
+ finish: FINISH_DISCRIMINATOR,
13
+ quit: QUIT_DISCRIMINATOR,
14
+ stop: STOP_DISCRIMINATOR,
15
+ extend: EXTEND_DISCRIMINATOR,
16
+ delist: DELIST_DISCRIMINATOR,
17
+ close: CLOSE_DISCRIMINATOR,
18
+ end: END_DISCRIMINATOR,
19
+ };
20
+ const base16 = getBase16Decoder();
21
+ /** Hex-encode the first {@link DISCRIMINATOR_LENGTH} bytes of a byte array. */
22
+ export function discriminatorHex(bytes) {
23
+ return base16.decode(bytes.slice(0, DISCRIMINATOR_LENGTH));
24
+ }
25
+ // hex(discriminator) -> instruction name, built once from the table above.
26
+ const NAME_BY_DISCRIMINATOR = new Map(Object.keys(DISCRIMINATORS).map((name) => [
27
+ discriminatorHex(DISCRIMINATORS[name]),
28
+ name,
29
+ ]));
30
+ /**
31
+ * Identify a jobs instruction by matching its 8-byte Anchor discriminator.
32
+ *
33
+ * Works on any raw {@link Instruction} regardless of how it was built, so it can
34
+ * identify instructions in a mixed batch. Returns `undefined` for instructions
35
+ * that are not recognised jobs instructions.
36
+ *
37
+ * @param instruction The instruction to identify.
38
+ * @returns The jobs instruction name, or `undefined` if unrecognised.
39
+ * @group @nosana/kit
40
+ */
41
+ export function getJobsInstructionName(instruction) {
42
+ const data = instruction.data;
43
+ if (!data || data.length < DISCRIMINATOR_LENGTH)
44
+ return undefined;
45
+ return NAME_BY_DISCRIMINATOR.get(discriminatorHex(data));
46
+ }
47
+ //# sourceMappingURL=discriminators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discriminators.js","sourceRoot":"","sources":["../../../../src/services/programs/jobs/discriminators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA6C,MAAM,aAAa,CAAC;AAC1F,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAG9B,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAEtC,uEAAuE;AACvE,MAAM,CAAC,MAAM,cAAc,GAAoD;IAC7E,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,oBAAoB;IAC5B,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,sBAAsB;IAChC,MAAM,EAAE,oBAAoB;IAC5B,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,oBAAoB;IAC5B,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE,mBAAmB;IAC1B,GAAG,EAAE,iBAAiB;CACvB,CAAC;AAEF,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;AAElC,+EAA+E;AAC/E,MAAM,UAAU,gBAAgB,CAAC,KAAyB;IACxD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,2EAA2E;AAC3E,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAClC,MAAM,CAAC,IAAI,CAAC,cAAc,CAA2B,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;IACnE,gBAAgB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI;CACL,CAAC,CACH,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,sBAAsB,CAAC,WAAwB;IAC7D,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;IAC9B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,oBAAoB;QAAE,OAAO,SAAS,CAAC;IAClE,OAAO,qBAAqB,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3D,CAAC"}
@@ -1,2 +1,6 @@
1
1
  export * from './JobsProgram.js';
2
+ export { getJobsInstructionComputeUnits } from './computeUnits.js';
3
+ export { getJobsInstructionName } from './discriminators.js';
4
+ export { decodeJobsInstruction, type DecodedJobsInstruction } from './decode.js';
5
+ export { JOBS_COMPUTE_UNITS, type JobsInstructionName } from './computeUnits.generated.js';
2
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/programs/jobs/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/programs/jobs/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1,2 +1,6 @@
1
1
  export * from './JobsProgram.js';
2
+ export { getJobsInstructionComputeUnits } from './computeUnits.js';
3
+ export { getJobsInstructionName } from './discriminators.js';
4
+ export { decodeJobsInstruction } from './decode.js';
5
+ export { JOBS_COMPUTE_UNITS } from './computeUnits.generated.js';
2
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/programs/jobs/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/programs/jobs/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAA+B,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAA4B,MAAM,6BAA6B,CAAC"}
@@ -7,5 +7,5 @@ export type CompleteParams = {
7
7
  };
8
8
  export type CompleteInstruction = ReturnType<typeof getCompleteInstruction>;
9
9
  export type Complete = (params: CompleteParams) => Promise<CompleteInstruction>;
10
- export declare function complete({ job, ipfsResultsHash }: CompleteParams, { client, get, getRequiredWallet }: InstructionsHelperParams): Promise<CompleteInstruction>;
10
+ export declare function complete({ job, ipfsResultsHash }: CompleteParams, { client, get, getRequiredWallet, getStaticAccounts }: InstructionsHelperParams): Promise<CompleteInstruction>;
11
11
  //# sourceMappingURL=complete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"complete.d.ts","sourceRoot":"","sources":["../../../../../src/services/programs/jobs/instructions/complete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAG3D,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,OAAO,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEhF,wBAAsB,QAAQ,CAC5B,EAAE,GAAG,EAAE,eAAe,EAAE,EAAE,cAAc,EACxC,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,EAAE,wBAAwB,GAC3D,OAAO,CAAC,mBAAmB,CAAC,CAkB9B"}
1
+ {"version":3,"file":"complete.d.ts","sourceRoot":"","sources":["../../../../../src/services/programs/jobs/instructions/complete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAG3D,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,OAAO,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEhF,wBAAsB,QAAQ,CAC5B,EAAE,GAAG,EAAE,eAAe,EAAE,EAAE,cAAc,EACxC,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,EAAE,wBAAwB,GAC9E,OAAO,CAAC,mBAAmB,CAAC,CAqB9B"}
@@ -1,8 +1,8 @@
1
1
  import { ipfsHashToSolBytesArray } from '@nosana/ipfs';
2
2
  import { JobState } from '../JobsProgram.js';
3
- export async function complete({ job, ipfsResultsHash }, { client, get, getRequiredWallet }) {
3
+ export async function complete({ job, ipfsResultsHash }, { client, get, getRequiredWallet, getStaticAccounts }) {
4
4
  const wallet = getRequiredWallet();
5
- const jobAccount = await get(job);
5
+ const [jobAccount, { jobsProgram }] = await Promise.all([get(job), getStaticAccounts()]);
6
6
  if (jobAccount.state !== JobState.COMPLETED)
7
7
  throw new Error(`Cannot complete a job that is not in state COMPLETED. Current state: ${JobState[jobAccount.state]}`);
8
8
  if (jobAccount.ipfsResult !== null) {
@@ -12,6 +12,6 @@ export async function complete({ job, ipfsResultsHash }, { client, get, getRequi
12
12
  job,
13
13
  ipfsResult: new Uint8Array(ipfsHashToSolBytesArray(ipfsResultsHash)),
14
14
  authority: wallet,
15
- });
15
+ }, { programAddress: jobsProgram });
16
16
  }
17
17
  //# sourceMappingURL=complete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"complete.js","sourceRoot":"","sources":["../../../../../src/services/programs/jobs/instructions/complete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAIvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAW7C,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,EAAE,GAAG,EAAE,eAAe,EAAkB,EACxC,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAA4B;IAE5D,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;IAElC,IAAI,UAAU,CAAC,KAAK,KAAK,QAAQ,CAAC,SAAS;QACzC,MAAM,IAAI,KAAK,CACb,wEAAwE,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CACrG,CAAC;IAEJ,IAAI,UAAU,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,MAAM,CAAC,sBAAsB,CAAC;QACnC,GAAG;QACH,UAAU,EAAE,IAAI,UAAU,CAAC,uBAAuB,CAAC,eAAe,CAAC,CAAC;QACpE,SAAS,EAAE,MAAM;KAClB,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"complete.js","sourceRoot":"","sources":["../../../../../src/services/programs/jobs/instructions/complete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAIvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAW7C,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,EAAE,GAAG,EAAE,eAAe,EAAkB,EACxC,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,iBAAiB,EAA4B;IAE/E,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,MAAM,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC;IAEzF,IAAI,UAAU,CAAC,KAAK,KAAK,QAAQ,CAAC,SAAS;QACzC,MAAM,IAAI,KAAK,CACb,wEAAwE,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CACrG,CAAC;IAEJ,IAAI,UAAU,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,MAAM,CAAC,sBAAsB,CAClC;QACE,GAAG;QACH,UAAU,EAAE,IAAI,UAAU,CAAC,uBAAuB,CAAC,eAAe,CAAC,CAAC;QACpE,SAAS,EAAE,MAAM;KAClB,EACD,EAAE,cAAc,EAAE,WAAW,EAAE,CAChC,CAAC;AACJ,CAAC"}
@@ -30,6 +30,58 @@ export interface BalanceInfo {
30
30
  export interface SolBalanceInfo extends BalanceInfo {
31
31
  mint: 'SOL';
32
32
  }
33
+ /**
34
+ * Result of sending a single transaction within a batch.
35
+ * @group @nosana/kit
36
+ */
37
+ export interface BatchTransactionResult {
38
+ /** Whether the transaction was sent and confirmed successfully. */
39
+ status: 'fulfilled' | 'rejected';
40
+ /** Convenience flag: `true` when `status` is `'fulfilled'`. */
41
+ confirmed: boolean;
42
+ /** The transaction signature, present when `status` is `'fulfilled'`. */
43
+ signature?: Signature;
44
+ /** The error that occurred, present when `status` is `'rejected'`. */
45
+ error?: unknown;
46
+ /** The instructions that made up this transaction (the packed bucket). */
47
+ instructions: Instruction[];
48
+ /**
49
+ * The indices of the original `groups` this transaction carried, in order — the
50
+ * bridge back from a per-transaction result to the per-group input you submitted.
51
+ * For example `groupIndices: [6, 7]` means this transaction packed `groups[6]`
52
+ * and `groups[7]`, so both share this transaction's `status`/`signature`/`error`.
53
+ * When every group is a single instruction, `groupIndices[k]` corresponds to
54
+ * `instructions[k]`.
55
+ */
56
+ groupIndices: number[];
57
+ }
58
+ /**
59
+ * One packed, signed, but **un-sent** transaction produced by
60
+ * {@link SolanaService.buildAndSignBatch}. The `blob` can be persisted and
61
+ * broadcast later by a separate process, which is what enables persist-before-send
62
+ * idempotency (a crash mid-send can replay the identical signed transaction, and
63
+ * the chain dedups it by signature).
64
+ * @group @nosana/kit
65
+ */
66
+ export interface SignedBatchTransaction {
67
+ /**
68
+ * The fully-signed transaction, base64-encoded. Broadcast it as-is later via
69
+ * `rpc.sendTransaction(blob, { encoding: 'base64' })`.
70
+ */
71
+ blob: string;
72
+ /** The transaction signature (also the fee payer's signature). */
73
+ signature: Signature;
74
+ /**
75
+ * The `lastValidBlockHeight` of the blockhash this transaction was signed
76
+ * against — the expiry the consumer compares against to know when it is safe to
77
+ * rebuild (the transaction can no longer land once the chain passes this height).
78
+ */
79
+ lastValidBlockHeight: bigint;
80
+ /** The instructions that made up this transaction (the packed bucket). */
81
+ instructions: Instruction[];
82
+ /** The indices of the original `groups` this transaction carried (see {@link BatchTransactionResult.groupIndices}). */
83
+ groupIndices: number[];
84
+ }
33
85
  /**
34
86
  * Solana service interface
35
87
  * @group @nosana/kit
@@ -91,6 +143,88 @@ export interface SolanaService {
91
143
  commitment?: 'processed' | 'confirmed' | 'finalized';
92
144
  estimateComputeUnits?: boolean;
93
145
  }): Promise<Signature>;
146
+ /**
147
+ * Pack instruction groups into the fewest transactions that each stay within the
148
+ * Solana transaction size limit, then build, sign, and send all of them.
149
+ *
150
+ * Each entry of `groups` is an *atomic group*: a single instruction, or an array
151
+ * of instructions that must stay together in the same transaction. Groups are
152
+ * never split across transactions; they are greedily packed into buckets sized by
153
+ * compiling each candidate transaction in-memory (no extra RPC calls).
154
+ *
155
+ * Unless `estimateComputeUnits` is set, each transaction gets an explicit
156
+ * `SetComputeUnitLimit` equal to the sum of its instructions' estimated compute
157
+ * units (from `computeUnits`), capped at the 1.4M per-transaction maximum. This
158
+ * keeps priority fees — which are charged against the compute-unit limit — tight
159
+ * instead of being billed against Solana's inflated per-instruction default.
160
+ *
161
+ * All transactions are attempted regardless of individual failures — the returned
162
+ * array reports the per-transaction outcome in input order.
163
+ *
164
+ * @param groups Atomic instruction groups to bulk together.
165
+ * @param options Optional configuration.
166
+ * @param options.feePayer Optional fee payer signer. Defaults to the service feePayer or wallet.
167
+ * @param options.commitment Commitment level for confirmation.
168
+ * @param options.computeUnits Per-instruction compute-unit estimate: a fixed number for
169
+ * every instruction, or a function mapping an instruction to its units (return undefined
170
+ * to fall back to the default). Used to set each transaction's compute-unit limit and to
171
+ * bound packing. Defaults to Solana's per-instruction default.
172
+ * @param options.maxComputeUnits Per-transaction compute-unit cap. Defaults to 1,400,000.
173
+ * @param options.estimateComputeUnits If true, estimates the compute unit limit per transaction
174
+ * via simulation instead of the static `computeUnits` estimate. Default: false.
175
+ * @param options.maxTransactionSize Override the maximum serialized transaction size in bytes.
176
+ * @param options.sequential If true, sends transactions one at a time, confirming each before the
177
+ * next. Combined with `estimateComputeUnits`, this makes each simulation reflect the chain
178
+ * state left by the prior transactions (e.g. a market queue that grows or shrinks across the
179
+ * batch). Default: false (all transactions are sent concurrently).
180
+ * @returns A per-transaction result array, in the order the buckets were packed.
181
+ */
182
+ buildSignAndSendBatch(groups: Array<Instruction | Instruction[]>, options?: {
183
+ feePayer?: TransactionSigner;
184
+ commitment?: 'processed' | 'confirmed' | 'finalized';
185
+ computeUnits?: number | ((instruction: Instruction) => number | undefined);
186
+ computeUnitMargin?: number;
187
+ maxComputeUnits?: number;
188
+ estimateComputeUnits?: boolean;
189
+ maxTransactionSize?: number;
190
+ sequential?: boolean;
191
+ }): Promise<BatchTransactionResult[]>;
192
+ /**
193
+ * Pack instruction groups into the fewest transactions, then build and sign each
194
+ * — but **do not broadcast**. Returns one signed, base64-serialized transaction
195
+ * per bucket for a separate process to persist and send later. This is
196
+ * {@link buildSignAndSendBatch} minus the send: it exists so a consumer can
197
+ * persist-before-send for idempotency (a crash mid-send replays the identical
198
+ * signed transaction, which the chain dedups by signature).
199
+ *
200
+ * Packing and the per-transaction compute-unit limit work exactly as in
201
+ * {@link buildSignAndSendBatch}. Each bucket is signed with **all** of its
202
+ * embedded signers (e.g. the fresh job/run keypairs minted by a `list`
203
+ * instruction) plus the fee payer — this is inherent to signing with the message's
204
+ * embedded signers, so every required signature is present in the returned blob.
205
+ *
206
+ * Performs no network send. Each transaction is signed against its own freshly
207
+ * fetched blockhash, so `lastValidBlockHeight` may differ per bucket.
208
+ *
209
+ * Because the transaction is signed now but may be broadcast later — potentially
210
+ * against a deeper, costlier state than when it was signed — the static
211
+ * compute-unit estimate can under-budget at land time. Use `computeUnitMargin` to
212
+ * over-provision the baked-in limit (the cost of over-budgeting is only fee, and
213
+ * for size-bound batches it does not reduce packing density).
214
+ *
215
+ * @param groups Atomic instruction groups to bulk together.
216
+ * @param options Same packing options as {@link buildSignAndSendBatch} (no `commitment`/`sequential`, which only apply to sending).
217
+ * @param options.computeUnitMargin Multiplier on each instruction's compute-unit estimate (default 1). Raise it (>1) to over-provision the limit for transactions broadcast later against a costlier state.
218
+ * @returns One signed, un-sent transaction per packed bucket, in packing order.
219
+ */
220
+ buildAndSignBatch(groups: Array<Instruction | Instruction[]>, options?: {
221
+ feePayer?: TransactionSigner;
222
+ computeUnits?: number | ((instruction: Instruction) => number | undefined);
223
+ computeUnitMargin?: number;
224
+ maxComputeUnits?: number;
225
+ estimateComputeUnits?: boolean;
226
+ maxTransactionSize?: number;
227
+ }): Promise<SignedBatchTransaction[]>;
94
228
  /**
95
229
  * Partially sign a transaction message with the signers embedded in the transaction.
96
230
  * The transaction message must already have a fee payer address set (via buildTransaction with an address).
@@ -1 +1 @@
1
- {"version":3,"file":"SolanaService.d.ts","sourceRoot":"","sources":["../../../src/services/solana/SolanaService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,4BAA4B,EAE5B,OAAO,EASP,SAAS,EACT,WAAW,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