@cmts-dev/carmentis-sdk-core 1.2.15 → 1.2.17

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.
@@ -11634,7 +11634,7 @@ var { NEVER: mx, ALWAYS: hx, DECIMAL_ROUND: gx, DECIMAL_FIT: _x } = Lb, vx = 204
11634
11634
  return new e(U.ORGANIZATION_VIRTUAL_BLOCKCHAIN);
11635
11635
  }
11636
11636
  static createGenesisApplicationLedgerMicroblock() {
11637
- return new e(U.APPLICATION_VIRTUAL_BLOCKCHAIN);
11637
+ return new e(U.APP_LEDGER_VIRTUAL_BLOCKCHAIN);
11638
11638
  }
11639
11639
  static loadFromSerializedMicroblock(t, n) {
11640
11640
  let r = z(Gx, Ib(t));
@@ -12087,6 +12087,8 @@ var { NEVER: mx, ALWAYS: hx, DECIMAL_ROUND: gx, DECIMAL_FIT: _x } = Lb, vx = 204
12087
12087
  return this.getHeight() === 0;
12088
12088
  }
12089
12089
  async appendMicroBlock(e) {
12090
+ if (!e || !(e instanceof Kx)) throw Error("Microblock cannot be null or undefined");
12091
+ if (e.getType() !== this.type) throw Error("Invalid microblock type for append operation");
12090
12092
  if (this.isEmpty() && this.identifier instanceof Uint8Array) throw Error("Virtual blockchain is empty but is initialized: should not happen");
12091
12093
  if (!this.isEmpty() && !(this.identifier instanceof Uint8Array)) throw Error("Virtual blockchain is empty but has an identifier: should not happen");
12092
12094
  let t = this.height + 1, n = e.getHeight();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmts-dev/carmentis-sdk-core",
3
- "version": "1.2.15",
3
+ "version": "1.2.17",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/carmentis-sdk-core.cjs",