@aeternity/aepp-sdk 13.0.0 → 13.1.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 (276) hide show
  1. package/README.md +4 -2
  2. package/bin/aesophia_cli +0 -0
  3. package/dist/aepp-sdk.browser-script.js +1 -1
  4. package/dist/aepp-sdk.browser-script.js.map +1 -1
  5. package/dist/aepp-sdk.browser.js +1 -1
  6. package/dist/aepp-sdk.browser.js.map +1 -1
  7. package/dist/aepp-sdk.js +27068 -16862
  8. package/dist/aepp-sdk.js.map +1 -1
  9. package/es/AeSdkBase.d.ts +11 -3
  10. package/es/AeSdkBase.mjs +24 -3
  11. package/es/AeSdkBase.mjs.map +1 -1
  12. package/es/AeSdkMethods.d.ts +9 -14
  13. package/es/AeSdkMethods.mjs +20 -49
  14. package/es/AeSdkMethods.mjs.map +1 -1
  15. package/es/AeSdkWallet.mjs +28 -5
  16. package/es/AeSdkWallet.mjs.map +1 -1
  17. package/es/Middleware.d.ts +38 -0
  18. package/es/Middleware.mjs +90 -0
  19. package/es/Middleware.mjs.map +1 -0
  20. package/es/MiddlewareSubscriber.d.ts +30 -0
  21. package/es/MiddlewareSubscriber.mjs +198 -0
  22. package/es/MiddlewareSubscriber.mjs.map +1 -0
  23. package/es/Node.d.ts +1 -1
  24. package/es/Node.mjs.map +1 -1
  25. package/es/account/Base.d.ts +14 -2
  26. package/es/account/Base.mjs.map +1 -1
  27. package/es/account/Generalized.d.ts +1 -0
  28. package/es/account/Generalized.mjs +5 -0
  29. package/es/account/Generalized.mjs.map +1 -1
  30. package/es/account/Ledger.d.ts +1 -0
  31. package/es/account/Ledger.mjs +5 -0
  32. package/es/account/Ledger.mjs.map +1 -1
  33. package/es/account/Memory.d.ts +2 -0
  34. package/es/account/Memory.mjs +18 -0
  35. package/es/account/Memory.mjs.map +1 -1
  36. package/es/account/Rpc.d.ts +1 -6
  37. package/es/account/Rpc.mjs +24 -10
  38. package/es/account/Rpc.mjs.map +1 -1
  39. package/es/aens.d.ts +1 -1
  40. package/es/aens.mjs +1 -1
  41. package/es/aens.mjs.map +1 -1
  42. package/es/aepp-wallet-communication/rpc/RpcClient.mjs +5 -2
  43. package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
  44. package/es/aepp-wallet-communication/rpc/types.d.ts +10 -0
  45. package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
  46. package/es/aepp-wallet-communication/schema.d.ts +1 -8
  47. package/es/aepp-wallet-communication/schema.mjs +1 -14
  48. package/es/aepp-wallet-communication/schema.mjs.map +1 -1
  49. package/es/aepp-wallet-communication/wallet-detector.d.ts +1 -1
  50. package/es/aepp-wallet-communication/wallet-detector.mjs +0 -3
  51. package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -1
  52. package/es/apis/compiler/compiler.mjs +15 -1
  53. package/es/apis/compiler/compiler.mjs.map +1 -1
  54. package/es/apis/compiler/models/index.d.ts +1 -7
  55. package/es/apis/compiler/models/index.mjs.map +1 -1
  56. package/es/apis/compiler/models/mappers.d.ts +0 -1
  57. package/es/apis/compiler/models/mappers.mjs +0 -43
  58. package/es/apis/compiler/models/mappers.mjs.map +1 -1
  59. package/es/apis/middleware/index.d.ts +2 -0
  60. package/es/apis/middleware/index.mjs +3 -0
  61. package/es/apis/middleware/index.mjs.map +1 -0
  62. package/es/apis/middleware/middleware.d.ts +309 -0
  63. package/es/apis/middleware/middleware.mjs +1527 -0
  64. package/es/apis/middleware/middleware.mjs.map +1 -0
  65. package/es/apis/middleware/models/index.d.ts +1496 -0
  66. package/es/apis/middleware/models/index.mjs +364 -0
  67. package/es/apis/middleware/models/index.mjs.map +1 -0
  68. package/es/apis/middleware/models/mappers.d.ts +102 -0
  69. package/es/apis/middleware/models/mappers.mjs +3334 -0
  70. package/es/apis/middleware/models/mappers.mjs.map +1 -0
  71. package/es/apis/middleware/models/parameters.d.ts +43 -0
  72. package/es/apis/middleware/models/parameters.mjs +417 -0
  73. package/es/apis/middleware/models/parameters.mjs.map +1 -0
  74. package/es/chain.d.ts +2 -1
  75. package/es/chain.mjs +4 -2
  76. package/es/chain.mjs.map +1 -1
  77. package/es/channel/Base.d.ts +1 -1
  78. package/es/channel/Base.mjs +1 -4
  79. package/es/channel/Base.mjs.map +1 -1
  80. package/es/channel/internal.mjs +2 -0
  81. package/es/channel/internal.mjs.map +1 -1
  82. package/es/contract/Contract.d.ts +1 -2
  83. package/es/contract/Contract.mjs +1 -1
  84. package/es/contract/Contract.mjs.map +1 -1
  85. package/es/contract/compiler/Base.d.ts +21 -0
  86. package/es/contract/compiler/Base.mjs.map +1 -1
  87. package/es/contract/compiler/Cli.d.ts +2 -0
  88. package/es/contract/compiler/Cli.mjs +24 -3
  89. package/es/contract/compiler/Cli.mjs.map +1 -1
  90. package/es/contract/compiler/Http.d.ts +2 -0
  91. package/es/contract/compiler/Http.mjs +22 -2
  92. package/es/contract/compiler/Http.mjs.map +1 -1
  93. package/es/contract/compiler/HttpNode.d.ts +1 -0
  94. package/es/contract/compiler/HttpNode.mjs +5 -0
  95. package/es/contract/compiler/HttpNode.mjs.map +1 -1
  96. package/es/deprecated.d.ts +14 -0
  97. package/es/deprecated.mjs +22 -0
  98. package/es/deprecated.mjs.map +1 -0
  99. package/es/index-browser.d.ts +20 -14
  100. package/es/index-browser.mjs +19 -15
  101. package/es/index-browser.mjs.map +1 -1
  102. package/es/tx/builder/constants.d.ts +0 -1
  103. package/es/tx/builder/constants.mjs +0 -1
  104. package/es/tx/builder/constants.mjs.map +1 -1
  105. package/es/tx/builder/field-types/coin-amount.d.ts +1 -1
  106. package/es/tx/builder/field-types/coin-amount.mjs +2 -1
  107. package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
  108. package/es/tx/builder/field-types/deposit.d.ts +1 -1
  109. package/es/tx/builder/field-types/entry.mjs +2 -1
  110. package/es/tx/builder/field-types/entry.mjs.map +1 -1
  111. package/es/tx/builder/field-types/index.d.ts +2 -2
  112. package/es/tx/builder/helpers.d.ts +8 -1
  113. package/es/tx/builder/helpers.mjs +53 -9
  114. package/es/tx/builder/helpers.mjs.map +1 -1
  115. package/es/tx/builder/index.d.ts +4 -2
  116. package/es/tx/builder/index.mjs +0 -1
  117. package/es/tx/builder/index.mjs.map +1 -1
  118. package/es/tx/builder/schema.d.ts +9 -9
  119. package/es/tx/execution-cost.d.ts +17 -0
  120. package/es/tx/execution-cost.mjs +17 -0
  121. package/es/tx/execution-cost.mjs.map +1 -1
  122. package/es/tx/validator.mjs +6 -3
  123. package/es/tx/validator.mjs.map +1 -1
  124. package/es/utils/amount-formatter.d.ts +1 -2
  125. package/es/utils/amount-formatter.mjs +2 -2
  126. package/es/utils/amount-formatter.mjs.map +1 -1
  127. package/es/utils/autorest.mjs +6 -8
  128. package/es/utils/autorest.mjs.map +1 -1
  129. package/es/utils/crypto.d.ts +1 -0
  130. package/es/utils/crypto.mjs +12 -2
  131. package/es/utils/crypto.mjs.map +1 -1
  132. package/es/utils/errors.d.ts +2 -2
  133. package/es/utils/errors.mjs.map +1 -1
  134. package/es/utils/other.d.ts +1 -0
  135. package/es/utils/other.mjs +5 -0
  136. package/es/utils/other.mjs.map +1 -1
  137. package/es/utils/typed-data.d.ts +45 -0
  138. package/es/utils/typed-data.mjs +71 -0
  139. package/es/utils/typed-data.mjs.map +1 -0
  140. package/package.json +23 -4
  141. package/src/AeSdkBase.ts +30 -5
  142. package/src/AeSdkMethods.ts +31 -50
  143. package/src/AeSdkWallet.ts +27 -5
  144. package/src/Middleware.ts +141 -0
  145. package/src/MiddlewareSubscriber.ts +207 -0
  146. package/src/Node.ts +1 -1
  147. package/src/account/Base.ts +20 -3
  148. package/src/account/Generalized.ts +5 -0
  149. package/src/account/Ledger.ts +5 -0
  150. package/src/account/Memory.ts +15 -0
  151. package/src/account/Rpc.ts +19 -7
  152. package/src/aens.ts +1 -1
  153. package/src/aepp-wallet-communication/rpc/RpcClient.ts +11 -3
  154. package/src/aepp-wallet-communication/rpc/types.ts +11 -0
  155. package/src/aepp-wallet-communication/schema.ts +2 -17
  156. package/src/aepp-wallet-communication/wallet-detector.ts +1 -2
  157. package/src/apis/compiler/compiler.ts +8 -1
  158. package/src/apis/compiler/models/index.ts +1 -8
  159. package/src/apis/compiler/models/mappers.ts +0 -36
  160. package/src/apis/middleware/index.ts +2 -0
  161. package/src/apis/middleware/middleware.ts +1807 -0
  162. package/src/apis/middleware/models/index.ts +1747 -0
  163. package/src/apis/middleware/models/mappers.ts +3370 -0
  164. package/src/apis/middleware/models/parameters.ts +463 -0
  165. package/src/chain.ts +3 -2
  166. package/src/channel/Base.ts +5 -5
  167. package/src/channel/internal.ts +2 -0
  168. package/src/contract/Contract.ts +2 -1
  169. package/src/contract/compiler/Base.ts +26 -0
  170. package/src/contract/compiler/Cli.ts +27 -3
  171. package/src/contract/compiler/Http.ts +21 -2
  172. package/src/contract/compiler/HttpNode.ts +6 -0
  173. package/src/deprecated.ts +23 -0
  174. package/src/index-browser.ts +77 -15
  175. package/src/tx/builder/constants.ts +0 -1
  176. package/src/tx/builder/field-types/coin-amount.ts +2 -1
  177. package/src/tx/builder/field-types/entry.ts +1 -1
  178. package/src/tx/builder/helpers.ts +54 -9
  179. package/src/tx/builder/index.ts +6 -9
  180. package/src/tx/execution-cost.ts +17 -0
  181. package/src/tx/validator.ts +4 -2
  182. package/src/utils/amount-formatter.ts +1 -1
  183. package/src/utils/autorest.ts +5 -10
  184. package/src/utils/crypto.ts +12 -2
  185. package/src/utils/errors.ts +2 -2
  186. package/src/utils/other.ts +5 -0
  187. package/src/utils/typed-data.ts +95 -0
  188. package/types-legacy/ts4.2/AeSdkBase.d.ts +11 -3
  189. package/types-legacy/ts4.2/AeSdkMethods.d.ts +9 -14
  190. package/types-legacy/ts4.2/Middleware.d.ts +46 -0
  191. package/types-legacy/ts4.2/MiddlewareSubscriber.d.ts +30 -0
  192. package/types-legacy/ts4.2/Node.d.ts +1 -1
  193. package/types-legacy/ts4.2/account/Base.d.ts +14 -2
  194. package/types-legacy/ts4.2/account/Generalized.d.ts +1 -0
  195. package/types-legacy/ts4.2/account/Ledger.d.ts +1 -0
  196. package/types-legacy/ts4.2/account/Memory.d.ts +2 -0
  197. package/types-legacy/ts4.2/account/Rpc.d.ts +1 -6
  198. package/types-legacy/ts4.2/aens.d.ts +1 -1
  199. package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +10 -0
  200. package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +1 -8
  201. package/types-legacy/ts4.2/aepp-wallet-communication/wallet-detector.d.ts +1 -1
  202. package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +1 -7
  203. package/types-legacy/ts4.2/apis/compiler/models/mappers.d.ts +0 -1
  204. package/types-legacy/ts4.2/apis/middleware/index.d.ts +2 -0
  205. package/types-legacy/ts4.2/apis/middleware/middleware.d.ts +309 -0
  206. package/types-legacy/ts4.2/apis/middleware/models/index.d.ts +1496 -0
  207. package/types-legacy/ts4.2/apis/middleware/models/mappers.d.ts +102 -0
  208. package/types-legacy/ts4.2/apis/middleware/models/parameters.d.ts +43 -0
  209. package/types-legacy/ts4.2/chain.d.ts +2 -1
  210. package/types-legacy/ts4.2/channel/Base.d.ts +1 -1
  211. package/types-legacy/ts4.2/contract/Contract.d.ts +1 -2
  212. package/types-legacy/ts4.2/contract/compiler/Base.d.ts +21 -0
  213. package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +2 -0
  214. package/types-legacy/ts4.2/contract/compiler/Http.d.ts +2 -0
  215. package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +1 -0
  216. package/types-legacy/ts4.2/deprecated.d.ts +14 -0
  217. package/types-legacy/ts4.2/index-browser.d.ts +20 -14
  218. package/types-legacy/ts4.2/tx/builder/constants.d.ts +0 -1
  219. package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +1 -1
  220. package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +1 -1
  221. package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +2 -2
  222. package/types-legacy/ts4.2/tx/builder/helpers.d.ts +8 -1
  223. package/types-legacy/ts4.2/tx/builder/index.d.ts +4 -2
  224. package/types-legacy/ts4.2/tx/builder/schema.d.ts +9 -9
  225. package/types-legacy/ts4.2/tx/execution-cost.d.ts +17 -0
  226. package/types-legacy/ts4.2/utils/amount-formatter.d.ts +1 -2
  227. package/types-legacy/ts4.2/utils/crypto.d.ts +1 -0
  228. package/types-legacy/ts4.2/utils/errors.d.ts +2 -2
  229. package/types-legacy/ts4.2/utils/other.d.ts +1 -0
  230. package/types-legacy/ts4.2/utils/typed-data.d.ts +60 -0
  231. package/types-legacy/ts4.5/AeSdkBase.d.ts +11 -3
  232. package/types-legacy/ts4.5/AeSdkMethods.d.ts +9 -14
  233. package/types-legacy/ts4.5/Middleware.d.ts +46 -0
  234. package/types-legacy/ts4.5/MiddlewareSubscriber.d.ts +30 -0
  235. package/types-legacy/ts4.5/Node.d.ts +1 -1
  236. package/types-legacy/ts4.5/account/Base.d.ts +14 -2
  237. package/types-legacy/ts4.5/account/Generalized.d.ts +1 -0
  238. package/types-legacy/ts4.5/account/Ledger.d.ts +1 -0
  239. package/types-legacy/ts4.5/account/Memory.d.ts +2 -0
  240. package/types-legacy/ts4.5/account/Rpc.d.ts +1 -6
  241. package/types-legacy/ts4.5/aens.d.ts +1 -1
  242. package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +10 -0
  243. package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +1 -8
  244. package/types-legacy/ts4.5/aepp-wallet-communication/wallet-detector.d.ts +1 -1
  245. package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +1 -7
  246. package/types-legacy/ts4.5/apis/compiler/models/mappers.d.ts +0 -1
  247. package/types-legacy/ts4.5/apis/middleware/index.d.ts +2 -0
  248. package/types-legacy/ts4.5/apis/middleware/middleware.d.ts +309 -0
  249. package/types-legacy/ts4.5/apis/middleware/models/index.d.ts +1496 -0
  250. package/types-legacy/ts4.5/apis/middleware/models/mappers.d.ts +102 -0
  251. package/types-legacy/ts4.5/apis/middleware/models/parameters.d.ts +43 -0
  252. package/types-legacy/ts4.5/chain.d.ts +2 -1
  253. package/types-legacy/ts4.5/channel/Base.d.ts +1 -1
  254. package/types-legacy/ts4.5/contract/Contract.d.ts +1 -2
  255. package/types-legacy/ts4.5/contract/compiler/Base.d.ts +21 -0
  256. package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +2 -0
  257. package/types-legacy/ts4.5/contract/compiler/Http.d.ts +2 -0
  258. package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +1 -0
  259. package/types-legacy/ts4.5/deprecated.d.ts +14 -0
  260. package/types-legacy/ts4.5/index-browser.d.ts +20 -14
  261. package/types-legacy/ts4.5/tx/builder/constants.d.ts +0 -1
  262. package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +1 -1
  263. package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +1 -1
  264. package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +2 -2
  265. package/types-legacy/ts4.5/tx/builder/helpers.d.ts +8 -1
  266. package/types-legacy/ts4.5/tx/builder/index.d.ts +4 -2
  267. package/types-legacy/ts4.5/tx/builder/schema.d.ts +9 -9
  268. package/types-legacy/ts4.5/tx/execution-cost.d.ts +17 -0
  269. package/types-legacy/ts4.5/utils/amount-formatter.d.ts +1 -2
  270. package/types-legacy/ts4.5/utils/crypto.d.ts +1 -0
  271. package/types-legacy/ts4.5/utils/errors.d.ts +2 -2
  272. package/types-legacy/ts4.5/utils/other.d.ts +1 -0
  273. package/types-legacy/ts4.5/utils/typed-data.d.ts +60 -0
  274. package/es/typings/@aeternity__aepp-calldata/index.d.mjs +0 -2
  275. package/es/typings/@aeternity__aepp-calldata/index.d.mjs.map +0 -1
  276. package/src/typings/@aeternity__aepp-calldata/index.d.ts +0 -20
