@pezkuwi/api-contract 16.5.5 → 16.5.8

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 (373) hide show
  1. package/Abi/index.d.ts +31 -0
  2. package/Abi/index.js +359 -0
  3. package/Abi/toLatestCompatible.d.ts +15 -0
  4. package/Abi/toLatestCompatible.js +30 -0
  5. package/Abi/toV1.d.ts +3 -0
  6. package/Abi/toV1.js +21 -0
  7. package/Abi/toV2.d.ts +3 -0
  8. package/Abi/toV2.js +27 -0
  9. package/Abi/toV3.d.ts +3 -0
  10. package/Abi/toV3.js +10 -0
  11. package/Abi/toV4.d.ts +3 -0
  12. package/Abi/toV4.js +10 -0
  13. package/LICENSE +201 -0
  14. package/README.md +1 -1
  15. package/augment.d.ts +1 -0
  16. package/augment.js +1 -0
  17. package/base/Base.d.ts +13 -0
  18. package/base/Base.js +40 -0
  19. package/base/Blueprint.d.ts +24 -0
  20. package/base/Blueprint.js +51 -0
  21. package/base/Code.d.ts +22 -0
  22. package/base/Code.js +74 -0
  23. package/base/Contract.d.ts +25 -0
  24. package/base/Contract.js +127 -0
  25. package/base/index.d.ts +3 -0
  26. package/base/index.js +3 -0
  27. package/base/mock.d.ts +3 -0
  28. package/base/mock.js +38 -0
  29. package/base/types.d.ts +25 -0
  30. package/base/types.js +1 -0
  31. package/base/util.d.ts +16 -0
  32. package/base/util.js +33 -0
  33. package/build/Abi/index.js +359 -0
  34. package/build/Abi/toLatestCompatible.js +30 -0
  35. package/build/Abi/toV1.js +21 -0
  36. package/build/Abi/toV2.js +27 -0
  37. package/build/Abi/toV3.js +10 -0
  38. package/build/Abi/toV4.js +10 -0
  39. package/build/LICENSE +201 -0
  40. package/build/README.md +3 -0
  41. package/build/augment.js +1 -0
  42. package/build/base/Base.js +40 -0
  43. package/build/base/Blueprint.js +51 -0
  44. package/build/base/Code.js +74 -0
  45. package/build/base/Contract.js +127 -0
  46. package/build/base/index.js +3 -0
  47. package/build/base/mock.js +38 -0
  48. package/build/base/types.js +1 -0
  49. package/build/base/util.d.ts +1 -1
  50. package/build/base/util.js +33 -0
  51. package/build/bundle-pezkuwi-api-contract.js +1238 -0
  52. package/build/bundle.js +4 -0
  53. package/build/cjs/Abi/index.d.ts +31 -0
  54. package/build/cjs/Abi/index.js +363 -0
  55. package/build/cjs/Abi/toLatestCompatible.d.ts +15 -0
  56. package/build/cjs/Abi/toLatestCompatible.js +36 -0
  57. package/build/cjs/Abi/toV1.d.ts +3 -0
  58. package/build/cjs/Abi/toV1.js +24 -0
  59. package/build/cjs/Abi/toV2.d.ts +3 -0
  60. package/build/cjs/Abi/toV2.js +30 -0
  61. package/build/cjs/Abi/toV3.d.ts +3 -0
  62. package/build/cjs/Abi/toV3.js +13 -0
  63. package/build/cjs/Abi/toV4.d.ts +3 -0
  64. package/build/cjs/Abi/toV4.js +13 -0
  65. package/build/cjs/augment.d.ts +1 -0
  66. package/build/cjs/augment.js +3 -0
  67. package/build/cjs/base/Base.d.ts +13 -0
  68. package/build/cjs/base/Base.js +44 -0
  69. package/build/cjs/base/Blueprint.d.ts +24 -0
  70. package/build/cjs/base/Blueprint.js +57 -0
  71. package/build/cjs/base/Code.d.ts +22 -0
  72. package/build/cjs/base/Code.js +80 -0
  73. package/build/cjs/base/Contract.d.ts +25 -0
  74. package/build/cjs/base/Contract.js +133 -0
  75. package/build/cjs/base/index.d.ts +3 -0
  76. package/build/cjs/base/index.js +14 -0
  77. package/build/cjs/base/mock.d.ts +3 -0
  78. package/build/cjs/base/mock.js +41 -0
  79. package/build/cjs/base/types.d.ts +25 -0
  80. package/build/cjs/base/types.js +2 -0
  81. package/build/cjs/base/util.d.ts +16 -0
  82. package/build/cjs/base/util.js +42 -0
  83. package/build/cjs/bundle.d.ts +4 -0
  84. package/build/cjs/bundle.js +10 -0
  85. package/build/cjs/index.d.ts +2 -0
  86. package/build/cjs/index.js +5 -0
  87. package/build/cjs/package.json +3 -0
  88. package/build/cjs/packageDetect.d.ts +1 -0
  89. package/build/cjs/packageDetect.js +7 -0
  90. package/build/cjs/packageInfo.d.ts +6 -0
  91. package/build/cjs/packageInfo.js +4 -0
  92. package/build/cjs/promise/index.d.ts +13 -0
  93. package/build/cjs/promise/index.js +23 -0
  94. package/build/cjs/promise/types.d.ts +3 -0
  95. package/build/cjs/promise/types.js +2 -0
  96. package/build/cjs/rx/index.d.ts +13 -0
  97. package/build/cjs/rx/index.js +23 -0
  98. package/build/cjs/rx/types.d.ts +3 -0
  99. package/build/cjs/rx/types.js +2 -0
  100. package/build/cjs/types.d.ts +79 -0
  101. package/build/cjs/types.js +2 -0
  102. package/build/cjs/util.d.ts +5 -0
  103. package/build/cjs/util.js +13 -0
  104. package/build/index.js +2 -0
  105. package/build/package.json +408 -0
  106. package/build/packageDetect.js +5 -0
  107. package/build/packageInfo.js +1 -0
  108. package/build/promise/index.js +17 -0
  109. package/build/promise/types.js +1 -0
  110. package/build/rx/index.js +17 -0
  111. package/build/rx/types.js +1 -0
  112. package/build/types.js +1 -0
  113. package/build/util.js +10 -0
  114. package/build-deno/Abi/index.ts +475 -0
  115. package/build-deno/Abi/toLatestCompatible.ts +47 -0
  116. package/build-deno/Abi/toV1.ts +33 -0
  117. package/build-deno/Abi/toV2.ts +56 -0
  118. package/build-deno/Abi/toV3.ts +16 -0
  119. package/build-deno/Abi/toV4.ts +19 -0
  120. package/build-deno/README.md +3 -0
  121. package/build-deno/augment.ts +2 -0
  122. package/build-deno/base/Base.ts +50 -0
  123. package/build-deno/base/Blueprint.ts +88 -0
  124. package/build-deno/base/Code.ts +140 -0
  125. package/build-deno/base/Contract.ts +194 -0
  126. package/build-deno/base/index.ts +4 -0
  127. package/build-deno/base/mock.ts +46 -0
  128. package/build-deno/base/types.ts +38 -0
  129. package/build-deno/base/util.ts +54 -0
  130. package/build-deno/bundle.ts +6 -0
  131. package/build-deno/checkTypes.manual.ts +42 -0
  132. package/build-deno/index.ts +4 -0
  133. package/build-deno/mod.ts +2 -0
  134. package/build-deno/packageDetect.ts +9 -0
  135. package/build-deno/packageInfo.ts +3 -0
  136. package/build-deno/promise/index.ts +28 -0
  137. package/build-deno/promise/types.ts +5 -0
  138. package/build-deno/rx/index.ts +28 -0
  139. package/build-deno/rx/types.ts +5 -0
  140. package/build-deno/test/contracts/index.ts +18 -0
  141. package/build-deno/test/contracts/ink/index.ts +11 -0
  142. package/build-deno/test/contracts/ink/v0/accumulator.wasm +0 -0
  143. package/build-deno/test/contracts/ink/v0/adder.wasm +0 -0
  144. package/build-deno/test/contracts/ink/v0/delegator.wasm +0 -0
  145. package/build-deno/test/contracts/ink/v0/dns.wasm +0 -0
  146. package/build-deno/test/contracts/ink/v0/erc20.wasm +0 -0
  147. package/build-deno/test/contracts/ink/v0/erc721.wasm +0 -0
  148. package/build-deno/test/contracts/ink/v0/flipper.wasm +0 -0
  149. package/build-deno/test/contracts/ink/v0/incrementer.wasm +0 -0
  150. package/build-deno/test/contracts/ink/v0/index.ts +9 -0
  151. package/build-deno/test/contracts/ink/v0/multisig_plain.wasm +0 -0
  152. package/build-deno/test/contracts/ink/v0/subber.wasm +0 -0
  153. package/build-deno/test/contracts/ink/v0/trait-flipper.wasm +0 -0
  154. package/build-deno/test/contracts/ink/v1/index.ts +3 -0
  155. package/build-deno/test/contracts/ink/v2/index.ts +3 -0
  156. package/build-deno/test/contracts/ink/v3/index.ts +3 -0
  157. package/build-deno/test/contracts/ink/v4/erc20.wasm +0 -0
  158. package/build-deno/test/contracts/ink/v4/flipper.wasm +0 -0
  159. package/build-deno/test/contracts/ink/v4/index.ts +5 -0
  160. package/build-deno/test/contracts/ink/v5/erc20.wasm +0 -0
  161. package/build-deno/test/contracts/ink/v5/flipper.wasm +0 -0
  162. package/build-deno/test/contracts/ink/v5/index.ts +6 -0
  163. package/build-deno/test/contracts/ink/v6/erc20.polkavm +0 -0
  164. package/build-deno/test/contracts/ink/v6/index.ts +3 -0
  165. package/build-deno/test/contracts/solang/index.ts +5 -0
  166. package/build-deno/test/contracts/solang/v0/index.ts +2 -0
  167. package/build-deno/test/contracts/solang/v0/ints256.sol +13 -0
  168. package/build-deno/test/contracts/solang/v0/ints256.wasm +0 -0
  169. package/build-deno/test/contracts/user/index.ts +7 -0
  170. package/build-deno/test/contracts/user/v0/assetTransfer.wasm +0 -0
  171. package/build-deno/test/contracts/user/v0/enumExample.wasm +0 -0
  172. package/build-deno/test/contracts/user/v0/index.ts +5 -0
  173. package/build-deno/test/contracts/user/v3/index.ts +2 -0
  174. package/build-deno/test/contracts/user/v4/index.ts +2 -0
  175. package/build-deno/test/contracts/util.ts +12 -0
  176. package/build-deno/types.ts +95 -0
  177. package/build-deno/util.ts +18 -0
  178. package/build-tsc/Abi/index.d.ts +31 -0
  179. package/build-tsc/Abi/toLatestCompatible.d.ts +15 -0
  180. package/build-tsc/Abi/toV1.d.ts +3 -0
  181. package/build-tsc/Abi/toV2.d.ts +3 -0
  182. package/build-tsc/Abi/toV3.d.ts +3 -0
  183. package/build-tsc/Abi/toV4.d.ts +3 -0
  184. package/build-tsc/augment.d.ts +1 -0
  185. package/build-tsc/base/Base.d.ts +13 -0
  186. package/build-tsc/base/Blueprint.d.ts +24 -0
  187. package/build-tsc/base/Code.d.ts +22 -0
  188. package/build-tsc/base/Contract.d.ts +25 -0
  189. package/build-tsc/base/index.d.ts +3 -0
  190. package/build-tsc/base/mock.d.ts +3 -0
  191. package/build-tsc/base/types.d.ts +25 -0
  192. package/build-tsc/base/util.d.ts +16 -0
  193. package/build-tsc/bundle.d.ts +4 -0
  194. package/build-tsc/index.d.ts +2 -0
  195. package/build-tsc/packageDetect.d.ts +1 -0
  196. package/build-tsc/packageInfo.d.ts +6 -0
  197. package/build-tsc/promise/index.d.ts +13 -0
  198. package/build-tsc/promise/types.d.ts +3 -0
  199. package/build-tsc/rx/index.d.ts +13 -0
  200. package/build-tsc/rx/types.d.ts +3 -0
  201. package/build-tsc/types.d.ts +79 -0
  202. package/build-tsc/util.d.ts +5 -0
  203. package/build-tsc-cjs/Abi/index.js +363 -0
  204. package/build-tsc-cjs/Abi/toLatestCompatible.js +36 -0
  205. package/build-tsc-cjs/Abi/toV1.js +24 -0
  206. package/build-tsc-cjs/Abi/toV2.js +30 -0
  207. package/build-tsc-cjs/Abi/toV3.js +13 -0
  208. package/build-tsc-cjs/Abi/toV4.js +13 -0
  209. package/build-tsc-cjs/augment.js +3 -0
  210. package/build-tsc-cjs/base/Base.js +44 -0
  211. package/build-tsc-cjs/base/Blueprint.js +57 -0
  212. package/build-tsc-cjs/base/Code.js +80 -0
  213. package/build-tsc-cjs/base/Contract.js +133 -0
  214. package/build-tsc-cjs/base/index.js +14 -0
  215. package/build-tsc-cjs/base/mock.js +41 -0
  216. package/build-tsc-cjs/base/types.js +2 -0
  217. package/build-tsc-cjs/base/util.js +42 -0
  218. package/build-tsc-cjs/bundle.js +10 -0
  219. package/build-tsc-cjs/index.js +5 -0
  220. package/build-tsc-cjs/packageDetect.js +7 -0
  221. package/build-tsc-cjs/packageInfo.js +4 -0
  222. package/build-tsc-cjs/promise/index.js +23 -0
  223. package/build-tsc-cjs/promise/types.js +2 -0
  224. package/build-tsc-cjs/rx/index.js +23 -0
  225. package/build-tsc-cjs/rx/types.js +2 -0
  226. package/build-tsc-cjs/types.js +2 -0
  227. package/build-tsc-cjs/util.js +13 -0
  228. package/build-tsc-esm/Abi/index.js +359 -0
  229. package/build-tsc-esm/Abi/toLatestCompatible.js +30 -0
  230. package/build-tsc-esm/Abi/toV1.js +21 -0
  231. package/build-tsc-esm/Abi/toV2.js +27 -0
  232. package/build-tsc-esm/Abi/toV3.js +10 -0
  233. package/build-tsc-esm/Abi/toV4.js +10 -0
  234. package/build-tsc-esm/augment.js +1 -0
  235. package/build-tsc-esm/base/Base.js +40 -0
  236. package/build-tsc-esm/base/Blueprint.js +51 -0
  237. package/build-tsc-esm/base/Code.js +74 -0
  238. package/build-tsc-esm/base/Contract.js +127 -0
  239. package/build-tsc-esm/base/index.js +3 -0
  240. package/build-tsc-esm/base/mock.js +38 -0
  241. package/build-tsc-esm/base/types.js +1 -0
  242. package/build-tsc-esm/base/util.js +33 -0
  243. package/build-tsc-esm/bundle.js +4 -0
  244. package/build-tsc-esm/index.js +2 -0
  245. package/build-tsc-esm/packageDetect.js +5 -0
  246. package/build-tsc-esm/packageInfo.js +1 -0
  247. package/build-tsc-esm/promise/index.js +17 -0
  248. package/build-tsc-esm/promise/types.js +1 -0
  249. package/build-tsc-esm/rx/index.js +17 -0
  250. package/build-tsc-esm/rx/types.js +1 -0
  251. package/build-tsc-esm/types.js +1 -0
  252. package/build-tsc-esm/util.js +10 -0
  253. package/bundle-pezkuwi-api-contract.js +1238 -0
  254. package/bundle.d.ts +4 -0
  255. package/bundle.js +4 -0
  256. package/cjs/Abi/index.d.ts +31 -0
  257. package/cjs/Abi/index.js +363 -0
  258. package/cjs/Abi/toLatestCompatible.d.ts +15 -0
  259. package/cjs/Abi/toLatestCompatible.js +36 -0
  260. package/cjs/Abi/toV1.d.ts +3 -0
  261. package/cjs/Abi/toV1.js +24 -0
  262. package/cjs/Abi/toV2.d.ts +3 -0
  263. package/cjs/Abi/toV2.js +30 -0
  264. package/cjs/Abi/toV3.d.ts +3 -0
  265. package/cjs/Abi/toV3.js +13 -0
  266. package/cjs/Abi/toV4.d.ts +3 -0
  267. package/cjs/Abi/toV4.js +13 -0
  268. package/cjs/augment.d.ts +1 -0
  269. package/cjs/augment.js +3 -0
  270. package/cjs/base/Base.d.ts +13 -0
  271. package/cjs/base/Base.js +44 -0
  272. package/cjs/base/Blueprint.d.ts +24 -0
  273. package/cjs/base/Blueprint.js +57 -0
  274. package/cjs/base/Code.d.ts +22 -0
  275. package/cjs/base/Code.js +80 -0
  276. package/cjs/base/Contract.d.ts +25 -0
  277. package/cjs/base/Contract.js +133 -0
  278. package/cjs/base/index.d.ts +3 -0
  279. package/cjs/base/index.js +14 -0
  280. package/cjs/base/mock.d.ts +3 -0
  281. package/cjs/base/mock.js +41 -0
  282. package/cjs/base/types.d.ts +25 -0
  283. package/cjs/base/types.js +2 -0
  284. package/cjs/base/util.d.ts +16 -0
  285. package/cjs/base/util.js +42 -0
  286. package/cjs/bundle.d.ts +4 -0
  287. package/cjs/bundle.js +10 -0
  288. package/cjs/index.d.ts +2 -0
  289. package/cjs/index.js +5 -0
  290. package/cjs/package.json +3 -0
  291. package/cjs/packageDetect.d.ts +1 -0
  292. package/cjs/packageDetect.js +7 -0
  293. package/cjs/packageInfo.d.ts +6 -0
  294. package/cjs/packageInfo.js +4 -0
  295. package/cjs/promise/index.d.ts +13 -0
  296. package/cjs/promise/index.js +23 -0
  297. package/cjs/promise/types.d.ts +3 -0
  298. package/cjs/promise/types.js +2 -0
  299. package/cjs/rx/index.d.ts +13 -0
  300. package/cjs/rx/index.js +23 -0
  301. package/cjs/rx/types.d.ts +3 -0
  302. package/cjs/rx/types.js +2 -0
  303. package/cjs/types.d.ts +79 -0
  304. package/cjs/types.js +2 -0
  305. package/cjs/util.d.ts +5 -0
  306. package/cjs/util.js +13 -0
  307. package/index.d.ts +2 -0
  308. package/index.js +2 -0
  309. package/package.json +384 -15
  310. package/packageDetect.d.ts +1 -0
  311. package/packageDetect.js +5 -0
  312. package/packageInfo.d.ts +6 -0
  313. package/packageInfo.js +1 -0
  314. package/promise/index.d.ts +13 -0
  315. package/promise/index.js +17 -0
  316. package/promise/types.d.ts +3 -0
  317. package/promise/types.js +1 -0
  318. package/rx/index.d.ts +13 -0
  319. package/rx/index.js +17 -0
  320. package/rx/types.d.ts +3 -0
  321. package/rx/types.js +1 -0
  322. package/src/Abi/Abi.spec.ts +2 -2
  323. package/src/Abi/index.ts +1 -1
  324. package/src/Abi/toLatestCompatible.spec.ts +1 -1
  325. package/src/Abi/toLatestCompatible.ts +1 -1
  326. package/src/Abi/toV1.ts +1 -1
  327. package/src/Abi/toV2.ts +1 -1
  328. package/src/Abi/toV3.ts +1 -1
  329. package/src/Abi/toV4.ts +1 -1
  330. package/src/augment.ts +1 -1
  331. package/src/base/Base.ts +1 -1
  332. package/src/base/Blueprint.ts +1 -1
  333. package/src/base/Code.spec.ts +1 -1
  334. package/src/base/Code.ts +1 -1
  335. package/src/base/Contract.ts +1 -1
  336. package/src/base/index.ts +1 -1
  337. package/src/base/mock.ts +1 -1
  338. package/src/base/types.ts +1 -1
  339. package/src/base/util.ts +1 -1
  340. package/src/bundle.ts +1 -1
  341. package/src/checkTypes.manual.ts +4 -4
  342. package/src/index.ts +1 -1
  343. package/src/mod.ts +1 -1
  344. package/src/packageDetect.ts +2 -2
  345. package/src/packageInfo.ts +3 -3
  346. package/src/promise/index.ts +1 -1
  347. package/src/promise/types.ts +1 -1
  348. package/src/rx/index.ts +1 -1
  349. package/src/rx/types.ts +1 -1
  350. package/src/test/contracts/index.ts +1 -1
  351. package/src/test/contracts/ink/index.ts +1 -1
  352. package/src/test/contracts/ink/v0/index.ts +1 -1
  353. package/src/test/contracts/ink/v1/index.ts +1 -1
  354. package/src/test/contracts/ink/v2/index.ts +1 -1
  355. package/src/test/contracts/ink/v3/index.ts +1 -1
  356. package/src/test/contracts/ink/v4/index.ts +1 -1
  357. package/src/test/contracts/ink/v5/index.ts +1 -1
  358. package/src/test/contracts/ink/v6/index.ts +1 -1
  359. package/src/test/contracts/solang/index.ts +1 -1
  360. package/src/test/contracts/solang/v0/index.ts +1 -1
  361. package/src/test/contracts/user/index.ts +1 -1
  362. package/src/test/contracts/user/v0/index.ts +1 -1
  363. package/src/test/contracts/user/v3/index.ts +1 -1
  364. package/src/test/contracts/user/v4/index.ts +1 -1
  365. package/src/test/contracts/util.ts +1 -1
  366. package/src/types.ts +1 -1
  367. package/src/util.ts +1 -1
  368. package/tsconfig.build.tsbuildinfo +1 -1
  369. package/tsconfig.spec.tsbuildinfo +1 -0
  370. package/types.d.ts +79 -0
  371. package/types.js +1 -0
  372. package/util.d.ts +5 -0
  373. package/util.js +10 -0
