@formo/analytics-react-native 0.1.4 → 1.0.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.
Files changed (345) hide show
  1. package/README.md +25 -0
  2. package/lib/commonjs/FormoAnalytics.js +158 -79
  3. package/lib/commonjs/FormoAnalytics.js.map +1 -1
  4. package/lib/commonjs/FormoAnalyticsProvider.js +32 -26
  5. package/lib/commonjs/FormoAnalyticsProvider.js.map +1 -1
  6. package/lib/commonjs/constants/events.js +5 -1
  7. package/lib/commonjs/constants/events.js.map +1 -1
  8. package/lib/commonjs/constants/index.js +3 -3
  9. package/lib/commonjs/constants/storage.js +8 -1
  10. package/lib/commonjs/constants/storage.js.map +1 -1
  11. package/lib/commonjs/index.js +7 -7
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/commonjs/lib/consent/index.js +8 -8
  14. package/lib/commonjs/lib/consent/index.js.map +1 -1
  15. package/lib/commonjs/lib/event/EventFactory.js +135 -52
  16. package/lib/commonjs/lib/event/EventFactory.js.map +1 -1
  17. package/lib/commonjs/lib/event/EventManager.js +6 -6
  18. package/lib/commonjs/lib/event/EventManager.js.map +1 -1
  19. package/lib/commonjs/lib/event/EventQueue.js +35 -24
  20. package/lib/commonjs/lib/event/EventQueue.js.map +1 -1
  21. package/lib/commonjs/lib/event/index.js +4 -4
  22. package/lib/commonjs/lib/installReferrer/index.js +193 -0
  23. package/lib/commonjs/lib/installReferrer/index.js.map +1 -0
  24. package/lib/commonjs/lib/lifecycle/index.js +24 -17
  25. package/lib/commonjs/lib/lifecycle/index.js.map +1 -1
  26. package/lib/commonjs/lib/session/index.js +13 -13
  27. package/lib/commonjs/lib/session/index.js.map +1 -1
  28. package/lib/commonjs/lib/storage/AsyncStorageAdapter.js +10 -10
  29. package/lib/commonjs/lib/storage/AsyncStorageAdapter.js.map +1 -1
  30. package/lib/commonjs/lib/storage/MemoryStorage.js +1 -1
  31. package/lib/commonjs/lib/storage/StorageBlueprint.js +2 -2
  32. package/lib/commonjs/lib/storage/StorageBlueprint.js.map +1 -1
  33. package/lib/commonjs/lib/storage/StorageManager.js +6 -6
  34. package/lib/commonjs/lib/storage/StorageManager.js.map +1 -1
  35. package/lib/commonjs/lib/storage/index.js +4 -4
  36. package/lib/commonjs/lib/wagmi/WagmiEventHandler.js +31 -36
  37. package/lib/commonjs/lib/wagmi/WagmiEventHandler.js.map +1 -1
  38. package/lib/commonjs/lib/wagmi/index.js +2 -2
  39. package/lib/commonjs/package.json +1 -0
  40. package/lib/commonjs/solana/address.js +110 -0
  41. package/lib/commonjs/solana/address.js.map +1 -0
  42. package/lib/commonjs/solana/index.js +28 -0
  43. package/lib/commonjs/solana/index.js.map +1 -0
  44. package/lib/commonjs/solana/types.js +47 -0
  45. package/lib/commonjs/solana/types.js.map +1 -0
  46. package/lib/commonjs/types/events.js.map +1 -1
  47. package/lib/commonjs/types/index.js +2 -2
  48. package/lib/commonjs/utils/address.js +60 -6
  49. package/lib/commonjs/utils/address.js.map +1 -1
  50. package/lib/commonjs/utils/hash.js +44 -6
  51. package/lib/commonjs/utils/hash.js.map +1 -1
  52. package/lib/commonjs/utils/index.js +5 -5
  53. package/lib/commonjs/utils/trafficSource.js +74 -13
  54. package/lib/commonjs/utils/trafficSource.js.map +1 -1
  55. package/lib/commonjs/version.js +1 -1
  56. package/lib/module/FormoAnalytics.js +107 -26
  57. package/lib/module/FormoAnalytics.js.map +1 -1
  58. package/lib/module/FormoAnalyticsProvider.js +21 -13
  59. package/lib/module/FormoAnalyticsProvider.js.map +1 -1
  60. package/lib/module/constants/config.js +2 -0
  61. package/lib/module/constants/config.js.map +1 -1
  62. package/lib/module/constants/events.js +6 -0
  63. package/lib/module/constants/events.js.map +1 -1
  64. package/lib/module/constants/index.js +5 -3
  65. package/lib/module/constants/index.js.map +1 -1
  66. package/lib/module/constants/storage.js +9 -0
  67. package/lib/module/constants/storage.js.map +1 -1
  68. package/lib/module/index.js +6 -4
  69. package/lib/module/index.js.map +1 -1
  70. package/lib/module/lib/consent/index.js +4 -2
  71. package/lib/module/lib/consent/index.js.map +1 -1
  72. package/lib/module/lib/event/EventFactory.js +116 -33
  73. package/lib/module/lib/event/EventFactory.js.map +1 -1
  74. package/lib/module/lib/event/EventManager.js +5 -3
  75. package/lib/module/lib/event/EventManager.js.map +1 -1
  76. package/lib/module/lib/event/EventQueue.js +18 -5
  77. package/lib/module/lib/event/EventQueue.js.map +1 -1
  78. package/lib/module/lib/event/index.js +6 -4
  79. package/lib/module/lib/event/index.js.map +1 -1
  80. package/lib/module/lib/event/types.js +2 -0
  81. package/lib/module/lib/installReferrer/index.js +189 -0
  82. package/lib/module/lib/installReferrer/index.js.map +1 -0
  83. package/lib/module/lib/lifecycle/index.js +14 -5
  84. package/lib/module/lib/lifecycle/index.js.map +1 -1
  85. package/lib/module/lib/logger/index.js +2 -0
  86. package/lib/module/lib/logger/index.js.map +1 -1
  87. package/lib/module/lib/session/index.js +5 -3
  88. package/lib/module/lib/session/index.js.map +1 -1
  89. package/lib/module/lib/storage/AsyncStorageAdapter.js +4 -2
  90. package/lib/module/lib/storage/AsyncStorageAdapter.js.map +1 -1
  91. package/lib/module/lib/storage/MemoryStorage.js +3 -1
  92. package/lib/module/lib/storage/MemoryStorage.js.map +1 -1
  93. package/lib/module/lib/storage/StorageBlueprint.js +3 -1
  94. package/lib/module/lib/storage/StorageBlueprint.js.map +1 -1
  95. package/lib/module/lib/storage/StorageManager.js +5 -3
  96. package/lib/module/lib/storage/StorageManager.js.map +1 -1
  97. package/lib/module/lib/storage/index.js +6 -4
  98. package/lib/module/lib/storage/index.js.map +1 -1
  99. package/lib/module/lib/storage/types.js +1 -1
  100. package/lib/module/lib/wagmi/WagmiEventHandler.js +5 -8
  101. package/lib/module/lib/wagmi/WagmiEventHandler.js.map +1 -1
  102. package/lib/module/lib/wagmi/index.js +4 -2
  103. package/lib/module/lib/wagmi/index.js.map +1 -1
  104. package/lib/module/lib/wagmi/types.js +1 -1
  105. package/lib/module/package.json +1 -0
  106. package/lib/module/solana/address.js +102 -0
  107. package/lib/module/solana/address.js.map +1 -0
  108. package/lib/module/solana/index.js +5 -0
  109. package/lib/module/solana/index.js.map +1 -0
  110. package/lib/module/solana/types.js +42 -0
  111. package/lib/module/solana/types.js.map +1 -0
  112. package/lib/module/types/base.js +2 -0
  113. package/lib/module/types/events.js +2 -0
  114. package/lib/module/types/events.js.map +1 -1
  115. package/lib/module/types/index.js +4 -2
  116. package/lib/module/types/index.js.map +1 -1
  117. package/lib/module/utils/address.js +60 -6
  118. package/lib/module/utils/address.js.map +1 -1
  119. package/lib/module/utils/hash.js +46 -6
  120. package/lib/module/utils/hash.js.map +1 -1
  121. package/lib/module/utils/helpers.js +2 -0
  122. package/lib/module/utils/helpers.js.map +1 -1
  123. package/lib/module/utils/index.js +7 -5
  124. package/lib/module/utils/index.js.map +1 -1
  125. package/lib/module/utils/timestamp.js +2 -0
  126. package/lib/module/utils/timestamp.js.map +1 -1
  127. package/lib/module/utils/trafficSource.js +64 -3
  128. package/lib/module/utils/trafficSource.js.map +1 -1
  129. package/lib/module/version.js +3 -1
  130. package/lib/module/version.js.map +1 -1
  131. package/lib/typescript/{FormoAnalytics.d.ts → commonjs/FormoAnalytics.d.ts} +23 -4
  132. package/lib/typescript/commonjs/FormoAnalytics.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/FormoAnalyticsProvider.d.ts.map +1 -0
  134. package/lib/typescript/commonjs/constants/config.d.ts.map +1 -0
  135. package/lib/typescript/{constants → commonjs/constants}/events.d.ts +1 -0
  136. package/lib/typescript/commonjs/constants/events.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/constants/index.d.ts.map +1 -0
  138. package/lib/typescript/{constants → commonjs/constants}/storage.d.ts +3 -0
  139. package/lib/typescript/commonjs/constants/storage.d.ts.map +1 -0
  140. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/lib/consent/index.d.ts.map +1 -0
  142. package/lib/typescript/{lib → commonjs/lib}/event/EventFactory.d.ts +36 -1
  143. package/lib/typescript/commonjs/lib/event/EventFactory.d.ts.map +1 -0
  144. package/lib/typescript/commonjs/lib/event/EventManager.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/lib/event/EventQueue.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/lib/event/index.d.ts.map +1 -0
  147. package/lib/typescript/{lib → commonjs/lib}/event/types.d.ts +1 -1
  148. package/lib/typescript/commonjs/lib/event/types.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/lib/installReferrer/index.d.ts +39 -0
  150. package/lib/typescript/commonjs/lib/installReferrer/index.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/lib/lifecycle/index.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/lib/logger/index.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/lib/session/index.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/lib/storage/AsyncStorageAdapter.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/lib/storage/MemoryStorage.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/lib/storage/StorageBlueprint.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/lib/storage/StorageManager.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/lib/storage/index.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/lib/storage/types.d.ts.map +1 -0
  160. package/lib/typescript/{lib → commonjs/lib}/wagmi/WagmiEventHandler.d.ts +0 -1
  161. package/lib/typescript/commonjs/lib/wagmi/WagmiEventHandler.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/lib/wagmi/index.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/lib/wagmi/types.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/package.json +1 -0
  165. package/lib/typescript/commonjs/solana/address.d.ts +42 -0
  166. package/lib/typescript/commonjs/solana/address.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/solana/index.d.ts +3 -0
  168. package/lib/typescript/commonjs/solana/index.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/solana/types.d.ts +34 -0
  170. package/lib/typescript/commonjs/solana/types.d.ts.map +1 -0
  171. package/lib/typescript/{types → commonjs/types}/base.d.ts +39 -1
  172. package/lib/typescript/commonjs/types/base.d.ts.map +1 -0
  173. package/lib/typescript/{types → commonjs/types}/events.d.ts +1 -1
  174. package/lib/typescript/commonjs/types/events.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/types/index.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/utils/address.d.ts +45 -0
  177. package/lib/typescript/commonjs/utils/address.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/utils/hash.d.ts +18 -0
  179. package/lib/typescript/commonjs/utils/hash.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/utils/helpers.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/utils/timestamp.d.ts.map +1 -0
  183. package/lib/typescript/{utils → commonjs/utils}/trafficSource.d.ts +16 -0
  184. package/lib/typescript/commonjs/utils/trafficSource.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/version.d.ts +2 -0
  186. package/lib/typescript/commonjs/version.d.ts.map +1 -0
  187. package/lib/typescript/module/FormoAnalytics.d.ts +182 -0
  188. package/lib/typescript/module/FormoAnalytics.d.ts.map +1 -0
  189. package/lib/typescript/module/FormoAnalyticsProvider.d.ts +29 -0
  190. package/lib/typescript/module/FormoAnalyticsProvider.d.ts.map +1 -0
  191. package/lib/typescript/module/constants/config.d.ts +8 -0
  192. package/lib/typescript/module/constants/config.d.ts.map +1 -0
  193. package/lib/typescript/module/constants/events.d.ts +24 -0
  194. package/lib/typescript/module/constants/events.d.ts.map +1 -0
  195. package/lib/typescript/module/constants/index.d.ts +4 -0
  196. package/lib/typescript/module/constants/index.d.ts.map +1 -0
  197. package/lib/typescript/module/constants/storage.d.ts +13 -0
  198. package/lib/typescript/module/constants/storage.d.ts.map +1 -0
  199. package/lib/typescript/module/index.d.ts +44 -0
  200. package/lib/typescript/module/index.d.ts.map +1 -0
  201. package/lib/typescript/module/lib/consent/index.d.ts +13 -0
  202. package/lib/typescript/module/lib/consent/index.d.ts.map +1 -0
  203. package/lib/typescript/module/lib/event/EventFactory.d.ts +99 -0
  204. package/lib/typescript/module/lib/event/EventFactory.d.ts.map +1 -0
  205. package/lib/typescript/module/lib/event/EventManager.d.ts +17 -0
  206. package/lib/typescript/module/lib/event/EventManager.d.ts.map +1 -0
  207. package/lib/typescript/module/lib/event/EventQueue.d.ts +74 -0
  208. package/lib/typescript/module/lib/event/EventQueue.d.ts.map +1 -0
  209. package/lib/typescript/module/lib/event/index.d.ts +5 -0
  210. package/lib/typescript/module/lib/event/index.d.ts.map +1 -0
  211. package/lib/typescript/module/lib/event/types.d.ts +23 -0
  212. package/lib/typescript/module/lib/event/types.d.ts.map +1 -0
  213. package/lib/typescript/module/lib/installReferrer/index.d.ts +39 -0
  214. package/lib/typescript/module/lib/installReferrer/index.d.ts.map +1 -0
  215. package/lib/typescript/module/lib/lifecycle/index.d.ts +46 -0
  216. package/lib/typescript/module/lib/lifecycle/index.d.ts.map +1 -0
  217. package/lib/typescript/module/lib/logger/index.d.ts +19 -0
  218. package/lib/typescript/module/lib/logger/index.d.ts.map +1 -0
  219. package/lib/typescript/module/lib/session/index.d.ts +41 -0
  220. package/lib/typescript/module/lib/session/index.d.ts.map +1 -0
  221. package/lib/typescript/module/lib/storage/AsyncStorageAdapter.d.ts +48 -0
  222. package/lib/typescript/module/lib/storage/AsyncStorageAdapter.d.ts.map +1 -0
  223. package/lib/typescript/module/lib/storage/MemoryStorage.d.ts +18 -0
  224. package/lib/typescript/module/lib/storage/MemoryStorage.d.ts.map +1 -0
  225. package/lib/typescript/module/lib/storage/StorageBlueprint.d.ts +21 -0
  226. package/lib/typescript/module/lib/storage/StorageBlueprint.d.ts.map +1 -0
  227. package/lib/typescript/module/lib/storage/StorageManager.d.ts +45 -0
  228. package/lib/typescript/module/lib/storage/StorageManager.d.ts.map +1 -0
  229. package/lib/typescript/module/lib/storage/index.d.ts +5 -0
  230. package/lib/typescript/module/lib/storage/index.d.ts.map +1 -0
  231. package/lib/typescript/module/lib/storage/types.d.ts +22 -0
  232. package/lib/typescript/module/lib/storage/types.d.ts.map +1 -0
  233. package/lib/typescript/module/lib/wagmi/WagmiEventHandler.d.ts +103 -0
  234. package/lib/typescript/module/lib/wagmi/WagmiEventHandler.d.ts.map +1 -0
  235. package/lib/typescript/module/lib/wagmi/index.d.ts +3 -0
  236. package/lib/typescript/module/lib/wagmi/index.d.ts.map +1 -0
  237. package/lib/typescript/module/lib/wagmi/types.d.ts +54 -0
  238. package/lib/typescript/module/lib/wagmi/types.d.ts.map +1 -0
  239. package/lib/typescript/module/package.json +1 -0
  240. package/lib/typescript/module/solana/address.d.ts +42 -0
  241. package/lib/typescript/module/solana/address.d.ts.map +1 -0
  242. package/lib/typescript/module/solana/index.d.ts +3 -0
  243. package/lib/typescript/module/solana/index.d.ts.map +1 -0
  244. package/lib/typescript/module/solana/types.d.ts +34 -0
  245. package/lib/typescript/module/solana/types.d.ts.map +1 -0
  246. package/lib/typescript/module/types/base.d.ts +258 -0
  247. package/lib/typescript/module/types/base.d.ts.map +1 -0
  248. package/lib/typescript/module/types/events.d.ts +111 -0
  249. package/lib/typescript/module/types/events.d.ts.map +1 -0
  250. package/lib/typescript/module/types/index.d.ts +3 -0
  251. package/lib/typescript/module/types/index.d.ts.map +1 -0
  252. package/lib/typescript/module/utils/address.d.ts +45 -0
  253. package/lib/typescript/module/utils/address.d.ts.map +1 -0
  254. package/lib/typescript/module/utils/hash.d.ts +18 -0
  255. package/lib/typescript/module/utils/hash.d.ts.map +1 -0
  256. package/lib/typescript/module/utils/helpers.d.ts +26 -0
  257. package/lib/typescript/module/utils/helpers.d.ts.map +1 -0
  258. package/lib/typescript/module/utils/index.d.ts +6 -0
  259. package/lib/typescript/module/utils/index.d.ts.map +1 -0
  260. package/lib/typescript/module/utils/timestamp.d.ts +13 -0
  261. package/lib/typescript/module/utils/timestamp.d.ts.map +1 -0
  262. package/lib/typescript/module/utils/trafficSource.d.ts +46 -0
  263. package/lib/typescript/module/utils/trafficSource.d.ts.map +1 -0
  264. package/lib/typescript/module/version.d.ts +2 -0
  265. package/lib/typescript/module/version.d.ts.map +1 -0
  266. package/package.json +44 -49
  267. package/src/FormoAnalytics.ts +118 -16
  268. package/src/constants/events.ts +4 -0
  269. package/src/constants/storage.ts +7 -0
  270. package/src/lib/event/EventFactory.ts +129 -29
  271. package/src/lib/event/EventQueue.ts +14 -0
  272. package/src/lib/event/types.ts +0 -1
  273. package/src/lib/installReferrer/index.ts +225 -0
  274. package/src/lib/lifecycle/index.ts +10 -1
  275. package/src/lib/wagmi/WagmiEventHandler.ts +0 -4
  276. package/src/solana/address.ts +122 -0
  277. package/src/solana/index.ts +2 -0
  278. package/src/solana/types.ts +46 -0
  279. package/src/types/base.ts +41 -1
  280. package/src/types/events.ts +1 -1
  281. package/src/utils/address.ts +72 -6
  282. package/src/utils/hash.ts +51 -6
  283. package/src/utils/trafficSource.ts +73 -0
  284. package/src/version.ts +1 -1
  285. package/lib/typescript/FormoAnalytics.d.ts.map +0 -1
  286. package/lib/typescript/FormoAnalyticsProvider.d.ts.map +0 -1
  287. package/lib/typescript/constants/config.d.ts.map +0 -1
  288. package/lib/typescript/constants/events.d.ts.map +0 -1
  289. package/lib/typescript/constants/index.d.ts.map +0 -1
  290. package/lib/typescript/constants/storage.d.ts.map +0 -1
  291. package/lib/typescript/index.d.ts.map +0 -1
  292. package/lib/typescript/lib/consent/index.d.ts.map +0 -1
  293. package/lib/typescript/lib/event/EventFactory.d.ts.map +0 -1
  294. package/lib/typescript/lib/event/EventManager.d.ts.map +0 -1
  295. package/lib/typescript/lib/event/EventQueue.d.ts.map +0 -1
  296. package/lib/typescript/lib/event/index.d.ts.map +0 -1
  297. package/lib/typescript/lib/event/types.d.ts.map +0 -1
  298. package/lib/typescript/lib/lifecycle/index.d.ts.map +0 -1
  299. package/lib/typescript/lib/logger/index.d.ts.map +0 -1
  300. package/lib/typescript/lib/session/index.d.ts.map +0 -1
  301. package/lib/typescript/lib/storage/AsyncStorageAdapter.d.ts.map +0 -1
  302. package/lib/typescript/lib/storage/MemoryStorage.d.ts.map +0 -1
  303. package/lib/typescript/lib/storage/StorageBlueprint.d.ts.map +0 -1
  304. package/lib/typescript/lib/storage/StorageManager.d.ts.map +0 -1
  305. package/lib/typescript/lib/storage/index.d.ts.map +0 -1
  306. package/lib/typescript/lib/storage/types.d.ts.map +0 -1
  307. package/lib/typescript/lib/wagmi/WagmiEventHandler.d.ts.map +0 -1
  308. package/lib/typescript/lib/wagmi/index.d.ts.map +0 -1
  309. package/lib/typescript/lib/wagmi/types.d.ts.map +0 -1
  310. package/lib/typescript/types/base.d.ts.map +0 -1
  311. package/lib/typescript/types/events.d.ts.map +0 -1
  312. package/lib/typescript/types/index.d.ts.map +0 -1
  313. package/lib/typescript/utils/address.d.ts +0 -25
  314. package/lib/typescript/utils/address.d.ts.map +0 -1
  315. package/lib/typescript/utils/hash.d.ts +0 -10
  316. package/lib/typescript/utils/hash.d.ts.map +0 -1
  317. package/lib/typescript/utils/helpers.d.ts.map +0 -1
  318. package/lib/typescript/utils/index.d.ts.map +0 -1
  319. package/lib/typescript/utils/timestamp.d.ts.map +0 -1
  320. package/lib/typescript/utils/trafficSource.d.ts.map +0 -1
  321. package/lib/typescript/version.d.ts +0 -2
  322. package/lib/typescript/version.d.ts.map +0 -1
  323. /package/lib/typescript/{FormoAnalyticsProvider.d.ts → commonjs/FormoAnalyticsProvider.d.ts} +0 -0
  324. /package/lib/typescript/{constants → commonjs/constants}/config.d.ts +0 -0
  325. /package/lib/typescript/{constants → commonjs/constants}/index.d.ts +0 -0
  326. /package/lib/typescript/{index.d.ts → commonjs/index.d.ts} +0 -0
  327. /package/lib/typescript/{lib → commonjs/lib}/consent/index.d.ts +0 -0
  328. /package/lib/typescript/{lib → commonjs/lib}/event/EventManager.d.ts +0 -0
  329. /package/lib/typescript/{lib → commonjs/lib}/event/EventQueue.d.ts +0 -0
  330. /package/lib/typescript/{lib → commonjs/lib}/event/index.d.ts +0 -0
  331. /package/lib/typescript/{lib → commonjs/lib}/lifecycle/index.d.ts +0 -0
  332. /package/lib/typescript/{lib → commonjs/lib}/logger/index.d.ts +0 -0
  333. /package/lib/typescript/{lib → commonjs/lib}/session/index.d.ts +0 -0
  334. /package/lib/typescript/{lib → commonjs/lib}/storage/AsyncStorageAdapter.d.ts +0 -0
  335. /package/lib/typescript/{lib → commonjs/lib}/storage/MemoryStorage.d.ts +0 -0
  336. /package/lib/typescript/{lib → commonjs/lib}/storage/StorageBlueprint.d.ts +0 -0
  337. /package/lib/typescript/{lib → commonjs/lib}/storage/StorageManager.d.ts +0 -0
  338. /package/lib/typescript/{lib → commonjs/lib}/storage/index.d.ts +0 -0
  339. /package/lib/typescript/{lib → commonjs/lib}/storage/types.d.ts +0 -0
  340. /package/lib/typescript/{lib → commonjs/lib}/wagmi/index.d.ts +0 -0
  341. /package/lib/typescript/{lib → commonjs/lib}/wagmi/types.d.ts +0 -0
  342. /package/lib/typescript/{types → commonjs/types}/index.d.ts +0 -0
  343. /package/lib/typescript/{utils → commonjs/utils}/helpers.d.ts +0 -0
  344. /package/lib/typescript/{utils → commonjs/utils}/index.d.ts +0 -0
  345. /package/lib/typescript/{utils → commonjs/utils}/timestamp.d.ts +0 -0