@@ -0,0 +1,102 @@
1
+ import * as coreClient from "@azure/core-client";
2
+ export declare const Paths1I5J7OcV2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
3
+ export declare const Activity: coreClient.CompositeMapper;
4
+ export declare const PaginatedResponse: coreClient.CompositeMapper;
5
+ export declare const ErrorResponse: coreClient.CompositeMapper;
6
+ export declare const Paths17FlgdkV2Aex141GetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
7
+ export declare const Aex141Response: coreClient.CompositeMapper;
8
+ export declare const PathsAxw0PwV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
9
+ export declare const Aex141OwnedTokenResponse: coreClient.CompositeMapper;
10
+ export declare const PathsN3Ru7DV2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
11
+ export declare const PathsRa6Pv6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
12
+ export declare const Aex141TemplatesResponse: coreClient.CompositeMapper;
13
+ export declare const Paths19B9O7TV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
14
+ export declare const Aex141TemplateTokensResponse: coreClient.CompositeMapper;
15
+ export declare const Paths1Fe570RV2Aex9GetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
16
+ export declare const Aex9Response: coreClient.CompositeMapper;
17
+ export declare const PathsO9MbpkV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchemaAllof1: coreClient.CompositeMapper;
18
+ export declare const Aex9BalanceResponse: coreClient.CompositeMapper;
19
+ export declare const PathsY2JwfkV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
20
+ export declare const Aex9TransferResponse: coreClient.CompositeMapper;
21
+ export declare const Paths5U7W2V2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
22
+ export declare const Paths12TleqhV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
23
+ export declare const Paths1C2B0UpV2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
24
+ export declare const Aex9ContractBalanceResponse: coreClient.CompositeMapper;
25
+ export declare const PathsBelvp6V2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
26
+ export declare const Paths11X7LpcV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
27
+ export declare const Paths5LeqfqV2BlocksGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
28
+ export declare const Block: coreClient.CompositeMapper;
29
+ export declare const NotFoundResponse: coreClient.CompositeMapper;
30
+ export declare const PathsC25EgV2ChannelsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
31
+ export declare const Channel: coreClient.CompositeMapper;
32
+ export declare const Paths1Csrt0IV2ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
33
+ export declare const ContractCall: coreClient.CompositeMapper;
34
+ export declare const Paths9Ya94MV2ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
35
+ export declare const ContractLog: coreClient.CompositeMapper;
36
+ export declare const PathsRzn6HzV2DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
37
+ export declare const DeltaStat: coreClient.CompositeMapper;
38
+ export declare const Paths10TrrshV2KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
39
+ export declare const KeyBlock: coreClient.CompositeMapper;
40
+ export declare const Paths7Hfka2V2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
41
+ export declare const MicroBlock: coreClient.CompositeMapper;
42
+ export declare const Paths1RxrrvbV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
43
+ export declare const Tx: coreClient.CompositeMapper;
44
+ export declare const Paths16Srg6EV2NamesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
45
+ export declare const Name: coreClient.CompositeMapper;
46
+ export declare const NameInfo: coreClient.CompositeMapper;
47
+ export declare const NameInfoOwnership: coreClient.CompositeMapper;
48
+ export declare const NameInfoPointers: coreClient.CompositeMapper;
49
+ export declare const Auction: coreClient.CompositeMapper;
50
+ export declare const AuctionInfo: coreClient.CompositeMapper;
51
+ export declare const AuctionInfoLastBid: coreClient.CompositeMapper;
52
+ export declare const Paths1I6PwfdV2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
53
+ export declare const Paths7P6Qc1V2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0PropertiesDataItemsAllof1: coreClient.CompositeMapper;
54
+ export declare const NameClaim: coreClient.CompositeMapper;
55
+ export declare const PathsDjelzuV2NamesIdPointeesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
56
+ export declare const NameTransfer: coreClient.CompositeMapper;
57
+ export declare const NameUpdate: coreClient.CompositeMapper;
58
+ export declare const Oracle: coreClient.CompositeMapper;
59
+ export declare const OracleExtendsItem: coreClient.CompositeMapper;
60
+ export declare const PathsMherz6V2OraclesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
61
+ export declare const Status: coreClient.CompositeMapper;
62
+ export declare const StatusMdwAsyncTasks: coreClient.CompositeMapper;
63
+ export declare const PathsDpxn99V2TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
64
+ export declare const TotalStat: coreClient.CompositeMapper;
65
+ export declare const Paths17Cjtx5V2TransfersGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
66
+ export declare const Transfer: coreClient.CompositeMapper;
67
+ export declare const Paths1R74KpvV2TxsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
68
+ export declare const Paths16Tt677V2TxsCountIdGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
69
+ export declare const Aex141TransferEvent: coreClient.CompositeMapper;
70
+ export declare const Aex9TransferEvent: coreClient.CompositeMapper;
71
+ export declare const InternalContractCallEvent: coreClient.CompositeMapper;
72
+ export declare const InternalTransferEvent: coreClient.CompositeMapper;
73
+ export declare const NameClaimEvent: coreClient.CompositeMapper;
74
+ export declare const PathsKlr2M2V2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
75
+ export declare const PathsFlc7UjV2Aex141GetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
76
+ export declare const PathsSs61ZgV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
77
+ export declare const Paths1Ilysy5V2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
78
+ export declare const Paths17O9Fn6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
79
+ export declare const PathsNuoourV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
80
+ export declare const Paths1Wbogg8V2Aex9GetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
81
+ export declare const Paths1BsirxgV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
82
+ export declare const Paths1V0FiznV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
83
+ export declare const Paths1X48QgjV2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
84
+ export declare const Paths1DkkopqV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
85
+ export declare const PathsNi359V2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
86
+ export declare const Paths15Ih6XV2BlocksGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
87
+ export declare const Paths1Txl2A9V2ChannelsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
88
+ export declare const Paths187U0XzV2ContractsCallsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
89
+ export declare const PathsB246H1V2ContractsLogsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
90
+ export declare const Paths7Pbec0V2DeltastatsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
91
+ export declare const Paths1Ulxr59V2KeyBlocksGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
92
+ export declare const PathsO99PhzV2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
93
+ export declare const PathsGuqvhdV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
94
+ export declare const PathsK9TkttV2NamesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
95
+ export declare const Paths3Msq0DV2NamesSearchGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
96
+ export declare const PathsB0YvynV2OraclesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
97
+ export declare const Paths15PsutbV2TotalstatsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
98
+ export declare const PathsIgs9Z1V2TransfersGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
99
+ export declare const PathsFclv4TV2TxsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
100
+ export declare const Paths1R02SlwV2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
101
+ export declare const Paths1T9RwnyV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
102
+ export declare const Get200ApplicationJsonAllOfPropertiesItemsItem: coreClient.CompositeMapper;
@@ -0,0 +1,43 @@
1
+ import { OperationParameter, OperationURLParameter, OperationQueryParameter } from "@azure/core-client";
2
+ export declare const accept: OperationParameter;
3
+ export declare const $host: OperationURLParameter;
4
+ export declare const id: OperationURLParameter;
5
+ export declare const ownedOnly: OperationQueryParameter;
6
+ export declare const type: OperationQueryParameter;
7
+ export declare const limit: OperationQueryParameter;
8
+ export declare const scope: OperationQueryParameter;
9
+ export declare const direction: OperationQueryParameter;
10
+ export declare const by: OperationQueryParameter;
11
+ export declare const prefix: OperationQueryParameter;
12
+ export declare const accountId: OperationURLParameter;
13
+ export declare const contractId: OperationURLParameter;
14
+ export declare const tokenId: OperationURLParameter;
15
+ export declare const templateId: OperationURLParameter;
16
+ export declare const accountId1: OperationURLParameter;
17
+ export declare const sender: OperationURLParameter;
18
+ export declare const recipient: OperationURLParameter;
19
+ export declare const hash: OperationQueryParameter;
20
+ export declare const hashOrKbi: OperationURLParameter;
21
+ export declare const kbi: OperationURLParameter;
22
+ export declare const mbi: OperationURLParameter;
23
+ export declare const state: OperationQueryParameter;
24
+ export declare const contractId1: OperationQueryParameter;
25
+ export declare const event: OperationQueryParameter;
26
+ export declare const functionPrefix: OperationQueryParameter;
27
+ export declare const data: OperationQueryParameter;
28
+ export declare const aexnArgs: OperationQueryParameter;
29
+ export declare const hash1: OperationURLParameter;
30
+ export declare const ownedBy: OperationQueryParameter;
31
+ export declare const state1: OperationQueryParameter;
32
+ export declare const type1: OperationQueryParameter;
33
+ export declare const typeGroup: OperationQueryParameter;
34
+ export declare const account: OperationQueryParameter;
35
+ export declare const contract: OperationQueryParameter;
36
+ export declare const channel: OperationQueryParameter;
37
+ export declare const oracle: OperationQueryParameter;
38
+ export declare const senderId: OperationQueryParameter;
39
+ export declare const recipientId: OperationQueryParameter;
40
+ export declare const entrypoint: OperationQueryParameter;
41
+ export declare const txType: OperationQueryParameter;
42
+ export declare const id1: OperationQueryParameter;
43
+ export declare const hashOrIndex: OperationURLParameter;
@@ -9,7 +9,8 @@ import AccountBase from './account/Base';
9
9
  /**
10
10
  * @category chain
11
11
  */
