@reown/appkit-react-native 0.0.0-feat-multichain-20250925192219 → 0.0.0-feat-multichain-20251001210321

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 (158) hide show
  1. package/lib/commonjs/AppKit.js +105 -14
  2. package/lib/commonjs/AppKit.js.map +1 -1
  3. package/lib/commonjs/hooks/useAppKit.js.map +1 -1
  4. package/lib/commonjs/hooks/useAppKitLogs.js +88 -0
  5. package/lib/commonjs/hooks/useAppKitLogs.js.map +1 -0
  6. package/lib/commonjs/index.js +7 -0
  7. package/lib/commonjs/index.js.map +1 -1
  8. package/lib/commonjs/partials/w3m-account-wallet-features/index.js +1 -1
  9. package/lib/commonjs/partials/w3m-account-wallet-features/index.js.map +1 -1
  10. package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletItem.js +2 -1
  11. package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletItem.js.map +1 -1
  12. package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletList.js +3 -1
  13. package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletList.js.map +1 -1
  14. package/lib/commonjs/partials/w3m-all-wallets-list/index.js +1 -0
  15. package/lib/commonjs/partials/w3m-all-wallets-list/index.js.map +1 -1
  16. package/lib/commonjs/partials/w3m-all-wallets-search/index.js +1 -0
  17. package/lib/commonjs/partials/w3m-all-wallets-search/index.js.map +1 -1
  18. package/lib/commonjs/partials/w3m-connecting-mobile/index.js +21 -1
  19. package/lib/commonjs/partials/w3m-connecting-mobile/index.js.map +1 -1
  20. package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +5 -1
  21. package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
  22. package/lib/commonjs/partials/w3m-connecting-web/index.js +8 -2
  23. package/lib/commonjs/partials/w3m-connecting-web/index.js.map +1 -1
  24. package/lib/commonjs/utils/SIWXUtil.js +4 -8
  25. package/lib/commonjs/utils/SIWXUtil.js.map +1 -1
  26. package/lib/commonjs/views/w3m-account-default-view/index.js +3 -2
  27. package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
  28. package/lib/commonjs/views/w3m-all-wallets-view/index.js +5 -2
  29. package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
  30. package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js +5 -3
  31. package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
  32. package/lib/commonjs/views/w3m-connect-view/index.js +5 -2
  33. package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
  34. package/lib/commonjs/views/w3m-connecting-external-view/index.js +21 -1
  35. package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
  36. package/lib/commonjs/views/w3m-connecting-social-view/index.js +1 -0
  37. package/lib/commonjs/views/w3m-connecting-social-view/index.js.map +1 -1
  38. package/lib/commonjs/views/w3m-connecting-view/index.js +1 -0
  39. package/lib/commonjs/views/w3m-connecting-view/index.js.map +1 -1
  40. package/lib/commonjs/views/w3m-network-switch-view/index.js +1 -0
  41. package/lib/commonjs/views/w3m-network-switch-view/index.js.map +1 -1
  42. package/lib/commonjs/views/w3m-siwx-sign-view/index.js +1 -0
  43. package/lib/commonjs/views/w3m-siwx-sign-view/index.js.map +1 -1
  44. package/lib/commonjs/views/w3m-swap-view/index.js +1 -1
  45. package/lib/commonjs/views/w3m-swap-view/index.js.map +1 -1
  46. package/lib/commonjs/views/w3m-what-is-a-wallet-view/index.js +1 -1
  47. package/lib/commonjs/views/w3m-what-is-a-wallet-view/index.js.map +1 -1
  48. package/lib/module/AppKit.js +106 -15
  49. package/lib/module/AppKit.js.map +1 -1
  50. package/lib/module/hooks/useAppKit.js.map +1 -1
  51. package/lib/module/hooks/useAppKitLogs.js +83 -0
  52. package/lib/module/hooks/useAppKitLogs.js.map +1 -0
  53. package/lib/module/index.js +1 -0
  54. package/lib/module/index.js.map +1 -1
  55. package/lib/module/partials/w3m-account-wallet-features/index.js +1 -1
  56. package/lib/module/partials/w3m-account-wallet-features/index.js.map +1 -1
  57. package/lib/module/partials/w3m-all-wallets-list/components/WalletItem.js +2 -1
  58. package/lib/module/partials/w3m-all-wallets-list/components/WalletItem.js.map +1 -1
  59. package/lib/module/partials/w3m-all-wallets-list/components/WalletList.js +3 -1
  60. package/lib/module/partials/w3m-all-wallets-list/components/WalletList.js.map +1 -1
  61. package/lib/module/partials/w3m-all-wallets-list/index.js +2 -1
  62. package/lib/module/partials/w3m-all-wallets-list/index.js.map +1 -1
  63. package/lib/module/partials/w3m-all-wallets-search/index.js +2 -1
  64. package/lib/module/partials/w3m-all-wallets-search/index.js.map +1 -1
  65. package/lib/module/partials/w3m-connecting-mobile/index.js +22 -2
  66. package/lib/module/partials/w3m-connecting-mobile/index.js.map +1 -1
  67. package/lib/module/partials/w3m-connecting-qrcode/index.js +6 -2
  68. package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
  69. package/lib/module/partials/w3m-connecting-web/index.js +9 -3
  70. package/lib/module/partials/w3m-connecting-web/index.js.map +1 -1
  71. package/lib/module/utils/SIWXUtil.js +5 -9
  72. package/lib/module/utils/SIWXUtil.js.map +1 -1
  73. package/lib/module/views/w3m-account-default-view/index.js +4 -3
  74. package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
  75. package/lib/module/views/w3m-all-wallets-view/index.js +5 -2
  76. package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
  77. package/lib/module/views/w3m-connect-view/components/all-wallet-list.js +5 -3
  78. package/lib/module/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
  79. package/lib/module/views/w3m-connect-view/index.js +5 -2
  80. package/lib/module/views/w3m-connect-view/index.js.map +1 -1
  81. package/lib/module/views/w3m-connecting-external-view/index.js +22 -2
  82. package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
  83. package/lib/module/views/w3m-connecting-social-view/index.js +2 -1
  84. package/lib/module/views/w3m-connecting-social-view/index.js.map +1 -1
  85. package/lib/module/views/w3m-connecting-view/index.js +2 -1
  86. package/lib/module/views/w3m-connecting-view/index.js.map +1 -1
  87. package/lib/module/views/w3m-network-switch-view/index.js +2 -1
  88. package/lib/module/views/w3m-network-switch-view/index.js.map +1 -1
  89. package/lib/module/views/w3m-siwx-sign-view/index.js +2 -1
  90. package/lib/module/views/w3m-siwx-sign-view/index.js.map +1 -1
  91. package/lib/module/views/w3m-swap-view/index.js +1 -1
  92. package/lib/module/views/w3m-swap-view/index.js.map +1 -1
  93. package/lib/module/views/w3m-what-is-a-wallet-view/index.js +1 -1
  94. package/lib/module/views/w3m-what-is-a-wallet-view/index.js.map +1 -1
  95. package/lib/typescript/AppKit.d.ts +12 -1
  96. package/lib/typescript/AppKit.d.ts.map +1 -1
  97. package/lib/typescript/AppKitContext.d.ts +1 -1
  98. package/lib/typescript/hooks/useAccount.d.ts +1 -1
  99. package/lib/typescript/hooks/useAppKit.d.ts +2 -1
  100. package/lib/typescript/hooks/useAppKit.d.ts.map +1 -1
  101. package/lib/typescript/hooks/useAppKitEvents.d.ts +69 -17
  102. package/lib/typescript/hooks/useAppKitEvents.d.ts.map +1 -1
  103. package/lib/typescript/hooks/useAppKitLogs.d.ts +57 -0
  104. package/lib/typescript/hooks/useAppKitLogs.d.ts.map +1 -0
  105. package/lib/typescript/hooks/useAppKitState.d.ts +1 -1
  106. package/lib/typescript/index.d.ts +2 -0
  107. package/lib/typescript/index.d.ts.map +1 -1
  108. package/lib/typescript/partials/w3m-all-wallets-list/components/WalletItem.d.ts +3 -2
  109. package/lib/typescript/partials/w3m-all-wallets-list/components/WalletItem.d.ts.map +1 -1
  110. package/lib/typescript/partials/w3m-all-wallets-list/components/WalletList.d.ts +1 -1
  111. package/lib/typescript/partials/w3m-all-wallets-list/components/WalletList.d.ts.map +1 -1
  112. package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts +1 -1
  113. package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts.map +1 -1
  114. package/lib/typescript/partials/w3m-all-wallets-search/index.d.ts +1 -1
  115. package/lib/typescript/partials/w3m-all-wallets-search/index.d.ts.map +1 -1
  116. package/lib/typescript/partials/w3m-connecting-mobile/index.d.ts.map +1 -1
  117. package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
  118. package/lib/typescript/partials/w3m-connecting-web/index.d.ts.map +1 -1
  119. package/lib/typescript/types.d.ts +1 -0
  120. package/lib/typescript/types.d.ts.map +1 -1
  121. package/lib/typescript/utils/SIWXUtil.d.ts +1 -1
  122. package/lib/typescript/utils/SIWXUtil.d.ts.map +1 -1
  123. package/lib/typescript/views/w3m-account-default-view/index.d.ts.map +1 -1
  124. package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
  125. package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts +1 -1
  126. package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts.map +1 -1
  127. package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
  128. package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
  129. package/lib/typescript/views/w3m-connecting-social-view/index.d.ts.map +1 -1
  130. package/lib/typescript/views/w3m-connecting-view/index.d.ts.map +1 -1
  131. package/lib/typescript/views/w3m-network-switch-view/index.d.ts.map +1 -1
  132. package/lib/typescript/views/w3m-siwx-sign-view/index.d.ts.map +1 -1
  133. package/package.json +6 -6
  134. package/src/AppKit.ts +122 -14
  135. package/src/hooks/useAppKit.ts +3 -2
  136. package/src/hooks/useAppKitLogs.ts +129 -0
  137. package/src/index.ts +8 -0
  138. package/src/partials/w3m-account-wallet-features/index.tsx +1 -1
  139. package/src/partials/w3m-all-wallets-list/components/WalletItem.tsx +11 -3
  140. package/src/partials/w3m-all-wallets-list/components/WalletList.tsx +3 -2
  141. package/src/partials/w3m-all-wallets-list/index.tsx +3 -1
  142. package/src/partials/w3m-all-wallets-search/index.tsx +8 -2
  143. package/src/partials/w3m-connecting-mobile/index.tsx +24 -2
  144. package/src/partials/w3m-connecting-qrcode/index.tsx +8 -2
  145. package/src/partials/w3m-connecting-web/index.tsx +11 -3
  146. package/src/types.ts +1 -0
  147. package/src/utils/SIWXUtil.ts +6 -11
  148. package/src/views/w3m-account-default-view/index.tsx +5 -3
  149. package/src/views/w3m-all-wallets-view/index.tsx +9 -2
  150. package/src/views/w3m-connect-view/components/all-wallet-list.tsx +6 -4
  151. package/src/views/w3m-connect-view/index.tsx +5 -2
  152. package/src/views/w3m-connecting-external-view/index.tsx +24 -2
  153. package/src/views/w3m-connecting-social-view/index.tsx +3 -1
  154. package/src/views/w3m-connecting-view/index.tsx +3 -1
  155. package/src/views/w3m-network-switch-view/index.tsx +2 -0
  156. package/src/views/w3m-siwx-sign-view/index.tsx +2 -0
  157. package/src/views/w3m-swap-view/index.tsx +1 -1
  158. package/src/views/w3m-what-is-a-wallet-view/index.tsx +1 -1
