@aeternity/aepp-sdk 10.0.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +15 -14
  3. package/dist/aepp-sdk.browser-script.js +1 -1
  4. package/dist/aepp-sdk.browser-script.js.LICENSE.txt +13 -40
  5. package/dist/aepp-sdk.browser-script.js.map +1 -1
  6. package/dist/aepp-sdk.browser.js +1 -1
  7. package/dist/aepp-sdk.browser.js.map +1 -1
  8. package/dist/aepp-sdk.js +1 -1
  9. package/dist/aepp-sdk.js.map +1 -1
  10. package/es/AeSdk.d.ts +37 -0
  11. package/es/AeSdk.mjs +81 -0
  12. package/es/AeSdk.mjs.map +1 -0
  13. package/es/AeSdkAepp.d.ts +69 -0
  14. package/es/AeSdkAepp.mjs +175 -0
  15. package/es/AeSdkAepp.mjs.map +1 -0
  16. package/es/AeSdkBase.d.ts +212 -0
  17. package/es/AeSdkBase.mjs +310 -0
  18. package/es/AeSdkBase.mjs.map +1 -0
  19. package/es/AeSdkWallet.d.ts +103 -0
  20. package/es/AeSdkWallet.mjs +322 -0
  21. package/es/AeSdkWallet.mjs.map +1 -0
  22. package/es/Node.d.ts +44 -0
  23. package/es/Node.mjs +141 -0
  24. package/es/Node.mjs.map +1 -0
  25. package/es/account/Base.d.ts +65 -0
  26. package/es/account/Base.mjs +123 -0
  27. package/es/account/Base.mjs.map +1 -0
  28. package/es/account/Memory.d.ts +25 -0
  29. package/es/account/Memory.mjs +81 -0
  30. package/es/account/Memory.mjs.map +1 -0
  31. package/es/account/Rpc.d.ts +27 -0
  32. package/es/account/Rpc.mjs +79 -0
  33. package/es/account/Rpc.mjs.map +1 -0
  34. package/es/aens.d.ts +209 -0
  35. package/es/aens.mjs +332 -0
  36. package/es/aens.mjs.map +1 -0
  37. package/es/aepp-wallet-communication/connection/Browser.d.ts +32 -0
  38. package/es/aepp-wallet-communication/connection/Browser.mjs +70 -0
  39. package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -0
  40. package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +17 -0
  41. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +57 -0
  42. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -0
  43. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +35 -0
  44. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +142 -0
  45. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -0
  46. package/es/aepp-wallet-communication/connection-proxy.d.ts +10 -0
  47. package/{src/utils/crypto-ts.ts → es/aepp-wallet-communication/connection-proxy.mjs} +15 -11
  48. package/es/aepp-wallet-communication/connection-proxy.mjs.map +1 -0
  49. package/es/aepp-wallet-communication/rpc/RpcClient.d.ts +33 -0
  50. package/es/aepp-wallet-communication/rpc/RpcClient.mjs +169 -0
  51. package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -0
  52. package/es/aepp-wallet-communication/rpc/types.d.ts +77 -0
  53. package/es/aepp-wallet-communication/rpc/types.mjs +3 -0
  54. package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -0
  55. package/es/aepp-wallet-communication/schema.d.ts +118 -0
  56. package/es/aepp-wallet-communication/schema.mjs +214 -0
  57. package/es/aepp-wallet-communication/schema.mjs.map +1 -0
  58. package/es/aepp-wallet-communication/wallet-detector.d.ts +24 -0
  59. package/es/aepp-wallet-communication/wallet-detector.mjs +63 -0
  60. package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -0
  61. package/es/apis/compiler/compiler.d.ts +92 -0
  62. package/es/apis/compiler/compiler.mjs +576 -0
  63. package/es/apis/compiler/compiler.mjs.map +1 -0
  64. package/es/apis/compiler/index.d.ts +2 -0
  65. package/es/apis/compiler/index.mjs +3 -0
  66. package/es/apis/compiler/index.mjs.map +1 -0
  67. package/es/apis/compiler/models/index.d.ts +248 -0
  68. package/es/apis/compiler/models/index.mjs +48 -0
  69. package/es/apis/compiler/models/index.mjs.map +1 -0
  70. package/es/apis/compiler/models/mappers.d.ts +23 -0
  71. package/es/apis/compiler/models/mappers.mjs +585 -0
  72. package/es/apis/compiler/models/mappers.mjs.map +1 -0
  73. package/es/apis/compiler/models/parameters.d.ts +13 -0
  74. package/es/apis/compiler/models/parameters.mjs +71 -0
  75. package/es/apis/compiler/models/parameters.mjs.map +1 -0
  76. package/es/apis/node/index.d.ts +2 -0
  77. package/es/apis/node/index.mjs +3 -0
  78. package/es/apis/node/index.mjs.map +1 -0
  79. package/es/apis/node/models/index.d.ts +1061 -0
  80. package/es/apis/node/models/index.mjs +2 -0
  81. package/es/apis/node/models/index.mjs.map +1 -0
  82. package/es/apis/node/models/mappers.d.ts +95 -0
  83. package/es/apis/node/models/mappers.mjs +4164 -0
  84. package/es/apis/node/models/mappers.mjs.map +1 -0
  85. package/es/apis/node/models/parameters.d.ts +17 -0
  86. package/es/apis/node/models/parameters.mjs +165 -0
  87. package/es/apis/node/models/parameters.mjs.map +1 -0
  88. package/es/apis/node/node.d.ts +215 -0
  89. package/es/apis/node/node.mjs +1165 -0
  90. package/es/apis/node/node.mjs.map +1 -0
  91. package/es/chain.d.ts +220 -0
  92. package/es/chain.mjs +524 -0
  93. package/es/chain.mjs.map +1 -0
  94. package/es/channel/handlers.d.ts +34 -0
  95. package/es/channel/{handlers.js → handlers.mjs} +163 -130
  96. package/es/channel/handlers.mjs.map +1 -0
  97. package/es/channel/index.d.ts +634 -0
  98. package/es/channel/index.mjs +978 -0
  99. package/es/channel/index.mjs.map +1 -0
  100. package/es/channel/internal.d.ts +100 -0
  101. package/es/channel/internal.mjs +328 -0
  102. package/es/channel/internal.mjs.map +1 -0
  103. package/es/contract/Compiler.d.ts +17 -0
  104. package/es/contract/Compiler.mjs +67 -0
  105. package/es/contract/Compiler.mjs.map +1 -0
  106. package/es/contract/aci.d.ts +125 -0
  107. package/es/contract/aci.mjs +496 -0
  108. package/es/contract/aci.mjs.map +1 -0
  109. package/es/contract/ga.d.ts +68 -0
  110. package/es/contract/ga.mjs +190 -0
  111. package/es/contract/ga.mjs.map +1 -0
  112. package/es/contract/methods.d.ts +68 -0
  113. package/es/contract/methods.mjs +101 -0
  114. package/es/contract/methods.mjs.map +1 -0
  115. package/es/index.d.ts +32 -0
  116. package/es/index.mjs +49 -0
  117. package/es/index.mjs.map +1 -0
  118. package/es/oracle.d.ts +154 -0
  119. package/es/oracle.mjs +288 -0
  120. package/es/oracle.mjs.map +1 -0
  121. package/es/spend.d.ts +61 -0
  122. package/es/spend.mjs +122 -0
  123. package/es/spend.mjs.map +1 -0
  124. package/es/tx/builder/constants.d.ts +41 -0
  125. package/es/tx/builder/constants.mjs +100 -0
  126. package/es/tx/builder/constants.mjs.map +1 -0
  127. package/es/tx/builder/field-types.d.ts +62 -0
  128. package/es/tx/builder/field-types.mjs +126 -0
  129. package/es/tx/builder/field-types.mjs.map +1 -0
  130. package/es/tx/builder/helpers.d.ts +131 -0
  131. package/es/tx/builder/helpers.mjs +223 -0
  132. package/es/tx/builder/helpers.mjs.map +1 -0
  133. package/es/tx/builder/index.d.ts +75 -0
  134. package/es/tx/builder/index.mjs +424 -0
  135. package/es/tx/builder/index.mjs.map +1 -0
  136. package/es/tx/builder/schema.d.ts +350 -0
  137. package/es/tx/builder/schema.mjs +320 -0
  138. package/es/tx/builder/schema.mjs.map +1 -0
  139. package/es/tx/index.d.ts +63 -0
  140. package/es/tx/index.mjs +209 -0
  141. package/es/tx/index.mjs.map +1 -0
  142. package/es/tx/min-fee.d.ts +20 -0
  143. package/es/tx/min-fee.mjs +148 -0
  144. package/es/tx/min-fee.mjs.map +1 -0
  145. package/es/tx/validator.d.ts +19 -0
  146. package/es/tx/validator.mjs +240 -0
  147. package/es/tx/validator.mjs.map +1 -0
  148. package/es/typings/@aeternity__argon2-browser/index.d.mjs +2 -0
  149. package/es/typings/@aeternity__argon2-browser/index.d.mjs.map +1 -0
  150. package/es/typings/@aeternity__uuid/index.d.mjs +2 -0
  151. package/es/typings/@aeternity__uuid/index.d.mjs.map +1 -0
  152. package/es/typings/bip32-path/index.d.mjs +2 -0
  153. package/es/typings/bip32-path/index.d.mjs.map +1 -0
  154. package/es/typings/blakejs/index.d.mjs +2 -0
  155. package/es/typings/blakejs/index.d.mjs.map +1 -0
  156. package/es/typings/tweetnacl-auth/index.d.mjs +2 -0
  157. package/es/typings/tweetnacl-auth/index.d.mjs.map +1 -0
  158. package/es/utils/amount-formatter.d.ts +42 -0
  159. package/es/utils/{amount-formatter.js → amount-formatter.mjs} +38 -44
  160. package/es/utils/amount-formatter.mjs.map +1 -0
  161. package/es/utils/autorest.d.ts +6 -0
  162. package/es/utils/autorest.mjs +97 -0
  163. package/es/utils/autorest.mjs.map +1 -0
  164. package/es/utils/bignumber.d.ts +13 -0
  165. package/es/utils/bignumber.mjs +23 -0
  166. package/es/utils/bignumber.mjs.map +1 -0
  167. package/es/{bytes.d.ts → utils/bytes.d.ts} +10 -13
  168. package/es/utils/{bytes.js → bytes.mjs} +26 -22
  169. package/es/utils/bytes.mjs.map +1 -0
  170. package/es/utils/crypto.d.ts +103 -0
  171. package/es/utils/crypto.mjs +221 -0
  172. package/es/utils/crypto.mjs.map +1 -0
  173. package/es/utils/encoder.d.ts +26 -0
  174. package/es/utils/encoder.mjs +102 -0
  175. package/es/utils/encoder.mjs.map +1 -0
  176. package/es/utils/errors.d.ts +481 -0
  177. package/es/utils/errors.mjs +882 -0
  178. package/es/utils/errors.mjs.map +1 -0
  179. package/es/utils/hd-wallet.d.ts +34 -0
  180. package/es/utils/hd-wallet.mjs +122 -0
  181. package/es/utils/hd-wallet.mjs.map +1 -0
  182. package/es/utils/json-big.d.ts +5 -0
  183. package/es/utils/json-big.mjs +41 -0
  184. package/es/utils/json-big.mjs.map +1 -0
  185. package/es/utils/keystore.d.ts +51 -0
  186. package/es/utils/keystore.mjs +145 -0
  187. package/es/utils/keystore.mjs.map +1 -0
  188. package/es/{mptree.d.ts → utils/mptree.d.ts} +5 -8
  189. package/es/utils/{mptree.js → mptree.mjs} +33 -25
  190. package/es/utils/mptree.mjs.map +1 -0
  191. package/es/utils/other.d.ts +14 -0
  192. package/es/utils/other.mjs +28 -0
  193. package/es/utils/other.mjs.map +1 -0
  194. package/es/{semver-satisfies.d.ts → utils/semver-satisfies.d.ts} +0 -0
  195. package/es/utils/{semver-satisfies.js → semver-satisfies.mjs} +1 -1
  196. package/es/utils/semver-satisfies.mjs.map +1 -0
  197. package/es/utils/string.d.ts +24 -0
  198. package/es/utils/{string.js → string.mjs} +9 -11
  199. package/es/utils/string.mjs.map +1 -0
  200. package/package.json +67 -64
  201. package/src/AeSdk.ts +65 -0
  202. package/src/AeSdkAepp.ts +167 -0
  203. package/src/AeSdkBase.ts +320 -0
  204. package/src/AeSdkWallet.ts +332 -0
  205. package/src/Node.ts +167 -0
  206. package/src/account/Base.ts +114 -0
  207. package/src/account/Memory.ts +83 -0
  208. package/src/account/Rpc.ts +67 -0
  209. package/src/aens.ts +391 -0
  210. package/src/aepp-wallet-communication/connection/Browser.ts +68 -0
  211. package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +58 -0
  212. package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +111 -0
  213. package/{es/utils/crypto-ts.js → src/aepp-wallet-communication/connection-proxy.ts} +16 -9
  214. package/src/aepp-wallet-communication/rpc/RpcClient.ts +137 -0
  215. package/src/aepp-wallet-communication/rpc/types.ts +66 -0
  216. package/src/aepp-wallet-communication/schema.ts +181 -0
  217. package/src/aepp-wallet-communication/wallet-detector.ts +71 -0
  218. package/src/apis/compiler/code-model-v4.yaml +2649 -0
  219. package/src/apis/compiler/compiler.ts +585 -0
  220. package/src/apis/compiler/index.ts +2 -0
  221. package/src/apis/compiler/models/index.ts +301 -0
  222. package/src/apis/compiler/models/mappers.ts +583 -0
  223. package/src/apis/compiler/models/parameters.ts +93 -0
  224. package/src/apis/node/code-model-v4.yaml +10046 -0
  225. package/src/apis/node/index.ts +2 -0
  226. package/src/apis/node/models/index.ts +1253 -0
  227. package/src/apis/node/models/mappers.ts +4278 -0
  228. package/src/apis/node/models/parameters.ts +188 -0
  229. package/src/apis/node/node.ts +1299 -0
  230. package/src/chain.ts +444 -0
  231. package/src/channel/{handlers.js → handlers.ts} +238 -143
  232. package/src/channel/index.ts +991 -0
  233. package/src/channel/internal.ts +345 -0
  234. package/src/contract/Compiler.ts +66 -0
  235. package/src/contract/aci.ts +529 -0
  236. package/src/contract/ga.ts +178 -0
  237. package/src/contract/methods.ts +118 -0
  238. package/src/index.ts +51 -0
  239. package/src/oracle.ts +342 -0
  240. package/src/spend.ts +152 -0
  241. package/src/tx/builder/constants.ts +96 -0
  242. package/src/tx/builder/field-types.ts +111 -0
  243. package/src/tx/builder/helpers.ts +253 -0
  244. package/src/tx/builder/index.ts +394 -0
  245. package/src/tx/builder/schema.ts +771 -0
  246. package/src/tx/index.ts +199 -0
  247. package/src/tx/min-fee.ts +136 -0
  248. package/src/tx/validator.ts +226 -0
  249. package/src/typings/@aeternity__argon2-browser/index.d.ts +3 -0
  250. package/src/typings/@aeternity__uuid/index.d.ts +3 -0
  251. package/src/typings/bip32-path/index.d.ts +33 -0
  252. package/src/typings/tweetnacl-auth/index.d.ts +14 -0
  253. package/src/utils/amount-formatter.ts +29 -41
  254. package/src/utils/autorest.ts +90 -0
  255. package/src/utils/bignumber.ts +9 -19
  256. package/src/utils/bytes.ts +15 -16
  257. package/src/utils/crypto.ts +217 -0
  258. package/src/utils/encoder.ts +98 -0
  259. package/src/utils/errors.ts +817 -0
  260. package/src/utils/hd-wallet.ts +134 -0
  261. package/src/utils/json-big.ts +26 -0
  262. package/src/utils/keystore.ts +179 -0
  263. package/src/utils/mptree.ts +26 -20
  264. package/src/utils/other.ts +28 -43
  265. package/src/utils/string.ts +8 -10
  266. package/CHANGELOG.md +0 -1603
  267. package/es/account/base.js +0 -169
  268. package/es/account/base.js.map +0 -1
  269. package/es/account/memory.js +0 -84
  270. package/es/account/memory.js.map +0 -1
  271. package/es/account/multiple.js +0 -178
  272. package/es/account/multiple.js.map +0 -1
  273. package/es/ae/aens.js +0 -408
  274. package/es/ae/aens.js.map +0 -1
  275. package/es/ae/aepp.js +0 -45
  276. package/es/ae/aepp.js.map +0 -1
  277. package/es/ae/contract.js +0 -312
  278. package/es/ae/contract.js.map +0 -1
  279. package/es/ae/index.js +0 -206
  280. package/es/ae/index.js.map +0 -1
  281. package/es/ae/oracle.js +0 -322
  282. package/es/ae/oracle.js.map +0 -1
  283. package/es/ae/universal.js +0 -45
  284. package/es/ae/universal.js.map +0 -1
  285. package/es/ae/wallet.js +0 -50
  286. package/es/ae/wallet.js.map +0 -1
  287. package/es/amount-formatter.d.ts +0 -58
  288. package/es/bignumber.d.ts +0 -24
  289. package/es/chain/index.js +0 -256
  290. package/es/chain/index.js.map +0 -1
  291. package/es/chain/node.js +0 -394
  292. package/es/chain/node.js.map +0 -1
  293. package/es/channel/handlers.js.map +0 -1
  294. package/es/channel/index.js +0 -980
  295. package/es/channel/index.js.map +0 -1
  296. package/es/channel/internal.js +0 -266
  297. package/es/channel/internal.js.map +0 -1
  298. package/es/contract/aci/helpers.js +0 -298
  299. package/es/contract/aci/helpers.js.map +0 -1
  300. package/es/contract/aci/index.js +0 -361
  301. package/es/contract/aci/index.js.map +0 -1
  302. package/es/contract/aci/transformation.js +0 -66
  303. package/es/contract/aci/transformation.js.map +0 -1
  304. package/es/contract/compiler.js +0 -244
  305. package/es/contract/compiler.js.map +0 -1
  306. package/es/contract/ga/helpers.js +0 -22
  307. package/es/contract/ga/helpers.js.map +0 -1
  308. package/es/contract/ga/index.js +0 -170
  309. package/es/contract/ga/index.js.map +0 -1
  310. package/es/contract/index.js +0 -162
  311. package/es/contract/index.js.map +0 -1
  312. package/es/crypto-ts.d.ts +0 -9
  313. package/es/index.js +0 -57
  314. package/es/index.js.map +0 -1
  315. package/es/node-pool/index.js +0 -187
  316. package/es/node-pool/index.js.map +0 -1
  317. package/es/node.js +0 -132
  318. package/es/node.js.map +0 -1
  319. package/es/other.d.ts +0 -31
  320. package/es/string.d.ts +0 -26
  321. package/es/tx/builder/helpers.js +0 -305
  322. package/es/tx/builder/helpers.js.map +0 -1
  323. package/es/tx/builder/index.js +0 -595
  324. package/es/tx/builder/index.js.map +0 -1
  325. package/es/tx/builder/schema.js +0 -814
  326. package/es/tx/builder/schema.js.map +0 -1
  327. package/es/tx/index.js +0 -300
  328. package/es/tx/index.js.map +0 -1
  329. package/es/tx/tx-object.js +0 -276
  330. package/es/tx/tx-object.js.map +0 -1
  331. package/es/tx/tx.js +0 -937
  332. package/es/tx/tx.js.map +0 -1
  333. package/es/tx/validator.js +0 -208
  334. package/es/tx/validator.js.map +0 -1
  335. package/es/typings/blakejs/index.d.js +0 -2
  336. package/es/typings/blakejs/index.d.js.map +0 -1
  337. package/es/utils/aepp-wallet-communication/connection/browser-runtime.js +0 -131
  338. package/es/utils/aepp-wallet-communication/connection/browser-runtime.js.map +0 -1
  339. package/es/utils/aepp-wallet-communication/connection/browser-window-message.js +0 -184
  340. package/es/utils/aepp-wallet-communication/connection/browser-window-message.js.map +0 -1
  341. package/es/utils/aepp-wallet-communication/connection/index.js +0 -84
  342. package/es/utils/aepp-wallet-communication/connection/index.js.map +0 -1
  343. package/es/utils/aepp-wallet-communication/content-script-bridge.js +0 -97
  344. package/es/utils/aepp-wallet-communication/content-script-bridge.js.map +0 -1
  345. package/es/utils/aepp-wallet-communication/helpers.js +0 -103
  346. package/es/utils/aepp-wallet-communication/helpers.js.map +0 -1
  347. package/es/utils/aepp-wallet-communication/rpc/aepp-rpc.js +0 -329
  348. package/es/utils/aepp-wallet-communication/rpc/aepp-rpc.js.map +0 -1
  349. package/es/utils/aepp-wallet-communication/rpc/rpc-client.js +0 -270
  350. package/es/utils/aepp-wallet-communication/rpc/rpc-client.js.map +0 -1
  351. package/es/utils/aepp-wallet-communication/rpc/wallet-rpc.js +0 -533
  352. package/es/utils/aepp-wallet-communication/rpc/wallet-rpc.js.map +0 -1
  353. package/es/utils/aepp-wallet-communication/schema.js +0 -107
  354. package/es/utils/aepp-wallet-communication/schema.js.map +0 -1
  355. package/es/utils/aepp-wallet-communication/wallet-detector.js +0 -109
  356. package/es/utils/aepp-wallet-communication/wallet-detector.js.map +0 -1
  357. package/es/utils/amount-formatter.js.map +0 -1
  358. package/es/utils/async-init.js +0 -67
  359. package/es/utils/async-init.js.map +0 -1
  360. package/es/utils/bignumber.js +0 -28
  361. package/es/utils/bignumber.js.map +0 -1
  362. package/es/utils/bytes.js.map +0 -1
  363. package/es/utils/crypto-ts.js.map +0 -1
  364. package/es/utils/crypto.js +0 -304
  365. package/es/utils/crypto.js.map +0 -1
  366. package/es/utils/hd-wallet.js +0 -112
  367. package/es/utils/hd-wallet.js.map +0 -1
  368. package/es/utils/json-big.js +0 -45
  369. package/es/utils/json-big.js.map +0 -1
  370. package/es/utils/keystore.js +0 -228
  371. package/es/utils/keystore.js.map +0 -1
  372. package/es/utils/mptree.js.map +0 -1
  373. package/es/utils/other.js +0 -43
  374. package/es/utils/other.js.map +0 -1
  375. package/es/utils/semver-satisfies.js.map +0 -1
  376. package/es/utils/string.js.map +0 -1
  377. package/es/utils/swagger.js +0 -132
  378. package/es/utils/swagger.js.map +0 -1
  379. package/src/account/base.js +0 -153
  380. package/src/account/memory.js +0 -78
  381. package/src/account/multiple.js +0 -154
  382. package/src/ae/aens.js +0 -366
  383. package/src/ae/aepp.js +0 -45
  384. package/src/ae/contract.js +0 -285
  385. package/src/ae/index.js +0 -167
  386. package/src/ae/oracle.js +0 -296
  387. package/src/ae/universal.js +0 -47
  388. package/src/ae/wallet.js +0 -50
  389. package/src/chain/index.js +0 -250
  390. package/src/chain/node.js +0 -293
  391. package/src/channel/index.js +0 -898
  392. package/src/channel/internal.js +0 -231
  393. package/src/contract/aci/index.js +0 -317
  394. package/src/contract/aci/transformation.js +0 -72
  395. package/src/contract/compiler.js +0 -195
  396. package/src/contract/ga/helpers.js +0 -17
  397. package/src/contract/ga/index.js +0 -147
  398. package/src/contract/index.js +0 -163
  399. package/src/index.js +0 -90
  400. package/src/node-pool/index.js +0 -171
  401. package/src/node.js +0 -118
  402. package/src/tx/builder/helpers.js +0 -325
  403. package/src/tx/builder/index.js +0 -460
  404. package/src/tx/builder/schema.js +0 -1211
  405. package/src/tx/index.js +0 -301
  406. package/src/tx/tx-object.js +0 -186
  407. package/src/tx/tx.js +0 -622
  408. package/src/tx/validator.js +0 -161
  409. package/src/utils/aepp-wallet-communication/connection/browser-runtime.js +0 -114
  410. package/src/utils/aepp-wallet-communication/connection/browser-window-message.js +0 -161
  411. package/src/utils/aepp-wallet-communication/connection/index.js +0 -85
  412. package/src/utils/aepp-wallet-communication/content-script-bridge.js +0 -85
  413. package/src/utils/aepp-wallet-communication/helpers.js +0 -70
  414. package/src/utils/aepp-wallet-communication/rpc/aepp-rpc.js +0 -268
  415. package/src/utils/aepp-wallet-communication/rpc/rpc-client.js +0 -223
  416. package/src/utils/aepp-wallet-communication/rpc/wallet-rpc.js +0 -390
  417. package/src/utils/aepp-wallet-communication/schema.js +0 -108
  418. package/src/utils/aepp-wallet-communication/wallet-detector.js +0 -91
  419. package/src/utils/async-init.js +0 -41
  420. package/src/utils/crypto.js +0 -312
  421. package/src/utils/hd-wallet.js +0 -115
  422. package/src/utils/json-big.js +0 -26
  423. package/src/utils/keystore.js +0 -223
  424. package/src/utils/swagger.js +0 -133
