@aeternity/aepp-sdk 12.1.3 → 13.0.0-alpha.1

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 (565) hide show
  1. package/bin/aesophia_cli +0 -0
  2. package/dist/aepp-sdk.browser-script.js +1 -1
  3. package/dist/aepp-sdk.browser-script.js.map +1 -1
  4. package/dist/aepp-sdk.browser.js +1 -1
  5. package/dist/aepp-sdk.browser.js.map +1 -1
  6. package/dist/aepp-sdk.js +12031 -11231
  7. package/dist/aepp-sdk.js.map +1 -1
  8. package/es/AeSdk.d.ts +7 -3
  9. package/es/AeSdk.mjs +17 -22
  10. package/es/AeSdk.mjs.map +1 -1
  11. package/es/AeSdkAepp.d.ts +6 -5
  12. package/es/AeSdkAepp.mjs +7 -30
  13. package/es/AeSdkAepp.mjs.map +1 -1
  14. package/es/AeSdkBase.d.ts +18 -140
  15. package/es/AeSdkBase.mjs +30 -184
  16. package/es/AeSdkBase.mjs.map +1 -1
  17. package/es/AeSdkMethods.d.ts +123 -0
  18. package/es/AeSdkMethods.mjs +122 -0
  19. package/es/AeSdkMethods.mjs.map +1 -0
  20. package/es/AeSdkWallet.d.ts +7 -21
  21. package/es/AeSdkWallet.mjs +38 -86
  22. package/es/AeSdkWallet.mjs.map +1 -1
  23. package/es/Node.d.ts +11 -15
  24. package/es/Node.mjs +35 -48
  25. package/es/Node.mjs.map +1 -1
  26. package/es/account/Base.d.ts +24 -40
  27. package/es/account/Base.mjs +1 -101
  28. package/es/account/Base.mjs.map +1 -1
  29. package/es/account/Generalized.d.ts +16 -0
  30. package/es/account/Generalized.mjs +113 -0
  31. package/es/account/Generalized.mjs.map +1 -0
  32. package/es/account/Ledger.d.ts +28 -0
  33. package/es/account/Ledger.mjs +102 -0
  34. package/es/account/Ledger.mjs.map +1 -0
  35. package/es/account/LedgerFactory.d.ts +39 -0
  36. package/es/account/LedgerFactory.mjs +81 -0
  37. package/es/account/LedgerFactory.mjs.map +1 -0
  38. package/es/account/Memory.d.ts +13 -17
  39. package/es/account/Memory.mjs +43 -64
  40. package/es/account/Memory.mjs.map +1 -1
  41. package/es/account/Rpc.d.ts +6 -8
  42. package/es/account/Rpc.mjs +14 -32
  43. package/es/account/Rpc.mjs.map +1 -1
  44. package/es/aens.d.ts +4 -4
  45. package/es/aens.mjs +46 -41
  46. package/es/aens.mjs.map +1 -1
  47. package/es/aepp-wallet-communication/connection/Browser.mjs +9 -13
  48. package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -1
  49. package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +1 -0
  50. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +22 -11
  51. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -1
  52. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +1 -1
  53. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +0 -31
  54. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -1
  55. package/es/aepp-wallet-communication/connection-proxy.mjs.map +1 -1
  56. package/es/aepp-wallet-communication/rpc/RpcClient.d.ts +3 -3
  57. package/es/aepp-wallet-communication/rpc/RpcClient.mjs +5 -42
  58. package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
  59. package/es/aepp-wallet-communication/rpc/types.d.ts +7 -1
  60. package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
  61. package/es/aepp-wallet-communication/schema.mjs +14 -68
  62. package/es/aepp-wallet-communication/schema.mjs.map +1 -1
  63. package/es/aepp-wallet-communication/wallet-detector.mjs +0 -3
  64. package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -1
  65. package/es/apis/compiler/compiler.d.ts +23 -29
  66. package/es/apis/compiler/compiler.mjs +128 -189
  67. package/es/apis/compiler/compiler.mjs.map +1 -1
  68. package/es/apis/compiler/index.mjs.map +1 -1
  69. package/es/apis/compiler/models/index.d.ts +82 -135
  70. package/es/apis/compiler/models/index.mjs +1 -47
  71. package/es/apis/compiler/models/index.mjs.map +1 -1
  72. package/es/apis/compiler/models/mappers.d.ts +8 -8
  73. package/es/apis/compiler/models/mappers.mjs +165 -183
  74. package/es/apis/compiler/models/mappers.mjs.map +1 -1
  75. package/es/apis/compiler/models/parameters.d.ts +0 -1
  76. package/es/apis/compiler/models/parameters.mjs +5 -9
  77. package/es/apis/compiler/models/parameters.mjs.map +1 -1
  78. package/es/apis/node/index.mjs.map +1 -1
  79. package/es/apis/node/models/index.d.ts +48 -48
  80. package/es/apis/node/models/mappers.mjs +12 -6
  81. package/es/apis/node/models/mappers.mjs.map +1 -1
  82. package/es/apis/node/models/parameters.mjs.map +1 -1
  83. package/es/apis/node/node.mjs +43 -84
  84. package/es/apis/node/node.mjs.map +1 -1
  85. package/es/chain.d.ts +10 -2
  86. package/es/chain.mjs +37 -59
  87. package/es/chain.mjs.map +1 -1
  88. package/es/channel/Base.d.ts +200 -0
  89. package/es/channel/Base.mjs +293 -0
  90. package/es/channel/Base.mjs.map +1 -0
  91. package/es/channel/Contract.d.ts +248 -0
  92. package/es/channel/Contract.mjs +420 -0
  93. package/es/channel/Contract.mjs.map +1 -0
  94. package/es/channel/Spend.d.ts +219 -0
  95. package/es/channel/Spend.mjs +385 -0
  96. package/es/channel/Spend.mjs.map +1 -0
  97. package/es/channel/handlers.d.ts +8 -21
  98. package/es/channel/handlers.mjs +151 -899
  99. package/es/channel/handlers.mjs.map +1 -1
  100. package/es/channel/internal.d.ts +27 -21
  101. package/es/channel/internal.mjs +101 -191
  102. package/es/channel/internal.mjs.map +1 -1
  103. package/es/contract/Contract.d.ts +210 -0
  104. package/es/contract/Contract.mjs +551 -0
  105. package/es/contract/Contract.mjs.map +1 -0
  106. package/es/contract/compiler/Base.d.ts +81 -0
  107. package/es/contract/compiler/Base.mjs +5 -0
  108. package/es/contract/compiler/Base.mjs.map +1 -0
  109. package/es/contract/compiler/Cli.d.ts +23 -0
  110. package/es/contract/compiler/Cli.mjs +155 -0
  111. package/es/contract/compiler/Cli.mjs.map +1 -0
  112. package/es/contract/compiler/Http.d.ts +32 -0
  113. package/es/contract/compiler/Http.mjs +118 -0
  114. package/es/contract/compiler/Http.mjs.map +1 -0
  115. package/es/contract/compiler/HttpNode.d.ts +17 -0
  116. package/es/contract/compiler/HttpNode.mjs +26 -0
  117. package/es/contract/compiler/HttpNode.mjs.map +1 -0
  118. package/es/contract/compiler/getFileSystem.d.ts +6 -0
  119. package/es/contract/compiler/getFileSystem.mjs +40 -0
  120. package/es/contract/compiler/getFileSystem.mjs.map +1 -0
  121. package/es/contract/ga.d.ts +9 -34
  122. package/es/contract/ga.mjs +29 -112
  123. package/es/contract/ga.mjs.map +1 -1
  124. package/es/index-browser.d.ts +39 -0
  125. package/es/index-browser.mjs +55 -0
  126. package/es/index-browser.mjs.map +1 -0
  127. package/es/index.d.ts +4 -35
  128. package/es/index.mjs +4 -51
  129. package/es/index.mjs.map +1 -1
  130. package/es/oracle.d.ts +5 -5
  131. package/es/oracle.mjs +34 -40
  132. package/es/oracle.mjs.map +1 -1
  133. package/es/spend.d.ts +3 -3
  134. package/es/spend.mjs +18 -23
  135. package/es/spend.mjs.map +1 -1
  136. package/es/tx/builder/constants.d.ts +30 -2
  137. package/es/tx/builder/constants.mjs +43 -14
  138. package/es/tx/builder/constants.mjs.map +1 -1
  139. package/es/tx/builder/field-types/abi-version.d.ts +10 -0
  140. package/es/tx/builder/field-types/abi-version.mjs +20 -0
  141. package/es/tx/builder/field-types/abi-version.mjs.map +1 -0
  142. package/es/tx/builder/field-types/address.d.ts +14 -0
  143. package/es/tx/builder/field-types/address.mjs +51 -0
  144. package/es/tx/builder/field-types/address.mjs.map +1 -0
  145. package/es/tx/builder/field-types/array.d.ts +7 -0
  146. package/es/tx/builder/field-types/array.mjs +11 -0
  147. package/es/tx/builder/field-types/array.mjs.map +1 -0
  148. package/es/tx/builder/field-types/boolean.d.ts +6 -0
  149. package/es/tx/builder/field-types/boolean.mjs +13 -0
  150. package/es/tx/builder/field-types/boolean.mjs.map +1 -0
  151. package/es/tx/builder/field-types/coin-amount.d.ts +2 -3
  152. package/es/tx/builder/field-types/coin-amount.mjs +4 -12
  153. package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
  154. package/es/tx/builder/field-types/ct-version.d.ts +30 -0
  155. package/es/tx/builder/field-types/ct-version.mjs +48 -0
  156. package/es/tx/builder/field-types/ct-version.mjs.map +1 -0
  157. package/es/tx/builder/field-types/deposit.d.ts +1 -2
  158. package/es/tx/builder/field-types/deposit.mjs +2 -4
  159. package/es/tx/builder/field-types/deposit.mjs.map +1 -1
  160. package/es/tx/builder/field-types/encoded.d.ts +6 -0
  161. package/es/tx/builder/field-types/encoded.mjs +21 -0
  162. package/es/tx/builder/field-types/encoded.mjs.map +1 -0
  163. package/es/tx/builder/field-types/entry.d.ts +11 -0
  164. package/es/tx/builder/field-types/entry.mjs +31 -0
  165. package/es/tx/builder/field-types/entry.mjs.map +1 -0
  166. package/es/tx/builder/field-types/enumeration.d.ts +7 -0
  167. package/es/tx/builder/field-types/enumeration.mjs +30 -0
  168. package/es/tx/builder/field-types/enumeration.mjs.map +1 -0
  169. package/es/tx/builder/field-types/fee.d.ts +10 -15
  170. package/es/tx/builder/field-types/fee.mjs +31 -43
  171. package/es/tx/builder/field-types/fee.mjs.map +1 -1
  172. package/es/tx/builder/field-types/field.mjs +0 -2
  173. package/es/tx/builder/field-types/field.mjs.map +1 -1
  174. package/es/tx/builder/field-types/gas-limit.d.ts +5 -2
  175. package/es/tx/builder/field-types/gas-limit.mjs +12 -14
  176. package/es/tx/builder/field-types/gas-limit.mjs.map +1 -1
  177. package/es/tx/builder/field-types/gas-price.d.ts +1 -2
  178. package/es/tx/builder/field-types/gas-price.mjs +3 -7
  179. package/es/tx/builder/field-types/gas-price.mjs.map +1 -1
  180. package/es/tx/builder/field-types/index.d.ts +80 -30
  181. package/es/tx/builder/field-types/index.mjs +34 -9
  182. package/es/tx/builder/field-types/index.mjs.map +1 -1
  183. package/es/tx/builder/field-types/mptree.d.ts +37 -0
  184. package/es/tx/builder/field-types/mptree.mjs +268 -0
  185. package/es/tx/builder/field-types/mptree.mjs.map +1 -0
  186. package/es/tx/builder/field-types/name-fee.d.ts +1 -3
  187. package/es/tx/builder/field-types/name-fee.mjs +3 -5
  188. package/es/tx/builder/field-types/name-fee.mjs.map +1 -1
  189. package/es/tx/builder/field-types/name-id.d.ts +1 -4
  190. package/es/tx/builder/field-types/name-id.mjs +5 -10
  191. package/es/tx/builder/field-types/name-id.mjs.map +1 -1
  192. package/es/tx/builder/field-types/name.mjs +0 -2
  193. package/es/tx/builder/field-types/name.mjs.map +1 -1
  194. package/es/tx/builder/field-types/pointers.d.ts +23 -0
  195. package/es/tx/builder/field-types/pointers.mjs +36 -0
  196. package/es/tx/builder/field-types/pointers.mjs.map +1 -0
  197. package/es/tx/builder/field-types/raw.d.ts +6 -0
  198. package/es/tx/builder/field-types/raw.mjs +13 -0
  199. package/es/tx/builder/field-types/raw.mjs.map +1 -0
  200. package/es/tx/builder/field-types/short-u-int-const.d.ts +5 -0
  201. package/es/tx/builder/field-types/short-u-int-const.mjs +16 -0
  202. package/es/tx/builder/field-types/short-u-int-const.mjs.map +1 -0
  203. package/es/tx/builder/field-types/short-u-int.mjs +0 -2
  204. package/es/tx/builder/field-types/short-u-int.mjs.map +1 -1
  205. package/es/tx/builder/field-types/string.d.ts +6 -0
  206. package/es/tx/builder/field-types/string.mjs +10 -0
  207. package/es/tx/builder/field-types/string.mjs.map +1 -0
  208. package/es/tx/builder/field-types/u-int.d.ts +1 -2
  209. package/es/tx/builder/field-types/u-int.mjs +3 -4
  210. package/es/tx/builder/field-types/u-int.mjs.map +1 -1
  211. package/es/tx/builder/helpers.d.ts +2 -32
  212. package/es/tx/builder/helpers.mjs +19 -71
  213. package/es/tx/builder/helpers.mjs.map +1 -1
  214. package/es/tx/builder/index.d.ts +11 -49
  215. package/es/tx/builder/index.mjs +57 -337
  216. package/es/tx/builder/index.mjs.map +1 -1
  217. package/es/tx/builder/schema.d.ts +2367 -667
  218. package/es/tx/builder/schema.mjs +70 -145
  219. package/es/tx/builder/schema.mjs.map +1 -1
  220. package/es/tx/index.d.ts +4 -49
  221. package/es/tx/index.mjs +38 -112
  222. package/es/tx/index.mjs.map +1 -1
  223. package/es/tx/validator.d.ts +4 -6
  224. package/es/tx/validator.mjs +104 -90
  225. package/es/tx/validator.mjs.map +1 -1
  226. package/es/typings/{@aeternity__argon2-browser → @aeternity__aepp-calldata}/index.d.mjs +0 -0
  227. package/es/typings/@aeternity__aepp-calldata/index.d.mjs.map +1 -0
  228. package/es/utils/amount-formatter.mjs +4 -10
  229. package/es/utils/amount-formatter.mjs.map +1 -1
  230. package/es/utils/autorest.d.ts +1 -0
  231. package/es/utils/autorest.mjs +17 -19
  232. package/es/utils/autorest.mjs.map +1 -1
  233. package/es/utils/bignumber.mjs +4 -7
  234. package/es/utils/bignumber.mjs.map +1 -1
  235. package/es/utils/bytes.d.ts +0 -17
  236. package/es/utils/bytes.mjs +6 -35
  237. package/es/utils/bytes.mjs.map +1 -1
  238. package/es/utils/crypto.d.ts +15 -8
  239. package/es/utils/crypto.mjs +40 -40
  240. package/es/utils/crypto.mjs.map +1 -1
  241. package/es/utils/encoder-types.d.ts +28 -28
  242. package/es/utils/encoder-types.mjs +0 -1
  243. package/es/utils/encoder-types.mjs.map +1 -1
  244. package/es/utils/encoder.d.ts +0 -1
  245. package/es/utils/encoder.mjs +7 -15
  246. package/es/utils/encoder.mjs.map +1 -1
  247. package/es/utils/errors.d.ts +15 -14
  248. package/es/utils/errors.mjs +86 -172
  249. package/es/utils/errors.mjs.map +1 -1
  250. package/es/utils/hd-wallet.d.ts +27 -19
  251. package/es/utils/hd-wallet.mjs +42 -26
  252. package/es/utils/hd-wallet.mjs.map +1 -1
  253. package/es/utils/json-big.mjs +0 -8
  254. package/es/utils/json-big.mjs.map +1 -1
  255. package/es/utils/keystore.d.ts +2 -0
  256. package/es/utils/keystore.mjs +37 -36
  257. package/es/utils/keystore.mjs.map +1 -1
  258. package/es/utils/other.d.ts +4 -2
  259. package/es/utils/other.mjs +11 -7
  260. package/es/utils/other.mjs.map +1 -1
  261. package/es/utils/semver-satisfies.mjs +0 -3
  262. package/es/utils/semver-satisfies.mjs.map +1 -1
  263. package/es/utils/string.d.ts +0 -12
  264. package/es/utils/string.mjs +1 -21
  265. package/es/utils/string.mjs.map +1 -1
  266. package/package.json +98 -51
  267. package/src/AeSdk.ts +15 -11
  268. package/src/AeSdkAepp.ts +9 -7
  269. package/src/AeSdkBase.ts +31 -202
  270. package/src/AeSdkMethods.ts +169 -0
  271. package/src/AeSdkWallet.ts +16 -47
  272. package/src/Node.ts +17 -18
  273. package/src/account/Base.ts +29 -75
  274. package/src/account/Generalized.ts +98 -0
  275. package/src/account/Ledger.ts +131 -0
  276. package/src/account/LedgerFactory.ts +86 -0
  277. package/src/account/Memory.ts +46 -60
  278. package/src/account/Rpc.ts +17 -26
  279. package/src/aens.ts +13 -11
  280. package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +21 -9
  281. package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +3 -3
  282. package/src/aepp-wallet-communication/rpc/RpcClient.ts +4 -4
  283. package/src/aepp-wallet-communication/rpc/types.ts +11 -1
  284. package/src/aepp-wallet-communication/schema.ts +18 -18
  285. package/src/apis/compiler/code-model-v4.yaml +681 -888
  286. package/src/apis/compiler/compiler.ts +113 -154
  287. package/src/apis/compiler/models/index.ts +80 -140
  288. package/src/apis/compiler/models/mappers.ts +165 -183
  289. package/src/apis/compiler/models/parameters.ts +6 -12
  290. package/src/chain.ts +11 -6
  291. package/src/channel/Base.ts +335 -0
  292. package/src/channel/Contract.ts +488 -0
  293. package/src/channel/Spend.ts +408 -0
  294. package/src/channel/handlers.ts +164 -582
  295. package/src/channel/internal.ts +114 -143
  296. package/src/contract/Contract.ts +610 -0
  297. package/src/contract/compiler/Base.ts +94 -0
  298. package/src/contract/compiler/Cli.ts +134 -0
  299. package/src/contract/compiler/Http.ts +124 -0
  300. package/src/contract/compiler/HttpNode.ts +26 -0
  301. package/src/contract/compiler/getFileSystem.ts +42 -0
  302. package/src/contract/ga.ts +23 -106
  303. package/src/index-browser.ts +58 -0
  304. package/src/index.ts +4 -55
  305. package/src/oracle.ts +8 -8
  306. package/src/spend.ts +6 -14
  307. package/src/tx/builder/constants.ts +33 -3
  308. package/src/tx/builder/field-types/abi-version.ts +21 -0
  309. package/src/tx/builder/field-types/address.ts +62 -0
  310. package/src/tx/builder/field-types/array.ts +19 -0
  311. package/src/tx/builder/field-types/boolean.ts +9 -0
  312. package/src/tx/builder/field-types/coin-amount.ts +4 -9
  313. package/src/tx/builder/field-types/ct-version.ts +50 -0
  314. package/src/tx/builder/field-types/deposit.ts +1 -1
  315. package/src/tx/builder/field-types/encoded.ts +27 -0
  316. package/src/tx/builder/field-types/entry.ts +31 -0
  317. package/src/tx/builder/field-types/enumeration.ts +32 -0
  318. package/src/tx/builder/field-types/fee.ts +39 -21
  319. package/src/tx/builder/field-types/gas-limit.ts +13 -8
  320. package/src/tx/builder/field-types/gas-price.ts +0 -2
  321. package/src/tx/builder/field-types/index.ts +54 -15
  322. package/src/tx/builder/field-types/mptree.ts +242 -0
  323. package/src/tx/builder/field-types/name-fee.ts +2 -3
  324. package/src/tx/builder/field-types/name-id.ts +7 -10
  325. package/src/tx/builder/field-types/pointers.ts +41 -0
  326. package/src/tx/builder/field-types/raw.ts +9 -0
  327. package/src/tx/builder/field-types/short-u-int-const.ts +20 -0
  328. package/src/tx/builder/field-types/string.ts +11 -0
  329. package/src/tx/builder/field-types/u-int.ts +4 -5
  330. package/src/tx/builder/helpers.ts +10 -60
  331. package/src/tx/builder/index.ts +65 -308
  332. package/src/tx/builder/schema.ts +280 -341
  333. package/src/tx/index.ts +40 -103
  334. package/src/tx/validator.ts +91 -96
  335. package/src/typings/@aeternity__aepp-calldata/index.d.ts +20 -0
  336. package/src/utils/autorest.ts +16 -1
  337. package/src/utils/bytes.ts +6 -34
  338. package/src/utils/crypto.ts +23 -16
  339. package/src/utils/encoder.ts +0 -1
  340. package/src/utils/errors.ts +22 -25
  341. package/src/utils/hd-wallet.ts +30 -9
  342. package/src/utils/keystore.ts +24 -21
  343. package/src/utils/other.ts +16 -1
  344. package/src/utils/string.ts +0 -20
  345. package/types-legacy/ts4.2/AeSdk.d.ts +41 -0
  346. package/types-legacy/ts4.2/AeSdkAepp.d.ts +71 -0
  347. package/types-legacy/ts4.2/AeSdkBase.d.ts +91 -0
  348. package/types-legacy/ts4.2/AeSdkMethods.d.ts +140 -0
  349. package/types-legacy/ts4.2/AeSdkWallet.d.ts +90 -0
  350. package/types-legacy/ts4.2/Node.d.ts +78 -0
  351. package/types-legacy/ts4.2/account/Base.d.ts +52 -0
  352. package/types-legacy/ts4.2/account/Generalized.d.ts +16 -0
  353. package/types-legacy/ts4.2/account/Ledger.d.ts +28 -0
  354. package/types-legacy/ts4.2/account/LedgerFactory.d.ts +39 -0
  355. package/types-legacy/ts4.2/account/Memory.d.ts +22 -0
  356. package/types-legacy/ts4.2/account/Rpc.d.ts +25 -0
  357. package/types-legacy/ts4.2/aens.d.ts +222 -0
  358. package/types-legacy/ts4.2/aepp-wallet-communication/connection/Browser.d.ts +33 -0
  359. package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserRuntime.d.ts +19 -0
  360. package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +36 -0
  361. package/types-legacy/ts4.2/aepp-wallet-communication/connection-proxy.d.ts +11 -0
  362. package/types-legacy/ts4.2/aepp-wallet-communication/rpc/RpcClient.d.ts +34 -0
  363. package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +83 -0
  364. package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +133 -0
  365. package/types-legacy/ts4.2/aepp-wallet-communication/wallet-detector.d.ts +25 -0
  366. package/types-legacy/ts4.2/apis/compiler/compiler.d.ts +86 -0
  367. package/types-legacy/ts4.2/apis/compiler/index.d.ts +2 -0
  368. package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +195 -0
  369. package/types-legacy/ts4.2/apis/compiler/models/mappers.d.ts +23 -0
  370. package/types-legacy/ts4.2/apis/compiler/models/parameters.d.ts +12 -0
  371. package/types-legacy/ts4.2/apis/node/index.d.ts +2 -0
  372. package/types-legacy/ts4.2/apis/node/models/index.d.ts +1065 -0
  373. package/types-legacy/ts4.2/apis/node/models/mappers.d.ts +95 -0
  374. package/types-legacy/ts4.2/apis/node/models/parameters.d.ts +17 -0
  375. package/types-legacy/ts4.2/apis/node/node.d.ts +215 -0
  376. package/types-legacy/ts4.2/chain.d.ts +256 -0
  377. package/types-legacy/ts4.2/channel/Base.d.ts +199 -0
  378. package/types-legacy/ts4.2/channel/Contract.d.ts +248 -0
  379. package/types-legacy/ts4.2/channel/Spend.d.ts +219 -0
  380. package/types-legacy/ts4.2/channel/handlers.d.ts +21 -0
  381. package/types-legacy/ts4.2/channel/internal.d.ts +107 -0
  382. package/types-legacy/ts4.2/contract/Contract.d.ts +212 -0
  383. package/types-legacy/ts4.2/contract/compiler/Base.d.ts +81 -0
  384. package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +23 -0
  385. package/types-legacy/ts4.2/contract/compiler/Http.d.ts +32 -0
  386. package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +17 -0
  387. package/types-legacy/ts4.2/contract/compiler/getFileSystem.d.ts +6 -0
  388. package/types-legacy/ts4.2/contract/ga.d.ts +44 -0
  389. package/types-legacy/ts4.2/globals.d.ts +16 -0
  390. package/types-legacy/ts4.2/index-browser.d.ts +39 -0
  391. package/types-legacy/ts4.2/index.d.ts +5 -0
  392. package/types-legacy/ts4.2/oracle.d.ts +161 -0
  393. package/types-legacy/ts4.2/spend.d.ts +62 -0
  394. package/types-legacy/ts4.2/tx/builder/constants.d.ts +98 -0
  395. package/types-legacy/ts4.2/tx/builder/field-types/abi-version.d.ts +10 -0
  396. package/types-legacy/ts4.2/tx/builder/field-types/address.d.ts +21 -0
  397. package/types-legacy/ts4.2/tx/builder/field-types/array.d.ts +7 -0
  398. package/types-legacy/ts4.2/tx/builder/field-types/boolean.d.ts +6 -0
  399. package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +12 -0
  400. package/types-legacy/ts4.2/tx/builder/field-types/ct-version.d.ts +42 -0
  401. package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +14 -0
  402. package/types-legacy/ts4.2/tx/builder/field-types/encoded.d.ts +6 -0
  403. package/types-legacy/ts4.2/tx/builder/field-types/entry.d.ts +11 -0
  404. package/types-legacy/ts4.2/tx/builder/field-types/enumeration.d.ts +7 -0
  405. package/types-legacy/ts4.2/tx/builder/field-types/fee.d.ts +20 -0
  406. package/types-legacy/ts4.2/tx/builder/field-types/field.d.ts +6 -0
  407. package/types-legacy/ts4.2/tx/builder/field-types/gas-limit.d.ts +15 -0
  408. package/types-legacy/ts4.2/tx/builder/field-types/gas-price.d.ts +7 -0
  409. package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +129 -0
  410. package/types-legacy/ts4.2/tx/builder/field-types/mptree.d.ts +43 -0
  411. package/types-legacy/ts4.2/tx/builder/field-types/name-fee.d.ts +18 -0
  412. package/types-legacy/ts4.2/tx/builder/field-types/name-id.d.ts +11 -0
  413. package/types-legacy/ts4.2/tx/builder/field-types/name.d.ts +13 -0
  414. package/types-legacy/ts4.2/tx/builder/field-types/pointers.d.ts +26 -0
  415. package/types-legacy/ts4.2/tx/builder/field-types/raw.d.ts +6 -0
  416. package/types-legacy/ts4.2/tx/builder/field-types/short-u-int-const.d.ts +5 -0
  417. package/types-legacy/ts4.2/tx/builder/field-types/short-u-int.d.ts +6 -0
  418. package/types-legacy/ts4.2/tx/builder/field-types/string.d.ts +6 -0
  419. package/types-legacy/ts4.2/tx/builder/field-types/u-int.d.ts +7 -0
  420. package/types-legacy/ts4.2/tx/builder/helpers.d.ts +112 -0
  421. package/types-legacy/ts4.2/tx/builder/index.d.ts +50 -0
  422. package/types-legacy/ts4.2/tx/builder/schema.d.ts +4675 -0
  423. package/types-legacy/ts4.2/tx/index.d.ts +19 -0
  424. package/types-legacy/ts4.2/tx/validator.d.ts +18 -0
  425. package/types-legacy/ts4.2/utils/amount-formatter.d.ts +42 -0
  426. package/types-legacy/ts4.2/utils/autorest.d.ts +7 -0
  427. package/types-legacy/ts4.2/utils/bignumber.d.ts +13 -0
  428. package/types-legacy/ts4.2/utils/bytes.d.ts +9 -0
  429. package/types-legacy/ts4.2/utils/crypto.d.ts +95 -0
  430. package/types-legacy/ts4.2/utils/encoder-types.d.ts +61 -0
  431. package/types-legacy/ts4.2/utils/encoder.d.ts +24 -0
  432. package/types-legacy/ts4.2/utils/errors.d.ts +475 -0
  433. package/types-legacy/ts4.2/utils/hd-wallet.d.ts +65 -0
  434. package/types-legacy/ts4.2/utils/json-big.d.ts +5 -0
  435. package/types-legacy/ts4.2/utils/keystore.d.ts +53 -0
  436. package/types-legacy/ts4.2/utils/other.d.ts +31 -0
  437. package/types-legacy/ts4.2/utils/semver-satisfies.d.ts +1 -0
  438. package/types-legacy/ts4.2/utils/string.d.ts +12 -0
  439. package/types-legacy/ts4.5/AeSdk.d.ts +41 -0
  440. package/types-legacy/ts4.5/AeSdkAepp.d.ts +71 -0
  441. package/types-legacy/ts4.5/AeSdkBase.d.ts +91 -0
  442. package/types-legacy/ts4.5/AeSdkMethods.d.ts +140 -0
  443. package/types-legacy/ts4.5/AeSdkWallet.d.ts +90 -0
  444. package/types-legacy/ts4.5/Node.d.ts +78 -0
  445. package/types-legacy/ts4.5/account/Base.d.ts +52 -0
  446. package/types-legacy/ts4.5/account/Generalized.d.ts +16 -0
  447. package/types-legacy/ts4.5/account/Ledger.d.ts +28 -0
  448. package/types-legacy/ts4.5/account/LedgerFactory.d.ts +39 -0
  449. package/types-legacy/ts4.5/account/Memory.d.ts +22 -0
  450. package/types-legacy/ts4.5/account/Rpc.d.ts +25 -0
  451. package/types-legacy/ts4.5/aens.d.ts +222 -0
  452. package/types-legacy/ts4.5/aepp-wallet-communication/connection/Browser.d.ts +33 -0
  453. package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserRuntime.d.ts +19 -0
  454. package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +36 -0
  455. package/types-legacy/ts4.5/aepp-wallet-communication/connection-proxy.d.ts +11 -0
  456. package/types-legacy/ts4.5/aepp-wallet-communication/rpc/RpcClient.d.ts +34 -0
  457. package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +83 -0
  458. package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +133 -0
  459. package/types-legacy/ts4.5/aepp-wallet-communication/wallet-detector.d.ts +25 -0
  460. package/types-legacy/ts4.5/apis/compiler/compiler.d.ts +86 -0
  461. package/types-legacy/ts4.5/apis/compiler/index.d.ts +2 -0
  462. package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +195 -0
  463. package/types-legacy/ts4.5/apis/compiler/models/mappers.d.ts +23 -0
  464. package/types-legacy/ts4.5/apis/compiler/models/parameters.d.ts +12 -0
  465. package/types-legacy/ts4.5/apis/node/index.d.ts +2 -0
  466. package/types-legacy/ts4.5/apis/node/models/index.d.ts +1065 -0
  467. package/types-legacy/ts4.5/apis/node/models/mappers.d.ts +95 -0
  468. package/types-legacy/ts4.5/apis/node/models/parameters.d.ts +17 -0
  469. package/types-legacy/ts4.5/apis/node/node.d.ts +215 -0
  470. package/types-legacy/ts4.5/chain.d.ts +256 -0
  471. package/types-legacy/ts4.5/channel/Base.d.ts +199 -0
  472. package/types-legacy/ts4.5/channel/Contract.d.ts +248 -0
  473. package/types-legacy/ts4.5/channel/Spend.d.ts +219 -0
  474. package/types-legacy/ts4.5/channel/handlers.d.ts +21 -0
  475. package/types-legacy/ts4.5/channel/internal.d.ts +107 -0
  476. package/types-legacy/ts4.5/contract/Contract.d.ts +212 -0
  477. package/types-legacy/ts4.5/contract/compiler/Base.d.ts +81 -0
  478. package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +23 -0
  479. package/types-legacy/ts4.5/contract/compiler/Http.d.ts +32 -0
  480. package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +17 -0
  481. package/types-legacy/ts4.5/contract/compiler/getFileSystem.d.ts +6 -0
  482. package/types-legacy/ts4.5/contract/ga.d.ts +44 -0
  483. package/types-legacy/ts4.5/index-browser.d.ts +39 -0
  484. package/types-legacy/ts4.5/index.d.ts +4 -0
  485. package/types-legacy/ts4.5/oracle.d.ts +161 -0
  486. package/types-legacy/ts4.5/spend.d.ts +62 -0
  487. package/types-legacy/ts4.5/tx/builder/constants.d.ts +98 -0
  488. package/types-legacy/ts4.5/tx/builder/field-types/abi-version.d.ts +10 -0
  489. package/types-legacy/ts4.5/tx/builder/field-types/address.d.ts +21 -0
  490. package/types-legacy/ts4.5/tx/builder/field-types/array.d.ts +7 -0
  491. package/types-legacy/ts4.5/tx/builder/field-types/boolean.d.ts +6 -0
  492. package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +12 -0
  493. package/types-legacy/ts4.5/tx/builder/field-types/ct-version.d.ts +42 -0
  494. package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +14 -0
  495. package/types-legacy/ts4.5/tx/builder/field-types/encoded.d.ts +6 -0
  496. package/types-legacy/ts4.5/tx/builder/field-types/entry.d.ts +11 -0
  497. package/types-legacy/ts4.5/tx/builder/field-types/enumeration.d.ts +7 -0
  498. package/types-legacy/ts4.5/tx/builder/field-types/fee.d.ts +20 -0
  499. package/types-legacy/ts4.5/tx/builder/field-types/field.d.ts +6 -0
  500. package/types-legacy/ts4.5/tx/builder/field-types/gas-limit.d.ts +15 -0
  501. package/types-legacy/ts4.5/tx/builder/field-types/gas-price.d.ts +7 -0
  502. package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +129 -0
  503. package/types-legacy/ts4.5/tx/builder/field-types/mptree.d.ts +43 -0
  504. package/types-legacy/ts4.5/tx/builder/field-types/name-fee.d.ts +18 -0
  505. package/types-legacy/ts4.5/tx/builder/field-types/name-id.d.ts +11 -0
  506. package/types-legacy/ts4.5/tx/builder/field-types/name.d.ts +13 -0
  507. package/types-legacy/ts4.5/tx/builder/field-types/pointers.d.ts +26 -0
  508. package/types-legacy/ts4.5/tx/builder/field-types/raw.d.ts +6 -0
  509. package/types-legacy/ts4.5/tx/builder/field-types/short-u-int-const.d.ts +5 -0
  510. package/types-legacy/ts4.5/tx/builder/field-types/short-u-int.d.ts +6 -0
  511. package/types-legacy/ts4.5/tx/builder/field-types/string.d.ts +6 -0
  512. package/types-legacy/ts4.5/tx/builder/field-types/u-int.d.ts +7 -0
  513. package/types-legacy/ts4.5/tx/builder/helpers.d.ts +112 -0
  514. package/types-legacy/ts4.5/tx/builder/index.d.ts +50 -0
  515. package/types-legacy/ts4.5/tx/builder/schema.d.ts +4675 -0
  516. package/types-legacy/ts4.5/tx/index.d.ts +19 -0
  517. package/types-legacy/ts4.5/tx/validator.d.ts +18 -0
  518. package/types-legacy/ts4.5/utils/amount-formatter.d.ts +42 -0
  519. package/types-legacy/ts4.5/utils/autorest.d.ts +7 -0
  520. package/types-legacy/ts4.5/utils/bignumber.d.ts +13 -0
  521. package/types-legacy/ts4.5/utils/bytes.d.ts +9 -0
  522. package/types-legacy/ts4.5/utils/crypto.d.ts +95 -0
  523. package/types-legacy/ts4.5/utils/encoder-types.d.ts +61 -0
  524. package/types-legacy/ts4.5/utils/encoder.d.ts +24 -0
  525. package/types-legacy/ts4.5/utils/errors.d.ts +475 -0
  526. package/types-legacy/ts4.5/utils/hd-wallet.d.ts +65 -0
  527. package/types-legacy/ts4.5/utils/json-big.d.ts +5 -0
  528. package/types-legacy/ts4.5/utils/keystore.d.ts +53 -0
  529. package/types-legacy/ts4.5/utils/other.d.ts +31 -0
  530. package/types-legacy/ts4.5/utils/semver-satisfies.d.ts +1 -0
  531. package/types-legacy/ts4.5/utils/string.d.ts +12 -0
  532. package/es/channel/index.d.ts +0 -625
  533. package/es/channel/index.mjs +0 -975
  534. package/es/channel/index.mjs.map +0 -1
  535. package/es/contract/Compiler.d.ts +0 -18
  536. package/es/contract/Compiler.mjs +0 -68
  537. package/es/contract/Compiler.mjs.map +0 -1
  538. package/es/contract/aci.d.ts +0 -127
  539. package/es/contract/aci.mjs +0 -508
  540. package/es/contract/aci.mjs.map +0 -1
  541. package/es/contract/methods.d.ts +0 -71
  542. package/es/contract/methods.mjs +0 -104
  543. package/es/contract/methods.mjs.map +0 -1
  544. package/es/deprecated/index.d.ts +0 -143
  545. package/es/deprecated/index.mjs +0 -162
  546. package/es/deprecated/index.mjs.map +0 -1
  547. package/es/deprecated/methods.d.ts +0 -18
  548. package/es/deprecated/methods.mjs +0 -26
  549. package/es/deprecated/methods.mjs.map +0 -1
  550. package/es/tx/builder/address.d.ts +0 -25
  551. package/es/tx/builder/address.mjs +0 -45
  552. package/es/tx/builder/address.mjs.map +0 -1
  553. package/es/typings/@aeternity__argon2-browser/index.d.mjs.map +0 -1
  554. package/es/utils/mptree.d.ts +0 -26
  555. package/es/utils/mptree.mjs +0 -165
  556. package/es/utils/mptree.mjs.map +0 -1
  557. package/src/channel/index.ts +0 -1025
  558. package/src/contract/Compiler.ts +0 -67
  559. package/src/contract/aci.ts +0 -537
  560. package/src/contract/methods.ts +0 -123
  561. package/src/deprecated/index.ts +0 -172
  562. package/src/deprecated/methods.ts +0 -25
  563. package/src/tx/builder/address.ts +0 -50
  564. package/src/typings/@aeternity__argon2-browser/index.d.ts +0 -3
  565. package/src/utils/mptree.ts +0 -145
