@aeternity/aepp-sdk 13.2.2 → 13.3.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 (494) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/bin/aesophia_cli +0 -0
  4. package/bin/aesophia_cli_8 +0 -0
  5. package/dist/aepp-sdk.browser-script.js +1 -1
  6. package/dist/aepp-sdk.browser-script.js.map +1 -1
  7. package/dist/aepp-sdk.browser.js +1 -1
  8. package/dist/aepp-sdk.browser.js.map +1 -1
  9. package/dist/aepp-sdk.js +9171 -7086
  10. package/dist/aepp-sdk.js.map +1 -1
  11. package/es/AeSdk.d.ts +3 -0
  12. package/es/AeSdk.mjs +12 -12
  13. package/es/AeSdk.mjs.map +1 -1
  14. package/es/AeSdkAepp.d.ts +0 -1
  15. package/es/AeSdkAepp.mjs +12 -16
  16. package/es/AeSdkAepp.mjs.map +1 -1
  17. package/es/AeSdkBase.d.ts +61 -6
  18. package/es/AeSdkBase.mjs +150 -69
  19. package/es/AeSdkBase.mjs.map +1 -1
  20. package/es/AeSdkMethods.d.ts +19 -7
  21. package/es/AeSdkMethods.mjs +39 -38
  22. package/es/AeSdkMethods.mjs.map +1 -1
  23. package/es/AeSdkWallet.mjs +86 -55
  24. package/es/AeSdkWallet.mjs.map +1 -1
  25. package/es/Middleware.mjs +31 -27
  26. package/es/Middleware.mjs.map +1 -1
  27. package/es/MiddlewareSubscriber.mjs +5 -14
  28. package/es/MiddlewareSubscriber.mjs.map +1 -1
  29. package/es/Node.d.ts +10 -2
  30. package/es/Node.mjs +53 -54
  31. package/es/Node.mjs.map +1 -1
  32. package/es/account/Base.d.ts +39 -3
  33. package/es/account/Base.mjs +35 -1
  34. package/es/account/Base.mjs.map +1 -1
  35. package/es/account/Generalized.d.ts +2 -0
  36. package/es/account/Generalized.mjs +15 -6
  37. package/es/account/Generalized.mjs.map +1 -1
  38. package/es/account/Ledger.d.ts +2 -0
  39. package/es/account/Ledger.mjs +14 -5
  40. package/es/account/Ledger.mjs.map +1 -1
  41. package/es/account/LedgerFactory.mjs +4 -6
  42. package/es/account/LedgerFactory.mjs.map +1 -1
  43. package/es/account/Memory.d.ts +15 -4
  44. package/es/account/Memory.mjs +96 -31
  45. package/es/account/Memory.mjs.map +1 -1
  46. package/es/account/Rpc.d.ts +16 -5
  47. package/es/account/Rpc.mjs +94 -21
  48. package/es/account/Rpc.mjs.map +1 -1
  49. package/es/aens.d.ts +17 -44
  50. package/es/aens.mjs +32 -71
  51. package/es/aens.mjs.map +1 -1
  52. package/es/aepp-wallet-communication/connection/Browser.mjs +3 -4
  53. package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -1
  54. package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +3 -0
  55. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +7 -5
  56. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -1
  57. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +8 -9
  58. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -1
  59. package/es/aepp-wallet-communication/rpc/RpcClient.mjs +7 -7
  60. package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
  61. package/es/aepp-wallet-communication/rpc/types.d.ts +14 -0
  62. package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
  63. package/es/aepp-wallet-communication/schema.d.ts +2 -0
  64. package/es/aepp-wallet-communication/schema.mjs +2 -0
  65. package/es/aepp-wallet-communication/schema.mjs.map +1 -1
  66. package/es/aepp-wallet-communication/wallet-detector.mjs +4 -5
  67. package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -1
  68. package/es/apis/compiler/compiler.mjs.map +1 -1
  69. package/es/apis/compiler/models/index.d.ts +1 -0
  70. package/es/apis/compiler/models/index.mjs.map +1 -1
  71. package/es/apis/compiler/models/mappers.mjs +13 -0
  72. package/es/apis/compiler/models/mappers.mjs.map +1 -1
  73. package/es/apis/compiler/models/parameters.mjs.map +1 -1
  74. package/es/apis/middleware/middleware.d.ts +23 -5
  75. package/es/apis/middleware/middleware.mjs +114 -18
  76. package/es/apis/middleware/middleware.mjs.map +1 -1
  77. package/es/apis/middleware/models/index.d.ts +164 -15
  78. package/es/apis/middleware/models/index.mjs +53 -3
  79. package/es/apis/middleware/models/index.mjs.map +1 -1
  80. package/es/apis/middleware/models/mappers.d.ts +8 -1
  81. package/es/apis/middleware/models/mappers.mjs +376 -3
  82. package/es/apis/middleware/models/mappers.mjs.map +1 -1
  83. package/es/apis/middleware/models/parameters.d.ts +6 -3
  84. package/es/apis/middleware/models/parameters.mjs +38 -11
  85. package/es/apis/middleware/models/parameters.mjs.map +1 -1
  86. package/es/apis/node/models/index.d.ts +66 -2
  87. package/es/apis/node/models/index.mjs.map +1 -1
  88. package/es/apis/node/models/mappers.d.ts +5 -1
  89. package/es/apis/node/models/mappers.mjs +229 -7
  90. package/es/apis/node/models/mappers.mjs.map +1 -1
  91. package/es/apis/node/models/parameters.d.ts +2 -2
  92. package/es/apis/node/models/parameters.mjs +2 -2
  93. package/es/apis/node/models/parameters.mjs.map +1 -1
  94. package/es/apis/node/node.d.ts +24 -3
  95. package/es/apis/node/node.mjs +135 -3
  96. package/es/apis/node/node.mjs.map +1 -1
  97. package/es/chain.d.ts +14 -44
  98. package/es/chain.mjs +125 -219
  99. package/es/chain.mjs.map +1 -1
  100. package/es/channel/Base.d.ts +3 -47
  101. package/es/channel/Base.mjs +21 -54
  102. package/es/channel/Base.mjs.map +1 -1
  103. package/es/channel/Contract.d.ts +16 -25
  104. package/es/channel/Contract.mjs +39 -63
  105. package/es/channel/Contract.mjs.map +1 -1
  106. package/es/channel/Spend.d.ts +0 -8
  107. package/es/channel/Spend.mjs +17 -29
  108. package/es/channel/Spend.mjs.map +1 -1
  109. package/es/channel/handlers.mjs +1 -1
  110. package/es/channel/handlers.mjs.map +1 -1
  111. package/es/channel/internal.d.ts +104 -5
  112. package/es/channel/internal.mjs +26 -34
  113. package/es/channel/internal.mjs.map +1 -1
  114. package/es/contract/Contract.d.ts +9 -1
  115. package/es/contract/Contract.mjs +67 -73
  116. package/es/contract/Contract.mjs.map +1 -1
  117. package/es/contract/compiler/Base.d.ts +14 -8
  118. package/es/contract/compiler/Base.mjs.map +1 -1
  119. package/es/contract/compiler/Cli.d.ts +5 -9
  120. package/es/contract/compiler/Cli.mjs +45 -23
  121. package/es/contract/compiler/Cli.mjs.map +1 -1
  122. package/es/contract/compiler/Cli8.d.ts +13 -0
  123. package/es/contract/compiler/Cli8.mjs +22 -0
  124. package/es/contract/compiler/Cli8.mjs.map +1 -0
  125. package/es/contract/compiler/Http.d.ts +3 -9
  126. package/es/contract/compiler/Http.mjs +28 -16
  127. package/es/contract/compiler/Http.mjs.map +1 -1
  128. package/es/contract/compiler/HttpNode.d.ts +2 -5
  129. package/es/contract/compiler/HttpNode.mjs.map +1 -1
  130. package/es/contract/delegation-signature.d.ts +2 -1
  131. package/es/contract/delegation-signature.mjs +18 -14
  132. package/es/contract/delegation-signature.mjs.map +1 -1
  133. package/es/contract/ga.d.ts +1 -2
  134. package/es/contract/ga.mjs +23 -25
  135. package/es/contract/ga.mjs.map +1 -1
  136. package/es/deprecated.d.ts +38 -0
  137. package/es/deprecated.mjs +45 -0
  138. package/es/deprecated.mjs.map +1 -1
  139. package/es/index-browser.d.ts +10 -5
  140. package/es/index-browser.mjs +9 -5
  141. package/es/index-browser.mjs.map +1 -1
  142. package/es/index.d.ts +1 -0
  143. package/es/index.mjs +1 -0
  144. package/es/index.mjs.map +1 -1
  145. package/es/oracle.d.ts +6 -37
  146. package/es/oracle.mjs +32 -66
  147. package/es/oracle.mjs.map +1 -1
  148. package/es/send-transaction.d.ts +53 -0
  149. package/es/send-transaction.mjs +109 -0
  150. package/es/send-transaction.mjs.map +1 -0
  151. package/es/spend.d.ts +4 -3
  152. package/es/spend.mjs +6 -1
  153. package/es/spend.mjs.map +1 -1
  154. package/es/tx/builder/common.d.ts +29 -0
  155. package/es/tx/builder/common.mjs +42 -0
  156. package/es/tx/builder/common.mjs.map +1 -0
  157. package/es/tx/builder/constants.d.ts +4 -4
  158. package/es/tx/builder/constants.mjs +6 -15
  159. package/es/tx/builder/constants.mjs.map +1 -1
  160. package/es/tx/builder/delegation/index.d.ts +20 -0
  161. package/es/tx/builder/delegation/index.mjs +24 -0
  162. package/es/tx/builder/delegation/index.mjs.map +1 -0
  163. package/es/tx/builder/delegation/schema.d.ts +130 -0
  164. package/es/tx/builder/delegation/schema.generated.d.ts +141 -0
  165. package/es/tx/builder/delegation/schema.generated.mjs +2 -0
  166. package/es/tx/builder/delegation/schema.generated.mjs.map +1 -0
  167. package/es/tx/builder/delegation/schema.mjs +54 -0
  168. package/es/tx/builder/delegation/schema.mjs.map +1 -0
  169. package/es/tx/builder/field-types/abi-version.mjs +8 -11
  170. package/es/tx/builder/field-types/abi-version.mjs.map +1 -1
  171. package/es/tx/builder/field-types/address.mjs +1 -4
  172. package/es/tx/builder/field-types/address.mjs.map +1 -1
  173. package/es/tx/builder/field-types/coin-amount.d.ts +2 -2
  174. package/es/tx/builder/field-types/coin-amount.mjs +6 -6
  175. package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
  176. package/es/tx/builder/field-types/ct-version.mjs +3 -4
  177. package/es/tx/builder/field-types/ct-version.mjs.map +1 -1
  178. package/es/tx/builder/field-types/entry.mjs +7 -13
  179. package/es/tx/builder/field-types/entry.mjs.map +1 -1
  180. package/es/tx/builder/field-types/fee.d.ts +19 -11
  181. package/es/tx/builder/field-types/fee.mjs +56 -38
  182. package/es/tx/builder/field-types/fee.mjs.map +1 -1
  183. package/es/tx/builder/field-types/gas-limit.mjs +13 -15
  184. package/es/tx/builder/field-types/gas-limit.mjs.map +1 -1
  185. package/es/tx/builder/field-types/gas-price.d.ts +10 -2
  186. package/es/tx/builder/field-types/gas-price.mjs +52 -3
  187. package/es/tx/builder/field-types/gas-price.mjs.map +1 -1
  188. package/es/tx/builder/field-types/index.d.ts +31 -29
  189. package/es/tx/builder/field-types/index.mjs +31 -29
  190. package/es/tx/builder/field-types/index.mjs.map +1 -1
  191. package/es/tx/builder/field-types/map.mjs +20 -31
  192. package/es/tx/builder/field-types/map.mjs.map +1 -1
  193. package/es/tx/builder/field-types/mptree.mjs +14 -29
  194. package/es/tx/builder/field-types/mptree.mjs.map +1 -1
  195. package/es/tx/builder/field-types/name-fee.d.ts +1 -1
  196. package/es/tx/builder/field-types/name-fee.mjs +1 -1
  197. package/es/tx/builder/field-types/name-fee.mjs.map +1 -1
  198. package/es/tx/builder/field-types/nonce.d.ts +1 -0
  199. package/es/tx/builder/field-types/nonce.mjs +2 -0
  200. package/es/tx/builder/field-types/nonce.mjs.map +1 -1
  201. package/es/tx/builder/field-types/pointers.mjs +4 -7
  202. package/es/tx/builder/field-types/pointers.mjs.map +1 -1
  203. package/es/tx/builder/field-types/pointers2.d.ts +23 -0
  204. package/es/tx/builder/field-types/pointers2.mjs +65 -0
  205. package/es/tx/builder/field-types/pointers2.mjs.map +1 -0
  206. package/es/tx/builder/field-types/query-fee.d.ts +19 -0
  207. package/es/tx/builder/field-types/query-fee.mjs +20 -0
  208. package/es/tx/builder/field-types/query-fee.mjs.map +1 -0
  209. package/es/tx/builder/field-types/ttl.d.ts +9 -1
  210. package/es/tx/builder/field-types/ttl.mjs +19 -8
  211. package/es/tx/builder/field-types/ttl.mjs.map +1 -1
  212. package/es/tx/builder/field-types/with-default.d.ts +7 -0
  213. package/es/tx/builder/field-types/with-default.mjs +9 -0
  214. package/es/tx/builder/field-types/with-default.mjs.map +1 -0
  215. package/es/tx/builder/field-types/with-formatting.d.ts +7 -0
  216. package/es/tx/builder/field-types/with-formatting.mjs +9 -0
  217. package/es/tx/builder/field-types/with-formatting.mjs.map +1 -0
  218. package/es/tx/builder/field-types/wrapped.mjs +6 -8
  219. package/es/tx/builder/field-types/wrapped.mjs.map +1 -1
  220. package/es/tx/builder/helpers.d.ts +2 -2
  221. package/es/tx/builder/helpers.mjs +12 -21
  222. package/es/tx/builder/helpers.mjs.map +1 -1
  223. package/es/tx/builder/index.d.ts +17 -10
  224. package/es/tx/builder/index.mjs +39 -65
  225. package/es/tx/builder/index.mjs.map +1 -1
  226. package/es/tx/builder/schema.d.ts +478 -257
  227. package/es/tx/builder/schema.generated.d.ts +39 -3
  228. package/es/tx/builder/schema.generated.mjs.map +1 -1
  229. package/es/tx/builder/schema.mjs +48 -36
  230. package/es/tx/builder/schema.mjs.map +1 -1
  231. package/es/tx/execution-cost.d.ts +6 -5
  232. package/es/tx/execution-cost.mjs +16 -17
  233. package/es/tx/execution-cost.mjs.map +1 -1
  234. package/es/tx/transaction-signer.mjs +1 -4
  235. package/es/tx/transaction-signer.mjs.map +1 -1
  236. package/es/tx/validator.mjs +61 -42
  237. package/es/tx/validator.mjs.map +1 -1
  238. package/es/utils/amount-formatter.mjs +15 -22
  239. package/es/utils/amount-formatter.mjs.map +1 -1
  240. package/es/utils/autorest.d.ts +2 -3
  241. package/es/utils/autorest.mjs +40 -24
  242. package/es/utils/autorest.mjs.map +1 -1
  243. package/es/utils/bytes.mjs +1 -2
  244. package/es/utils/bytes.mjs.map +1 -1
  245. package/es/utils/crypto.d.ts +8 -4
  246. package/es/utils/crypto.mjs +17 -13
  247. package/es/utils/crypto.mjs.map +1 -1
  248. package/es/utils/errors.d.ts +6 -0
  249. package/es/utils/errors.mjs +12 -6
  250. package/es/utils/errors.mjs.map +1 -1
  251. package/es/utils/hd-wallet.d.ts +2 -0
  252. package/es/utils/hd-wallet.mjs +6 -5
  253. package/es/utils/hd-wallet.mjs.map +1 -1
  254. package/es/utils/json-big.mjs +2 -10
  255. package/es/utils/json-big.mjs.map +1 -1
  256. package/es/utils/jwt.d.ts +53 -0
  257. package/es/utils/jwt.mjs +120 -0
  258. package/es/utils/jwt.mjs.map +1 -0
  259. package/es/utils/keystore.d.ts +6 -2
  260. package/es/utils/keystore.mjs +8 -16
  261. package/es/utils/keystore.mjs.map +1 -1
  262. package/es/utils/typed-data.mjs +1 -0
  263. package/es/utils/typed-data.mjs.map +1 -1
  264. package/es/utils/wrap-proxy.d.ts +2 -0
  265. package/es/utils/wrap-proxy.mjs +15 -0
  266. package/es/utils/wrap-proxy.mjs.map +1 -0
  267. package/package.json +57 -51
  268. package/src/AeSdk.ts +3 -0
  269. package/src/AeSdkAepp.ts +0 -1
  270. package/src/AeSdkBase.ts +97 -10
  271. package/src/AeSdkMethods.ts +37 -33
  272. package/src/AeSdkWallet.ts +22 -3
  273. package/src/Middleware.ts +16 -8
  274. package/src/MiddlewareSubscriber.ts +1 -1
  275. package/src/Node.ts +37 -18
  276. package/src/account/Base.ts +62 -3
  277. package/src/account/Generalized.ts +10 -0
  278. package/src/account/Ledger.ts +10 -0
  279. package/src/account/Memory.ts +83 -9
  280. package/src/account/Rpc.ts +69 -6
  281. package/src/aens.ts +35 -56
  282. package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +3 -0
  283. package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +2 -2
  284. package/src/aepp-wallet-communication/rpc/RpcClient.ts +4 -2
  285. package/src/aepp-wallet-communication/rpc/types.ts +13 -0
  286. package/src/aepp-wallet-communication/schema.ts +2 -0
  287. package/src/apis/compiler/compiler.ts +93 -93
  288. package/src/apis/compiler/models/index.ts +1 -0
  289. package/src/apis/compiler/models/mappers.ts +178 -165
  290. package/src/apis/compiler/models/parameters.ts +18 -18
  291. package/src/apis/middleware/middleware.ts +462 -341
  292. package/src/apis/middleware/models/index.ts +258 -56
  293. package/src/apis/middleware/models/mappers.ts +2357 -1919
  294. package/src/apis/middleware/models/parameters.ts +172 -142
  295. package/src/apis/node/models/index.ts +79 -2
  296. package/src/apis/node/models/mappers.ts +1529 -1302
  297. package/src/apis/node/models/parameters.ts +51 -51
  298. package/src/apis/node/node.ts +420 -275
  299. package/src/chain.ts +42 -128
  300. package/src/channel/Base.ts +14 -47
  301. package/src/channel/Contract.ts +18 -26
  302. package/src/channel/Spend.ts +0 -8
  303. package/src/channel/internal.ts +115 -13
  304. package/src/contract/Contract.ts +26 -8
  305. package/src/contract/compiler/Base.ts +15 -8
  306. package/src/contract/compiler/Cli.ts +37 -21
  307. package/src/contract/compiler/Cli8.ts +17 -0
  308. package/src/contract/compiler/Http.ts +24 -14
  309. package/src/contract/compiler/HttpNode.ts +2 -2
  310. package/src/contract/delegation-signature.ts +11 -5
  311. package/src/contract/ga.ts +4 -3
  312. package/src/deprecated.ts +36 -0
  313. package/src/index-browser.ts +14 -7
  314. package/src/index.ts +1 -0
  315. package/src/oracle.ts +11 -54
  316. package/src/send-transaction.ts +136 -0
  317. package/src/spend.ts +25 -11
  318. package/src/tx/builder/common.ts +74 -0
  319. package/src/tx/builder/constants.ts +6 -9
  320. package/src/tx/builder/delegation/index.ts +28 -0
  321. package/src/tx/builder/delegation/schema.generated.ts +143 -0
  322. package/src/tx/builder/delegation/schema.ts +61 -0
  323. package/src/tx/builder/field-types/coin-amount.ts +3 -2
  324. package/src/tx/builder/field-types/entry.ts +1 -4
  325. package/src/tx/builder/field-types/fee.ts +71 -43
  326. package/src/tx/builder/field-types/gas-limit.ts +4 -4
  327. package/src/tx/builder/field-types/gas-price.ts +58 -2
  328. package/src/tx/builder/field-types/index.ts +31 -59
  329. package/src/tx/builder/field-types/name-fee.ts +1 -1
  330. package/src/tx/builder/field-types/nonce.ts +7 -1
  331. package/src/tx/builder/field-types/pointers2.ts +62 -0
  332. package/src/tx/builder/field-types/query-fee.ts +25 -0
  333. package/src/tx/builder/field-types/ttl.ts +13 -3
  334. package/src/tx/builder/field-types/with-default.ts +18 -0
  335. package/src/tx/builder/field-types/with-formatting.ts +18 -0
  336. package/src/tx/builder/helpers.ts +2 -2
  337. package/src/tx/builder/index.ts +42 -59
  338. package/src/tx/builder/schema.generated.ts +39 -3
  339. package/src/tx/builder/schema.ts +55 -29
  340. package/src/tx/execution-cost.ts +6 -5
  341. package/src/tx/validator.ts +31 -5
  342. package/src/utils/autorest.ts +36 -27
  343. package/src/utils/crypto.ts +23 -13
  344. package/src/utils/errors.ts +10 -0
  345. package/src/utils/hd-wallet.ts +2 -0
  346. package/src/utils/jwt.ts +126 -0
  347. package/src/utils/keystore.ts +6 -2
  348. package/src/utils/wrap-proxy.ts +24 -0
  349. package/types-legacy/ts4.2/AeSdk.d.ts +3 -0
  350. package/types-legacy/ts4.2/AeSdkAepp.d.ts +0 -1
  351. package/types-legacy/ts4.2/AeSdkBase.d.ts +61 -6
  352. package/types-legacy/ts4.2/AeSdkMethods.d.ts +19 -7
  353. package/types-legacy/ts4.2/Node.d.ts +14 -1
  354. package/types-legacy/ts4.2/account/Base.d.ts +39 -3
  355. package/types-legacy/ts4.2/account/Generalized.d.ts +2 -0
  356. package/types-legacy/ts4.2/account/Ledger.d.ts +2 -0
  357. package/types-legacy/ts4.2/account/Memory.d.ts +15 -4
  358. package/types-legacy/ts4.2/account/Rpc.d.ts +16 -5
  359. package/types-legacy/ts4.2/aens.d.ts +17 -44
  360. package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserRuntime.d.ts +3 -0
  361. package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +14 -0
  362. package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +2 -0
  363. package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +1 -0
  364. package/types-legacy/ts4.2/apis/middleware/middleware.d.ts +23 -5
  365. package/types-legacy/ts4.2/apis/middleware/models/index.d.ts +164 -15
  366. package/types-legacy/ts4.2/apis/middleware/models/mappers.d.ts +8 -1
  367. package/types-legacy/ts4.2/apis/middleware/models/parameters.d.ts +6 -3
  368. package/types-legacy/ts4.2/apis/node/models/index.d.ts +66 -2
  369. package/types-legacy/ts4.2/apis/node/models/mappers.d.ts +5 -1
  370. package/types-legacy/ts4.2/apis/node/models/parameters.d.ts +2 -2
  371. package/types-legacy/ts4.2/apis/node/node.d.ts +24 -3
  372. package/types-legacy/ts4.2/chain.d.ts +14 -44
  373. package/types-legacy/ts4.2/channel/Base.d.ts +3 -47
  374. package/types-legacy/ts4.2/channel/Contract.d.ts +16 -25
  375. package/types-legacy/ts4.2/channel/Spend.d.ts +0 -8
  376. package/types-legacy/ts4.2/channel/internal.d.ts +104 -5
  377. package/types-legacy/ts4.2/contract/Contract.d.ts +9 -1
  378. package/types-legacy/ts4.2/contract/compiler/Base.d.ts +14 -8
  379. package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +5 -9
  380. package/types-legacy/ts4.2/contract/compiler/Cli8.d.ts +13 -0
  381. package/types-legacy/ts4.2/contract/compiler/Http.d.ts +3 -9
  382. package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +2 -5
  383. package/types-legacy/ts4.2/contract/delegation-signature.d.ts +2 -1
  384. package/types-legacy/ts4.2/contract/ga.d.ts +1 -2
  385. package/types-legacy/ts4.2/deprecated.d.ts +38 -0
  386. package/types-legacy/ts4.2/index-browser.d.ts +10 -5
  387. package/types-legacy/ts4.2/index.d.ts +1 -0
  388. package/types-legacy/ts4.2/oracle.d.ts +6 -37
  389. package/types-legacy/ts4.2/send-transaction.d.ts +53 -0
  390. package/types-legacy/ts4.2/spend.d.ts +4 -3
  391. package/types-legacy/ts4.2/tx/builder/common.d.ts +32 -0
  392. package/types-legacy/ts4.2/tx/builder/constants.d.ts +4 -4
  393. package/types-legacy/ts4.2/tx/builder/delegation/index.d.ts +20 -0
  394. package/types-legacy/ts4.2/tx/builder/delegation/schema.d.ts +136 -0
  395. package/types-legacy/ts4.2/tx/builder/delegation/schema.generated.d.ts +141 -0
  396. package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +2 -2
  397. package/types-legacy/ts4.2/tx/builder/field-types/fee.d.ts +19 -11
  398. package/types-legacy/ts4.2/tx/builder/field-types/gas-price.d.ts +10 -2
  399. package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +31 -29
  400. package/types-legacy/ts4.2/tx/builder/field-types/name-fee.d.ts +1 -1
  401. package/types-legacy/ts4.2/tx/builder/field-types/nonce.d.ts +1 -0
  402. package/types-legacy/ts4.2/tx/builder/field-types/pointers2.d.ts +26 -0
  403. package/types-legacy/ts4.2/tx/builder/field-types/query-fee.d.ts +19 -0
  404. package/types-legacy/ts4.2/tx/builder/field-types/ttl.d.ts +9 -1
  405. package/types-legacy/ts4.2/tx/builder/field-types/with-default.d.ts +7 -0
  406. package/types-legacy/ts4.2/tx/builder/field-types/with-formatting.d.ts +7 -0
  407. package/types-legacy/ts4.2/tx/builder/helpers.d.ts +2 -2
  408. package/types-legacy/ts4.2/tx/builder/index.d.ts +17 -10
  409. package/types-legacy/ts4.2/tx/builder/schema.d.ts +482 -257
  410. package/types-legacy/ts4.2/tx/builder/schema.generated.d.ts +39 -3
  411. package/types-legacy/ts4.2/tx/execution-cost.d.ts +6 -5
  412. package/types-legacy/ts4.2/utils/autorest.d.ts +2 -3
  413. package/types-legacy/ts4.2/utils/crypto.d.ts +8 -4
  414. package/types-legacy/ts4.2/utils/errors.d.ts +6 -0
  415. package/types-legacy/ts4.2/utils/hd-wallet.d.ts +2 -0
  416. package/types-legacy/ts4.2/utils/jwt.d.ts +53 -0
  417. package/types-legacy/ts4.2/utils/keystore.d.ts +6 -2
  418. package/types-legacy/ts4.2/utils/wrap-proxy.d.ts +2 -0
  419. package/types-legacy/ts4.5/AeSdk.d.ts +3 -0
  420. package/types-legacy/ts4.5/AeSdkAepp.d.ts +0 -1
  421. package/types-legacy/ts4.5/AeSdkBase.d.ts +61 -6
  422. package/types-legacy/ts4.5/AeSdkMethods.d.ts +19 -7
  423. package/types-legacy/ts4.5/Node.d.ts +14 -1
  424. package/types-legacy/ts4.5/account/Base.d.ts +39 -3
  425. package/types-legacy/ts4.5/account/Generalized.d.ts +2 -0
  426. package/types-legacy/ts4.5/account/Ledger.d.ts +2 -0
  427. package/types-legacy/ts4.5/account/Memory.d.ts +15 -4
  428. package/types-legacy/ts4.5/account/Rpc.d.ts +16 -5
  429. package/types-legacy/ts4.5/aens.d.ts +17 -44
  430. package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserRuntime.d.ts +3 -0
  431. package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +14 -0
  432. package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +2 -0
  433. package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +1 -0
  434. package/types-legacy/ts4.5/apis/middleware/middleware.d.ts +23 -5
  435. package/types-legacy/ts4.5/apis/middleware/models/index.d.ts +164 -15
  436. package/types-legacy/ts4.5/apis/middleware/models/mappers.d.ts +8 -1
  437. package/types-legacy/ts4.5/apis/middleware/models/parameters.d.ts +6 -3
  438. package/types-legacy/ts4.5/apis/node/models/index.d.ts +66 -2
  439. package/types-legacy/ts4.5/apis/node/models/mappers.d.ts +5 -1
  440. package/types-legacy/ts4.5/apis/node/models/parameters.d.ts +2 -2
  441. package/types-legacy/ts4.5/apis/node/node.d.ts +24 -3
  442. package/types-legacy/ts4.5/chain.d.ts +14 -44
  443. package/types-legacy/ts4.5/channel/Base.d.ts +3 -47
  444. package/types-legacy/ts4.5/channel/Contract.d.ts +16 -25
  445. package/types-legacy/ts4.5/channel/Spend.d.ts +0 -8
  446. package/types-legacy/ts4.5/channel/internal.d.ts +104 -5
  447. package/types-legacy/ts4.5/contract/Contract.d.ts +9 -1
  448. package/types-legacy/ts4.5/contract/compiler/Base.d.ts +14 -8
  449. package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +5 -9
  450. package/types-legacy/ts4.5/contract/compiler/Cli8.d.ts +13 -0
  451. package/types-legacy/ts4.5/contract/compiler/Http.d.ts +3 -9
  452. package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +2 -5
  453. package/types-legacy/ts4.5/contract/delegation-signature.d.ts +2 -1
  454. package/types-legacy/ts4.5/contract/ga.d.ts +1 -2
  455. package/types-legacy/ts4.5/deprecated.d.ts +38 -0
  456. package/types-legacy/ts4.5/index-browser.d.ts +10 -5
  457. package/types-legacy/ts4.5/index.d.ts +1 -0
  458. package/types-legacy/ts4.5/oracle.d.ts +6 -37
  459. package/types-legacy/ts4.5/send-transaction.d.ts +53 -0
  460. package/types-legacy/ts4.5/spend.d.ts +4 -3
  461. package/types-legacy/ts4.5/tx/builder/common.d.ts +32 -0
  462. package/types-legacy/ts4.5/tx/builder/constants.d.ts +4 -4
  463. package/types-legacy/ts4.5/tx/builder/delegation/index.d.ts +20 -0
  464. package/types-legacy/ts4.5/tx/builder/delegation/schema.d.ts +136 -0
  465. package/types-legacy/ts4.5/tx/builder/delegation/schema.generated.d.ts +141 -0
  466. package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +2 -2
  467. package/types-legacy/ts4.5/tx/builder/field-types/fee.d.ts +19 -11
  468. package/types-legacy/ts4.5/tx/builder/field-types/gas-price.d.ts +10 -2
  469. package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +31 -29
  470. package/types-legacy/ts4.5/tx/builder/field-types/name-fee.d.ts +1 -1
  471. package/types-legacy/ts4.5/tx/builder/field-types/nonce.d.ts +1 -0
  472. package/types-legacy/ts4.5/tx/builder/field-types/pointers2.d.ts +26 -0
  473. package/types-legacy/ts4.5/tx/builder/field-types/query-fee.d.ts +19 -0
  474. package/types-legacy/ts4.5/tx/builder/field-types/ttl.d.ts +9 -1
  475. package/types-legacy/ts4.5/tx/builder/field-types/with-default.d.ts +7 -0
  476. package/types-legacy/ts4.5/tx/builder/field-types/with-formatting.d.ts +7 -0
  477. package/types-legacy/ts4.5/tx/builder/helpers.d.ts +2 -2
  478. package/types-legacy/ts4.5/tx/builder/index.d.ts +17 -10
  479. package/types-legacy/ts4.5/tx/builder/schema.d.ts +482 -257
  480. package/types-legacy/ts4.5/tx/builder/schema.generated.d.ts +39 -3
  481. package/types-legacy/ts4.5/tx/execution-cost.d.ts +6 -5
  482. package/types-legacy/ts4.5/utils/autorest.d.ts +2 -3
  483. package/types-legacy/ts4.5/utils/crypto.d.ts +8 -4
  484. package/types-legacy/ts4.5/utils/errors.d.ts +6 -0
  485. package/types-legacy/ts4.5/utils/hd-wallet.d.ts +2 -0
  486. package/types-legacy/ts4.5/utils/jwt.d.ts +53 -0
  487. package/types-legacy/ts4.5/utils/keystore.d.ts +6 -2
  488. package/types-legacy/ts4.5/utils/wrap-proxy.d.ts +2 -0
  489. package/es/tx/builder/field-types/deposit.d.ts +0 -15
  490. package/es/tx/builder/field-types/deposit.mjs +0 -18
  491. package/es/tx/builder/field-types/deposit.mjs.map +0 -1
  492. package/src/tx/builder/field-types/deposit.ts +0 -23
  493. package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +0 -15
  494. package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +0 -15
