zigap-utils 0.0.38 → 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.
@@ -1,9 +1,9 @@
1
- import { AccountProvideType } from './types';
1
+ import { AccountType } from './types';
2
2
 
3
3
  declare class AddressProvideService {
4
4
  private isAccountType;
5
- getAccount(): Promise<AccountProvideType>;
6
- qrAddressProvide(roomId: string): Promise<AccountProvideType>;
5
+ getAccount(): Promise<AccountType>;
6
+ qrAddressProvide(roomId: string): Promise<AccountType>;
7
7
  }
8
8
  declare const _default: AddressProvideService;
9
9
  export default _default;
@@ -1 +1,2 @@
1
- export * from './test';
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;
@@ -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 AccountProvideType {
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
  }
@@ -0,0 +1,2 @@
1
+ export declare function hashString(input: string): string;
2
+ export declare function verifyHash(input: string, hash: string): boolean;
@@ -0,0 +1,5 @@
1
+ import { PayloadType } from 'src/components';
2
+
3
+ export declare function createToken(payload: PayloadType, signature: string): string;
4
+ export declare function verifyToken(token: string): any;
5
+ export declare function getAddress(publicKey: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigap-utils",
3
- "version": "0.0.38",
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';
@@ -1,2 +0,0 @@
1
- declare const test: () => void;
2
- export default test;
@@ -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;