@aeternity/aepp-sdk 13.0.1 → 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 (258) 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 +26702 -16514
  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.mjs +1 -1
  83. package/es/contract/Contract.mjs.map +1 -1
  84. package/es/contract/compiler/Base.d.ts +21 -0
  85. package/es/contract/compiler/Base.mjs.map +1 -1
  86. package/es/contract/compiler/Cli.d.ts +2 -0
  87. package/es/contract/compiler/Cli.mjs +24 -3
  88. package/es/contract/compiler/Cli.mjs.map +1 -1
  89. package/es/contract/compiler/Http.d.ts +2 -0
  90. package/es/contract/compiler/Http.mjs +22 -2
  91. package/es/contract/compiler/Http.mjs.map +1 -1
  92. package/es/contract/compiler/HttpNode.d.ts +1 -0
  93. package/es/contract/compiler/HttpNode.mjs +5 -0
  94. package/es/contract/compiler/HttpNode.mjs.map +1 -1
  95. package/es/deprecated.d.ts +14 -0
  96. package/es/deprecated.mjs +22 -0
  97. package/es/deprecated.mjs.map +1 -0
  98. package/es/index-browser.d.ts +20 -14
  99. package/es/index-browser.mjs +19 -15
  100. package/es/index-browser.mjs.map +1 -1
  101. package/es/tx/builder/constants.d.ts +0 -1
  102. package/es/tx/builder/constants.mjs +0 -1
  103. package/es/tx/builder/constants.mjs.map +1 -1
  104. package/es/tx/builder/field-types/coin-amount.d.ts +1 -1
  105. package/es/tx/builder/field-types/coin-amount.mjs +2 -1
  106. package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
  107. package/es/tx/builder/field-types/deposit.d.ts +1 -1
  108. package/es/tx/builder/field-types/entry.mjs +2 -1
  109. package/es/tx/builder/field-types/entry.mjs.map +1 -1
  110. package/es/tx/builder/field-types/index.d.ts +2 -2
  111. package/es/tx/builder/helpers.d.ts +8 -1
  112. package/es/tx/builder/helpers.mjs +53 -9
  113. package/es/tx/builder/helpers.mjs.map +1 -1
  114. package/es/tx/builder/index.d.ts +4 -2
  115. package/es/tx/builder/index.mjs +0 -1
  116. package/es/tx/builder/index.mjs.map +1 -1
  117. package/es/tx/builder/schema.d.ts +9 -9
  118. package/es/tx/validator.mjs +6 -3
  119. package/es/tx/validator.mjs.map +1 -1
  120. package/es/utils/autorest.mjs +6 -8
  121. package/es/utils/autorest.mjs.map +1 -1
  122. package/es/utils/crypto.d.ts +1 -0
  123. package/es/utils/crypto.mjs +12 -2
  124. package/es/utils/crypto.mjs.map +1 -1
  125. package/es/utils/errors.d.ts +2 -2
  126. package/es/utils/errors.mjs.map +1 -1
  127. package/es/utils/other.d.ts +1 -0
  128. package/es/utils/other.mjs +5 -0
  129. package/es/utils/other.mjs.map +1 -1
  130. package/es/utils/typed-data.d.ts +45 -0
  131. package/es/utils/typed-data.mjs +71 -0
  132. package/es/utils/typed-data.mjs.map +1 -0
  133. package/package.json +23 -4
  134. package/src/AeSdkBase.ts +30 -5
  135. package/src/AeSdkMethods.ts +31 -50
  136. package/src/AeSdkWallet.ts +27 -5
  137. package/src/Middleware.ts +141 -0
  138. package/src/MiddlewareSubscriber.ts +207 -0
  139. package/src/Node.ts +1 -1
  140. package/src/account/Base.ts +20 -3
  141. package/src/account/Generalized.ts +5 -0
  142. package/src/account/Ledger.ts +5 -0
  143. package/src/account/Memory.ts +15 -0
  144. package/src/account/Rpc.ts +19 -7
  145. package/src/aens.ts +1 -1
  146. package/src/aepp-wallet-communication/rpc/RpcClient.ts +11 -3
  147. package/src/aepp-wallet-communication/rpc/types.ts +11 -0
  148. package/src/aepp-wallet-communication/schema.ts +2 -17
  149. package/src/aepp-wallet-communication/wallet-detector.ts +1 -2
  150. package/src/apis/compiler/compiler.ts +8 -1
  151. package/src/apis/compiler/models/index.ts +1 -8
  152. package/src/apis/compiler/models/mappers.ts +0 -36
  153. package/src/apis/middleware/index.ts +2 -0
  154. package/src/apis/middleware/middleware.ts +1807 -0
  155. package/src/apis/middleware/models/index.ts +1747 -0
  156. package/src/apis/middleware/models/mappers.ts +3370 -0
  157. package/src/apis/middleware/models/parameters.ts +463 -0
  158. package/src/chain.ts +3 -2
  159. package/src/channel/Base.ts +5 -5
  160. package/src/channel/internal.ts +2 -0
  161. package/src/contract/Contract.ts +1 -0
  162. package/src/contract/compiler/Base.ts +26 -0
  163. package/src/contract/compiler/Cli.ts +27 -3
  164. package/src/contract/compiler/Http.ts +21 -2
  165. package/src/contract/compiler/HttpNode.ts +6 -0
  166. package/src/deprecated.ts +23 -0
  167. package/src/index-browser.ts +77 -15
  168. package/src/tx/builder/constants.ts +0 -1
  169. package/src/tx/builder/field-types/coin-amount.ts +2 -1
  170. package/src/tx/builder/field-types/entry.ts +1 -1
  171. package/src/tx/builder/helpers.ts +54 -9
  172. package/src/tx/builder/index.ts +6 -9
  173. package/src/tx/validator.ts +4 -2
  174. package/src/utils/autorest.ts +5 -10
  175. package/src/utils/crypto.ts +12 -2
  176. package/src/utils/errors.ts +2 -2
  177. package/src/utils/other.ts +5 -0
  178. package/src/utils/typed-data.ts +95 -0
  179. package/types-legacy/ts4.2/AeSdkBase.d.ts +11 -3
  180. package/types-legacy/ts4.2/AeSdkMethods.d.ts +9 -14
  181. package/types-legacy/ts4.2/Middleware.d.ts +46 -0
  182. package/types-legacy/ts4.2/MiddlewareSubscriber.d.ts +30 -0
  183. package/types-legacy/ts4.2/Node.d.ts +1 -1
  184. package/types-legacy/ts4.2/account/Base.d.ts +14 -2
  185. package/types-legacy/ts4.2/account/Generalized.d.ts +1 -0
  186. package/types-legacy/ts4.2/account/Ledger.d.ts +1 -0
  187. package/types-legacy/ts4.2/account/Memory.d.ts +2 -0
  188. package/types-legacy/ts4.2/account/Rpc.d.ts +1 -6
  189. package/types-legacy/ts4.2/aens.d.ts +1 -1
  190. package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +10 -0
  191. package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +1 -8
  192. package/types-legacy/ts4.2/aepp-wallet-communication/wallet-detector.d.ts +1 -1
  193. package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +1 -7
  194. package/types-legacy/ts4.2/apis/compiler/models/mappers.d.ts +0 -1
  195. package/types-legacy/ts4.2/apis/middleware/index.d.ts +2 -0
  196. package/types-legacy/ts4.2/apis/middleware/middleware.d.ts +309 -0
  197. package/types-legacy/ts4.2/apis/middleware/models/index.d.ts +1496 -0
  198. package/types-legacy/ts4.2/apis/middleware/models/mappers.d.ts +102 -0
  199. package/types-legacy/ts4.2/apis/middleware/models/parameters.d.ts +43 -0
  200. package/types-legacy/ts4.2/chain.d.ts +2 -1
  201. package/types-legacy/ts4.2/channel/Base.d.ts +1 -1
  202. package/types-legacy/ts4.2/contract/compiler/Base.d.ts +21 -0
  203. package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +2 -0
  204. package/types-legacy/ts4.2/contract/compiler/Http.d.ts +2 -0
  205. package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +1 -0
  206. package/types-legacy/ts4.2/deprecated.d.ts +14 -0
  207. package/types-legacy/ts4.2/index-browser.d.ts +20 -14
  208. package/types-legacy/ts4.2/tx/builder/constants.d.ts +0 -1
  209. package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +1 -1
  210. package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +1 -1
  211. package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +2 -2
  212. package/types-legacy/ts4.2/tx/builder/helpers.d.ts +8 -1
  213. package/types-legacy/ts4.2/tx/builder/index.d.ts +4 -2
  214. package/types-legacy/ts4.2/tx/builder/schema.d.ts +9 -9
  215. package/types-legacy/ts4.2/utils/crypto.d.ts +1 -0
  216. package/types-legacy/ts4.2/utils/errors.d.ts +2 -2
  217. package/types-legacy/ts4.2/utils/other.d.ts +1 -0
  218. package/types-legacy/ts4.2/utils/typed-data.d.ts +60 -0
  219. package/types-legacy/ts4.5/AeSdkBase.d.ts +11 -3
  220. package/types-legacy/ts4.5/AeSdkMethods.d.ts +9 -14
  221. package/types-legacy/ts4.5/Middleware.d.ts +46 -0
  222. package/types-legacy/ts4.5/MiddlewareSubscriber.d.ts +30 -0
  223. package/types-legacy/ts4.5/Node.d.ts +1 -1
  224. package/types-legacy/ts4.5/account/Base.d.ts +14 -2
  225. package/types-legacy/ts4.5/account/Generalized.d.ts +1 -0
  226. package/types-legacy/ts4.5/account/Ledger.d.ts +1 -0
  227. package/types-legacy/ts4.5/account/Memory.d.ts +2 -0
  228. package/types-legacy/ts4.5/account/Rpc.d.ts +1 -6
  229. package/types-legacy/ts4.5/aens.d.ts +1 -1
  230. package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +10 -0
  231. package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +1 -8
  232. package/types-legacy/ts4.5/aepp-wallet-communication/wallet-detector.d.ts +1 -1
  233. package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +1 -7
  234. package/types-legacy/ts4.5/apis/compiler/models/mappers.d.ts +0 -1
  235. package/types-legacy/ts4.5/apis/middleware/index.d.ts +2 -0
  236. package/types-legacy/ts4.5/apis/middleware/middleware.d.ts +309 -0
  237. package/types-legacy/ts4.5/apis/middleware/models/index.d.ts +1496 -0
  238. package/types-legacy/ts4.5/apis/middleware/models/mappers.d.ts +102 -0
  239. package/types-legacy/ts4.5/apis/middleware/models/parameters.d.ts +43 -0
  240. package/types-legacy/ts4.5/chain.d.ts +2 -1
  241. package/types-legacy/ts4.5/channel/Base.d.ts +1 -1
  242. package/types-legacy/ts4.5/contract/compiler/Base.d.ts +21 -0
  243. package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +2 -0
  244. package/types-legacy/ts4.5/contract/compiler/Http.d.ts +2 -0
  245. package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +1 -0
  246. package/types-legacy/ts4.5/deprecated.d.ts +14 -0
  247. package/types-legacy/ts4.5/index-browser.d.ts +20 -14
  248. package/types-legacy/ts4.5/tx/builder/constants.d.ts +0 -1
  249. package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +1 -1
  250. package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +1 -1
  251. package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +2 -2
  252. package/types-legacy/ts4.5/tx/builder/helpers.d.ts +8 -1
  253. package/types-legacy/ts4.5/tx/builder/index.d.ts +4 -2
  254. package/types-legacy/ts4.5/tx/builder/schema.d.ts +9 -9
  255. package/types-legacy/ts4.5/utils/crypto.d.ts +1 -0
  256. package/types-legacy/ts4.5/utils/errors.d.ts +2 -2
  257. package/types-legacy/ts4.5/utils/other.d.ts +1 -0
  258. package/types-legacy/ts4.5/utils/typed-data.d.ts +60 -0
