@arkiv-network/sdk 0.1.0 → 0.1.1-dev.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 (523) hide show
  1. package/dist/accounts/index.cjs +9 -0
  2. package/dist/accounts/index.d.cts +1 -0
  3. package/dist/accounts/index.d.ts +1 -0
  4. package/dist/chains/index.cjs +64 -0
  5. package/dist/chains/index.d.cts +136 -0
  6. package/dist/chains/index.d.cts.map +1 -0
  7. package/dist/chains/index.d.ts +136 -0
  8. package/dist/chains/index.d.ts.map +1 -0
  9. package/dist/chains/index.js +63 -0
  10. package/dist/chains/index.js.map +1 -0
  11. package/dist/consts-BV9DVKgE.cjs +18 -0
  12. package/dist/consts-CHtLBwGd.js +7 -0
  13. package/dist/consts-CHtLBwGd.js.map +1 -0
  14. package/dist/entity-CMRcjXBK.d.ts +41 -0
  15. package/dist/entity-CMRcjXBK.d.ts.map +1 -0
  16. package/dist/entity-Dgf1SSpi.d.cts +41 -0
  17. package/dist/entity-Dgf1SSpi.d.cts.map +1 -0
  18. package/dist/index.cjs +438 -0
  19. package/dist/index.d.cts +498 -0
  20. package/dist/index.d.cts.map +1 -0
  21. package/dist/index.d.ts +498 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +415 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/query/index.cjs +172 -0
  26. package/dist/query/index.d.cts +19 -0
  27. package/dist/query/index.d.cts.map +1 -0
  28. package/dist/query/index.d.ts +19 -0
  29. package/dist/query/index.d.ts.map +1 -0
  30. package/dist/query/index.js +159 -0
  31. package/dist/query/index.js.map +1 -0
  32. package/dist/queryBuilder-BueP5de6.js +341 -0
  33. package/dist/queryBuilder-BueP5de6.js.map +1 -0
  34. package/dist/queryBuilder-D38MYG7o.d.ts +320 -0
  35. package/dist/queryBuilder-D38MYG7o.d.ts.map +1 -0
  36. package/dist/queryBuilder-DU4RQa7H.d.cts +320 -0
  37. package/dist/queryBuilder-DU4RQa7H.d.cts.map +1 -0
  38. package/dist/queryBuilder-n9ocnT4P.cjs +381 -0
  39. package/dist/types/index.cjs +0 -0
  40. package/dist/types/index.d.cts +2 -0
  41. package/dist/types/index.d.ts +2 -0
  42. package/dist/types/index.js +0 -0
  43. package/dist/utils/index.cjs +36 -0
  44. package/dist/utils/index.d.cts +21 -0
  45. package/dist/utils/index.d.cts.map +1 -0
  46. package/dist/utils/index.d.ts +21 -0
  47. package/dist/utils/index.d.ts.map +1 -0
  48. package/dist/utils/index.js +30 -0
  49. package/dist/utils/index.js.map +1 -0
  50. package/package.json +27 -43
  51. package/dist/_cjs/accounts/index.d.ts +0 -2
  52. package/dist/_cjs/accounts/index.d.ts.map +0 -1
  53. package/dist/_cjs/accounts/index.js +0 -18
  54. package/dist/_cjs/accounts/index.js.map +0 -1
  55. package/dist/_cjs/actions/public/buildQuery.d.ts +0 -4
  56. package/dist/_cjs/actions/public/buildQuery.d.ts.map +0 -1
  57. package/dist/_cjs/actions/public/buildQuery.js +0 -8
  58. package/dist/_cjs/actions/public/buildQuery.js.map +0 -1
  59. package/dist/_cjs/actions/public/getBlockTiming.d.ts +0 -12
  60. package/dist/_cjs/actions/public/getBlockTiming.d.ts.map +0 -1
  61. package/dist/_cjs/actions/public/getBlockTiming.js +0 -16
  62. package/dist/_cjs/actions/public/getBlockTiming.js.map +0 -1
  63. package/dist/_cjs/actions/public/getEntity.d.ts +0 -4
  64. package/dist/_cjs/actions/public/getEntity.d.ts.map +0 -1
  65. package/dist/_cjs/actions/public/getEntity.js +0 -17
  66. package/dist/_cjs/actions/public/getEntity.js.map +0 -1
  67. package/dist/_cjs/actions/public/getEntityCount.d.ts +0 -3
  68. package/dist/_cjs/actions/public/getEntityCount.d.ts.map +0 -1
  69. package/dist/_cjs/actions/public/getEntityCount.js +0 -11
  70. package/dist/_cjs/actions/public/getEntityCount.js.map +0 -1
  71. package/dist/_cjs/actions/public/query.d.ts +0 -3
  72. package/dist/_cjs/actions/public/query.d.ts.map +0 -1
  73. package/dist/_cjs/actions/public/query.js +0 -13
  74. package/dist/_cjs/actions/public/query.js.map +0 -1
  75. package/dist/_cjs/actions/public/subscribeEntityEvents.d.ts +0 -96
  76. package/dist/_cjs/actions/public/subscribeEntityEvents.d.ts.map +0 -1
  77. package/dist/_cjs/actions/public/subscribeEntityEvents.js +0 -79
  78. package/dist/_cjs/actions/public/subscribeEntityEvents.js.map +0 -1
  79. package/dist/_cjs/actions/wallet/changeOwnership.d.ts +0 -22
  80. package/dist/_cjs/actions/wallet/changeOwnership.d.ts.map +0 -1
  81. package/dist/_cjs/actions/wallet/changeOwnership.js +0 -15
  82. package/dist/_cjs/actions/wallet/changeOwnership.js.map +0 -1
  83. package/dist/_cjs/actions/wallet/createEntity.d.ts +0 -27
  84. package/dist/_cjs/actions/wallet/createEntity.d.ts.map +0 -1
  85. package/dist/_cjs/actions/wallet/createEntity.js +0 -15
  86. package/dist/_cjs/actions/wallet/createEntity.js.map +0 -1
  87. package/dist/_cjs/actions/wallet/deleteEntity.d.ts +0 -21
  88. package/dist/_cjs/actions/wallet/deleteEntity.d.ts.map +0 -1
  89. package/dist/_cjs/actions/wallet/deleteEntity.js +0 -15
  90. package/dist/_cjs/actions/wallet/deleteEntity.js.map +0 -1
  91. package/dist/_cjs/actions/wallet/extendEntity.d.ts +0 -23
  92. package/dist/_cjs/actions/wallet/extendEntity.d.ts.map +0 -1
  93. package/dist/_cjs/actions/wallet/extendEntity.js +0 -15
  94. package/dist/_cjs/actions/wallet/extendEntity.js.map +0 -1
  95. package/dist/_cjs/actions/wallet/mutateEntities.d.ts +0 -37
  96. package/dist/_cjs/actions/wallet/mutateEntities.d.ts.map +0 -1
  97. package/dist/_cjs/actions/wallet/mutateEntities.js +0 -56
  98. package/dist/_cjs/actions/wallet/mutateEntities.js.map +0 -1
  99. package/dist/_cjs/actions/wallet/updateEntity.d.ts +0 -29
  100. package/dist/_cjs/actions/wallet/updateEntity.d.ts.map +0 -1
  101. package/dist/_cjs/actions/wallet/updateEntity.js +0 -15
  102. package/dist/_cjs/actions/wallet/updateEntity.js.map +0 -1
  103. package/dist/_cjs/chains/index.d.ts +0 -4
  104. package/dist/_cjs/chains/index.d.ts.map +0 -1
  105. package/dist/_cjs/chains/index.js +0 -10
  106. package/dist/_cjs/chains/index.js.map +0 -1
  107. package/dist/_cjs/chains/kaolin.d.ts +0 -42
  108. package/dist/_cjs/chains/kaolin.d.ts.map +0 -1
  109. package/dist/_cjs/chains/kaolin.js +0 -29
  110. package/dist/_cjs/chains/kaolin.js.map +0 -1
  111. package/dist/_cjs/chains/localhost.d.ts +0 -45
  112. package/dist/_cjs/chains/localhost.d.ts.map +0 -1
  113. package/dist/_cjs/chains/localhost.js +0 -17
  114. package/dist/_cjs/chains/localhost.js.map +0 -1
  115. package/dist/_cjs/chains/marketplace.d.ts +0 -42
  116. package/dist/_cjs/chains/marketplace.d.ts.map +0 -1
  117. package/dist/_cjs/chains/marketplace.js +0 -29
  118. package/dist/_cjs/chains/marketplace.js.map +0 -1
  119. package/dist/_cjs/clients/baseClient.d.ts +0 -4
  120. package/dist/_cjs/clients/baseClient.d.ts.map +0 -1
  121. package/dist/_cjs/clients/baseClient.js +0 -3
  122. package/dist/_cjs/clients/baseClient.js.map +0 -1
  123. package/dist/_cjs/clients/createPublicClient.d.ts +0 -25
  124. package/dist/_cjs/clients/createPublicClient.d.ts.map +0 -1
  125. package/dist/_cjs/clients/createPublicClient.js +0 -34
  126. package/dist/_cjs/clients/createPublicClient.js.map +0 -1
  127. package/dist/_cjs/clients/createWalletClient.d.ts +0 -25
  128. package/dist/_cjs/clients/createWalletClient.d.ts.map +0 -1
  129. package/dist/_cjs/clients/createWalletClient.js +0 -39
  130. package/dist/_cjs/clients/createWalletClient.js.map +0 -1
  131. package/dist/_cjs/clients/decorators/arkivPublic.d.ts +0 -134
  132. package/dist/_cjs/clients/decorators/arkivPublic.d.ts.map +0 -1
  133. package/dist/_cjs/clients/decorators/arkivPublic.js +0 -27
  134. package/dist/_cjs/clients/decorators/arkivPublic.js.map +0 -1
  135. package/dist/_cjs/clients/decorators/arkivWallet.d.ts +0 -177
  136. package/dist/_cjs/clients/decorators/arkivWallet.d.ts.map +0 -1
  137. package/dist/_cjs/clients/decorators/arkivWallet.js +0 -20
  138. package/dist/_cjs/clients/decorators/arkivWallet.js.map +0 -1
  139. package/dist/_cjs/consts.d.ts +0 -3
  140. package/dist/_cjs/consts.d.ts.map +0 -1
  141. package/dist/_cjs/consts.js +0 -6
  142. package/dist/_cjs/consts.js.map +0 -1
  143. package/dist/_cjs/index.d.ts +0 -11
  144. package/dist/_cjs/index.d.ts.map +0 -1
  145. package/dist/_cjs/index.js +0 -16
  146. package/dist/_cjs/index.js.map +0 -1
  147. package/dist/_cjs/query/engine.d.ts +0 -18
  148. package/dist/_cjs/query/engine.d.ts.map +0 -1
  149. package/dist/_cjs/query/engine.js +0 -77
  150. package/dist/_cjs/query/engine.js.map +0 -1
  151. package/dist/_cjs/query/errors.d.ts +0 -13
  152. package/dist/_cjs/query/errors.d.ts.map +0 -1
  153. package/dist/_cjs/query/errors.js +0 -28
  154. package/dist/_cjs/query/errors.js.map +0 -1
  155. package/dist/_cjs/query/index.d.ts +0 -5
  156. package/dist/_cjs/query/index.d.ts.map +0 -1
  157. package/dist/_cjs/query/index.js +0 -21
  158. package/dist/_cjs/query/index.js.map +0 -1
  159. package/dist/_cjs/query/predicate.d.ts +0 -111
  160. package/dist/_cjs/query/predicate.d.ts.map +0 -1
  161. package/dist/_cjs/query/predicate.js +0 -130
  162. package/dist/_cjs/query/predicate.js.map +0 -1
  163. package/dist/_cjs/query/queryBuilder.d.ts +0 -132
  164. package/dist/_cjs/query/queryBuilder.d.ts.map +0 -1
  165. package/dist/_cjs/query/queryBuilder.js +0 -194
  166. package/dist/_cjs/query/queryBuilder.js.map +0 -1
  167. package/dist/_cjs/query/queryResult.d.ts +0 -16
  168. package/dist/_cjs/query/queryResult.d.ts.map +0 -1
  169. package/dist/_cjs/query/queryResult.js +0 -51
  170. package/dist/_cjs/query/queryResult.js.map +0 -1
  171. package/dist/_cjs/types/attributes.d.ts +0 -5
  172. package/dist/_cjs/types/attributes.d.ts.map +0 -1
  173. package/dist/_cjs/types/attributes.js +0 -3
  174. package/dist/_cjs/types/attributes.js.map +0 -1
  175. package/dist/_cjs/types/entity.d.ts +0 -15
  176. package/dist/_cjs/types/entity.d.ts.map +0 -1
  177. package/dist/_cjs/types/entity.js +0 -28
  178. package/dist/_cjs/types/entity.js.map +0 -1
  179. package/dist/_cjs/types/events.d.ts +0 -30
  180. package/dist/_cjs/types/events.d.ts.map +0 -1
  181. package/dist/_cjs/types/events.js +0 -3
  182. package/dist/_cjs/types/events.js.map +0 -1
  183. package/dist/_cjs/types/index.d.ts +0 -5
  184. package/dist/_cjs/types/index.d.ts.map +0 -1
  185. package/dist/_cjs/types/index.js +0 -3
  186. package/dist/_cjs/types/index.js.map +0 -1
  187. package/dist/_cjs/types/mimeTypes.d.ts +0 -2
  188. package/dist/_cjs/types/mimeTypes.d.ts.map +0 -1
  189. package/dist/_cjs/types/mimeTypes.js +0 -3
  190. package/dist/_cjs/types/mimeTypes.js.map +0 -1
  191. package/dist/_cjs/types/rpcSchema.d.ts +0 -63
  192. package/dist/_cjs/types/rpcSchema.d.ts.map +0 -1
  193. package/dist/_cjs/types/rpcSchema.js +0 -3
  194. package/dist/_cjs/types/rpcSchema.js.map +0 -1
  195. package/dist/_cjs/types/txParams.d.ts +0 -14
  196. package/dist/_cjs/types/txParams.d.ts.map +0 -1
  197. package/dist/_cjs/types/txParams.js +0 -3
  198. package/dist/_cjs/types/txParams.js.map +0 -1
  199. package/dist/_cjs/utils/arkivTransactions.d.ts +0 -17
  200. package/dist/_cjs/utils/arkivTransactions.d.ts.map +0 -1
  201. package/dist/_cjs/utils/arkivTransactions.js +0 -73
  202. package/dist/_cjs/utils/arkivTransactions.js.map +0 -1
  203. package/dist/_cjs/utils/compression.d.ts +0 -3
  204. package/dist/_cjs/utils/compression.d.ts.map +0 -1
  205. package/dist/_cjs/utils/compression.js +0 -24
  206. package/dist/_cjs/utils/compression.js.map +0 -1
  207. package/dist/_cjs/utils/entities.d.ts +0 -4
  208. package/dist/_cjs/utils/entities.d.ts.map +0 -1
  209. package/dist/_cjs/utils/entities.js +0 -18
  210. package/dist/_cjs/utils/entities.js.map +0 -1
  211. package/dist/_cjs/utils/expirationTime.d.ts +0 -12
  212. package/dist/_cjs/utils/expirationTime.d.ts.map +0 -1
  213. package/dist/_cjs/utils/expirationTime.js +0 -16
  214. package/dist/_cjs/utils/expirationTime.js.map +0 -1
  215. package/dist/_cjs/utils/index.d.ts +0 -4
  216. package/dist/_cjs/utils/index.d.ts.map +0 -1
  217. package/dist/_cjs/utils/index.js +0 -20
  218. package/dist/_cjs/utils/index.js.map +0 -1
  219. package/dist/_cjs/utils/payload.d.ts +0 -3
  220. package/dist/_cjs/utils/payload.d.ts.map +0 -1
  221. package/dist/_cjs/utils/payload.js +0 -12
  222. package/dist/_cjs/utils/payload.js.map +0 -1
  223. package/dist/_esm/accounts/index.d.ts +0 -2
  224. package/dist/_esm/accounts/index.d.ts.map +0 -1
  225. package/dist/_esm/accounts/index.js +0 -2
  226. package/dist/_esm/accounts/index.js.map +0 -1
  227. package/dist/_esm/actions/public/buildQuery.d.ts +0 -4
  228. package/dist/_esm/actions/public/buildQuery.d.ts.map +0 -1
  229. package/dist/_esm/actions/public/buildQuery.js +0 -5
  230. package/dist/_esm/actions/public/buildQuery.js.map +0 -1
  231. package/dist/_esm/actions/public/getBlockTiming.d.ts +0 -12
  232. package/dist/_esm/actions/public/getBlockTiming.d.ts.map +0 -1
  233. package/dist/_esm/actions/public/getBlockTiming.js +0 -13
  234. package/dist/_esm/actions/public/getBlockTiming.js.map +0 -1
  235. package/dist/_esm/actions/public/getEntity.d.ts +0 -4
  236. package/dist/_esm/actions/public/getEntity.d.ts.map +0 -1
  237. package/dist/_esm/actions/public/getEntity.js +0 -14
  238. package/dist/_esm/actions/public/getEntity.js.map +0 -1
  239. package/dist/_esm/actions/public/getEntityCount.d.ts +0 -3
  240. package/dist/_esm/actions/public/getEntityCount.d.ts.map +0 -1
  241. package/dist/_esm/actions/public/getEntityCount.js +0 -8
  242. package/dist/_esm/actions/public/getEntityCount.js.map +0 -1
  243. package/dist/_esm/actions/public/query.d.ts +0 -3
  244. package/dist/_esm/actions/public/query.d.ts.map +0 -1
  245. package/dist/_esm/actions/public/query.js +0 -10
  246. package/dist/_esm/actions/public/query.js.map +0 -1
  247. package/dist/_esm/actions/public/subscribeEntityEvents.d.ts +0 -96
  248. package/dist/_esm/actions/public/subscribeEntityEvents.d.ts.map +0 -1
  249. package/dist/_esm/actions/public/subscribeEntityEvents.js +0 -75
  250. package/dist/_esm/actions/public/subscribeEntityEvents.js.map +0 -1
  251. package/dist/_esm/actions/wallet/changeOwnership.d.ts +0 -22
  252. package/dist/_esm/actions/wallet/changeOwnership.d.ts.map +0 -1
  253. package/dist/_esm/actions/wallet/changeOwnership.js +0 -12
  254. package/dist/_esm/actions/wallet/changeOwnership.js.map +0 -1
  255. package/dist/_esm/actions/wallet/createEntity.d.ts +0 -27
  256. package/dist/_esm/actions/wallet/createEntity.d.ts.map +0 -1
  257. package/dist/_esm/actions/wallet/createEntity.js +0 -12
  258. package/dist/_esm/actions/wallet/createEntity.js.map +0 -1
  259. package/dist/_esm/actions/wallet/deleteEntity.d.ts +0 -21
  260. package/dist/_esm/actions/wallet/deleteEntity.d.ts.map +0 -1
  261. package/dist/_esm/actions/wallet/deleteEntity.js +0 -12
  262. package/dist/_esm/actions/wallet/deleteEntity.js.map +0 -1
  263. package/dist/_esm/actions/wallet/extendEntity.d.ts +0 -23
  264. package/dist/_esm/actions/wallet/extendEntity.d.ts.map +0 -1
  265. package/dist/_esm/actions/wallet/extendEntity.js +0 -12
  266. package/dist/_esm/actions/wallet/extendEntity.js.map +0 -1
  267. package/dist/_esm/actions/wallet/mutateEntities.d.ts +0 -37
  268. package/dist/_esm/actions/wallet/mutateEntities.d.ts.map +0 -1
  269. package/dist/_esm/actions/wallet/mutateEntities.js +0 -53
  270. package/dist/_esm/actions/wallet/mutateEntities.js.map +0 -1
  271. package/dist/_esm/actions/wallet/updateEntity.d.ts +0 -29
  272. package/dist/_esm/actions/wallet/updateEntity.d.ts.map +0 -1
  273. package/dist/_esm/actions/wallet/updateEntity.js +0 -12
  274. package/dist/_esm/actions/wallet/updateEntity.js.map +0 -1
  275. package/dist/_esm/chains/index.d.ts +0 -4
  276. package/dist/_esm/chains/index.d.ts.map +0 -1
  277. package/dist/_esm/chains/index.js +0 -4
  278. package/dist/_esm/chains/index.js.map +0 -1
  279. package/dist/_esm/chains/kaolin.d.ts +0 -42
  280. package/dist/_esm/chains/kaolin.d.ts.map +0 -1
  281. package/dist/_esm/chains/kaolin.js +0 -26
  282. package/dist/_esm/chains/kaolin.js.map +0 -1
  283. package/dist/_esm/chains/localhost.d.ts +0 -45
  284. package/dist/_esm/chains/localhost.d.ts.map +0 -1
  285. package/dist/_esm/chains/localhost.js +0 -14
  286. package/dist/_esm/chains/localhost.js.map +0 -1
  287. package/dist/_esm/chains/marketplace.d.ts +0 -42
  288. package/dist/_esm/chains/marketplace.d.ts.map +0 -1
  289. package/dist/_esm/chains/marketplace.js +0 -26
  290. package/dist/_esm/chains/marketplace.js.map +0 -1
  291. package/dist/_esm/clients/baseClient.d.ts +0 -4
  292. package/dist/_esm/clients/baseClient.d.ts.map +0 -1
  293. package/dist/_esm/clients/baseClient.js +0 -2
  294. package/dist/_esm/clients/baseClient.js.map +0 -1
  295. package/dist/_esm/clients/createPublicClient.d.ts +0 -25
  296. package/dist/_esm/clients/createPublicClient.d.ts.map +0 -1
  297. package/dist/_esm/clients/createPublicClient.js +0 -31
  298. package/dist/_esm/clients/createPublicClient.js.map +0 -1
  299. package/dist/_esm/clients/createWalletClient.d.ts +0 -25
  300. package/dist/_esm/clients/createWalletClient.d.ts.map +0 -1
  301. package/dist/_esm/clients/createWalletClient.js +0 -36
  302. package/dist/_esm/clients/createWalletClient.js.map +0 -1
  303. package/dist/_esm/clients/decorators/arkivPublic.d.ts +0 -134
  304. package/dist/_esm/clients/decorators/arkivPublic.d.ts.map +0 -1
  305. package/dist/_esm/clients/decorators/arkivPublic.js +0 -24
  306. package/dist/_esm/clients/decorators/arkivPublic.js.map +0 -1
  307. package/dist/_esm/clients/decorators/arkivWallet.d.ts +0 -177
  308. package/dist/_esm/clients/decorators/arkivWallet.d.ts.map +0 -1
  309. package/dist/_esm/clients/decorators/arkivWallet.js +0 -17
  310. package/dist/_esm/clients/decorators/arkivWallet.js.map +0 -1
  311. package/dist/_esm/consts.d.ts +0 -3
  312. package/dist/_esm/consts.d.ts.map +0 -1
  313. package/dist/_esm/consts.js +0 -3
  314. package/dist/_esm/consts.js.map +0 -1
  315. package/dist/_esm/index.d.ts +0 -11
  316. package/dist/_esm/index.d.ts.map +0 -1
  317. package/dist/_esm/index.js +0 -6
  318. package/dist/_esm/index.js.map +0 -1
  319. package/dist/_esm/query/engine.d.ts +0 -18
  320. package/dist/_esm/query/engine.d.ts.map +0 -1
  321. package/dist/_esm/query/engine.js +0 -74
  322. package/dist/_esm/query/engine.js.map +0 -1
  323. package/dist/_esm/query/errors.d.ts +0 -13
  324. package/dist/_esm/query/errors.d.ts.map +0 -1
  325. package/dist/_esm/query/errors.js +0 -21
  326. package/dist/_esm/query/errors.js.map +0 -1
  327. package/dist/_esm/query/index.d.ts +0 -5
  328. package/dist/_esm/query/index.d.ts.map +0 -1
  329. package/dist/_esm/query/index.js +0 -5
  330. package/dist/_esm/query/index.js.map +0 -1
  331. package/dist/_esm/query/predicate.d.ts +0 -111
  332. package/dist/_esm/query/predicate.d.ts.map +0 -1
  333. package/dist/_esm/query/predicate.js +0 -119
  334. package/dist/_esm/query/predicate.js.map +0 -1
  335. package/dist/_esm/query/queryBuilder.d.ts +0 -132
  336. package/dist/_esm/query/queryBuilder.d.ts.map +0 -1
  337. package/dist/_esm/query/queryBuilder.js +0 -190
  338. package/dist/_esm/query/queryBuilder.js.map +0 -1
  339. package/dist/_esm/query/queryResult.d.ts +0 -16
  340. package/dist/_esm/query/queryResult.d.ts.map +0 -1
  341. package/dist/_esm/query/queryResult.js +0 -47
  342. package/dist/_esm/query/queryResult.js.map +0 -1
  343. package/dist/_esm/types/attributes.d.ts +0 -5
  344. package/dist/_esm/types/attributes.d.ts.map +0 -1
  345. package/dist/_esm/types/attributes.js +0 -2
  346. package/dist/_esm/types/attributes.js.map +0 -1
  347. package/dist/_esm/types/entity.d.ts +0 -15
  348. package/dist/_esm/types/entity.d.ts.map +0 -1
  349. package/dist/_esm/types/entity.js +0 -24
  350. package/dist/_esm/types/entity.js.map +0 -1
  351. package/dist/_esm/types/events.d.ts +0 -30
  352. package/dist/_esm/types/events.d.ts.map +0 -1
  353. package/dist/_esm/types/events.js +0 -2
  354. package/dist/_esm/types/events.js.map +0 -1
  355. package/dist/_esm/types/index.d.ts +0 -5
  356. package/dist/_esm/types/index.d.ts.map +0 -1
  357. package/dist/_esm/types/index.js +0 -2
  358. package/dist/_esm/types/index.js.map +0 -1
  359. package/dist/_esm/types/mimeTypes.d.ts +0 -2
  360. package/dist/_esm/types/mimeTypes.d.ts.map +0 -1
  361. package/dist/_esm/types/mimeTypes.js +0 -2
  362. package/dist/_esm/types/mimeTypes.js.map +0 -1
  363. package/dist/_esm/types/rpcSchema.d.ts +0 -63
  364. package/dist/_esm/types/rpcSchema.d.ts.map +0 -1
  365. package/dist/_esm/types/rpcSchema.js +0 -2
  366. package/dist/_esm/types/rpcSchema.js.map +0 -1
  367. package/dist/_esm/types/txParams.d.ts +0 -14
  368. package/dist/_esm/types/txParams.d.ts.map +0 -1
  369. package/dist/_esm/types/txParams.js +0 -2
  370. package/dist/_esm/types/txParams.js.map +0 -1
  371. package/dist/_esm/utils/arkivTransactions.d.ts +0 -17
  372. package/dist/_esm/utils/arkivTransactions.d.ts.map +0 -1
  373. package/dist/_esm/utils/arkivTransactions.js +0 -69
  374. package/dist/_esm/utils/arkivTransactions.js.map +0 -1
  375. package/dist/_esm/utils/compression.d.ts +0 -3
  376. package/dist/_esm/utils/compression.d.ts.map +0 -1
  377. package/dist/_esm/utils/compression.js +0 -20
  378. package/dist/_esm/utils/compression.js.map +0 -1
  379. package/dist/_esm/utils/entities.d.ts +0 -4
  380. package/dist/_esm/utils/entities.d.ts.map +0 -1
  381. package/dist/_esm/utils/entities.js +0 -15
  382. package/dist/_esm/utils/entities.js.map +0 -1
  383. package/dist/_esm/utils/expirationTime.d.ts +0 -12
  384. package/dist/_esm/utils/expirationTime.d.ts.map +0 -1
  385. package/dist/_esm/utils/expirationTime.js +0 -13
  386. package/dist/_esm/utils/expirationTime.js.map +0 -1
  387. package/dist/_esm/utils/index.d.ts +0 -4
  388. package/dist/_esm/utils/index.d.ts.map +0 -1
  389. package/dist/_esm/utils/index.js +0 -4
  390. package/dist/_esm/utils/index.js.map +0 -1
  391. package/dist/_esm/utils/payload.d.ts +0 -3
  392. package/dist/_esm/utils/payload.d.ts.map +0 -1
  393. package/dist/_esm/utils/payload.js +0 -8
  394. package/dist/_esm/utils/payload.js.map +0 -1
  395. package/dist/_types/accounts/index.d.ts +0 -2
  396. package/dist/_types/accounts/index.d.ts.map +0 -1
  397. package/dist/_types/actions/public/buildQuery.d.ts +0 -4
  398. package/dist/_types/actions/public/buildQuery.d.ts.map +0 -1
  399. package/dist/_types/actions/public/getBlockTiming.d.ts +0 -12
  400. package/dist/_types/actions/public/getBlockTiming.d.ts.map +0 -1
  401. package/dist/_types/actions/public/getEntity.d.ts +0 -4
  402. package/dist/_types/actions/public/getEntity.d.ts.map +0 -1
  403. package/dist/_types/actions/public/getEntityCount.d.ts +0 -3
  404. package/dist/_types/actions/public/getEntityCount.d.ts.map +0 -1
  405. package/dist/_types/actions/public/query.d.ts +0 -3
  406. package/dist/_types/actions/public/query.d.ts.map +0 -1
  407. package/dist/_types/actions/public/subscribeEntityEvents.d.ts +0 -96
  408. package/dist/_types/actions/public/subscribeEntityEvents.d.ts.map +0 -1
  409. package/dist/_types/actions/wallet/changeOwnership.d.ts +0 -22
  410. package/dist/_types/actions/wallet/changeOwnership.d.ts.map +0 -1
  411. package/dist/_types/actions/wallet/createEntity.d.ts +0 -27
  412. package/dist/_types/actions/wallet/createEntity.d.ts.map +0 -1
  413. package/dist/_types/actions/wallet/deleteEntity.d.ts +0 -21
  414. package/dist/_types/actions/wallet/deleteEntity.d.ts.map +0 -1
  415. package/dist/_types/actions/wallet/extendEntity.d.ts +0 -23
  416. package/dist/_types/actions/wallet/extendEntity.d.ts.map +0 -1
  417. package/dist/_types/actions/wallet/mutateEntities.d.ts +0 -37
  418. package/dist/_types/actions/wallet/mutateEntities.d.ts.map +0 -1
  419. package/dist/_types/actions/wallet/updateEntity.d.ts +0 -29
  420. package/dist/_types/actions/wallet/updateEntity.d.ts.map +0 -1
  421. package/dist/_types/chains/index.d.ts +0 -4
  422. package/dist/_types/chains/index.d.ts.map +0 -1
  423. package/dist/_types/chains/kaolin.d.ts +0 -42
  424. package/dist/_types/chains/kaolin.d.ts.map +0 -1
  425. package/dist/_types/chains/localhost.d.ts +0 -45
  426. package/dist/_types/chains/localhost.d.ts.map +0 -1
  427. package/dist/_types/chains/marketplace.d.ts +0 -42
  428. package/dist/_types/chains/marketplace.d.ts.map +0 -1
  429. package/dist/_types/clients/baseClient.d.ts +0 -4
  430. package/dist/_types/clients/baseClient.d.ts.map +0 -1
  431. package/dist/_types/clients/createPublicClient.d.ts +0 -25
  432. package/dist/_types/clients/createPublicClient.d.ts.map +0 -1
  433. package/dist/_types/clients/createWalletClient.d.ts +0 -25
  434. package/dist/_types/clients/createWalletClient.d.ts.map +0 -1
  435. package/dist/_types/clients/decorators/arkivPublic.d.ts +0 -134
  436. package/dist/_types/clients/decorators/arkivPublic.d.ts.map +0 -1
  437. package/dist/_types/clients/decorators/arkivWallet.d.ts +0 -177
  438. package/dist/_types/clients/decorators/arkivWallet.d.ts.map +0 -1
  439. package/dist/_types/consts.d.ts +0 -3
  440. package/dist/_types/consts.d.ts.map +0 -1
  441. package/dist/_types/index.d.ts +0 -11
  442. package/dist/_types/index.d.ts.map +0 -1
  443. package/dist/_types/query/engine.d.ts +0 -18
  444. package/dist/_types/query/engine.d.ts.map +0 -1
  445. package/dist/_types/query/errors.d.ts +0 -13
  446. package/dist/_types/query/errors.d.ts.map +0 -1
  447. package/dist/_types/query/index.d.ts +0 -5
  448. package/dist/_types/query/index.d.ts.map +0 -1
  449. package/dist/_types/query/predicate.d.ts +0 -111
  450. package/dist/_types/query/predicate.d.ts.map +0 -1
  451. package/dist/_types/query/queryBuilder.d.ts +0 -132
  452. package/dist/_types/query/queryBuilder.d.ts.map +0 -1
  453. package/dist/_types/query/queryResult.d.ts +0 -16
  454. package/dist/_types/query/queryResult.d.ts.map +0 -1
  455. package/dist/_types/types/attributes.d.ts +0 -5
  456. package/dist/_types/types/attributes.d.ts.map +0 -1
  457. package/dist/_types/types/entity.d.ts +0 -15
  458. package/dist/_types/types/entity.d.ts.map +0 -1
  459. package/dist/_types/types/events.d.ts +0 -30
  460. package/dist/_types/types/events.d.ts.map +0 -1
  461. package/dist/_types/types/index.d.ts +0 -5
  462. package/dist/_types/types/index.d.ts.map +0 -1
  463. package/dist/_types/types/mimeTypes.d.ts +0 -2
  464. package/dist/_types/types/mimeTypes.d.ts.map +0 -1
  465. package/dist/_types/types/rpcSchema.d.ts +0 -63
  466. package/dist/_types/types/rpcSchema.d.ts.map +0 -1
  467. package/dist/_types/types/txParams.d.ts +0 -14
  468. package/dist/_types/types/txParams.d.ts.map +0 -1
  469. package/dist/_types/utils/arkivTransactions.d.ts +0 -17
  470. package/dist/_types/utils/arkivTransactions.d.ts.map +0 -1
  471. package/dist/_types/utils/compression.d.ts +0 -3
  472. package/dist/_types/utils/compression.d.ts.map +0 -1
  473. package/dist/_types/utils/entities.d.ts +0 -4
  474. package/dist/_types/utils/entities.d.ts.map +0 -1
  475. package/dist/_types/utils/expirationTime.d.ts +0 -12
  476. package/dist/_types/utils/expirationTime.d.ts.map +0 -1
  477. package/dist/_types/utils/index.d.ts +0 -4
  478. package/dist/_types/utils/index.d.ts.map +0 -1
  479. package/dist/_types/utils/payload.d.ts +0 -3
  480. package/dist/_types/utils/payload.d.ts.map +0 -1
  481. package/src/actions/public/buildQuery.ts +0 -6
  482. package/src/actions/public/getBlockTiming.ts +0 -20
  483. package/src/actions/public/getEntity.ts +0 -18
  484. package/src/actions/public/getEntityCount.ts +0 -10
  485. package/src/actions/public/query.ts +0 -13
  486. package/src/actions/public/subscribeEntityEvents.ts +0 -105
  487. package/src/actions/wallet/changeOwnership.ts +0 -40
  488. package/src/actions/wallet/createEntity.ts +0 -45
  489. package/src/actions/wallet/deleteEntity.ts +0 -39
  490. package/src/actions/wallet/extendEntity.ts +0 -41
  491. package/src/actions/wallet/mutateEntities.ts +0 -100
  492. package/src/actions/wallet/updateEntity.ts +0 -47
  493. package/src/chains/index.ts +0 -3
  494. package/src/chains/kaolin.ts +0 -26
  495. package/src/chains/localhost.ts +0 -14
  496. package/src/chains/marketplace.ts +0 -26
  497. package/src/clients/baseClient.ts +0 -9
  498. package/src/clients/createPublicClient.ts +0 -65
  499. package/src/clients/createWalletClient.ts +0 -70
  500. package/src/clients/decorators/arkivPublic.ts +0 -203
  501. package/src/clients/decorators/arkivWallet.ts +0 -250
  502. package/src/consts.ts +0 -2
  503. package/src/index.ts +0 -21
  504. package/src/query/engine.ts +0 -112
  505. package/src/query/errors.ts +0 -23
  506. package/src/query/index.ts +0 -4
  507. package/src/query/predicate.ts +0 -140
  508. package/src/query/queryBuilder.ts +0 -209
  509. package/src/query/queryResult.ts +0 -61
  510. package/src/types/attributes.ts +0 -4
  511. package/src/types/entity.ts +0 -36
  512. package/src/types/events.ts +0 -34
  513. package/src/types/index.ts +0 -4
  514. package/src/types/mimeTypes.ts +0 -27
  515. package/src/types/rpcSchema.ts +0 -61
  516. package/src/types/txParams.ts +0 -15
  517. package/src/utils/arkivTransactions.ts +0 -100
  518. package/src/utils/compression.ts +0 -21
  519. package/src/utils/entities.ts +0 -23
  520. package/src/utils/expirationTime.ts +0 -13
  521. package/src/utils/index.ts +0 -3
  522. package/src/utils/payload.ts +0 -9
  523. /package/{src/accounts/index.ts → dist/accounts/index.js} +0 -0
