@ocap/sdk 1.18.138 → 1.18.140
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.d.ts +5 -11
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="jest" />
|
|
3
1
|
import type { LiteralUnion } from 'type-fest';
|
|
4
2
|
import rightPad from 'lodash/padEnd';
|
|
5
3
|
import leftPad from 'lodash/padStart';
|
|
6
4
|
import BN from 'bn.js';
|
|
7
5
|
export declare const isBase58btc: (data: any) => boolean;
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
string
|
|
12
|
-
>;
|
|
13
|
-
export declare type KeyPairType = {
|
|
6
|
+
export type BytesType = string | Buffer | Uint8Array;
|
|
7
|
+
export type EncodingType = LiteralUnion<'hex' | 'base16' | 'base58' | 'base64' | 'Uint8Array' | 'buffer', string>;
|
|
8
|
+
export type KeyPairType = {
|
|
14
9
|
publicKey: BytesType;
|
|
15
10
|
secretKey: BytesType;
|
|
16
11
|
};
|
|
@@ -240,15 +235,14 @@ export declare function toAddress(did: string): string;
|
|
|
240
235
|
export declare function toDid(address: string): string;
|
|
241
236
|
export declare function isSameDid(a: string, b: string): boolean;
|
|
242
237
|
export declare function formatTxType(type: string): any;
|
|
243
|
-
/// <reference types="node" />
|
|
244
238
|
import { EncodingType, BytesType } from '@ocap/util';
|
|
245
239
|
import { DidType, DIDType, DIDTypeStr, DIDTypeArg } from '@arcblock/did';
|
|
246
|
-
|
|
240
|
+
type KeyPairType<T extends BytesType = string> = {
|
|
247
241
|
sk?: T;
|
|
248
242
|
pk?: T;
|
|
249
243
|
address?: string;
|
|
250
244
|
};
|
|
251
|
-
export
|
|
245
|
+
export type SerializedWallet = {
|
|
252
246
|
type: DIDTypeStr;
|
|
253
247
|
pk: string;
|
|
254
248
|
sk: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocap/sdk",
|
|
3
3
|
"description": "Forge javascript SDK packages all-in-one",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.140",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did-util": "1.18.
|
|
22
|
-
"@ocap/client": "1.18.
|
|
23
|
-
"@ocap/message": "1.18.
|
|
24
|
-
"@ocap/util": "1.18.
|
|
25
|
-
"@ocap/wallet": "1.18.
|
|
21
|
+
"@arcblock/did-util": "1.18.140",
|
|
22
|
+
"@ocap/client": "1.18.140",
|
|
23
|
+
"@ocap/message": "1.18.140",
|
|
24
|
+
"@ocap/util": "1.18.140",
|
|
25
|
+
"@ocap/wallet": "1.18.140",
|
|
26
26
|
"buffer": "6.0.3",
|
|
27
27
|
"debug": "^4.3.6",
|
|
28
28
|
"react-app-polyfill": "^1.0.6",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"test": "jest --forceExit --detectOpenHandles",
|
|
83
83
|
"coverage": "npm run test -- --coverage"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "dff40db208094d9c1af520bd10658e2da61fd515"
|
|
86
86
|
}
|