@@ -0,0 +1,46 @@
1
+ import { Middleware as MiddlewareApi, MiddlewareOptionalParams } from './apis/middleware';
2
+ import { Encoded } from './utils/encoder';
3
+ import { ConsensusProtocolVersion } from './tx/builder/constants';
4
+ declare const bigIntPropertyNames: readonly [
5
+ ];
6
+ declare const numberPropertyNames: readonly [
7
+ ];
8
+ type BigIntPropertyNames = typeof bigIntPropertyNames[number];
9
+ type NumberPropertyNames = typeof numberPropertyNames[number];
10
+ type PreserveOptional<NewType, OrigType> = OrigType extends undefined ? NewType | undefined : NewType;
11
+ export type TransformMiddlewareType<Type> = Type extends (...args: infer Args) => infer Ret ? (...args: TransformMiddlewareType<Args>) => TransformMiddlewareType<Ret> : Type extends [
12
+ infer Item,
13
+ ...infer Rest
14
+ ] ? [
15
+ TransformMiddlewareType<Item>,
16
+ ...TransformMiddlewareType<Rest>
17
+ ] : Type extends Array<infer Item> ? Array<TransformMiddlewareType<Item>> : Type extends Promise<infer T> ? Promise<TransformMiddlewareType<T>> : Type extends {
18
+ [P in any]: any;
19
+ } ? {
20
+ [Property in keyof Type]: Property extends BigIntPropertyNames ? PreserveOptional<bigint, Type[Property]> : Property extends NumberPropertyNames ? PreserveOptional<number, Type[Property]> : Property extends 'txHash' ? PreserveOptional<Encoded.TxHash, Type[Property]> : Property extends 'bytecode' ? PreserveOptional<Encoded.ContractBytearray, Type[Property]> : TransformMiddlewareType<Type[Property]>;
21
+ } : Type;
22
+ type MiddlewareTransformedApi = new (...args: ConstructorParameters<typeof MiddlewareApi>) => {
23
+ [Name in keyof InstanceType<typeof MiddlewareApi>]: Name extends 'pipeline' | 'sendRequest' | 'sendOperationRequest' ? MiddlewareApi[Name] : TransformMiddlewareType<MiddlewareApi[Name]>;
24
+ };
25
+ export interface MiddlewareInfo {
26
+ url: string;
27
+ nodeNetworkId: string;
28
+ version: string;
29
+ consensusProtocolVersion: ConsensusProtocolVersion;
30
+ }
31
+ declare const Middleware_base: MiddlewareTransformedApi;
32
+ export default class Middleware extends Middleware_base {
33
+ /**
34
+ * @param url - Url for middleware API
35
+ * @param options - Options
36
+ * @param options.ignoreVersion - Don't check node version
37
+ * @param options.retryCount - Amount of extra requests to do in case of failure
38
+ * @param options.retryOverallDelay - Time in ms to wait between all retries
39
+ */
40
+ constructor(url: string, { ignoreVersion, retryCount, retryOverallDelay, ...options }?: MiddlewareOptionalParams & {
41
+ ignoreVersion?: boolean;
42
+ retryCount?: number;
43
+ retryOverallDelay?: number;
44
+ });
45
+ }
46
+ export {};
@@ -0,0 +1,30 @@
1
+ /// <reference types="ws" />
2
+ import WebSocket from 'isomorphic-ws';
3
+ import { BaseError } from './utils/errors';
4
+ import { Encoded } from './utils/encoder';
5
+ export declare class MiddlewareSubscriberError extends BaseError {
6
+ constructor(message: string);
7
+ }
8
+ export declare class MiddlewareSubscriberDisconnected extends MiddlewareSubscriberError {
9
+ readonly closeEvent: WebSocket.CloseEvent;
10
+ constructor(closeEvent: WebSocket.CloseEvent);
11
+ }
12
+ export default class MiddlewareSubscriber {
13
+ #private;
14
+ readonly url: string;
15
+ get webSocket(): WebSocket | undefined;
16
+ constructor(url: string);
17
+ reconnect(): Promise<void>;
18
+ subscribeKeyBlocks(cb: (p?: any, e?: Error) => void): () => void;
19
+ subscribeKeyBlocksNode(cb: (p?: any, e?: Error) => void): () => void;
20
+ subscribeKeyBlocksAll(cb: (p?: any, e?: Error) => void): () => void;
21
+ subscribeMicroBlocks(cb: (p?: any, e?: Error) => void): () => void;
22
+ subscribeMicroBlocksNode(cb: (p?: any, e?: Error) => void): () => void;
23
+ subscribeMicroBlocksAll(cb: (p?: any, e?: Error) => void): () => void;
24
+ subscribeTransactions(cb: (p?: any, e?: Error) => void): () => void;
25
+ subscribeTransactionsNode(cb: (p?: any, e?: Error) => void): () => void;
26
+ subscribeTransactionsAll(cb: (p?: any, e?: Error) => void): () => void;
27
+ subscribeObject(target: Encoded.KeyBlockHash | Encoded.Channel | Encoded.ContractAddress | Encoded.OracleAddress | Encoded.OracleQueryId | Encoded.AccountAddress | Encoded.Name | `${string}.chain`, cb: (p?: any, e?: Error) => void): () => void;
28
+ subscribeObjectNode(target: Encoded.KeyBlockHash | Encoded.Channel | Encoded.ContractAddress | Encoded.OracleAddress | Encoded.OracleQueryId | Encoded.AccountAddress | Encoded.Name | `${string}.chain`, cb: (p?: any, e?: Error) => void): () => void;
29
+ subscribeObjectAll(target: Encoded.KeyBlockHash | Encoded.Channel | Encoded.ContractAddress | Encoded.OracleAddress | Encoded.OracleQueryId | Encoded.AccountAddress | Encoded.Name | `${string}.chain`, cb: (p?: any, e?: Error) => void): () => void;
30
+ }
@@ -55,7 +55,7 @@ export type TransformNodeType<Type> = Type extends (...args: infer Args) => infe
55
55
  type NodeTransformedApi = new (...args: ConstructorParameters<typeof NodeApi>) => {
56
56
  [Name in keyof InstanceType<typeof NodeApi>]: Name extends 'pipeline' | 'sendRequest' | 'sendOperationRequest' ? NodeApi[Name] : TransformNodeType<NodeApi[Name]>;
57
57
  };
