@hardkas/sdk 0.9.2-alpha → 0.9.4-alpha

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.d.ts CHANGED
@@ -280,13 +280,13 @@ declare class HardkasLocalnet {
280
280
  * Initializes the in-memory simulated workspace.
281
281
  *
282
282
  * Docker Toccata process control remains a CLI/localnet responsibility in
283
- * 0.9.2-alpha; the SDK reports that boundary instead of silently shelling out.
283
+ * 0.9.4-alpha; the SDK reports that boundary instead of silently shelling out.
284
284
  */
285
285
  start(options?: LocalnetProfileOptions): Promise<LocalnetControlResult>;
286
286
  /**
287
287
  * Funds a simulated account through the SDK transaction flow.
288
288
  *
289
- * Toccata Docker mining/funding remains CLI-only in 0.9.2-alpha because it
289
+ * Toccata Docker mining/funding remains CLI-only in 0.9.4-alpha because it
290
290
  * depends on a local stratum/miner companion and host Docker state.
291
291
  */
292
292
  fund(identifier: string, options?: LocalnetProfileOptions & {
@@ -545,6 +545,9 @@ interface SilverCompareReport {
545
545
  notes: SilverCompareEntry[];
546
546
  expectedKnownLimitations: ["PARTIAL_VM_SIMULATION"];
547
547
  }
548
+ declare const SilverScript: {
549
+ builder(): never;
550
+ };
548
551
  declare class HardkasSilver {
549
552
  private sdk;
550
553
  readonly simulate: {
@@ -855,6 +858,7 @@ declare const defineTask: {
855
858
  interface HardkasOptions {
856
859
  cwd?: string;
857
860
  configPath?: string;
861
+ workspaceRoot?: string;
858
862
  mode?: "developer" | "agent";
859
863
  network?: string;
860
864
  autoBootstrap?: boolean;
@@ -925,4 +929,4 @@ declare class Hardkas {
925
929
  enforcePolicy(action: "network" | "mainnet" | "external-wallet" | "mutation", context?: string): void;
926
930
  }
927
931
 
928
- export { type CorpusIssue, type CorpusVerifyResult, Hardkas, HardkasAccounts, HardkasArtifactsManager, type HardkasCapabilities, HardkasCapabilitiesApi, HardkasCorpus, HardkasL2, HardkasLineage, HardkasLocalnet, type HardkasOptions, HardkasProgrammability, HardkasQuery, HardkasReplay, HardkasSilver, HardkasTx, HardkasVprogs, HardkasWorkspace, HardkasZk, type ProgrammabilityAppPlan, type ProgrammabilityCapabilitiesResult, type ProgrammabilityClaims, type ProgrammabilityCorpusReport, type ProgrammabilityInspectResult, type ProgrammabilityKind, type ProgrammabilityVerifyResult, type SilverCompareMode, type SilverCompareOptions, type SilverCompareReport, type SilverCompileOptions, type SilverDeployPlanOptions, type SilverSdkArtifactResult, type SilverSdkWriteOptions, type SilverSpendPlanOptions, type TaskArgs, type TaskContext, type VprogsCapabilitiesResult, type VprogsClaims, type VprogsInspectResult, type VprogsStatusResult, type ZkCapabilities, type ZkCorpusVerifyResult, type ZkIssue, type ZkProofInspectResult, type ZkProofSystem, type ZkProofVerifyResult, createHardkasCapabilities, createProgrammabilityCapabilities, createVprogsCapabilities, createVprogsStatus, createZkCapabilities, defineTask, inspectVprogsArtifact, inspectZkProof, programmabilityClaims, verifyToccataCorpus, verifyZkCorpus, verifyZkProofLocal };
932
+ export { type CorpusIssue, type CorpusVerifyResult, Hardkas, HardkasAccounts, HardkasArtifactsManager, type HardkasCapabilities, HardkasCapabilitiesApi, HardkasCorpus, HardkasL2, HardkasLineage, HardkasLocalnet, type HardkasOptions, HardkasProgrammability, HardkasQuery, HardkasReplay, HardkasSilver, HardkasTx, HardkasVprogs, HardkasWorkspace, HardkasZk, type ProgrammabilityAppPlan, type ProgrammabilityCapabilitiesResult, type ProgrammabilityClaims, type ProgrammabilityCorpusReport, type ProgrammabilityInspectResult, type ProgrammabilityKind, type ProgrammabilityVerifyResult, type SilverCompareMode, type SilverCompareOptions, type SilverCompareReport, type SilverCompileOptions, type SilverDeployPlanOptions, SilverScript, type SilverSdkArtifactResult, type SilverSdkWriteOptions, type SilverSpendPlanOptions, type TaskArgs, type TaskContext, type VprogsCapabilitiesResult, type VprogsClaims, type VprogsInspectResult, type VprogsStatusResult, type ZkCapabilities, type ZkCorpusVerifyResult, type ZkIssue, type ZkProofInspectResult, type ZkProofSystem, type ZkProofVerifyResult, createHardkasCapabilities, createProgrammabilityCapabilities, createVprogsCapabilities, createVprogsStatus, createZkCapabilities, defineTask, inspectVprogsArtifact, inspectZkProof, programmabilityClaims, verifyToccataCorpus, verifyZkCorpus, verifyZkProofLocal };
package/dist/index.js CHANGED
@@ -1159,7 +1159,7 @@ var HardkasLocalnet = class {
1159
1159
  * Initializes the in-memory simulated workspace.
1160
1160
  *
1161
1161
  * Docker Toccata process control remains a CLI/localnet responsibility in
1162
- * 0.9.2-alpha; the SDK reports that boundary instead of silently shelling out.
1162
+ * 0.9.4-alpha; the SDK reports that boundary instead of silently shelling out.
1163
1163
  */
1164
1164
  async start(options = {}) {
1165
1165
  const profile = options.profile || "simulated";
@@ -1177,13 +1177,13 @@ var HardkasLocalnet = class {
1177
1177
  schema: HardkasSchemas2.LocalnetControlV1,
1178
1178
  profile,
1179
1179
  status: "SDK_LOCALNET_CONTROL_UNSUPPORTED",
1180
- message: "SDK Docker localnet start is not supported in 0.9.2-alpha. Use `hardkas localnet start --profile toccata-v2`."
1180
+ message: "SDK Docker localnet start is not supported in 0.9.4-alpha. Use `hardkas localnet start --profile toccata-v2`."
1181
1181
  };
1182
1182
  }
1183
1183
  /**
1184
1184
  * Funds a simulated account through the SDK transaction flow.
1185
1185
  *
1186
- * Toccata Docker mining/funding remains CLI-only in 0.9.2-alpha because it
1186
+ * Toccata Docker mining/funding remains CLI-only in 0.9.4-alpha because it
1187
1187
  * depends on a local stratum/miner companion and host Docker state.
1188
1188
  */
1189
1189
  async fund(identifier, options = {}) {
@@ -1207,7 +1207,7 @@ var HardkasLocalnet = class {
1207
1207
  profile,
1208
1208
  identifier,
1209
1209
  status: "SDK_TOCCATA_FUNDING_UNSUPPORTED",
1210
- message: "SDK Toccata funding is not supported in 0.9.2-alpha. Use `hardkas localnet fund <account> --profile toccata-v2`."
1210
+ message: "SDK Toccata funding is not supported in 0.9.4-alpha. Use `hardkas localnet fund <account> --profile toccata-v2`."
1211
1211
  };
1212
1212
  }
1213
1213
  /**
@@ -2564,6 +2564,13 @@ import {
2564
2564
  simulateSilverSpend
2565
2565
  } from "@hardkas/simulator";
2566
2566
  import { HardkasSchemas as HardkasSchemas6 } from "@hardkas/artifacts";
2567
+ var SilverScript = {
2568
+ builder() {
2569
+ throw new Error(
2570
+ "SILVERSCRIPT_MAINNET_NOT_ENABLED: SilverScript builder is experimental and requires simnet capability checks in 0.9.4-alpha."
2571
+ );
2572
+ }
2573
+ };
2567
2574
  var HardkasSilver = class {
2568
2575
  constructor(sdk) {
2569
2576
  this.sdk = sdk;
@@ -2653,7 +2660,7 @@ var HardkasSilver = class {
2653
2660
  async deploy(options) {
2654
2661
  if (options.mode === "real") {
2655
2662
  throw new Error(
2656
- "SDK_SILVER_REAL_LIFECYCLE_UNSUPPORTED: use `hardkas silver deploy` for Docker/RPC execution in 0.9.2-alpha."
2663
+ "SDK_SILVER_REAL_LIFECYCLE_UNSUPPORTED: use `hardkas silver deploy` for Docker/RPC execution in 0.9.4-alpha."
2657
2664
  );
2658
2665
  }
2659
2666
  return this.simulateDeploy(options.artifact, options);
@@ -2713,7 +2720,7 @@ var HardkasSilver = class {
2713
2720
  async spend(options) {
2714
2721
  if (options.mode === "real") {
2715
2722
  throw new Error(
2716
- "SDK_SILVER_REAL_LIFECYCLE_UNSUPPORTED: use `hardkas silver spend` for Docker/RPC execution in 0.9.2-alpha."
2723
+ "SDK_SILVER_REAL_LIFECYCLE_UNSUPPORTED: use `hardkas silver spend` for Docker/RPC execution in 0.9.4-alpha."
2717
2724
  );
2718
2725
  }
2719
2726
  return this.simulateSpend(
@@ -3125,7 +3132,7 @@ async function verifyZkProofLocal(targetPath, workspaceRoot = process.cwd()) {
3125
3132
  issues: [
3126
3133
  {
3127
3134
  code: "RISC0_VERIFIER_UNAVAILABLE",
3128
- message: "RISC0 local receipt verification helper is not bundled in 0.9.2-alpha."
3135
+ message: "RISC0 local receipt verification helper is not bundled in 0.9.4-alpha."
3129
3136
  },
3130
3137
  {
3131
3138
  code: "RISC0_LOCAL_VERIFICATION_NOT_IMPLEMENTED",
@@ -3556,6 +3563,25 @@ async function inspectVprogsArtifact(targetPath, workspaceRoot = process.cwd())
3556
3563
  }
3557
3564
  try {
3558
3565
  const artifact = JSON.parse(fs7.readFileSync(resolved, "utf8"));
3566
+ const validSchemas = [
3567
+ HardkasSchemas8.VProgsInspectFixtureV1
3568
+ ];
3569
+ if (!artifact.schema || !validSchemas.includes(artifact.schema)) {
3570
+ return {
3571
+ ok: false,
3572
+ schema: HardkasSchemas8.VProgsInspectV1,
3573
+ status: "VPROGS_ARTIFACT_INVALID",
3574
+ path: path7.relative(workspaceRoot, resolved).replace(/\\/g, "/"),
3575
+ claims: vprogsClaims(),
3576
+ issues: [
3577
+ {
3578
+ code: "VPROGS_ARTIFACT_SCHEMA_INVALID",
3579
+ message: `Invalid or unknown vProgs schema: ${artifact.schema || "undefined"}`,
3580
+ file: resolved
3581
+ }
3582
+ ]
3583
+ };
3584
+ }
3559
3585
  return {
3560
3586
  ok: true,
3561
3587
  schema: HardkasSchemas8.VProgsInspectV1,
@@ -4161,6 +4187,7 @@ export {
4161
4187
  HardkasWorkspace,
4162
4188
  HardkasZk,
4163
4189
  SOMPI_PER_KAS,
4190
+ SilverScript,
4164
4191
  buildPaymentPlan2 as buildPaymentPlan,
4165
4192
  createHardkasCapabilities,
4166
4193
  createHardkasClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hardkas/sdk",
3
- "version": "0.9.2-alpha",
3
+ "version": "0.9.4-alpha",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -24,18 +24,18 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@kaspa/core-lib": "^1.6.5",
27
- "@hardkas/accounts": "0.9.2-alpha",
28
- "@hardkas/core": "0.9.2-alpha",
29
- "@hardkas/artifacts": "0.9.2-alpha",
30
- "@hardkas/l2": "0.9.2-alpha",
31
- "@hardkas/kaspa-rpc": "0.9.2-alpha",
32
- "@hardkas/config": "0.9.2-alpha",
33
- "@hardkas/query-store": "0.9.2-alpha",
34
- "@hardkas/query": "0.9.2-alpha",
35
- "@hardkas/simulator": "0.9.2-alpha",
36
- "@hardkas/tx-builder": "0.9.2-alpha",
37
- "@hardkas/localnet": "0.9.2-alpha",
38
- "@hardkas/wallet-adapter": "0.9.2-alpha"
27
+ "@hardkas/config": "0.9.4-alpha",
28
+ "@hardkas/accounts": "0.9.4-alpha",
29
+ "@hardkas/artifacts": "0.9.4-alpha",
30
+ "@hardkas/core": "0.9.4-alpha",
31
+ "@hardkas/l2": "0.9.4-alpha",
32
+ "@hardkas/kaspa-rpc": "0.9.4-alpha",
33
+ "@hardkas/localnet": "0.9.4-alpha",
34
+ "@hardkas/query": "0.9.4-alpha",
35
+ "@hardkas/query-store": "0.9.4-alpha",
36
+ "@hardkas/simulator": "0.9.4-alpha",
37
+ "@hardkas/wallet-adapter": "0.9.4-alpha",
38
+ "@hardkas/tx-builder": "0.9.4-alpha"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^20.12.7",