@steemit/steem-js 1.0.13 → 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 +207 -569
- package/dist/browser.esm.js.map +1 -1
- package/dist/index.cjs +207 -569
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +207 -569
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +207 -569
- 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
package/dist/memo/index.d.ts
CHANGED
|
@@ -8,4 +8,11 @@ export interface MemoData {
|
|
|
8
8
|
encrypted: string;
|
|
9
9
|
}
|
|
10
10
|
export declare function encode(private_key: string | PrivateKey | null, public_key: string | PublicKey | null, memo: string, testNonce?: string): string;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Decode an encrypted memo.
|
|
13
|
+
* @param private_key - Our private key (WIF or PrivateKey)
|
|
14
|
+
* @param memo - Encrypted memo string (leading #)
|
|
15
|
+
* @param expectedRecipientPubKey - If we are the sender, optionally verify the memo's 'to' matches this (prevents wrong-recipient decryption)
|
|
16
|
+
* @returns Decrypted memo with leading #, or original string on failure
|
|
17
|
+
*/
|
|
18
|
+
export declare function decode(private_key: string | PrivateKey | null, memo: string, expectedRecipientPubKey?: string | PublicKey): string;
|
package/dist/umd.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import * as broadcast from './broadcast';
|
|
|
4
4
|
import * as formatter from './formatter';
|
|
5
5
|
import * as memo from './memo';
|
|
6
6
|
import * as operations from './operations';
|
|
7
|
-
import * as serializer from './serializer';
|
|
8
7
|
import * as utils from './utils';
|
|
9
8
|
import { Buffer as BufferPolyfill } from 'buffer';
|
|
10
9
|
declare const steem: {
|
|
@@ -33,7 +32,6 @@ declare const steem: {
|
|
|
33
32
|
formatter: typeof formatter;
|
|
34
33
|
memo: typeof memo;
|
|
35
34
|
operations: typeof operations;
|
|
36
|
-
serializer: typeof serializer;
|
|
37
35
|
utils: typeof utils;
|
|
38
36
|
};
|
|
39
37
|
export default steem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steemit/steem-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Steem blockchain JavaScript/TypeScript library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"test:coverage": "vitest run --coverage",
|
|
84
84
|
"typecheck": "tsc --noEmit",
|
|
85
85
|
"lint": "eslint src",
|
|
86
|
-
"format": "prettier --write \"src/**/*.ts\""
|
|
86
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
87
|
+
"audit": "pnpm audit --audit-level=moderate"
|
|
87
88
|
}
|
|
88
89
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert implementation to support serializing types.
|
|
3
|
-
*/
|
|
4
|
-
export declare class Convert {
|
|
5
|
-
private type;
|
|
6
|
-
constructor(type: {
|
|
7
|
-
toHex?: (value: unknown) => string;
|
|
8
|
-
fromHex?: (hex: string) => unknown;
|
|
9
|
-
fromObject?: (obj: unknown) => unknown;
|
|
10
|
-
} | null);
|
|
11
|
-
toHex(value: unknown): string;
|
|
12
|
-
fromHex(hex: string): unknown;
|
|
13
|
-
fromObject(obj: unknown): unknown;
|
|
14
|
-
toObject(obj: unknown): unknown;
|
|
15
|
-
}
|
|
16
|
-
export default function (type: {
|
|
17
|
-
toHex?: (value: unknown) => string;
|
|
18
|
-
fromHex?: (hex: string) => unknown;
|
|
19
|
-
fromObject?: (obj: unknown) => unknown;
|
|
20
|
-
toObject?: (value: unknown) => unknown;
|
|
21
|
-
} | null): Convert;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Operation, Transaction } from '../types';
|
|
2
|
-
export declare const serializeTransaction: (transaction: Transaction) => Buffer;
|
|
3
|
-
export declare const serializeOperation: (operation: Operation) => Buffer;
|
|
4
|
-
export declare const getTransactionDigest: (transaction: Transaction) => Buffer;
|
|
5
|
-
export declare const getTransactionId: (transaction: Transaction) => string;
|
|
6
|
-
export declare const serialize: (operation: unknown) => Buffer;
|
|
7
|
-
export declare const deserialize: (buffer: Buffer) => unknown;
|
|
8
|
-
export declare const deserializeTransaction: (buffer: Buffer) => unknown;
|
|
9
|
-
export { default as convert } from './convert';
|
|
10
|
-
export * as types from './types';
|
|
11
|
-
export * as precision from './precision';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Convert 12.34 with a precision of 3 into 12340
|
|
3
|
-
@arg {number|string} number - Use strings for large numbers. This may contain one decimal but no sign
|
|
4
|
-
@arg {number} precision - number of implied decimal places (usually causes right zero padding)
|
|
5
|
-
@return {string} -
|
|
6
|
-
*/
|
|
7
|
-
export declare function toImpliedDecimal(number: number | string, precision: number): string;
|
|
8
|
-
export declare function fromImpliedDecimal(number: number | string, precision: number): string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const _internal: {
|
|
2
|
-
decimal_precision_string: (number: string, precision: number) => string;
|
|
3
|
-
};
|
|
4
|
-
export declare const to_bigint64: (number_or_string: string, precision: number) => bigint;
|
|
5
|
-
export declare const to_string64: (input: unknown, precision: number) => string;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare const vote_id: {
|
|
2
|
-
fromObject: (id: string) => string;
|
|
3
|
-
toHex: (id: string) => string;
|
|
4
|
-
};
|
|
5
|
-
export declare const set: (_type: unknown) => {
|
|
6
|
-
fromObject: (arr: unknown[]) => unknown[];
|
|
7
|
-
toObject: (set: unknown[]) => unknown[];
|
|
8
|
-
toHex: (arr: unknown[]) => string;
|
|
9
|
-
};
|
|
10
|
-
export declare const map: (_keyType: unknown, _valueType: unknown) => {
|
|
11
|
-
fromObject: (arr: [unknown, unknown][]) => [unknown, unknown][];
|
|
12
|
-
toObject: (map: [unknown, unknown][]) => [unknown, unknown][];
|
|
13
|
-
toHex: (arr: [unknown, unknown][]) => string;
|
|
14
|
-
};
|
|
15
|
-
export declare const bool: {
|
|
16
|
-
toHex: (value: boolean) => string;
|
|
17
|
-
};
|
|
18
|
-
export declare const string: {
|
|
19
|
-
toHex: (value: string) => string;
|
|
20
|
-
};
|
|
21
|
-
export declare const public_key: {
|
|
22
|
-
toHex: (key: string) => string;
|
|
23
|
-
};
|
|
24
|
-
export declare const uint16: {
|
|
25
|
-
toHex: (value: number) => string;
|
|
26
|
-
};
|
|
27
|
-
export declare const _internal: {
|
|
28
|
-
decimal_precision_string: (value: string, precision: number) => string;
|
|
29
|
-
precision_number_long: (value: string, precision: number) => void;
|
|
30
|
-
};
|
|
31
|
-
export declare const type_id: {
|
|
32
|
-
toHex: (value: string) => string;
|
|
33
|
-
};
|
|
34
|
-
export declare const protocol_id_type: (_name: string) => {
|
|
35
|
-
toHex: (value: number) => string;
|
|
36
|
-
};
|