zigap-utils 0.0.29 → 0.0.31

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 CHANGED
@@ -26,7 +26,7 @@ const App = () => {
26
26
  logoSize={25}
27
27
  validTime={10}
28
28
  sigMessage="hello world"
29
- onReceive={({ isSuccess, address, network }) => {
29
+ onReceive={({ isSuccess, address, network, signature, payload }) => {
30
30
  if(isSuccess) {
31
31
  // something to do after login
32
32
  }
@@ -47,7 +47,7 @@ const App = () => {
47
47
  | --- | :-: | --- | --- | --- |
48
48
  | `dapp` | true | string | | Name of the dapp to use |
49
49
  | `url` | true | string | | The url of dapp to connect |
50
- | `availableNetworks` | true | string[] | | The main network you want to access |
50
+ | `availableNetworks` | true | string[] | | List of connectable networks in dapp |
51
51
  | `sigMessage` | true | string | | Messages signed to verify the identity of the user |
52
52
  | `validTime` | true | number | | QR code valid time(minutes) |
53
53
  | `onReceive` | true | (value) => void | | Function called after login request |
@@ -66,7 +66,7 @@ const App = () => {
66
66
  | ------------------- | :------: | --------------- | ------------- | --------------------------------------- |
67
67
  | `dapp` | true | string | | Name of the dapp to use |
68
68
  | `url` | true | string | | The url of dapp to connect |
69
- | `availableNetworks` | true | string[] | | The main network you want to access |
69
+ | `availableNetworks` | true | string[] | | List of connectable networks in dapp |
70
70
  | `validTime` | true | number | | QR code valid time(minutes) |
71
71
  | `onReceive` | true | (value) => void | | Function called after login request |
72
72
  | `size` | false | number | 128 | canvas width |
@@ -8,10 +8,16 @@ export type CommonStyleType = {
8
8
  isShowLogo?: boolean;
9
9
  logoSize?: number;
10
10
  };
11
+ export type PayloadType = {
12
+ publicKey: string;
13
+ message: string;
14
+ };
11
15
  export type LoginResultType = {
12
16
  isSuccess: boolean;
13
17
  address?: string;
14
18
  network?: string;
19
+ signature?: string;
20
+ payload?: PayloadType;
15
21
  };
16
22
  export type LoginQRProps = {
17
23
  availableNetworks: string[];