@formo/analytics-react-native 0.1.6 → 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 (336) hide show
  1. package/README.md +25 -0
  2. package/lib/commonjs/FormoAnalytics.js +84 -80
  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 +7 -3
  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 +131 -41
  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 +75 -109
  23. package/lib/commonjs/lib/installReferrer/index.js.map +1 -1
  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 +30 -30
  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/index.js +2 -2
  41. package/lib/commonjs/types/events.js.map +1 -1
  42. package/lib/commonjs/types/index.js +2 -2
  43. package/lib/commonjs/utils/address.js +2 -2
  44. package/lib/commonjs/utils/hash.js +44 -6
  45. package/lib/commonjs/utils/hash.js.map +1 -1
  46. package/lib/commonjs/utils/index.js +5 -5
  47. package/lib/commonjs/utils/trafficSource.js +16 -16
  48. package/lib/commonjs/utils/trafficSource.js.map +1 -1
  49. package/lib/commonjs/version.js +1 -1
  50. package/lib/module/FormoAnalytics.js +29 -23
  51. package/lib/module/FormoAnalytics.js.map +1 -1
  52. package/lib/module/FormoAnalyticsProvider.js +21 -13
  53. package/lib/module/FormoAnalyticsProvider.js.map +1 -1
  54. package/lib/module/constants/config.js +2 -0
  55. package/lib/module/constants/config.js.map +1 -1
  56. package/lib/module/constants/events.js +6 -0
  57. package/lib/module/constants/events.js.map +1 -1
  58. package/lib/module/constants/index.js +5 -3
  59. package/lib/module/constants/index.js.map +1 -1
  60. package/lib/module/constants/storage.js +8 -2
  61. package/lib/module/constants/storage.js.map +1 -1
  62. package/lib/module/index.js +6 -4
  63. package/lib/module/index.js.map +1 -1
  64. package/lib/module/lib/consent/index.js +4 -2
  65. package/lib/module/lib/consent/index.js.map +1 -1
  66. package/lib/module/lib/event/EventFactory.js +110 -20
  67. package/lib/module/lib/event/EventFactory.js.map +1 -1
  68. package/lib/module/lib/event/EventManager.js +5 -3
  69. package/lib/module/lib/event/EventManager.js.map +1 -1
  70. package/lib/module/lib/event/EventQueue.js +18 -5
  71. package/lib/module/lib/event/EventQueue.js.map +1 -1
  72. package/lib/module/lib/event/index.js +6 -4
  73. package/lib/module/lib/event/index.js.map +1 -1
  74. package/lib/module/lib/event/types.js +2 -0
  75. package/lib/module/lib/installReferrer/index.js +67 -99
  76. package/lib/module/lib/installReferrer/index.js.map +1 -1
  77. package/lib/module/lib/lifecycle/index.js +14 -5
  78. package/lib/module/lib/lifecycle/index.js.map +1 -1
  79. package/lib/module/lib/logger/index.js +2 -0
  80. package/lib/module/lib/logger/index.js.map +1 -1
  81. package/lib/module/lib/session/index.js +5 -3
  82. package/lib/module/lib/session/index.js.map +1 -1
  83. package/lib/module/lib/storage/AsyncStorageAdapter.js +4 -2
  84. package/lib/module/lib/storage/AsyncStorageAdapter.js.map +1 -1
  85. package/lib/module/lib/storage/MemoryStorage.js +3 -1
  86. package/lib/module/lib/storage/MemoryStorage.js.map +1 -1
  87. package/lib/module/lib/storage/StorageBlueprint.js +3 -1
  88. package/lib/module/lib/storage/StorageBlueprint.js.map +1 -1
  89. package/lib/module/lib/storage/StorageManager.js +5 -3
  90. package/lib/module/lib/storage/StorageManager.js.map +1 -1
  91. package/lib/module/lib/storage/index.js +6 -4
  92. package/lib/module/lib/storage/index.js.map +1 -1
  93. package/lib/module/lib/storage/types.js +1 -1
  94. package/lib/module/lib/wagmi/WagmiEventHandler.js +4 -2
  95. package/lib/module/lib/wagmi/WagmiEventHandler.js.map +1 -1
  96. package/lib/module/lib/wagmi/index.js +4 -2
  97. package/lib/module/lib/wagmi/index.js.map +1 -1
  98. package/lib/module/lib/wagmi/types.js +1 -1
  99. package/lib/module/package.json +1 -0
  100. package/lib/module/solana/address.js +2 -0
  101. package/lib/module/solana/address.js.map +1 -1
  102. package/lib/module/solana/index.js +4 -2
  103. package/lib/module/solana/index.js.map +1 -1
  104. package/lib/module/solana/types.js +2 -0
  105. package/lib/module/solana/types.js.map +1 -1
  106. package/lib/module/types/base.js +2 -0
  107. package/lib/module/types/events.js +2 -0
  108. package/lib/module/types/events.js.map +1 -1
  109. package/lib/module/types/index.js +4 -2
  110. package/lib/module/types/index.js.map +1 -1
  111. package/lib/module/utils/address.js +4 -2
  112. package/lib/module/utils/address.js.map +1 -1
  113. package/lib/module/utils/hash.js +46 -6
  114. package/lib/module/utils/hash.js.map +1 -1
  115. package/lib/module/utils/helpers.js +2 -0
  116. package/lib/module/utils/helpers.js.map +1 -1
  117. package/lib/module/utils/index.js +7 -5
  118. package/lib/module/utils/index.js.map +1 -1
  119. package/lib/module/utils/timestamp.js +2 -0
  120. package/lib/module/utils/timestamp.js.map +1 -1
  121. package/lib/module/utils/trafficSource.js +6 -4
  122. package/lib/module/utils/trafficSource.js.map +1 -1
  123. package/lib/module/version.js +3 -1
  124. package/lib/module/version.js.map +1 -1
  125. package/lib/typescript/commonjs/FormoAnalytics.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/FormoAnalyticsProvider.d.ts.map +1 -0
  127. package/lib/typescript/commonjs/constants/config.d.ts.map +1 -0
  128. package/lib/typescript/{constants → commonjs/constants}/events.d.ts +1 -0
  129. package/lib/typescript/commonjs/constants/events.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/constants/index.d.ts.map +1 -0
  131. package/lib/typescript/{constants → commonjs/constants}/storage.d.ts +2 -0
  132. package/lib/typescript/commonjs/constants/storage.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  134. package/lib/typescript/commonjs/lib/consent/index.d.ts.map +1 -0
  135. package/lib/typescript/{lib → commonjs/lib}/event/EventFactory.d.ts +35 -0
  136. package/lib/typescript/commonjs/lib/event/EventFactory.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/lib/event/EventManager.d.ts.map +1 -0
  138. package/lib/typescript/commonjs/lib/event/EventQueue.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/lib/event/index.d.ts.map +1 -0
  140. package/lib/typescript/commonjs/lib/event/types.d.ts.map +1 -0
  141. package/lib/typescript/{lib → commonjs/lib}/installReferrer/index.d.ts +13 -10
  142. package/lib/typescript/commonjs/lib/installReferrer/index.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/lib/lifecycle/index.d.ts.map +1 -0
  144. package/lib/typescript/commonjs/lib/logger/index.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/lib/session/index.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/lib/storage/AsyncStorageAdapter.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/lib/storage/MemoryStorage.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/lib/storage/StorageBlueprint.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/lib/storage/StorageManager.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/lib/storage/index.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/lib/storage/types.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/lib/wagmi/WagmiEventHandler.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/lib/wagmi/index.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/lib/wagmi/types.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/package.json +1 -0
  156. package/lib/typescript/commonjs/solana/address.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/solana/index.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/solana/types.d.ts.map +1 -0
  159. package/lib/typescript/{types → commonjs/types}/base.d.ts +4 -3
  160. package/lib/typescript/commonjs/types/base.d.ts.map +1 -0
  161. package/lib/typescript/{types → commonjs/types}/events.d.ts +1 -0
  162. package/lib/typescript/commonjs/types/events.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/types/index.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/utils/address.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/utils/hash.d.ts +18 -0
  166. package/lib/typescript/commonjs/utils/hash.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/utils/helpers.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/utils/timestamp.d.ts.map +1 -0
  170. package/lib/typescript/{utils → commonjs/utils}/trafficSource.d.ts +1 -1
  171. package/lib/typescript/commonjs/utils/trafficSource.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/version.d.ts +2 -0
  173. package/lib/typescript/commonjs/version.d.ts.map +1 -0
  174. package/lib/typescript/module/FormoAnalytics.d.ts +182 -0
  175. package/lib/typescript/module/FormoAnalytics.d.ts.map +1 -0
  176. package/lib/typescript/module/FormoAnalyticsProvider.d.ts +29 -0
  177. package/lib/typescript/module/FormoAnalyticsProvider.d.ts.map +1 -0
  178. package/lib/typescript/module/constants/config.d.ts +8 -0
  179. package/lib/typescript/module/constants/config.d.ts.map +1 -0
  180. package/lib/typescript/module/constants/events.d.ts +24 -0
  181. package/lib/typescript/module/constants/events.d.ts.map +1 -0
  182. package/lib/typescript/module/constants/index.d.ts +4 -0
  183. package/lib/typescript/module/constants/index.d.ts.map +1 -0
  184. package/lib/typescript/module/constants/storage.d.ts +13 -0
  185. package/lib/typescript/module/constants/storage.d.ts.map +1 -0
  186. package/lib/typescript/module/index.d.ts +44 -0
  187. package/lib/typescript/module/index.d.ts.map +1 -0
  188. package/lib/typescript/module/lib/consent/index.d.ts +13 -0
  189. package/lib/typescript/module/lib/consent/index.d.ts.map +1 -0
  190. package/lib/typescript/module/lib/event/EventFactory.d.ts +99 -0
  191. package/lib/typescript/module/lib/event/EventFactory.d.ts.map +1 -0
  192. package/lib/typescript/module/lib/event/EventManager.d.ts +17 -0
  193. package/lib/typescript/module/lib/event/EventManager.d.ts.map +1 -0
  194. package/lib/typescript/module/lib/event/EventQueue.d.ts +74 -0
  195. package/lib/typescript/module/lib/event/EventQueue.d.ts.map +1 -0
  196. package/lib/typescript/module/lib/event/index.d.ts +5 -0
  197. package/lib/typescript/module/lib/event/index.d.ts.map +1 -0
  198. package/lib/typescript/module/lib/event/types.d.ts +23 -0
  199. package/lib/typescript/module/lib/event/types.d.ts.map +1 -0
  200. package/lib/typescript/module/lib/installReferrer/index.d.ts +39 -0
  201. package/lib/typescript/module/lib/installReferrer/index.d.ts.map +1 -0
  202. package/lib/typescript/module/lib/lifecycle/index.d.ts +46 -0
  203. package/lib/typescript/module/lib/lifecycle/index.d.ts.map +1 -0
  204. package/lib/typescript/module/lib/logger/index.d.ts +19 -0
  205. package/lib/typescript/module/lib/logger/index.d.ts.map +1 -0
  206. package/lib/typescript/module/lib/session/index.d.ts +41 -0
  207. package/lib/typescript/module/lib/session/index.d.ts.map +1 -0
  208. package/lib/typescript/module/lib/storage/AsyncStorageAdapter.d.ts +48 -0
  209. package/lib/typescript/module/lib/storage/AsyncStorageAdapter.d.ts.map +1 -0
  210. package/lib/typescript/module/lib/storage/MemoryStorage.d.ts +18 -0
  211. package/lib/typescript/module/lib/storage/MemoryStorage.d.ts.map +1 -0
  212. package/lib/typescript/module/lib/storage/StorageBlueprint.d.ts +21 -0
  213. package/lib/typescript/module/lib/storage/StorageBlueprint.d.ts.map +1 -0
  214. package/lib/typescript/module/lib/storage/StorageManager.d.ts +45 -0
  215. package/lib/typescript/module/lib/storage/StorageManager.d.ts.map +1 -0
  216. package/lib/typescript/module/lib/storage/index.d.ts +5 -0
  217. package/lib/typescript/module/lib/storage/index.d.ts.map +1 -0
  218. package/lib/typescript/module/lib/storage/types.d.ts +22 -0
  219. package/lib/typescript/module/lib/storage/types.d.ts.map +1 -0
  220. package/lib/typescript/module/lib/wagmi/WagmiEventHandler.d.ts +103 -0
  221. package/lib/typescript/module/lib/wagmi/WagmiEventHandler.d.ts.map +1 -0
  222. package/lib/typescript/module/lib/wagmi/index.d.ts +3 -0
  223. package/lib/typescript/module/lib/wagmi/index.d.ts.map +1 -0
  224. package/lib/typescript/module/lib/wagmi/types.d.ts +54 -0
  225. package/lib/typescript/module/lib/wagmi/types.d.ts.map +1 -0
  226. package/lib/typescript/module/package.json +1 -0
  227. package/lib/typescript/module/solana/address.d.ts +42 -0
  228. package/lib/typescript/module/solana/address.d.ts.map +1 -0
  229. package/lib/typescript/module/solana/index.d.ts +3 -0
  230. package/lib/typescript/module/solana/index.d.ts.map +1 -0
  231. package/lib/typescript/module/solana/types.d.ts +34 -0
  232. package/lib/typescript/module/solana/types.d.ts.map +1 -0
  233. package/lib/typescript/module/types/base.d.ts +258 -0
  234. package/lib/typescript/module/types/base.d.ts.map +1 -0
  235. package/lib/typescript/module/types/events.d.ts +111 -0
  236. package/lib/typescript/module/types/events.d.ts.map +1 -0
  237. package/lib/typescript/module/types/index.d.ts +3 -0
  238. package/lib/typescript/module/types/index.d.ts.map +1 -0
  239. package/lib/typescript/module/utils/address.d.ts +45 -0
  240. package/lib/typescript/module/utils/address.d.ts.map +1 -0
  241. package/lib/typescript/module/utils/hash.d.ts +18 -0
  242. package/lib/typescript/module/utils/hash.d.ts.map +1 -0
  243. package/lib/typescript/module/utils/helpers.d.ts +26 -0
  244. package/lib/typescript/module/utils/helpers.d.ts.map +1 -0
  245. package/lib/typescript/module/utils/index.d.ts +6 -0
  246. package/lib/typescript/module/utils/index.d.ts.map +1 -0
  247. package/lib/typescript/module/utils/timestamp.d.ts +13 -0
  248. package/lib/typescript/module/utils/timestamp.d.ts.map +1 -0
  249. package/lib/typescript/module/utils/trafficSource.d.ts +46 -0
  250. package/lib/typescript/module/utils/trafficSource.d.ts.map +1 -0
  251. package/lib/typescript/module/version.d.ts +2 -0
  252. package/lib/typescript/module/version.d.ts.map +1 -0
  253. package/package.json +44 -49
  254. package/src/FormoAnalytics.ts +18 -12
  255. package/src/constants/events.ts +4 -0
  256. package/src/constants/storage.ts +6 -2
  257. package/src/lib/event/EventFactory.ts +122 -14
  258. package/src/lib/event/EventQueue.ts +14 -0
  259. package/src/lib/installReferrer/index.ts +67 -104
  260. package/src/lib/lifecycle/index.ts +10 -1
  261. package/src/types/base.ts +4 -3
  262. package/src/types/events.ts +1 -0
  263. package/src/utils/hash.ts +51 -6
  264. package/src/utils/trafficSource.ts +1 -1
  265. package/src/version.ts +1 -1
  266. package/lib/typescript/FormoAnalytics.d.ts.map +0 -1
  267. package/lib/typescript/FormoAnalyticsProvider.d.ts.map +0 -1
  268. package/lib/typescript/constants/config.d.ts.map +0 -1
  269. package/lib/typescript/constants/events.d.ts.map +0 -1
  270. package/lib/typescript/constants/index.d.ts.map +0 -1
  271. package/lib/typescript/constants/storage.d.ts.map +0 -1
  272. package/lib/typescript/index.d.ts.map +0 -1
  273. package/lib/typescript/lib/consent/index.d.ts.map +0 -1
  274. package/lib/typescript/lib/event/EventFactory.d.ts.map +0 -1
  275. package/lib/typescript/lib/event/EventManager.d.ts.map +0 -1
  276. package/lib/typescript/lib/event/EventQueue.d.ts.map +0 -1
  277. package/lib/typescript/lib/event/index.d.ts.map +0 -1
  278. package/lib/typescript/lib/event/types.d.ts.map +0 -1
  279. package/lib/typescript/lib/installReferrer/index.d.ts.map +0 -1
  280. package/lib/typescript/lib/lifecycle/index.d.ts.map +0 -1
  281. package/lib/typescript/lib/logger/index.d.ts.map +0 -1
  282. package/lib/typescript/lib/session/index.d.ts.map +0 -1
  283. package/lib/typescript/lib/storage/AsyncStorageAdapter.d.ts.map +0 -1
  284. package/lib/typescript/lib/storage/MemoryStorage.d.ts.map +0 -1
  285. package/lib/typescript/lib/storage/StorageBlueprint.d.ts.map +0 -1
  286. package/lib/typescript/lib/storage/StorageManager.d.ts.map +0 -1
  287. package/lib/typescript/lib/storage/index.d.ts.map +0 -1
  288. package/lib/typescript/lib/storage/types.d.ts.map +0 -1
  289. package/lib/typescript/lib/wagmi/WagmiEventHandler.d.ts.map +0 -1
  290. package/lib/typescript/lib/wagmi/index.d.ts.map +0 -1
  291. package/lib/typescript/lib/wagmi/types.d.ts.map +0 -1
  292. package/lib/typescript/solana/address.d.ts.map +0 -1
  293. package/lib/typescript/solana/index.d.ts.map +0 -1
  294. package/lib/typescript/solana/types.d.ts.map +0 -1
  295. package/lib/typescript/types/base.d.ts.map +0 -1
  296. package/lib/typescript/types/events.d.ts.map +0 -1
  297. package/lib/typescript/types/index.d.ts.map +0 -1
  298. package/lib/typescript/utils/address.d.ts.map +0 -1
  299. package/lib/typescript/utils/hash.d.ts +0 -10
  300. package/lib/typescript/utils/hash.d.ts.map +0 -1
  301. package/lib/typescript/utils/helpers.d.ts.map +0 -1
  302. package/lib/typescript/utils/index.d.ts.map +0 -1
  303. package/lib/typescript/utils/timestamp.d.ts.map +0 -1
  304. package/lib/typescript/utils/trafficSource.d.ts.map +0 -1
  305. package/lib/typescript/version.d.ts +0 -2
  306. package/lib/typescript/version.d.ts.map +0 -1
  307. /package/lib/typescript/{FormoAnalytics.d.ts → commonjs/FormoAnalytics.d.ts} +0 -0
  308. /package/lib/typescript/{FormoAnalyticsProvider.d.ts → commonjs/FormoAnalyticsProvider.d.ts} +0 -0
  309. /package/lib/typescript/{constants → commonjs/constants}/config.d.ts +0 -0
  310. /package/lib/typescript/{constants → commonjs/constants}/index.d.ts +0 -0
  311. /package/lib/typescript/{index.d.ts → commonjs/index.d.ts} +0 -0
  312. /package/lib/typescript/{lib → commonjs/lib}/consent/index.d.ts +0 -0
  313. /package/lib/typescript/{lib → commonjs/lib}/event/EventManager.d.ts +0 -0
  314. /package/lib/typescript/{lib → commonjs/lib}/event/EventQueue.d.ts +0 -0
  315. /package/lib/typescript/{lib → commonjs/lib}/event/index.d.ts +0 -0
  316. /package/lib/typescript/{lib → commonjs/lib}/event/types.d.ts +0 -0
  317. /package/lib/typescript/{lib → commonjs/lib}/lifecycle/index.d.ts +0 -0
  318. /package/lib/typescript/{lib → commonjs/lib}/logger/index.d.ts +0 -0
  319. /package/lib/typescript/{lib → commonjs/lib}/session/index.d.ts +0 -0
  320. /package/lib/typescript/{lib → commonjs/lib}/storage/AsyncStorageAdapter.d.ts +0 -0
  321. /package/lib/typescript/{lib → commonjs/lib}/storage/MemoryStorage.d.ts +0 -0
  322. /package/lib/typescript/{lib → commonjs/lib}/storage/StorageBlueprint.d.ts +0 -0
  323. /package/lib/typescript/{lib → commonjs/lib}/storage/StorageManager.d.ts +0 -0
  324. /package/lib/typescript/{lib → commonjs/lib}/storage/index.d.ts +0 -0
  325. /package/lib/typescript/{lib → commonjs/lib}/storage/types.d.ts +0 -0
  326. /package/lib/typescript/{lib → commonjs/lib}/wagmi/WagmiEventHandler.d.ts +0 -0
  327. /package/lib/typescript/{lib → commonjs/lib}/wagmi/index.d.ts +0 -0
  328. /package/lib/typescript/{lib → commonjs/lib}/wagmi/types.d.ts +0 -0
  329. /package/lib/typescript/{solana → commonjs/solana}/address.d.ts +0 -0
  330. /package/lib/typescript/{solana → commonjs/solana}/index.d.ts +0 -0
  331. /package/lib/typescript/{solana → commonjs/solana}/types.d.ts +0 -0
  332. /package/lib/typescript/{types → commonjs/types}/index.d.ts +0 -0
  333. /package/lib/typescript/{utils → commonjs/utils}/address.d.ts +0 -0
  334. /package/lib/typescript/{utils → commonjs/utils}/helpers.d.ts +0 -0
  335. /package/lib/typescript/{utils → commonjs/utils}/index.d.ts +0 -0
  336. /package/lib/typescript/{utils → commonjs/utils}/timestamp.d.ts +0 -0