package/es/ae/aens.js DELETED
@@ -1,408 +0,0 @@
1
- /*
2
- * ISC License (ISC)
3
- * Copyright (c) 2018 aeternity developers
4
- *
5
- * Permission to use, copy, modify, and/or distribute this software for any
6
- * purpose with or without fee is hereby granted, provided that the above
7
- * copyright notice and this permission notice appear in all copies.
8
- *
9
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- * PERFORMANCE OF THIS SOFTWARE.
16
- */
17
-
18
- /**
19
- * Aens module - routines to interact with the æternity naming system
20
- *
21
- * The high-level description of the naming system is
22
- * https://github.com/aeternity/protocol/blob/master/AENS.md in the protocol
23
- * repository.
24
- * @module @aeternity/aepp-sdk/es/ae/aens
25
- * @export Aens
26
- * @example import { Aens } from '@aeternity/aepp-sdk'
27
- */
28
- import { salt } from '../utils/crypto';
29
- import { commitmentHash, ensureNameValid, getMinimumNameFee, isAuctionName, encode, produceNameId } from '../tx/builder/helpers';
30
- import Ae from './';
31
- import { CLIENT_TTL, NAME_FEE, NAME_TTL } from '../tx/builder/schema';
32
- /**
33
- * Revoke a name
34
- * @instance
35
- * @function
36
- * @alias module:@aeternity/aepp-sdk/es/ae/aens
37
- * @category async
38
- * @param {String} name Name hash
39
- * @param {Object} [options={}] options
40
- * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass
41
- * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)
42
- * @param {Number|String|BigNumber} [options.fee] fee
43
- * @param {Number|String|BigNumber} [options.ttl] ttl
44
- * @param {Number|String|BigNumber} [options.nonce] nonce
45
- * @return {Promise<Object>} Transaction result
46
- * @example
47
- * const name = 'test.chain'
48
- * const nameObject = await sdkInstance.aensQuery(name)
49
- *
50
- * await sdkInstance.aensRevoke(name, { fee, ttl , nonce })
51
- * // or
52
- * await nameObject.revoke({ fee, ttl, nonce })
53
- */
54
-
55
- async function revoke(name) {
56
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
57
- ensureNameValid(name);
58
- const opt = { ...this.Ae.defaults,
59
- ...options
60
- };
61
- const nameRevokeTx = await this.nameRevokeTx({ ...opt,
62
- nameId: produceNameId(name),
63
- accountId: await this.address(opt)
64
- });
65
- return this.send(nameRevokeTx, opt);
66
- }
67
- /**
68
- * Update a name
69
- * @instance
70
- * @function
71
- * @category async
72
- * @alias module:@aeternity/aepp-sdk/es/ae/aens
73
- * @param {String} name AENS name
74
- * @param {Object.<string, string>} pointers Map of pointer keys to corresponding addresses
75
- * @param {Object} [options={}]
76
- * @param {Boolean} [options.extendPointers] Get the pointers from the node and merge with provided
77
- * ones. Pointers with the same type will be overwritten
78
- * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you
79
- * pass publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)
80
- * @param {Number|String|BigNumber} [options.fee] fee
81
- * @param {Number|String|BigNumber} [options.ttl] ttl
82
- * @param {Number|String|BigNumber} [options.nonce] nonce
83
- * @param {Number|String|BigNumber} [options.nameTtl=50000] Name ttl represented in number of
84
- * blocks (Max value is 50000 blocks)
85
- * @param {Number|String|BigNumber} [options.clientTtl=84600] a suggestion as to how long any
86
- * clients should cache this information
87
- * @return {Promise<Object>}
88
- * @throws Invalid pointer array error
89
- * @example
90
- * const name = 'test.chain'
91
- * const pointersArray = ['ak_asd23dasdas...,' 'ct_asdf34fasdasd...']
92
- * const nameObject = await sdkInstance.aensQuery(name)
93
- *
94
- * await sdkInstance.aensUpdate(name, pointersArray, { nameTtl, ttl, fee, nonce, clientTtl })
95
- * // or
96
- * await nameObject.update(pointers, { nameTtl, ttl, fee, nonce, clientTtl })
97
- */
98
-
99
-
100
- async function update(name) {
101
- let pointers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
102
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
103
- ensureNameValid(name);
104
- const opt = { ...this.Ae.defaults,
105
- ...options
106
- };
107
- const allPointers = { ...(options.extendPointers && Object.fromEntries((await this.getName(name)).pointers.map(_ref => {
108
- let {
109
- key,
110
- id
111
- } = _ref;
112
- return [key, id];
113
- }))),
114
- ...pointers
115
- };
116
- const nameUpdateTx = await this.nameUpdateTx({ ...opt,
117
- nameId: produceNameId(name),
118
- accountId: await this.address(opt),
119
- pointers: Object.entries(allPointers).map(_ref2 => {
120
- let [key, id] = _ref2;
121
- return {
122
- key,
123
- id
124
- };
125
- })
126
- });
127
- return this.send(nameUpdateTx, opt);
128
- }
129
- /**
130
- * Transfer a domain to another account
131
- * @instance
132
- * @function
133
- * @category async
134
- * @alias module:@aeternity/aepp-sdk/es/ae/aens
135
- * @param {String} name AENS name
136
- * @param {String} account Recipient account publick key
137
- * @param {Object} [options={}]
138
- * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass
139
- * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)
140
- * @param {Number|String|BigNumber} [options.fee] fee
141
- * @param {Number|String|BigNumber} [options.ttl] ttl
142
- * @param {Number|String|BigNumber} [options.nonce] nonce
143
- * @return {Promise<Object>} Transaction result
144
- * @example
145
- * const name = 'test.chain'
146
- * const recipientPub = 'ak_asd23dasdas...'
147
- * const nameObject = await sdkInstance.aensQuery(name)
148
- *
149
- * await sdkInstance.aensTransfer(name, recipientPub, { ttl, fee, nonce })
150
- * // or
151
- * await nameObject.transfer(recipientPub, { ttl, fee, nonce })
152
- */
153
-
154
-
155
- async function transfer(name, account) {
156
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
157
- ensureNameValid(name);
158
- const opt = { ...this.Ae.defaults,
159
- ...options
160
- };
161
- const nameTransferTx = await this.nameTransferTx({ ...opt,
162
- nameId: produceNameId(name),
163
- accountId: await this.address(opt),
164
- recipientId: account
165
- });
166
- return this.send(nameTransferTx, opt);
167
- }
168
- /**
169
- * Query the AENS name info from the node
170
- * and return the object with info and predefined functions for manipulating name
171
- * @instance
172
- * @function
173
- * @category async
174
- * @alias module:@aeternity/aepp-sdk/es/ae/aens
175
- * @param {String} name
176
- * @param {Object} opt Options
177
- * @return {Promise<Object>}
178
- * @example
179
- * const nameObject = sdkInstance.aensQuery('test.chain')
180
- * console.log(nameObject)
181
- * {
182
- * id, // name hash
183
- * pointers, // array of pointers
184
- * update, // Update name function
185
- * extendTtl, // Extend Ttl name function
186
- * transfer, // Transfer name function
187
- * revoke // Revoke name function
188
- * }
189
- */
190
-
191
-
192
- async function query(name) {
193
- var _this = this;
194
-
195
- let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
196
- ensureNameValid(name);
197
- const o = await this.getName(name);
198
- return Object.freeze(Object.assign(o, {
199
- pointers: o.pointers || [],
200
- update: async function (pointers) {
201
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
202
- return { ...(await _this.aensUpdate(name, pointers, { ...opt,
203
- ...options
204
- })),
205
- ...(await _this.aensQuery(name))
206
- };
207
- },
208
- transfer: async function (account) {
209
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
210
- return { ...(await _this.aensTransfer(name, account, { ...opt,
211
- ...options
212
- })),
213
- ...(await _this.aensQuery(name))
214
- };
215
- },
216
- revoke: async function () {
217
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
218
- return _this.aensRevoke(name, { ...opt,
219
- ...options
220
- });
221
- },
222
- extendTtl: async function () {
223
- let nameTtl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : NAME_TTL;
224
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
225
- if (!nameTtl || typeof nameTtl !== 'number' || nameTtl > NAME_TTL) throw new Error('Ttl must be an number and less then 180000 blocks');
226
- return { ...(await _this.aensUpdate(name, {}, { ...opt,
227
- ...options,
228
- nameTtl,
229
- extendPointers: true
230
- })),
231
- ...(await _this.aensQuery(name))
232
- };
233
- }
234
- }));
235
- }
236
- /**
237
- * Claim a previously preclaimed registration. This can only be done after the
238
- * preclaim step
239
- * @instance
240
- * @function
241
- * @category async
242
- * @alias module:@aeternity/aepp-sdk/es/ae/aens
243
- * @param {String} name
244
- * @param {Number} salt Salt from pre-claim, or 0 if it's a bid
245
- * @param {Object} [options] options
246
- * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass
247
- * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)
248
- * @param {Number|String|BigNumber} [options.fee] fee
249
- * @param {Number|String|BigNumber} [options.ttl] ttl
250
- * @param {Number|String|BigNumber} [options.nonce] nonce
251
- * @param {Number|String} [options.nameFee] Name Fee (By default calculated by sdk)
252
- * @return {Promise<Object>} the result of the claim
253
- * @example
254
- * const name = 'test.chain'
255
- * const salt = preclaimResult.salt // salt from pre-claim transaction
256
- *
257
- * await sdkInstance.aensClaim(name, salt, { ttl, fee, nonce, nameFee })
258
- */
259
-
260
-
261
- async function claim(name, salt, options) {
262
- ensureNameValid(name);
263
- const opt = { ...this.Ae.defaults,
264
- ...options
265
- };
266
- const minNameFee = getMinimumNameFee(name);
267
-
268
- if (opt.nameFee !== this.Ae.defaults.nameFee && minNameFee.gt(opt.nameFee)) {
269
- throw new Error(`the provided fee ${opt.nameFee} is not enough to execute the claim, required: ${minNameFee}`);
270
- }
271
-
272
- opt.nameFee = opt.nameFee !== this.Ae.defaults.nameFee ? opt.nameFee : minNameFee;
273
- const claimTx = await this.nameClaimTx({ ...opt,
274
- accountId: await this.address(opt),
275
- nameSalt: salt,
276
- name: encode(name, 'nm')
277
- });
278
- const result = await this.send(claimTx, opt);
279
-
280
- if (!isAuctionName(name)) {
281
- const nameInter = opt.waitMined ? await this.aensQuery(name, opt) : {};
282
- return Object.assign(result, nameInter);
283
- }
284
-
285
- return { ...result,
286
- nameFee: opt.nameFee
287
- };
288
- }
289
- /**
290
- * Preclaim a name. Sends a hash of the name and a random salt to the node
291
- * @instance
292
- * @function
293
- * @category async
294
- * @alias module:@aeternity/aepp-sdk/es/ae/aens
295
- * @param {String} name
296
- * @param {Object} [options={}]
297
- * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass
298
- * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)
299
- * @param {Number|String|BigNumber} [options.fee] fee
300
- * @param {Number|String|BigNumber} [options.ttl] ttl
301
- * @param {Number|String|BigNumber} [options.nonce] nonce
302
- * @return {Promise<Object>}
303
- * @example
304
- * const name = 'test.chain'
305
- * const salt = preclaimResult.salt // salt from pre-claim transaction
306
- *
307
- * await sdkInstance.aensPreclaim(name, { ttl, fee, nonce })
308
- * {
309
- * ...transactionResult,
310
- * claim, // Claim function (options={}) => claimTransactionResult
311
- * salt,
312
- * commitmentId
313
- * }
314
- */
315
-
316
-
317
- async function preclaim(name) {
318
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
319
- ensureNameValid(name);
320
- const opt = { ...this.Ae.defaults,
321
- ...options
322
- };
323
-
324
- const _salt = salt();
325
-
326
- const height = await this.height();
327
- const commitmentId = commitmentHash(name, _salt);
328
- const preclaimTx = await this.namePreclaimTx({ ...opt,
329
- accountId: await this.address(opt),
330
- commitmentId
331
- });
332
- const result = await this.send(preclaimTx, opt);
333
- return Object.freeze({ ...result,
334
- height,
335
- claim: options => this.aensClaim(name, _salt, { ...options,
336
- onAccount: opt.onAccount
337
- }),
338
- salt: _salt,
339
- commitmentId
340
- });
341
- }
342
- /**
343
- * Bid to name auction
344
- * @instance
345
- * @function
346
- * @category async
347
- * @alias module:@aeternity/aepp-sdk/es/ae/aens
348
- * @param {String} name Domain name
349
- * @param {String|Number} nameFee Name fee (bid fee)
350
- * @param {Object} [options={}]
351
- * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass
352
- * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)
353
- * @param {Number|String|BigNumber} [options.fee] fee
354
- * @param {Number|String|BigNumber} [options.ttl] ttl
355
- * @param {Number|String|BigNumber} [options.nonce] nonce
356
- * @return {Promise<Object>} Transaction result
357
- * @example
358
- * const name = 'test.chain'
359
- * const bidFee = computeBidFee(name, startFee, incrementPercentage)
360
- *
361
- * await sdkInstance.aensBid(name, 213109412839123, { ttl, fee, nonce })
362
- */
363
-
364
-
365
- async function bid(name) {
366
- let nameFee = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NAME_FEE;
367
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
368
- return this.aensClaim(name, 0, { ...options,
369
- nameFee,
370
- vsn: 2
371
- });
372
- }
373
- /**
374
- * Aens Stamp
375
- *
376
- * Aens provides name-system related methods atop
377
- * {@link module:@aeternity/aepp-sdk/es/ae--Ae} clients.
378
- * @function
379
- * @alias module:@aeternity/aepp-sdk/es/ae/aens
380
- * @rtype Stamp
381
- * @param {Object} [options={}] - Initializer object
382
- * @return {Object} Aens instance
383
- */
384
-
385
-
386
- const Aens = Ae.compose({
387
- methods: {
388
- aensQuery: query,
389
- aensPreclaim: preclaim,
390
- aensClaim: claim,
391
- aensUpdate: update,
392
- aensTransfer: transfer,
393
- aensRevoke: revoke,
394
- aensBid: bid
395
- },
396
- deepProps: {
397
- Ae: {
398
- defaults: {
399
- clientTtl: CLIENT_TTL,
400
- nameTtl: NAME_TTL,
401
- // aec_governance:name_claim_max_expiration() => 50000
402
- nameFee: NAME_FEE
403
- }
404
- }
405
- }
406
- });
407
- export default Aens;
408
- //# sourceMappingURL=aens.js.map
package/es/ae/aens.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ae/aens.js"],"names":["salt","commitmentHash","ensureNameValid","getMinimumNameFee","isAuctionName","encode","produceNameId","Ae","CLIENT_TTL","NAME_FEE","NAME_TTL","revoke","name","options","opt","defaults","nameRevokeTx","nameId","accountId","address","send","update","pointers","allPointers","extendPointers","Object","fromEntries","getName","map","key","id","nameUpdateTx","entries","transfer","account","nameTransferTx","recipientId","query","o","freeze","assign","aensUpdate","aensQuery","aensTransfer","aensRevoke","extendTtl","nameTtl","Error","claim","minNameFee","nameFee","gt","claimTx","nameClaimTx","nameSalt","result","nameInter","waitMined","preclaim","_salt","height","commitmentId","preclaimTx","namePreclaimTx","aensClaim","onAccount","bid","vsn","Aens","compose","methods","aensPreclaim","aensBid","deepProps","clientTtl"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,IAAT,QAAqB,iBAArB;AACA,SACEC,cADF,EACkBC,eADlB,EACmCC,iBADnC,EACsDC,aADtD,EACqEC,MADrE,EAC6EC,aAD7E,QAEO,uBAFP;AAGA,OAAOC,EAAP,MAAe,IAAf;AACA,SAASC,UAAT,EAAqBC,QAArB,EAA+BC,QAA/B,QAA+C,sBAA/C;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeC,MAAf,CAAuBC,IAAvB,EAA2C;AAAA,MAAdC,OAAc,uEAAJ,EAAI;AACzCX,EAAAA,eAAe,CAACU,IAAD,CAAf;AACA,QAAME,GAAG,GAAG,EAAE,GAAG,KAAKP,EAAL,CAAQQ,QAAb;AAAuB,OAAGF;AAA1B,GAAZ;AAEA,QAAMG,YAAY,GAAG,MAAM,KAAKA,YAAL,CAAkB,EAC3C,GAAGF,GADwC;AAE3CG,IAAAA,MAAM,EAAEX,aAAa,CAACM,IAAD,CAFsB;AAG3CM,IAAAA,SAAS,EAAE,MAAM,KAAKC,OAAL,CAAaL,GAAb;AAH0B,GAAlB,CAA3B;AAMA,SAAO,KAAKM,IAAL,CAAUJ,YAAV,EAAwBF,GAAxB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,eAAeO,MAAf,CAAuBT,IAAvB,EAA0D;AAAA,MAA7BU,QAA6B,uEAAlB,EA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A4D;AAAA,MAAlCsC,OAAkC,uEAAxBzC,QAAwB;AAAA,MAAdI,OAAc,uEAAJ,EAAI;AAC1D,SAAO,KAAKmD,SAAL,CAAepD,IAAf,EAAqB,CAArB,EAAwB,EAAE,GAAGC,OAAL;AAAcqC,IAAAA,OAAd;AAAuBiB,IAAAA,GAAG,EAAE;AAA5B,GAAxB,CAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMC,IAAI,GAAG7D,EAAE,CAAC8D,OAAH,CAAW;AACtBC,EAAAA,OAAO,EAAE;AACP5B,IAAAA,SAAS,EAAEL,KADJ;AAEPkC,IAAAA,YAAY,EAAEb,QAFP;AAGPM,IAAAA,SAAS,EAAEhB,KAHJ;AAIPP,IAAAA,UAAU,EAAEpB,MAJL;AAKPsB,IAAAA,YAAY,EAAEV,QALP;AAMPW,IAAAA,UAAU,EAAEjC,MANL;AAOP6D,IAAAA,OAAO,EAAEN;AAPF,GADa;AAUtBO,EAAAA,SAAS,EAAE;AACTlE,IAAAA,EAAE,EAAE;AACFQ,MAAAA,QAAQ,EAAE;AACR2D,QAAAA,SAAS,EAAElE,UADH;AAERsC,QAAAA,OAAO,EAAEpC,QAFD;AAEW;AACnBwC,QAAAA,OAAO,EAAEzC;AAHD;AADR;AADK;AAVW,CAAX,CAAb;AAqBA,eAAe2D,IAAf","sourcesContent":["/*\n * ISC License (ISC)\n * Copyright (c) 2018 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 * Aens module - routines to interact with the æternity naming system\n *\n * The high-level description of the naming system is\n * https://github.com/aeternity/protocol/blob/master/AENS.md in the protocol\n * repository.\n * @module @aeternity/aepp-sdk/es/ae/aens\n * @export Aens\n * @example import { Aens } from '@aeternity/aepp-sdk'\n */\n\nimport { salt } from '../utils/crypto'\nimport {\n commitmentHash, ensureNameValid, getMinimumNameFee, isAuctionName, encode, produceNameId\n} from '../tx/builder/helpers'\nimport Ae from './'\nimport { CLIENT_TTL, NAME_FEE, NAME_TTL } from '../tx/builder/schema'\n\n/**\n * Revoke a name\n * @instance\n * @function\n * @alias module:@aeternity/aepp-sdk/es/ae/aens\n * @category async\n * @param {String} name Name hash\n * @param {Object} [options={}] options\n * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass\n * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)\n * @param {Number|String|BigNumber} [options.fee] fee\n * @param {Number|String|BigNumber} [options.ttl] ttl\n * @param {Number|String|BigNumber} [options.nonce] nonce\n * @return {Promise<Object>} Transaction result\n * @example\n * const name = 'test.chain'\n * const nameObject = await sdkInstance.aensQuery(name)\n *\n * await sdkInstance.aensRevoke(name, { fee, ttl , nonce })\n * // or\n * await nameObject.revoke({ fee, ttl, nonce })\n */\nasync function revoke (name, options = {}) {\n ensureNameValid(name)\n const opt = { ...this.Ae.defaults, ...options }\n\n const nameRevokeTx = await this.nameRevokeTx({\n ...opt,\n nameId: produceNameId(name),\n accountId: await this.address(opt)\n })\n\n return this.send(nameRevokeTx, opt)\n}\n\n/**\n * Update a name\n * @instance\n * @function\n * @category async\n * @alias module:@aeternity/aepp-sdk/es/ae/aens\n * @param {String} name AENS name\n * @param {Object.<string, string>} pointers Map of pointer keys to corresponding addresses\n * @param {Object} [options={}]\n * @param {Boolean} [options.extendPointers] Get the pointers from the node and merge with provided\n * ones. Pointers with the same type will be overwritten\n * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you\n * pass publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)\n * @param {Number|String|BigNumber} [options.fee] fee\n * @param {Number|String|BigNumber} [options.ttl] ttl\n * @param {Number|String|BigNumber} [options.nonce] nonce\n * @param {Number|String|BigNumber} [options.nameTtl=50000] Name ttl represented in number of\n * blocks (Max value is 50000 blocks)\n * @param {Number|String|BigNumber} [options.clientTtl=84600] a suggestion as to how long any\n * clients should cache this information\n * @return {Promise<Object>}\n * @throws Invalid pointer array error\n * @example\n * const name = 'test.chain'\n * const pointersArray = ['ak_asd23dasdas...,' 'ct_asdf34fasdasd...']\n * const nameObject = await sdkInstance.aensQuery(name)\n *\n * await sdkInstance.aensUpdate(name, pointersArray, { nameTtl, ttl, fee, nonce, clientTtl })\n * // or\n * await nameObject.update(pointers, { nameTtl, ttl, fee, nonce, clientTtl })\n */\nasync function update (name, pointers = {}, options = {}) {\n ensureNameValid(name)\n const opt = { ...this.Ae.defaults, ...options }\n const allPointers = {\n ...options.extendPointers && Object.fromEntries(\n (await this.getName(name)).pointers.map(({ key, id }) => [key, id])\n ),\n ...pointers\n }\n\n const nameUpdateTx = await this.nameUpdateTx({\n ...opt,\n nameId: produceNameId(name),\n accountId: await this.address(opt),\n pointers: Object.entries(allPointers).map(([key, id]) => ({ key, id }))\n })\n\n return this.send(nameUpdateTx, opt)\n}\n\n/**\n * Transfer a domain to another account\n * @instance\n * @function\n * @category async\n * @alias module:@aeternity/aepp-sdk/es/ae/aens\n * @param {String} name AENS name\n * @param {String} account Recipient account publick key\n * @param {Object} [options={}]\n * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass\n * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)\n * @param {Number|String|BigNumber} [options.fee] fee\n * @param {Number|String|BigNumber} [options.ttl] ttl\n * @param {Number|String|BigNumber} [options.nonce] nonce\n * @return {Promise<Object>} Transaction result\n * @example\n * const name = 'test.chain'\n * const recipientPub = 'ak_asd23dasdas...'\n * const nameObject = await sdkInstance.aensQuery(name)\n *\n * await sdkInstance.aensTransfer(name, recipientPub, { ttl, fee, nonce })\n * // or\n * await nameObject.transfer(recipientPub, { ttl, fee, nonce })\n */\nasync function transfer (name, account, options = {}) {\n ensureNameValid(name)\n const opt = { ...this.Ae.defaults, ...options }\n\n const nameTransferTx = await this.nameTransferTx({\n ...opt,\n nameId: produceNameId(name),\n accountId: await this.address(opt),\n recipientId: account\n })\n\n return this.send(nameTransferTx, opt)\n}\n\n/**\n * Query the AENS name info from the node\n * and return the object with info and predefined functions for manipulating name\n * @instance\n * @function\n * @category async\n * @alias module:@aeternity/aepp-sdk/es/ae/aens\n * @param {String} name\n * @param {Object} opt Options\n * @return {Promise<Object>}\n * @example\n * const nameObject = sdkInstance.aensQuery('test.chain')\n * console.log(nameObject)\n * {\n * id, // name hash\n * pointers, // array of pointers\n * update, // Update name function\n * extendTtl, // Extend Ttl name function\n * transfer, // Transfer name function\n * revoke // Revoke name function\n * }\n */\nasync function query (name, opt = {}) {\n ensureNameValid(name)\n const o = await this.getName(name)\n\n return Object.freeze(Object.assign(o, {\n pointers: o.pointers || [],\n update: async (pointers, options = {}) => {\n return {\n ...(await this.aensUpdate(name, pointers, { ...opt, ...options })),\n ...(await this.aensQuery(name))\n }\n },\n transfer: async (account, options = {}) => {\n return {\n ...(await this.aensTransfer(name, account, { ...opt, ...options })),\n ...(await this.aensQuery(name))\n }\n },\n revoke: async (options = {}) => this.aensRevoke(name, { ...opt, ...options }),\n extendTtl: async (nameTtl = NAME_TTL, options = {}) => {\n if (!nameTtl || typeof nameTtl !== 'number' || nameTtl > NAME_TTL) throw new Error('Ttl must be an number and less then 180000 blocks')\n\n return {\n ...await this.aensUpdate(name, {}, { ...opt, ...options, nameTtl, extendPointers: true }),\n ...await this.aensQuery(name)\n }\n }\n }))\n}\n\n/**\n * Claim a previously preclaimed registration. This can only be done after the\n * preclaim step\n * @instance\n * @function\n * @category async\n * @alias module:@aeternity/aepp-sdk/es/ae/aens\n * @param {String} name\n * @param {Number} salt Salt from pre-claim, or 0 if it's a bid\n * @param {Object} [options] options\n * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass\n * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)\n * @param {Number|String|BigNumber} [options.fee] fee\n * @param {Number|String|BigNumber} [options.ttl] ttl\n * @param {Number|String|BigNumber} [options.nonce] nonce\n * @param {Number|String} [options.nameFee] Name Fee (By default calculated by sdk)\n * @return {Promise<Object>} the result of the claim\n * @example\n * const name = 'test.chain'\n * const salt = preclaimResult.salt // salt from pre-claim transaction\n *\n * await sdkInstance.aensClaim(name, salt, { ttl, fee, nonce, nameFee })\n */\nasync function claim (name, salt, options) {\n ensureNameValid(name)\n const opt = { ...this.Ae.defaults, ...options }\n\n const minNameFee = getMinimumNameFee(name)\n if (opt.nameFee !== this.Ae.defaults.nameFee && minNameFee.gt(opt.nameFee)) {\n throw new Error(`the provided fee ${opt.nameFee} is not enough to execute the claim, required: ${minNameFee}`)\n }\n opt.nameFee = opt.nameFee !== this.Ae.defaults.nameFee ? opt.nameFee : minNameFee\n const claimTx = await this.nameClaimTx({\n ...opt,\n accountId: await this.address(opt),\n nameSalt: salt,\n name: encode(name, 'nm')\n })\n\n const result = await this.send(claimTx, opt)\n if (!isAuctionName(name)) {\n const nameInter = opt.waitMined ? await this.aensQuery(name, opt) : {}\n return Object.assign(result, nameInter)\n }\n return { ...result, nameFee: opt.nameFee }\n}\n\n/**\n * Preclaim a name. Sends a hash of the name and a random salt to the node\n * @instance\n * @function\n * @category async\n * @alias module:@aeternity/aepp-sdk/es/ae/aens\n * @param {String} name\n * @param {Object} [options={}]\n * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass\n * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)\n * @param {Number|String|BigNumber} [options.fee] fee\n * @param {Number|String|BigNumber} [options.ttl] ttl\n * @param {Number|String|BigNumber} [options.nonce] nonce\n * @return {Promise<Object>}\n * @example\n * const name = 'test.chain'\n * const salt = preclaimResult.salt // salt from pre-claim transaction\n *\n * await sdkInstance.aensPreclaim(name, { ttl, fee, nonce })\n * {\n * ...transactionResult,\n * claim, // Claim function (options={}) => claimTransactionResult\n * salt,\n * commitmentId\n * }\n */\nasync function preclaim (name, options = {}) {\n ensureNameValid(name)\n const opt = { ...this.Ae.defaults, ...options }\n const _salt = salt()\n const height = await this.height()\n const commitmentId = commitmentHash(name, _salt)\n\n const preclaimTx = await this.namePreclaimTx({\n ...opt,\n accountId: await this.address(opt),\n commitmentId\n })\n\n const result = await this.send(preclaimTx, opt)\n\n return Object.freeze({\n ...result,\n height,\n claim: options => this.aensClaim(name, _salt, { ...options, onAccount: opt.onAccount }),\n salt: _salt,\n commitmentId\n })\n}\n\n/**\n * Bid to name auction\n * @instance\n * @function\n * @category async\n * @alias module:@aeternity/aepp-sdk/es/ae/aens\n * @param {String} name Domain name\n * @param {String|Number} nameFee Name fee (bid fee)\n * @param {Object} [options={}]\n * @param {String|Object} [options.onAccount] Make operation on specific account from sdk (you pass\n * publickKey) or using provided KeyPair(Can be keypair object or MemoryAccount)\n * @param {Number|String|BigNumber} [options.fee] fee\n * @param {Number|String|BigNumber} [options.ttl] ttl\n * @param {Number|String|BigNumber} [options.nonce] nonce\n * @return {Promise<Object>} Transaction result\n * @example\n * const name = 'test.chain'\n * const bidFee = computeBidFee(name, startFee, incrementPercentage)\n *\n * await sdkInstance.aensBid(name, 213109412839123, { ttl, fee, nonce })\n */\nasync function bid (name, nameFee = NAME_FEE, options = {}) {\n return this.aensClaim(name, 0, { ...options, nameFee, vsn: 2 })\n}\n\n/**\n * Aens Stamp\n *\n * Aens provides name-system related methods atop\n * {@link module:@aeternity/aepp-sdk/es/ae--Ae} clients.\n * @function\n * @alias module:@aeternity/aepp-sdk/es/ae/aens\n * @rtype Stamp\n * @param {Object} [options={}] - Initializer object\n * @return {Object} Aens instance\n */\nconst Aens = Ae.compose({\n methods: {\n aensQuery: query,\n aensPreclaim: preclaim,\n aensClaim: claim,\n aensUpdate: update,\n aensTransfer: transfer,\n aensRevoke: revoke,\n aensBid: bid\n },\n deepProps: {\n Ae: {\n defaults: {\n clientTtl: CLIENT_TTL,\n nameTtl: NAME_TTL, // aec_governance:name_claim_max_expiration() => 50000\n nameFee: NAME_FEE\n }\n }\n }\n})\n\nexport default Aens\n"],"file":"aens.js"}
package/es/ae/aepp.js DELETED
@@ -1,45 +0,0 @@
1
- /*
2
- * ISC License (ISC)
3
- * Copyright (c) 2018 aeternity developers
4
- *
5
- * Permission to use, copy, modify, and/or distribute this software for any
6
- * purpose with or without fee is hereby granted, provided that the above
7
- * copyright notice and this permission notice appear in all copies.
8
- *
9
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- * PERFORMANCE OF THIS SOFTWARE.
16
- */
17
-
18
- /**
19
- * Aepp module
20
- * @module @aeternity/aepp-sdk/es/ae/aepp
21
- * @export Aepp
22
- * @example import { RpcAepp } from '@aeternity/aepp-sdk'
23
- */
24
- import Ae from './';
25
- import Aens from './aens';
26
- import { ContractWithCompiler as Contract } from './contract';
27
- import AeppRpc from '../utils/aepp-wallet-communication/rpc/aepp-rpc';
28
- import Chain from '../chain/node';
29
- import Tx from '../tx/tx';
30
- import Oracle from './oracle';
31
- /**
32
- * Aepp Stamp
33
- *
34
- * Aepp provides base functionality.
35
- * Expected to use this stamp with a Wallet.
36
- * {@link module:@aeternity/aepp-sdk/es/ae--Ae} clients.
37
- * @function
38
- * @alias module:@aeternity/aepp-sdk/es/ae/aepp
39
- * @rtype Stamp
40
- * @param {Object} [options={}] - Initializer object
41
- * @return {Object} Aepp instance
42
- */
43
-
44
- export default Ae.compose(Tx, Oracle, Contract, Aens, Chain, AeppRpc);
45
- //# sourceMappingURL=aepp.js.map
package/es/ae/aepp.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ae/aepp.js"],"names":["Ae","Aens","ContractWithCompiler","Contract","AeppRpc","Chain","Tx","Oracle","compose"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,EAAP,MAAe,IAAf;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,SAASC,oBAAoB,IAAIC,QAAjC,QAAiD,YAAjD;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,eAAlB;AACA,OAAOC,EAAP,MAAe,UAAf;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeP,EAAE,CAACQ,OAAH,CAAWF,EAAX,EAAeC,MAAf,EAAuBJ,QAAvB,EAAiCF,IAAjC,EAAuCI,KAAvC,EAA8CD,OAA9C,CAAf","sourcesContent":["/*\n * ISC License (ISC)\n * Copyright (c) 2018 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 * Aepp module\n * @module @aeternity/aepp-sdk/es/ae/aepp\n * @export Aepp\n * @example import { RpcAepp } from '@aeternity/aepp-sdk'\n */\n\nimport Ae from './'\nimport Aens from './aens'\nimport { ContractWithCompiler as Contract } from './contract'\nimport AeppRpc from '../utils/aepp-wallet-communication/rpc/aepp-rpc'\nimport Chain from '../chain/node'\nimport Tx from '../tx/tx'\nimport Oracle from './oracle'\n\n/**\n * Aepp Stamp\n *\n * Aepp provides base functionality.\n * Expected to use this stamp with a Wallet.\n * {@link module:@aeternity/aepp-sdk/es/ae--Ae} clients.\n * @function\n * @alias module:@aeternity/aepp-sdk/es/ae/aepp\n * @rtype Stamp\n * @param {Object} [options={}] - Initializer object\n * @return {Object} Aepp instance\n */\nexport default Ae.compose(Tx, Oracle, Contract, Aens, Chain, AeppRpc)\n"],"file":"aepp.js"}