@steemit/steem-js 1.0.12 → 1.0.14
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/api/transports/http.d.ts +5 -1
- package/dist/api/transports/types.d.ts +8 -0
- package/dist/auth/ecc/src/key_private.d.ts +5 -0
- package/dist/auth/ecc/src/key_utils.d.ts +3 -2
- package/dist/browser.esm.js +1186 -679
- package/dist/browser.esm.js.map +1 -1
- package/dist/index.cjs +1186 -679
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +1186 -679
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1186 -679
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/memo/index.d.ts +8 -1
- package/dist/umd.d.ts +0 -2
- package/package.json +3 -2
- package/dist/serializer/convert.d.ts +0 -21
- package/dist/serializer/index.d.ts +0 -11
- package/dist/serializer/number_utils.d.ts +0 -8
- package/dist/serializer/precision.d.ts +0 -5
- package/dist/serializer/types.d.ts +0 -36
|
@@ -8,9 +8,13 @@ import { BaseTransport } from './base';
|
|
|
8
8
|
* @param request - The JSON-RPC request object
|
|
9
9
|
* @param fetchMethod - Optional fetch implementation (defaults to global fetch)
|
|
10
10
|
* @param timeoutMs - Request timeout in milliseconds (default: 30000)
|
|
11
|
+
* @param httpsOptions - Optional TLS options (Node.js only): rejectUnauthorized, ca
|
|
11
12
|
* @returns Promise resolving to the JSON-RPC result
|
|
12
13
|
*/
|
|
13
|
-
export declare const jsonRpc: (url: string, request: Partial<JsonRpcRequest>, fetchMethod?: typeof fetch, timeoutMs?: number
|
|
14
|
+
export declare const jsonRpc: (url: string, request: Partial<JsonRpcRequest>, fetchMethod?: typeof fetch, timeoutMs?: number, httpsOptions?: {
|
|
15
|
+
rejectUnauthorized?: boolean;
|
|
16
|
+
ca?: string | Buffer | string[];
|
|
17
|
+
}) => Promise<unknown>;
|
|
14
18
|
export declare class HttpTransport extends BaseTransport {
|
|
15
19
|
constructor(options: TransportOptions);
|
|
16
20
|
get nonRetriableOperations(): string[];
|
|
@@ -8,6 +8,14 @@ export interface TransportOptions {
|
|
|
8
8
|
*/
|
|
9
9
|
websocket?: string;
|
|
10
10
|
transport?: string | unknown;
|
|
11
|
+
/**
|
|
12
|
+
* HTTPS/TLS options (Node.js only; browser fetch does not support custom CA).
|
|
13
|
+
* When set, requests use undici Agent with these options for certificate verification.
|
|
14
|
+
*/
|
|
15
|
+
httpsOptions?: {
|
|
16
|
+
rejectUnauthorized?: boolean;
|
|
17
|
+
ca?: string | Buffer | string[];
|
|
18
|
+
};
|
|
11
19
|
[key: string]: unknown;
|
|
12
20
|
}
|
|
13
21
|
export interface JsonRpcRequest {
|
|
@@ -3,6 +3,11 @@ declare const secp256k1: EC;
|
|
|
3
3
|
import BN from 'bn.js';
|
|
4
4
|
import { PublicKey } from './key_public';
|
|
5
5
|
type ECPoint = ReturnType<typeof secp256k1.g.mul>;
|
|
6
|
+
/**
|
|
7
|
+
* Constant-time buffer comparison to prevent timing attacks.
|
|
8
|
+
* Returns true only if a.length === b.length and a[i] === b[i] for all i.
|
|
9
|
+
*/
|
|
10
|
+
export declare function constantTimeCompare(a: Buffer | Uint8Array, b: Buffer | Uint8Array): boolean;
|
|
6
11
|
export declare class PrivateKey {
|
|
7
12
|
d: BN;
|
|
8
13
|
public_key?: PublicKey;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PrivateKey } from './key_private';
|
|
2
2
|
export declare function addEntropy(...ints: number[]): void;
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Cryptographically secure 32-byte random buffer.
|
|
5
|
+
* Optionally mix in caller-provided entropy (e.g. from browser) via one-shot hash.
|
|
6
|
+
* @param entropy optional string entropy of at least 32 bytes to mix in
|
|
6
7
|
*/
|
|
7
8
|
export declare function random32ByteBuffer(entropy?: string): Buffer;
|
|
8
9
|
export declare function get_random_key(entropy?: string): PrivateKey;
|