@@ -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,CAAC;YACX,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CACF,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,CAAC,CAAC,EACX,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,CAAC,EAClC,QAAQ,EAAE,CAAC,aAAa,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,KAAK,IAAI,KACvD,MAAM,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,UAAU,CAAC;IAC5B,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,MAAM,aAAa,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;CAC1E;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IACtC,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE;YACP,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;SACjC,CAAC;QACF,KAAK,EAAE;YACL,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;YACjD,IAAI,CAAC,EAAE,OAAO,CAAC;YACf,KAAK,CAAC,EAAE,OAAO,CAAC;YAChB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACrC,CAAC;KACH,CAAC;CACH;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,OAAO,CAAC;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"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Solana-specific type definitions
3
+ */
4
+ /**
5
+ * Solana cluster/network types
6
+ * Solana doesn't use chainId like EVM, instead it uses cluster names
7
+ */
8
+ export type SolanaCluster = "mainnet-beta" | "testnet" | "devnet" | "localnet";
9
+ /**
10
+ * Mapping of Solana clusters to numeric chain IDs for consistency with EVM events
11
+ * These IDs are non-standard but provide a way to identify Solana networks in our analytics
12
+ *
13
+ * Using high numbers (900000+) to avoid collision with EVM chain IDs
14
+ */
15
+ export declare const SOLANA_CHAIN_IDS: Record<SolanaCluster, number>;
16
+ /**
17
+ * Default Solana chain ID (mainnet-beta)
18
+ */
19
+ export declare const DEFAULT_SOLANA_CHAIN_ID: number;
20
+ /**
21
+ * Check if a chain ID belongs to a Solana network.
22
+ */
23
+ export declare function isSolanaChainId(chainId: number | undefined | null): boolean;
24
+ /**
25
+ * Solana PublicKey interface
26
+ * Used by address validation utilities.
27
+ */
28
+ export interface SolanaPublicKey {
29
+ toBase58(): string;
30
+ toString(): string;
31
+ toBytes(): Uint8Array;
32
+ equals(other: SolanaPublicKey): boolean;
33
+ }
34
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/solana/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAKjD,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAmC,CAAC;AAExE;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAG3E;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,IAAI,MAAM,CAAC;IACnB,OAAO,IAAI,UAAU,CAAC;IACtB,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;CACzC"}
@@ -0,0 +1,258 @@
1
+ import { ReactNode } from "react";
2
+ import { LogLevel } from "../lib/logger";
3
+ import { IFormoEventContext, IFormoEventProperties, SignatureStatus, TransactionStatus } from "./events";
4
+ export type Nullable<T> = T | null;
5
+ export type ChainID = number;
6
+ export type Address = string;
7
+ export type ValidInputTypes = Uint8Array | bigint | string | number | boolean;
8
+ export interface IFormoAnalytics {
9
+ screen(name: string, category?: string, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
10
+ reset(): void;
11
+ cleanup(): Promise<void>;
12
+ detect(params: {
13
+ rdns: string;
14
+ providerName: string;
15
+ }, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
16
+ connect(params: {
17
+ chainId: ChainID;
18
+ address: Address;
19
+ }, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
20
+ disconnect(params?: {
21
+ chainId?: ChainID;
22
+ address?: Address;
23
+ }, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
24
+ chain(params: {
25
+ chainId: ChainID;
26
+ address?: Address;
27
+ }, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
28
+ signature(params: {
29
+ status: SignatureStatus;
30
+ chainId?: ChainID;
31
+ address: Address;
32
+ message: string;
33
+ }, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
34
+ transaction(params: {
35
+ status: TransactionStatus;
36
+ chainId: ChainID;
37
+ address: Address;
38
+ data?: string;
39
+ to?: string;
40
+ value?: string;
41
+ transactionHash?: string;
42
+ function_name?: string;
43
+ function_args?: Record<string, unknown>;
44
+ }, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
45
+ identify(params: {
46
+ address: Address;
47
+ providerName?: string;
48
+ userId?: string;
49
+ rdns?: string;
50
+ }, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
51
+ track(event: string, properties?: IFormoEventProperties, context?: IFormoEventContext, callback?: (...args: unknown[]) => void): Promise<void>;
52
+ flush(): Promise<void>;
53
+ setTrafficSourceFromUrl(url: string): void;
54
+ optOutTracking(): void;
55
+ optInTracking(): void;
56
+ hasOptedOutTracking(): boolean;
57
+ }
58
+ export interface Config {
59
+ writeKey: string;
60
+ }
61
+ /**
62
+ * Configuration options for controlling tracking exclusions
63
+ */
64
+ export interface TrackingOptions {
65
+ excludeChains?: ChainID[];
66
+ }
67
+ /**
68
+ * Configuration options for controlling wallet event autocapture
69
+ * All events are enabled by default unless explicitly set to false
70
+ */
71
+ export interface AutocaptureOptions {
72
+ /**
73
+ * Track wallet connect events
74
+ * @default true
75
+ */
76
+ connect?: boolean;
77
+ /**
78
+ * Track wallet disconnect events
79
+ * @default true
80
+ */
81
+ disconnect?: boolean;
82
+ /**
83
+ * Track wallet signature events (personal_sign, eth_signTypedData_v4)
84
+ * @default true
85
+ */
86
+ signature?: boolean;
87
+ /**
88
+ * Track wallet transaction events (eth_sendTransaction)
89
+ * @default true
90
+ */
91
+ transaction?: boolean;
92
+ /**
93
+ * Track wallet chain change events
94
+ * @default true
95
+ */
96
+ chain?: boolean;
97
+ /**
98
+ * Track application lifecycle events (installed, updated, opened, backgrounded)
99
+ * @default true
100
+ */
101
+ lifecycle?: boolean;
102
+ }
103
+ /**
104
+ * Configuration options for attribution capture.
105
+ *
106
+ * Attribution is not an event type — it's context enrichment that decorates
107
+ * every tracked event with `utm_*`, `ref`, and `referrer` fields. These
108
+ * options control the SDK's automatic attribution data sources.
109
+ */
110
+ export interface AttributionOptions {
111
+ /**
112
+ * Capture traffic source from deep links via React Native's Linking API.
113
+ * When enabled, the SDK calls Linking.getInitialURL() on init and subscribes
114
+ * to the `url` event, parsing UTM parameters and referral codes into the
115
+ * event context.
116
+ * @default true
117
+ */
118
+ deeplinks?: boolean;
119
+ /**
120
+ * Capture install-time attribution on first launch:
121
+ * - Android: Google Play Install Referrer API (requires react-native-play-install-referrer).
122
+ * Enables web-to-mobile attribution, e.g. referrer=example.com.
123
+ * - iOS: not supported — Apple exposes no install-referrer API, so this is a no-op.
124
+ *
125
+ * Resolved once on first successful fetch and cached; subsequent launches
126
+ * skip the native call. Silently no-ops when the optional native module
127
+ * is not installed.
128
+ * @default true
129
+ */
130
+ installReferrer?: boolean;
131
+ }
132
+ /**
133
+ * Configuration options for Wagmi integration
134
+ * Allows the SDK to hook into Wagmi v2 wallet events
135
+ */
136
+ export interface WagmiOptions {
137
+ /**
138
+ * Wagmi config instance from createConfig()
139
+ * The SDK will subscribe to this config's state changes to track wallet events
140
+ */
141
+ config: any;
142
+ /**
143
+ * Optional QueryClient instance from @tanstack/react-query
144
+ * Required for tracking signature and transaction events via mutation cache
145
+ * If not provided, only connection/disconnection/chain events will be tracked
146
+ */
147
+ queryClient?: any;
148
+ }
149
+ /**
150
+ * App information for context enrichment
151
+ */
152
+ export interface AppInfo {
153
+ /**
154
+ * App name
155
+ */
156
+ name?: string;
157
+ /**
158
+ * App version
159
+ */
160
+ version?: string;
161
+ /**
162
+ * App build number
163
+ */
164
+ build?: string;
165
+ /**
166
+ * Bundle/package identifier
167
+ */
168
+ bundleId?: string;
169
+ }
170
+ /**
171
+ * Configuration options for custom referral query parameter parsing
172
+ */
173
+ export interface ReferralOptions {
174
+ /**
175
+ * Custom query parameter names to check for referral codes
176
+ * These are checked in addition to the defaults: ref, referral, refcode, referrer_code
177
+ */
178
+ queryParams?: string[];
179
+ /**
180
+ * Path pattern for extracting referral codes from URL paths
181
+ */
182
+ pathPattern?: string;
183
+ }
184
+ export interface Options {
185
+ tracking?: boolean | TrackingOptions;
186
+ /**
187
+ * Control wallet event autocapture
188
+ * - `false`: Disable all wallet autocapture
189
+ * - `true`: Enable all wallet events (default)
190
+ * - `AutocaptureOptions`: Granular control over specific events
191
+ * @default true
192
+ */
193
+ autocapture?: boolean | AutocaptureOptions;
194
+ /**
195
+ * Control attribution context capture (deep links and install referrer).
196
+ * Attribution decorates every tracked event with `utm_*`, `ref`, and
197
+ * `referrer` fields — it is not itself an event type.
198
+ * - `false`: Disable all attribution capture
199
+ * - `true`: Enable all attribution sources (default)
200
+ * - `AttributionOptions`: Granular control over specific sources
201
+ * @default true
202
+ */
203
+ attribution?: boolean | AttributionOptions;
204
+ /**
205
+ * Wagmi integration configuration
206
+ * When provided, the SDK will hook into Wagmi's event system
207
+ * @requires wagmi@>=2.0.0
208
+ * @requires @tanstack/react-query@>=5.0.0 (for mutation tracking)
209
+ */
210
+ wagmi?: WagmiOptions;
211
+ /**
212
+ * Custom API host for sending events
213
+ */
214
+ apiHost?: string;
215
+ flushAt?: number;
216
+ flushInterval?: number;
217
+ retryCount?: number;
218
+ maxQueueSize?: number;
219
+ logger?: {
220
+ enabled?: boolean;
221
+ levels?: LogLevel[];
222
+ };
223
+ /**
224
+ * App information for context enrichment
225
+ */
226
+ app?: AppInfo;
227
+ /**
228
+ * Custom referral query parameter configuration
229
+ */
230
+ referral?: ReferralOptions;
231
+ /**
232
+ * Global error handler for SDK errors
233
+ */
234
+ errorHandler?: (err: Error) => void;
235
+ ready?: (formo: IFormoAnalytics) => void;
236
+ }
237
+ export interface FormoAnalyticsProviderProps {
238
+ writeKey: string;
239
+ options?: Options;
240
+ disabled?: boolean;
241
+ /**
242
+ * AsyncStorage instance from @react-native-async-storage/async-storage
243
+ * Required for persistent storage
244
+ */
245
+ asyncStorage?: import("../lib/storage").AsyncStorageInterface;
246
+ /**
247
+ * Callback when SDK is ready
248
+ * Note: Use useCallback to avoid re-initialization on every render
249
+ */
250
+ onReady?: (sdk: IFormoAnalytics) => void;
251
+ /**
252
+ * Callback when SDK initialization fails
253
+ * Note: Use useCallback to avoid re-initialization on every render
254
+ */
255
+ onError?: (error: Error) => void;
256
+ children: ReactNode;
257
+ }
258
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/types/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAEnC,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAG7B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,MA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G;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IACpC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,gBAAgB,EAAE,qBAAqB,CAAC;IAC9D;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,SAAS,CAAC;CACrB"}
@@ -0,0 +1,111 @@
1
+ import { Address, ChainID, Nullable } from "./base";
2
+ import { TEventChannel, TEventType } from "../constants";
3
+ export type AnonymousID = string;
4
+ export interface ICommonProperties {
5
+ anonymous_id: AnonymousID;
6
+ session_id: string;
7
+ user_id: Nullable<string>;
8
+ address: Nullable<string>;
9
+ type: TEventType;
10
+ channel: TEventChannel;
11
+ version: string;
12
+ original_timestamp: string;
13
+ event?: Nullable<string>;
14
+ }
15
+ export type IFormoEventProperties = Record<string, unknown>;
16
+ export type IFormoEventContext = Record<string, unknown>;
17
+ export type UTMParameters = {
18
+ utm_source: string;
19
+ utm_medium: string;
20
+ utm_campaign: string;
21
+ utm_term: string;
22
+ utm_content: string;
23
+ };
24
+ export type ITrafficSource = UTMParameters & {
25
+ ref: string;
26
+ referrer: string;
27
+ };
28
+ export interface IFormoEvent extends ICommonProperties {
29
+ context: Nullable<IFormoEventContext>;
30
+ properties: Nullable<IFormoEventProperties>;
31
+ }
32
+ export type IFormoEventPayload = IFormoEvent & {
33
+ message_id: string;
34
+ };
35
+ export interface ScreenAPIEvent {
36
+ type: "screen";
37
+ name: string;
38
+ category?: string;
39
+ }
40
+ export interface DetectAPIEvent {
41
+ type: "detect";
42
+ providerName: string;
43
+ rdns: string;
44
+ }
45
+ export interface IdentifyAPIEvent {
46
+ type: "identify";
47
+ address: string;
48
+ providerName: string;
49
+ rdns: string;
50
+ userId?: Nullable<string>;
51
+ }
52
+ export interface ChainAPIEvent {
53
+ type: "chain";
54
+ chainId: ChainID;
55
+ address: Address;
56
+ }
57
+ export interface TransactionAPIEvent {
58
+ type: "transaction";
59
+ status: TransactionStatus;
60
+ chainId: ChainID;
61
+ address: Address;
62
+ data?: string;
63
+ to?: string;
64
+ value?: string;
65
+ transactionHash?: string;
66
+ function_name?: string;
67
+ function_args?: Record<string, unknown>;
68
+ }
69
+ export interface SignatureAPIEvent {
70
+ type: "signature";
71
+ status: SignatureStatus;
72
+ chainId?: ChainID;
73
+ address: Address;
74
+ message: string;
75
+ }
76
+ export interface ConnectAPIEvent {
77
+ type: "connect";
78
+ chainId: ChainID;
79
+ address: Address;
80
+ }
81
+ export interface DisconnectAPIEvent {
82
+ type: "disconnect";
83
+ chainId?: ChainID;
84
+ address?: Address;
85
+ }
86
+ export interface TrackAPIEvent {
87
+ type: "track";
88
+ event: string;
89
+ volume?: number;
90
+ revenue?: number;
91
+ currency?: string;
92
+ points?: number;
93
+ }
94
+ export type APIEvent = {
95
+ properties?: IFormoEventProperties;
96
+ context?: IFormoEventContext;
97
+ callback?: (...args: unknown[]) => void;
98
+ } & (ScreenAPIEvent | DetectAPIEvent | IdentifyAPIEvent | ChainAPIEvent | TransactionAPIEvent | SignatureAPIEvent | ConnectAPIEvent | DisconnectAPIEvent | TrackAPIEvent);
99
+ export declare enum SignatureStatus {
100
+ REQUESTED = "requested",
101
+ REJECTED = "rejected",
102
+ CONFIRMED = "confirmed"
103
+ }
104
+ export declare enum TransactionStatus {
105
+ STARTED = "started",
106
+ REJECTED = "rejected",
107
+ BROADCASTED = "broadcasted",
108
+ CONFIRMED = "confirmed",
109
+ REVERTED = "reverted"
110
+ }
111
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,WAAW,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CA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export * from "./events";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Address validation and checksum utilities
3
+ *
4
+ * Supports both EVM and Solana addresses.
5
+ *
6
+ * Uses ethereum-cryptography for proper EIP-55 checksum computation.
7
+ */
8
+ /**
9
+ * Check if a string is a valid Ethereum (EVM) address
10
+ */
11
+ export declare function isValidAddress(address: string): boolean;
12
+ /**
13
+ * Convert address to EIP-55 checksum format
14
+ *
15
+ * Uses keccak256 from ethereum-cryptography for correct checksumming
16
+ * See: https://eips.ethereum.org/EIPS/eip-55
17
+ */
18
+ export declare function toChecksumAddress(address: string): string;
19
+ /**
20
+ * Get a valid (trimmed) EVM address, or null if invalid.
21
+ */
22
+ export declare function getValidAddress(address: string | undefined | null): string | null;
23
+ /**
24
+ * Validates an EVM address and returns it in checksummed format.
25
+ */
26
+ export declare function validateAndChecksumAddress(address: string): string | undefined;
27
+ /**
28
+ * Validates an address for both EVM and Solana chains.
29
+ *
30
+ * For EVM addresses, returns checksummed format.
31
+ * For Solana addresses, returns the Base58 address as-is.
32
+ *
33
+ * When chainId is explicitly provided, validation is strict:
34
+ * - Solana chainId → only Solana validation
35
+ * - Non-Solana chainId → only EVM validation
36
+ *
37
+ * When chainId is omitted, EVM is tried first with Solana fallback.
38
+ */
39
+ export declare function validateAddress(address: string, chainId?: number | null): string | undefined;
40
+ /**
41
+ * Check if an address is in a blocked list.
42
+ * Handles both EVM (zero/dead addresses) and Solana (system program) blocks.
43
+ */
44
+ export declare function isBlockedAddress(address: string): boolean;
45
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../../src/utils/address.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAMvD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoBzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GACjC,MAAM,GAAG,IAAI,CAKf;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAGpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GACtB,MAAM,GAAG,SAAS,CAkBpB;AAWD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAczD"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Generate a SHA-256 hash for event deduplication
3
+ * Returns full 64 hex chars to match web SDK format
4
+ */
5
+ export declare function hash(input: string): Promise<string>;
6
+ /**
7
+ * Generate a UUID v4.
8
+ *
9
+ * Uses a cryptographically secure RNG (Web Crypto), which is present in React
10
+ * Native whenever the app polyfills it via `react-native-get-random-values` —
11
+ * wallet apps using wagmi/viem already do, since those require secure randomness.
12
+ * On a runtime with no Web Crypto at all, derives a unique id from a monotonic
13
+ * counter + timestamp via SHA-256 (no PRNG) so the SDK never throws; that path
14
+ * is not cryptographically random, but it is only ever reached without Web
15
+ * Crypto, and these IDs are analytics identifiers, not security tokens.
16
+ */
17
+ export declare function generateUUID(): string;
18
+ //# sourceMappingURL=hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../../src/utils/hash.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAsB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAIzD;AAeD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,IAAI,MAAM,CA8BrC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Clamp a number between min and max values
3
+ */
4
+ export declare function clampNumber(value: number, max: number, min: number): number;
5
+ /**
6
+ * Check if value is undefined
7
+ */
8
+ export declare function isUndefined(value: unknown): value is undefined;
9
+ /**
10
+ * Convert object keys to snake_case (recursively handles nested objects and arrays)
11
+ * Preserves Date, Map, Set, RegExp, and other built-in objects unchanged
12
+ */
13
+ export declare function toSnakeCase<T extends Record<string, unknown>>(obj: T): T;
14
+ /**
15
+ * Deep merge two objects
16
+ */
17
+ export declare function mergeDeepRight<T extends Record<string, unknown>>(target: T, source: Partial<T>): T;
18
+ /**
19
+ * Get action descriptor for logging
20
+ */
21
+ export declare function getActionDescriptor(type: string, properties?: Record<string, unknown> | null): string;
22
+ /**
23
+ * Check if error is a network error
24
+ */
25
+ export declare function isNetworkError(error: unknown): boolean;
26
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AA6BD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAoBxE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9D,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GACjB,CAAC,CA2BH;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAC1C,MAAM,CAQR;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAiBtD"}
@@ -0,0 +1,6 @@
1
+ export * from "./address";
2
+ export * from "./hash";
3
+ export * from "./timestamp";
4
+ export * from "./helpers";
5
+ export * from "./trafficSource";
6
+ //# sourceMappingURL=index.d.ts.map