@@ -2,7 +2,7 @@ import { type StyleProp, type ViewStyle } from 'react-native';
2
2
  import type { WcWallet } from '@reown/appkit-common-react-native';
3
3
  interface Props {
4
4
  data: WcWallet[];
5
- onItemPress: (wallet: WcWallet) => void;
5
+ onItemPress: (wallet: WcWallet, displayIndex: number) => void;
6
6
  onEndReached?: () => void;
7
7
  onEndReachedThreshold?: number;
8
8
  isLoading?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"WalletList.d.ts","sourceRoot":"","sources":["../../../../../src/partials/w3m-all-wallets-list/components/WalletList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAUpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAQlE,UAAU,KAAK;IACb,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,SAAiB,EACjB,YAAiB,EACjB,SAAS,EACT,KAAK,EACN,EAAE,KAAK,2CA6CP"}
1
+ {"version":3,"file":"WalletList.d.ts","sourceRoot":"","sources":["../../../../../src/partials/w3m-all-wallets-list/components/WalletList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAUpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAQlE,UAAU,KAAK;IACb,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,SAAiB,EACjB,YAAiB,EACjB,SAAS,EACT,KAAK,EACN,EAAE,KAAK,2CA8CP"}
@@ -1,6 +1,6 @@
1
1
  import { type WcWallet } from '@reown/appkit-common-react-native';
2
2
  interface AllWalletsListProps {
3
- onItemPress: (wallet: WcWallet) => void;
3
+ onItemPress: (wallet: WcWallet, displayIndex: number) => void;
4
4
  headerHeight?: number;
5
5
  }
6
6
  export declare function AllWalletsList({ onItemPress }: AllWalletsListProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-all-wallets-list/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAOlE,UAAU,mBAAmB;IAC3B,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,EAAE,mBAAmB,2CAoGlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-all-wallets-list/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAOlE,UAAU,mBAAmB;IAC3B,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,EAAE,mBAAmB,2CAqGlE"}
@@ -1,6 +1,6 @@
1
1
  import { type WcWallet } from '@reown/appkit-common-react-native';
2
2
  export interface AllWalletsSearchProps {
3
- onItemPress: (wallet: WcWallet) => void;
3
+ onItemPress: (wallet: WcWallet, displayIndex: number) => void;
4
4
  searchQuery?: string;
5
5
  }
6
6
  export declare function AllWalletsSearch({ searchQuery, onItemPress }: AllWalletsSearchProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-all-wallets-search/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAQlE,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,qBAAqB,2CAiEnF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-all-wallets-search/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAQlE,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,qBAAqB,2CAkEnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-mobile/index.tsx"],"names":[],"mappings":"AA4BA,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,KAAK,2CA4H1E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-mobile/index.tsx"],"names":[],"mappings":"AA8BA,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,KAAK,2CAgJ1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-qrcode/index.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,gBAAgB,4CA2D/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-qrcode/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,gBAAgB,4CA+D/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-web/index.tsx"],"names":[],"mappings":"AAyBA,UAAU,kBAAkB;IAC1B,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CAiF9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-web/index.tsx"],"names":[],"mappings":"AA2BA,UAAU,kBAAkB;IAC1B,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CAuF9D"}
@@ -103,6 +103,7 @@ export interface AppKitConfig {
103
103
  /**
104
104
  * Optional flag to enable debug mode.
105
105
  * When enabled, additional logging and debugging information will be output.
106
+ * Only enabled in development mode.
106
107
  *
107
108
  * @see {@link https://docs.reown.com/appkit/react-native/core/options#debug | Debug Documentation}
108
109
  * @default false
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,+BAA+B,EACpC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,UAAU,EAChB,MAAM,mCAAmC,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;;;;OAMG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAE9B;;;;;OAKG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEpB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IAEpC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;IAE5D;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IAEhE;;;;;OAKG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC,eAAe,CAAC,CAAC;IAExD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;IAE5D;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,+BAA+B,CAAC,EAAE,+BAA+B,CAAC;CACnE"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,+BAA+B,EACpC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,UAAU,EAChB,MAAM,mCAAmC,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;;;;OAMG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAE9B;;;;;OAKG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEpB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IAEpC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;IAE5D;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IAEhE;;;;;OAKG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC,eAAe,CAAC,CAAC;IAExD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;IAE5D;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,+BAA+B,CAAC,EAAE,+BAA+B,CAAC;CACnE"}
@@ -25,7 +25,7 @@ export declare const SIWXUtil: {
25
25
  universalLink?: string | undefined;
26
26
  }): Promise<import("@walletconnect/types").SessionTypes.Struct | undefined>;
27
27
  getSIWXEventProperties(error?: unknown): {
28
- network: string;
28
+ network: `${string}:${string}` | undefined;
29
29
  isSmartAccount: boolean;
30
30
  message: string | undefined;
31
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SIWXUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/SIWXUtil.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAElE,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,WAAW,EACjB,MAAM,mCAAmC,CAAC;AAa3C;;GAEG;AAEH,eAAO,MAAM,QAAQ;;;sBAUH,MAAM,QAAQ,IAAI,CAAC;;;;;oCAyIG,MAAM,QAAQ,IAAI,CAAC;;uBAsChC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,aAAa,CAAA;KAAE;;;2BAwCvD,iBAAiB;gBAC5B,aAAa,EAAE;iBACd,MAAM,EAAE;;;mCAmGY,OAAO;;;;;;CAcvC,CAAC"}
1
+ {"version":3,"file":"SIWXUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/SIWXUtil.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAElE,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,WAAW,EACjB,MAAM,mCAAmC,CAAC;AAa3C;;GAEG;AAEH,eAAO,MAAM,QAAQ;;;sBAUH,MAAM,QAAQ,IAAI,CAAC;;;;;oCAqIG,MAAM,QAAQ,IAAI,CAAC;;uBAsChC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,aAAa,CAAA;KAAE;;;2BAwCvD,iBAAiB;gBAC5B,aAAa,EAAE;iBACd,MAAM,EAAE;;;mCAkGY,OAAO;;;;;;CAcvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-account-default-view/index.tsx"],"names":[],"mappings":"AAoCA,wBAAgB,kBAAkB,4CA4TjC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-account-default-view/index.tsx"],"names":[],"mappings":"AAqCA,wBAAgB,kBAAkB,4CA6TjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-all-wallets-view/index.tsx"],"names":[],"mappings":"AAiBA,wBAAgB,cAAc,4CAkF7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-all-wallets-view/index.tsx"],"names":[],"mappings":"AAiBA,wBAAgB,cAAc,4CAyF7B"}
@@ -2,7 +2,7 @@ import { type StyleProp, type ViewStyle } from 'react-native';
2
2
  import { type WcWallet } from '@reown/appkit-common-react-native';
3
3
  interface Props {
4
4
  itemStyle: StyleProp<ViewStyle>;
5
- onWalletPress: (wallet: WcWallet) => void;
5
+ onWalletPress: (wallet: WcWallet, displayIndex: number, isInstalled?: boolean) => void;
6
6
  }
7
7
  export declare function AllWalletList({ itemStyle, onWalletPress }: Props): import("react/jsx-runtime").JSX.Element | import("react/jsx-runtime").JSX.Element[] | null;
8
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"all-wallet-list.d.ts","sourceRoot":"","sources":["../../../../../src/views/w3m-connect-view/components/all-wallet-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAU9D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAIlE,UAAU,KAAK;IACb,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,aAAa,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC3C;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,KAAK,8FAgDhE"}
1
+ {"version":3,"file":"all-wallet-list.d.ts","sourceRoot":"","sources":["../../../../../src/views/w3m-connect-view/components/all-wallet-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAU9D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAIlE,UAAU,KAAK;IACb,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,aAAa,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACxF;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,KAAK,8FAkDhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connect-view/index.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,WAAW,4CA6E1B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connect-view/index.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,WAAW,4CAgF1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-external-view/index.tsx"],"names":[],"mappings":"AA2BA,wBAAgB,sBAAsB,4CA6GrC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-external-view/index.tsx"],"names":[],"mappings":"AA6BA,wBAAgB,sBAAsB,4CAiIrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-social-view/index.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,oBAAoB,4CA+EnC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-social-view/index.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,oBAAoB,4CAgFnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-view/index.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,cAAc,4CAsG7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-view/index.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,cAAc,4CAuG7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-network-switch-view/index.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,iBAAiB,4CAkFhC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-network-switch-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,iBAAiB,4CAmFhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-siwx-sign-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,mBAAmB,4CAyElC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-siwx-sign-view/index.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,mBAAmB,4CA0ElC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-react-native",
3
- "version": "0.0.0-feat-multichain-20250925192219",
3
+ "version": "0.0.0-feat-multichain-20251001210321",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "types": "lib/typescript/index.d.ts",
6
6
  "module": "lib/module/index.js",
@@ -39,11 +39,11 @@
39
39
  "provenance": true
40
40
  },
41
41
  "dependencies": {
42
- "@reown/appkit-common-react-native": "0.0.0-feat-multichain-20250925192219",
43
- "@reown/appkit-core-react-native": "0.0.0-feat-multichain-20250925192219",
44
- "@reown/appkit-ui-react-native": "0.0.0-feat-multichain-20250925192219",
45
- "@walletconnect/universal-provider": "2.21.8",
46
- "valtio": "2.1.5"
42
+ "@reown/appkit-common-react-native": "0.0.0-feat-multichain-20251001210321",
43
+ "@reown/appkit-core-react-native": "0.0.0-feat-multichain-20251001210321",
44
+ "@reown/appkit-ui-react-native": "0.0.0-feat-multichain-20251001210321",
45
+ "@walletconnect/universal-provider": "2.21.10",
46
+ "valtio": "2.1.8"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@walletconnect/react-native-compat": ">=2.16.1",
package/src/AppKit.ts CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  SendController,
16
16
  BlockchainApiController,
17
17
  WalletUtil,
18
+ LogController,
18
19
  type RouterControllerState
19
20
  } from '@reown/appkit-core-react-native';
20
21
 
@@ -45,6 +46,13 @@ import { RouterUtil } from './utils/RouterUtil';
45
46
  import { type AppKitConfig } from './types';
46
47
  import { SIWXUtil } from './utils/SIWXUtil';
47
48
 
49
+ const APPKIT_INSTANCE_KEY = Symbol.for('__REOWN_APPKIT_INSTANCE__');
50
+
51
+ // Type helper to access the symbol-keyed property on globalThis
52
+ interface GlobalWithAppKit {
53
+ [key: symbol]: AppKit | undefined;
54
+ }
55
+
48
56
  export class AppKit {
49
57
  private projectId: string;
50
58
  private adapters: BlockchainAdapter[];
@@ -144,7 +152,7 @@ export class AppKit {
144
152
  });
145
153
  }
146
154
  } catch (error) {
147
- console.warn('Connection failed:', error);
155
+ LogController.sendError(error, 'AppKit.ts', 'connect');
148
156
  throw error;
149
157
  }
150
158
  }
@@ -179,7 +187,7 @@ export class AppKit {
179
187
  * @param namespace - The namespace to disconnect from.
180
188
  * @param isInternal - Whether the disconnect is internal (i.e. from the AppKit) or external (i.e. from wallet side).
181
189
  */
182
- async disconnect(namespace?: string, isInternal?: boolean): Promise<void> {
190
+ async disconnect(namespace?: ChainNamespace, isInternal?: boolean): Promise<void> {
183
191
  try {
184
192
  const activeNamespace = namespace ?? ConnectionsController.state.activeNamespace;
185
193
 
@@ -219,9 +227,13 @@ export class AppKit {
219
227
 
220
228
  EventsController.sendEvent({
221
229
  type: 'track',
222
- event: 'DISCONNECT_SUCCESS'
230
+ event: 'DISCONNECT_SUCCESS',
231
+ properties: {
232
+ namespace: activeNamespace
233
+ }
223
234
  });
224
235
  } catch (error) {
236
+ LogController.sendError(error, 'AppKit.ts', 'disconnect');
225
237
  EventsController.sendEvent({
226
238
  type: 'track',
227
239
  event: 'DISCONNECT_ERROR'
@@ -268,7 +280,7 @@ export class AppKit {
268
280
  type: 'track',
269
281
  event: 'SWITCH_NETWORK',
270
282
  properties: {
271
- network: network.id
283
+ network: network.caipNetworkId
272
284
  }
273
285
  });
274
286
 
@@ -383,6 +395,10 @@ export class AppKit {
383
395
  */
384
396
  private async initConnectors() {
385
397
  ModalController.setLoading(true);
398
+
399
+ //Always init the walletconnect connector
400
+ await this.createWalletConnectConnector();
401
+
386
402
  const connectedConnectors = await StorageUtil.getConnectedConnectors();
387
403
  if (connectedConnectors.length > 0) {
388
404
  for (const connected of connectedConnectors) {
@@ -393,15 +409,28 @@ export class AppKit {
393
409
 
394
410
  await this.processConnection(connector, namespaces);
395
411
  } catch (error) {
396
- // Use console.warn for non-critical initialization failures
397
- console.warn(`Failed to initialize connector type ${connected.type}:`, error);
412
+ LogController.sendError(error, 'AppKit.ts', 'initializeConnector', {
413
+ connectorType: connected.type
414
+ });
398
415
  await StorageUtil.removeConnectedConnectors(connected.type);
399
416
  }
400
417
  }
418
+
419
+ const address = ConnectionsController.state.activeAddress;
420
+ const walletInfo = ConnectionsController.state.walletInfo;
421
+ if (address) {
422
+ EventsController.sendEvent({
423
+ type: 'track',
424
+ event: 'CONNECT_SUCCESS',
425
+ address: CoreHelperUtil.getPlainAddress(address),
426
+ properties: {
427
+ name: walletInfo?.name ?? 'Unknown',
428
+ reconnect: true
429
+ }
430
+ });
431
+ }
401
432
  }
402
433
 
403
- //Always init the walletconnect connector
404
- await this.createWalletConnectConnector();
405
434
  ModalController.setLoading(false);
406
435
  }
407
436
 
@@ -494,6 +523,7 @@ export class AppKit {
494
523
  );
495
524
  }
496
525
  } catch (error) {
526
+ LogController.sendError(error, 'AppKit.ts', 'syncIdentity');
497
527
  // Continue processing other addresses even if one fails
498
528
  }
499
529
  }
@@ -512,8 +542,9 @@ export class AppKit {
512
542
  this.syncNativeBalance(adapter, network);
513
543
  }
514
544
  }
515
- } catch {
545
+ } catch (error) {
516
546
  // ignore
547
+ LogController.sendError(error, 'AppKit.ts', 'refreshBalance');
517
548
  }
518
549
  }
519
550
 
@@ -602,6 +633,13 @@ export class AppKit {
602
633
 
603
634
  const namespace = adapter.getSupportedNamespace();
604
635
  const chain = `${namespace}:${chainId}` as CaipNetworkId;
636
+
637
+ const activeNetwork = ConnectionsController.getActiveNetworkId(namespace);
638
+ if (activeNetwork === chain) {
639
+ // No need to update the active network
640
+ return;
641
+ }
642
+
605
643
  ConnectionsController.setActiveNetwork(namespace, chain);
606
644
 
607
645
  const connection = ConnectionsController.state.connections.get(namespace);
@@ -623,7 +661,13 @@ export class AppKit {
623
661
  TransactionsController.fetchTransactions(address, true);
624
662
  }
625
663
 
626
- SIWXUtil.initializeIfEnabled({ onDisconnect: this.disconnect, caipAddress: address });
664
+ const closeModal = RouterController.state.view === 'UnsupportedChain';
665
+
666
+ SIWXUtil.initializeIfEnabled({
667
+ onDisconnect: this.disconnect,
668
+ caipAddress: address,
669
+ closeModal
670
+ });
627
671
  });
628
672
 
629
673
  adapter.on('disconnect', () => {
@@ -639,6 +683,7 @@ export class AppKit {
639
683
 
640
684
  private async initControllers(options: AppKitConfig) {
641
685
  await this.initStorageAndValues(options);
686
+ let defaultNetwork;
642
687
 
643
688
  OptionsController.setProjectId(options.projectId);
644
689
  OptionsController.setMetadata(options.metadata);
@@ -647,13 +692,23 @@ export class AppKit {
647
692
  this.setCustomWallets(options);
648
693
  OptionsController.setFeaturedWalletIds(options.featuredWalletIds);
649
694
  OptionsController.setEnableAnalytics(options.enableAnalytics);
650
- OptionsController.setDebug(options.debug);
695
+ OptionsController.setDebug(options.debug && __DEV__);
696
+
697
+ // Initialize LogController after debug option is set
698
+ LogController.initialize();
699
+ LogController.sendInfo('AppKit initialization started', 'AppKit.ts', 'initControllers', {
700
+ projectId: options.projectId,
701
+ adapters: this.adapters.map(a => a.constructor.name),
702
+ networks: this.networks.map(n => n.name),
703
+ debug: options.debug
704
+ });
705
+
651
706
  OptionsController.setFeatures(options.features);
652
707
  OptionsController.setRequestedNetworks(this.networks);
653
708
 
654
709
  if (options.defaultNetwork) {
655
- const network = NetworkUtil.formatNetwork(options.defaultNetwork, this.projectId);
656
- OptionsController.setDefaultNetwork(network);
710
+ defaultNetwork = NetworkUtil.formatNetwork(options.defaultNetwork, this.projectId);
711
+ OptionsController.setDefaultNetwork(defaultNetwork);
657
712
  }
658
713
 
659
714
  ThemeController.setDefaultThemeMode(options.themeMode);
@@ -679,6 +734,24 @@ export class AppKit {
679
734
  ) {
680
735
  OptionsController.setIsOnRampEnabled(true);
681
736
  }
737
+
738
+ EventsController.sendEvent({
739
+ type: 'track',
740
+ event: 'INITIALIZE',
741
+ properties: {
742
+ showWallets: options.features?.showWallets,
743
+ themeMode: options.themeMode,
744
+ themeVariables: options.themeVariables,
745
+ networks: this.networks.map(network => network.caipNetworkId).filter(Boolean),
746
+ defaultNetwork: defaultNetwork?.caipNetworkId,
747
+ metadata: options.metadata,
748
+ enableAnalytics: options.enableAnalytics,
749
+ features: options.features,
750
+ adapters: this.adapters.map(adapter => adapter?.constructor?.name).filter(Boolean),
751
+ extraConnectors: this.extraConnectors.map(connector => connector?.type).filter(Boolean),
752
+ siwx: !!options.siwx
753
+ }
754
+ });
682
755
  }
683
756
 
684
757
  private async initActiveNamespace() {
@@ -778,6 +851,41 @@ export class AppKit {
778
851
  };
779
852
  }
780
853
 
854
+ /**
855
+ * Creates or returns the existing AppKit singleton instance.
856
+ *
857
+ * @warning This function implements a singleton pattern. If an instance already exists,
858
+ * it will be returned and the provided config parameter will be IGNORED. If you need to
859
+ * change configuration, you must reload your application or clear the singleton manually.
860
+ *
861
+ * @param config - AppKit configuration options
862
+ * @returns The AppKit singleton instance
863
+ * @throws Error if configuration validation fails
864
+ */
781
865
  export function createAppKit(config: AppKitConfig): AppKit {
782
- return new AppKit(config);
866
+ try {
867
+ const globalWithAppKit = globalThis as GlobalWithAppKit;
868
+
869
+ if (!globalWithAppKit[APPKIT_INSTANCE_KEY]) {
870
+ if (config.debug && __DEV__) {
871
+ // using console.log to avoid possible issues with LogController not being initialized
872
+ //eslint-disable-next-line no-console
873
+ console.log('AppKit: Creating new instance - AppKit.ts:createAppKit');
874
+ }
875
+ globalWithAppKit[APPKIT_INSTANCE_KEY] = new AppKit(config);
876
+ } else if (config.debug && __DEV__) {
877
+ //eslint-disable-next-line no-console
878
+ console.log('AppKit: Reusing existing instance - AppKit.ts:createAppKit');
879
+ }
880
+
881
+ return globalWithAppKit[APPKIT_INSTANCE_KEY]!;
882
+ } catch (error) {
883
+ if (__DEV__) {
884
+ // using console.error to avoid possible issues with LogController not being initialized
885
+ //eslint-disable-next-line no-console
886
+ console.error('AppKit: Failed to create instance - AppKit.ts:createAppKit', error);
887
+ }
888
+
889
+ throw error;
890
+ }
783
891
  }
@@ -1,4 +1,5 @@
1
1
  import { useContext, useMemo } from 'react';
2
+ import type { ChainNamespace } from '@reown/appkit-common-react-native';
2
3
 
3
4
  import type { AppKit } from '../AppKit';
4
5
  import { AppKitContext } from '../AppKitContext';
@@ -6,7 +7,7 @@ import { AppKitContext } from '../AppKitContext';
6
7
  interface UseAppKitReturn {
7
8
  open: AppKit['open'];
8
9
  close: AppKit['close'];
9
- disconnect: (namespace?: string) => void;
10
+ disconnect: (namespace?: ChainNamespace) => void;
10
11
  switchNetwork: AppKit['switchNetwork'];
11
12
  }
12
13
 
@@ -30,7 +31,7 @@ export const useAppKit = (): UseAppKitReturn => {
30
31
  return {
31
32
  open: context.appKit.open.bind(context.appKit),
32
33
  close: context.appKit.close.bind(context.appKit),
33
- disconnect: (namespace?: string) =>
34
+ disconnect: (namespace?: ChainNamespace) =>
34
35
  context.appKit!.disconnect.bind(context.appKit!)(namespace),
35
36
  switchNetwork: context.appKit.switchNetwork.bind(context.appKit)
36
37
  };
@@ -0,0 +1,129 @@
1
+ import { useContext, useMemo } from 'react';
2
+ import { useSnapshot } from 'valtio';
3
+ import { LogController, type LogEntry, type LogLevel } from '@reown/appkit-core-react-native';
4
+ import { AppKitContext } from '../AppKitContext';
5
+
6
+ export interface UseAppKitLogsReturn {
7
+ /**
8
+ * All logs from AppKit
9
+ */
10
+ logs: LogEntry[];
11
+
12
+ /**
13
+ * Get logs filtered by level
14
+ */
15
+ getLogsByLevel: (level: LogLevel) => LogEntry[];
16
+
17
+ /**
18
+ * Get recent logs (default: 100)
19
+ */
20
+ getRecentLogs: (count?: number) => LogEntry[];
21
+
22
+ /**
23
+ * Export all logs as JSON string
24
+ */
25
+ exportLogs: () => string;
26
+
27
+ /**
28
+ * Get logging statistics by level
29
+ */
30
+ getLogsStats: () => Record<LogLevel, number>;
31
+
32
+ /**
33
+ * Clear all logs
34
+ */
35
+ clearLogs: () => void;
36
+
37
+ /**
38
+ * Convenience getters for different log levels (regular arrays, safe for console.log)
39
+ */
40
+ errorLogs: LogEntry[];
41
+ warningLogs: LogEntry[];
42
+ infoLogs: LogEntry[];
43
+ debugLogs: LogEntry[];
44
+ }
45
+
46
+ /**
47
+ * React hook for accessing AppKit logs
48
+ *
49
+ * This hook provides reactive access to AppKit's internal logging system.
50
+ * It automatically updates when new logs are added or when logs are cleaned up.
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * function MyComponent() {
55
+ * const { logs, errorLogs, exportLogs, clearLogs } = useAppKitLogs();
56
+ *
57
+ * return (
58
+ * <View>
59
+ * <Text>Total logs: {logs.length}</Text>
60
+ * <Text>Error logs: {errorLogs.length}</Text>
61
+ * <Button onPress={clearLogs} title="Clear Logs" />
62
+ * </View>
63
+ * );
64
+ * }
65
+ * ```
66
+ */
67
+ export const useAppKitLogs = (): UseAppKitLogsReturn => {
68
+ const context = useContext(AppKitContext);
69
+
70
+ if (context === undefined) {
71
+ throw new Error('useAppKitLogs must be used within an AppKitProvider');
72
+ }
73
+
74
+ if (!context.appKit) {
75
+ throw new Error('AppKit instance is not yet available in context.');
76
+ }
77
+
78
+ const { logs } = useSnapshot(LogController.state);
79
+
80
+ // Memoized functions that don't need to change on every render
81
+ const stableFunctions = useMemo(
82
+ () => ({
83
+ getLogsByLevel: (level: LogLevel) => LogController.getLogsByLevel(level),
84
+ getRecentLogs: (count?: number) => LogController.getRecentLogs(count),
85
+ exportLogs: () => LogController.exportLogs(),
86
+ getLogsStats: () => LogController.getLogsStats(),
87
+ clearLogs: () => LogController.clearLogs()
88
+ }),
89
+ []
90
+ );
91
+
92
+ const regularArrays = useMemo(() => {
93
+ const allLogs = [...logs]; // Convert proxy to regular array
94
+ const errorLogs: LogEntry[] = [];
95
+ const warningLogs: LogEntry[] = [];
96
+ const infoLogs: LogEntry[] = [];
97
+ const debugLogs: LogEntry[] = [];
98
+
99
+ for (const log of allLogs) {
100
+ switch (log.level) {
101
+ case 'error':
102
+ errorLogs.push(log);
103
+ break;
104
+ case 'warn':
105
+ warningLogs.push(log);
106
+ break;
107
+ case 'info':
108
+ infoLogs.push(log);
109
+ break;
110
+ case 'debug':
111
+ debugLogs.push(log);
112
+ break;
113
+ }
114
+ }
115
+
116
+ return {
117
+ logs: allLogs,
118
+ errorLogs,
119
+ warningLogs,
120
+ infoLogs,
121
+ debugLogs
122
+ };
123
+ }, [logs]);
124
+
125
+ return {
126
+ ...regularArrays,
127
+ ...stableFunctions
128
+ };
129
+ };
package/src/index.ts CHANGED
@@ -17,6 +17,13 @@ export { AppKit } from './modal/w3m-modal';
17
17
  /********** Types **********/
18
18
  export type * from '@reown/appkit-core-react-native';
19
19
  export type { AppKitNetwork, Storage } from '@reown/appkit-common-react-native';
20
+ export type {
21
+ SIWXConfig,
22
+ SIWXMessage,
23
+ SIWXSession,
24
+ SIWXStorage,
25
+ SIWXVerifier
26
+ } from '@reown/appkit-common-react-native';
20
27
  export type { AppKitConfig } from './types';
21
28
 
22
29
  /****** Hooks *******/
@@ -26,6 +33,7 @@ export { useAccount } from './hooks/useAccount';
26
33
  export { useWalletInfo } from './hooks/useWalletInfo';
27
34
  export { useAppKitEvents, useAppKitEventSubscription } from './hooks/useAppKitEvents';
28
35
  export { useAppKitState } from './hooks/useAppKitState';
36
+ export { useAppKitLogs, type UseAppKitLogsReturn } from './hooks/useAppKitLogs';
29
37
 
30
38
  /********** Networks **********/
31
39
  export { solana, solanaDevnet, solanaTestnet } from '@reown/appkit-common-react-native';
@@ -21,7 +21,7 @@ export function AccountWalletFeatures() {
21
21
  const { features, isOnRampEnabled } = useSnapshot(OptionsController.state);
22
22
  const { activeNetwork, balances, activeNamespace } = useSnapshot(ConnectionsController.state);
23
23
  const balance = CoreHelperUtil.calculateAndFormatBalance(balances as BalanceType[]);
24
- const network = ConnectionsController.state.activeNetwork?.caipNetworkId || '';
24
+ const network = ConnectionsController.state.activeNetwork?.caipNetworkId;
25
25
  const isSmartAccount = ConnectionsController.state.accountType === 'smartAccount';
26
26
  const showSend =
27
27
  activeNamespace && ConstantsUtil.SEND_SUPPORTED_NAMESPACES.includes(activeNamespace);