@@ -1,104 +0,0 @@
1
- import _buffer from "buffer";
2
- const {
3
- Buffer: _Buffer
4
- } = _buffer;
5
-
6
- /*
7
- * ISC License (ISC)
8
- * Copyright (c) 2022 aeternity developers
9
- *
10
- * Permission to use, copy, modify, and/or distribute this software for any
11
- * purpose with or without fee is hereby granted, provided that the above
12
- * copyright notice and this permission notice appear in all copies.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
16
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
17
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
18
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
- * PERFORMANCE OF THIS SOFTWARE.
21
- */
22
-
23
- /**
24
- * Contract module - routines to interact with the æternity contract
25
- *
26
- * High level documentation of the contracts are available at
27
- * https://github.com/aeternity/protocol/tree/master/contracts and
28
- */
29
- import { produceNameId } from "../tx/builder/helpers.mjs";
30
- import { concatBuffers } from "../utils/other.mjs";
31
- import { decode } from "../utils/encoder.mjs";
32
- export { default as getContractInstance } from "./aci.mjs";
33
- /**
34
- * Utility method to create a delegate signature for a contract
35
- * @category contract
36
- * @param ids - The list of id's to prepend
37
- * @param opt - Options
38
- * @param opt.onNode - Node to use
39
- * @param opt.onAccount - Account to use
40
- * @returns Signature in hex representation
41
- */
42
-
43
- async function delegateSignatureCommon(ids, _ref) {
44
- let {
45
- onAccount,
46
- onNode,
47
- ...opt
48
- } = _ref;
49
- const signature = await onAccount.sign(concatBuffers([_Buffer.from((await onNode.getStatus()).networkId), ...ids.map(e => decode(e))]), opt);
50
- return _Buffer.from(signature).toString('hex');
51
- }
52
- /**
53
- * Helper to generate a signature to delegate pre-claim/claim/transfer/revoke of a name to
54
- * a contract.
55
- * @category contract
56
- * @param contractId - Contract Id
57
- * @param opt - Options
58
- * @param opt.name - The name
59
- * @returns Signature for delegation
60
- * @example
61
- * ```js
62
- * const aeSdk = new AeSdk({ ... })
63
- * const contractId = 'ct_asd2ks...' // contract address
64
- * const name = 'example.chain' // AENS name
65
- * const onAccount = await aeSdk.address() // Sign with a specific account
66
- * // Preclaim signature
67
- * const preclaimSig = await aeSdk.createAensDelegationSignature(contractId, { onAccount: current })
68
- * // Claim, transfer and revoke signature
69
- * const aensDelegationSig = await contract.createAensDelegationSignature(
70
- * contractId, { name, onAccount: current }
71
- * )
72
- * ```
73
- */
74
-
75
-
76
- export async function createAensDelegationSignature(contractId, opt) {
77
- return delegateSignatureCommon([await opt.onAccount.address(opt), ...(opt.name != null ? [produceNameId(opt.name)] : []), contractId], opt);
78
- }
79
- /**
80
- * Helper to generate a signature to delegate register/extend/respond of a Oracle to a contract.
81
- * @category contract
82
- * @param contractId - Contract Id
83
- * @param opt - Options
84
- * @param opt.queryId - Oracle Query Id
85
- * @returns Signature for delegation
86
- * @example
87
- * ```js
88
- * const aeSdk = new AeSdk({ ... })
89
- * const contractId = 'ct_asd2ks...' // contract address
90
- * const queryId = 'oq_...' // Oracle Query Id
91
- * const onAccount = await aeSdk.address() // Sign with a specific account
92
- * // Oracle register and extend signature
93
- * const oracleDelegationSig = await aeSdk.createOracleDelegationSignature(contractId)
94
- * // Oracle respond signature
95
- * const respondSig = await aeSdk.createOracleDelegationSignature(contractId, { queryId })
96
- * ```
97
- */
98
-
99
- export async function createOracleDelegationSignature(contractId, opt) {
100
- var _opt$queryId;
101
-
102
- return delegateSignatureCommon([(_opt$queryId = opt.queryId) !== null && _opt$queryId !== void 0 ? _opt$queryId : await opt.onAccount.address(opt), contractId], opt);
103
- }
104
- //# sourceMappingURL=methods.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"methods.mjs","names":["produceNameId","concatBuffers","decode","default","getContractInstance","delegateSignatureCommon","ids","onAccount","onNode","opt","signature","sign","from","getStatus","networkId","map","e","toString","createAensDelegationSignature","contractId","address","name","createOracleDelegationSignature","queryId"],"sources":["../../src/contract/methods.ts"],"sourcesContent":["/*\n * ISC License (ISC)\n * Copyright (c) 2022 aeternity developers\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n * PERFORMANCE OF THIS SOFTWARE.\n */\n\n/**\n * Contract module - routines to interact with the æternity contract\n *\n * High level documentation of the contracts are available at\n * https://github.com/aeternity/protocol/tree/master/contracts and\n */\n\nimport { AensName } from '../tx/builder/constants';\nimport { produceNameId } from '../tx/builder/helpers';\nimport { concatBuffers } from '../utils/other';\nimport { decode, Encoded } from '../utils/encoder';\nimport AccountBase from '../account/Base';\nimport Node from '../Node';\n\nexport { default as getContractInstance } from './aci';\n\n/**\n * Utility method to create a delegate signature for a contract\n * @category contract\n * @param ids - The list of id's to prepend\n * @param opt - Options\n * @param opt.onNode - Node to use\n * @param opt.onAccount - Account to use\n * @returns Signature in hex representation\n */\nasync function delegateSignatureCommon(\n ids: Encoded.Any[],\n { onAccount, onNode, ...opt }:\n { onAccount: AccountBase; onNode: Node } & Parameters<AccountBase['sign']>[1],\n): Promise<string> {\n const signature = await onAccount.sign(\n concatBuffers([\n Buffer.from((await onNode.getStatus()).networkId),\n ...ids.map((e) => decode(e)),\n ]),\n opt,\n );\n return Buffer.from(signature).toString('hex');\n}\n\n/**\n * Helper to generate a signature to delegate pre-claim/claim/transfer/revoke of a name to\n * a contract.\n * @category contract\n * @param contractId - Contract Id\n * @param opt - Options\n * @param opt.name - The name\n * @returns Signature for delegation\n * @example\n * ```js\n * const aeSdk = new AeSdk({ ... })\n * const contractId = 'ct_asd2ks...' // contract address\n * const name = 'example.chain' // AENS name\n * const onAccount = await aeSdk.address() // Sign with a specific account\n * // Preclaim signature\n * const preclaimSig = await aeSdk.createAensDelegationSignature(contractId, { onAccount: current })\n * // Claim, transfer and revoke signature\n * const aensDelegationSig = await contract.createAensDelegationSignature(\n * contractId, { name, onAccount: current }\n * )\n * ```\n */\nexport async function createAensDelegationSignature(\n contractId: Encoded.ContractAddress,\n opt: Parameters<AccountBase['address']>[0] & Parameters<typeof delegateSignatureCommon>[1] &\n { name?: AensName },\n): Promise<string> {\n return delegateSignatureCommon(\n [\n await opt.onAccount.address(opt),\n ...opt.name != null ? [produceNameId(opt.name)] : [],\n contractId,\n ],\n opt,\n );\n}\n\n/**\n * Helper to generate a signature to delegate register/extend/respond of a Oracle to a contract.\n * @category contract\n * @param contractId - Contract Id\n * @param opt - Options\n * @param opt.queryId - Oracle Query Id\n * @returns Signature for delegation\n * @example\n * ```js\n * const aeSdk = new AeSdk({ ... })\n * const contractId = 'ct_asd2ks...' // contract address\n * const queryId = 'oq_...' // Oracle Query Id\n * const onAccount = await aeSdk.address() // Sign with a specific account\n * // Oracle register and extend signature\n * const oracleDelegationSig = await aeSdk.createOracleDelegationSignature(contractId)\n * // Oracle respond signature\n * const respondSig = await aeSdk.createOracleDelegationSignature(contractId, { queryId })\n * ```\n */\nexport async function createOracleDelegationSignature(\n contractId: Encoded.ContractAddress,\n opt: Parameters<AccountBase['address']>[0] & Parameters<typeof delegateSignatureCommon>[1] &\n { queryId?: Encoded.OracleQueryId },\n): Promise<string> {\n return delegateSignatureCommon(\n [opt.queryId ?? await opt.onAccount.address(opt), contractId],\n opt,\n );\n}\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;SAGSA,a;SACAC,a;SACAC,M;SAIAC,OAAO,IAAIC,mB;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeC,uBAAf,CACEC,GADF,QAImB;EAAA,IAFjB;IAAEC,SAAF;IAAaC,MAAb;IAAqB,GAAGC;EAAxB,CAEiB;EACjB,MAAMC,SAAS,GAAG,MAAMH,SAAS,CAACI,IAAV,CACtBV,aAAa,CAAC,CACZ,QAAOW,IAAP,CAAY,CAAC,MAAMJ,MAAM,CAACK,SAAP,EAAP,EAA2BC,SAAvC,CADY,EAEZ,GAAGR,GAAG,CAACS,GAAJ,CAASC,CAAD,IAAOd,MAAM,CAACc,CAAD,CAArB,CAFS,CAAD,CADS,EAKtBP,GALsB,CAAxB;EAOA,OAAO,QAAOG,IAAP,CAAYF,SAAZ,EAAuBO,QAAvB,CAAgC,KAAhC,CAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,eAAeC,6BAAf,CACLC,UADK,EAELV,GAFK,EAIY;EACjB,OAAOJ,uBAAuB,CAC5B,CACE,MAAMI,GAAG,CAACF,SAAJ,CAAca,OAAd,CAAsBX,GAAtB,CADR,EAEE,IAAGA,GAAG,CAACY,IAAJ,IAAY,IAAZ,GAAmB,CAACrB,aAAa,CAACS,GAAG,CAACY,IAAL,CAAd,CAAnB,GAA+C,EAAlD,CAFF,EAGEF,UAHF,CAD4B,EAM5BV,GAN4B,CAA9B;AAQD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,eAAea,+BAAf,CACLH,UADK,EAELV,GAFK,EAIY;EAAA;;EACjB,OAAOJ,uBAAuB,CAC5B,iBAACI,GAAG,CAACc,OAAL,uDAAgB,MAAMd,GAAG,CAACF,SAAJ,CAAca,OAAd,CAAsBX,GAAtB,CAAtB,EAAkDU,UAAlD,CAD4B,EAE5BV,GAF4B,CAA9B;AAID"}
@@ -1,143 +0,0 @@
1
- import BigNumber from 'bignumber.js';
2
- import { Tag } from '../tx/builder/constants';
3
- import { TxParamsCommon } from '../tx/builder/schema';
4
- import { AE_AMOUNT_FORMATS } from '../utils/amount-formatter';
5
- import { Encoding } from '../utils/encoder';
6
- export * from './methods';
7
- /**
8
- * @deprecated use NamePointer from apis/node instead
9
- * @hidden
10
- */
11
- export interface Pointer {
12
- key: string;
13
- id: string;
14
- }
15
- /**
16
- * @deprecated use genSalt instead
17
- * @hidden
18
- */
19
- export declare function salt(): number;
20
- /**
21
- * @deprecated use genSalt instead
22
- * @hidden
23
- */
24
- export declare const createSalt: typeof salt;
25
- /**
26
- * Calculate min fee
27
- * @category transaction builder
28
- * @param txType - Transaction type
29
- * @param options - Options object
30
- * @param options.params - Tx params
31
- * @deprecated use buildTx to generate transaction, unpack it and refer to `fee` field
32
- * @hidden
33
- * @example
34
- * ```js
35
- * calculateMinFee('spendTx', { gasLimit, params })
36
- * ```
37
- */
38
- export declare function calculateMinFee(txType: Tag, { params, vsn, denomination }: CalculateMinFeeOptions): BigNumber;
39
- interface CalculateMinFeeOptions {
40
- params: TxParamsCommon;
41
- vsn?: number;
42
- denomination?: AE_AMOUNT_FORMATS;
43
- }
44
- /**
45
- * @deprecated Maximum gas limit depends on transaction size, this value is outdated,
46
- * sdk check/provides gasLimit by itself while building a transaction
47
- * @hidden
48
- */
49
- export declare const GAS_MAX: number;
50
- /**
51
- * @deprecated use `Tag`
52
- * @hidden
53
- */
54
- export declare enum TX_TYPE {
55
- account = 10,
56
- signed = 11,
57
- spend = 12,
58
- oracleRegister = 22,
59
- oracleQuery = 23,
60
- oracleResponse = 24,
61
- oracleExtend = 25,
62
- nameClaim = 32,
63
- namePreClaim = 33,
64
- nameUpdate = 34,
65
- nameRevoke = 35,
66
- nameTransfer = 36,
67
- contract = 40,
68
- contractCallResult = 41,
69
- contractCreate = 42,
70
- contractCall = 43,
71
- channelCreate = 50,
72
- channelDeposit = 51,
73
- channelWithdraw = 52,
74
- channelCloseMutual = 53,
75
- channelCloseSolo = 54,
76
- channelSlash = 55,
77
- channelSettle = 56,
78
- channelOffChain = 57,
79
- channel = 58,
80
- channelSnapshotSolo = 59,
81
- proofOfInclusion = 60,
82
- stateTrees = 62,
83
- merklePatriciaTree = 63,
84
- merklePatriciaTreeValue = 64,
85
- sophiaByteCode = 70,
86
- gaAttach = 80,
87
- gaMeta = 81,
88
- payingFor = 82,
89
- channelForceProgress = 521,
90
- channelOffChainUpdateTransfer = 570,
91
- channelOffChainUpdateDeposit = 571,
92
- channelOffChainUpdateWithdrawal = 572,
93
- channelOffChainCreateContract = 573,
94
- channelOffChainCallContract = 574,
95
- channelReconnect = 575,
96
- contractsTree = 621,
97
- contractCallsTree = 622,
98
- channelsTree = 623,
99
- nameserviceTree = 624,
100
- oraclesTree = 625,
101
- accountsTree = 626
102
- }
103
- /**
104
- * @deprecated use `readId`, `writeId`
105
- * @hidden
106
- */
107
- export declare const ID_TAG: {
108
- readonly account: 1;
109
- readonly name: 2;
110
- readonly commitment: 3;
111
- readonly oracle: 4;
112
- readonly contract: 5;
113
- readonly channel: 6;
114
- };
115
- /**
116
- * @deprecated use `readId`, `writeId`
117
- * @hidden
118
- */
119
- export declare const PREFIX_ID_TAG: {
120
- readonly ak: 1;
121
- readonly nm: 2;
122
- readonly cm: 3;
123
- readonly ok: 4;
124
- readonly ct: 5;
125
- readonly ch: 6;
126
- };
127
- /**
128
- * @deprecated use `readId`, `writeId`
129
- * @hidden
130
- */
131
- export declare const ID_TAG_PREFIX: {
132
- [k: string]: Encoding;
133
- };
134
- /**
135
- * @deprecated use `getDefaultPointerKey`
136
- * @hidden
137
- */
138
- export declare enum POINTER_KEY_BY_PREFIX {
139
- ak = "account_pubkey",
140
- ok = "oracle_pubkey",
141
- ct = "contract_pubkey",
142
- ch = "channel"
143
- }
@@ -1,162 +0,0 @@
1
- import { buildTx } from "../tx/builder/index.mjs";
2
- import { calculateMinFee as calculateMinFeeInternal } from "../tx/builder/field-types/fee.mjs";
3
- import { mapObject } from "../utils/other.mjs";
4
- export * from "./methods.mjs";
5
- /**
6
- * @deprecated use NamePointer from apis/node instead
7
- * @hidden
8
- */
9
-
10
- /**
11
- * @deprecated use genSalt instead
12
- * @hidden
13
- */
14
- export function salt() {
15
- return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
16
- }
17
- /**
18
- * @deprecated use genSalt instead
19
- * @hidden
20
- */
21
-
22
- export const createSalt = salt;
23
- /**
24
- * Calculate min fee
25
- * @category transaction builder
26
- * @param txType - Transaction type
27
- * @param options - Options object
28
- * @param options.params - Tx params
29
- * @deprecated use buildTx to generate transaction, unpack it and refer to `fee` field
30
- * @hidden
31
- * @example
32
- * ```js
33
- * calculateMinFee('spendTx', { gasLimit, params })
34
- * ```
35
- */
36
-
37
- export function calculateMinFee(txType, _ref) {
38
- let {
39
- params,
40
- vsn,
41
- denomination
42
- } = _ref;
43
- return calculateMinFeeInternal(txType, fee => // @ts-expect-error anyway this planned to be removed
44
- buildTx({ ...params,
45
- _computingMinFee: fee
46
- }, txType, {
47
- vsn,
48
- denomination
49
- }));
50
- }
51
-
52
- /**
53
- * @deprecated Maximum gas limit depends on transaction size, this value is outdated,
54
- * sdk check/provides gasLimit by itself while building a transaction
55
- * @hidden
56
- */
57
- export const GAS_MAX = 1600000 - 21000;
58
- /**
59
- * @deprecated use `Tag`
60
- * @hidden
61
- */
62
-
63
- export let TX_TYPE;
64
- /**
65
- * @deprecated use `readId`, `writeId`
66
- * @hidden
67
- */
68
-
69
- (function (TX_TYPE) {
70
- TX_TYPE[TX_TYPE["account"] = 10] = "account";
71
- TX_TYPE[TX_TYPE["signed"] = 11] = "signed";
72
- TX_TYPE[TX_TYPE["spend"] = 12] = "spend";
73
- TX_TYPE[TX_TYPE["oracleRegister"] = 22] = "oracleRegister";
74
- TX_TYPE[TX_TYPE["oracleQuery"] = 23] = "oracleQuery";
75
- TX_TYPE[TX_TYPE["oracleResponse"] = 24] = "oracleResponse";
76
- TX_TYPE[TX_TYPE["oracleExtend"] = 25] = "oracleExtend";
77
- TX_TYPE[TX_TYPE["nameClaim"] = 32] = "nameClaim";
78
- TX_TYPE[TX_TYPE["namePreClaim"] = 33] = "namePreClaim";
79
- TX_TYPE[TX_TYPE["nameUpdate"] = 34] = "nameUpdate";
80
- TX_TYPE[TX_TYPE["nameRevoke"] = 35] = "nameRevoke";
81
- TX_TYPE[TX_TYPE["nameTransfer"] = 36] = "nameTransfer";
82
- TX_TYPE[TX_TYPE["contract"] = 40] = "contract";
83
- TX_TYPE[TX_TYPE["contractCallResult"] = 41] = "contractCallResult";
84
- TX_TYPE[TX_TYPE["contractCreate"] = 42] = "contractCreate";
85
- TX_TYPE[TX_TYPE["contractCall"] = 43] = "contractCall";
86
- TX_TYPE[TX_TYPE["channelCreate"] = 50] = "channelCreate";
87
- TX_TYPE[TX_TYPE["channelDeposit"] = 51] = "channelDeposit";
88
- TX_TYPE[TX_TYPE["channelWithdraw"] = 52] = "channelWithdraw";
89
- TX_TYPE[TX_TYPE["channelCloseMutual"] = 53] = "channelCloseMutual";
90
- TX_TYPE[TX_TYPE["channelCloseSolo"] = 54] = "channelCloseSolo";
91
- TX_TYPE[TX_TYPE["channelSlash"] = 55] = "channelSlash";
92
- TX_TYPE[TX_TYPE["channelSettle"] = 56] = "channelSettle";
93
- TX_TYPE[TX_TYPE["channelOffChain"] = 57] = "channelOffChain";
94
- TX_TYPE[TX_TYPE["channel"] = 58] = "channel";
95
- TX_TYPE[TX_TYPE["channelSnapshotSolo"] = 59] = "channelSnapshotSolo";
96
- TX_TYPE[TX_TYPE["proofOfInclusion"] = 60] = "proofOfInclusion";
97
- TX_TYPE[TX_TYPE["stateTrees"] = 62] = "stateTrees";
98
- TX_TYPE[TX_TYPE["merklePatriciaTree"] = 63] = "merklePatriciaTree";
99
- TX_TYPE[TX_TYPE["merklePatriciaTreeValue"] = 64] = "merklePatriciaTreeValue";
100
- TX_TYPE[TX_TYPE["sophiaByteCode"] = 70] = "sophiaByteCode";
101
- TX_TYPE[TX_TYPE["gaAttach"] = 80] = "gaAttach";
102
- TX_TYPE[TX_TYPE["gaMeta"] = 81] = "gaMeta";
103
- TX_TYPE[TX_TYPE["payingFor"] = 82] = "payingFor";
104
- TX_TYPE[TX_TYPE["channelForceProgress"] = 521] = "channelForceProgress";
105
- TX_TYPE[TX_TYPE["channelOffChainUpdateTransfer"] = 570] = "channelOffChainUpdateTransfer";
106
- TX_TYPE[TX_TYPE["channelOffChainUpdateDeposit"] = 571] = "channelOffChainUpdateDeposit";
107
- TX_TYPE[TX_TYPE["channelOffChainUpdateWithdrawal"] = 572] = "channelOffChainUpdateWithdrawal";
108
- TX_TYPE[TX_TYPE["channelOffChainCreateContract"] = 573] = "channelOffChainCreateContract";
109
- TX_TYPE[TX_TYPE["channelOffChainCallContract"] = 574] = "channelOffChainCallContract";
110
- TX_TYPE[TX_TYPE["channelReconnect"] = 575] = "channelReconnect";
111
- TX_TYPE[TX_TYPE["contractsTree"] = 621] = "contractsTree";
112
- TX_TYPE[TX_TYPE["contractCallsTree"] = 622] = "contractCallsTree";
113
- TX_TYPE[TX_TYPE["channelsTree"] = 623] = "channelsTree";
114
- TX_TYPE[TX_TYPE["nameserviceTree"] = 624] = "nameserviceTree";
115
- TX_TYPE[TX_TYPE["oraclesTree"] = 625] = "oraclesTree";
116
- TX_TYPE[TX_TYPE["accountsTree"] = 626] = "accountsTree";
117
- })(TX_TYPE || (TX_TYPE = {}));
118
-
119
- export const ID_TAG = {
120
- account: 1,
121
- name: 2,
122
- commitment: 3,
123
- oracle: 4,
124
- contract: 5,
125
- channel: 6
126
- };
127
- /**
128
- * @deprecated use `readId`, `writeId`
129
- * @hidden
130
- */
131
-
132
- export const PREFIX_ID_TAG = {
133
- ak: ID_TAG.account,
134
- nm: ID_TAG.name,
135
- cm: ID_TAG.commitment,
136
- ok: ID_TAG.oracle,
137
- ct: ID_TAG.contract,
138
- ch: ID_TAG.channel
139
- };
140
- /**
141
- * @deprecated use `readId`, `writeId`
142
- * @hidden
143
- */
144
-
145
- export const ID_TAG_PREFIX = mapObject(PREFIX_ID_TAG, _ref2 => {
146
- let [key, value] = _ref2;
147
- return [value, key];
148
- });
149
- /**
150
- * @deprecated use `getDefaultPointerKey`
151
- * @hidden
152
- */
153
-
154
- export let POINTER_KEY_BY_PREFIX;
155
-
156
- (function (POINTER_KEY_BY_PREFIX) {
157
- POINTER_KEY_BY_PREFIX["ak"] = "account_pubkey";
158
- POINTER_KEY_BY_PREFIX["ok"] = "oracle_pubkey";
159
- POINTER_KEY_BY_PREFIX["ct"] = "contract_pubkey";
160
- POINTER_KEY_BY_PREFIX["ch"] = "channel";
161
- })(POINTER_KEY_BY_PREFIX || (POINTER_KEY_BY_PREFIX = {}));
162
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["buildTx","calculateMinFee","calculateMinFeeInternal","mapObject","salt","Math","floor","random","Number","MAX_SAFE_INTEGER","createSalt","txType","params","vsn","denomination","fee","_computingMinFee","GAS_MAX","TX_TYPE","ID_TAG","account","name","commitment","oracle","contract","channel","PREFIX_ID_TAG","ak","nm","cm","ok","ct","ch","ID_TAG_PREFIX","key","value","POINTER_KEY_BY_PREFIX"],"sources":["../../src/deprecated/index.ts"],"sourcesContent":["import BigNumber from 'bignumber.js';\nimport { buildTx } from '../tx/builder';\nimport { Tag } from '../tx/builder/constants';\nimport { calculateMinFee as calculateMinFeeInternal } from '../tx/builder/field-types/fee';\nimport { TxParamsCommon } from '../tx/builder/schema';\nimport { AE_AMOUNT_FORMATS } from '../utils/amount-formatter';\nimport { mapObject } from '../utils/other';\nimport { Encoding } from '../utils/encoder';\n\nexport * from './methods';\n\n/**\n * @deprecated use NamePointer from apis/node instead\n * @hidden\n */\nexport interface Pointer {\n key: string;\n id: string;\n}\n\n/**\n * @deprecated use genSalt instead\n * @hidden\n */\nexport function salt(): number {\n return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));\n}\n\n/**\n * @deprecated use genSalt instead\n * @hidden\n */\nexport const createSalt = salt;\n\n/**\n * Calculate min fee\n * @category transaction builder\n * @param txType - Transaction type\n * @param options - Options object\n * @param options.params - Tx params\n * @deprecated use buildTx to generate transaction, unpack it and refer to `fee` field\n * @hidden\n * @example\n * ```js\n * calculateMinFee('spendTx', { gasLimit, params })\n * ```\n */\nexport function calculateMinFee(\n txType: Tag,\n { params, vsn, denomination }: CalculateMinFeeOptions,\n): BigNumber {\n return calculateMinFeeInternal(\n txType,\n (fee: BigNumber) => (\n // @ts-expect-error anyway this planned to be removed\n buildTx({ ...params, _computingMinFee: fee }, txType, { vsn, denomination })\n ),\n );\n}\n\ninterface CalculateMinFeeOptions {\n params: TxParamsCommon;\n vsn?: number;\n denomination?: AE_AMOUNT_FORMATS;\n}\n\n/**\n * @deprecated Maximum gas limit depends on transaction size, this value is outdated,\n * sdk check/provides gasLimit by itself while building a transaction\n * @hidden\n */\nexport const GAS_MAX = 1600000 - 21000;\n\n/**\n * @deprecated use `Tag`\n * @hidden\n */\nexport enum TX_TYPE {\n account = 10,\n signed = 11,\n spend = 12,\n oracleRegister = 22,\n oracleQuery = 23,\n oracleResponse = 24,\n oracleExtend = 25,\n nameClaim = 32,\n namePreClaim = 33,\n nameUpdate = 34,\n nameRevoke = 35,\n nameTransfer = 36,\n contract = 40,\n contractCallResult = 41,\n contractCreate = 42,\n contractCall = 43,\n channelCreate = 50,\n channelDeposit = 51,\n channelWithdraw = 52,\n channelCloseMutual = 53,\n channelCloseSolo = 54,\n channelSlash = 55,\n channelSettle = 56,\n channelOffChain = 57,\n channel = 58,\n channelSnapshotSolo = 59,\n proofOfInclusion = 60,\n stateTrees = 62,\n merklePatriciaTree = 63,\n merklePatriciaTreeValue = 64,\n sophiaByteCode = 70,\n gaAttach = 80,\n gaMeta = 81,\n payingFor = 82,\n channelForceProgress = 521,\n channelOffChainUpdateTransfer = 570,\n channelOffChainUpdateDeposit = 571,\n channelOffChainUpdateWithdrawal = 572,\n channelOffChainCreateContract = 573,\n channelOffChainCallContract = 574,\n channelReconnect = 575,\n contractsTree = 621,\n contractCallsTree = 622,\n channelsTree = 623,\n nameserviceTree = 624,\n oraclesTree = 625,\n accountsTree = 626,\n}\n\n/**\n * @deprecated use `readId`, `writeId`\n * @hidden\n */\nexport const ID_TAG = {\n account: 1,\n name: 2,\n commitment: 3,\n oracle: 4,\n contract: 5,\n channel: 6,\n} as const;\n\n/**\n * @deprecated use `readId`, `writeId`\n * @hidden\n */\nexport const PREFIX_ID_TAG = {\n ak: ID_TAG.account,\n nm: ID_TAG.name,\n cm: ID_TAG.commitment,\n ok: ID_TAG.oracle,\n ct: ID_TAG.contract,\n ch: ID_TAG.channel,\n} as const;\n\n/**\n * @deprecated use `readId`, `writeId`\n * @hidden\n */\nexport const ID_TAG_PREFIX = mapObject(\n PREFIX_ID_TAG,\n ([key, value]: [Encoding, number]) => [value, key],\n);\n\n/**\n * @deprecated use `getDefaultPointerKey`\n * @hidden\n */\nexport enum POINTER_KEY_BY_PREFIX {\n ak = 'account_pubkey',\n ok = 'oracle_pubkey',\n ct = 'contract_pubkey',\n ch = 'channel',\n}\n"],"mappings":"SACSA,O;SAEAC,eAAe,IAAIC,uB;SAGnBC,S;;AAKT;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAT,GAAwB;EAC7B,OAAOC,IAAI,CAACC,KAAL,CAAWD,IAAI,CAACE,MAAL,KAAgBF,IAAI,CAACC,KAAL,CAAWE,MAAM,CAACC,gBAAlB,CAA3B,CAAP;AACD;AAED;AACA;AACA;AACA;;AACA,OAAO,MAAMC,UAAU,GAAGN,IAAnB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASH,eAAT,CACLU,MADK,QAGM;EAAA,IADX;IAAEC,MAAF;IAAUC,GAAV;IAAeC;EAAf,CACW;EACX,OAAOZ,uBAAuB,CAC5BS,MAD4B,EAE3BI,GAAD,IACE;EACAf,OAAO,CAAC,EAAE,GAAGY,MAAL;IAAaI,gBAAgB,EAAED;EAA/B,CAAD,EAAuCJ,MAAvC,EAA+C;IAAEE,GAAF;IAAOC;EAAP,CAA/C,CAJmB,CAA9B;AAOD;;AAQD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,OAAO,GAAG,UAAU,KAA1B;AAEP;AACA;AACA;AACA;;AACA,WAAYC,OAAZ;AAkDA;AACA;AACA;AACA;;WArDYA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;EAAAA,O,CAAAA,O;GAAAA,O,KAAAA,O;;AAsDZ,OAAO,MAAMC,MAAM,GAAG;EACpBC,OAAO,EAAE,CADW;EAEpBC,IAAI,EAAE,CAFc;EAGpBC,UAAU,EAAE,CAHQ;EAIpBC,MAAM,EAAE,CAJY;EAKpBC,QAAQ,EAAE,CALU;EAMpBC,OAAO,EAAE;AANW,CAAf;AASP;AACA;AACA;AACA;;AACA,OAAO,MAAMC,aAAa,GAAG;EAC3BC,EAAE,EAAER,MAAM,CAACC,OADgB;EAE3BQ,EAAE,EAAET,MAAM,CAACE,IAFgB;EAG3BQ,EAAE,EAAEV,MAAM,CAACG,UAHgB;EAI3BQ,EAAE,EAAEX,MAAM,CAACI,MAJgB;EAK3BQ,EAAE,EAAEZ,MAAM,CAACK,QALgB;EAM3BQ,EAAE,EAAEb,MAAM,CAACM;AANgB,CAAtB;AASP;AACA;AACA;AACA;;AACA,OAAO,MAAMQ,aAAa,GAAG9B,SAAS,CACpCuB,aADoC,EAEpC;EAAA,IAAC,CAACQ,GAAD,EAAMC,KAAN,CAAD;EAAA,OAAsC,CAACA,KAAD,EAAQD,GAAR,CAAtC;AAAA,CAFoC,CAA/B;AAKP;AACA;AACA;AACA;;AACA,WAAYE,qBAAZ;;WAAYA,qB;EAAAA,qB;EAAAA,qB;EAAAA,qB;EAAAA,qB;GAAAA,qB,KAAAA,qB"}
@@ -1,18 +0,0 @@
1
- import { Encoded } from '../utils/encoder';
2
- import { createMetaTx } from '../contract/ga';
3
- import Node from '../Node';
4
- /**
5
- * @deprecated Use createMetaTx instead
6
- * @hidden
7
- */
8
- export declare function signUsingGA(tx: Encoded.Transaction, { authData, authFun, ...options }: {
9
- authData: Parameters<typeof createMetaTx>[1];
10
- authFun: Parameters<typeof createMetaTx>[2];
11
- } & Parameters<typeof createMetaTx>[3]): Promise<Encoded.Transaction>;
12
- /**
13
- * @deprecated Use getHeight instead
14
- * @hidden
15
- */
16
- export declare function height({ onNode }: {
17
- onNode: Node;
18
- }): Promise<number>;
@@ -1,26 +0,0 @@
1
- import { createMetaTx } from "../contract/ga.mjs";
2
-
3
- /**
4
- * @deprecated Use createMetaTx instead
5
- * @hidden
6
- */
7
- export async function signUsingGA(tx, _ref) {
8
- let {
9
- authData,
10
- authFun,
11
- ...options
12
- } = _ref;
13
- return createMetaTx(tx, authData, authFun, options);
14
- }
15
- /**
16
- * @deprecated Use getHeight instead
17
- * @hidden
18
- */
19
-
20
- export async function height(_ref2) {
21
- let {
22
- onNode
23
- } = _ref2;
24
- return (await onNode.getCurrentKeyBlockHeight()).height;
25
- }
26
- //# sourceMappingURL=methods.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"methods.mjs","names":["createMetaTx","signUsingGA","tx","authData","authFun","options","height","onNode","getCurrentKeyBlockHeight"],"sources":["../../src/deprecated/methods.ts"],"sourcesContent":["import { Encoded } from '../utils/encoder';\nimport { createMetaTx } from '../contract/ga';\nimport Node from '../Node';\n\n/**\n * @deprecated Use createMetaTx instead\n * @hidden\n */\nexport async function signUsingGA(\n tx: Encoded.Transaction,\n { authData, authFun, ...options }: {\n authData: Parameters<typeof createMetaTx>[1];\n authFun: Parameters<typeof createMetaTx>[2];\n } & Parameters<typeof createMetaTx>[3],\n): Promise<Encoded.Transaction> {\n return createMetaTx(tx, authData, authFun, options);\n}\n\n/**\n * @deprecated Use getHeight instead\n * @hidden\n */\nexport async function height({ onNode }: { onNode: Node }): Promise<number> {\n return (await onNode.getCurrentKeyBlockHeight()).height;\n}\n"],"mappings":"SACSA,Y;;AAGT;AACA;AACA;AACA;AACA,OAAO,eAAeC,WAAf,CACLC,EADK,QAMyB;EAAA,IAJ9B;IAAEC,QAAF;IAAYC,OAAZ;IAAqB,GAAGC;EAAxB,CAI8B;EAC9B,OAAOL,YAAY,CAACE,EAAD,EAAKC,QAAL,EAAeC,OAAf,EAAwBC,OAAxB,CAAnB;AACD;AAED;AACA;AACA;AACA;;AACA,OAAO,eAAeC,MAAf,QAAqE;EAAA,IAA/C;IAAEC;EAAF,CAA+C;EAC1E,OAAO,CAAC,MAAMA,MAAM,CAACC,wBAAP,EAAP,EAA0CF,MAAjD;AACD"}
@@ -1,25 +0,0 @@
1
- /// <reference types="node" />
2
- import { Encoded } from '../../utils/encoder';
3
- /**
4
- * Map of prefix to ID tag constant
5
- * @see {@link https://github.com/aeternity/protocol/blob/master/serializations.md#the-id-type}
6
- * @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_id.erl#L97-L102}
7
- * @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_api_encoder.erl#L163-L168}
8
- */
9
- declare const idTagToEncoding: readonly [Encoded.Encoding.AccountAddress, Encoded.Encoding.Name, Encoded.Encoding.Commitment, Encoded.Encoding.OracleAddress, Encoded.Encoding.ContractAddress, Encoded.Encoding.Channel];
10
- declare type AddressEncodings = typeof idTagToEncoding[number];
11
- /**
12
- * Utility function to create and _id type
13
- * @category transaction builder
14
- * @param hashId - Encoded hash
15
- * @returns Buffer Buffer with ID tag and decoded HASh
16
- */
17
- export declare function writeId(hashId: Encoded.Generic<AddressEncodings>): Buffer;
18
- /**
19
- * Utility function to read and _id type
20
- * @category transaction builder
21
- * @param buf - Data
22
- * @returns Encoided hash string with prefix
23
- */
24
- export declare function readId(buf: Buffer): Encoded.Generic<AddressEncodings>;
25
- export {};
@@ -1,45 +0,0 @@
1
- import _buffer from "buffer";
2
- const {
3
- Buffer: _Buffer
4
- } = _buffer;
5
- import { ArgumentError, PrefixNotFoundError, TagNotFoundError } from "../../utils/errors.mjs";
6
- import { toBytes } from "../../utils/bytes.mjs";
7
- import { decode, encode, Encoding } from "../../utils/encoder.mjs";
8
- import { isItemOfArray } from "../../utils/other.mjs";
9
- /**
10
- * Map of prefix to ID tag constant
11
- * @see {@link https://github.com/aeternity/protocol/blob/master/serializations.md#the-id-type}
12
- * @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_id.erl#L97-L102}
13
- * @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_api_encoder.erl#L163-L168}
14
- */
15
-
16
- const idTagToEncoding = [Encoding.AccountAddress, Encoding.Name, Encoding.Commitment, Encoding.OracleAddress, Encoding.ContractAddress, Encoding.Channel];
17
-
18
- /**
19
- * Utility function to create and _id type
20
- * @category transaction builder
21
- * @param hashId - Encoded hash
22
- * @returns Buffer Buffer with ID tag and decoded HASh
23
- */
24
- export function writeId(hashId) {
25
- if (typeof hashId !== 'string') throw new ArgumentError('hashId', 'a string', hashId);
26
- const encoding = hashId.slice(0, 2);
27
- if (!isItemOfArray(encoding, idTagToEncoding)) throw new TagNotFoundError(encoding);
28
- const idTag = idTagToEncoding.indexOf(encoding) + 1;
29
- return _Buffer.from([...toBytes(idTag), ...decode(hashId)]);
30
- }
31
- /**
32
- * Utility function to read and _id type
33
- * @category transaction builder
34
- * @param buf - Data
35
- * @returns Encoided hash string with prefix
36
- */
37
-
38
- export function readId(buf) {
39
- const idTag = _Buffer.from(buf).readUIntBE(0, 1);
40
-
41
- const encoding = idTagToEncoding[idTag - 1];
42
- if (encoding == null) throw new PrefixNotFoundError(idTag);
43
- return encode(buf.slice(1, buf.length), encoding);
44
- }
45
- //# sourceMappingURL=address.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"address.mjs","names":["ArgumentError","PrefixNotFoundError","TagNotFoundError","toBytes","decode","encode","Encoding","isItemOfArray","idTagToEncoding","AccountAddress","Name","Commitment","OracleAddress","ContractAddress","Channel","writeId","hashId","encoding","slice","idTag","indexOf","from","readId","buf","readUIntBE","length"],"sources":["../../../src/tx/builder/address.ts"],"sourcesContent":["import { ArgumentError, PrefixNotFoundError, TagNotFoundError } from '../../utils/errors';\nimport { toBytes } from '../../utils/bytes';\nimport {\n decode, encode, Encoded, Encoding,\n} from '../../utils/encoder';\nimport { isItemOfArray } from '../../utils/other';\n\n/**\n * Map of prefix to ID tag constant\n * @see {@link https://github.com/aeternity/protocol/blob/master/serializations.md#the-id-type}\n * @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_id.erl#L97-L102}\n * @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_api_encoder.erl#L163-L168}\n */\nconst idTagToEncoding = [\n Encoding.AccountAddress,\n Encoding.Name,\n Encoding.Commitment,\n Encoding.OracleAddress,\n Encoding.ContractAddress,\n Encoding.Channel,\n] as const;\n\ntype AddressEncodings = typeof idTagToEncoding[number];\n\n/**\n * Utility function to create and _id type\n * @category transaction builder\n * @param hashId - Encoded hash\n * @returns Buffer Buffer with ID tag and decoded HASh\n */\nexport function writeId(hashId: Encoded.Generic<AddressEncodings>): Buffer {\n if (typeof hashId !== 'string') throw new ArgumentError('hashId', 'a string', hashId);\n const encoding = hashId.slice(0, 2);\n if (!isItemOfArray(encoding, idTagToEncoding)) throw new TagNotFoundError(encoding);\n const idTag = idTagToEncoding.indexOf(encoding) + 1;\n return Buffer.from([...toBytes(idTag), ...decode(hashId)]);\n}\n\n/**\n * Utility function to read and _id type\n * @category transaction builder\n * @param buf - Data\n * @returns Encoided hash string with prefix\n */\nexport function readId(buf: Buffer): Encoded.Generic<AddressEncodings> {\n const idTag = Buffer.from(buf).readUIntBE(0, 1);\n const encoding = idTagToEncoding[idTag - 1];\n if (encoding == null) throw new PrefixNotFoundError(idTag);\n return encode(buf.slice(1, buf.length), encoding);\n}\n"],"mappings":";;;;SAASA,a,EAAeC,mB,EAAqBC,gB;SACpCC,O;SAEPC,M,EAAQC,M,EAAiBC,Q;SAElBC,a;AAET;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,eAAe,GAAG,CACtBF,QAAQ,CAACG,cADa,EAEtBH,QAAQ,CAACI,IAFa,EAGtBJ,QAAQ,CAACK,UAHa,EAItBL,QAAQ,CAACM,aAJa,EAKtBN,QAAQ,CAACO,eALa,EAMtBP,QAAQ,CAACQ,OANa,CAAxB;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAT,CAAiBC,MAAjB,EAAoE;EACzE,IAAI,OAAOA,MAAP,KAAkB,QAAtB,EAAgC,MAAM,IAAIhB,aAAJ,CAAkB,QAAlB,EAA4B,UAA5B,EAAwCgB,MAAxC,CAAN;EAChC,MAAMC,QAAQ,GAAGD,MAAM,CAACE,KAAP,CAAa,CAAb,EAAgB,CAAhB,CAAjB;EACA,IAAI,CAACX,aAAa,CAACU,QAAD,EAAWT,eAAX,CAAlB,EAA+C,MAAM,IAAIN,gBAAJ,CAAqBe,QAArB,CAAN;EAC/C,MAAME,KAAK,GAAGX,eAAe,CAACY,OAAhB,CAAwBH,QAAxB,IAAoC,CAAlD;EACA,OAAO,QAAOI,IAAP,CAAY,CAAC,GAAGlB,OAAO,CAACgB,KAAD,CAAX,EAAoB,GAAGf,MAAM,CAACY,MAAD,CAA7B,CAAZ,CAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASM,MAAT,CAAgBC,GAAhB,EAAgE;EACrE,MAAMJ,KAAK,GAAG,QAAOE,IAAP,CAAYE,GAAZ,EAAiBC,UAAjB,CAA4B,CAA5B,EAA+B,CAA/B,CAAd;;EACA,MAAMP,QAAQ,GAAGT,eAAe,CAACW,KAAK,GAAG,CAAT,CAAhC;EACA,IAAIF,QAAQ,IAAI,IAAhB,EAAsB,MAAM,IAAIhB,mBAAJ,CAAwBkB,KAAxB,CAAN;EACtB,OAAOd,MAAM,CAACkB,GAAG,CAACL,KAAJ,CAAU,CAAV,EAAaK,GAAG,CAACE,MAAjB,CAAD,EAA2BR,QAA3B,CAAb;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mjs","names":[],"sources":["../../../src/typings/@aeternity__argon2-browser/index.d.ts"],"sourcesContent":["declare module '@aeternity/argon2-browser/dist/argon2-bundled.min.js' {\n export * from 'argon2-browser';\n}\n"],"mappings":""}
@@ -1,26 +0,0 @@
1
- /// <reference types="node" />
2
- export declare type MPTreeBinary = [Buffer, Array<[Buffer, Buffer[]]>];
3
- export default class MPTree {
4
- private readonly rootHash;
5
- private readonly nodes;
6
- private static nodeHash;
7
- /**
8
- * Deserialize Merkle Patricia Tree
9
- * @param binary - Binary
10
- * @returns Merkle Patricia Tree
11
- */
12
- constructor(binary: MPTreeBinary);
13
- isEqual(tree: MPTree): boolean;
14
- private static parseNode;
15
- /**
16
- * Serialize Merkle Patricia Tree
17
- * @returns Binary
18
- */
19
- serialize(): MPTreeBinary;
20
- /**
21
- * Retrieve value from Merkle Patricia Tree
22
- * @param _key - The key of the element to retrieve
23
- * @returns Value associated to the specified key
24
- */
25
- get(_key: string): Buffer | undefined;
26
- }