@reown/appkit-siwx 1.8.15-ea982070c1d274f5971447c430b6d77717082e78.0 → 1.8.15-viem-upgrade.0
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/package.json +5 -5
- package/dist/esm/exports/index.js +0 -2
- package/dist/esm/exports/index.js.map +0 -1
- package/dist/esm/exports/react.js +0 -10
- package/dist/esm/exports/react.js.map +0 -1
- package/dist/esm/exports/vue.js +0 -16
- package/dist/esm/exports/vue.js.map +0 -1
- package/dist/esm/src/configs/DefaultSIWX.js +0 -37
- package/dist/esm/src/configs/DefaultSIWX.js.map +0 -1
- package/dist/esm/src/configs/ReownAuthenticationSIWX.js +0 -3
- package/dist/esm/src/configs/ReownAuthenticationSIWX.js.map +0 -1
- package/dist/esm/src/configs/index.js +0 -3
- package/dist/esm/src/configs/index.js.map +0 -1
- package/dist/esm/src/core/SIWXConfig.js +0 -107
- package/dist/esm/src/core/SIWXConfig.js.map +0 -1
- package/dist/esm/src/core/SIWXMessenger.js +0 -87
- package/dist/esm/src/core/SIWXMessenger.js.map +0 -1
- package/dist/esm/src/core/SIWXSigner.js +0 -3
- package/dist/esm/src/core/SIWXSigner.js.map +0 -1
- package/dist/esm/src/core/SIWXStorage.js +0 -2
- package/dist/esm/src/core/SIWXStorage.js.map +0 -1
- package/dist/esm/src/core/SIWXVerifier.js +0 -16
- package/dist/esm/src/core/SIWXVerifier.js.map +0 -1
- package/dist/esm/src/core/index.js +0 -5
- package/dist/esm/src/core/index.js.map +0 -1
- package/dist/esm/src/index.js +0 -6
- package/dist/esm/src/index.js.map +0 -1
- package/dist/esm/src/messengers/InformalMessenger.js +0 -68
- package/dist/esm/src/messengers/InformalMessenger.js.map +0 -1
- package/dist/esm/src/messengers/index.js +0 -2
- package/dist/esm/src/messengers/index.js.map +0 -1
- package/dist/esm/src/signers/DefaultSigner.js +0 -21
- package/dist/esm/src/signers/DefaultSigner.js.map +0 -1
- package/dist/esm/src/storages/LocalStorage.js +0 -51
- package/dist/esm/src/storages/LocalStorage.js.map +0 -1
- package/dist/esm/src/storages/index.js +0 -2
- package/dist/esm/src/storages/index.js.map +0 -1
- package/dist/esm/src/verifiers/BIP122Verifier.js +0 -21
- package/dist/esm/src/verifiers/BIP122Verifier.js.map +0 -1
- package/dist/esm/src/verifiers/EIP155Verifier.js +0 -36
- package/dist/esm/src/verifiers/EIP155Verifier.js.map +0 -1
- package/dist/esm/src/verifiers/SolanaVerifier.js +0 -26
- package/dist/esm/src/verifiers/SolanaVerifier.js.map +0 -1
- package/dist/esm/src/verifiers/index.js +0 -4
- package/dist/esm/src/verifiers/index.js.map +0 -1
- package/dist/esm/tests/configs/ReownAuthenticationSIWX.test.js +0 -7
- package/dist/esm/tests/configs/ReownAuthenticationSIWX.test.js.map +0 -1
- package/dist/esm/tests/messengers/InformalMessenger.test.js +0 -96
- package/dist/esm/tests/messengers/InformalMessenger.test.js.map +0 -1
- package/dist/esm/tests/storages/LocalStorage.test.js +0 -52
- package/dist/esm/tests/storages/LocalStorage.test.js.map +0 -1
- package/dist/esm/tests/verifiers/BIP122Verifier.test.js +0 -68
- package/dist/esm/tests/verifiers/BIP122Verifier.test.js.map +0 -1
- package/dist/esm/tests/verifiers/EIP155Verifier.test.js +0 -107
- package/dist/esm/tests/verifiers/EIP155Verifier.test.js.map +0 -1
- package/dist/esm/tests/verifiers/SolanaVerifier.test.js +0 -58
- package/dist/esm/tests/verifiers/SolanaVerifier.test.js.map +0 -1
- package/dist/esm/tsconfig.tsbuildinfo +0 -1
- package/dist/types/exports/index.d.ts +0 -1
- package/dist/types/exports/react.d.ts +0 -2
- package/dist/types/exports/vue.d.ts +0 -3
- package/dist/types/src/configs/DefaultSIWX.d.ts +0 -11
- package/dist/types/src/configs/ReownAuthenticationSIWX.d.ts +0 -2
- package/dist/types/src/configs/index.d.ts +0 -2
- package/dist/types/src/core/SIWXConfig.d.ts +0 -104
- package/dist/types/src/core/SIWXMessenger.d.ts +0 -93
- package/dist/types/src/core/SIWXSigner.d.ts +0 -3
- package/dist/types/src/core/SIWXStorage.d.ts +0 -40
- package/dist/types/src/core/SIWXVerifier.d.ts +0 -27
- package/dist/types/src/core/index.d.ts +0 -4
- package/dist/types/src/index.d.ts +0 -6
- package/dist/types/src/messengers/InformalMessenger.d.ts +0 -46
- package/dist/types/src/messengers/index.d.ts +0 -1
- package/dist/types/src/signers/DefaultSigner.d.ts +0 -4
- package/dist/types/src/storages/LocalStorage.d.ts +0 -25
- package/dist/types/src/storages/index.d.ts +0 -1
- package/dist/types/src/verifiers/BIP122Verifier.d.ts +0 -9
- package/dist/types/src/verifiers/EIP155Verifier.d.ts +0 -9
- package/dist/types/src/verifiers/SolanaVerifier.d.ts +0 -9
- package/dist/types/src/verifiers/index.d.ts +0 -3
- package/dist/types/tests/configs/ReownAuthenticationSIWX.test.d.ts +0 -1
- package/dist/types/tests/messengers/InformalMessenger.test.d.ts +0 -1
- package/dist/types/tests/storages/LocalStorage.test.d.ts +0 -1
- package/dist/types/tests/verifiers/BIP122Verifier.test.d.ts +0 -1
- package/dist/types/tests/verifiers/EIP155Verifier.test.d.ts +0 -1
- package/dist/types/tests/verifiers/SolanaVerifier.test.d.ts +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../src/index.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SIWXConfig } from '../core/SIWXConfig.js';
|
|
2
|
-
/**
|
|
3
|
-
* This is the default configuration for SIWX.
|
|
4
|
-
*
|
|
5
|
-
* This configuration is split in three pieces `messenger`, `verifiers` and `storage`.
|
|
6
|
-
* By default it uses InformalMessenger, EIP155Verifier, SolanaVerifier, BIP122Verifier, and LocalStorage.
|
|
7
|
-
* You may override any of these defaults by passing your own configuration for the constructor.
|
|
8
|
-
*/
|
|
9
|
-
export declare class DefaultSIWX extends SIWXConfig {
|
|
10
|
-
constructor(params?: Partial<SIWXConfig.ConstructorParams>);
|
|
11
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { CaipNetworkId } from '@reown/appkit-common';
|
|
2
|
-
import type { SIWXConfig as SIWXConfigInterface, SIWXMessage, SIWXSession } from '@reown/appkit-controllers';
|
|
3
|
-
import type { SIWXMessenger } from './SIWXMessenger.js';
|
|
4
|
-
import type { SIWXSigner } from './SIWXSigner.js';
|
|
5
|
-
import type { SIWXStorage } from './SIWXStorage.js';
|
|
6
|
-
import type { SIWXVerifier } from './SIWXVerifier.js';
|
|
7
|
-
/**
|
|
8
|
-
* This is the base class for a SIWX config.
|
|
9
|
-
* You may extend this class to create your own configuration replacing the default logic.
|
|
10
|
-
*/
|
|
11
|
-
export declare abstract class SIWXConfig implements SIWXConfigInterface {
|
|
12
|
-
private messenger;
|
|
13
|
-
private verifiers;
|
|
14
|
-
private storage;
|
|
15
|
-
signer: SIWXSigner;
|
|
16
|
-
required: boolean;
|
|
17
|
-
constructor(params: SIWXConfig.ConstructorParams);
|
|
18
|
-
/**
|
|
19
|
-
* Uses the messenger to create a message.
|
|
20
|
-
*
|
|
21
|
-
* @param input SIWXMessage.Input
|
|
22
|
-
* @returns Promise<SIWXMessage>
|
|
23
|
-
*/
|
|
24
|
-
createMessage(input: SIWXMessage.Input): Promise<SIWXMessage>;
|
|
25
|
-
/**
|
|
26
|
-
* Combine the verifiers to verify the session and storage to store it.
|
|
27
|
-
* It will throw an error if the session is not valid.
|
|
28
|
-
*
|
|
29
|
-
* @param session SIWXSession
|
|
30
|
-
* @returns Promise<void>
|
|
31
|
-
*/
|
|
32
|
-
addSession(session: SIWXSession): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Combine the verifiers to verify the sessions and storage to store all of them.
|
|
35
|
-
* It will throw an error if any of the sessions is not valid.
|
|
36
|
-
*
|
|
37
|
-
* @param chainId CaipNetworkId
|
|
38
|
-
* @param address string
|
|
39
|
-
* @returns Promise<SIWXSession[]>
|
|
40
|
-
*/
|
|
41
|
-
setSessions(sessions: SIWXSession[]): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Get the sessions from the storage and verify them.
|
|
44
|
-
* If the session is not valid, it will be removed from the storage.
|
|
45
|
-
*
|
|
46
|
-
* @param chainId CaipNetworkId
|
|
47
|
-
* @param address string
|
|
48
|
-
* @returns Promise<SIWXSession[]>
|
|
49
|
-
*/
|
|
50
|
-
getSessions(chainId: CaipNetworkId, address: string): Promise<SIWXSession[]>;
|
|
51
|
-
/**
|
|
52
|
-
* Remove the session from the storage.
|
|
53
|
-
*
|
|
54
|
-
* @param chainId CaipNetworkId
|
|
55
|
-
* @param address string
|
|
56
|
-
* @returns Promise<void>
|
|
57
|
-
*/
|
|
58
|
-
revokeSession(chainId: CaipNetworkId, address: string): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* This method should verify the session.
|
|
61
|
-
* It will first check if the verifier should verify the session and then call the verify method.
|
|
62
|
-
* It will return `true` if the session is valid for all verifications and there is at least one verification.
|
|
63
|
-
*
|
|
64
|
-
* @param session SIWXSession
|
|
65
|
-
* @returns Promise<boolean> - If `true` means the session is valid.
|
|
66
|
-
*/
|
|
67
|
-
protected verifySession(session: SIWXSession): Promise<boolean>;
|
|
68
|
-
/**
|
|
69
|
-
* This method determines whether the wallet stays connected when the user denies the signature request.
|
|
70
|
-
*
|
|
71
|
-
* @returns {boolean}
|
|
72
|
-
*/
|
|
73
|
-
getRequired(): boolean;
|
|
74
|
-
signMessage({ message }: {
|
|
75
|
-
message: string;
|
|
76
|
-
chainId: string;
|
|
77
|
-
accountAddress: string;
|
|
78
|
-
}): Promise<string>;
|
|
79
|
-
}
|
|
80
|
-
export declare namespace SIWXConfig {
|
|
81
|
-
type ConstructorParams = {
|
|
82
|
-
/**
|
|
83
|
-
* The messenger to create the messages.
|
|
84
|
-
*/
|
|
85
|
-
messenger: SIWXMessenger;
|
|
86
|
-
/**
|
|
87
|
-
* The verifiers to verify the sessions.
|
|
88
|
-
*/
|
|
89
|
-
verifiers: SIWXVerifier[];
|
|
90
|
-
/**
|
|
91
|
-
* The storage to store the sessions.
|
|
92
|
-
*/
|
|
93
|
-
storage: SIWXStorage;
|
|
94
|
-
/**
|
|
95
|
-
* If false the wallet stays connected when user denies the signature request.
|
|
96
|
-
* @default true
|
|
97
|
-
*/
|
|
98
|
-
required?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* The signer handler to sign the message. If not provided, a signature request will be made to the wallet.
|
|
101
|
-
*/
|
|
102
|
-
signer?: SIWXSigner;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { SIWXMessage } from '@reown/appkit-controllers';
|
|
2
|
-
/**
|
|
3
|
-
* This is the base class for a SIWX messenger.
|
|
4
|
-
* It provides the basic structure for creating a SIWX message and util functions.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class SIWXMessenger {
|
|
7
|
-
domain: SIWXMessage['domain'];
|
|
8
|
-
uri: SIWXMessage['uri'];
|
|
9
|
-
statement?: SIWXMessage['statement'];
|
|
10
|
-
resources?: SIWXMessage['resources'];
|
|
11
|
-
/**
|
|
12
|
-
* The version of the SIWXMessage class
|
|
13
|
-
*/
|
|
14
|
-
protected abstract readonly version: SIWXMessage['version'];
|
|
15
|
-
/**
|
|
16
|
-
* Expiration time in milliseconds
|
|
17
|
-
*/
|
|
18
|
-
protected expiration?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Getter function for message nonce value
|
|
21
|
-
*/
|
|
22
|
-
protected getNonce: SIWXMessenger.ConstructorParams['getNonce'];
|
|
23
|
-
/**
|
|
24
|
-
* Getter function for message request ID
|
|
25
|
-
*/
|
|
26
|
-
protected getRequestId?: SIWXMessenger.ConstructorParams['getRequestId'];
|
|
27
|
-
/**
|
|
28
|
-
* The method that generates the message string.
|
|
29
|
-
* This method must be implemented by the child class.
|
|
30
|
-
*
|
|
31
|
-
* @param params SIWXMessage.Data
|
|
32
|
-
* @returns string
|
|
33
|
-
*/
|
|
34
|
-
protected abstract stringify(params: SIWXMessage.Data): string;
|
|
35
|
-
constructor(params: SIWXMessenger.ConstructorParams);
|
|
36
|
-
/**
|
|
37
|
-
* This is the default method to create a SIWXMessage object.
|
|
38
|
-
* It will call the `getNonce`, `getRequestId`, `getExpirationTime`, `getIssuedAt`, and `getNotBefore` methods.
|
|
39
|
-
* It appends the `stringify` method to the object as `toString`.
|
|
40
|
-
*
|
|
41
|
-
* @param input SIWXMessage.Input
|
|
42
|
-
* @returns
|
|
43
|
-
*/
|
|
44
|
-
createMessage(input: SIWXMessage.Input): Promise<SIWXMessage>;
|
|
45
|
-
/**
|
|
46
|
-
* This method generates the expiration time based on the `notBefore` value and the `expiration` value.
|
|
47
|
-
* You may override this method to provide a custom expiration time.
|
|
48
|
-
*
|
|
49
|
-
* @param Pick<SIWXMessage.Input, 'notBefore'>
|
|
50
|
-
* @returns string | undefined - The expiration time in `stringifyDate` format or undefined if not available
|
|
51
|
-
*/
|
|
52
|
-
protected getExpirationTime({ notBefore }: Pick<SIWXMessage.Input, 'notBefore'>): string | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* This method generates the `notBefore` formatted value based on the `notBefore` input.
|
|
55
|
-
* You may override this method to provide a custom `notBefore` value.
|
|
56
|
-
*
|
|
57
|
-
* @param Pick<SIWXMessage.Input, 'notBefore'>
|
|
58
|
-
* @returns string | undefined - The `notBefore` value in `stringifyDate` format or undefined if not available
|
|
59
|
-
*/
|
|
60
|
-
protected getNotBefore({ notBefore }: Pick<SIWXMessage.Input, 'notBefore'>): string | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* This method generates the `issuedAt` formatted value based on the current date.
|
|
63
|
-
* You may override this method to provide a custom `issuedAt` value.
|
|
64
|
-
*
|
|
65
|
-
* @returns string - The `issuedAt` value in `stringifyDate` format
|
|
66
|
-
*/
|
|
67
|
-
protected getIssuedAt(): string;
|
|
68
|
-
/**
|
|
69
|
-
* This method converts a date object to a formatted string.
|
|
70
|
-
* You may override this method to provide a custom date format.
|
|
71
|
-
*
|
|
72
|
-
* @param date Date
|
|
73
|
-
* @returns string - The date in ISO format
|
|
74
|
-
*/
|
|
75
|
-
protected stringifyDate(date: Date): string;
|
|
76
|
-
}
|
|
77
|
-
export declare namespace SIWXMessenger {
|
|
78
|
-
interface ConstructorParams extends Omit<SIWXMessage.Metadata, 'nonce' | 'version'> {
|
|
79
|
-
/**
|
|
80
|
-
* Time in milliseconds
|
|
81
|
-
*/
|
|
82
|
-
expiration?: number;
|
|
83
|
-
/**
|
|
84
|
-
* Getter function for message nonce value
|
|
85
|
-
*/
|
|
86
|
-
getNonce: (params: SIWXMessage.Input) => Promise<SIWXMessage['nonce']>;
|
|
87
|
-
/**
|
|
88
|
-
* Getter function for message request ID
|
|
89
|
-
* If not provided, the request ID will be omitted
|
|
90
|
-
*/
|
|
91
|
-
getRequestId?: () => Promise<SIWXMessage['requestId']>;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { CaipNetworkId } from '@reown/appkit-common';
|
|
2
|
-
import type { SIWXSession } from '@reown/appkit-controllers';
|
|
3
|
-
/**
|
|
4
|
-
* This is the interface for a SIWX storage.
|
|
5
|
-
*/
|
|
6
|
-
export interface SIWXStorage {
|
|
7
|
-
/**
|
|
8
|
-
* Adds a new session for the storage.
|
|
9
|
-
* This method should not verify the session, only store it.
|
|
10
|
-
*
|
|
11
|
-
* @param session SIWXSession
|
|
12
|
-
* @returns Promise<void>
|
|
13
|
-
*/
|
|
14
|
-
add(session: SIWXSession): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Deletes a session from the storage.
|
|
17
|
-
*
|
|
18
|
-
* @param chainId CaipNetworkId
|
|
19
|
-
* @param address string
|
|
20
|
-
* @returns Promise<void>
|
|
21
|
-
*/
|
|
22
|
-
delete(chainId: CaipNetworkId, address: string): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Gets a list of sessions for a given chainId and address.
|
|
25
|
-
* This method should not verify sessions, only return the sessions that are stored.
|
|
26
|
-
*
|
|
27
|
-
* @param chainId CaipNetworkId
|
|
28
|
-
* @param address string
|
|
29
|
-
* @returns Promise<SIWXSession[]>
|
|
30
|
-
*/
|
|
31
|
-
get(chainId: CaipNetworkId, address: string): Promise<SIWXSession[]>;
|
|
32
|
-
/**
|
|
33
|
-
* Replaces the current sessions with the new list of sessions.
|
|
34
|
-
* This method should not verify sessions, only store them.
|
|
35
|
-
*
|
|
36
|
-
* @param sessions SIWXSession[]
|
|
37
|
-
* @returns Promise<void>
|
|
38
|
-
*/
|
|
39
|
-
set(sessions: SIWXSession[]): Promise<void>;
|
|
40
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { ChainNamespace } from '@reown/appkit-common';
|
|
2
|
-
import type { SIWXSession } from '@reown/appkit-controllers';
|
|
3
|
-
/**
|
|
4
|
-
* This is the base class for a SIWX verifier.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class SIWXVerifier {
|
|
7
|
-
/**
|
|
8
|
-
* The chain namespace that this verifier should verify.
|
|
9
|
-
*/
|
|
10
|
-
abstract readonly chainNamespace: ChainNamespace;
|
|
11
|
-
/**
|
|
12
|
-
* This method should return true if the verifier should verify the session.
|
|
13
|
-
* By default it will check by the chain namespace, but you may override it for a specific requirement.
|
|
14
|
-
*
|
|
15
|
-
* @param session SIWXSession
|
|
16
|
-
* @returns boolean
|
|
17
|
-
*/
|
|
18
|
-
shouldVerify(session: SIWXSession): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* This method should verify the session.
|
|
21
|
-
* You must implement this method with the verification logic.
|
|
22
|
-
*
|
|
23
|
-
* @param session SIWXSession
|
|
24
|
-
* @returns Promise<boolean> - If `true` means the session is valid.
|
|
25
|
-
*/
|
|
26
|
-
abstract verify(session: SIWXSession): Promise<boolean>;
|
|
27
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './messengers/index.js';
|
|
2
|
-
export * from './verifiers/index.js';
|
|
3
|
-
export * from './storages/index.js';
|
|
4
|
-
export * from './configs/index.js';
|
|
5
|
-
export * from './core/index.js';
|
|
6
|
-
export type { SIWXMessage, SIWXConfig, SIWXSession } from '@reown/appkit-controllers';
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type CaipNetworkId } from '@reown/appkit-common';
|
|
2
|
-
import { type SIWXMessage } from '@reown/appkit-controllers';
|
|
3
|
-
import { SIWXMessenger } from '../core/SIWXMessenger.js';
|
|
4
|
-
/**
|
|
5
|
-
* Follow Informal Message template from EIP-4361
|
|
6
|
-
* @see https://eips.ethereum.org/EIPS/eip-4361#informal-message-template
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```
|
|
10
|
-
* ${scheme}:// ${domain} wants you to sign in with your Ethereum account:
|
|
11
|
-
* ${address}
|
|
12
|
-
*
|
|
13
|
-
* ${statement}
|
|
14
|
-
*
|
|
15
|
-
* URI: ${uri}
|
|
16
|
-
* Version: ${version}
|
|
17
|
-
* Chain ID: ${chain-id}
|
|
18
|
-
* Nonce: ${nonce}
|
|
19
|
-
* Issued At: ${issued-at}
|
|
20
|
-
* Expiration Time: ${expiration-time}
|
|
21
|
-
* Not Before: ${not-before}
|
|
22
|
-
* Request ID: ${request-id}
|
|
23
|
-
* Resources:
|
|
24
|
-
* - ${resources[0]}
|
|
25
|
-
* - ${resources[1]}
|
|
26
|
-
* ...
|
|
27
|
-
* - ${resources[n]}
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare class InformalMessenger extends SIWXMessenger {
|
|
31
|
-
protected readonly version = "1";
|
|
32
|
-
private readonly clearChainIdNamespace;
|
|
33
|
-
constructor({ clearChainIdNamespace, ...params }: InformalMessenger.ConstructorParams);
|
|
34
|
-
/**
|
|
35
|
-
* Get the blockchain name for a given chain ID
|
|
36
|
-
* @param chainId The chain ID to get the blockchain name for
|
|
37
|
-
* @returns The blockchain name
|
|
38
|
-
*/
|
|
39
|
-
protected getNetworkName(chainId: CaipNetworkId): string | undefined;
|
|
40
|
-
protected stringify(params: SIWXMessage.Data): string;
|
|
41
|
-
}
|
|
42
|
-
export declare namespace InformalMessenger {
|
|
43
|
-
type ConstructorParams = SIWXMessenger.ConstructorParams & {
|
|
44
|
-
clearChainIdNamespace?: boolean;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './InformalMessenger.js';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { CaipNetworkId } from '@reown/appkit-common';
|
|
2
|
-
import type { SIWXSession } from '@reown/appkit-controllers';
|
|
3
|
-
import type { SIWXStorage } from '../core/SIWXStorage.js';
|
|
4
|
-
/**
|
|
5
|
-
* This storage saves the sessions in the localStorage.
|
|
6
|
-
*/
|
|
7
|
-
export declare class LocalStorage implements SIWXStorage {
|
|
8
|
-
private key;
|
|
9
|
-
constructor(params: LocalStorage.ConstructorParams);
|
|
10
|
-
add(session: SIWXSession): Promise<void>;
|
|
11
|
-
set(sessions: SIWXSession[]): Promise<void>;
|
|
12
|
-
get(chainId: CaipNetworkId, address: string): Promise<SIWXSession[]>;
|
|
13
|
-
delete(chainId: string, address: string): Promise<void>;
|
|
14
|
-
private getSessions;
|
|
15
|
-
private setSessions;
|
|
16
|
-
}
|
|
17
|
-
export declare namespace LocalStorage {
|
|
18
|
-
type ConstructorParams = {
|
|
19
|
-
/**
|
|
20
|
-
* The key to save the sessions in the localStorage.
|
|
21
|
-
*/
|
|
22
|
-
key: string;
|
|
23
|
-
};
|
|
24
|
-
type Sessions = SIWXSession[];
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './LocalStorage.js';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SIWXSession } from '@reown/appkit-controllers';
|
|
2
|
-
import { SIWXVerifier } from '../core/SIWXVerifier.js';
|
|
3
|
-
/**
|
|
4
|
-
* Default verifier for BIP122 sessions.
|
|
5
|
-
*/
|
|
6
|
-
export declare class BIP122Verifier extends SIWXVerifier {
|
|
7
|
-
readonly chainNamespace: "bip122";
|
|
8
|
-
verify(session: SIWXSession): Promise<boolean>;
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type SIWXSession } from '@reown/appkit-controllers';
|
|
2
|
-
import { SIWXVerifier } from '../core/SIWXVerifier.js';
|
|
3
|
-
/**
|
|
4
|
-
* Default verifier for EIP155 sessions.
|
|
5
|
-
*/
|
|
6
|
-
export declare class EIP155Verifier extends SIWXVerifier {
|
|
7
|
-
readonly chainNamespace: "eip155";
|
|
8
|
-
verify(session: SIWXSession): Promise<boolean>;
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SIWXSession } from '@reown/appkit-controllers';
|
|
2
|
-
import { SIWXVerifier } from '../core/SIWXVerifier.js';
|
|
3
|
-
/**
|
|
4
|
-
* Default verifier for Solana sessions.
|
|
5
|
-
*/
|
|
6
|
-
export declare class SolanaVerifier extends SIWXVerifier {
|
|
7
|
-
readonly chainNamespace: "solana";
|
|
8
|
-
verify(session: SIWXSession): Promise<boolean>;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|