@@ -316,6 +316,42 @@ type TxUnpackedNameUpdateTx1Type = TxUnpackedComplex & {
316
316
  */
317
317
  export interface TxUnpackedNameUpdateTx1 extends TxUnpackedNameUpdateTx1Type {
318
318
  }
319
+ /**
320
+ * @category transaction builder
321
+ */
322
+ type TxParamsNameUpdateTx2Type = TxParamsComplex & {
323
+ tag: Tag.NameUpdateTx;
324
+ version: 2;
325
+ };
326
+ /**
327
+ * @category transaction builder
328
+ */
329
+ export interface TxParamsNameUpdateTx2 extends TxParamsNameUpdateTx2Type {
330
+ }
331
+ /**
332
+ * @category transaction builder
333
+ */
334
+ type TxParamsAsyncNameUpdateTx2Type = TxParamsAsyncComplex & {
335
+ tag: Tag.NameUpdateTx;
336
+ version: 2;
337
+ };
338
+ /**
339
+ * @category transaction builder
340
+ */
341
+ export interface TxParamsAsyncNameUpdateTx2 extends TxParamsAsyncNameUpdateTx2Type {
342
+ }
343
+ /**
344
+ * @category transaction builder
345
+ */
346
+ type TxUnpackedNameUpdateTx2Type = TxUnpackedComplex & {
347
+ tag: Tag.NameUpdateTx;
348
+ version: 2;
349
+ };
350
+ /**
351
+ * @category transaction builder
352
+ */
353
+ export interface TxUnpackedNameUpdateTx2 extends TxUnpackedNameUpdateTx2Type {
354
+ }
319
355
  /**
320
356
  * @category transaction builder
321
357
  */
@@ -1999,13 +2035,13 @@ export interface TxUnpackedGaMetaTxAuthData1 extends TxUnpackedGaMetaTxAuthData1
1999
2035
  /**
2000
2036
  * @category transaction builder
2001
2037
  */
2002
- export type TxParams = TxParamsAccount1 | TxParamsAccount2 | TxParamsSignedTx1 | TxParamsSpendTx1 | TxParamsName1 | TxParamsNamePreclaimTx1 | TxParamsNameClaimTx2 | TxParamsNameUpdateTx1 | TxParamsNameTransferTx1 | TxParamsNameRevokeTx1 | TxParamsContract1 | TxParamsContractCreateTx1 | TxParamsContractCallTx1 | TxParamsContractCall2 | TxParamsOracle1 | TxParamsOracleRegisterTx1 | TxParamsOracleExtendTx1 | TxParamsOracleQueryTx1 | TxParamsOracleResponseTx1 | TxParamsChannelCreateTx2 | TxParamsChannelCloseMutualTx1 | TxParamsChannelCloseSoloTx1 | TxParamsChannelSlashTx1 | TxParamsChannelDepositTx1 | TxParamsChannelWithdrawTx1 | TxParamsChannelSettleTx1 | TxParamsChannelForceProgressTx1 | TxParamsChannelOffChainTx2 | TxParamsChannel3 | TxParamsChannelSnapshotSoloTx1 | TxParamsChannelOffChainUpdateTransfer1 | TxParamsChannelOffChainUpdateDeposit1 | TxParamsChannelOffChainUpdateWithdraw1 | TxParamsChannelOffChainUpdateCreateContract1 | TxParamsChannelOffChainUpdateCallContract1 | TxParamsChannelClientReconnectTx1 | TxParamsTreesPoi1 | TxParamsStateTrees0 | TxParamsMtree1 | TxParamsMtreeValue1 | TxParamsContractsMtree1 | TxParamsCallsMtree1 | TxParamsChannelsMtree1 | TxParamsNameserviceMtree1 | TxParamsOraclesMtree1 | TxParamsAccountsMtree1 | TxParamsGaAttachTx1 | TxParamsGaMetaTx2 | TxParamsPayingForTx1 | TxParamsGaMetaTxAuthData1;
2038
+ export type TxParams = TxParamsAccount1 | TxParamsAccount2 | TxParamsSignedTx1 | TxParamsSpendTx1 | TxParamsName1 | TxParamsNamePreclaimTx1 | TxParamsNameClaimTx2 | TxParamsNameUpdateTx1 | TxParamsNameUpdateTx2 | TxParamsNameTransferTx1 | TxParamsNameRevokeTx1 | TxParamsContract1 | TxParamsContractCreateTx1 | TxParamsContractCallTx1 | TxParamsContractCall2 | TxParamsOracle1 | TxParamsOracleRegisterTx1 | TxParamsOracleExtendTx1 | TxParamsOracleQueryTx1 | TxParamsOracleResponseTx1 | TxParamsChannelCreateTx2 | TxParamsChannelCloseMutualTx1 | TxParamsChannelCloseSoloTx1 | TxParamsChannelSlashTx1 | TxParamsChannelDepositTx1 | TxParamsChannelWithdrawTx1 | TxParamsChannelSettleTx1 | TxParamsChannelForceProgressTx1 | TxParamsChannelOffChainTx2 | TxParamsChannel3 | TxParamsChannelSnapshotSoloTx1 | TxParamsChannelOffChainUpdateTransfer1 | TxParamsChannelOffChainUpdateDeposit1 | TxParamsChannelOffChainUpdateWithdraw1 | TxParamsChannelOffChainUpdateCreateContract1 | TxParamsChannelOffChainUpdateCallContract1 | TxParamsChannelClientReconnectTx1 | TxParamsTreesPoi1 | TxParamsStateTrees0 | TxParamsMtree1 | TxParamsMtreeValue1 | TxParamsContractsMtree1 | TxParamsCallsMtree1 | TxParamsChannelsMtree1 | TxParamsNameserviceMtree1 | TxParamsOraclesMtree1 | TxParamsAccountsMtree1 | TxParamsGaAttachTx1 | TxParamsGaMetaTx2 | TxParamsPayingForTx1 | TxParamsGaMetaTxAuthData1;
2003
2039
  /**
2004
2040
  * @category transaction builder
2005
2041
  */
2006
- export type TxParamsAsync = TxParamsAsyncAccount1 | TxParamsAsyncAccount2 | TxParamsAsyncSignedTx1 | TxParamsAsyncSpendTx1 | TxParamsAsyncName1 | TxParamsAsyncNamePreclaimTx1 | TxParamsAsyncNameClaimTx2 | TxParamsAsyncNameUpdateTx1 | TxParamsAsyncNameTransferTx1 | TxParamsAsyncNameRevokeTx1 | TxParamsAsyncContract1 | TxParamsAsyncContractCreateTx1 | TxParamsAsyncContractCallTx1 | TxParamsAsyncContractCall2 | TxParamsAsyncOracle1 | TxParamsAsyncOracleRegisterTx1 | TxParamsAsyncOracleExtendTx1 | TxParamsAsyncOracleQueryTx1 | TxParamsAsyncOracleResponseTx1 | TxParamsAsyncChannelCreateTx2 | TxParamsAsyncChannelCloseMutualTx1 | TxParamsAsyncChannelCloseSoloTx1 | TxParamsAsyncChannelSlashTx1 | TxParamsAsyncChannelDepositTx1 | TxParamsAsyncChannelWithdrawTx1 | TxParamsAsyncChannelSettleTx1 | TxParamsAsyncChannelForceProgressTx1 | TxParamsAsyncChannelOffChainTx2 | TxParamsAsyncChannel3 | TxParamsAsyncChannelSnapshotSoloTx1 | TxParamsAsyncChannelOffChainUpdateTransfer1 | TxParamsAsyncChannelOffChainUpdateDeposit1 | TxParamsAsyncChannelOffChainUpdateWithdraw1 | TxParamsAsyncChannelOffChainUpdateCreateContract1 | TxParamsAsyncChannelOffChainUpdateCallContract1 | TxParamsAsyncChannelClientReconnectTx1 | TxParamsAsyncTreesPoi1 | TxParamsAsyncStateTrees0 | TxParamsAsyncMtree1 | TxParamsAsyncMtreeValue1 | TxParamsAsyncContractsMtree1 | TxParamsAsyncCallsMtree1 | TxParamsAsyncChannelsMtree1 | TxParamsAsyncNameserviceMtree1 | TxParamsAsyncOraclesMtree1 | TxParamsAsyncAccountsMtree1 | TxParamsAsyncGaAttachTx1 | TxParamsAsyncGaMetaTx2 | TxParamsAsyncPayingForTx1 | TxParamsAsyncGaMetaTxAuthData1;
2042
+ export type TxParamsAsync = TxParamsAsyncAccount1 | TxParamsAsyncAccount2 | TxParamsAsyncSignedTx1 | TxParamsAsyncSpendTx1 | TxParamsAsyncName1 | TxParamsAsyncNamePreclaimTx1 | TxParamsAsyncNameClaimTx2 | TxParamsAsyncNameUpdateTx1 | TxParamsAsyncNameUpdateTx2 | TxParamsAsyncNameTransferTx1 | TxParamsAsyncNameRevokeTx1 | TxParamsAsyncContract1 | TxParamsAsyncContractCreateTx1 | TxParamsAsyncContractCallTx1 | TxParamsAsyncContractCall2 | TxParamsAsyncOracle1 | TxParamsAsyncOracleRegisterTx1 | TxParamsAsyncOracleExtendTx1 | TxParamsAsyncOracleQueryTx1 | TxParamsAsyncOracleResponseTx1 | TxParamsAsyncChannelCreateTx2 | TxParamsAsyncChannelCloseMutualTx1 | TxParamsAsyncChannelCloseSoloTx1 | TxParamsAsyncChannelSlashTx1 | TxParamsAsyncChannelDepositTx1 | TxParamsAsyncChannelWithdrawTx1 | TxParamsAsyncChannelSettleTx1 | TxParamsAsyncChannelForceProgressTx1 | TxParamsAsyncChannelOffChainTx2 | TxParamsAsyncChannel3 | TxParamsAsyncChannelSnapshotSoloTx1 | TxParamsAsyncChannelOffChainUpdateTransfer1 | TxParamsAsyncChannelOffChainUpdateDeposit1 | TxParamsAsyncChannelOffChainUpdateWithdraw1 | TxParamsAsyncChannelOffChainUpdateCreateContract1 | TxParamsAsyncChannelOffChainUpdateCallContract1 | TxParamsAsyncChannelClientReconnectTx1 | TxParamsAsyncTreesPoi1 | TxParamsAsyncStateTrees0 | TxParamsAsyncMtree1 | TxParamsAsyncMtreeValue1 | TxParamsAsyncContractsMtree1 | TxParamsAsyncCallsMtree1 | TxParamsAsyncChannelsMtree1 | TxParamsAsyncNameserviceMtree1 | TxParamsAsyncOraclesMtree1 | TxParamsAsyncAccountsMtree1 | TxParamsAsyncGaAttachTx1 | TxParamsAsyncGaMetaTx2 | TxParamsAsyncPayingForTx1 | TxParamsAsyncGaMetaTxAuthData1;
2007
2043
  /**
2008
2044
  * @category transaction builder
2009
2045
  */
2010
- export type TxUnpacked = TxUnpackedAccount1 | TxUnpackedAccount2 | TxUnpackedSignedTx1 | TxUnpackedSpendTx1 | TxUnpackedName1 | TxUnpackedNamePreclaimTx1 | TxUnpackedNameClaimTx2 | TxUnpackedNameUpdateTx1 | TxUnpackedNameTransferTx1 | TxUnpackedNameRevokeTx1 | TxUnpackedContract1 | TxUnpackedContractCreateTx1 | TxUnpackedContractCallTx1 | TxUnpackedContractCall2 | TxUnpackedOracle1 | TxUnpackedOracleRegisterTx1 | TxUnpackedOracleExtendTx1 | TxUnpackedOracleQueryTx1 | TxUnpackedOracleResponseTx1 | TxUnpackedChannelCreateTx2 | TxUnpackedChannelCloseMutualTx1 | TxUnpackedChannelCloseSoloTx1 | TxUnpackedChannelSlashTx1 | TxUnpackedChannelDepositTx1 | TxUnpackedChannelWithdrawTx1 | TxUnpackedChannelSettleTx1 | TxUnpackedChannelForceProgressTx1 | TxUnpackedChannelOffChainTx2 | TxUnpackedChannel3 | TxUnpackedChannelSnapshotSoloTx1 | TxUnpackedChannelOffChainUpdateTransfer1 | TxUnpackedChannelOffChainUpdateDeposit1 | TxUnpackedChannelOffChainUpdateWithdraw1 | TxUnpackedChannelOffChainUpdateCreateContract1 | TxUnpackedChannelOffChainUpdateCallContract1 | TxUnpackedChannelClientReconnectTx1 | TxUnpackedTreesPoi1 | TxUnpackedStateTrees0 | TxUnpackedMtree1 | TxUnpackedMtreeValue1 | TxUnpackedContractsMtree1 | TxUnpackedCallsMtree1 | TxUnpackedChannelsMtree1 | TxUnpackedNameserviceMtree1 | TxUnpackedOraclesMtree1 | TxUnpackedAccountsMtree1 | TxUnpackedGaAttachTx1 | TxUnpackedGaMetaTx2 | TxUnpackedPayingForTx1 | TxUnpackedGaMetaTxAuthData1;
2046
+ export type TxUnpacked = TxUnpackedAccount1 | TxUnpackedAccount2 | TxUnpackedSignedTx1 | TxUnpackedSpendTx1 | TxUnpackedName1 | TxUnpackedNamePreclaimTx1 | TxUnpackedNameClaimTx2 | TxUnpackedNameUpdateTx1 | TxUnpackedNameUpdateTx2 | TxUnpackedNameTransferTx1 | TxUnpackedNameRevokeTx1 | TxUnpackedContract1 | TxUnpackedContractCreateTx1 | TxUnpackedContractCallTx1 | TxUnpackedContractCall2 | TxUnpackedOracle1 | TxUnpackedOracleRegisterTx1 | TxUnpackedOracleExtendTx1 | TxUnpackedOracleQueryTx1 | TxUnpackedOracleResponseTx1 | TxUnpackedChannelCreateTx2 | TxUnpackedChannelCloseMutualTx1 | TxUnpackedChannelCloseSoloTx1 | TxUnpackedChannelSlashTx1 | TxUnpackedChannelDepositTx1 | TxUnpackedChannelWithdrawTx1 | TxUnpackedChannelSettleTx1 | TxUnpackedChannelForceProgressTx1 | TxUnpackedChannelOffChainTx2 | TxUnpackedChannel3 | TxUnpackedChannelSnapshotSoloTx1 | TxUnpackedChannelOffChainUpdateTransfer1 | TxUnpackedChannelOffChainUpdateDeposit1 | TxUnpackedChannelOffChainUpdateWithdraw1 | TxUnpackedChannelOffChainUpdateCreateContract1 | TxUnpackedChannelOffChainUpdateCallContract1 | TxUnpackedChannelClientReconnectTx1 | TxUnpackedTreesPoi1 | TxUnpackedStateTrees0 | TxUnpackedMtree1 | TxUnpackedMtreeValue1 | TxUnpackedContractsMtree1 | TxUnpackedCallsMtree1 | TxUnpackedChannelsMtree1 | TxUnpackedNameserviceMtree1 | TxUnpackedOraclesMtree1 | TxUnpackedAccountsMtree1 | TxUnpackedGaAttachTx1 | TxUnpackedGaMetaTx2 | TxUnpackedPayingForTx1 | TxUnpackedGaMetaTxAuthData1;
2011
2047
  export {};
@@ -22,10 +22,11 @@ import Node from '../Node';
22
22
  * the SDK calculates the overall price of any transaction on its side.
23
23
  *
24
24
  * @param transaction - Transaction to calculate the cost of
25
- * @param innerTx - Should be provided if transaction wrapped with Tag.PayingForTx
26
- * @param gasUsed - Amount of gas actually used to make calculation more accurate
27
- * @param queryFee - Oracle query fee
28
- * @param isInitiator - Is transaction signer an initiator of state channel
25
+ * @param options - Options
26
+ * @param options.innerTx - Should be provided if transaction wrapped with Tag.PayingForTx
27
+ * @param options.gasUsed - Amount of gas actually used to make calculation more accurate
28
+ * @param options.queryFee - Oracle query fee
29
+ * @param options.isInitiator - Is transaction signer an initiator of state channel
29
30
  */
30
31
  export declare function getExecutionCost(transaction: Encoded.Transaction, { innerTx, gasUsed, queryFee, isInitiator, }?: {
31
32
  innerTx?: 'fee-payer' | 'freeloader';
@@ -44,8 +45,8 @@ export declare function getExecutionCostBySignedTx(transaction: Encoded.Transact
44
45
  * Calculates the cost of signed and not signed transaction execution using node
45
46
  * @param transaction - Transaction to calculate the cost of
46
47
  * @param node - Node to use
47
- * @param isMined - Is transaction already mined or not
48
48
  * @param options - Options
49
+ * @param options.isMined - Is transaction already mined or not
49
50
  */
50
51
  export declare function getExecutionCostUsingNode(transaction: Encoded.Transaction, node: Node, { isMined, ...options }?: {
51
52
  isMined?: boolean;
@@ -1,8 +1,7 @@
1
- import { PipelinePolicy } from '@azure/core-rest-pipeline';
2
- import { AdditionalPolicyConfig } from '@azure/core-client';
1
+ import { AdditionalPolicyConfig, OperationOptions } from '@azure/core-client';
3
2
  export declare const genRequestQueuesPolicy: () => AdditionalPolicyConfig;
4
3
  export declare const genCombineGetRequestsPolicy: () => AdditionalPolicyConfig;
5
4
  export declare const genAggressiveCacheGetResponsesPolicy: () => AdditionalPolicyConfig;
6
5
  export declare const genErrorFormatterPolicy: (getMessage: (b: any) => string) => AdditionalPolicyConfig;
7
- export declare const genVersionCheckPolicy: (name: string, ignorePath: string, versionPromise: Promise<string | Error>, geVersion: string, ltVersion: string) => PipelinePolicy;
6
+ export declare const genVersionCheckPolicy: (name: string, versionCb: (options: OperationOptions) => Promise<string>, geVersion: string, ltVersion: string) => AdditionalPolicyConfig;
8
7
  export declare const genRetryOnFailurePolicy: (retryCount: number, retryOverallDelay: number) => AdditionalPolicyConfig;
@@ -9,11 +9,15 @@ import { Encoded, Encoding } from './encoder';
9
9
  export declare function getAddressFromPriv(secret: string | Uint8Array): Encoded.AccountAddress;
10
10
  /**
11
11
  * Check if address is valid
12
- * @param address - Address
13
- * @param prefix - Transaction prefix. Default: 'ak'
14
- * @returns is valid
12
+ * @param maybeAddress - Address to check
15
13
  */
16
- export declare function isAddressValid(address: string, prefix?: Encoding): boolean;
14
+ export declare function isAddressValid(maybeAddress: string): maybeAddress is Encoded.AccountAddress;
15
+ /**
16
+ * Check if data is encoded in one of provided encodings
17
+ * @param maybeEncoded - Data to check
18
+ * @param encodings - Rest parameters with encodings to check against
19
+ */
20
+ export declare function isAddressValid<E extends Encoding>(maybeEncoded: string, ...encodings: E[]): maybeEncoded is Encoded.Generic<E>;
17
21
  /**
18
22
  * Generate a random salt (positive integer)
19
23
  * @returns random salt
@@ -146,6 +146,12 @@ export declare class NotImplementedError extends BaseError {
146
146
  export declare class UnsupportedVersionError extends BaseError {
147
147
  constructor(dependency: string, version: string, geVersion: string, ltVersion: string);
148
148
  }
149
+ /**
150
+ * @category exception
151
+ */
152
+ export declare class LogicError extends BaseError {
153
+ constructor(message: string);
154
+ }
149
155
  /**
150
156
  * @category exception
151
157
  */
@@ -30,6 +30,8 @@ type Bip32PathT<MaxLen extends number, H extends 'H' | 'h' | '\''> = MaxLen exte
30
30
  type Bip32Path<MaxLen extends number> = '' | Bip32PathT<MaxLen, 'H'> | Bip32PathT<MaxLen, 'h'> | Bip32PathT<MaxLen, '\''>;
31
31
  /**
32
32
  * @category hd-wallet
33
+ * @param keyTreeNode - A node of key tree
34
+ * @param index - index of child node to derive
33
35
  */
34
36
  export declare function deriveChild({ secretKey, chainCode }: KeyTreeNode, index: number): KeyTreeNode;
35
37
  /**
@@ -0,0 +1,53 @@
1
+ import AccountBase from '../account/Base';
2
+ import { Encoded } from './encoder';
3
+ declare const header = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";
4
+ /**
5
+ * JWT including specific header
6
+ * @category JWT
7
+ */
8
+ export type Jwt = `${typeof header}.${string}.${string}`;
9
+ /**
10
+ * Generate a signed JWT
11
+ * Provide `"sub_jwk": undefined` in payload to omit signer public key added by default.
12
+ * @param originalPayload - Payload to sign
13
+ * @param account - Account to sign by
14
+ * @category JWT
15
+ */
16
+ export declare function signJwt(originalPayload: any, account: AccountBase): Promise<Jwt>;
17
+ /**
18
+ * Unpack JWT. It will check signature if address or "sub_jwk" provided.
19
+ * @param jwt - JWT to unpack
20
+ * @param address - Address to check signature
21
+ * @category JWT
22
+ */
23
+ export declare function unpackJwt(jwt: Jwt, address?: Encoded.AccountAddress): {
24
+ /**
25
+ * JWT payload as object
26
+ */
27
+ payload: any;
28
+ /**
29
+ * Undefined returned in case signature is not checked
30
+ */
31
+ signer: Encoded.AccountAddress | undefined;
32
+ };
33
+ /**
34
+ * Check is string a JWT or not. Use to validate the user input.
35
+ * @param maybeJwt - A string to check
36
+ * @returns True if argument is a JWT
37
+ * @category JWT
38
+ */
39
+ export declare function isJwt(maybeJwt: string): maybeJwt is Jwt;
40
+ /**
41
+ * Throws an error if argument is not JWT. Use to ensure that a value is JWT.
42
+ * @param maybeJwt - A string to check
43
+ * @category JWT
44
+ */
45
+ export declare function ensureJwt(maybeJwt: string): asserts maybeJwt is Jwt;
46
+ /**
47
+ * Check is JWT signed by address from arguments or "sub_jwk"
48
+ * @param jwt - JWT to check
49
+ * @param address - Address to check signature
50
+ * @category JWT
51
+ */
52
+ export declare function verifyJwt(jwt: Jwt, address?: Encoded.AccountAddress): boolean;
53
+ export {};
@@ -20,7 +20,13 @@ export interface Keystore {
20
20
  cipher_params: {
21
21
  nonce: string;
22
22
  };
23
+ /**
24
+ * Key derivation function name.
25
+ */
23
26
  kdf: keyof typeof DERIVED_KEY_FUNCTIONS;
27
+ /**
28
+ * Key derivation function parameters.
29
+ */
24
30
  kdf_params: {
25
31
  memlimit_kib: number;
26
32
  opslimit: number;
@@ -46,8 +52,6 @@ export declare function recover(password: string | Uint8Array, { crypto }: Keyst
46
52
  * @param nonce - Randomly generated 24byte nonce.
47
53
  * @param salt - Randomly generated 16byte salt.
48
54
  * @param options - Encryption parameters.
49
- * @param options.kdf - Key derivation function.
50
- * @param options.kdf_params - KDF parameters.
51
55
  */
52
56
  export declare function dump(name: string, password: string | Uint8Array, privateKey: string | Uint8Array, nonce?: Uint8Array, salt?: Uint8Array, options?: Partial<Keystore['crypto']>): Promise<Keystore>;
53
57
  export {};
@@ -0,0 +1,2 @@
1
+ export declare function wrapWithProxy<Value extends object | undefined>(valueCb: () => Value): NonNullable<Value>;
2
+ export declare function unwrapProxy<Value extends object>(value: Value): Value;
@@ -7,6 +7,9 @@ export default class AeSdk extends AeSdkBase {
7
7
  [key: Encoded.AccountAddress]: AccountBase;
8
8
  };
9
9
  selectedAddress?: Encoded.AccountAddress;
10
+ /**
11
+ * @param options - Options
12
+ */
10
13
  constructor({ accounts, ...options }?: {
11
14
  accounts?: AccountBase[];
12
15
  } & ConstructorParameters<typeof AeSdkBase>[0]);
@@ -39,7 +39,6 @@ export default class AeSdkAepp extends AeSdkBase {
39
39
  * @param options - Options
40
40
  * @param options.connectNode - Request wallet to bind node
41
41
  * @param options.name - Node name
42
- * @param options.select - Select this node as current
43
42
  */
44
43
  connectToWallet(connection: BrowserConnection, { connectNode, name }?: {
45
44
  connectNode?: boolean;
@@ -2,7 +2,7 @@ import Node from './Node';
2
2
  import AccountBase from './account/Base';
3
3
  import { Encoded } from './utils/encoder';
4
4
  import CompilerBase from './contract/compiler/Base';
5
- import AeSdkMethods, { OnAccount, AeSdkMethodsOptions } from './AeSdkMethods';
5
+ import AeSdkMethods, { OnAccount, AeSdkMethodsOptions, WrappedOptions } from './AeSdkMethods';
6
6
  import { AensName } from './tx/builder/constants';
7
7
  type NodeInfo = Awaited<ReturnType<Node['getNodeInfo']>> & {
8
8
  name: string;
@@ -14,6 +14,7 @@ type NodeInfo = Awaited<ReturnType<Node['getNodeInfo']>> & {
14
14
  * - wrappers of account methods mapped to the current account.
15
15
  */
16
16
  export default class AeSdkBase extends AeSdkMethods {
17
+ #private;
17
18
  pool: Map<string, Node>;
18
19
  selectedNodeName?: string;
19
20
  /**
@@ -79,31 +80,85 @@ export default class AeSdkBase extends AeSdkMethods {
79
80
  */
80
81
  _resolveAccount(account?: OnAccount): AccountBase;
81
82
  get address(): Encoded.AccountAddress;
83
+ /**
84
+ * Sign data blob
85
+ * @param data - Data to sign
86
+ * @param options - Options
87
+ */
82
88
  sign(data: string | Uint8Array, { onAccount, ...options }?: {
83
89
  onAccount?: OnAccount;
84
90
  }): Promise<Uint8Array>;
91
+ /**
92
+ * Sign encoded transaction
93
+ * @param tx - Transaction to sign
94
+ * @param options - Options
95
+ */
85
96
  signTransaction(tx: Encoded.Transaction, { onAccount, ...options }?: {
86
97
  onAccount?: OnAccount;
87
98
  } & Parameters<AccountBase['signTransaction']>[1]): Promise<Encoded.Transaction>;
99
+ /**
100
+ * Sign message
101
+ * @param message - Message to sign
102
+ * @param options - Options
103
+ */
88
104
  signMessage(message: string, { onAccount, ...options }?: {
89
105
  onAccount?: OnAccount;
90
106
  } & Parameters<AccountBase['signMessage']>[1]): Promise<Uint8Array>;
107
+ /**
108
+ * Sign typed data
109
+ * @param data - Encoded data to sign
110
+ * @param aci - Type of data to sign
111
+ * @param options - Options
112
+ */
91
113
  signTypedData(data: Encoded.ContractBytearray, aci: Parameters<AccountBase['signTypedData']>[1], { onAccount, ...options }?: {
92
114
  onAccount?: OnAccount;
93
115
  } & Parameters<AccountBase['signTypedData']>[2]): Promise<Encoded.Signature>;
116
+ /**
117
+ * @deprecated use AeSdkBase:signDelegation in Ceres
118
+ * @param contractAddress - Contract address
119
+ * @param options - Options
120
+ */
94
121
  signDelegationToContract(contractAddress: Encoded.ContractAddress, { onAccount, ...options }?: {
95
122
  onAccount?: OnAccount;
96
123
  } & Parameters<AccountBase['signDelegationToContract']>[1]): Promise<Encoded.Signature>;
124
+ /**
125
+ * @deprecated use AeSdkBase:signDelegation in Ceres
126
+ * @param contractAddress - Contract address
127
+ * @param name - AENS name
128
+ * @param options - Options
129
+ */
97
130
  signNameDelegationToContract(contractAddress: Encoded.ContractAddress, name: AensName, { onAccount, ...options }?: {
98
131
  onAccount?: OnAccount;
99
132
  } & Parameters<AccountBase['signNameDelegationToContract']>[2]): Promise<Encoded.Signature>;
133
+ /**
134
+ * @deprecated use AeSdkBase:signDelegation in Ceres
135
+ * @param contractAddress - Contract address
136
+ * @param options - Options
137
+ */
138
+ signAllNamesDelegationToContract(contractAddress: Encoded.ContractAddress, { onAccount, ...options }?: {
139
+ onAccount?: OnAccount;
140
+ } & Parameters<AccountBase['signAllNamesDelegationToContract']>[1]): Promise<Encoded.Signature>;
141
+ /**
142
+ * @deprecated use AeSdkBase:signDelegation in Ceres
143
+ * @param contractAddress - Contract address
144
+ * @param oracleQueryId - Oracle query id
145
+ * @param options - Options
146
+ */
100
147
  signOracleQueryDelegationToContract(contractAddress: Encoded.ContractAddress, oracleQueryId: Encoded.OracleQueryId, { onAccount, ...options }?: {
101
148
  onAccount?: OnAccount;
102
149
  } & Parameters<AccountBase['signOracleQueryDelegationToContract']>[2]): Promise<Encoded.Signature>;
103
- _getOptions(callOptions?: AeSdkMethodsOptions): {
104
- onNode: Node;
105
- onAccount: AccountBase;
106
- onCompiler: CompilerBase;
107
- };
150
+ /**
151
+ * Sign delegation, works only in Ceres
152
+ * @param delegation - Delegation to sign
153
+ * @param options - Options
154
+ */
155
+ signDelegation(delegation: Encoded.Bytearray, { onAccount, ...options }?: {
156
+ onAccount?: OnAccount;
157
+ } & Parameters<AccountBase['signDelegation']>[1]): Promise<Encoded.Signature>;
158
+ /**
159
+ * The same as AeSdkMethods:getContext, but it would resolve ak_-prefixed address in
160
+ * `mergeWith.onAccount` to AccountBase.
161
+ */
162
+ getContext(mergeWith?: AeSdkMethodsOptions): AeSdkMethodsOptions & WrappedOptions;
108
163
  }
109
164
  export {};
@@ -1,4 +1,5 @@
1
1
  import * as chainMethods from './chain';
2
+ import { sendTransaction } from './send-transaction';
2
3
  import * as aensMethods from './aens';
3
4
  import * as spendMethods from './spend';
4
5
  import * as oracleMethods from './oracle';
@@ -12,7 +13,6 @@ import AccountBase from './account/Base';
12
13
  import { Encoded } from './utils/encoder';
13
14
  import CompilerBase from './contract/compiler/Base';
14
15
  export type OnAccount = Encoded.AccountAddress | AccountBase | undefined;
15
- export declare function getValueOrErrorProxy<Value extends object | undefined>(valueCb: () => Value): NonNullable<Value>;
16
16
  declare const methods: {
17
17
  readonly createGeneralizedAccount: typeof contractGaMethods.createGeneralizedAccount;
18
18
  readonly buildAuthTxHash: typeof contractGaMethods.buildAuthTxHash;
@@ -36,12 +36,12 @@ declare const methods: {
36
36
  readonly aensClaim: typeof aensMethods.aensClaim;
37
37
  readonly aensPreclaim: typeof aensMethods.aensPreclaim;
38
38
  readonly aensBid: typeof aensMethods.aensBid;
39
+ readonly sendTransaction: typeof sendTransaction;
39
40
  readonly _getPollInterval: typeof chainMethods._getPollInterval;
40
41
  readonly getHeight: typeof chainMethods.getHeight;
41
42
  readonly poll: typeof chainMethods.poll;
42
43
  readonly awaitHeight: typeof chainMethods.awaitHeight;
43
44
  readonly waitForTxConfirm: typeof chainMethods.waitForTxConfirm;
44
- readonly sendTransaction: typeof chainMethods.sendTransaction;
45
45
  readonly getAccount: typeof chainMethods.getAccount;
46
46
  readonly getBalance: typeof chainMethods.getBalance;
47
47
  readonly getCurrentGeneration: typeof chainMethods.getCurrentGeneration;
@@ -72,6 +72,11 @@ type GetMethodsOptions<Methods extends {
72
72
  type MethodsOptions = GetMethodsOptions<typeof methods>;
73
73
  export interface AeSdkMethodsOptions extends Partial<UnionToIntersection<MethodsOptions[keyof MethodsOptions]>> {
74
74
  }
75
+ export interface WrappedOptions {
76
+ onAccount: AccountBase;
77
+ onCompiler: CompilerBase;
78
+ onNode: Node;
79
+ }
75
80
  /**
76
81
  * AeSdkMethods is the composition of:
77
82
  * - chain methods
@@ -86,16 +91,19 @@ export interface AeSdkMethodsOptions extends Partial<UnionToIntersection<Methods
86
91
  * their context (current account, network, and compiler to use).
87
92
  */
88
93
  declare class AeSdkMethods {
94
+ #private;
89
95
  _options: AeSdkMethodsOptions;
90
96
  /**
91
97
  * @param options - Options
92
98
  */
93
99
  constructor(options?: AeSdkMethodsOptions);
94
- _getOptions(callOptions?: AeSdkMethodsOptions): AeSdkMethodsOptions & {
95
- onAccount: AccountBase;
96
- onCompiler: CompilerBase;
97
- onNode: Node;
98
- };
100
+ /**
101
+ * Returns sdk instance options with references to current account, node, compiler.
102
+ * Used to create an instance (Contract, Oracle) bound to AeSdk state.
103
+ * @param mergeWith - Merge context with these extra options
104
+ * @returns Context object
105
+ */
106
+ getContext(mergeWith?: AeSdkMethodsOptions): AeSdkMethodsOptions & WrappedOptions;
99
107
  buildTx(options: TxParamsAsync): Promise<Encoded.Transaction>;
100
108
  initializeContract<Methods extends ContractMethodsBase>(options?: Omit<Parameters<typeof Contract.initialize>[0], 'onNode'> & {
101
109
  onNode?: Node;
@@ -111,6 +119,10 @@ type OptionalIfNotRequired<T extends [
111
119
  type ReplaceOnAccount<Options> = Options extends {
112
120
  onAccount: any;
113
121
  } ? Omit<Options, 'onAccount'> & {
122
+ /**
123
+ * Make operation on specific account by providing address (to use account from sdk) or instance
124
+ * of AccountBase (like MemoryAccount)
125
+ */
114
126
  onAccount: OnAccount;
115
127
  } : Options;
116
128
  type MakeOptional<Options> = OptionalIfNotRequired<[
@@ -1,3 +1,4 @@
1
+ import { OperationOptions } from '@azure/core-client';
1
2
  import { Node as NodeApi, NodeOptionalParams } from './apis/node';
2
3
  import { Encoded } from './utils/encoder';
3
4
  import { ConsensusProtocolVersion } from './tx/builder/constants';
@@ -14,6 +15,7 @@ declare const bigIntPropertyNames: readonly [
14
15
  "initiatorAmountFinal",
15
16
  "responderAmountFinal",
16
17
  "gasPrice",
18
+ "minGasPrice",
17
19
  "deposit"
18
20
  ];
19
21
  declare const numberPropertyNames: readonly [
@@ -36,7 +38,11 @@ declare const numberPropertyNames: readonly [
36
38
  "effectiveAtHeight",
37
39
  "version",
38
40
  "solutions",
39
- "round"
41
+ "round",
42
+ "minutes",
43
+ "utilization",
44
+ "difficulty",
45
+ "hashrate"
40
46
  ];
41
47
  type BigIntPropertyNames = typeof bigIntPropertyNames[number];
42
48
  type NumberPropertyNames = typeof numberPropertyNames[number];
@@ -76,6 +82,13 @@ export default class Node extends Node_base {
76
82
  retryCount?: number;
77
83
  retryOverallDelay?: number;
78
84
  });
85
+ _getCachedStatus(options?: OperationOptions): ReturnType<Node['getStatus']>;
86
+ /** @ts-expect-error use code generation to create node class? */
87
+ getStatus(...args: Parameters<InstanceType<NodeTransformedApi>['getStatus']>): ReturnType<InstanceType<NodeTransformedApi>['getStatus']>;
88
+ /**
89
+ * Returns network ID provided by node.
90
+ * This method won't do extra requests on subsequent calls.
91
+ */
79
92
  getNetworkId(): Promise<string>;
80
93
  getNodeInfo(): Promise<NodeInfo>;
81
94
  }
@@ -1,7 +1,7 @@
1
1
  import { Encoded } from '../utils/encoder';
2
2
  import Node from '../Node';
3
3
  import CompilerBase from '../contract/compiler/Base';
4
- import { AensName, Int } from '../tx/builder/constants';
4
+ import { AensName, ConsensusProtocolVersion, Int } from '../tx/builder/constants';
5
5
  import { AciValue, Domain } from '../utils/typed-data';
6
6
  interface AuthData {
7
7
  fee?: Int;
@@ -45,8 +45,8 @@ export default abstract class AccountBase {
45
45
  }): Promise<Uint8Array>;
46
46
  /**
47
47
  * Sign typed data
48
- * @param type - Type of data to sign
49
48
  * @param data - Encoded data to sign
49
+ * @param aci - Type of data to sign
50
50
  * @param options - Options
51
51
  * @returns Signature
52
52
  */
@@ -58,10 +58,15 @@ export default abstract class AccountBase {
58
58
  * Sign delegation of AENS, oracle operations to a contract
59
59
  * @param contractAddress - Address of a contract to delegate permissions to
60
60
  * @param options - Options
61
+ * @param options.isOracle - Use to generate an oracle delegation signature in Ceres, otherwise an
62
+ * AENS preclaim delegation signature would be generated
61
63
  * @returns Signature
64
+ * @deprecated use AccountBase:signDelegation in Ceres
62
65
  */
63
66
  signDelegationToContract(contractAddress: Encoded.ContractAddress, options?: {
64
67
  networkId?: string;
68
+ consensusProtocolVersion?: ConsensusProtocolVersion;
69
+ isOracle?: boolean;
65
70
  aeppOrigin?: string;
66
71
  aeppRpcClientId?: string;
67
72
  }): Promise<Encoded.Signature>;
@@ -71,9 +76,24 @@ export default abstract class AccountBase {
71
76
  * @param name - AENS name to manage by a contract
72
77
  * @param options - Options
73
78
  * @returns Signature
79
+ * @deprecated use AccountBase:signDelegation in Ceres
74
80
  */
75
81
  signNameDelegationToContract(contractAddress: Encoded.ContractAddress, name: AensName, options?: {
76
82
  networkId?: string;
83
+ consensusProtocolVersion?: ConsensusProtocolVersion;
84
+ aeppOrigin?: string;
85
+ aeppRpcClientId?: string;
86
+ }): Promise<Encoded.Signature>;
87
+ /**
88
+ * Sign delegation of all AENS names to a contract (not available in Iris)
89
+ * @param contractAddress - Address of a contract to delegate permissions to
90
+ * @param options - Options
91
+ * @returns Signature
92
+ * @deprecated use AccountBase:signDelegation in Ceres
93
+ */
94
+ signAllNamesDelegationToContract(contractAddress: Encoded.ContractAddress, options?: {
95
+ networkId?: string;
96
+ consensusProtocolVersion?: ConsensusProtocolVersion;
77
97
  aeppOrigin?: string;
78
98
  aeppRpcClientId?: string;
79
99
  }): Promise<Encoded.Signature>;
@@ -90,9 +110,11 @@ export default abstract class AccountBase {
90
110
  * @param oracleQueryId - Oracle query ID to reply by a contract
91
111
  * @param options - Options
92
112
  * @returns Signature
113
+ * @deprecated use AccountBase:signDelegation in Ceres
93
114
  */
94
115
  signOracleQueryDelegationToContract(contractAddress: Encoded.ContractAddress, oracleQueryId: Encoded.OracleQueryId, options?: {
95
116
  networkId?: string;
117
+ consensusProtocolVersion?: ConsensusProtocolVersion;
96
118
  aeppOrigin?: string;
97
119
  aeppRpcClientId?: string;
98
120
  }): Promise<Encoded.Signature>;
@@ -102,10 +124,24 @@ export default abstract class AccountBase {
102
124
  * @param options - Options
103
125
  * @returns Signature
104
126
  */
105
- abstract sign(data: string | Uint8Array, options?: any): Promise<Uint8Array>;
127
+ abstract sign(data: string | Uint8Array, options?: {
128
+ aeppOrigin?: string;
129
+ aeppRpcClientId?: string;
130
+ }): Promise<Uint8Array>;
106
131
  /**
107
132
  * Account address
108
133
  */
109
134
  readonly address: Encoded.AccountAddress;
135
+ /**
136
+ * Sign delegation, works only in Ceres
137
+ * @param delegation - Delegation to sign
138
+ * @param options - Options
139
+ * @returns Signature
140
+ */
141
+ signDelegation(delegation: Encoded.Bytearray, options?: {
142
+ networkId?: string;
143
+ aeppOrigin?: string;
144
+ aeppRpcClientId?: string;
145
+ }): Promise<Encoded.Signature>;
110
146
  }
111
147
  export {};
@@ -15,6 +15,8 @@ export default class AccountGeneralized extends AccountBase {
15
15
  signTypedData(): Promise<Encoded.Signature>;
16
16
  signDelegationToContract(): Promise<Encoded.Signature>;
17
17
  signNameDelegationToContract(): Promise<Encoded.Signature>;
18
+ signAllNamesDelegationToContract(): Promise<Encoded.Signature>;
18
19
  signOracleQueryDelegationToContract(): Promise<Encoded.Signature>;
20
+ signDelegation(): Promise<Encoded.Signature>;
19
21
  signTransaction(tx: Encoded.Transaction, { authData, onCompiler, onNode }: Parameters<AccountBase['signTransaction']>[1]): Promise<Encoded.Transaction>;
20
22
  }
@@ -23,7 +23,9 @@ export default class AccountLedger extends AccountBase {
23
23
  signTypedData(): Promise<Encoded.Signature>;
24
24
  signDelegationToContract(): Promise<Encoded.Signature>;
25
25
  signNameDelegationToContract(): Promise<Encoded.Signature>;
26
+ signAllNamesDelegationToContract(): Promise<Encoded.Signature>;
26
27
  signOracleQueryDelegationToContract(): Promise<Encoded.Signature>;
28
+ signDelegation(): Promise<Encoded.Signature>;
27
29
  signTransaction(tx: Encoded.Transaction, { innerTx, networkId }?: {
28
30
  innerTx?: boolean;
29
31
  networkId?: string;
@@ -1,7 +1,7 @@
1
1
  import AccountBase from './Base';
2
2
  import { Encoded } from '../utils/encoder';
3
3
  import { AciValue } from '../utils/typed-data';
4
- import { AensName } from '../tx/builder/constants';
4
+ import { AensName, ConsensusProtocolVersion } from '../tx/builder/constants';
5
5
  export declare function getBufferToSign(transaction: Encoded.Transaction, networkId: string, innerTx: boolean): Uint8Array;
6
6
  /**
7
7
  * In-memory account class
@@ -23,13 +23,24 @@ export default class AccountMemory extends AccountBase {
23
23
  }): Promise<Encoded.Transaction>;
24
24
  signMessage(message: string, options?: any): Promise<Uint8Array>;
25
25
  signTypedData(data: Encoded.ContractBytearray, aci: AciValue, { name, version, networkId, contractAddress, ...options }?: Parameters<AccountBase['signTypedData']>[2]): Promise<Encoded.Signature>;
26
- signDelegationToContract(contractAddress: Encoded.ContractAddress, { networkId }?: {
26
+ signDelegationToContract(contractAddress: Encoded.ContractAddress, { networkId, consensusProtocolVersion, isOracle }?: {
27
27
  networkId?: string;
28
+ consensusProtocolVersion?: ConsensusProtocolVersion;
29
+ isOracle?: boolean;
28
30
  }): Promise<Encoded.Signature>;
29
- signNameDelegationToContract(contractAddress: Encoded.ContractAddress, name: AensName, { networkId }?: {
31
+ signNameDelegationToContract(contractAddress: Encoded.ContractAddress, name: AensName, { networkId, consensusProtocolVersion }?: {
30
32
  networkId?: string;
33
+ consensusProtocolVersion?: ConsensusProtocolVersion;
31
34
  }): Promise<Encoded.Signature>;
32
- signOracleQueryDelegationToContract(contractAddress: Encoded.ContractAddress, oracleQueryId: Encoded.OracleQueryId, { networkId }?: {
35
+ signAllNamesDelegationToContract(contractAddress: Encoded.ContractAddress, { networkId, consensusProtocolVersion }?: {
36
+ networkId?: string;
37
+ consensusProtocolVersion?: ConsensusProtocolVersion;
38
+ }): Promise<Encoded.Signature>;
39
+ signOracleQueryDelegationToContract(contractAddress: Encoded.ContractAddress, oracleQueryId: Encoded.OracleQueryId, { networkId, consensusProtocolVersion }?: {
40
+ networkId?: string;
41
+ consensusProtocolVersion?: ConsensusProtocolVersion;
42
+ }): Promise<Encoded.Signature>;
43
+ signDelegation(delegation: Encoded.Bytearray, { networkId }?: {
33
44
  networkId?: string;
34
45
  }): Promise<Encoded.Signature>;
35
46
  }