@typeberry/lib 0.1.0-3c30204 → 0.1.0-eb00e84

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/index.cjs CHANGED
@@ -3577,7 +3577,6 @@ var ed25519 = /*#__PURE__*/Object.freeze({
3577
3577
  const HASH_SIZE = 32;
3578
3578
  /** A hash without last byte (useful for trie representation). */
3579
3579
  const TRUNCATED_HASH_SIZE = 31;
3580
- const ZERO_HASH = Bytes.zero(HASH_SIZE);
3581
3580
  /**
3582
3581
  * Container for some object with a hash that is related to this object.
3583
3582
  *
@@ -4867,7 +4866,6 @@ var index$n = /*#__PURE__*/Object.freeze({
4867
4866
  TRUNCATED_HASH_SIZE: TRUNCATED_HASH_SIZE,
4868
4867
  WithHash: WithHash,
4869
4868
  WithHashAndBytes: WithHashAndBytes,
4870
- ZERO_HASH: ZERO_HASH,
4871
4869
  blake2b: blake2b,
4872
4870
  defaultAllocator: defaultAllocator,
4873
4871
  keccak: keccak
package/index.d.ts CHANGED
@@ -369,7 +369,7 @@ type Result$2<Ok, Error> = OkResult<Ok> | ErrorResult<Error>;
369
369
  /** An indication of two possible outcomes returned from a function. */
370
370
  declare const Result$2 = {
371
371
  /** Create new [`Result`] with `Ok` status. */
372
- ok: <Ok>(ok: Ok): OkResult<Ok> => {
372
+ ok: <Ok, Error>(ok: Ok): Result<Ok, Error> => {
373
373
  check(ok !== undefined, "`Ok` type cannot be undefined.");
374
374
  return {
375
375
  isOk: true,
@@ -379,7 +379,7 @@ declare const Result$2 = {
379
379
  },
380
380
 
381
381
  /** Create new [`Result`] with `Error` status. */
382
- error: <Error>(error: Error, details = ""): ErrorResult<Error> => {
382
+ error: <Ok, Error>(error: Error, details = ""): Result<Ok, Error> => {
383
383
  check(error !== undefined, "`Error` type cannot be undefined.");
384
384
  return {
385
385
  isOk: false,
@@ -3447,8 +3447,6 @@ type KeccakHash = Bytes<HASH_SIZE>;
3447
3447
  /** Truncated hash. */
3448
3448
  type TruncatedHash = Bytes<TRUNCATED_HASH_SIZE>;
3449
3449
 
3450
- declare const ZERO_HASH = Bytes.zero(HASH_SIZE);
3451
-
3452
3450
  /**
3453
3451
  * Container for some object with a hash that is related to this object.
3454
3452
  *
@@ -3657,12 +3655,11 @@ type index$n_WithHash<THash extends OpaqueHash, TData> = WithHash<THash, TData>;
3657
3655
  declare const index$n_WithHash: typeof WithHash;
3658
3656
  type index$n_WithHashAndBytes<THash extends OpaqueHash, TData> = WithHashAndBytes<THash, TData>;
3659
3657
  declare const index$n_WithHashAndBytes: typeof WithHashAndBytes;
3660
- declare const index$n_ZERO_HASH: typeof ZERO_HASH;
3661
3658
  declare const index$n_blake2b: typeof blake2b;
3662
3659
  declare const index$n_defaultAllocator: typeof defaultAllocator;
3663
3660
  declare const index$n_keccak: typeof keccak;
3664
3661
  declare namespace index$n {
3665
- export { index$n_PageAllocator as PageAllocator, index$n_SimpleAllocator as SimpleAllocator, index$n_WithHash as WithHash, index$n_WithHashAndBytes as WithHashAndBytes, index$n_ZERO_HASH as ZERO_HASH, index$n_blake2b as blake2b, index$n_defaultAllocator as defaultAllocator, index$n_keccak as keccak };
3662
+ export { index$n_PageAllocator as PageAllocator, index$n_SimpleAllocator as SimpleAllocator, index$n_WithHash as WithHash, index$n_WithHashAndBytes as WithHashAndBytes, index$n_blake2b as blake2b, index$n_defaultAllocator as defaultAllocator, index$n_keccak as keccak };
3666
3663
  export type { index$n_Blake2bHash as Blake2bHash, index$n_HASH_SIZE as HASH_SIZE, index$n_HashAllocator as HashAllocator, index$n_KeccakHash as KeccakHash, index$n_OpaqueHash as OpaqueHash, index$n_TRUNCATED_HASH_SIZE as TRUNCATED_HASH_SIZE, index$n_TruncatedHash as TruncatedHash };
3667
3664
  }
3668
3665
 
package/index.js CHANGED
@@ -3574,7 +3574,6 @@ var ed25519 = /*#__PURE__*/Object.freeze({
3574
3574
  const HASH_SIZE = 32;
3575
3575
  /** A hash without last byte (useful for trie representation). */
3576
3576
  const TRUNCATED_HASH_SIZE = 31;
3577
- const ZERO_HASH = Bytes.zero(HASH_SIZE);
3578
3577
  /**
3579
3578
  * Container for some object with a hash that is related to this object.
3580
3579
  *
@@ -4864,7 +4863,6 @@ var index$n = /*#__PURE__*/Object.freeze({
4864
4863
  TRUNCATED_HASH_SIZE: TRUNCATED_HASH_SIZE,
4865
4864
  WithHash: WithHash,
4866
4865
  WithHashAndBytes: WithHashAndBytes,
4867
- ZERO_HASH: ZERO_HASH,
4868
4866
  blake2b: blake2b,
4869
4867
  defaultAllocator: defaultAllocator,
4870
4868
  keccak: keccak
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeberry/lib",
3
- "version": "0.1.0-3c30204",
3
+ "version": "0.1.0-eb00e84",
4
4
  "main": "index.js",
5
5
  "author": "Fluffy Labs",
6
6
  "license": "MPL-2.0",