@@ -0,0 +1,23 @@
1
+ import { Address, APIEvent, IFormoEvent, IFormoEventContext, IFormoEventProperties, Nullable, SignatureStatus, TransactionStatus, ChainID } from "../../types";
2
+ export interface IEventFactory {
3
+ create(event: APIEvent, address?: Address, userId?: string): Promise<IFormoEvent>;
4
+ generateScreenEvent(name: string, category?: string, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
5
+ generateDetectWalletEvent(providerName: string, rdns: string, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
6
+ generateIdentifyEvent(providerName: string, rdns: string, address: Nullable<Address>, userId?: Nullable<string>, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
7
+ generateConnectEvent(chainId: ChainID, address: Address, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
8
+ generateDisconnectEvent(chainId?: ChainID, address?: Address, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
9
+ generateChainChangedEvent(chainId: ChainID, address: Address, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
10
+ generateSignatureEvent(status: SignatureStatus, chainId: ChainID | undefined, address: Address, message: string, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
11
+ generateTransactionEvent(status: TransactionStatus, chainId: ChainID, address: Address, data?: string, to?: string, value?: string, transactionHash?: string, function_name?: string, function_args?: Record<string, unknown>, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
12
+ generateTrackEvent(event: string, properties?: IFormoEventProperties, context?: IFormoEventContext): Promise<IFormoEvent>;
13
+ }
14
+ export interface IEventManager {
15
+ addEvent(event: APIEvent, address?: Address, userId?: string): Promise<void>;
16
+ }
17
+ export interface IEventQueue {
18
+ enqueue(event: IFormoEvent, callback?: (...args: unknown[]) => void): Promise<void>;
19
+ flush(callback?: (...args: unknown[]) => void): Promise<void>;
20
+ clear(): void;
21
+ cleanup(): Promise<void>;
22
+ }
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/event/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,OAAO,EACR,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,MAAM,CACJ,KAAK,EAAE,QAAQ,EACf,OAAO,CAAC,EAAE,OAAO,EAC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AC;CAC1B"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Install Referrer / attribution capture (Android)
3
+ *
4
+ * Populates the existing traffic source fields (utm_source, utm_medium,
5
+ * utm_campaign, utm_term, utm_content, ref, referrer) from the Google Play
6
+ * Install Referrer on first launch. This is what enables web-to-mobile
7
+ * attribution: a user who tapped a link on example.com before installing shows
8
+ * up with that referrer on their first events (see P-2207).
9
+ *
10
+ * - Android: Google Play Install Referrer API via react-native-play-install-referrer
11
+ * (optional peer dep). Returns a URL-encoded query string like
12
+ * "utm_source=example.com&utm_campaign=spring_sale&..." which we parse with
13
+ * parseTrafficSource.
14
+ *
15
+ * - iOS: NOT supported. Apple exposes no install-referrer API, so an install
16
+ * cannot be attributed to a referring website from the SDK. Doing so requires
17
+ * a third-party attribution service (Branch/AppsFlyer) or fingerprint
18
+ * matching — out of scope. On iOS this capture is a no-op.
19
+ *
20
+ * The native module is lazy-required and capture silently no-ops when it is not
21
+ * installed (keeps Expo Go and minimal integrations working).
22
+ *
23
+ * Result is merged with mergeTrafficSourceFill so a deep link that arrived
24
+ * via Linking.getInitialURL() takes precedence over install-referrer data.
25
+ *
26
+ * The resolution is one-shot: on success we set LOCAL_INSTALL_REFERRER_RESOLVED_KEY
27
+ * so we never call the native API again (Play returns meaningful data only on
28
+ * the first fetch).
29
+ */
30
+ export interface CaptureOptions {
31
+ customRefParams?: string[];
32
+ pathPattern?: string;
33
+ }
34
+ /**
35
+ * Capture install-time attribution and merge into the stored traffic source.
36
+ * One-shot: returns immediately if already resolved on a previous launch.
37
+ */
38
+ export declare function captureInstallReferrer(options?: CaptureOptions): Promise<void>;
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/installReferrer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA0CH,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA0Cf"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Application Lifecycle Event Manager
3
+ *
4
+ * Tracks application lifecycle events following the Segment/RudderStack spec:
5
+ * - Application Installed (first launch)
6
+ * - Application Updated (version/build changed)
7
+ * - Application Opened (every cold start + foreground return)
8
+ * - Application Backgrounded (app goes to background)
9
+ *
10
+ * Detection is JS-side using AsyncStorage (no native modules required).
11
+ */
12
+ /** Interface for the analytics instance to avoid circular deps */
13
+ interface IAnalyticsInstance {
14
+ track(event: string, properties?: Record<string, unknown>): Promise<void>;
15
+ }
16
+ export declare class AppLifecycleManager {
17
+ private analytics;
18
+ private appStateSubscription;
19
+ private lastAppState;
20
+ private appVersionInfo;
21
+ constructor(analytics: IAnalyticsInstance);
22
+ /**
23
+ * Initialize lifecycle tracking.
24
+ * Detects install/update, fires Application Opened, and sets up AppState listener.
25
+ */
26
+ start(appOptions?: {
27
+ version?: string;
28
+ build?: string;
29
+ }): Promise<void>;
30
+ /**
31
+ * Compare stored version/build with current to detect install or update.
32
+ * Requires persistent storage (AsyncStorage) — skips if only MemoryStorage is available,
33
+ * since MemoryStorage is empty on every cold start and would false-positive as "installed".
34
+ */
35
+ private detectInstallOrUpdate;
36
+ /**
37
+ * Handle AppState transitions for foreground/background events.
38
+ */
39
+ private handleAppStateChange;
40
+ /**
41
+ * Clean up AppState listener.
42
+ */
43
+ cleanup(): void;
44
+ }
45
+ export {};
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,kEAAkE;AAClE,UAAU,kBAAkB;IAC1B,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3E;AAgDD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,oBAAoB,CAAuC;IACnE,OAAO,CAAC,YAAY,CAAyC;IAC7D,OAAO,CAAC,cAAc,CAA8C;gBAExD,SAAS,EAAE,kBAAkB;IAIzC;;;OAGG;IACG,KAAK,CACT,UAAU,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAChD,OAAO,CAAC,IAAI,CAAC;IAiChB;;;;OAIG;YACW,qBAAqB;IAkDnC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAkC5B;;OAEG;IACH,OAAO,IAAI,IAAI;CAOhB"}
@@ -0,0 +1,19 @@
1
+ export type LogLevel = "debug" | "info" | "warn" | "error" | "log";
2
+ interface LoggerConfig {
3
+ enabled?: boolean;
4
+ enabledLevels?: LogLevel[];
5
+ }
6
+ declare class LoggerClass {
7
+ private config;
8
+ init(config: LoggerConfig): void;
9
+ private shouldLog;
10
+ debug(...args: unknown[]): void;
11
+ info(...args: unknown[]): void;
12
+ warn(...args: unknown[]): void;
13
+ error(...args: unknown[]): void;
14
+ log(...args: unknown[]): void;
15
+ }
16
+ export declare const Logger: LoggerClass;
17
+ export declare const logger: LoggerClass;
18
+ export {};
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/logger/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAEnE,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC5B;AAED,cAAM,WAAW;IACf,OAAO,CAAC,MAAM,CAGZ;IAEF,IAAI,CAAC,MAAM,EAAE,YAAY;IAIzB,OAAO,CAAC,SAAS;IAMjB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAMxB,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAMvB,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAMvB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAMxB,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;CAKvB;AAED,eAAO,MAAM,MAAM,aAAoB,CAAC;AACxC,eAAO,MAAM,MAAM,aAAS,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { SESSION_WALLET_DETECTED_KEY, SESSION_WALLET_IDENTIFIED_KEY } from "../../constants";
2
+ export { SESSION_WALLET_DETECTED_KEY, SESSION_WALLET_IDENTIFIED_KEY };
3
+ /**
4
+ * Session manager for tracking wallet detection and identification
5
+ * Persists to session storage to avoid duplicate detection/identification events
6
+ * within the same session
7
+ */
8
+ export declare class FormoAnalyticsSession {
9
+ private detectedWallets;
10
+ private identifiedWallets;
11
+ constructor();
12
+ /**
13
+ * Load session state from storage
14
+ */
15
+ private loadFromStorage;
16
+ /**
17
+ * Save session state to storage
18
+ */
19
+ private saveToStorage;
20
+ /**
21
+ * Check if a wallet has been detected in this session
22
+ */
23
+ isWalletDetected(rdns: string): boolean;
24
+ /**
25
+ * Mark a wallet as detected
26
+ */
27
+ markWalletDetected(rdns: string): void;
28
+ /**
29
+ * Check if a wallet + address combination has been identified
30
+ */
31
+ isWalletIdentified(address: string, rdns: string): boolean;
32
+ /**
33
+ * Mark a wallet + address combination as identified
34
+ */
35
+ markWalletIdentified(address: string, rdns: string): void;
36
+ /**
37
+ * Clear all session data
38
+ */
39
+ clear(): void;
40
+ }
41
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/session/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,CAAC;AAEtE;;;;GAIG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,eAAe,CAA0B;IACjD,OAAO,CAAC,iBAAiB,CAA0B;;IAMnD;;OAEG;IACH,OAAO,CAAC,eAAe;IAkBvB;;OAEG;IACH,OAAO,CAAC,aAAa;IAerB;;OAEG;IACI,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9C;;OAEG;IACI,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK7C;;OAEG;IACI,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAKjE;;OAEG;IACI,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAMhE;;OAEG;IACI,KAAK,IAAI,IAAI;CAMrB"}
@@ -0,0 +1,48 @@
1
+ import StorageBlueprint from "./StorageBlueprint";
2
+ import { AsyncStorageInterface } from "./types";
3
+ /**
4
+ * AsyncStorage adapter for React Native
5
+ * Provides persistent storage across app restarts
6
+ */
7
+ declare class AsyncStorageAdapter extends StorageBlueprint {
8
+ private asyncStorage;
9
+ private cache;
10
+ constructor(writeKey: string, asyncStorage?: AsyncStorageInterface);
11
+ /**
12
+ * Initialize with AsyncStorage instance and preload all Formo keys
13
+ * This ensures consent flags and other critical data are available synchronously
14
+ */
15
+ initialize(asyncStorage: AsyncStorageInterface): Promise<void>;
16
+ isAvailable(): boolean;
17
+ /**
18
+ * Synchronous get from cache (may return stale data)
19
+ * Use getAsync for guaranteed fresh data
20
+ */
21
+ get(key: string): string | null;
22
+ /**
23
+ * Async get from storage
24
+ */
25
+ getAsync(key: string): Promise<string | null>;
26
+ /**
27
+ * Synchronous set (writes to cache immediately, persists async)
28
+ */
29
+ set(key: string, value: string): void;
30
+ /**
31
+ * Async set to storage
32
+ */
33
+ setAsync(key: string, value: string): Promise<void>;
34
+ /**
35
+ * Synchronous remove (removes from cache immediately, persists async)
36
+ */
37
+ remove(key: string): void;
38
+ /**
39
+ * Async remove from storage
40
+ */
41
+ removeAsync(key: string): Promise<void>;
42
+ /**
43
+ * Clear all cached data
44
+ */
45
+ clearCache(): void;
46
+ }
47
+ export default AsyncStorageAdapter;
48
+ //# sourceMappingURL=AsyncStorageAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncStorageAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/lib/storage/AsyncStorageAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGhD;;;GAGG;AACH,cAAM,mBAAoB,SAAQ,gBAAgB;IAChD,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,KAAK,CAAkC;gBAEnC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,qBAAqB;IAOlE;;;OAGG;IACU,UAAU,CAAC,YAAY,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgCpE,WAAW,IAAI,OAAO;IAI7B;;;OAGG;IACI,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IActC;;OAEG;IACU,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAoB1D;;OAEG;IACI,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAU5C;;OAEG;IACU,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBhE;;OAEG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAUhC;;OAEG;IACU,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBpD;;OAEG;IACI,UAAU,IAAI,IAAI;CAG1B;AAED,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import StorageBlueprint from "./StorageBlueprint";
2
+ /**
3
+ * In-memory storage fallback
4
+ * Data is lost when the app is closed
5
+ */
6
+ declare class MemoryStorage extends StorageBlueprint {
7
+ private storage;
8
+ isAvailable(): boolean;
9
+ get(key: string): string | null;
10
+ getAsync(key: string): Promise<string | null>;
11
+ set(key: string, value: string): void;
12
+ setAsync(key: string, value: string): Promise<void>;
13
+ remove(key: string): void;
14
+ removeAsync(key: string): Promise<void>;
15
+ clear(): void;
16
+ }
17
+ export default MemoryStorage;
18
+ //# sourceMappingURL=MemoryStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemoryStorage.d.ts","sourceRoot":"","sources":["../../../../../src/lib/storage/MemoryStorage.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,cAAM,aAAc,SAAQ,gBAAgB;IAC1C,OAAO,CAAC,OAAO,CAAkC;IAE1C,WAAW,IAAI,OAAO;IAItB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAInD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/B,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAInB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,KAAK,IAAI,IAAI;CAGrB;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { IStorage } from "./types";
2
+ /**
3
+ * Base storage class with key prefixing
4
+ */
5
+ declare abstract class StorageBlueprint implements IStorage {
6
+ protected writeKey: string;
7
+ constructor(writeKey: string);
8
+ /**
9
+ * Generate storage key with prefix
10
+ */
11
+ getKey(key: string): string;
12
+ abstract isAvailable(): boolean;
13
+ abstract get(key: string): string | null;
14
+ abstract getAsync(key: string): Promise<string | null>;
15
+ abstract set(key: string, value: string): void;
16
+ abstract setAsync(key: string, value: string): Promise<void>;
17
+ abstract remove(key: string): void;
18
+ abstract removeAsync(key: string): Promise<void>;
19
+ }
20
+ export default StorageBlueprint;
21
+ //# sourceMappingURL=StorageBlueprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageBlueprint.d.ts","sourceRoot":"","sources":["../../../../../src/lib/storage/StorageBlueprint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC;;GAEG;AACH,uBAAe,gBAAiB,YAAW,QAAQ;IACjD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEf,QAAQ,EAAE,MAAM;IAI5B;;OAEG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIlC,QAAQ,CAAC,WAAW,IAAI,OAAO;IAC/B,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IACxC,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAC9C,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC5D,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAClC,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CACjD;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { IStorage, StorageType, AsyncStorageInterface } from "./types";
2
+ /**
3
+ * Storage manager for React Native SDK
4
+ * Uses AsyncStorage as primary storage with MemoryStorage fallback
5
+ */
6
+ export declare class StorageManager {
7
+ private readonly writeKey;
8
+ private storages;
9
+ constructor(writeKey: string);
10
+ /**
11
+ * Initialize with AsyncStorage instance
12
+ * This should be called during SDK initialization
13
+ */
14
+ initialize(asyncStorage: AsyncStorageInterface): Promise<void>;
15
+ /**
16
+ * Get storage instance by type
17
+ */
18
+ getStorage(type: StorageType): IStorage;
19
+ /**
20
+ * Create storage instance
21
+ */
22
+ private createStorage;
23
+ /**
24
+ * Get primary storage (AsyncStorage with fallback)
25
+ */
26
+ getPrimaryStorage(): IStorage;
27
+ /**
28
+ * Check if persistent storage (AsyncStorage) has been initialized.
29
+ * Returns false if only MemoryStorage is available.
30
+ */
31
+ hasPersistentStorage(): boolean;
32
+ }
33
+ /**
34
+ * Initialize global storage manager
35
+ */
36
+ export declare function initStorageManager(writeKey: string): StorageManager;
37
+ /**
38
+ * Get global storage manager instance
39
+ */
40
+ export declare function getStorageManager(): StorageManager | null;
41
+ /**
42
+ * Get primary storage
43
+ */
44
+ export declare function storage(): IStorage;
45
+ //# sourceMappingURL=StorageManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageManager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/storage/StorageManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEvE;;;GAGG;AACH,qBAAa,cAAc;IAGb,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,OAAO,CAAC,QAAQ,CAAyC;gBAE5B,QAAQ,EAAE,MAAM;IAE7C;;;OAGG;IACU,UAAU,CAAC,YAAY,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAY3E;;OAEG;IACI,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,QAAQ;IAoB9C;;OAEG;IACH,OAAO,CAAC,aAAa;IAWrB;;OAEG;IACI,iBAAiB,IAAI,QAAQ;IAQpC;;;OAGG;IACI,oBAAoB,IAAI,OAAO;CAIvC;AAKD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CASnE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,IAAI,CAEzD;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,QAAQ,CAKlC"}
@@ -0,0 +1,5 @@
1
+ export * from "./StorageManager";
2
+ export * from "./types";
3
+ export { default as AsyncStorageAdapter } from "./AsyncStorageAdapter";
4
+ export { default as MemoryStorage } from "./MemoryStorage";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,22 @@
1
+ export type StorageType = "asyncStorage" | "memoryStorage";
2
+ export interface IStorage {
3
+ isAvailable(): boolean;
4
+ get(key: string): string | null;
5
+ getAsync(key: string): Promise<string | null>;
6
+ set(key: string, value: string): void;
7
+ setAsync(key: string, value: string): Promise<void>;
8
+ remove(key: string): void;
9
+ removeAsync(key: string): Promise<void>;
10
+ getKey(key: string): string;
11
+ }
12
+ export interface AsyncStorageInterface {
13
+ getItem(key: string): Promise<string | null>;
14
+ setItem(key: string, value: string): Promise<void>;
15
+ removeItem(key: string): Promise<void>;
16
+ getAllKeys(): Promise<readonly string[]>;
17
+ multiGet(keys: readonly string[]): Promise<readonly [string, string | null][]>;
18
+ multiSet?(keyValuePairs: [string, string][]): Promise<void>;
19
+ multiRemove(keys: readonly string[]): Promise<void>;
20
+ clear?(): Promise<void>;
21
+ }
22
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/storage/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,eAAe,CAAC;AAE3D,MAAM,WAAW,QAAQ;IACvB,WAAW,IAAI,OAAO,CAAC;IACvB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,UAAU,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/E,QAAQ,CAAC,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,WAAW,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * WagmiEventHandler for React Native
3
+ *
4
+ * Handles wallet event tracking by hooking into Wagmi v2's config.subscribe()
5
+ * and TanStack Query's MutationCache.
6
+ */
7
+ import { SignatureStatus, TransactionStatus } from "../../types/events";
8
+ import { WagmiConfig, QueryClient } from "./types";
9
+ interface IFormoAnalyticsInstance {
10
+ connect(params: {
11
+ chainId: number;
12
+ address: string;
13
+ }, properties?: Record<string, unknown>): Promise<void>;
14
+ disconnect(params?: {
15
+ chainId?: number;
16
+ address?: string;
17
+ }): Promise<void>;
18
+ chain(params: {
19
+ chainId: number;
20
+ address?: string;
21
+ }): Promise<void>;
22
+ signature(params: {
23
+ status: SignatureStatus;
24
+ chainId: number;
25
+ address: string;
26
+ message: string;
27
+ }): Promise<void>;
28
+ transaction(params: {
29
+ status: TransactionStatus;
30
+ chainId: number;
31
+ address: string;
32
+ data?: string;
33
+ to?: string;
34
+ value?: string;
35
+ transactionHash?: string;
36
+ }): Promise<void>;
37
+ isAutocaptureEnabled(eventType: "connect" | "disconnect" | "signature" | "transaction" | "chain"): boolean;
38
+ }
39
+ export declare class WagmiEventHandler {
40
+ private formo;
41
+ private wagmiConfig;
42
+ private queryClient?;
43
+ private unsubscribers;
44
+ private trackingState;
45
+ private processedMutations;
46
+ private pendingStatusChanges;
47
+ constructor(formoAnalytics: IFormoAnalyticsInstance, wagmiConfig: WagmiConfig, queryClient?: QueryClient);
48
+ /**
49
+ * Set up listeners for wallet connection, disconnection, and chain changes
50
+ */
51
+ private setupConnectionListeners;
52
+ private static readonly MAX_PENDING_STATUS_CHANGES;
53
+ /**
54
+ * Handle status changes (connect/disconnect)
55
+ */
56
+ private handleStatusChange;
57
+ /**
58
+ * Process a single status change (extracted for iterative processing)
59
+ */
60
+ private processStatusChange;
61
+ /**
62
+ * Handle chain ID changes
63
+ */
64
+ private handleChainChange;
65
+ /**
66
+ * Set up mutation tracking for signatures and transactions
67
+ */
68
+ private setupMutationTracking;
69
+ /**
70
+ * Handle mutation cache events
71
+ */
72
+ private handleMutationEvent;
73
+ /**
74
+ * Handle signature mutations
75
+ */
76
+ private handleSignatureMutation;
77
+ /**
78
+ * Handle transaction mutations
79
+ */
80
+ private handleTransactionMutation;
81
+ /**
82
+ * Get current Wagmi state
83
+ */
84
+ private getState;
85
+ /**
86
+ * Get connected address from state
87
+ */
88
+ private getConnectedAddress;
89
+ /**
90
+ * Get connector name from state
91
+ */
92
+ private getConnectorName;
93
+ /**
94
+ * Get connector ID from state (typically the rdns for EIP-6963 wallets)
95
+ */
96
+ private getConnectorId;
97
+ /**
98
+ * Clean up subscriptions
99
+ */
100
+ cleanup(): void;
101
+ }
102
+ export {};
103
+ //# sourceMappingURL=WagmiEventHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WagmiEventHandler.d.ts","sourceRoot":"","sources":["../../../../../src/lib/wagmi/WagmiEventHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC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IACvC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,aAAa,CAEnB;IACF,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,oBAAoB,CAGpB;gBAGN,cAAc,EAAE,uBAAuB,EACvC,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,WAAW;IAmB3B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAyBhC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAM;IAExD;;OAEG;YACW,kBAAkB;IAkChC;;OAEG;YACW,mBAAmB;IAuDjC;;OAEG;YACW,iBAAiB;IAqC/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAgB7B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA0D3B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAsE/B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAgFjC;;OAEG;IACH,OAAO,CAAC,QAAQ;IAoBhB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAa3B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IASxB;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACI,OAAO,IAAI,IAAI;CAgBvB"}
@@ -0,0 +1,3 @@
1
+ export * from "./WagmiEventHandler";
2
+ export * from "./types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/wagmi/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Wagmi types for React Native SDK
3
+ */
4
+ export interface WagmiState {
5
+ status: "connecting" | "connected" | "disconnected" | "reconnecting";
6
+ connections: Map<string, {
7
+ accounts: readonly string[];
8
+ chainId: number;
9
+ connector: {
10
+ name: string;
11
+ /** Connector ID - for EIP-6963 injected wallets, this is typically the rdns */
12
+ id: string;
13
+ type?: string;
14
+ icon?: string;
15
+ };
16
+ }>;
17
+ current?: string;
18
+ chainId?: number;
19
+ }
20
+ export interface WagmiConfig {
21
+ subscribe: <T>(selector: (state: WagmiState) => T, listener: (selectedState: T, prevSelectedState: T) => void) => () => void;
22
+ getState?: () => WagmiState;
23
+ state?: WagmiState;
24
+ }
25
+ export interface QueryClient {
26
+ getMutationCache: () => MutationCache;
27
+ }
28
+ export interface MutationCache {
29
+ subscribe: (callback: (event: MutationCacheEvent) => void) => () => void;
30
+ }
31
+ export interface MutationCacheEvent {
32
+ type: "added" | "updated" | "removed";
33
+ mutation: {
34
+ mutationId: number;
35
+ options: {
36
+ mutationKey?: readonly string[];
37
+ };
38
+ state: {
39
+ status: "idle" | "pending" | "success" | "error";
40
+ data?: unknown;
41
+ error?: unknown;
42
+ variables?: Record<string, unknown>;
43
+ };
44
+ };
45
+ }
46
+ export type UnsubscribeFn = () => void;
47
+ export interface WagmiTrackingState {
48
+ isProcessing: boolean;
49
+ lastAddress?: string;
50
+ lastChainId?: number;
51
+ lastStatus?: WagmiState["status"];
52
+ }
53
+ export type WagmiMutationKey = "signMessage" | "signTypedData" | "sendTransaction" | "writeContract";
54
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/wagmi/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC;IACrE,WAAW,EAAE,GAAG,CACd,MAAM,EACN;QACE,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;QAC5B,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAC;YACb,+EAA+E;YAC/E,EAAE,EAAE,MAAM,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AC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CACnC;AAED,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Solana address validation utilities
3
+ *
4
+ * Solana uses Base58 encoded 32-byte public keys as addresses.
5
+ * Format: FDKJvWcJNe6wecbgDYDFPCfgs14aJnVsUfWQRYWLn4Tn (32-44 characters)
6
+ *
7
+ * @see https://solana.com/developers/courses/intro-to-solana/interact-with-wallets
8
+ */
9
+ import { SolanaPublicKey } from "./types";
10
+ /**
11
+ * System program addresses and other special Solana addresses
12
+ * These are valid addresses but may not represent user wallets
13
+ */
14
+ export declare const SOLANA_SYSTEM_ADDRESSES: {
15
+ readonly SYSTEM_PROGRAM: "11111111111111111111111111111111";
16
+ readonly TOKEN_PROGRAM: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
17
+ readonly TOKEN_2022_PROGRAM: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
18
+ readonly ASSOCIATED_TOKEN_PROGRAM: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
19
+ readonly RENT_SYSVAR: "SysvarRent111111111111111111111111111111111";
20
+ readonly CLOCK_SYSVAR: "SysvarC1ock11111111111111111111111111111111";
21
+ };
22
+ /**
23
+ * Check if a string is a valid Solana address format
24
+ *
25
+ * Performs format validation only (length and character set). Does not
26
+ * verify that the address is a valid point on the Ed25519 curve.
27
+ */
28
+ export declare function isSolanaAddress(value: unknown): value is string;
29
+ /**
30
+ * Get a valid Solana address from a string or PublicKey
31
+ */
32
+ export declare function getValidSolanaAddress(address: string | SolanaPublicKey | null | undefined): string | null;
33
+ /**
34
+ * Check if a Solana address is a system program or well-known program address
35
+ */
36
+ export declare function isSolanaSystemAddress(address: string): boolean;
37
+ /**
38
+ * Check if a Solana address is blocked (should not emit events).
39
+ * Blocks system program addresses since they don't represent user wallets.
40
+ */
41
+ export declare function isBlockedSolanaAddress(address: string | SolanaPublicKey | null | undefined): boolean;
42
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../../src/solana/address.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAa1C;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;CAO1B,CAAC;AAWX;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAe/D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,GAAG,SAAS,GACnD,MAAM,GAAG,IAAI,CAoBf;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAS9D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,GAAG,SAAS,GACnD,OAAO,CAOT"}
@@ -0,0 +1,3 @@
1
+ export * from "./address";
2
+ export * from "./types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/solana/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}