@steemit/steem-js 1.0.4 → 1.0.6

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 (48) hide show
  1. package/README.md +9 -1
  2. package/dist/api/index.d.ts +50 -55
  3. package/dist/api/rpc-auth.d.ts +2 -2
  4. package/dist/api/signature-verification.d.ts +92 -0
  5. package/dist/api/transports/base.d.ts +2 -2
  6. package/dist/api/transports/http.d.ts +16 -2
  7. package/dist/api/transports/index.d.ts +0 -2
  8. package/dist/api/transports/types.d.ts +6 -6
  9. package/dist/api/transports/ws.d.ts +1 -0
  10. package/dist/auth/ecc/src/ecdsa.d.ts +1 -1
  11. package/dist/auth/ecc/src/enforce_types.d.ts +2 -2
  12. package/dist/auth/ecc/src/hash.d.ts +4 -2
  13. package/dist/auth/ecc/src/key_private.d.ts +3 -1
  14. package/dist/auth/ecc/src/key_public.d.ts +8 -6
  15. package/dist/auth/index.d.ts +6 -5
  16. package/dist/auth/serializer/transaction.d.ts +1 -1
  17. package/dist/auth/serializer.d.ts +3 -3
  18. package/dist/broadcast/helpers.d.ts +23 -4
  19. package/dist/broadcast/index.d.ts +24 -22
  20. package/dist/browser.esm.js +28921 -0
  21. package/dist/browser.esm.js.map +1 -0
  22. package/dist/config.d.ts +4 -5
  23. package/dist/crypto/browser-crypto.d.ts +43 -0
  24. package/dist/crypto/random-bytes.d.ts +12 -0
  25. package/dist/formatter/index.d.ts +1 -1
  26. package/dist/index.browser.js +56378 -0
  27. package/dist/index.browser.js.map +1 -0
  28. package/dist/index.cjs +24067 -35324
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.ts +3 -3
  31. package/dist/index.js +24053 -35302
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.umd.js +18077 -48081
  34. package/dist/index.umd.js.map +1 -1
  35. package/dist/index.umd.min.js +1 -1
  36. package/dist/index.umd.min.js.map +1 -1
  37. package/dist/polyfills/async-hooks-browser.d.ts +6 -0
  38. package/dist/polyfills/secure-random-browser.d.ts +8 -0
  39. package/dist/serializer/convert.d.ts +15 -6
  40. package/dist/serializer/index.d.ts +3 -3
  41. package/dist/serializer/precision.d.ts +1 -1
  42. package/dist/serializer/types.d.ts +9 -9
  43. package/dist/types/index.d.ts +9 -9
  44. package/dist/types.d.ts +2 -2
  45. package/dist/umd.d.ts +3 -3
  46. package/dist/utils/debug.d.ts +5 -5
  47. package/dist/utils/promisify.d.ts +7 -3
  48. package/package.json +17 -16
package/dist/config.d.ts CHANGED
@@ -2,7 +2,6 @@ interface SteemConfig {
2
2
  node?: string;
3
3
  nodes?: string[];
4
4
  uri?: string;
5
- websocket?: string;
6
5
  address_prefix?: string;
7
6
  chain_id?: string;
8
7
  debug?: boolean;
@@ -10,18 +9,18 @@ interface SteemConfig {
10
9
  }
11
10
  export declare class Config {
12
11
  private config;
13
- get(key: string): any;
12
+ get(key: string): unknown;
14
13
  getBoolean(key: string): boolean;
15
14
  getNumber(key: string): number;
16
15
  getString(key: string): string;
17
- set(key: string, value: any): void;
16
+ set(key: string, value: unknown): void;
18
17
  all(): {
19
- [key: string]: any;
18
+ [key: string]: unknown;
20
19
  };
21
20
  }
22
21
  export declare const getConfig: () => Config;
23
22
  export declare const setConfig: (newConfig: Partial<SteemConfig>) => void;
24
23
  export declare const resetConfig: () => void;
25
24
  export declare const setOptions: (newConfig: Partial<SteemConfig>) => void;
26
- export declare function get(key: string): any;
25
+ export declare function get(key: string): unknown;
27
26
  export {};
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Browser-compatible crypto module
3
+ *
4
+ * This module provides a compatibility layer for Node.js crypto module in browser environments.
5
+ * It uses Web Crypto API for randomBytes and crypto-browserify (via rollup alias) for hash functions.
6
+ */
7
+ /**
8
+ * Get random bytes using the best available method for the environment
9
+ * In browser: uses Web Crypto API (crypto.getRandomValues)
10
+ * In Node.js: uses Node.js crypto.randomBytes
11
+ * @param size Number of bytes to generate
12
+ * @returns Buffer with random bytes
13
+ */
14
+ export declare function randomBytes(size: number): Buffer;
15
+ /**
16
+ * Create hash - uses crypto-browserify in browser (via rollup alias) or Node.js crypto
17
+ * @param algorithm Hash algorithm (e.g., 'sha256', 'ripemd160')
18
+ * @returns Hash object
19
+ */
20
+ export declare function createHash(algorithm: string): import("crypto").Hash;
21
+ /**
22
+ * Create HMAC - uses crypto-browserify in browser (via rollup alias) or Node.js crypto
23
+ * @param algorithm HMAC algorithm (e.g., 'sha256')
24
+ * @param key HMAC key
25
+ * @returns HMAC object
26
+ */
27
+ export declare function createHmac(algorithm: string, key: string | Buffer): import("crypto").Hmac;
28
+ /**
29
+ * Create cipher - uses crypto-browserify in browser (via rollup alias) or Node.js crypto
30
+ * @param algorithm Cipher algorithm (e.g., 'aes-256-cbc')
31
+ * @param key Cipher key
32
+ * @param iv Initialization vector
33
+ * @returns Cipher object
34
+ */
35
+ export declare function createCipheriv(algorithm: string, key: Buffer, iv: Buffer): import("crypto").Cipher;
36
+ /**
37
+ * Create decipher - uses crypto-browserify in browser (via rollup alias) or Node.js crypto
38
+ * @param algorithm Cipher algorithm (e.g., 'aes-256-cbc')
39
+ * @param key Cipher key
40
+ * @param iv Initialization vector
41
+ * @returns Decipher object
42
+ */
43
+ export declare function createDecipheriv(algorithm: string, key: Buffer, iv: Buffer): import("crypto").Decipher;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Universal random bytes implementation
3
+ * Uses Web Crypto API in browser, Node.js crypto in Node.js
4
+ */
5
+ /**
6
+ * Get random bytes using the best available method for the environment
7
+ * In browser: uses Web Crypto API (crypto.getRandomValues)
8
+ * In Node.js: uses Node.js crypto.randomBytes
9
+ * @param size Number of bytes to generate
10
+ * @returns Buffer with random bytes
11
+ */
12
+ export declare function randomBytes(size: number): Buffer;
@@ -6,7 +6,7 @@ export interface Account {
6
6
  savings_balance: string;
7
7
  savings_sbd_balance: string;
8
8
  sbd_balance: string;
9
- other_history?: any[];
9
+ other_history?: unknown[];
10
10
  }
11
11
  export interface GlobalProperties {
12
12
  total_vesting_shares: string;