zigap-utils 0.0.498 → 0.0.501
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/App.d.ts +2 -0
- package/dist/components/AddressProvideQR/AddressProvideQR.d.ts +4 -0
- package/dist/components/AddressProvideQR/AddressProvideQR.types.d.ts +18 -0
- package/dist/components/AddressProvideQR/index.d.ts +2 -0
- package/dist/components/LoginQR/LoginQR.d.ts +4 -0
- package/dist/components/LoginQR/LoginQR.types.d.ts +48 -0
- package/dist/components/LoginQR/index.d.ts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useZigap.d.ts +14 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +6874 -0
- package/dist/main.d.ts +1 -0
- package/dist/utils/addressProvide.d.ts +9 -0
- package/dist/utils/cryptoUtils.d.ts +19 -0
- package/dist/utils/login.d.ts +14 -0
- package/dist/utils/socketInstance.d.ts +9 -0
- package/dist/utils/types.d.ts +23 -0
- package/dist/validation/hashing.d.ts +2 -0
- package/dist/validation/token.d.ts +5 -0
- package/dist/xphere/enc.d.ts +12 -0
- package/dist/xphere/index.d.ts +13 -0
- package/dist/xphere/sign.d.ts +18 -0
- package/dist/xphere/util.d.ts +10 -0
- package/dist/xphere/validation.d.ts +10 -0
- package/dist/zigap/index.d.ts +7 -0
- package/dist/zigap/qr.d.ts +7 -0
- package/dist/zigap/types.d.ts +4 -0
- package/package.json +5 -2
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AddressProvideQRProps } from './AddressProvideQR.types';
|
|
2
|
+
|
|
3
|
+
declare const AddressProvideQR: ({ availableNetworks, dapp, url, validSeconds, onReceive, isShowLogo, logoSize, icon, ...props }: AddressProvideQRProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default AddressProvideQR;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CommonStyleType } from 'src/components/LoginQR/LoginQR.types';
|
|
2
|
+
|
|
3
|
+
export type AddressProvideResultType = {
|
|
4
|
+
isSuccess: boolean;
|
|
5
|
+
address?: string;
|
|
6
|
+
network?: string;
|
|
7
|
+
nickName?: string;
|
|
8
|
+
};
|
|
9
|
+
export type AddressProvideQRProps = {
|
|
10
|
+
availableNetworks: string[];
|
|
11
|
+
dapp: string;
|
|
12
|
+
url: string;
|
|
13
|
+
validSeconds: number;
|
|
14
|
+
icon?: string;
|
|
15
|
+
onReceive: (res: {
|
|
16
|
+
isSuccess: boolean;
|
|
17
|
+
}) => void;
|
|
18
|
+
} & CommonStyleType;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LoginQRProps } from './LoginQR.types';
|
|
2
|
+
|
|
3
|
+
declare const LoginQR: ({ availableNetworks, dapp, url, sigMessage, onReceive, validSeconds, isShowLogo, logoSize, expire, icon, ...props }: LoginQRProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default LoginQR;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
export type CommonStyleType = {
|
|
4
|
+
size?: number;
|
|
5
|
+
bgColor?: string;
|
|
6
|
+
fgColor?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
isShowLogo?: boolean;
|
|
9
|
+
logoSize?: number;
|
|
10
|
+
};
|
|
11
|
+
export type PayloadType = {
|
|
12
|
+
publicKey: string;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
export type AccountType = {
|
|
16
|
+
address: string;
|
|
17
|
+
network: string;
|
|
18
|
+
nickName: string;
|
|
19
|
+
};
|
|
20
|
+
export type NoneLoginExpire = {
|
|
21
|
+
type: 'NONE';
|
|
22
|
+
seconds?: never;
|
|
23
|
+
};
|
|
24
|
+
export type FixedOrExtensionLoginExpire = {
|
|
25
|
+
type: 'FIX' | 'EXTEND';
|
|
26
|
+
seconds: number;
|
|
27
|
+
};
|
|
28
|
+
export type LoginExpireType = FixedOrExtensionLoginExpire | NoneLoginExpire;
|
|
29
|
+
export type LoginResultType = {
|
|
30
|
+
address: string;
|
|
31
|
+
network: string;
|
|
32
|
+
nickName: string;
|
|
33
|
+
token: string;
|
|
34
|
+
issuedDateTime: string;
|
|
35
|
+
expire: LoginExpireType;
|
|
36
|
+
};
|
|
37
|
+
export type LoginQRProps = {
|
|
38
|
+
availableNetworks: string[];
|
|
39
|
+
dapp: string;
|
|
40
|
+
url: string;
|
|
41
|
+
sigMessage: string;
|
|
42
|
+
validSeconds: number;
|
|
43
|
+
onReceive?: (res: {
|
|
44
|
+
isSuccess: boolean;
|
|
45
|
+
}) => void;
|
|
46
|
+
expire: LoginExpireType;
|
|
47
|
+
icon?: string;
|
|
48
|
+
} & CommonStyleType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as useZigap } from './useZigap';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const LOGIN_RES_KEY = "userInfo";
|
|
2
|
+
export declare const TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
|
3
|
+
declare const useZigap: () => {
|
|
4
|
+
userInfo: {
|
|
5
|
+
address: string | undefined;
|
|
6
|
+
network: string | undefined;
|
|
7
|
+
nickName: string | undefined;
|
|
8
|
+
token: string | undefined;
|
|
9
|
+
issuedDateTime: string | undefined;
|
|
10
|
+
expireDateTime: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
logout: () => void;
|
|
13
|
+
};
|
|
14
|
+
export default useZigap;
|
package/dist/index.d.ts
ADDED