58
- export interface NodeInfo {
58
+ interface NodeInfo {
59
59
  url: string;
60
60
  nodeNetworkId: string;
61
61
  version: string;
@@ -2,6 +2,7 @@ import { Encoded } from '../utils/encoder';
2
2
  import Node from '../Node';
3
3
  import CompilerBase from '../contract/compiler/Base';
4
4
  import { Int } from '../tx/builder/constants';
5
+ import { AciValue, Domain } from '../utils/typed-data';
5
6
  interface AuthData {
6
7
  fee?: Int;
7
8
  gasLimit?: number;
@@ -36,17 +37,28 @@ export default abstract class AccountBase {
36
37
  * Sign message
37
38
  * @param message - Message to sign
38
39
  * @param options - Options
39
- * @returns Signature as hex string of Uint8Array
40
+ * @returns Signature
40
41
  */
41
42
  abstract signMessage(message: string, options?: {
42
43
  aeppOrigin?: string;
43
44
  aeppRpcClientId?: string;
44
45
  }): Promise<Uint8Array>;
46
+ /**
47
+ * Sign typed data
48
+ * @param type - Type of data to sign
49
+ * @param data - Encoded data to sign
50
+ * @param options - Options
51
+ * @returns Signature
52
+ */
53
+ abstract signTypedData(data: Encoded.ContractBytearray, aci: AciValue, options?: Domain & {
54
+ aeppOrigin?: string;
55
+ aeppRpcClientId?: string;
56
+ }): Promise<Encoded.Signature>;
45
57
  /**
46
58
  * Sign data blob
47
59
  * @param data - Data blob to sign
48
60
  * @param options - Options
49
- * @returns Signed data blob
61
+ * @returns Signature
50
62
  */
51
63
  abstract sign(data: string | Uint8Array, options?: any): Promise<Uint8Array>;
52
64
  /**
@@ -12,5 +12,6 @@ export default class AccountGeneralized extends AccountBase {
12
12
  constructor(address: Encoded.AccountAddress);
13
13
  sign(): Promise<Uint8Array>;
14
14
  signMessage(): Promise<Uint8Array>;
15
+ signTypedData(): Promise<Encoded.Signature>;
15
16
  signTransaction(tx: Encoded.Transaction, { authData, onCompiler, onNode }: Parameters<AccountBase['signTransaction']>[1]): Promise<Encoded.Transaction>;
16
17
  }
@@ -20,6 +20,7 @@ export default class AccountLedger extends AccountBase {
20
20
  */
21
21
  constructor(transport: Transport, index: number, address: Encoded.AccountAddress);
22
22
  sign(): Promise<Uint8Array>;
23
+ signTypedData(): Promise<Encoded.Signature>;
23
24
  signTransaction(tx: Encoded.Transaction, { innerTx, networkId }?: {
24
25
  innerTx?: boolean;
25
26
  networkId?: string;
@@ -1,5 +1,6 @@
1
1
  import AccountBase from './Base';
2
2
  import { Encoded } from '../utils/encoder';
3
+ import { AciValue } from '../utils/typed-data';
3
4
  export declare function getBufferToSign(transaction: Encoded.Transaction, networkId: string, innerTx: boolean): Uint8Array;
4
5
  /**
5
6
  * In-memory account class
@@ -20,4 +21,5 @@ export default class AccountMemory extends AccountBase {
20
21
  networkId?: string;
21
22
  }): Promise<Encoded.Transaction>;
22
23
  signMessage(message: string, options?: any): Promise<Uint8Array>;
24
+ signTypedData(data: Encoded.ContractBytearray, aci: AciValue, { name, version, networkId, contractAddress, ...options }?: Parameters<AccountBase['signTypedData']>[2]): Promise<Encoded.Signature>;
23
25
  }
@@ -14,12 +14,7 @@ export default class AccountRpc extends AccountBase {
14
14
  readonly address: Encoded.AccountAddress;
15
15
  constructor(rpcClient: RpcClient<WalletApi, AeppApi>, address: Encoded.AccountAddress);
16
16
  sign(): Promise<Uint8Array>;
17
- /**
18
- * @returns Signed transaction
19
- */
20
17
  signTransaction(tx: Encoded.Transaction, { innerTx, networkId }?: Parameters<AccountBase['signTransaction']>[1]): Promise<Encoded.Transaction>;
21
- /**
22
- * @returns Signed message
23
- */
24
18
  signMessage(message: string): Promise<Uint8Array>;
19
+ signTypedData(data: Encoded.ContractBytearray, aci: Parameters<AccountBase['signTypedData']>[1], { name, version, contractAddress, networkId, }?: Parameters<AccountBase['signTypedData']>[2]): Promise<Encoded.Signature>;
25
20
  }
@@ -211,7 +211,7 @@ interface AensPreclaimOptions extends BuildTxOptions<Tag.NamePreclaimTx, 'accoun
211
211
  * @example
212
212
  * ```js
213
213
  * const name = 'test.chain'
214
- * const bidFee = computeBidFee(name, startFee, incrementPercentage)
214
+ * const bidFee = computeBidFee(name, { startFee, increment: 0.42 })
215
215
  *
216
216
  * await sdkInstance.aensBid(name, 213109412839123, { ttl, fee, nonce })
217
217
  * ```
@@ -1,4 +1,5 @@
1
1
  import { Encoded } from '../../utils/encoder';
2
+ import { Domain, AciValue } from '../../utils/typed-data';
2
3
  import { METHODS, SUBSCRIPTION_TYPES, WALLET_TYPE } from '../schema';
3
4
  import { TransformNodeType } from '../../Node';
4
5
  import { SignedTx } from '../../apis/node';
@@ -60,6 +61,7 @@ export interface WalletApi {
60
61
  * @see {@link https://github.com/aeternity/aepp-sdk-js/commit/153fd89a52c4eab39fcd659b356b36d32129c1ba}
61
62
  */
62
63
  networkId: string;
64
+ innerTx?: boolean;
63
65
  }) => Promise<{
64
66
  /**
65
67
  * @deprecated this is not a hash at all, will be removed later at the same time
@@ -77,6 +79,14 @@ export interface WalletApi {
77
79
  }) => Promise<{
78
80
  signature: string;
79
81
  }>;
82
+ [METHODS.signTypedData]: (p: {
83
+ domain: Domain;
84
+ aci: AciValue;
85
+ data: Encoded.ContractBytearray;
86
+ onAccount: Encoded.AccountAddress;
87
+ }) => Promise<{
88
+ signature: Encoded.Signature;
89
+ }>;
80
90
  }
81
91
  export interface AeppApi {
82
92
  [METHODS.updateAddress]: (a: Accounts) => void;
@@ -31,6 +31,7 @@ export declare const enum METHODS {
31
31
  connect = "connection.open",
32
32
  sign = "transaction.sign",
33
33
  signMessage = "message.sign",
34
+ signTypedData = "typedData.sign",
34
35
  subscribeAddress = "address.subscribe",
35
36
  updateNetwork = "networkId.update",
36
37
  closeConnection = "connection.close"
@@ -66,14 +67,6 @@ export declare class RpcInvalidTransactionError extends RpcError {
66
67
  code: number;
67
68
  constructor(data?: any);
68
69
  }
69
- /**
70
- * @category exception
71
- */
72
- export declare class RpcBroadcastError extends RpcError {
73
- static code: number;
74
- code: number;
75
- constructor(data?: any);
76
- }
77
70
  /**
78
71
  * @category exception
79
72
  */
@@ -20,6 +20,6 @@ interface Wallets {
20
20
  */
21
21
  declare const _default: (connection: BrowserConnection, onDetected: ({ wallets, newWallet }: {
22
22
  wallets: Wallets;
23
- newWallet?: Wallet | undefined;
23
+ newWallet: Wallet;
24
24
  }) => void) => () => void;
25
25
  export default _default;
@@ -9,12 +9,6 @@ export interface CompileOpts {
9
9
  /** Name of contract source file - only used in error messages */
10
10
  srcFile?: string;
11
11
  }
12
- export interface Aci {
13
- /** Any object */
14
- encodedAci: Record<string, unknown>;
15
- externalEncodedAci?: Record<string, unknown>[];
16
- interface: string;
17
- }
18
12
  export interface CompilerError {
19
13
  type: string;
20
14
  pos: ErrorPos;
@@ -127,7 +121,7 @@ export interface SophiaJsonData {
127
121
  export interface GenerateACIOptionalParams extends coreClient.OperationOptions {
128
122
  }
129
123
  /** Contains response data for the generateACI operation. */
130
- export type GenerateACIResponse = Aci;
124
+ export type GenerateACIResponse = Record<string, unknown>[];
131
125
  /** Optional parameters. */
132
126
  export interface CompileContractOptionalParams extends coreClient.OperationOptions {
133
127
  }
@@ -1,7 +1,6 @@
1
1
  import * as coreClient from "@azure/core-client";
2
2
  export declare const Contract: coreClient.CompositeMapper;
3
3
  export declare const CompileOpts: coreClient.CompositeMapper;
4
- export declare const Aci: coreClient.CompositeMapper;
5
4
  export declare const CompilerError: coreClient.CompositeMapper;
6
5
  export declare const ErrorPos: coreClient.CompositeMapper;
7
6
  export declare const CompileResult: coreClient.CompositeMapper;
@@ -0,0 +1,2 @@
1
+ export * from "./models";
2
+ export { Middleware } from "./middleware";
@@ -0,0 +1,309 @@
1
+ import * as coreClient from "@azure/core-client";
2
+ import { Enum1, MiddlewareOptionalParams, GetAccountActivitiesOptionalParams, GetAccountActivitiesResponse, GetSortedAex141ContractsOptionalParams, GetSortedAex141ContractsResponse, GetAex141OwnedTokensOptionalParams, GetAex141OwnedTokensResponse, GetAex141TokenOwnerOptionalParams, GetAex141TokenOwnerResponse, GetAex141ContractOwnersOptionalParams, GetAex141ContractOwnersResponse, GetAex141ContractTemplatesOptionalParams, GetAex141ContractTemplatesResponse, GetAex141TemplateTokensOptionalParams, GetAex141TemplateTokensResponse, GetAex141ByContractOptionalParams, GetAex141ByContractResponse, GetSortedAex9TokensOptionalParams, GetSortedAex9TokensResponse, GetAex9AccountBalancesOptionalParams, GetAex9AccountBalancesResponse, GetAex9TokensCountOptionalParams, GetAex9TokensCountResponse, GetAex9PairTransfersOptionalParams, GetAex9PairTransfersResponse, GetAex9SenderTransfersOptionalParams, GetAex9SenderTransfersResponse, GetAex9RecipientTransfersOptionalParams, GetAex9RecipientTransfersResponse, GetAex9ContractBalancesOptionalParams, GetAex9ContractBalancesResponse, GetAex9ContractAccountBalanceOptionalParams, GetAex9ContractAccountBalanceResponse, GetAex9ContractAccountBalanceHistoryOptionalParams, GetAex9ContractAccountBalanceHistoryResponse, GetAex9LogsCountOptionalParams, GetAex9LogsCountResponse, GetAex9ByContractOptionalParams, GetAex9ByContractResponse, GetBlocksOptionalParams, GetBlocksResponse, GetBlockOptionalParams, GetBlockResponse, GetBlockByMbiOptionalParams, GetBlockByMbiResponse, GetChannelsOptionalParams, GetChannelsResponse, GetChannelOptionalParams, GetChannelResponse, GetContractsCallsOptionalParams, GetContractsCallsResponse, GetContractsLogsOptionalParams, GetContractsLogsResponse, GetDeltastatsOptionalParams, GetDeltastatsResponse, GetKeyBlocksOptionalParams, GetKeyBlocksResponse, GetKeyBlockOptionalParams, GetKeyBlockResponse, GetKeyBlockMicroBlocksOptionalParams, GetKeyBlockMicroBlocksResponse, GetMicroBlockOptionalParams, GetMicroBlockResponse, GetMicroBlockTransactionsOptionalParams, GetMicroBlockTransactionsResponse, GetNamesOptionalParams, GetNamesResponse, GetNamesAuctionsOptionalParams, GetNamesAuctionsResponse, SearchNamesOptionalParams, SearchNamesResponse, GetNameOptionalParams, GetNameResponse, GetNameAuctionOptionalParams, GetNameAuctionResponse, GetNameClaimsOptionalParams, GetNameClaimsResponse, GetNamePointeesOptionalParams, GetNamePointeesResponse, GetNamePointersOptionalParams, GetNamePointersResponse, GetNameTransfersOptionalParams, GetNameTransfersResponse, GetNameUpdatesOptionalParams, GetNameUpdatesResponse, GetOracleOptionalParams, GetOracleResponse, GetOraclesOptionalParams, GetOraclesResponse, GetStatusOptionalParams, GetStatusResponse, GetTotalstatsOptionalParams, GetTotalstatsResponse, GetTransfersOptionalParams, GetTransfersResponse, GetTxsOptionalParams, GetTxsResponse, GetTxCountOptionalParams, GetTxCountResponse, GetTxCountByIdOptionalParams, GetTxCountByIdResponse, GetTxOptionalParams, GetTxResponse } from "./models";
3
+ export declare class Middleware extends coreClient.ServiceClient {
4
+ $host: string;
5
+ limit?: number;
6
+ scope?: string;
7
+ direction?: Enum1;
8
+ /**
9
+ * Initializes a new instance of the Middleware class.
10
+ * @param $host server parameter
11
+ * @param options The parameter options
12
+ */
13
+ constructor($host: string, options?: MiddlewareOptionalParams);
14
+ /**
15
+ * Get an account activities.
16
+ * @param id The account address
17
+ * @param options The options parameters.
18
+ */
19
+ getAccountActivities(id: string, options?: GetAccountActivitiesOptionalParams): Promise<GetAccountActivitiesResponse>;
20
+ /**
21
+ * Get AEX141 contracts sorted by name or symbol.
22
+ * @param options The options parameters.
23
+ */
24
+ getSortedAex141Contracts(options?: GetSortedAex141ContractsOptionalParams): Promise<GetSortedAex141ContractsResponse>;
25
+ /**
26
+ * Get tokens owned by an account.
27
+ * @param accountId The account id
28
+ * @param options The options parameters.
29
+ */
30
+ getAex141OwnedTokens(accountId: string, options?: GetAex141OwnedTokensOptionalParams): Promise<GetAex141OwnedTokensResponse>;
31
+ /**
32
+ * Get owner of a NFT (AEX-141 token).
33
+ * @param contractId The contract id
34
+ * @param tokenId The nft token id
35
+ * @param options The options parameters.
36
+ */
37
+ getAex141TokenOwner(contractId: string, tokenId: number, options?: GetAex141TokenOwnerOptionalParams): Promise<GetAex141TokenOwnerResponse>;
38
+ /**
39
+ * Get owners of tokens of a AEX-141 contract.
40
+ * @param contractId The contract id
41
+ * @param options The options parameters.
42
+ */
43
+ getAex141ContractOwners(contractId: string, options?: GetAex141ContractOwnersOptionalParams): Promise<GetAex141ContractOwnersResponse>;
44
+ /**
45
+ * Get templates AEX-141 contract tokens.
46
+ * @param contractId The contract id
47
+ * @param options The options parameters.
48
+ */
49
+ getAex141ContractTemplates(contractId: string, options?: GetAex141ContractTemplatesOptionalParams): Promise<GetAex141ContractTemplatesResponse>;
50
+ /**
51
+ * Get AEX-141 template tokens.
52
+ * @param contractId Contract id
53
+ * @param templateId Template id
54
+ * @param options The options parameters.
55
+ */
56
+ getAex141TemplateTokens(contractId: string, templateId: number, options?: GetAex141TemplateTokensOptionalParams): Promise<GetAex141TemplateTokensResponse>;
57
+ /**
58
+ * Get AEX141 contract meta-info, extensions, limits and stats.
59
+ * @param id The contract id
60
+ * @param options The options parameters.
61
+ */
62
+ getAex141ByContract(id: string, options?: GetAex141ByContractOptionalParams): Promise<GetAex141ByContractResponse>;
63
+ /**
64
+ * Get AEX9 tokens sorted by name or symbol.
65
+ * @param options The options parameters.
66
+ */
67
+ getSortedAex9Tokens(options?: GetSortedAex9TokensOptionalParams): Promise<GetSortedAex9TokensResponse>;
68
+ /**
69
+ * Get all AEX9 balances for an account on the last block.
70
+ * @param accountId Account id
71
+ * @param options The options parameters.
72
+ */
73
+ getAex9AccountBalances(accountId: string, options?: GetAex9AccountBalancesOptionalParams): Promise<GetAex9AccountBalancesResponse>;
74
+ /**
75
+ * Get AEX9 tokens count.
76
+ * @param options The options parameters.
77
+ */
78
+ getAex9TokensCount(options?: GetAex9TokensCountOptionalParams): Promise<GetAex9TokensCountResponse>;
79
+ /**
80
+ * Get AEX9 transfers filtered by sender and recipient.
81
+ * @param sender Sender account id
82
+ * @param recipient Recipient account id
83
+ * @param options The options parameters.
84
+ */
85
+ getAex9PairTransfers(sender: string, recipient: string, options?: GetAex9PairTransfersOptionalParams): Promise<GetAex9PairTransfersResponse>;
86
+ /**
87
+ * Get AEX9 transfers filtered by sender.
88
+ * @param id Sender account id
89
+ * @param options The options parameters.
90
+ */
91
+ getAex9SenderTransfers(id: string, options?: GetAex9SenderTransfersOptionalParams): Promise<GetAex9SenderTransfersResponse>;
92
+ /**
93
+ * Get AEX9 transfers filtered by recipient.
94
+ * @param id Recipient account id
95
+ * @param options The options parameters.
96
+ */
97
+ getAex9RecipientTransfers(id: string, options?: GetAex9RecipientTransfersOptionalParams): Promise<GetAex9RecipientTransfersResponse>;
98
+ /**
99
+ * Get AEX9 balances on a contract.
100
+ * @param contractId Contract id
101
+ * @param options The options parameters.
102
+ */
103
+ getAex9ContractBalances(contractId: string, options?: GetAex9ContractBalancesOptionalParams): Promise<GetAex9ContractBalancesResponse>;
104
+ /**
105
+ * Get AEX9 balance for an account on a contract.
106
+ * @param contractId Contract id
107
+ * @param accountId Account id
108
+ * @param hash Block hash
109
+ * @param options The options parameters.
110
+ */
111
+ getAex9ContractAccountBalance(contractId: string, accountId: string, hash: string, options?: GetAex9ContractAccountBalanceOptionalParams): Promise<GetAex9ContractAccountBalanceResponse>;
112
+ /**
113
+ * Get AEX9 account balance on a contract throughout all heights when changed.
114
+ * @param contractId Contract id
115
+ * @param accountId Account id
116
+ * @param options The options parameters.
117
+ */
118
+ getAex9ContractAccountBalanceHistory(contractId: string, accountId: string, options?: GetAex9ContractAccountBalanceHistoryOptionalParams): Promise<GetAex9ContractAccountBalanceHistoryResponse>;
119
+ /**
120
+ * Get AEX9 token events count.
121
+ * @param contractId Contract id
122
+ * @param options The options parameters.
123
+ */
124
+ getAex9LogsCount(contractId: string, options?: GetAex9LogsCountOptionalParams): Promise<GetAex9LogsCountResponse>;
125
+ /**
126
+ * Get AEX9 creation and meta_info information by contract id.
127
+ * @param id The contract id
128
+ * @param options The options parameters.
129
+ */
130
+ getAex9ByContract(id: string, options?: GetAex9ByContractOptionalParams): Promise<GetAex9ByContractResponse>;
131
+ /**
132
+ * Get multiple blocks.
133
+ * @param options The options parameters.
134
+ */
135
+ getBlocks(options?: GetBlocksOptionalParams): Promise<GetBlocksResponse>;
136
+ /**
137
+ * Get a single block.
138
+ * @param hashOrKbi The block encoded hash or key block index
139
+ * @param options The options parameters.
140
+ */
141
+ getBlock(hashOrKbi: string, options?: GetBlockOptionalParams): Promise<GetBlockResponse>;
142
+ /**
143
+ * Get a single block.
144
+ * @param kbi The block key block index
145
+ * @param mbi The block micro block index, starting from 0
146
+ * @param options The options parameters.
147
+ */
148
+ getBlockByMbi(kbi: number, mbi: number, options?: GetBlockByMbiOptionalParams): Promise<GetBlockByMbiResponse>;
149
+ /**
150
+ * Get multiple channels.
151
+ * @param options The options parameters.
152
+ */
153
+ getChannels(options?: GetChannelsOptionalParams): Promise<GetChannelsResponse>;
154
+ /**
155
+ * Get a single channel.
156
+ * @param id The channel
157
+ * @param options The options parameters.
158
+ */
159
+ getChannel(id: string, options?: GetChannelOptionalParams): Promise<GetChannelResponse>;
160
+ /**
161
+ * Get contract calls.
162
+ * @param options The options parameters.
163
+ */
164
+ getContractsCalls(options?: GetContractsCallsOptionalParams): Promise<GetContractsCallsResponse>;
165
+ /**
166
+ * Get contract logs.
167
+ * @param options The options parameters.
168
+ */
169
+ getContractsLogs(options?: GetContractsLogsOptionalParams): Promise<GetContractsLogsResponse>;
170
+ /**
171
+ * Get delta stats.
172
+ * @param options The options parameters.
173
+ */
174
+ getDeltastats(options?: GetDeltastatsOptionalParams): Promise<GetDeltastatsResponse>;
175
+ /**
176
+ * Get multiple key blocks.
177
+ * @param options The options parameters.
178
+ */
179
+ getKeyBlocks(options?: GetKeyBlocksOptionalParams): Promise<GetKeyBlocksResponse>;
180
+ /**
181
+ * Get a single key block.
182
+ * @param hashOrKbi The key block encoded hash or key block index
183
+ * @param options The options parameters.
184
+ */
185
+ getKeyBlock(hashOrKbi: string, options?: GetKeyBlockOptionalParams): Promise<GetKeyBlockResponse>;
186
+ /**
187
+ * Get the key block micro blocks.
188
+ * @param hashOrKbi The key block encoded hash or key block index
189
+ * @param options The options parameters.
190
+ */
191
+ getKeyBlockMicroBlocks(hashOrKbi: string, options?: GetKeyBlockMicroBlocksOptionalParams): Promise<GetKeyBlockMicroBlocksResponse>;
192
+ /**
193
+ * Get a micro block
194
+ * @param hash The micro block encoded hash
195
+ * @param options The options parameters.
196
+ */
197
+ getMicroBlock(hash: string, options?: GetMicroBlockOptionalParams): Promise<GetMicroBlockResponse>;
198
+ /**
199
+ * Get a micro block transactions
200
+ * @param hash The micro block encoded hash
201
+ * @param options The options parameters.
202
+ */
203
+ getMicroBlockTransactions(hash: string, options?: GetMicroBlockTransactionsOptionalParams): Promise<GetMicroBlockTransactionsResponse>;
204
+ /**
205
+ * Get multiple names.
206
+ * @param options The options parameters.
207
+ */
208
+ getNames(options?: GetNamesOptionalParams): Promise<GetNamesResponse>;
209
+ /**
210
+ * Get multiple names.
211
+ * @param options The options parameters.
212
+ */
213
+ getNamesAuctions(options?: GetNamesAuctionsOptionalParams): Promise<GetNamesAuctionsResponse>;
214
+ /**
215
+ * Get multiple names.
216
+ * @param options The options parameters.
217
+ */
218
+ searchNames(options?: SearchNamesOptionalParams): Promise<SearchNamesResponse>;
219
+ /**
220
+ * Get a single name.
221
+ * @param id The name
222
+ * @param options The options parameters.
223
+ */
224
+ getName(id: string, options?: GetNameOptionalParams): Promise<GetNameResponse>;
225
+ /**
226
+ * Get name auction
227
+ * @param id The name
228
+ * @param options The options parameters.
229
+ */
230
+ getNameAuction(id: string, options?: GetNameAuctionOptionalParams): Promise<GetNameAuctionResponse>;
231
+ /**
232
+ * Get name claims
233
+ * @param id The name or name hash
234
+ * @param options The options parameters.
235
+ */
236
+ getNameClaims(id: string, options?: GetNameClaimsOptionalParams): Promise<GetNameClaimsResponse>;
237
+ /**
238
+ * Get name pointees
239
+ * @param id The name
240
+ * @param options The options parameters.
241
+ */
242
+ getNamePointees(id: string, options?: GetNamePointeesOptionalParams): Promise<GetNamePointeesResponse>;
243
+ /**
244
+ * Get name pointers
245
+ * @param id The name
246
+ * @param options The options parameters.
247
+ */
248
+ getNamePointers(id: string, options?: GetNamePointersOptionalParams): Promise<GetNamePointersResponse>;
249
+ /**
250
+ * Get name transfers
251
+ * @param id The name or name hash
252
+ * @param options The options parameters.
253
+ */
254
+ getNameTransfers(id: string, options?: GetNameTransfersOptionalParams): Promise<GetNameTransfersResponse>;
255
+ /**
256
+ * Get name updates
257
+ * @param id The name or name hash
258
+ * @param options The options parameters.
259
+ */
260
+ getNameUpdates(id: string, options?: GetNameUpdatesOptionalParams): Promise<GetNameUpdatesResponse>;
261
+ /**
262
+ * Get a single oracle.
263
+ * @param id The oracle
264
+ * @param options The options parameters.
265
+ */
266
+ getOracle(id: string, options?: GetOracleOptionalParams): Promise<GetOracleResponse>;
267
+ /**
268
+ * Get multiple oracles.
269
+ * @param options The options parameters.
270
+ */
271
+ getOracles(options?: GetOraclesOptionalParams): Promise<GetOraclesResponse>;
272
+ /**
273
+ * Gets the current syncing status of both middleware and the node
274
+ * @param options The options parameters.
275
+ */
276
+ getStatus(options?: GetStatusOptionalParams): Promise<GetStatusResponse>;
277
+ /**
278
+ * Get total accumulated stats.
279
+ * @param options The options parameters.
280
+ */
281
+ getTotalstats(options?: GetTotalstatsOptionalParams): Promise<GetTotalstatsResponse>;
282
+ /**
283
+ * Get multiple transfers.
284
+ * @param options The options parameters.
285
+ */
286
+ getTransfers(options?: GetTransfersOptionalParams): Promise<GetTransfersResponse>;
287
+ /**
288
+ * Get multiple transactions.
289
+ * @param options The options parameters.
290
+ */
291
+ getTxs(options?: GetTxsOptionalParams): Promise<GetTxsResponse>;
292
+ /**
293
+ * Get count of transactions at the latest height.
294
+ * @param options The options parameters.
295
+ */
296
+ getTxCount(options?: GetTxCountOptionalParams): Promise<GetTxCountResponse>;
297
+ /**
298
+ * Get transactions count and its type for given aeternity ID.
299
+ * @param id The ID of the address/name/oracle/etc
300
+ * @param options The options parameters.
301
+ */
302
+ getTxCountById(id: string, options?: GetTxCountByIdOptionalParams): Promise<GetTxCountByIdResponse>;
303
+ /**
304
+ * Get a single transaction.
305
+ * @param hashOrIndex The transaction encoded hash or index (txi)
306
+ * @param options The options parameters.
307
+ */
308
+ getTx(hashOrIndex: string, options?: GetTxOptionalParams): Promise<GetTxResponse>;
309
+ }