zigap-utils 0.0.39 → 0.0.41
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/README.md +1 -1
- package/dist/components/AddressProvideQR/AddressProvideQR.types.d.ts +0 -1
- package/dist/components/LoginQR/LoginQR.types.d.ts +3 -7
- package/dist/index.cjs.js +11 -11
- package/dist/index.es.js +391 -499
- package/dist/util/addressProvide.d.ts +3 -3
- package/dist/util/index.d.ts +2 -2
- package/dist/util/socketService.d.ts +11 -0
- package/dist/util/types.d.ts +1 -4
- package/dist/validation/hashing.d.ts +2 -0
- package/dist/validation/token.d.ts +5 -0
- package/package.json +15 -1
- package/dist/util/test/index.d.ts +0 -1
- package/dist/util/test/test.d.ts +0 -2
- package/dist/util/test2.d.ts +0 -2
- package/dist/xphere/validation.d.ts +0 -10
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AccountType } from './types';
|
|
2
2
|
|
|
3
3
|
declare class AddressProvideService {
|
|
4
4
|
private isAccountType;
|
|
5
|
-
getAccount(): Promise<
|
|
6
|
-
qrAddressProvide(roomId: string): Promise<
|
|
5
|
+
getAccount(): Promise<AccountType>;
|
|
6
|
+
qrAddressProvide(roomId: string): Promise<AccountType>;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: AddressProvideService;
|
|
9
9
|
export default _default;
|
package/dist/util/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { default as qrService } from './qrService';
|
|
2
|
+
export { default as addressProvice } from './addressProvide';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare class SocketService {
|
|
2
|
+
private socketInstance;
|
|
3
|
+
constructor();
|
|
4
|
+
joinRoom(roomId: string): void;
|
|
5
|
+
leaveRoom(roomId: string): void;
|
|
6
|
+
confirmMessage(roomId: string, message: string): import('socket.io-client').Socket<import('@socket.io/component-emitter').DefaultEventsMap, import('@socket.io/component-emitter').DefaultEventsMap>;
|
|
7
|
+
onMessageReceived(type: string, callback: (message: any) => void): void;
|
|
8
|
+
offMessageReceived(type: string): void;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: SocketService;
|
|
11
|
+
export default _default;
|
package/dist/util/types.d.ts
CHANGED
|
@@ -10,18 +10,15 @@ export interface AccountCryptoType {
|
|
|
10
10
|
publicKey: string;
|
|
11
11
|
address: string;
|
|
12
12
|
network: string;
|
|
13
|
-
nickName: string;
|
|
14
13
|
etc: string;
|
|
15
14
|
}
|
|
16
|
-
export interface
|
|
15
|
+
export interface AccountType {
|
|
17
16
|
address: string;
|
|
18
17
|
network: string;
|
|
19
|
-
nickName: string;
|
|
20
18
|
}
|
|
21
19
|
export interface ResponseLoginType {
|
|
22
20
|
address: string;
|
|
23
21
|
network: string;
|
|
24
|
-
nickName: string;
|
|
25
22
|
signature: string;
|
|
26
23
|
publicKey: string;
|
|
27
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigap-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,6 +13,20 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
|
+
"export": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"require": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./components": {
|
|
22
|
+
"import": "./dist/components/index.js",
|
|
23
|
+
"require": "./dist/components/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./util": {
|
|
26
|
+
"import": "./dist/util/index.js",
|
|
27
|
+
"require": "./dist/util/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
16
30
|
"scripts": {
|
|
17
31
|
"preinstall": "npx only-allow pnpm",
|
|
18
32
|
"dev": "vite",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as test } from './test';
|
package/dist/util/test/test.d.ts
DELETED
package/dist/util/test2.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PayloadType } from 'src/components';
|
|
2
|
-
|
|
3
|
-
declare class Validation {
|
|
4
|
-
private base64url;
|
|
5
|
-
createToken(payload: PayloadType, signature: string): string;
|
|
6
|
-
verifyToken(token: string): any;
|
|
7
|
-
getAddress(publicKey: string): string;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: Validation;
|
|
10
|
-
export default _default;
|