@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.
Files changed (115) hide show
  1. package/lib/commonjs/adapters/BitcoinBaseAdapter.js +10 -0
  2. package/lib/commonjs/adapters/BitcoinBaseAdapter.js.map +1 -0
  3. package/lib/commonjs/adapters/EvmAdapter.js +2 -2
  4. package/lib/commonjs/adapters/EvmAdapter.js.map +1 -1
  5. package/lib/commonjs/adapters/SolanaBaseAdapter.js.map +1 -1
  6. package/lib/commonjs/index.js +9 -1
  7. package/lib/commonjs/index.js.map +1 -1
  8. package/lib/commonjs/types/index.js +4 -4
  9. package/lib/commonjs/types/index.js.map +1 -1
  10. package/lib/commonjs/types/{siwe → siwx}/config.js.map +1 -1
  11. package/lib/commonjs/types/{siwe → siwx}/index.js +22 -0
  12. package/lib/commonjs/types/siwx/index.js.map +1 -0
  13. package/lib/commonjs/types/{siwe → siwx}/message.js.map +1 -1
  14. package/lib/commonjs/types/siwx/storage.js +6 -0
  15. package/lib/commonjs/types/siwx/storage.js.map +1 -0
  16. package/lib/commonjs/types/siwx/verifier.js +35 -0
  17. package/lib/commonjs/types/siwx/verifier.js.map +1 -0
  18. package/lib/commonjs/types/storage.js +22 -0
  19. package/lib/commonjs/types/storage.js.map +1 -1
  20. package/lib/commonjs/types/wallet/connector.js.map +1 -1
  21. package/lib/commonjs/utils/ConstantsUtil.js +10 -17
  22. package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
  23. package/lib/module/adapters/BitcoinBaseAdapter.js +5 -0
  24. package/lib/module/adapters/BitcoinBaseAdapter.js.map +1 -0
  25. package/lib/module/adapters/EvmAdapter.js +2 -2
  26. package/lib/module/adapters/EvmAdapter.js.map +1 -1
  27. package/lib/module/index.js +1 -0
  28. package/lib/module/index.js.map +1 -1
  29. package/lib/module/types/index.js +2 -2
  30. package/lib/module/types/{siwe → siwx}/config.js.map +1 -1
  31. package/lib/module/types/siwx/index.js +7 -0
  32. package/lib/module/types/siwx/index.js.map +1 -0
  33. package/lib/module/types/{siwe → siwx}/message.js.map +1 -1
  34. package/lib/module/types/siwx/storage.js +4 -0
  35. package/lib/module/types/siwx/storage.js.map +1 -0
  36. package/lib/module/types/siwx/verifier.js +30 -0
  37. package/lib/module/types/siwx/verifier.js.map +1 -0
  38. package/lib/module/types/storage.js +18 -0
  39. package/lib/module/types/storage.js.map +1 -1
  40. package/lib/module/types/wallet/connector.js.map +1 -1
  41. package/lib/module/utils/ConstantsUtil.js +10 -17
  42. package/lib/module/utils/ConstantsUtil.js.map +1 -1
  43. package/lib/typescript/adapters/BitcoinBaseAdapter.d.ts +5 -0
  44. package/lib/typescript/adapters/BitcoinBaseAdapter.d.ts.map +1 -0
  45. package/lib/typescript/adapters/EvmAdapter.d.ts +1 -1
  46. package/lib/typescript/adapters/EvmAdapter.d.ts.map +1 -1
  47. package/lib/typescript/adapters/SolanaBaseAdapter.d.ts +1 -0
  48. package/lib/typescript/adapters/SolanaBaseAdapter.d.ts.map +1 -1
  49. package/lib/typescript/index.d.ts +1 -0
  50. package/lib/typescript/index.d.ts.map +1 -1
  51. package/lib/typescript/types/api/events.d.ts +7 -5
  52. package/lib/typescript/types/api/events.d.ts.map +1 -1
  53. package/lib/typescript/types/api/wallet-api.d.ts +1 -0
  54. package/lib/typescript/types/api/wallet-api.d.ts.map +1 -1
  55. package/lib/typescript/types/blockchain/balance.d.ts +1 -1
  56. package/lib/typescript/types/blockchain/balance.d.ts.map +1 -1
  57. package/lib/typescript/types/blockchain/network.d.ts +1 -1
  58. package/lib/typescript/types/blockchain/network.d.ts.map +1 -1
  59. package/lib/typescript/types/index.d.ts +1 -1
  60. package/lib/typescript/types/siwx/config.d.ts +73 -0
  61. package/lib/typescript/types/siwx/config.d.ts.map +1 -0
  62. package/lib/typescript/types/siwx/index.d.ts +5 -0
  63. package/lib/typescript/types/siwx/index.d.ts.map +1 -0
  64. package/lib/typescript/types/siwx/message.d.ts +92 -0
  65. package/lib/typescript/types/siwx/message.d.ts.map +1 -0
  66. package/lib/typescript/types/siwx/storage.d.ts +41 -0
  67. package/lib/typescript/types/siwx/storage.d.ts.map +1 -0
  68. package/lib/typescript/types/siwx/verifier.d.ts +28 -0
  69. package/lib/typescript/types/siwx/verifier.d.ts.map +1 -0
  70. package/lib/typescript/types/storage.d.ts +32 -0
  71. package/lib/typescript/types/storage.d.ts.map +1 -1
  72. package/lib/typescript/types/wallet/connection.d.ts +1 -0
  73. package/lib/typescript/types/wallet/connection.d.ts.map +1 -1
  74. package/lib/typescript/types/wallet/connector.d.ts +0 -2
  75. package/lib/typescript/types/wallet/connector.d.ts.map +1 -1
  76. package/lib/typescript/types/wallet/wallet-info.d.ts +1 -0
  77. package/lib/typescript/types/wallet/wallet-info.d.ts.map +1 -1
  78. package/lib/typescript/utils/ConstantsUtil.d.ts +9 -14
  79. package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
  80. package/package.json +4 -3
  81. package/src/adapters/BitcoinBaseAdapter.ts +5 -0
  82. package/src/adapters/EvmAdapter.ts +2 -2
  83. package/src/adapters/SolanaBaseAdapter.ts +1 -0
  84. package/src/index.ts +1 -0
  85. package/src/types/api/events.ts +9 -8
  86. package/src/types/api/wallet-api.ts +1 -0
  87. package/src/types/blockchain/balance.ts +1 -1
  88. package/src/types/blockchain/network.ts +1 -1
  89. package/src/types/index.ts +2 -2
  90. package/src/types/siwx/config.ts +73 -0
  91. package/src/types/siwx/index.ts +4 -0
  92. package/src/types/siwx/message.ts +92 -0
  93. package/src/types/siwx/storage.ts +44 -0
  94. package/src/types/siwx/verifier.ts +32 -0
  95. package/src/types/storage.ts +34 -0
  96. package/src/types/wallet/connection.ts +1 -0
  97. package/src/types/wallet/connector.ts +0 -2
  98. package/src/types/wallet/wallet-info.ts +1 -0
  99. package/src/utils/ConstantsUtil.ts +11 -17
  100. package/lib/commonjs/types/siwe/index.js.map +0 -1
  101. package/lib/module/types/siwe/index.js +0 -6
  102. package/lib/module/types/siwe/index.js.map +0 -1
  103. package/lib/typescript/types/siwe/config.d.ts +0 -31
  104. package/lib/typescript/types/siwe/config.d.ts.map +0 -1
  105. package/lib/typescript/types/siwe/index.d.ts +0 -3
  106. package/lib/typescript/types/siwe/index.d.ts.map +0 -1
  107. package/lib/typescript/types/siwe/message.d.ts +0 -57
  108. package/lib/typescript/types/siwe/message.d.ts.map +0 -1
  109. package/src/types/siwe/config.ts +0 -44
  110. package/src/types/siwe/index.ts +0 -3
  111. package/src/types/siwe/message.ts +0 -62
  112. /package/lib/commonjs/types/{siwe → siwx}/config.js +0 -0
  113. /package/lib/commonjs/types/{siwe → siwx}/message.js +0 -0
  114. /package/lib/module/types/{siwe → siwx}/config.js +0 -0
  115. /package/lib/module/types/{siwe → siwx}/message.js +0 -0
@@ -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
- }
@@ -1,3 +0,0 @@
1
- // SIWE types barrel export
2
- export * from './config';
3
- export * from './message';
@@ -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