@alephium/web3 0.12.4 → 0.12.5-rc.0

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,4 +1,5 @@
1
1
  export declare class WebCrypto {
2
2
  subtle: SubtleCrypto;
3
+ constructor();
3
4
  getRandomValues<T extends ArrayBufferView | null>(array: T): T;
4
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "0.12.4",
3
+ "version": "v0.12.5-rc.0",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "main": "dist/src/index.js",
@@ -22,7 +22,11 @@ import { webcrypto, randomFillSync } from 'crypto'
22
22
  const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'
23
23
 
24
24
  export class WebCrypto {
25
- subtle = isBrowser ? globalThis.crypto.subtle : webcrypto.subtle
25
+ subtle: SubtleCrypto
26
+
27
+ constructor() {
28
+ this.subtle = isBrowser ? globalThis.crypto.subtle : webcrypto.subtle
29
+ }
26
30
 
27
31
  public getRandomValues<T extends ArrayBufferView | null>(array: T): T {
28
32
  if (!ArrayBuffer.isView(array)) {