@reown/appkit-common-react-native 2.0.0-alpha.4 → 2.0.0-alpha.6
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/lib/commonjs/adapters/BitcoinBaseAdapter.js +10 -0
- package/lib/commonjs/adapters/BitcoinBaseAdapter.js.map +1 -0
- package/lib/commonjs/adapters/EvmAdapter.js +2 -2
- package/lib/commonjs/adapters/EvmAdapter.js.map +1 -1
- package/lib/commonjs/adapters/SolanaBaseAdapter.js.map +1 -1
- package/lib/commonjs/index.js +9 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types/index.js +4 -4
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/{siwe → siwx}/config.js.map +1 -1
- package/lib/commonjs/types/{siwe → siwx}/index.js +22 -0
- package/lib/commonjs/types/siwx/index.js.map +1 -0
- package/lib/commonjs/types/{siwe → siwx}/message.js.map +1 -1
- package/lib/commonjs/types/siwx/storage.js +6 -0
- package/lib/commonjs/types/siwx/storage.js.map +1 -0
- package/lib/commonjs/types/siwx/verifier.js +35 -0
- package/lib/commonjs/types/siwx/verifier.js.map +1 -0
- package/lib/commonjs/types/storage.js +22 -0
- package/lib/commonjs/types/storage.js.map +1 -1
- package/lib/commonjs/types/wallet/connector.js.map +1 -1
- package/lib/commonjs/utils/ConstantsUtil.js +10 -17
- package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
- package/lib/module/adapters/BitcoinBaseAdapter.js +5 -0
- package/lib/module/adapters/BitcoinBaseAdapter.js.map +1 -0
- package/lib/module/adapters/EvmAdapter.js +2 -2
- package/lib/module/adapters/EvmAdapter.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types/index.js +2 -2
- package/lib/module/types/{siwe → siwx}/config.js.map +1 -1
- package/lib/module/types/siwx/index.js +7 -0
- package/lib/module/types/siwx/index.js.map +1 -0
- package/lib/module/types/{siwe → siwx}/message.js.map +1 -1
- package/lib/module/types/siwx/storage.js +4 -0
- package/lib/module/types/siwx/storage.js.map +1 -0
- package/lib/module/types/siwx/verifier.js +30 -0
- package/lib/module/types/siwx/verifier.js.map +1 -0
- package/lib/module/types/storage.js +18 -0
- package/lib/module/types/storage.js.map +1 -1
- package/lib/module/types/wallet/connector.js.map +1 -1
- package/lib/module/utils/ConstantsUtil.js +10 -17
- package/lib/module/utils/ConstantsUtil.js.map +1 -1
- package/lib/typescript/adapters/BitcoinBaseAdapter.d.ts +5 -0
- package/lib/typescript/adapters/BitcoinBaseAdapter.d.ts.map +1 -0
- package/lib/typescript/adapters/EvmAdapter.d.ts +1 -1
- package/lib/typescript/adapters/EvmAdapter.d.ts.map +1 -1
- package/lib/typescript/adapters/SolanaBaseAdapter.d.ts +1 -0
- package/lib/typescript/adapters/SolanaBaseAdapter.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/types/api/events.d.ts +7 -5
- package/lib/typescript/types/api/events.d.ts.map +1 -1
- package/lib/typescript/types/api/wallet-api.d.ts +1 -0
- package/lib/typescript/types/api/wallet-api.d.ts.map +1 -1
- package/lib/typescript/types/blockchain/balance.d.ts +1 -1
- package/lib/typescript/types/blockchain/balance.d.ts.map +1 -1
- package/lib/typescript/types/blockchain/network.d.ts +1 -1
- package/lib/typescript/types/blockchain/network.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +1 -1
- package/lib/typescript/types/siwx/config.d.ts +73 -0
- package/lib/typescript/types/siwx/config.d.ts.map +1 -0
- package/lib/typescript/types/siwx/index.d.ts +5 -0
- package/lib/typescript/types/siwx/index.d.ts.map +1 -0
- package/lib/typescript/types/siwx/message.d.ts +92 -0
- package/lib/typescript/types/siwx/message.d.ts.map +1 -0
- package/lib/typescript/types/siwx/storage.d.ts +41 -0
- package/lib/typescript/types/siwx/storage.d.ts.map +1 -0
- package/lib/typescript/types/siwx/verifier.d.ts +28 -0
- package/lib/typescript/types/siwx/verifier.d.ts.map +1 -0
- package/lib/typescript/types/storage.d.ts +32 -0
- package/lib/typescript/types/storage.d.ts.map +1 -1
- package/lib/typescript/types/wallet/connection.d.ts +1 -0
- package/lib/typescript/types/wallet/connection.d.ts.map +1 -1
- package/lib/typescript/types/wallet/connector.d.ts +0 -2
- package/lib/typescript/types/wallet/connector.d.ts.map +1 -1
- package/lib/typescript/types/wallet/wallet-info.d.ts +1 -0
- package/lib/typescript/types/wallet/wallet-info.d.ts.map +1 -1
- package/lib/typescript/utils/ConstantsUtil.d.ts +9 -14
- package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/adapters/BitcoinBaseAdapter.ts +5 -0
- package/src/adapters/EvmAdapter.ts +2 -2
- package/src/adapters/SolanaBaseAdapter.ts +1 -0
- package/src/index.ts +1 -0
- package/src/types/api/events.ts +9 -8
- package/src/types/api/wallet-api.ts +1 -0
- package/src/types/blockchain/balance.ts +1 -1
- package/src/types/blockchain/network.ts +1 -1
- package/src/types/index.ts +2 -2
- package/src/types/siwx/config.ts +73 -0
- package/src/types/siwx/index.ts +4 -0
- package/src/types/siwx/message.ts +92 -0
- package/src/types/siwx/storage.ts +44 -0
- package/src/types/siwx/verifier.ts +32 -0
- package/src/types/storage.ts +34 -0
- package/src/types/wallet/connection.ts +1 -0
- package/src/types/wallet/connector.ts +0 -2
- package/src/types/wallet/wallet-info.ts +1 -0
- package/src/utils/ConstantsUtil.ts +11 -17
- package/lib/commonjs/types/siwe/index.js.map +0 -1
- package/lib/module/types/siwe/index.js +0 -6
- package/lib/module/types/siwe/index.js.map +0 -1
- package/lib/typescript/types/siwe/config.d.ts +0 -31
- package/lib/typescript/types/siwe/config.d.ts.map +0 -1
- package/lib/typescript/types/siwe/index.d.ts +0 -3
- package/lib/typescript/types/siwe/index.d.ts.map +0 -1
- package/lib/typescript/types/siwe/message.d.ts +0 -57
- package/lib/typescript/types/siwe/message.d.ts.map +0 -1
- package/src/types/siwe/config.ts +0 -44
- package/src/types/siwe/index.ts +0 -3
- package/src/types/siwe/message.ts +0 -62
- /package/lib/commonjs/types/{siwe → siwx}/config.js +0 -0
- /package/lib/commonjs/types/{siwe → siwx}/message.js +0 -0
- /package/lib/module/types/{siwe → siwx}/config.js +0 -0
- /package/lib/module/types/{siwe → siwx}/message.js +0 -0
package/src/types/siwe/config.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
SIWESession,
|
|
3
|
-
SIWECreateMessageArgs,
|
|
4
|
-
SIWEMessageArgs,
|
|
5
|
-
SIWEVerifyMessageArgs
|
|
6
|
-
} from './message';
|
|
7
|
-
|
|
8
|
-
export interface SIWEClientMethods {
|
|
9
|
-
getNonce: (address?: string) => Promise<string>;
|
|
10
|
-
createMessage: (args: SIWECreateMessageArgs) => string;
|
|
11
|
-
verifyMessage: (args: SIWEVerifyMessageArgs) => Promise<boolean>;
|
|
12
|
-
getSession: () => Promise<SIWESession | null>;
|
|
13
|
-
signOut: () => Promise<boolean>;
|
|
14
|
-
getMessageParams?: () => Promise<SIWEMessageArgs>;
|
|
15
|
-
onSignIn?: (session?: SIWESession) => void;
|
|
16
|
-
onSignOut?: () => void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface SIWEConfig extends SIWEClientMethods {
|
|
20
|
-
// Defaults to true
|
|
21
|
-
enabled?: boolean;
|
|
22
|
-
// In milliseconds, defaults to 5 minutes
|
|
23
|
-
nonceRefetchIntervalMs?: number;
|
|
24
|
-
// In milliseconds, defaults to 5 minutes
|
|
25
|
-
sessionRefetchIntervalMs?: number;
|
|
26
|
-
// Defaults to true
|
|
27
|
-
signOutOnDisconnect?: boolean;
|
|
28
|
-
// Defaults to true
|
|
29
|
-
signOutOnAccountChange?: boolean;
|
|
30
|
-
// Defaults to true
|
|
31
|
-
signOutOnNetworkChange?: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface AppKitSIWEClient extends SIWEClientMethods {
|
|
35
|
-
signIn: () => Promise<SIWESession | undefined>;
|
|
36
|
-
options: {
|
|
37
|
-
enabled: boolean;
|
|
38
|
-
nonceRefetchIntervalMs: number;
|
|
39
|
-
sessionRefetchIntervalMs: number;
|
|
40
|
-
signOutOnDisconnect: boolean;
|
|
41
|
-
signOutOnAccountChange: boolean;
|
|
42
|
-
signOutOnNetworkChange: boolean;
|
|
43
|
-
};
|
|
44
|
-
}
|
package/src/types/siwe/index.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { CaipAddress, CaipNetworkId } from '../common';
|
|
2
|
-
|
|
3
|
-
export interface SIWESession {
|
|
4
|
-
address: string;
|
|
5
|
-
chainId: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface CacaoHeader {
|
|
9
|
-
t: 'caip122';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface SIWECreateMessageArgs {
|
|
13
|
-
domain: string;
|
|
14
|
-
nonce: string;
|
|
15
|
-
uri: string;
|
|
16
|
-
address: CaipAddress;
|
|
17
|
-
version: '1';
|
|
18
|
-
type?: CacaoHeader['t'];
|
|
19
|
-
nbf?: string;
|
|
20
|
-
exp?: string;
|
|
21
|
-
statement?: string;
|
|
22
|
-
requestId?: string;
|
|
23
|
-
resources?: string[];
|
|
24
|
-
expiry?: number;
|
|
25
|
-
iat?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type SIWEMessageArgs = {
|
|
29
|
-
chains: CaipNetworkId[];
|
|
30
|
-
methods?: string[];
|
|
31
|
-
} & Omit<SIWECreateMessageArgs, 'address' | 'nonce' | 'version'>;
|
|
32
|
-
|
|
33
|
-
interface CacaoPayload {
|
|
34
|
-
domain: string;
|
|
35
|
-
aud: string;
|
|
36
|
-
nonce: string;
|
|
37
|
-
iss: string;
|
|
38
|
-
version?: string;
|
|
39
|
-
iat?: string;
|
|
40
|
-
nbf?: string;
|
|
41
|
-
exp?: string;
|
|
42
|
-
statement?: string;
|
|
43
|
-
requestId?: string;
|
|
44
|
-
resources?: string[];
|
|
45
|
-
type?: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface Cacao {
|
|
49
|
-
h: CacaoHeader;
|
|
50
|
-
p: CacaoPayload;
|
|
51
|
-
s: {
|
|
52
|
-
t: 'eip191' | 'eip1271';
|
|
53
|
-
s: string;
|
|
54
|
-
m?: string;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface SIWEVerifyMessageArgs {
|
|
59
|
-
message: string;
|
|
60
|
-
signature: string;
|
|
61
|
-
cacao?: Cacao;
|
|
62
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|