@@ -1,26 +0,0 @@
1
- import { defineChain } from "viem"
2
-
3
- export const kaolin = defineChain({
4
- id: 60138453025,
5
- name: "Kaolin",
6
- network: "kaolin",
7
- nativeCurrency: {
8
- name: "Ethereum",
9
- symbol: "ETH",
10
- decimals: 18,
11
- },
12
- rpcUrls: {
13
- default: {
14
- http: ["https://kaolin.hoodi.arkiv.network/rpc"],
15
- webSocket: ["wss://kaolin.hoodi.arkiv.network/rpc/ws"],
16
- },
17
- },
18
- blockExplorers: {
19
- default: {
20
- name: "Kaolin Arkiv Explorer",
21
- url: "https://explorer.kaolin.hoodi.arkiv.network",
22
- apiUrl: "https://explorer.kaolin.hoodi.arkiv.network/api",
23
- },
24
- },
25
- testnet: true,
26
- })
@@ -1,14 +0,0 @@
1
- import { defineChain } from "viem"
2
-
3
- export const localhost = defineChain({
4
- id: 1337,
5
- name: "Localhost",
6
- nativeCurrency: {
7
- decimals: 18,
8
- name: "Ether",
9
- symbol: "ETH",
10
- },
11
- rpcUrls: {
12
- default: { http: ["http://127.0.0.1:8545"] },
13
- },
14
- })
@@ -1,26 +0,0 @@
1
- import { defineChain } from "viem"
2
-
3
- export const marketplace = defineChain({
4
- id: 60138453027,
5
- name: "Marketplace",
6
- network: "marketplace",
7
- nativeCurrency: {
8
- name: "Ethereum",
9
- symbol: "ETH",
10
- decimals: 18,
11
- },
12
- rpcUrls: {
13
- default: {
14
- http: ["https://marketplace.hoodi.arkiv.network/rpc"],
15
- webSocket: ["wss://marketplace.hoodi.arkiv.network/rpc/ws"],
16
- },
17
- },
18
- blockExplorers: {
19
- default: {
20
- name: "Marketplace Arkiv Explorer",
21
- url: "https://explorer.marketplace.hoodi.arkiv.network",
22
- apiUrl: "https://explorer.marketplace.hoodi.arkiv.network/api",
23
- },
24
- },
25
- testnet: true,
26
- })
@@ -1,9 +0,0 @@
1
- import type { Account, Chain, Client, RpcSchema, Transport } from "viem"
2
- import type { ArkivRpcSchema } from "../types/rpcSchema"
3
-
4
- export type ArkivClient<
5
- transport extends Transport = Transport,
6
- chain extends Chain | undefined = Chain | undefined,
7
- accountOrAddress extends Account | undefined = Account | undefined,
8
- rpcSchema extends RpcSchema | undefined = ArkivRpcSchema,
9
- > = Client<transport, chain, accountOrAddress, rpcSchema>
@@ -1,65 +0,0 @@
1
- import type {
2
- Account,
3
- Address,
4
- Chain,
5
- Client,
6
- ParseAccount,
7
- Prettify,
8
- PublicClientConfig,
9
- RpcSchema,
10
- Transport,
11
- } from "viem"
12
- import { createClient, publicActions } from "viem"
13
- import type { ArkivRpcSchema } from "../types/rpcSchema"
14
- import { type PublicArkivActions, publicArkivActions } from "./decorators/arkivPublic"
15
-
16
- export type PublicArkivClient<
17
- transport extends Transport = Transport,
18
- chain extends Chain | undefined = Chain | undefined,
19
- accountOrAddress extends Account | undefined = undefined,
20
- rpcSchema extends RpcSchema | undefined = ArkivRpcSchema,
21
- > = Prettify<
22
- Client<transport, chain, accountOrAddress, rpcSchema, PublicArkivActions<transport, chain>>
23
- >
24
-
25
- /**
26
- * Creates a Public Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).
27
- *
28
- * - Docs: https://docs.golemdb.io/ts-sdk/clients/public
29
- *
30
- * A Public Client is an interface to "public" [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/), [Arkiv JSON-RPC API](https://docs.golemdb.io/json-rpc/), and [Kaolin JSON-RPC API](https://kaolin.holesky.golemdb.io/rpc) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).
31
- *
32
- * @param config - {@link PublicClientConfig}
33
- * @returns A Arkiv Public Client. {@link PublicArkivClient}
34
- *
35
- * @example
36
- * import { createPublicClient, http } from 'arkiv'
37
- * import { kaolin } from 'arkiv/chains'
38
- *
39
- * const client = createPublicClient({
40
- * chain: kaolin,
41
- * transport: http(),
42
- * })
43
- */
44
- export function createPublicClient<
45
- transport extends Transport,
46
- chain extends Chain | undefined = undefined,
47
- accountOrAddress extends Account | Address | undefined = undefined,
48
- rpcSchema extends RpcSchema | undefined = ArkivRpcSchema,
49
- >(
50
- parameters: PublicClientConfig<transport, chain, accountOrAddress, rpcSchema>,
51
- ): PublicArkivClient<transport, chain, ParseAccount<accountOrAddress>, rpcSchema> {
52
- const { key = "public", name = "Public Client" } = parameters
53
- const client = createClient({
54
- ...parameters,
55
- key,
56
- name,
57
- })
58
-
59
- return client.extend(publicArkivActions).extend(publicActions) as unknown as PublicArkivClient<
60
- transport,
61
- chain,
62
- ParseAccount<accountOrAddress>,
63
- rpcSchema
64
- >
65
- }
@@ -1,70 +0,0 @@
1
- import type {
2
- Account,
3
- Address,
4
- Chain,
5
- Client,
6
- ParseAccount,
7
- Prettify,
8
- RpcSchema,
9
- Transport,
10
- WalletClientConfig,
11
- } from "viem"
12
- import { createClient, publicActions, walletActions } from "viem"
13
- import type { ArkivRpcSchema } from "../types/rpcSchema"
14
- import { publicArkivActions } from "./decorators/arkivPublic"
15
- import { type WalletArkivActions, walletArkivActions } from "./decorators/arkivWallet"
16
-
17
- export type WalletArkivClient<
18
- transport extends Transport = Transport,
19
- chain extends Chain | undefined = Chain | undefined,
20
- account extends Account | undefined = Account | undefined,
21
- rpcSchema extends RpcSchema | undefined = ArkivRpcSchema,
22
- > = Prettify<
23
- Client<transport, chain, account, rpcSchema, WalletArkivActions<transport, chain, account>>
24
- >
25
-
26
- /**
27
- * Creates a Public Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).
28
- *
29
- * - Docs: https://docs.golemdb.io/ts-sdk/clients/public
30
- *
31
- * A Public Client is an interface to "public" [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/), [Arkiv JSON-RPC API](https://docs.golemdb.io/json-rpc/), and [Kaolin JSON-RPC API](https://kaolin.holesky.golemdb.io/rpc) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).
32
- *
33
- * @param config - {@link PublicClientConfig}
34
- * @returns A Arkiv Public Client. {@link PublicArkivClient}
35
- *
36
- * @example
37
- * import { createPublicClient, http } from 'arkiv'
38
- * import { kaolin } from 'arkiv/chains'
39
- *
40
- * const client = createPublicClient({
41
- * chain: kaolin,
42
- * transport: http(),
43
- * })
44
- */
45
- export function createWalletClient<
46
- transport extends Transport,
47
- chain extends Chain | undefined = undefined,
48
- accountOrAddress extends Account | Address | undefined = undefined,
49
- rpcSchema extends RpcSchema | undefined = ArkivRpcSchema,
50
- >(
51
- parameters: WalletClientConfig<transport, chain, accountOrAddress, rpcSchema>,
52
- ): WalletArkivClient<transport, chain, ParseAccount<accountOrAddress>, rpcSchema> {
53
- const { key = "wallet", name = "Wallet Client" } = parameters
54
- const client = createClient({
55
- ...parameters,
56
- key,
57
- name,
58
- })
59
-
60
- return client
61
- .extend(walletActions)
62
- .extend(publicActions)
63
- .extend(walletArkivActions)
64
- .extend(publicArkivActions) as unknown as WalletArkivClient<
65
- transport,
66
- chain,
67
- ParseAccount<accountOrAddress>,
68
- rpcSchema
69
- >
70
- }
@@ -1,203 +0,0 @@
1
- import type { Account, Chain, Client, Hex, PublicActions, Transport } from "viem"
2
- import { getBlockTiming } from "../../actions/public/getBlockTiming"
3
- import { getEntity } from "../../actions/public/getEntity"
4
- import { getEntityCount } from "../../actions/public/getEntityCount"
5
- import { query } from "../../actions/public/query"
6
- import { subscribeEntityEvents } from "../../actions/public/subscribeEntityEvents"
7
- import { QueryBuilder } from "../../query/queryBuilder"
8
- import type { Entity } from "../../types/entity"
9
- import type {
10
- OnEntityCreatedEvent,
11
- OnEntityDeletedEvent,
12
- OnEntityExpiredEvent,
13
- OnEntityExpiresInExtendedEvent,
14
- OnEntityUpdatedEvent,
15
- } from "../../types/events"
16
-
17
- export type PublicArkivActions<
18
- transport extends Transport = Transport,
19
- chain extends Chain | undefined = Chain | undefined,
20
- account extends Account | undefined = Account | undefined,
21
- > = Pick<
22
- PublicActions<transport, chain, account>,
23
- | "getBalance"
24
- | "getBlock"
25
- | "getBlockNumber"
26
- | "getChainId"
27
- | "getLogs"
28
- | "getTransaction"
29
- | "getTransactionCount"
30
- | "getTransactionReceipt"
31
- | "waitForTransactionReceipt"
32
- | "watchEvent"
33
- > & {
34
- /**
35
- * Returns the entity with the given key.
36
- *
37
- * - Docs: https://docs.golemdb.io/ts-sdk/actions/public/getEntity
38
- *
39
- * @param args - {entityKey}
40
- * @returns The entity with the given key. {@link Entity}
41
- *
42
- * @example
43
- * import { createPublicClient, http } from 'arkiv'
44
- * import { kaolin } from 'arkiv/chains'
45
- *
46
- * const client = createPublicClient({
47
- * chain: kaolin,
48
- * transport: http(),
49
- * })
50
- * const entity = await client.getEntity("0x123")
51
- * // {
52
- * // key: "0x123",
53
- * // value: "0x123",
54
- * // }
55
- */
56
- getEntity: (key: Hex) => Promise<Entity>
57
-
58
- /**
59
- * Returns a QueryBuilder instance for building and executing queries.
60
- * The QueryBuilder object follows the Builder pattern, allowing you to chain methods to build a query and then execute it.
61
- *
62
- * - Docs: https://docs.golemdb.io/ts-sdk/actions/public/query
63
- *
64
- * @returns A QueryBuilder instance for building and executing queries. {@link QueryBuilder}
65
- *
66
- * @example
67
- * import { createPublicClient, http } from 'arkiv'
68
- * import { kaolin } from 'arkiv/chains'
69
- *
70
- * const client = createPublicClient({
71
- * chain: kaolin,
72
- * transport: http(),
73
- * })
74
- * const query = client.buildQuery()
75
- * const entities = await query.where("key", "=", "value").ownedBy("0x123").fetch()
76
- *
77
- */
78
- buildQuery: () => QueryBuilder
79
-
80
- /**
81
- * Returns a QueryResult instance for fetching the results of a raw query.
82
- * @returns A QueryResult instance for fetching the results of a raw query. {@link QueryResult}
83
- *
84
- * @example
85
- * import { createPublicClient, http } from 'arkiv'
86
- * import { kaolin } from 'arkiv/chains'
87
- *
88
- * const client = createPublicClient({
89
- * chain: kaolin,
90
- * transport: http(),
91
- * })
92
- * const queryResult = client.query('key = value && $owner = 0x123')
93
- *
94
- */
95
- query: (query: string) => Promise<Entity[]>
96
-
97
- /**
98
- * Returns the number of entities in the DBChain.
99
- * @returns The number of entities in the DBChain. {@link number}
100
- *
101
- * @example
102
- * import { createPublicClient, http } from 'arkiv'
103
- * import { kaolin } from 'arkiv/chains'
104
- *
105
- * const client = createPublicClient({
106
- * chain: kaolin,
107
- * transport: http(),
108
- * })
109
- * const entityCount = await client.getEntityCount()
110
- * // entityCount = 0
111
- */
112
- getEntityCount: () => Promise<number>
113
-
114
- /**
115
- * Returns the current block timing.
116
- * @returns The current block timing. {@link GetBlockTimingReturnType}
117
- *
118
- * @example
119
- * import { createPublicClient, http } from 'arkiv'
120
- * import { kaolin } from 'arkiv/chains'
121
- *
122
- * const client = createPublicClient({
123
- * chain: kaolin,
124
- * transport: http(),
125
- * })
126
- * const blockTiming = await client.getBlockTiming()
127
- * // {
128
- * // currentBlock: 10n, // block number
129
- * // currentBlockTime: 1234567890, // block timestamp
130
- * // blockDuration: 2, // in seconds
131
- * // }
132
- */
133
- getBlockTiming: () => Promise<{
134
- currentBlock: bigint
135
- currentBlockTime: number
136
- blockDuration: number
137
- }>
138
-
139
- subscribeEntityEvents: (
140
- {
141
- onError,
142
- onEntityCreated,
143
- onEntityUpdated,
144
- onEntityDeleted,
145
- onEntityExpiresInExtended,
146
- }: {
147
- onError?: (error: Error) => void
148
- onEntityCreated?: (event: OnEntityCreatedEvent) => void
149
- onEntityUpdated?: (event: OnEntityUpdatedEvent) => void
150
- onEntityDeleted?: (event: OnEntityDeletedEvent) => void
151
- onEntityExpired?: (event: OnEntityExpiredEvent) => void
152
- onEntityExpiresInExtended?: (event: OnEntityExpiresInExtendedEvent) => void
153
- },
154
- pollingInterval?: number,
155
- fromBlock?: bigint,
156
- ) => Promise<() => void>
157
- }
158
-
159
- export function publicArkivActions<
160
- transport extends Transport = Transport,
161
- chain extends Chain | undefined = Chain | undefined,
162
- account extends Account | undefined = Account | undefined,
163
- >(client: Client<transport, chain, account>) {
164
- return {
165
- getEntity: (key: Hex) => getEntity(client, key),
166
- query: (rawQuery: string) => query(client, rawQuery),
167
- buildQuery: () => new QueryBuilder(client),
168
- getBlockTiming: () => getBlockTiming(client),
169
- getEntityCount: () => getEntityCount(client),
170
- subscribeEntityEvents: (
171
- {
172
- onError,
173
- onEntityCreated,
174
- onEntityUpdated,
175
- onEntityDeleted,
176
- onEntityExpired,
177
- onEntityExpiresInExtended,
178
- }: {
179
- onError?: (error: Error) => void
180
- onEntityCreated?: (event: OnEntityCreatedEvent) => void
181
- onEntityUpdated?: (event: OnEntityUpdatedEvent) => void
182
- onEntityDeleted?: (event: OnEntityDeletedEvent) => void
183
- onEntityExpired?: (event: OnEntityExpiredEvent) => void
184
- onEntityExpiresInExtended?: (event: OnEntityExpiresInExtendedEvent) => void
185
- },
186
- pollingInterval?: number,
187
- fromBlock?: bigint,
188
- ) =>
189
- subscribeEntityEvents(
190
- client,
191
- {
192
- onError,
193
- onEntityCreated,
194
- onEntityUpdated,
195
- onEntityDeleted,
196
- onEntityExpired,
197
- onEntityExpiresInExtended,
198
- },
199
- pollingInterval,
200
- fromBlock,
201
- ),
202
- }
203
- }
@@ -1,250 +0,0 @@
1
- import type { Account, Chain, Client, Transport, WalletActions } from "viem"
2
- import type {
3
- ChangeOwnershipParameters,
4
- ChangeOwnershipReturnType,
5
- } from "../../actions/wallet/changeOwnership"
6
- import { changeOwnership } from "../../actions/wallet/changeOwnership"
7
- import {
8
- type CreateEntityParameters,
9
- type CreateEntityReturnType,
10
- createEntity,
11
- } from "../../actions/wallet/createEntity"
12
- import type {
13
- DeleteEntityParameters,
14
- DeleteEntityReturnType,
15
- } from "../../actions/wallet/deleteEntity"
16
- import { deleteEntity } from "../../actions/wallet/deleteEntity"
17
- import type {
18
- ExtendEntityParameters,
19
- ExtendEntityReturnType,
20
- } from "../../actions/wallet/extendEntity"
21
- import { extendEntity } from "../../actions/wallet/extendEntity"
22
- import type {
23
- MutateEntitiesParameters,
24
- MutateEntitiesReturnType,
25
- } from "../../actions/wallet/mutateEntities"
26
- import { mutateEntities } from "../../actions/wallet/mutateEntities"
27
- import type {
28
- UpdateEntityParameters,
29
- UpdateEntityReturnType,
30
- } from "../../actions/wallet/updateEntity"
31
- import { updateEntity } from "../../actions/wallet/updateEntity"
32
- import type { Entity, TxParams } from "../../types"
33
- import type { PublicArkivActions } from "./arkivPublic"
34
-
35
- export type WalletArkivActions<
36
- transport extends Transport = Transport,
37
- chain extends Chain | undefined = Chain | undefined,
38
- account extends Account | undefined = Account | undefined,
39
- > = PublicArkivActions<transport, chain, account> &
40
- Pick<
41
- WalletActions<chain, account>,
42
- | "sendTransaction"
43
- | "sendTransactionSync"
44
- | "sendRawTransaction"
45
- | "sendRawTransactionSync"
46
- | "signMessage"
47
- | "signTransaction"
48
- > & {
49
- /**
50
- * Returns the entity with the given key.
51
- *
52
- * - Docs: https://docs.golemdb.io/ts-sdk/actions/public/getEntity
53
- *
54
- * @param args - {entityKey}
55
- * @returns The entity with the given key. {@link Entity}
56
- *
57
- * @example
58
- * import { createPublicClient, http } from 'arkiv'
59
- * import { kaolin } from 'arkiv/chains'
60
- *
61
- * const client = createPublicClient({
62
- * chain: kaolin,
63
- * transport: http(),
64
- * })
65
- * const { entityKey, txHash } = await client.createEntity({
66
- * payload: toBytes(JSON.stringify({ entity: { entityType: "testType", entityId: "testId" } })),
67
- * attributes: [{ key: "testKey", value: "testValue" }],
68
- * expiresIn: 1000,
69
- * })
70
- * console.log("entityKey", entityKey)
71
- * console.log("txHash", txHash)
72
- * // {
73
- * // entityKey: "0x123",
74
- * // txHash: "0x123",
75
- * // }
76
- */
77
- createEntity: (
78
- data: CreateEntityParameters,
79
- txParams?: TxParams,
80
- ) => Promise<CreateEntityReturnType>
81
-
82
- /**
83
- * Updates the entity with the given key.
84
- *
85
- * - Docs: https://docs.golemdb.io/ts-sdk/actions/wallet/updateEntity
86
- * - JSON-RPC Methods: [`golembase_updateEntity`](https://docs.golemdb.io/dev/json-rpc-api/#golembase_updateEntity)
87
- *
88
- * @param args - {entityKey, data}
89
- * @returns The entity with the given key. {@link Entity}
90
- *
91
- * @example
92
- * import { createWalletClient, http } from 'arkiv'
93
- * import { kaolin } from 'arkiv/chains'
94
- *
95
- * const client = createWalletClient({
96
- * chain: kaolin,
97
- * transport: http(),
98
- * })
99
- */
100
- updateEntity: (
101
- data: UpdateEntityParameters,
102
- txParams?: TxParams,
103
- ) => Promise<UpdateEntityReturnType>
104
-
105
- /**
106
- * Deletes the entity with the given key.
107
- *
108
- * - Docs: https://docs.golemdb.io/ts-sdk/actions/wallet/deleteEntity
109
- * - JSON-RPC Methods: [`golembase_deleteEntity`](https://docs.golemdb.io/dev/json-rpc-api/#golembase_deleteEntity)
110
- *
111
- * @param args - {entityKey}
112
- * @returns The entity with the given key. {@link Entity}
113
- *
114
- * @example
115
- * import { createWalletClient, http } from 'arkiv'
116
- * import { kaolin } from 'arkiv/chains'
117
- *
118
- * const client = createWalletClient({
119
- * chain: kaolin,
120
- * transport: http(),
121
- * })
122
- * const { entityKey, txHash } = await client.deleteEntity({ entityKey: "0x123" })
123
- * console.log("entityKey", entityKey)
124
- * console.log("txHash", txHash)
125
- * // {
126
- * // entityKey: "0x123",
127
- * // txHash: "0x123",
128
- * // }
129
- */
130
- deleteEntity: (
131
- data: DeleteEntityParameters,
132
- txParams?: TxParams,
133
- ) => Promise<DeleteEntityReturnType>
134
-
135
- /**
136
- * Extends the entity with the given key.
137
- *
138
- * - Docs: https://docs.golemdb.io/ts-sdk/actions/wallet/extendEntity
139
- * - JSON-RPC Methods: [`golembase_extendEntity`](https://docs.golemdb.io/dev/json-rpc-api/#golembase_extendEntity)
140
- *
141
- * @param args - {entityKey, data}
142
- * @returns The entity with the given key. {@link Entity}
143
- *
144
- * @example
145
- * import { createWalletClient, http } from 'arkiv'
146
- * import { kaolin } from 'arkiv/chains'
147
- *
148
- * const client = createWalletClient({
149
- * chain: kaolin,
150
- * transport: http(),
151
- * })
152
- * const { entityKey, txHash } = await client.extendEntity("0x123", {
153
- * expiresIn: 1000,
154
- * })
155
- * console.log("entityKey", entityKey)
156
- * console.log("txHash", txHash)
157
- * // {
158
- * // entityKey: "0x123",
159
- * // txHash: "0x123",
160
- * // }
161
- */
162
- extendEntity: (
163
- data: ExtendEntityParameters,
164
- txParams?: TxParams,
165
- ) => Promise<ExtendEntityReturnType>
166
-
167
- /**
168
- * Changes the ownership of the entity with the given address.
169
- *
170
- * - Docs: https://docs.golemdb.io/ts-sdk/actions/wallet/changeOwnership
171
- * - JSON-RPC Methods: [`golembase_ownershipChange`](https://docs.golemdb.io/dev/json-rpc-api/#golembase_ownershipChange)
172
- *
173
- * @param args - {entityKey, newOwner}
174
- * @returns The entity with the given address. {@link Entity}
175
- */
176
- changeOwnership: (
177
- data: ChangeOwnershipParameters,
178
- txParams?: TxParams,
179
- ) => Promise<ChangeOwnershipReturnType>
180
-
181
- /**
182
- * Mutates the entities with the given keys.
183
- *
184
- * - Docs: https://docs.golemdb.io/ts-sdk/actions/wallet/mutateEntities
185
- * - JSON-RPC Methods: [`golembase_mutateEntities`](https://docs.golemdb.io/dev/json-rpc-api/#golembase_mutateEntities)
186
- *
187
- * @param args - {data}
188
- * @returns The entity with the given key. {@link Entity}
189
- *
190
- * @example
191
- * import { createWalletClient, http } from 'arkiv'
192
- * import { kaolin } from 'arkiv/chains'
193
- *
194
- * const client = createWalletClient({
195
- * chain: kaolin,
196
- * transport: http(),
197
- * })
198
- * const { entityKey, txHash } = await client.mutateEntities({
199
- * creates: [{
200
- * payload: toBytes(JSON.stringify({ entity: { entityType: "testType", entityId: "testId" } })),
201
- * attriubutes: [{ key: "testKey", value: "testValue" }],
202
- * expiresIn: 1000,
203
- * }],
204
- * updates: [{
205
- * entityKey: "0x123",
206
- * payload: toBytes(JSON.stringify({ entity: { entityType: "testType", entityId: "testId" } })),
207
- * attributes: [{ key: "testKey", value: "testValue" }],
208
- * expiresIn: 1000,
209
- * }],
210
- * deletes: [{
211
- * entityKey: "0x321",
212
- * }],
213
- * extensions: [{
214
- * entityKey: "0x1234",
215
- * expiresIn: 1000,
216
- * }],
217
- * })
218
- * console.log("entityKey", entityKey)
219
- * console.log("txHash", txHash)
220
- * // {
221
- * // entityKey: "0x123",
222
- * // txHash: "0x123",
223
- * // }
224
- */
225
- mutateEntities: (
226
- data: MutateEntitiesParameters,
227
- txParams?: TxParams,
228
- ) => Promise<MutateEntitiesReturnType>
229
- }
230
-
231
- export function walletArkivActions<
232
- transport extends Transport = Transport,
233
- chain extends Chain | undefined = Chain | undefined,
234
- account extends Account | undefined = Account | undefined,
235
- >(client: Client<transport, chain, account>) {
236
- return {
237
- createEntity: (data: CreateEntityParameters, txParams?: TxParams) =>
238
- createEntity(client, data, txParams),
239
- updateEntity: (data: UpdateEntityParameters, txParams?: TxParams) =>
240
- updateEntity(client, data, txParams),
241
- deleteEntity: (data: DeleteEntityParameters, txParams?: TxParams) =>
242
- deleteEntity(client, data, txParams),
243
- extendEntity: (data: ExtendEntityParameters, txParams?: TxParams) =>
244
- extendEntity(client, data, txParams),
245
- changeOwnership: (data: ChangeOwnershipParameters, txParams?: TxParams) =>
246
- changeOwnership(client, data, txParams),
247
- mutateEntities: (data: MutateEntitiesParameters, txParams?: TxParams) =>
248
- mutateEntities(client, data, txParams),
249
- }
250
- }
package/src/consts.ts DELETED
@@ -1,2 +0,0 @@
1
- export const ARKIV_ADDRESS = "0x00000000000000000000000000000061726b6976" as `0x${string}`
2
- export const BLOCK_TIME = 2 // 2 seconds
package/src/index.ts DELETED
@@ -1,21 +0,0 @@
1
- // Export all public APIs
2
-
3
- export type {
4
- Account,
5
- Address,
6
- Chain,
7
- Hex,
8
- PublicClientConfig,
9
- RpcSchema,
10
- Transport,
11
- } from "viem"
12
- // Re-export commonly used viem types for convenience
13
- export { http, toBytes, toHex, toRlp, webSocket } from "viem"
14
- export type { ArkivClient } from "./clients/baseClient"
15
- export type { PublicArkivClient } from "./clients/createPublicClient"
16
- export { createPublicClient } from "./clients/createPublicClient"
17
- export type { WalletArkivClient } from "./clients/createWalletClient"
18
- export { createWalletClient } from "./clients/createWalletClient"
19
- export type { Attribute } from "./types/attributes"
20
- export type { Entity } from "./types/entity"
21
- export type { ArkivRpcSchema } from "./types/rpcSchema"