12
- export declare function _getPollInterval(type: 'block' | 'microblock', { _expectedMineRate, _microBlockCycle, _maxPollInterval }: {
12
+ export declare function _getPollInterval(type: 'block' | 'microblock', // TODO: rename to 'key-block' | 'micro-block'
13
+ { _expectedMineRate, _microBlockCycle, _maxPollInterval }: {
13
14
  _expectedMineRate?: number;
14
15
  _microBlockCycle?: number;
15
16
  _maxPollInterval?: number;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { EventEmitter } from 'events';
2
+ import EventEmitter from 'events';
3
3
  import { w3cwebsocket as W3CWebSocket } from 'websocket';
4
4
  import { Tag } from '../tx/builder/constants';
5
5
  import { SignTx, ChannelOptions, ChannelState, ChannelHandler, ChannelAction, ChannelStatus, ChannelFsm, ChannelMessage, ChannelEvents } from './internal';
@@ -1,4 +1,3 @@
1
- /// <reference types="@aeternity__aepp-calldata" />
2
1
  /**
3
2
  * Contract module - routines to interact with the æternity contract
4
3
  *
@@ -36,7 +35,7 @@ interface SendAndProcessReturnType {
36
35
  result?: ContractCallObject;
37
36
  hash: TxData['hash'];
38
37
  tx: TxUnpacked & {
39
- tag: Tag.ContractCallTx | Tag.ContractCreateTx;
38
+ tag: Tag.SignedTx | Tag.ContractCallTx | Tag.ContractCreateTx;
40
39
  };
41
40
  txData: TxData;
42
41
  rawTx: Encoded.Transaction;
@@ -47,6 +47,27 @@ export default abstract class CompilerBase {
47
47
  bytecode: Encoded.ContractBytearray;
48
48
  aci: Aci;
49
49
  }>;
50
+ /**
51
+ * Generate contract's ACI by contract's path
52
+ * Available only in Node.js
53
+ * @param path - Path to contract source code
54
+ * @returns ACI
55
+ */
56
+ abstract generateAci(path: string): Promise<Aci>;
57
+ /**
58
+ * Generate contract's ACI by contract's source code
59
+ * @param sourceCode - Contract source code as string
60
+ * @param fileSystem - A map of contract filename to the corresponding contract source code to
61
+ * include into the main contract
62
+ * @example
63
+ * ```js
64
+ * {
65
+ * 'library.aes': 'namespace TestLib =\n function sum(x: int, y: int) : int = x + y'
66
+ * }
67
+ * ```
68
+ * @returns ACI
69
+ */
70
+ abstract generateAciBySourceCode(sourceCode: string, fileSystem?: Record<string, string>): Promise<Aci>;
50
71
  /**
51
72
  * Verify that a contract bytecode is the result of compiling the given source code
52
73
  * Available only in Node.js
@@ -17,6 +17,8 @@ export default class CompilerCli extends CompilerBase {
17
17
  bytecode: Encoded.ContractBytearray;
18
18
  aci: Aci;
19
19
  }>;
20
+ generateAci(path: string): Promise<Aci>;
21
+ generateAciBySourceCode(sourceCode: string, fileSystem?: Record<string, string>): Promise<Aci>;
20
22
  validate(bytecode: Encoded.ContractBytearray, path: string): Promise<boolean>;
21
23
  validateBySourceCode(bytecode: Encoded.ContractBytearray, sourceCode: string, fileSystem?: Record<string, string>): Promise<boolean>;
22
24
  version(): Promise<string>;
@@ -26,6 +26,8 @@ export default class CompilerHttp extends CompilerBase {
26
26
  bytecode: Encoded.ContractBytearray;
27
27
  aci: Aci;
28
28
  }>;
29
+ generateAciBySourceCode(sourceCode: string, fileSystem?: Record<string, string>): Promise<Aci>;
30
+ generateAci(path: string): Promise<Aci>;
29
31
  validateBySourceCode(bytecode: Encoded.ContractBytearray, sourceCode: string, fileSystem?: Record<string, string>): Promise<boolean>;
30
32
  validate(bytecode: Encoded.ContractBytearray, path: string): Promise<boolean>;
31
33
  version(): Promise<string>;
@@ -13,5 +13,6 @@ export default class CompilerHttpNode extends HttpBrowser {
13
13
  bytecode: Encoded.ContractBytearray;
14
14
  aci: Aci;
15
15
  }>;
16
+ generateAci(path: string): Promise<Aci>;
16
17
  validate(bytecode: Encoded.ContractBytearray, path: string): Promise<boolean>;
17
18
  }
@@ -0,0 +1,14 @@
1
+ import { RpcError } from './aepp-wallet-communication/schema';
2
+ /**
3
+ * @category exception
4
+ * @deprecated this exception is not thrown anymore
5
+ */
6
+ export declare class RpcBroadcastError extends RpcError {
7
+ static code: number;
8
+ code: number;
9
+ constructor(data?: any);
10
+ }
11
+ /**
12
+ * @deprecated use isAuctionName instead
13
+ */
14
+ export declare const NAME_BID_MAX_LENGTH = 12;
@@ -1,22 +1,25 @@
1
- export * from './chain';
2
- export * from './utils/crypto';
3
- export * from './utils/keystore';
4
- export * from './utils/bytes';
1
+ export { _getPollInterval, InvalidTxError, getHeight, poll, awaitHeight, waitForTxConfirm, sendTransaction, getAccount, getBalance, getCurrentGeneration, getGeneration, getMicroBlockTransactions, getKeyBlock, getMicroBlockHeader, txDryRun, getContractByteCode, getContract, getName, resolveName, } from './chain';
2
+ export { getAddressFromPriv, isAddressValid, genSalt, encodeUnsigned, hash, encodeContractAddress, generateKeyPairFromSecret, generateKeyPair, sign, verify, messageToHash, signMessage, verifyMessage, isValidKeypair, } from './utils/crypto';
3
+ export { recover, dump } from './utils/keystore';
4
+ export type { Keystore } from './utils/keystore';
5
+ export { toBytes } from './utils/bytes';
5
6
  export { buildTx, buildTxAsync, buildTxHash, unpackTx, buildContractIdByContractTx, } from './tx/builder';
6
- export * from './tx/builder/helpers';
7
- export * from './tx/builder/constants';
7
+ export { buildContractId, oracleQueryId, produceNameId, commitmentHash, readInt, isNameValid, ensureName, getDefaultPointerKey, getMinimumNameFee, computeBidFee, computeAuctionEndBlock, isAuctionName, } from './tx/builder/helpers';
8
+ export { MAX_AUTH_FUN_GAS, NAME_TTL, NAME_MAX_TTL, NAME_MAX_CLIENT_TTL, CLIENT_TTL, MIN_GAS_PRICE, NAME_FEE_MULTIPLIER, NAME_FEE_BID_INCREMENT, NAME_BID_TIMEOUT_BLOCKS, NAME_MAX_LENGTH_FEE, NAME_BID_RANGES, ConsensusProtocolVersion, VmVersion, AbiVersion, Tag, } from './tx/builder/constants';
9
+ export type { Int, AensName } from './tx/builder/constants';
8
10
  export { ORACLE_TTL_TYPES, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, DRY_RUN_ACCOUNT, CallReturnType, } from './tx/builder/schema';
9
11
  export { getExecutionCost, getExecutionCostBySignedTx, getExecutionCostUsingNode, } from './tx/execution-cost';
10
12
  export { default as getTransactionSignerAddress } from './tx/transaction-signer';
11
- export * from './utils/amount-formatter';
12
- export * from './utils/hd-wallet';
13
+ export { AE_AMOUNT_FORMATS, formatAmount, toAe, toAettos, prefixedAmount, } from './utils/amount-formatter';
14
+ export { DerivationError, deriveChild, derivePathFromKey, getMasterKeyFromSeed, derivePathFromSeed, getKeyPair, generateSaveHDWalletFromSeed, getSaveHDWalletAccounts, getHdWalletAccountFromSeed, } from './utils/hd-wallet';
13
15
  export { encode, decode, Encoding, Encoded, } from './utils/encoder';
14
- export * from './aens';
16
+ export { encodeFateValue, decodeFateValue, hashTypedData, hashDomain, hashJson, } from './utils/typed-data';
17
+ export { aensRevoke, aensUpdate, aensTransfer, aensQuery, aensClaim, aensPreclaim, aensBid, } from './aens';
15
18
  export { default as Contract } from './contract/Contract';
16
19
  export type { ContractMethodsBase } from './contract/Contract';
17
- export * from './oracle';
18
- export * from './spend';
19
- export * from './contract/ga';
20
+ export { pollForQueries, pollForQueryResponse, getQueryObject, postQueryToOracle, extendOracleTtl, respondToQuery, getOracleObject, registerOracle, } from './oracle';
21
+ export { spend, transferFunds, payForTransaction } from './spend';
22
+ export { createGeneralizedAccount, buildAuthTxHash, buildAuthTxHashByGaMetaTx } from './contract/ga';
20
23
  export { default as AeSdkMethods } from './AeSdkMethods';
21
24
  export { default as AeSdkBase } from './AeSdkBase';
22
25
  export { default as AeSdk } from './AeSdk';
@@ -32,9 +35,12 @@ export { default as AccountLedgerFactory } from './account/LedgerFactory';
32
35
  export { default as CompilerBase } from './contract/compiler/Base';
33
36
  export { default as CompilerHttp } from './contract/compiler/Http';
34
37
  export { default as Channel } from './channel/Contract';
38
+ export { default as _MiddlewareSubscriber, MiddlewareSubscriberError as _MiddlewareSubscriberError, MiddlewareSubscriberDisconnected as _MiddlewareSubscriberDisconnected, } from './MiddlewareSubscriber';
39
+ export { default as _Middleware } from './Middleware';
35
40
  export { default as connectionProxy } from './aepp-wallet-communication/connection-proxy';
36
- export * from './aepp-wallet-communication/schema';
41
+ export { MESSAGE_DIRECTION, WALLET_TYPE, SUBSCRIPTION_TYPES, METHODS, RPC_STATUS, RpcError, RpcInvalidTransactionError, RpcRejectedByUserError, RpcUnsupportedProtocolError, RpcConnectionDenyError, RpcNotAuthorizeError, RpcPermissionDenyError, RpcInternalError, RpcMethodNotFoundError, } from './aepp-wallet-communication/schema';
37
42
  export { default as walletDetector } from './aepp-wallet-communication/wallet-detector';
38
43
  export { default as BrowserRuntimeConnection } from './aepp-wallet-communication/connection/BrowserRuntime';
39
44
  export { default as BrowserWindowMessageConnection } from './aepp-wallet-communication/connection/BrowserWindowMessage';
40
- export * from './utils/errors';
45
+ export { BaseError, AccountError, AensError, AeppError, ChannelError, CompilerError, ContractError, CryptographyError, NodeError, TransactionError, WalletError, ArgumentError, IllegalArgumentError, ArgumentCountMismatchError, InsufficientBalanceError, MissingParamError, NoSerializerFoundError, RequestTimedOutError, TxTimedOutError, TypeError, UnsupportedPlatformError, UnsupportedProtocolError, NotImplementedError, UnsupportedVersionError, InternalError, UnexpectedTsError, UnavailableAccountError, AensPointerContextError, InsufficientNameFeeError, InvalidAensNameError, InvalidRpcMessageError, MissingCallbackError, UnAuthorizedAccountError, UnknownRpcClientError, UnsubscribedAccountError, ChannelCallError, ChannelConnectionError, ChannelPingTimedOutError, UnexpectedChannelMessageError, ChannelIncomingMessageError, UnknownChannelStateError, InvalidAuthDataError, BytecodeMismatchError, DuplicateContractError, InactiveContractError, InvalidMethodInvocationError, MissingContractAddressError, MissingContractDefError, MissingFunctionNameError, NodeInvocationError, NoSuchContractFunctionError, NotPayableFunctionError, MissingEventDefinitionError, AmbiguousEventDefinitionError, InvalidChecksumError, InvalidPasswordError, MerkleTreeHashMismatchError, MissingNodeInTreeError, UnknownNodeLengthError, UnknownPathNibbleError, DuplicateNodeError, NodeNotFoundError, DecodeError, PayloadLengthError, DryRunError, IllegalBidFeeError, InvalidSignatureError, PrefixNotFoundError, SchemaNotFoundError, TagNotFoundError, TxNotInChainError, AlreadyConnectedError, NoWalletConnectedError, RpcConnectionError, } from './utils/errors';
46
+ export { RpcBroadcastError, NAME_BID_MAX_LENGTH } from './deprecated';
@@ -11,7 +11,6 @@ export declare const NAME_FEE_MULTIPLIER = 100000000000000;
11
11
  export declare const NAME_FEE_BID_INCREMENT = 0.05;
12
12
  export declare const NAME_BID_TIMEOUT_BLOCKS = 480;
13
13
  export declare const NAME_MAX_LENGTH_FEE = 31;
14
- export declare const NAME_BID_MAX_LENGTH = 12;
15
14
  export declare const NAME_BID_RANGES: {
16
15
  [k: string]: BigNumber;
17
16
  };
@@ -2,7 +2,7 @@
2
2
  import { Int } from '../constants';
3
3
  import { AE_AMOUNT_FORMATS } from '../../../utils/amount-formatter';
4
4
  declare const _default: {
5
- serializeAettos(value: string | undefined): string;
5
+ serializeAettos(value: string | undefined, params: {}): string;
6
6
  serialize(value: Int | undefined, params: {}, { denomination }: {
7
7
  denomination?: AE_AMOUNT_FORMATS | undefined;
8
8
  }): Buffer;
@@ -9,7 +9,7 @@ declare const _default: {
9
9
  * @returns Deposit value Buffer.
10
10
  */
11
11
  serialize(value: Int | undefined, options: Parameters<(typeof coinAmount)['serialize']>[1], parameters: Parameters<(typeof coinAmount)['serialize']>[2]): Buffer;
12
- serializeAettos(value: string | undefined): string;
12
+ serializeAettos(value: string | undefined, params: {}): string;
13
13
  deserialize(value: Buffer): string;
14
14
  };
15
15
  export default _default;
@@ -31,7 +31,7 @@ declare const boolean: {
31
31
  deserialize(buffer: Buffer): boolean;
32
32
  };
33
33
  declare const coinAmount: {
34
- serializeAettos(value: string | undefined): string;
34
+ serializeAettos(value: string | undefined, params: {}): string;
35
35
  serialize(value: import("../constants").Int | undefined, params: {}, { denomination }: {
36
36
  denomination?: import("../../..").AE_AMOUNT_FORMATS | undefined;
37
37
  }): Buffer;
@@ -51,7 +51,7 @@ declare const deposit: {
51
51
  serialize(value: import("../constants").Int | undefined, options: {}, parameters: {
52
52
  denomination?: import("../../..").AE_AMOUNT_FORMATS | undefined;
53
53
  }): Buffer;
54
- serializeAettos(value: string | undefined): string;
54
+ serializeAettos(value: string | undefined, params: {}): string;
55
55
  deserialize(value: Buffer): string;
56
56
  };
57
57
  declare const encoded: typeof _encoded;
@@ -22,6 +22,7 @@ export declare function buildContractId(ownerId: Encoded.AccountAddress, nonce:
22
22
  * @returns Contract public key
23
23
  */
24
24
  export declare function oracleQueryId(senderId: Encoded.AccountAddress, nonce: number | BigNumber | string, oracleId: Encoded.OracleAddress): Encoded.OracleQueryId;
25
+ export declare function nameToPunycode(maybeName: string): AensName;
25
26
  /**
26
27
  * Encode an AENS name
27
28
  * @category AENS
@@ -45,12 +46,18 @@ export declare function commitmentHash(name: AensName, salt?: number): Encoded.C
45
46
  * @returns Buffer Buffer from number(BigEndian)
46
47
  */
47
48
  export declare function readInt(buf?: Buffer): string;
49
+ /**
50
+ * Ensure that name is valid AENS name, would throw an exception otherwise
51
+ * @category AENS
52
+ * @param name - AENS name
53
+ */
54
+ export declare function ensureName(maybeName: string): asserts maybeName is AensName;
48
55
  /**
49
56
  * Is AENS name valid
50
57
  * @category AENS
51
58
  * @param name - AENS name
52
59
  */
53
- export declare function isNameValid(name: string): name is AensName;
60
+ export declare function isNameValid(maybeName: string): maybeName is AensName;
54
61
  declare const encodingToPointerKey: readonly [
55
62
  readonly [
56
63
  Encoded.Encoding.AccountAddress,
@@ -9,6 +9,7 @@ export declare function getSchema(tag: Tag, version?: number): Array<[
9
9
  string,
10
10
  Field
11
11
  ]>;
12
+ type TxEncoding = Encoding.Transaction | Encoding.Poi | Encoding.StateTrees | Encoding.CallStateTree;
12
13
  /**
13
14
  * Build transaction hash
14
15
  * @category transaction builder
@@ -17,7 +18,7 @@ export declare function getSchema(tag: Tag, version?: number): Array<[
17
18
  * @param options.prefix - Prefix of transaction
18
19
  * @returns object Base64Check transaction hash with 'tx_' prefix
19
20
  */
20
- export declare function buildTx<E extends Encoding = Encoding.Transaction>(params: TxParams, { prefix, }?: {
21
+ export declare function buildTx<E extends TxEncoding = Encoding.Transaction>(params: TxParams, { prefix }?: {
21
22
  prefix?: E;
22
23
  }): Encoded.Generic<E>;
23
24
  export type BuildTxOptions<TxType extends Tag, OmitFields extends string> = Omit<TxParamsAsync & {
@@ -34,7 +35,7 @@ export declare function buildTxAsync(params: TxParamsAsync): Promise<Encoded.Tra
34
35
  * @param txType - Expected transaction type
35
36
  * @returns Object with transaction param's
36
37
  */
37
- export declare function unpackTx<TxType extends Tag>(encodedTx: Encoded.Transaction | Encoded.Poi | Encoded.StateTrees | Encoded.CallStateTree, txType?: TxType): TxUnpacked & {
38
+ export declare function unpackTx<TxType extends Tag>(encodedTx: Encoded.Generic<TxEncoding>, txType?: TxType): TxUnpacked & {
38
39
  tag: TxType;
39
40
  };
40
41
  /**
@@ -51,3 +52,4 @@ export declare function buildTxHash(rawTx: Encoded.Transaction | Uint8Array): En
51
52
  * @returns Contract public key
52
53
  */
53
54
  export declare function buildContractIdByContractTx(contractTx: Encoded.Transaction): Encoded.ContractAddress;
55
+ export {};
@@ -217,7 +217,7 @@ export declare const txSchema: readonly [
217
217
  deserialize: (value: Buffer) => `ak_${string}` | `nm_${string}`;
218
218
  };
219
219
  readonly amount: {
220
- serializeAettos(value: string | undefined): string;
220
+ serializeAettos(value: string | undefined, params: {}): string;
221
221
  serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
222
222
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
223
223
  }): Buffer;
@@ -656,7 +656,7 @@ export declare const txSchema: readonly [
656
656
  serialize(value: import("./constants").Int | undefined, options: {}, parameters: {
657
657
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
658
658
  }): Buffer;
659
- serializeAettos(value: string | undefined): string;
659
+ serializeAettos(value: string | undefined, params: {}): string;
660
660
  deserialize(value: Buffer): string;
661
661
  };
662
662
  },
@@ -727,11 +727,11 @@ export declare const txSchema: readonly [
727
727
  serialize(value: import("./constants").Int | undefined, options: {}, parameters: {
728
728
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
729
729
  }): Buffer;
730
- serializeAettos(value: string | undefined): string;
730
+ serializeAettos(value: string | undefined, params: {}): string;
731
731
  deserialize(value: Buffer): string;
732
732
  };
733
733
  readonly amount: {
734
- serializeAettos(value: string | undefined): string;
734
+ serializeAettos(value: string | undefined, params: {}): string;
735
735
  serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
736
736
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
737
737
  }): Buffer;
@@ -830,7 +830,7 @@ export declare const txSchema: readonly [
830
830
  deserialize(value: Buffer): number;
831
831
  };
832
832
  readonly amount: {
833
- serializeAettos(value: string | undefined): string;
833
+ serializeAettos(value: string | undefined, params: {}): string;
834
834
  serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
835
835
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
836
836
  }): Buffer;
@@ -936,7 +936,7 @@ export declare const txSchema: readonly [
936
936
  deserialize(buffer: Buffer): string;
937
937
  };
938
938
  readonly queryFee: {
939
- serializeAettos(value: string | undefined): string;
939
+ serializeAettos(value: string | undefined, params: {}): string;
940
940
  serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
941
941
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
942
942
  }): Buffer;
@@ -999,7 +999,7 @@ export declare const txSchema: readonly [
999
999
  deserialize(buffer: Buffer): string;
1000
1000
  };
1001
1001
  readonly queryFee: {
1002
- serializeAettos(value: string | undefined): string;
1002
+ serializeAettos(value: string | undefined, params: {}): string;
1003
1003
  serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
1004
1004
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
1005
1005
  }): Buffer;
@@ -1145,7 +1145,7 @@ export declare const txSchema: readonly [
1145
1145
  deserialize(buffer: Buffer): string;
1146
1146
  };
1147
1147
  readonly queryFee: {
1148
- serializeAettos(value: string | undefined): string;
1148
+ serializeAettos(value: string | undefined, params: {}): string;
1149
1149
  serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
1150
1150
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
1151
1151
  }): Buffer;
@@ -2982,7 +2982,7 @@ export declare const txSchema: readonly [
2982
2982
  constValueOptional: boolean;
2983
2983
  };
2984
2984
  readonly fee: {
2985
- serializeAettos(value: string | undefined): string;
2985
+ serializeAettos(value: string | undefined, params: {}): string;
2986
2986
  serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
2987
2987
  denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
2988
2988
  }): Buffer;
@@ -4,6 +4,23 @@ import Node from '../Node';
4
4
  * Calculates the cost of transaction execution
5
5
  * Provides an upper cost of contract-call-related transactions because of `gasLimit`.
6
6
  * Also assumes that oracle query fee is 0 unless it is provided in options.
7
+ *
8
+ * The idea is that if you need to show transaction details with some accuracy you can define
9
+ * expense fields that you want to show separately. And to show `getExecutionCost` result as a fee,
10
+ * subtracting all fields shown separately.
11
+ *
12
+ * @example
13
+ * ```vue
14
+ * <template>
15
+ * Amount: {{ txUnpacked.amount }}
16
+ * Name fee: {{ txUnpacked.nameFee }}
17
+ * Other fees: {{ getExecutionCost(txEncoded) - txUnpacked.amount - txUnpacked.nameFee }}
18
+ * </template>
19
+ * ```
20
+ *
21
+ * Doing this way you won't worry to show wrong fee for a transaction you may not support. Because
22
+ * the SDK calculates the overall price of any transaction on its side.
23
+ *
7
24
  * @param transaction - Transaction to calculate the cost of
8
25
  * @param innerTx - Should be provided if transaction wrapped with Tag.PayingForTx
9
26
  * @param gasUsed - Amount of gas actually used to make calculation more accurate
@@ -38,5 +38,4 @@ export declare const toAe: (value: string | number | BigNumber, { denomination }
38
38
  export declare const toAettos: (value: string | number | BigNumber, { denomination }?: {
39
39
  denomination?: AE_AMOUNT_FORMATS | undefined;
40
40
  }) => string;
41
- declare const _default: (rawValue: string | number | BigNumber) => string;
42
- export default _default;
41
+ export declare const prefixedAmount: (rawValue: string | number | BigNumber) => string;
@@ -74,6 +74,7 @@ export declare function sign(data: string | Uint8Array, privateKey: string | Uin
74
74
  * @returns is data was signed by address
75
75
  */
76
76
  export declare function verify(data: Uint8Array, signature: Uint8Array, address: Encoded.AccountAddress): boolean;
77
+ export declare const messagePrefixLength: Buffer;
77
78
  export declare function messageToHash(message: string): Buffer;
78
79
  export declare function signMessage(message: string, privateKey: string | Buffer): Uint8Array;
79
80
  /**
@@ -240,11 +240,11 @@ export declare class UnexpectedChannelMessageError extends ChannelError {
240
240
  * @category exception
241
241
  */
242
242
  export declare class ChannelIncomingMessageError extends ChannelError {
243
- handlerError: BaseError;
243
+ handlerError: Error;
244
244
  incomingMessage: {
245
245
  [key: string]: any;
246
246
  };
247
- constructor(handlerError: BaseError, incomingMessage: {
247
+ constructor(handlerError: Error, incomingMessage: {
248
248
  [key: string]: any;
249
249
  });
250
250
  }
@@ -29,3 +29,4 @@ export declare function isKeyOfObject<T extends object>(key: string | number | s
29
29
  export declare function isItemOfArray<T>(item: any, array: readonly T[]): item is T;
30
30
  export declare function isAccountNotFoundError(error: Error): boolean;
31
31
  export type UnionToIntersection<Union> = (Union extends any ? (k: Union) => void : never) extends ((k: infer Intersection) => void) ? Intersection : never;
32
+ export declare function ensureError(error: unknown): asserts error is Error;
@@ -0,0 +1,60 @@
1
+ /// <reference types="node" />
2
+ import { Encoded } from './encoder';
3
+ /**
4
+ * Hashes arbitrary object, can be used to inline the aci hash to contract source code
5
+ */
6
+ export declare function hashJson(data: unknown): Buffer;
7
+ export type AciValue = 'void' | 'unit' | 'int' | 'bool' | 'string' | 'bits' | 'hash' | 'signature' | 'address' | 'contract_pubkey' | 'Chain.ttl' | 'Chain.ga_meta_tx' | 'Chain.paying_for_tx' | 'Chain.base_tx' | 'AENS.pointee' | 'AENS.name' | 'MCL_BLS12_381.fr' | 'MCL_BLS12_381.fp' | {
8
+ 'Set.set': readonly [
9
+ AciValue
10
+ ];
11
+ } | {
12
+ bytes: number;
13
+ } | {
14
+ list: readonly [
15
+ AciValue
16
+ ];
17
+ } | {
18
+ map: readonly [
19
+ AciValue,
20
+ AciValue
21
+ ];
22
+ } | {
23
+ tuple: readonly AciValue[];
24
+ } | {
25
+ record: ReadonlyArray<{
26
+ name: string;
27
+ type: AciValue;
28
+ }>;
29
+ } | {
30
+ variant: ReadonlyArray<{
31
+ [key: string]: readonly AciValue[];
32
+ }>;
33
+ } | {
34
+ option: readonly [
35
+ AciValue
36
+ ];
37
+ } | {
38
+ oracle: readonly [
39
+ AciValue,
40
+ AciValue
41
+ ];
42
+ } | {
43
+ oracle_query: readonly [
44
+ AciValue,
45
+ AciValue
46
+ ];
47
+ };
48
+ export interface Domain {
49
+ name?: string;
50
+ version?: number;
51
+ networkId?: string;
52
+ contractAddress?: Encoded.ContractAddress;
53
+ }
54
+ export declare function encodeFateValue(value: unknown, aci: AciValue): Encoded.ContractBytearray;
55
+ export declare function decodeFateValue(value: Encoded.ContractBytearray, aci: AciValue): Encoded.ContractBytearray;
56
+ /**
57
+ * Hashes domain object, can be used to inline domain hash to contract source code
58
+ */
59
+ export declare function hashDomain(domain: Domain): Buffer;
60
+ export declare function hashTypedData(data: Encoded.ContractBytearray, aci: AciValue, domain: Domain): Buffer;