@@ -0,0 +1,2 @@
1
+
2
+ export * from './index.ts';
@@ -0,0 +1,9 @@
1
+
2
+
3
+ import { packageInfo as apiInfo } from 'https://deno.land/x/pezkuwi/api/packageInfo.ts';
4
+ import { packageInfo as typesInfo } from 'https://deno.land/x/pezkuwi/types/packageInfo.ts';
5
+ import { detectPackage } from 'https://deno.land/x/pezkuwi/util/mod.ts';
6
+
7
+ import { packageInfo } from './packageInfo.ts';
8
+
9
+ detectPackage(packageInfo, null, [apiInfo, typesInfo]);
@@ -0,0 +1,3 @@
1
+
2
+
3
+ export const packageInfo = { name: '@pezkuwi/api-contract', path: new URL(import.meta.url).pathname, type: 'deno', version: '16.5.8' };
@@ -0,0 +1,28 @@
1
+ import { Buffer } from 'node:buffer';
2
+
3
+
4
+ import type { ApiPromise } from 'https://deno.land/x/pezkuwi/api/mod.ts';
5
+ import type { AccountId, AccountId20, Hash } from 'https://deno.land/x/pezkuwi/types/interfaces/index.ts';
6
+ import type { Abi } from '../Abi/index.ts';
7
+
8
+ import { toPromiseMethod } from 'https://deno.land/x/pezkuwi/api/mod.ts';
9
+
10
+ import { Blueprint, Code, Contract } from '../base/index.ts';
11
+
12
+ export class BlueprintPromise extends Blueprint<'promise'> {
13
+ constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
14
+ super(api, abi, codeHash, toPromiseMethod);
15
+ }
16
+ }
17
+
18
+ export class CodePromise extends Code<'promise'> {
19
+ constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
20
+ super(api, abi, wasm, toPromiseMethod);
21
+ }
22
+ }
23
+
24
+ export class ContractPromise extends Contract<'promise'> {
25
+ constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, address: string | AccountId | AccountId20) {
26
+ super(api, abi, address, toPromiseMethod);
27
+ }
28
+ }
@@ -0,0 +1,5 @@
1
+
2
+ import type { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base/index.ts';
3
+
4
+ export type BlueprintSubmittableResult = BaseBlueprintSubmittableResult<'promise'>;
5
+ export type CodeSubmittableResult = BaseCodeSubmittableResult<'promise'>;
@@ -0,0 +1,28 @@
1
+ import { Buffer } from 'node:buffer';
2
+
3
+
4
+ import type { ApiRx } from 'https://deno.land/x/pezkuwi/api/mod.ts';
5
+ import type { AccountId, Hash } from 'https://deno.land/x/pezkuwi/types/interfaces/index.ts';
6
+ import type { Abi } from '../Abi/index.ts';
7
+
8
+ import { toRxMethod } from 'https://deno.land/x/pezkuwi/api/mod.ts';
9
+
10
+ import { Blueprint, Code, Contract } from '../base/index.ts';
11
+
12
+ export class BlueprintRx extends Blueprint<'rxjs'> {
13
+ constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
14
+ super(api, abi, codeHash, toRxMethod);
15
+ }
16
+ }
17
+
18
+ export class CodeRx extends Code<'rxjs'> {
19
+ constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
20
+ super(api, abi, wasm, toRxMethod);
21
+ }
22
+ }
23
+
24
+ export class ContractRx extends Contract<'rxjs'> {
25
+ constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, address: string | AccountId) {
26
+ super(api, abi, address, toRxMethod);
27
+ }
28
+ }
@@ -0,0 +1,5 @@
1
+
2
+ import type { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base/index.ts';
3
+
4
+ export type BlueprintSubmittableResult = BaseBlueprintSubmittableResult<'promise'>;
5
+ export type CodeSubmittableResult = BaseCodeSubmittableResult<'promise'>;
@@ -0,0 +1,18 @@
1
+
2
+ import ink from './ink/index.ts';
3
+ import solang from './solang/index.ts';
4
+ import user from './user/index.ts';
5
+
6
+ const all: Record<string, Record<string, unknown>> = {};
7
+
8
+ Object
9
+ .entries({ ink, solang, user })
10
+ .forEach(([type, abis]) =>
11
+ Object
12
+ .entries(abis)
13
+ .forEach(([name, abi]): void => {
14
+ all[`${type}_${name}`] = abi;
15
+ })
16
+ );
17
+
18
+ export default all;
@@ -0,0 +1,11 @@
1
+
2
+ import { createVersionedExport } from '../util.ts';
3
+ import * as v0 from './v0/index.ts';
4
+ import * as v1 from './v1/index.ts';
5
+ import * as v2 from './v2/index.ts';
6
+ import * as v3 from './v3/index.ts';
7
+ import * as v4 from './v4/index.ts';
8
+ import * as v5 from './v5/index.ts';
9
+ import * as v6 from './v6/index.ts';
10
+
11
+ export default createVersionedExport({ v0, v1, v2, v3, v4, v5, v6 });
@@ -0,0 +1,9 @@
1
+
2
+ export { default as delegator } from './delegator.json' assert { type: 'json' };
3
+ export { default as dns } from './dns.json' assert { type: 'json' };
4
+ export { default as erc20 } from './erc20.json' assert { type: 'json' };
5
+ export { default as erc721 } from './erc721.json' assert { type: 'json' };
6
+ export { default as flipperBundle } from './flipper.contract.json' assert { type: 'json' };
7
+ export { default as flipper } from './flipper.json' assert { type: 'json' };
8
+ export { default as incrementer } from './incrementer.json' assert { type: 'json' };
9
+ export { default as multisigPlain } from './multisig_plain.json' assert { type: 'json' };
@@ -0,0 +1,3 @@
1
+
2
+ export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
3
+ export { default as psp22 } from './psp22_minter_pauser.contract.json' assert { type: 'json' };
@@ -0,0 +1,3 @@
1
+
2
+ export { default as erc20 } from './erc20.contract.json' assert { type: 'json' };
3
+ export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
@@ -0,0 +1,3 @@
1
+
2
+ export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
3
+ export { default as traitErc20 } from './trait_erc20.contract.json' assert { type: 'json' };
@@ -0,0 +1,5 @@
1
+
2
+ export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
3
+ export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
4
+ export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
5
+ export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
@@ -0,0 +1,6 @@
1
+
2
+ export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
3
+ export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
4
+ export { default as erc20AnonymousTransferMetadata } from './erc20_anonymous_transfer.json' assert { type: 'json' };
5
+ export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
6
+ export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
@@ -0,0 +1,3 @@
1
+
2
+ export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
3
+ export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
@@ -0,0 +1,5 @@
1
+
2
+ import { createVersionedExport } from '../util.ts';
3
+ import * as v0 from './v0/index.ts';
4
+
5
+ export default createVersionedExport({ v0 });
@@ -0,0 +1,2 @@
1
+
2
+ export { default as ints256 } from './ints256.json' assert { type: 'json' };
@@ -0,0 +1,13 @@
1
+ /// @title Test 256 bits types
2
+ /// @author Sean Young <sean@mess.org>
3
+ contract ints256 {
4
+ /// Multiply two 256 bit values
5
+ function multiply(uint256 a, uint256 b) public pure returns (uint256) {
6
+ return a * b;
7
+ }
8
+
9
+ /// Add two 256 bit values
10
+ function add(uint256 a, uint256 b) public pure returns (uint256) {
11
+ return a + b;
12
+ }
13
+ }
@@ -0,0 +1,7 @@
1
+
2
+ import { createVersionedExport } from '../util.ts';
3
+ import * as v0 from './v0/index.ts';
4
+ import * as v3 from './v3/index.ts';
5
+ import * as v4 from './v4/index.ts';
6
+
7
+ export default createVersionedExport({ v0, v3, v4 });
@@ -0,0 +1,5 @@
1
+
2
+ export { default as assetTransfer } from './assetTransfer.json' assert { type: 'json' };
3
+ export { default as enumExample } from './enumExample.json' assert { type: 'json' };
4
+ export { default as recursive } from './recursive.contract.json' assert { type: 'json' };
5
+ export { default as withString } from './withString.json' assert { type: 'json' };
@@ -0,0 +1,2 @@
1
+
2
+ export { default as ask } from './ask.json' assert { type: 'json' };
@@ -0,0 +1,2 @@
1
+
2
+ export { default as events } from './events.contract.json' assert { type: 'json' };
@@ -0,0 +1,12 @@
1
+
2
+ export function createVersionedExport (versioned: Record<string, Record<string, unknown>>): Record<string, Record<string, unknown>> {
3
+ const result: Record<string, Record<string, unknown>> = {};
4
+
5
+ Object.entries(versioned).forEach(([version, contracts]) =>
6
+ Object.entries(contracts).forEach(([name, contract]): void => {
7
+ result[`${version}_${name}`] = contract as Record<string, unknown>;
8
+ })
9
+ );
10
+
11
+ return result;
12
+ }
@@ -0,0 +1,95 @@
1
+
2
+ import type { ApiBase } from 'https://deno.land/x/pezkuwi/api/base/index.ts';
3
+ import type { ApiTypes } from 'https://deno.land/x/pezkuwi/api/types/index.ts';
4
+ import type { Text } from 'https://deno.land/x/pezkuwi/types/mod.ts';
5
+ import type { ContractExecResultResult, ContractSelector, StorageDeposit, Weight, WeightV2 } from 'https://deno.land/x/pezkuwi/types/interfaces/index.ts';
6
+ import type { Codec, TypeDef } from 'https://deno.land/x/pezkuwi/types/types/index.ts';
7
+ import type { BN } from 'https://deno.land/x/pezkuwi/util/mod.ts';
8
+ import type { HexString } from 'https://deno.land/x/pezkuwi/util/types.ts';
9
+ import type { Abi } from './index.ts';
10
+
11
+ export interface ContractBase<ApiType extends ApiTypes> {
12
+ readonly abi: Abi;
13
+ readonly api: ApiBase<ApiType>;
14
+
15
+ getMessage: (name: string) => AbiMessage;
16
+ messages: AbiMessage[];
17
+ }
18
+
19
+ export interface AbiParam {
20
+ name: string;
21
+ type: TypeDef;
22
+ }
23
+
24
+ export type AbiMessageParam = AbiParam
25
+
26
+ export interface AbiEventParam extends AbiParam{
27
+ indexed: boolean;
28
+ }
29
+
30
+ export interface AbiEvent {
31
+ args: AbiEventParam[];
32
+ docs: string[];
33
+ fromU8a: (data: Uint8Array) => DecodedEvent;
34
+ identifier: string;
35
+ index: number;
36
+ signatureTopic?: HexString | null;
37
+ }
38
+
39
+ export interface AbiMessage {
40
+ args: AbiMessageParam[];
41
+ docs: string[];
42
+ fromU8a: (data: Uint8Array) => DecodedMessage;
43
+ identifier: string;
44
+ index: number;
45
+ isConstructor?: boolean;
46
+ isDefault?: boolean;
47
+ isMutating?: boolean;
48
+ isPayable?: boolean;
49
+ method: string;
50
+ path: string[];
51
+ returnType?: TypeDef | null;
52
+ selector: ContractSelector;
53
+ toU8a: (params: unknown[]) => Uint8Array;
54
+ }
55
+
56
+ export type AbiConstructor = AbiMessage;
57
+
58
+ export type InterfaceContractCalls = Record<string, Function>;
59
+
60
+ export interface ContractCallOutcome {
61
+ debugMessage: Text;
62
+ gasConsumed: Weight;
63
+ gasRequired: Weight;
64
+ output: Codec | null;
65
+ result: ContractExecResultResult;
66
+ storageDeposit: StorageDeposit;
67
+ }
68
+
69
+ export interface DecodedEvent {
70
+ args: Codec[];
71
+ event: AbiEvent;
72
+ }
73
+
74
+ export interface DecodedMessage {
75
+ args: Codec[];
76
+ message: AbiMessage;
77
+ }
78
+
79
+ export interface ContractOptions {
80
+ gasLimit?: bigint | string | number | BN | WeightV2;
81
+ storageDepositLimit?: bigint | string | number | BN | null;
82
+ value?: bigint | BN | string | number;
83
+ }
84
+
85
+ export interface BlueprintOptions extends ContractOptions {
86
+ salt?: Uint8Array | string | null;
87
+ }
88
+
89
+ export interface WeightAll {
90
+ v1Weight: BN;
91
+ v2Weight: {
92
+ refTime: BN;
93
+ proofSize?: BN | undefined;
94
+ };
95
+ }
@@ -0,0 +1,18 @@
1
+
2
+ import type { SubmittableResult } from 'https://deno.land/x/pezkuwi/api/mod.ts';
3
+ import type { EventRecord } from 'https://deno.land/x/pezkuwi/types/interfaces/index.ts';
4
+
5
+ type ContractEvents = 'CodeStored' | 'ContractEmitted' | 'ContractExecution' | 'Instantiated';
6
+
7
+ export function applyOnEvent <T> (result: SubmittableResult, types: ContractEvents[], fn: (records: EventRecord[]) => T, isRevive: boolean): T | undefined {
8
+ if (result.isInBlock || result.isFinalized) {
9
+ const section = isRevive ? 'revive' : 'contracts';
10
+ const records = result.filterRecords(section, types);
11
+
12
+ if (records.length) {
13
+ return fn(records);
14
+ }
15
+ }
16
+
17
+ return undefined;
18
+ }
@@ -0,0 +1,31 @@
1
+ import type { ChainProperties, ContractMetadataV4, ContractMetadataV5, ContractMetadataV6, ContractProjectInfo, EventRecord } from '@pezkuwi/types/interfaces';
2
+ import type { Codec, Registry, TypeDef } from '@pezkuwi/types/types';
3
+ import type { AbiConstructor, AbiEvent, AbiMessage, DecodedEvent, DecodedMessage } from '../types.js';
4
+ export type ContractMetadataSupported = ContractMetadataV4 | ContractMetadataV5 | ContractMetadataV6;
5
+ export declare class Abi {
6
+ #private;
7
+ readonly events: AbiEvent[];
8
+ readonly constructors: AbiConstructor[];
9
+ readonly info: ContractProjectInfo;
10
+ readonly json: Record<string, unknown>;
11
+ readonly messages: AbiMessage[];
12
+ readonly metadata: ContractMetadataSupported;
13
+ readonly registry: Registry;
14
+ readonly environment: Map<string, TypeDef | Codec>;
15
+ readonly isRevive: boolean;
16
+ constructor(abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties);
17
+ /**
18
+ * Warning: Unstable API, bound to change
19
+ */
20
+ decodeEvent(record: EventRecord): DecodedEvent;
21
+ /**
22
+ * Warning: Unstable API, bound to change
23
+ */
24
+ decodeConstructor(data: Uint8Array): DecodedMessage;
25
+ /**
26
+ * Warning: Unstable API, bound to change
27
+ */
28
+ decodeMessage(data: Uint8Array): DecodedMessage;
29
+ findConstructor(constructorOrId: AbiConstructor | string | number): AbiConstructor;
30
+ findMessage(messageOrId: AbiMessage | string | number): AbiMessage;
31
+ }
@@ -0,0 +1,15 @@
1
+ import type { ContractMetadataV4, ContractMetadataV5, ContractMetadataV6 } from '@pezkuwi/types/interfaces';
2
+ import type { Registry } from '@pezkuwi/types/types';
3
+ import type { ContractMetadataSupported } from './index.js';
4
+ export declare const enumVersions: readonly ["V6", "V5", "V4", "V3", "V2", "V1"];
5
+ type Versions = typeof enumVersions[number] | 'V0';
6
+ type Converter = (registry: Registry, vx: any) => ContractMetadataSupported;
7
+ export declare function v6ToLatestCompatible(_registry: Registry, v6: ContractMetadataV6): ContractMetadataV6;
8
+ export declare function v5ToLatestCompatible(_registry: Registry, v5: ContractMetadataV5): ContractMetadataV5;
9
+ export declare function v4ToLatestCompatible(_registry: Registry, v4: ContractMetadataV4): ContractMetadataV4;
10
+ export declare const v3ToLatestCompatible: (registry: Registry, input: import("@pezkuwi/types/interfaces").ContractMetadataV3) => ContractMetadataSupported;
11
+ export declare const v2ToLatestCompatible: (registry: Registry, input: import("@pezkuwi/types/interfaces").ContractMetadataV2) => ContractMetadataSupported;
12
+ export declare const v1ToLatestCompatible: (registry: Registry, input: import("@pezkuwi/types/interfaces").ContractMetadataV1) => ContractMetadataSupported;
13
+ export declare const v0ToLatestCompatible: (registry: Registry, input: import("@pezkuwi/types/interfaces").ContractMetadataV0) => ContractMetadataSupported;
14
+ export declare const convertVersions: [Versions, Converter][];
15
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ContractMetadataV0, ContractMetadataV1 } from '@pezkuwi/types/interfaces';
2
+ import type { Registry } from '@pezkuwi/types/types';
3
+ export declare function v0ToV1(registry: Registry, v0: ContractMetadataV0): ContractMetadataV1;
@@ -0,0 +1,3 @@
1
+ import type { ContractMetadataV1, ContractMetadataV2 } from '@pezkuwi/types/interfaces';
2
+ import type { Registry } from '@pezkuwi/types/types';
3
+ export declare function v1ToV2(registry: Registry, v1: ContractMetadataV1): ContractMetadataV2;
@@ -0,0 +1,3 @@
1
+ import type { ContractMetadataV2, ContractMetadataV3 } from '@pezkuwi/types/interfaces';
2
+ import type { Registry } from '@pezkuwi/types/types';
3
+ export declare function v2ToV3(registry: Registry, v2: ContractMetadataV2): ContractMetadataV3;
@@ -0,0 +1,3 @@
1
+ import type { ContractMetadataV3, ContractMetadataV4 } from '@pezkuwi/types/interfaces';
2
+ import type { Registry } from '@pezkuwi/types/types';
3
+ export declare function v3ToV4(registry: Registry, v3: ContractMetadataV3): ContractMetadataV4;
@@ -0,0 +1 @@
1
+ import '@pezkuwi/api-augment';
@@ -0,0 +1,13 @@
1
+ import type { ApiBase } from '@pezkuwi/api/base';
2
+ import type { ApiTypes, DecorateMethod } from '@pezkuwi/api/types';
3
+ import type { Registry } from '@pezkuwi/types/types';
4
+ import { Abi } from '../Abi/index.js';
5
+ export declare abstract class Base<ApiType extends ApiTypes> {
6
+ readonly abi: Abi;
7
+ readonly api: ApiBase<ApiType>;
8
+ protected readonly _decorateMethod: DecorateMethod<ApiType>;
9
+ protected readonly _isWeightV1: boolean;
10
+ protected readonly _isRevive: boolean;
11
+ constructor(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>);
12
+ get registry(): Registry;
13
+ }
@@ -0,0 +1,24 @@
1
+ import type { ApiBase } from '@pezkuwi/api/base';
2
+ import type { ApiTypes, DecorateMethod } from '@pezkuwi/api/types';
3
+ import type { Hash } from '@pezkuwi/types/interfaces';
4
+ import type { ISubmittableResult } from '@pezkuwi/types/types';
5
+ import type { Abi } from '../Abi/index.js';
6
+ import type { MapConstructorExec } from './types.js';
7
+ import { SubmittableResult } from '@pezkuwi/api';
8
+ import { Base } from './Base.js';
9
+ import { Contract } from './Contract.js';
10
+ export type BlueprintConstructor<ApiType extends ApiTypes> = new (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array) => Blueprint<ApiType>;
11
+ export declare class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
12
+ readonly contract?: Contract<ApiType> | undefined;
13
+ constructor(result: ISubmittableResult, contract?: Contract<ApiType>);
14
+ }
15
+ export declare class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
16
+ #private;
17
+ /**
18
+ * @description The on-chain code hash for this blueprint
19
+ */
20
+ readonly codeHash: Hash;
21
+ constructor(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array, decorateMethod: DecorateMethod<ApiType>);
22
+ get tx(): MapConstructorExec<ApiType>;
23
+ }
24
+ export declare function extendBlueprint<ApiType extends ApiTypes>(type: ApiType, decorateMethod: DecorateMethod<ApiType>): BlueprintConstructor<ApiType>;
@@ -0,0 +1,22 @@
1
+ import type { ApiBase } from '@pezkuwi/api/base';
2
+ import type { ApiTypes, DecorateMethod } from '@pezkuwi/api/types';
3
+ import type { ISubmittableResult } from '@pezkuwi/types/types';
4
+ import type { Abi } from '../Abi/index.js';
5
+ import type { MapConstructorExec } from './types.js';
6
+ import { SubmittableResult } from '@pezkuwi/api';
7
+ import { Base } from './Base.js';
8
+ import { Blueprint } from './Blueprint.js';
9
+ import { Contract } from './Contract.js';
10
+ export type CodeConstructor<ApiType extends ApiTypes> = new (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) => Code<ApiType>;
11
+ export declare class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
12
+ readonly blueprint?: Blueprint<ApiType> | undefined;
13
+ readonly contract?: Contract<ApiType> | undefined;
14
+ constructor(result: ISubmittableResult, blueprint?: Blueprint<ApiType> | undefined, contract?: Contract<ApiType> | undefined);
15
+ }
16
+ export declare class Code<ApiType extends ApiTypes> extends Base<ApiType> {
17
+ #private;
18
+ readonly code: Uint8Array;
19
+ constructor(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined, decorateMethod: DecorateMethod<ApiType>);
20
+ get tx(): MapConstructorExec<ApiType>;
21
+ }
22
+ export declare function extendCode<ApiType extends ApiTypes>(type: ApiType, decorateMethod: DecorateMethod<ApiType>): CodeConstructor<ApiType>;
@@ -0,0 +1,25 @@
1
+ import type { ApiBase } from '@pezkuwi/api/base';
2
+ import type { ApiTypes, DecorateMethod } from '@pezkuwi/api/types';
3
+ import type { AccountId, AccountId20 } from '@pezkuwi/types/interfaces';
4
+ import type { ISubmittableResult } from '@pezkuwi/types/types';
5
+ import type { Abi } from '../Abi/index.js';
6
+ import type { DecodedEvent } from '../types.js';
7
+ import type { MapMessageQuery, MapMessageTx } from './types.js';
8
+ import { SubmittableResult } from '@pezkuwi/api';
9
+ import { Base } from './Base.js';
10
+ export type ContractConstructor<ApiType extends ApiTypes> = new (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId) => Contract<ApiType>;
11
+ export declare class ContractSubmittableResult extends SubmittableResult {
12
+ readonly contractEvents?: DecodedEvent[] | undefined;
13
+ constructor(result: ISubmittableResult, contractEvents?: DecodedEvent[]);
14
+ }
15
+ export declare class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
16
+ #private;
17
+ /**
18
+ * @description The on-chain address for this contract
19
+ */
20
+ readonly address: AccountId | AccountId20;
21
+ constructor(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId | AccountId20, decorateMethod: DecorateMethod<ApiType>);
22
+ get query(): MapMessageQuery<ApiType>;
23
+ get tx(): MapMessageTx<ApiType>;
24
+ }
25
+ export declare function extendContract<ApiType extends ApiTypes>(type: ApiType, decorateMethod: DecorateMethod<ApiType>): ContractConstructor<ApiType>;
@@ -0,0 +1,3 @@
1
+ export { Blueprint, BlueprintSubmittableResult, extendBlueprint } from './Blueprint.js';
2
+ export { Code, CodeSubmittableResult, extendCode } from './Code.js';
3
+ export { Contract, extendContract } from './Contract.js';
@@ -0,0 +1,3 @@
1
+ import type { ApiBase } from '@pezkuwi/api/base';
2
+ export declare const mockApi: ApiBase<"promise">;
3
+ export declare const mockReviveApi: ApiBase<"promise">;
@@ -0,0 +1,25 @@
1
+ import type { Observable } from 'rxjs';
2
+ import type { SubmittableExtrinsic } from '@pezkuwi/api/submittable/types';
3
+ import type { ApiTypes, ObsInnerType } from '@pezkuwi/api/types';
4
+ import type { AccountId } from '@pezkuwi/types/interfaces';
5
+ import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types.js';
6
+ export interface MessageMeta {
7
+ readonly meta: AbiMessage;
8
+ }
9
+ export interface BlueprintDeploy<ApiType extends ApiTypes> extends MessageMeta {
10
+ (options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
11
+ }
12
+ export interface ContractQuery<ApiType extends ApiTypes> extends MessageMeta {
13
+ (origin: AccountId | string | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
14
+ }
15
+ export interface ContractTx<ApiType extends ApiTypes> extends MessageMeta {
16
+ (options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
17
+ }
18
+ export type ContractGeneric<O, T> = (messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]) => T;
19
+ export type ContractCallResult<ApiType extends ApiTypes, T> = ApiType extends 'rxjs' ? Observable<T> : Promise<ObsInnerType<Observable<T>>>;
20
+ export interface ContractCallSend<ApiType extends ApiTypes> {
21
+ send(account: string | AccountId | Uint8Array): ContractCallResult<ApiType, ContractCallOutcome>;
22
+ }
23
+ export type MapConstructorExec<ApiType extends ApiTypes> = Record<string, BlueprintDeploy<ApiType>>;
24
+ export type MapMessageTx<ApiType extends ApiTypes> = Record<string, ContractTx<ApiType>>;
25
+ export type MapMessageQuery<ApiType extends ApiTypes> = Record<string, ContractQuery<ApiType>>;
@@ -0,0 +1,16 @@
1
+ import type { SubmittableResult } from '@pezkuwi/api';
2
+ import type { SubmittableExtrinsic } from '@pezkuwi/api/submittable/types';
3
+ import type { ApiTypes } from '@pezkuwi/api/types';
4
+ import type { WeightV1, WeightV2 } from '@pezkuwi/types/interfaces';
5
+ import type { BN } from '@pezkuwi/util';
6
+ import type { AbiConstructor, AbiMessage, BlueprintOptions, WeightAll } from '../types.js';
7
+ import type { BlueprintDeploy, ContractGeneric } from './types.js';
8
+ export declare const EMPTY_SALT: Uint8Array;
9
+ export declare function withMeta<T extends {
10
+ meta: AbiMessage;
11
+ }>(meta: AbiMessage, creator: Omit<T, 'meta'>): T;
12
+ export declare function createBluePrintTx<ApiType extends ApiTypes, R extends SubmittableResult>(meta: AbiMessage, fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType>;
13
+ export declare function createBluePrintWithId<T>(fn: (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: unknown[]) => T): ContractGeneric<BlueprintOptions, T>;
14
+ export declare function encodeSalt(salt?: Uint8Array | string | null): Uint8Array;
15
+ export declare function convertWeight(weight: WeightV1 | WeightV2 | bigint | string | number | BN): WeightAll;
16
+ export declare function isWeightV2(weight: WeightV1 | WeightV2 | bigint | string | number | BN): weight is WeightV2;
@@ -0,0 +1,4 @@
1
+ export { Abi } from './Abi/index.js';
2
+ export { packageInfo } from './packageInfo.js';
3
+ export * from './promise/index.js';
4
+ export * from './rx/index.js';