@taquito/wallet-connect 24.3.0-beta.2 → 24.3.0-beta.3

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 (443) hide show
  1. package/dist/lib/{taquito-wallet-connect/src/taquito-wallet-connect.js → taquito-wallet-connect.js} +1 -4
  2. package/dist/lib/{taquito-http-utils/src/version.js → version.js} +2 -2
  3. package/package.json +5 -7
  4. package/dist/lib/taquito/src/batch/constants.js +0 -16
  5. package/dist/lib/taquito/src/batch/rpc-batch-provider.js +0 -327
  6. package/dist/lib/taquito/src/constants.js +0 -135
  7. package/dist/lib/taquito/src/context.js +0 -178
  8. package/dist/lib/taquito/src/contract/big-map.js +0 -57
  9. package/dist/lib/taquito/src/contract/compose.js +0 -6
  10. package/dist/lib/taquito/src/contract/constants.js +0 -4
  11. package/dist/lib/taquito/src/contract/contract-methods/contract-method-factory.js +0 -18
  12. package/dist/lib/taquito/src/contract/contract-methods/contract-method-interface.js +0 -2
  13. package/dist/lib/taquito/src/contract/contract-methods/contract-method-object-param.js +0 -72
  14. package/dist/lib/taquito/src/contract/contract-methods/contract-on-chain-view.js +0 -111
  15. package/dist/lib/taquito/src/contract/contract.js +0 -158
  16. package/dist/lib/taquito/src/contract/errors.js +0 -140
  17. package/dist/lib/taquito/src/contract/index.js +0 -30
  18. package/dist/lib/taquito/src/contract/interface.js +0 -2
  19. package/dist/lib/taquito/src/contract/manager-lambda.js +0 -71
  20. package/dist/lib/taquito/src/contract/prepare.js +0 -231
  21. package/dist/lib/taquito/src/contract/rpc-contract-provider.js +0 -675
  22. package/dist/lib/taquito/src/contract/sapling-state-abstraction.js +0 -24
  23. package/dist/lib/taquito/src/contract/semantic.js +0 -43
  24. package/dist/lib/taquito/src/contract/view_lambda.js +0 -27
  25. package/dist/lib/taquito/src/errors.js +0 -42
  26. package/dist/lib/taquito/src/estimate/errors.js +0 -16
  27. package/dist/lib/taquito/src/estimate/estimate-provider-interface.js +0 -2
  28. package/dist/lib/taquito/src/estimate/estimate.js +0 -176
  29. package/dist/lib/taquito/src/estimate/index.js +0 -20
  30. package/dist/lib/taquito/src/estimate/rpc-estimate-provider.js +0 -640
  31. package/dist/lib/taquito/src/extension/extension.js +0 -2
  32. package/dist/lib/taquito/src/forger/composite-forger.js +0 -32
  33. package/dist/lib/taquito/src/forger/errors.js +0 -30
  34. package/dist/lib/taquito/src/forger/rpc-forger.js +0 -12
  35. package/dist/lib/taquito/src/forger/taquito-local-forger.js +0 -21
  36. package/dist/lib/taquito/src/global-constants/default-global-constants-provider.js +0 -35
  37. package/dist/lib/taquito/src/global-constants/errors.js +0 -30
  38. package/dist/lib/taquito/src/global-constants/interface-global-constants-provider.js +0 -2
  39. package/dist/lib/taquito/src/global-constants/noop-global-constants-provider.js +0 -10
  40. package/dist/lib/taquito/src/import-key.js +0 -40
  41. package/dist/lib/taquito/src/injector/helper.js +0 -18
  42. package/dist/lib/taquito/src/injector/interface.js +0 -2
  43. package/dist/lib/taquito/src/injector/rpc-injector.js +0 -27
  44. package/dist/lib/taquito/src/operations/ballot-operation.js +0 -32
  45. package/dist/lib/taquito/src/operations/batch-operation.js +0 -69
  46. package/dist/lib/taquito/src/operations/delegate-operation.js +0 -54
  47. package/dist/lib/taquito/src/operations/drain-delegate-operation.js +0 -31
  48. package/dist/lib/taquito/src/operations/errors.js +0 -133
  49. package/dist/lib/taquito/src/operations/failing-noop-operation.js +0 -2
  50. package/dist/lib/taquito/src/operations/increase-paid-storage-operation.js +0 -49
  51. package/dist/lib/taquito/src/operations/index.js +0 -54
  52. package/dist/lib/taquito/src/operations/operations.js +0 -193
  53. package/dist/lib/taquito/src/operations/origination-operation.js +0 -78
  54. package/dist/lib/taquito/src/operations/proposals-operation.js +0 -29
  55. package/dist/lib/taquito/src/operations/register-global-constant-operation.js +0 -52
  56. package/dist/lib/taquito/src/operations/reveal-operation.js +0 -74
  57. package/dist/lib/taquito/src/operations/smart-rollup-add-messages-operation.js +0 -44
  58. package/dist/lib/taquito/src/operations/smart-rollup-execute-outbox-message-operation.js +0 -53
  59. package/dist/lib/taquito/src/operations/smart-rollup-originate-operation.js +0 -50
  60. package/dist/lib/taquito/src/operations/transaction-operation.js +0 -73
  61. package/dist/lib/taquito/src/operations/transfer-ticket-operation.js +0 -47
  62. package/dist/lib/taquito/src/operations/types.js +0 -88
  63. package/dist/lib/taquito/src/operations/update-companion-key-operation.js +0 -55
  64. package/dist/lib/taquito/src/operations/update-consensus-key-operation.js +0 -55
  65. package/dist/lib/taquito/src/packer/interface.js +0 -2
  66. package/dist/lib/taquito/src/packer/michel-codec-packer.js +0 -11
  67. package/dist/lib/taquito/src/packer/rpc-packer.js +0 -12
  68. package/dist/lib/taquito/src/parser/interface.js +0 -2
  69. package/dist/lib/taquito/src/parser/michel-codec-parser.js +0 -110
  70. package/dist/lib/taquito/src/parser/noop-parser.js +0 -9
  71. package/dist/lib/taquito/src/prepare/index.js +0 -18
  72. package/dist/lib/taquito/src/prepare/interface.js +0 -2
  73. package/dist/lib/taquito/src/prepare/prepare-provider.js +0 -1049
  74. package/dist/lib/taquito/src/provider.js +0 -363
  75. package/dist/lib/taquito/src/read-provider/interface.js +0 -2
  76. package/dist/lib/taquito/src/read-provider/rpc-read-adapter.js +0 -183
  77. package/dist/lib/taquito/src/signer/errors.js +0 -17
  78. package/dist/lib/taquito/src/signer/noop.js +0 -23
  79. package/dist/lib/taquito/src/subscribe/create-observable-from-subscription.js +0 -20
  80. package/dist/lib/taquito/src/subscribe/errors.js +0 -30
  81. package/dist/lib/taquito/src/subscribe/filters.js +0 -96
  82. package/dist/lib/taquito/src/subscribe/interface.js +0 -2
  83. package/dist/lib/taquito/src/subscribe/observable-subscription.js +0 -79
  84. package/dist/lib/taquito/src/subscribe/polling-subcribe-provider.js +0 -118
  85. package/dist/lib/taquito/src/taquito.js +0 -404
  86. package/dist/lib/taquito/src/tz/interface.js +0 -2
  87. package/dist/lib/taquito/src/tz/rpc-tz-provider.js +0 -46
  88. package/dist/lib/taquito/src/version.js +0 -8
  89. package/dist/lib/taquito/src/wallet/batch-operation.js +0 -71
  90. package/dist/lib/taquito/src/wallet/delegation-operation.js +0 -42
  91. package/dist/lib/taquito/src/wallet/errors.js +0 -40
  92. package/dist/lib/taquito/src/wallet/increase-paid-storage-operation.js +0 -42
  93. package/dist/lib/taquito/src/wallet/index.js +0 -25
  94. package/dist/lib/taquito/src/wallet/interface.js +0 -2
  95. package/dist/lib/taquito/src/wallet/legacy.js +0 -51
  96. package/dist/lib/taquito/src/wallet/operation-factory.js +0 -88
  97. package/dist/lib/taquito/src/wallet/operation.js +0 -221
  98. package/dist/lib/taquito/src/wallet/origination-operation.js +0 -53
  99. package/dist/lib/taquito/src/wallet/receipt.js +0 -46
  100. package/dist/lib/taquito/src/wallet/register-global-constant-operation.js +0 -45
  101. package/dist/lib/taquito/src/wallet/transaction-operation.js +0 -38
  102. package/dist/lib/taquito/src/wallet/transfer-ticket-operation.js +0 -38
  103. package/dist/lib/taquito/src/wallet/wallet.js +0 -445
  104. package/dist/lib/taquito-core/src/errors.js +0 -351
  105. package/dist/lib/taquito-core/src/signer-interfaces.js +0 -2
  106. package/dist/lib/taquito-core/src/taquito-core.js +0 -22
  107. package/dist/lib/taquito-http-utils/src/errors.js +0 -103
  108. package/dist/lib/taquito-http-utils/src/status_code.js +0 -322
  109. package/dist/lib/taquito-http-utils/src/taquito-http-utils.js +0 -308
  110. package/dist/lib/taquito-http-utils/src/transport-errors.js +0 -141
  111. package/dist/lib/taquito-local-forging/src/codec.js +0 -543
  112. package/dist/lib/taquito-local-forging/src/constants.js +0 -291
  113. package/dist/lib/taquito-local-forging/src/decoder.js +0 -64
  114. package/dist/lib/taquito-local-forging/src/encoder.js +0 -63
  115. package/dist/lib/taquito-local-forging/src/errors.js +0 -179
  116. package/dist/lib/taquito-local-forging/src/interface.js +0 -2
  117. package/dist/lib/taquito-local-forging/src/michelson/codec.js +0 -283
  118. package/dist/lib/taquito-local-forging/src/protocols.js +0 -60
  119. package/dist/lib/taquito-local-forging/src/schema/operation.js +0 -259
  120. package/dist/lib/taquito-local-forging/src/taquito-local-forging.js +0 -117
  121. package/dist/lib/taquito-local-forging/src/uint8array-consumer.js +0 -35
  122. package/dist/lib/taquito-local-forging/src/utils.js +0 -18
  123. package/dist/lib/taquito-local-forging/src/validator.js +0 -57
  124. package/dist/lib/taquito-local-forging/src/version.js +0 -8
  125. package/dist/lib/taquito-michel-codec/src/base58.js +0 -255
  126. package/dist/lib/taquito-michel-codec/src/binary.js +0 -1271
  127. package/dist/lib/taquito-michel-codec/src/errors.js +0 -90
  128. package/dist/lib/taquito-michel-codec/src/formatters.js +0 -58
  129. package/dist/lib/taquito-michel-codec/src/global-constants.js +0 -12
  130. package/dist/lib/taquito-michel-codec/src/macros.js +0 -551
  131. package/dist/lib/taquito-michel-codec/src/micheline-emitter.js +0 -128
  132. package/dist/lib/taquito-michel-codec/src/micheline-parser.js +0 -402
  133. package/dist/lib/taquito-michel-codec/src/micheline.js +0 -5
  134. package/dist/lib/taquito-michel-codec/src/michelson-contract.js +0 -93
  135. package/dist/lib/taquito-michel-codec/src/michelson-typecheck.js +0 -1756
  136. package/dist/lib/taquito-michel-codec/src/michelson-types.js +0 -83
  137. package/dist/lib/taquito-michel-codec/src/michelson-validator.js +0 -833
  138. package/dist/lib/taquito-michel-codec/src/scan.js +0 -128
  139. package/dist/lib/taquito-michel-codec/src/taquito-michel-codec.js +0 -38
  140. package/dist/lib/taquito-michel-codec/src/utils.js +0 -323
  141. package/dist/lib/taquito-michel-codec/src/version.js +0 -8
  142. package/dist/lib/taquito-michelson-encoder/src/constants.js +0 -11
  143. package/dist/lib/taquito-michelson-encoder/src/errors.js +0 -38
  144. package/dist/lib/taquito-michelson-encoder/src/michelson-map.js +0 -201
  145. package/dist/lib/taquito-michelson-encoder/src/schema/errors.js +0 -127
  146. package/dist/lib/taquito-michelson-encoder/src/schema/event-schema.js +0 -52
  147. package/dist/lib/taquito-michelson-encoder/src/schema/parameter.js +0 -113
  148. package/dist/lib/taquito-michelson-encoder/src/schema/storage.js +0 -260
  149. package/dist/lib/taquito-michelson-encoder/src/schema/types.js +0 -2
  150. package/dist/lib/taquito-michelson-encoder/src/schema/view-schema.js +0 -90
  151. package/dist/lib/taquito-michelson-encoder/src/taquito-michelson-encoder.js +0 -36
  152. package/dist/lib/taquito-michelson-encoder/src/tokens/bigmap.js +0 -130
  153. package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-fr.js +0 -86
  154. package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-g1.js +0 -76
  155. package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-g2.js +0 -76
  156. package/dist/lib/taquito-michelson-encoder/src/tokens/chain-id.js +0 -78
  157. package/dist/lib/taquito-michelson-encoder/src/tokens/chest-key.js +0 -74
  158. package/dist/lib/taquito-michelson-encoder/src/tokens/chest.js +0 -74
  159. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/address.js +0 -116
  160. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/bool.js +0 -59
  161. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/bytes.js +0 -90
  162. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/int.js +0 -90
  163. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/key_hash.js +0 -90
  164. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/mutez.js +0 -90
  165. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/nat.js +0 -93
  166. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/string.js +0 -48
  167. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/timestamp.js +0 -66
  168. package/dist/lib/taquito-michelson-encoder/src/tokens/constant.js +0 -80
  169. package/dist/lib/taquito-michelson-encoder/src/tokens/contract.js +0 -86
  170. package/dist/lib/taquito-michelson-encoder/src/tokens/createToken.js +0 -35
  171. package/dist/lib/taquito-michelson-encoder/src/tokens/key.js +0 -97
  172. package/dist/lib/taquito-michelson-encoder/src/tokens/lambda.js +0 -55
  173. package/dist/lib/taquito-michelson-encoder/src/tokens/list.js +0 -85
  174. package/dist/lib/taquito-michelson-encoder/src/tokens/map.js +0 -112
  175. package/dist/lib/taquito-michelson-encoder/src/tokens/never.js +0 -61
  176. package/dist/lib/taquito-michelson-encoder/src/tokens/operation.js +0 -39
  177. package/dist/lib/taquito-michelson-encoder/src/tokens/option.js +0 -88
  178. package/dist/lib/taquito-michelson-encoder/src/tokens/or.js +0 -282
  179. package/dist/lib/taquito-michelson-encoder/src/tokens/pair.js +0 -233
  180. package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-state.js +0 -84
  181. package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-transaction-deprecated.js +0 -74
  182. package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-transaction.js +0 -74
  183. package/dist/lib/taquito-michelson-encoder/src/tokens/set.js +0 -82
  184. package/dist/lib/taquito-michelson-encoder/src/tokens/signature.js +0 -82
  185. package/dist/lib/taquito-michelson-encoder/src/tokens/ticket-deprecated.js +0 -92
  186. package/dist/lib/taquito-michelson-encoder/src/tokens/ticket.js +0 -92
  187. package/dist/lib/taquito-michelson-encoder/src/tokens/token.js +0 -100
  188. package/dist/lib/taquito-michelson-encoder/src/tokens/tokens.js +0 -75
  189. package/dist/lib/taquito-michelson-encoder/src/tokens/unit.js +0 -52
  190. package/dist/lib/taquito-michelson-encoder/src/version.js +0 -8
  191. package/dist/lib/taquito-rpc/src/opkind.js +0 -49
  192. package/dist/lib/taquito-rpc/src/rpc-client-interface.js +0 -60
  193. package/dist/lib/taquito-rpc/src/rpc-client-modules/rpc-cache.js +0 -1118
  194. package/dist/lib/taquito-rpc/src/taquito-rpc.js +0 -990
  195. package/dist/lib/taquito-rpc/src/types.js +0 -114
  196. package/dist/lib/taquito-rpc/src/utils/utils.js +0 -65
  197. package/dist/lib/taquito-rpc/src/version.js +0 -8
  198. package/dist/lib/taquito-signer/src/bls-key.js +0 -104
  199. package/dist/lib/taquito-signer/src/derivation-tools/ecdsa.js +0 -156
  200. package/dist/lib/taquito-signer/src/derivation-tools/ed25519.js +0 -82
  201. package/dist/lib/taquito-signer/src/derivation-tools/index.js +0 -79
  202. package/dist/lib/taquito-signer/src/derivation-tools/types.js +0 -4
  203. package/dist/lib/taquito-signer/src/derivation-tools/utils.js +0 -16
  204. package/dist/lib/taquito-signer/src/ec-key.js +0 -196
  205. package/dist/lib/taquito-signer/src/ed-key.js +0 -130
  206. package/dist/lib/taquito-signer/src/errors.js +0 -77
  207. package/dist/lib/taquito-signer/src/helpers.js +0 -44
  208. package/dist/lib/taquito-signer/src/in-memory-signer.js +0 -240
  209. package/dist/lib/taquito-signer/src/key-interface.js +0 -6
  210. package/dist/lib/taquito-signer/src/taquito-signer.js +0 -28
  211. package/dist/lib/taquito-signer/src/version.js +0 -8
  212. package/dist/lib/taquito-utils/src/constants.js +0 -203
  213. package/dist/lib/taquito-utils/src/encoding.js +0 -606
  214. package/dist/lib/taquito-utils/src/errors.js +0 -45
  215. package/dist/lib/taquito-utils/src/format.js +0 -29
  216. package/dist/lib/taquito-utils/src/taquito-utils.js +0 -42
  217. package/dist/lib/taquito-utils/src/validators.js +0 -236
  218. package/dist/lib/taquito-utils/src/verify-signature.js +0 -136
  219. package/dist/lib/taquito-utils/src/version.js +0 -8
  220. package/dist/lib/taquito-wallet-connect/src/version.js +0 -8
  221. package/dist/types/taquito/src/batch/constants.d.ts +0 -3
  222. package/dist/types/taquito/src/batch/rpc-batch-provider.d.ts +0 -139
  223. package/dist/types/taquito/src/constants.d.ts +0 -81
  224. package/dist/types/taquito/src/context.d.ts +0 -100
  225. package/dist/types/taquito/src/contract/big-map.d.ts +0 -35
  226. package/dist/types/taquito/src/contract/compose.d.ts +0 -5
  227. package/dist/types/taquito/src/contract/constants.d.ts +0 -1
  228. package/dist/types/taquito/src/contract/contract-methods/contract-method-factory.d.ts +0 -14
  229. package/dist/types/taquito/src/contract/contract-methods/contract-method-interface.d.ts +0 -28
  230. package/dist/types/taquito/src/contract/contract-methods/contract-method-object-param.d.ts +0 -39
  231. package/dist/types/taquito/src/contract/contract-methods/contract-on-chain-view.d.ts +0 -43
  232. package/dist/types/taquito/src/contract/contract.d.ts +0 -75
  233. package/dist/types/taquito/src/contract/errors.d.ts +0 -83
  234. package/dist/types/taquito/src/contract/index.d.ts +0 -11
  235. package/dist/types/taquito/src/contract/interface.d.ts +0 -254
  236. package/dist/types/taquito/src/contract/manager-lambda.d.ts +0 -73
  237. package/dist/types/taquito/src/contract/prepare.d.ts +0 -18
  238. package/dist/types/taquito/src/contract/rpc-contract-provider.d.ts +0 -270
  239. package/dist/types/taquito/src/contract/sapling-state-abstraction.d.ts +0 -17
  240. package/dist/types/taquito/src/contract/semantic.d.ts +0 -7
  241. package/dist/types/taquito/src/contract/view_lambda.d.ts +0 -34
  242. package/dist/types/taquito/src/errors.d.ts +0 -26
  243. package/dist/types/taquito/src/estimate/errors.d.ts +0 -8
  244. package/dist/types/taquito/src/estimate/estimate-provider-interface.d.ts +0 -153
  245. package/dist/types/taquito/src/estimate/estimate.d.ts +0 -111
  246. package/dist/types/taquito/src/estimate/index.d.ts +0 -4
  247. package/dist/types/taquito/src/estimate/rpc-estimate-provider.d.ts +0 -174
  248. package/dist/types/taquito/src/extension/extension.d.ts +0 -4
  249. package/dist/types/taquito/src/forger/composite-forger.d.ts +0 -6
  250. package/dist/types/taquito/src/forger/errors.d.ts +0 -16
  251. package/dist/types/taquito/src/forger/rpc-forger.d.ts +0 -7
  252. package/dist/types/taquito/src/forger/taquito-local-forger.d.ts +0 -8
  253. package/dist/types/taquito/src/global-constants/default-global-constants-provider.d.ts +0 -18
  254. package/dist/types/taquito/src/global-constants/errors.d.ts +0 -16
  255. package/dist/types/taquito/src/global-constants/interface-global-constants-provider.d.ts +0 -11
  256. package/dist/types/taquito/src/global-constants/noop-global-constants-provider.d.ts +0 -5
  257. package/dist/types/taquito/src/import-key.d.ts +0 -13
  258. package/dist/types/taquito/src/injector/helper.d.ts +0 -2
  259. package/dist/types/taquito/src/injector/interface.d.ts +0 -5
  260. package/dist/types/taquito/src/injector/rpc-injector.d.ts +0 -7
  261. package/dist/types/taquito/src/operations/ballot-operation.d.ts +0 -18
  262. package/dist/types/taquito/src/operations/batch-operation.d.ts +0 -19
  263. package/dist/types/taquito/src/operations/delegate-operation.d.ts +0 -24
  264. package/dist/types/taquito/src/operations/drain-delegate-operation.d.ts +0 -17
  265. package/dist/types/taquito/src/operations/errors.d.ts +0 -50
  266. package/dist/types/taquito/src/operations/failing-noop-operation.d.ts +0 -17
  267. package/dist/types/taquito/src/operations/increase-paid-storage-operation.d.ts +0 -23
  268. package/dist/types/taquito/src/operations/index.d.ts +0 -18
  269. package/dist/types/taquito/src/operations/operations.d.ts +0 -35
  270. package/dist/types/taquito/src/operations/origination-operation.d.ts +0 -35
  271. package/dist/types/taquito/src/operations/proposals-operation.d.ts +0 -17
  272. package/dist/types/taquito/src/operations/register-global-constant-operation.d.ts +0 -25
  273. package/dist/types/taquito/src/operations/reveal-operation.d.ts +0 -25
  274. package/dist/types/taquito/src/operations/smart-rollup-add-messages-operation.d.ts +0 -20
  275. package/dist/types/taquito/src/operations/smart-rollup-execute-outbox-message-operation.d.ts +0 -24
  276. package/dist/types/taquito/src/operations/smart-rollup-originate-operation.d.ts +0 -23
  277. package/dist/types/taquito/src/operations/transaction-operation.d.ts +0 -28
  278. package/dist/types/taquito/src/operations/transfer-ticket-operation.d.ts +0 -22
  279. package/dist/types/taquito/src/operations/types.d.ts +0 -823
  280. package/dist/types/taquito/src/operations/update-companion-key-operation.d.ts +0 -23
  281. package/dist/types/taquito/src/operations/update-consensus-key-operation.d.ts +0 -23
  282. package/dist/types/taquito/src/packer/interface.d.ts +0 -4
  283. package/dist/types/taquito/src/packer/michel-codec-packer.d.ts +0 -5
  284. package/dist/types/taquito/src/packer/rpc-packer.d.ts +0 -8
  285. package/dist/types/taquito/src/parser/interface.d.ts +0 -4
  286. package/dist/types/taquito/src/parser/michel-codec-parser.d.ts +0 -16
  287. package/dist/types/taquito/src/parser/noop-parser.d.ts +0 -5
  288. package/dist/types/taquito/src/prepare/index.d.ts +0 -2
  289. package/dist/types/taquito/src/prepare/interface.d.ts +0 -152
  290. package/dist/types/taquito/src/prepare/prepare-provider.d.ts +0 -187
  291. package/dist/types/taquito/src/provider.d.ts +0 -50
  292. package/dist/types/taquito/src/read-provider/interface.d.ts +0 -132
  293. package/dist/types/taquito/src/read-provider/rpc-read-adapter.d.ts +0 -130
  294. package/dist/types/taquito/src/signer/errors.d.ts +0 -8
  295. package/dist/types/taquito/src/signer/noop.d.ts +0 -11
  296. package/dist/types/taquito/src/subscribe/create-observable-from-subscription.d.ts +0 -4
  297. package/dist/types/taquito/src/subscribe/errors.d.ts +0 -18
  298. package/dist/types/taquito/src/subscribe/filters.d.ts +0 -6
  299. package/dist/types/taquito/src/subscribe/interface.d.ts +0 -48
  300. package/dist/types/taquito/src/subscribe/observable-subscription.d.ts +0 -21
  301. package/dist/types/taquito/src/subscribe/polling-subcribe-provider.d.ts +0 -23
  302. package/dist/types/taquito/src/taquito.d.ts +0 -248
  303. package/dist/types/taquito/src/tz/interface.d.ts +0 -20
  304. package/dist/types/taquito/src/tz/rpc-tz-provider.d.ts +0 -13
  305. package/dist/types/taquito/src/version.d.ts +0 -4
  306. package/dist/types/taquito/src/wallet/batch-operation.d.ts +0 -13
  307. package/dist/types/taquito/src/wallet/delegation-operation.d.ts +0 -12
  308. package/dist/types/taquito/src/wallet/errors.d.ts +0 -24
  309. package/dist/types/taquito/src/wallet/increase-paid-storage-operation.d.ts +0 -12
  310. package/dist/types/taquito/src/wallet/index.d.ts +0 -9
  311. package/dist/types/taquito/src/wallet/interface.d.ts +0 -66
  312. package/dist/types/taquito/src/wallet/legacy.d.ts +0 -21
  313. package/dist/types/taquito/src/wallet/operation-factory.d.ts +0 -32
  314. package/dist/types/taquito/src/wallet/operation.d.ts +0 -55
  315. package/dist/types/taquito/src/wallet/origination-operation.d.ts +0 -14
  316. package/dist/types/taquito/src/wallet/receipt.d.ts +0 -16
  317. package/dist/types/taquito/src/wallet/register-global-constant-operation.d.ts +0 -13
  318. package/dist/types/taquito/src/wallet/transaction-operation.d.ts +0 -12
  319. package/dist/types/taquito/src/wallet/transfer-ticket-operation.d.ts +0 -12
  320. package/dist/types/taquito/src/wallet/wallet.d.ts +0 -196
  321. package/dist/types/taquito-core/src/errors.d.ts +0 -213
  322. package/dist/types/taquito-core/src/signer-interfaces.d.ts +0 -38
  323. package/dist/types/taquito-core/src/taquito-core.d.ts +0 -6
  324. package/dist/types/taquito-http-utils/src/errors.d.ts +0 -63
  325. package/dist/types/taquito-http-utils/src/status_code.d.ts +0 -318
  326. package/dist/types/taquito-http-utils/src/taquito-http-utils.d.ts +0 -58
  327. package/dist/types/taquito-http-utils/src/transport-errors.d.ts +0 -28
  328. package/dist/types/taquito-local-forging/src/codec.d.ts +0 -79
  329. package/dist/types/taquito-local-forging/src/constants.d.ts +0 -75
  330. package/dist/types/taquito-local-forging/src/decoder.d.ts +0 -5
  331. package/dist/types/taquito-local-forging/src/encoder.d.ts +0 -4
  332. package/dist/types/taquito-local-forging/src/errors.d.ts +0 -109
  333. package/dist/types/taquito-local-forging/src/interface.d.ts +0 -9
  334. package/dist/types/taquito-local-forging/src/michelson/codec.d.ts +0 -49
  335. package/dist/types/taquito-local-forging/src/protocols.d.ts +0 -27
  336. package/dist/types/taquito-local-forging/src/schema/operation.d.ts +0 -198
  337. package/dist/types/taquito-local-forging/src/taquito-local-forging.d.ts +0 -27
  338. package/dist/types/taquito-local-forging/src/uint8array-consumer.d.ts +0 -10
  339. package/dist/types/taquito-local-forging/src/utils.d.ts +0 -3
  340. package/dist/types/taquito-local-forging/src/validator.d.ts +0 -13
  341. package/dist/types/taquito-local-forging/src/version.d.ts +0 -4
  342. package/dist/types/taquito-michel-codec/src/base58.d.ts +0 -13
  343. package/dist/types/taquito-michel-codec/src/binary.d.ts +0 -127
  344. package/dist/types/taquito-michel-codec/src/errors.d.ts +0 -57
  345. package/dist/types/taquito-michel-codec/src/formatters.d.ts +0 -6
  346. package/dist/types/taquito-michel-codec/src/global-constants.d.ts +0 -3
  347. package/dist/types/taquito-michel-codec/src/macros.d.ts +0 -13
  348. package/dist/types/taquito-michel-codec/src/micheline-emitter.d.ts +0 -17
  349. package/dist/types/taquito-michel-codec/src/micheline-parser.d.ts +0 -130
  350. package/dist/types/taquito-michel-codec/src/micheline.d.ts +0 -44
  351. package/dist/types/taquito-michel-codec/src/michelson-contract.d.ts +0 -24
  352. package/dist/types/taquito-michel-codec/src/michelson-typecheck.d.ts +0 -38
  353. package/dist/types/taquito-michel-codec/src/michelson-types.d.ts +0 -147
  354. package/dist/types/taquito-michel-codec/src/michelson-validator.d.ts +0 -66
  355. package/dist/types/taquito-michel-codec/src/scan.d.ts +0 -26
  356. package/dist/types/taquito-michel-codec/src/taquito-michel-codec.d.ts +0 -16
  357. package/dist/types/taquito-michel-codec/src/utils.d.ts +0 -76
  358. package/dist/types/taquito-michel-codec/src/version.d.ts +0 -4
  359. package/dist/types/taquito-michelson-encoder/src/constants.d.ts +0 -8
  360. package/dist/types/taquito-michelson-encoder/src/errors.d.ts +0 -17
  361. package/dist/types/taquito-michelson-encoder/src/michelson-map.d.ts +0 -82
  362. package/dist/types/taquito-michelson-encoder/src/schema/errors.d.ts +0 -83
  363. package/dist/types/taquito-michelson-encoder/src/schema/event-schema.d.ts +0 -12
  364. package/dist/types/taquito-michelson-encoder/src/schema/parameter.d.ts +0 -54
  365. package/dist/types/taquito-michelson-encoder/src/schema/storage.d.ts +0 -97
  366. package/dist/types/taquito-michelson-encoder/src/schema/types.d.ts +0 -105
  367. package/dist/types/taquito-michelson-encoder/src/schema/view-schema.d.ts +0 -53
  368. package/dist/types/taquito-michelson-encoder/src/taquito-michelson-encoder.d.ts +0 -16
  369. package/dist/types/taquito-michelson-encoder/src/tokens/bigmap.d.ts +0 -51
  370. package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-fr.d.ts +0 -51
  371. package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-g1.d.ts +0 -47
  372. package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-g2.d.ts +0 -47
  373. package/dist/types/taquito-michelson-encoder/src/tokens/chain-id.d.ts +0 -51
  374. package/dist/types/taquito-michelson-encoder/src/tokens/chest-key.d.ts +0 -47
  375. package/dist/types/taquito-michelson-encoder/src/tokens/chest.d.ts +0 -47
  376. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/address.d.ts +0 -61
  377. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/bool.d.ts +0 -32
  378. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/bytes.d.ts +0 -52
  379. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/int.d.ts +0 -56
  380. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/key_hash.d.ts +0 -55
  381. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/mutez.d.ts +0 -53
  382. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/nat.d.ts +0 -55
  383. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/string.d.ts +0 -31
  384. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/timestamp.d.ts +0 -34
  385. package/dist/types/taquito-michelson-encoder/src/tokens/constant.d.ts +0 -51
  386. package/dist/types/taquito-michelson-encoder/src/tokens/contract.d.ts +0 -48
  387. package/dist/types/taquito-michelson-encoder/src/tokens/createToken.d.ts +0 -18
  388. package/dist/types/taquito-michelson-encoder/src/tokens/key.d.ts +0 -55
  389. package/dist/types/taquito-michelson-encoder/src/tokens/lambda.d.ts +0 -24
  390. package/dist/types/taquito-michelson-encoder/src/tokens/list.d.ts +0 -46
  391. package/dist/types/taquito-michelson-encoder/src/tokens/map.d.ts +0 -47
  392. package/dist/types/taquito-michelson-encoder/src/tokens/never.d.ts +0 -41
  393. package/dist/types/taquito-michelson-encoder/src/tokens/operation.d.ts +0 -24
  394. package/dist/types/taquito-michelson-encoder/src/tokens/option.d.ts +0 -37
  395. package/dist/types/taquito-michelson-encoder/src/tokens/or.d.ts +0 -53
  396. package/dist/types/taquito-michelson-encoder/src/tokens/pair.d.ts +0 -50
  397. package/dist/types/taquito-michelson-encoder/src/tokens/sapling-state.d.ts +0 -44
  398. package/dist/types/taquito-michelson-encoder/src/tokens/sapling-transaction-deprecated.d.ts +0 -40
  399. package/dist/types/taquito-michelson-encoder/src/tokens/sapling-transaction.d.ts +0 -40
  400. package/dist/types/taquito-michelson-encoder/src/tokens/set.d.ts +0 -43
  401. package/dist/types/taquito-michelson-encoder/src/tokens/signature.d.ts +0 -53
  402. package/dist/types/taquito-michelson-encoder/src/tokens/ticket-deprecated.d.ts +0 -38
  403. package/dist/types/taquito-michelson-encoder/src/tokens/ticket.d.ts +0 -38
  404. package/dist/types/taquito-michelson-encoder/src/tokens/token.d.ts +0 -68
  405. package/dist/types/taquito-michelson-encoder/src/tokens/tokens.d.ts +0 -36
  406. package/dist/types/taquito-michelson-encoder/src/tokens/unit.d.ts +0 -34
  407. package/dist/types/taquito-michelson-encoder/src/version.d.ts +0 -4
  408. package/dist/types/taquito-rpc/src/opkind.d.ts +0 -45
  409. package/dist/types/taquito-rpc/src/rpc-client-interface.d.ts +0 -126
  410. package/dist/types/taquito-rpc/src/rpc-client-modules/rpc-cache.d.ts +0 -473
  411. package/dist/types/taquito-rpc/src/taquito-rpc.d.ts +0 -483
  412. package/dist/types/taquito-rpc/src/types.d.ts +0 -2362
  413. package/dist/types/taquito-rpc/src/utils/utils.d.ts +0 -14
  414. package/dist/types/taquito-rpc/src/version.d.ts +0 -4
  415. package/dist/types/taquito-signer/src/bls-key.d.ts +0 -21
  416. package/dist/types/taquito-signer/src/derivation-tools/ecdsa.d.ts +0 -49
  417. package/dist/types/taquito-signer/src/derivation-tools/ed25519.d.ts +0 -33
  418. package/dist/types/taquito-signer/src/derivation-tools/index.d.ts +0 -12
  419. package/dist/types/taquito-signer/src/derivation-tools/types.d.ts +0 -10
  420. package/dist/types/taquito-signer/src/derivation-tools/utils.d.ts +0 -1
  421. package/dist/types/taquito-signer/src/ec-key.d.ts +0 -42
  422. package/dist/types/taquito-signer/src/ed-key.d.ts +0 -39
  423. package/dist/types/taquito-signer/src/errors.d.ts +0 -51
  424. package/dist/types/taquito-signer/src/helpers.d.ts +0 -10
  425. package/dist/types/taquito-signer/src/in-memory-signer.d.ts +0 -56
  426. package/dist/types/taquito-signer/src/key-interface.d.ts +0 -37
  427. package/dist/types/taquito-signer/src/taquito-signer.d.ts +0 -10
  428. package/dist/types/taquito-signer/src/version.d.ts +0 -4
  429. package/dist/types/taquito-utils/src/constants.d.ts +0 -78
  430. package/dist/types/taquito-utils/src/encoding.d.ts +0 -184
  431. package/dist/types/taquito-utils/src/errors.d.ts +0 -20
  432. package/dist/types/taquito-utils/src/format.d.ts +0 -4
  433. package/dist/types/taquito-utils/src/taquito-utils.d.ts +0 -11
  434. package/dist/types/taquito-utils/src/validators.d.ts +0 -167
  435. package/dist/types/taquito-utils/src/verify-signature.d.ts +0 -22
  436. package/dist/types/taquito-utils/src/version.d.ts +0 -4
  437. package/dist/types/taquito-wallet-connect/src/version.d.ts +0 -4
  438. /package/dist/lib/{taquito-wallet-connect/src/errors.js → errors.js} +0 -0
  439. /package/dist/lib/{taquito-wallet-connect/src/types.js → types.js} +0 -0
  440. /package/dist/types/{taquito-wallet-connect/src/errors.d.ts → errors.d.ts} +0 -0
  441. /package/dist/types/{taquito-wallet-connect/src/taquito-wallet-connect.d.ts → taquito-wallet-connect.d.ts} +0 -0
  442. /package/dist/types/{taquito-wallet-connect/src/types.d.ts → types.d.ts} +0 -0
  443. /package/dist/types/{taquito-http-utils/src/version.d.ts → version.d.ts} +0 -0
@@ -1,1118 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RpcClientCache = void 0;
4
- const rpc_client_interface_1 = require("./../rpc-client-interface");
5
- const rpc_client_interface_2 = require("../rpc-client-interface");
6
- const core_1 = require("@taquito/core");
7
- const utils_1 = require("@taquito/utils");
8
- const defaultTtl = 1000;
9
- /***
10
- * RpcClientCache acts as a decorator over the RpcClient instance by caching responses for the period defined by the ttl.
11
- */
12
- class RpcClientCache {
13
- /**
14
- *
15
- * @param rpcClient rpcClient responsible of the interaction with Tezos network through an rpc node
16
- * @param ttl number representing the time to live (default 1000 milliseconds)
17
- *
18
- * @example new RpcClientCache(new RpcClient('https://mainnet.tezos.ecadinfra.com/'))
19
- */
20
- constructor(rpcClient, ttl = defaultTtl) {
21
- this.rpcClient = rpcClient;
22
- this.ttl = ttl;
23
- this._cache = {};
24
- }
25
- getAllCachedData() {
26
- return this._cache;
27
- }
28
- /**
29
- * Remove all the data in the cache.
30
- *
31
- */
32
- deleteAllCachedData() {
33
- for (const key in this._cache) {
34
- delete this._cache[key];
35
- }
36
- }
37
- formatCacheKey(rpcUrl, rpcMethodName, rpcMethodParams, rpcMethodData) {
38
- let paramsToString = '';
39
- rpcMethodParams.forEach((param) => {
40
- paramsToString =
41
- typeof param === 'object'
42
- ? paramsToString + JSON.stringify(param) + '/'
43
- : paramsToString + param + '/';
44
- });
45
- return rpcMethodData
46
- ? `${rpcUrl}/${rpcMethodName}/${paramsToString}${JSON.stringify(rpcMethodData)}/`
47
- : `${rpcUrl}/${rpcMethodName}/${paramsToString}`;
48
- }
49
- has(key) {
50
- return key in this._cache;
51
- }
52
- get(key) {
53
- return this._cache[key].response;
54
- }
55
- put(key, response) {
56
- const handle = setTimeout(() => {
57
- return this.remove(key);
58
- }, this.ttl);
59
- Object.assign(this._cache, { [key]: { handle, response } });
60
- }
61
- remove(key) {
62
- if (key in this._cache) {
63
- delete this._cache[key];
64
- }
65
- }
66
- validateAddress(address) {
67
- const addressValidation = (0, utils_1.validateAddress)(address);
68
- if (addressValidation !== utils_1.ValidationResult.VALID) {
69
- throw new core_1.InvalidAddressError(address, addressValidation);
70
- }
71
- }
72
- validateContract(address) {
73
- const addressValidation = (0, utils_1.validateContractAddress)(address);
74
- if (addressValidation !== utils_1.ValidationResult.VALID) {
75
- throw new core_1.InvalidContractAddressError(address, addressValidation);
76
- }
77
- }
78
- /**
79
- * @param options contains generic configuration for rpc calls to specified block (default to head)
80
- * Get the block's hash, its unique identifier.
81
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-hash
82
- */
83
- async getBlockHash({ block } = rpc_client_interface_2.defaultRPCOptions) {
84
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BLOCK_HASH, [
85
- block,
86
- ]);
87
- if (this.has(key)) {
88
- return this.get(key);
89
- }
90
- else {
91
- const response = this.rpcClient.getBlockHash({ block });
92
- this.put(key, response);
93
- return response;
94
- }
95
- }
96
- /**
97
- * @param options contains generic configuration for rpc calls to specified block (default to head)
98
- * List the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.
99
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-live-blocks
100
- */
101
- async getLiveBlocks({ block } = rpc_client_interface_2.defaultRPCOptions) {
102
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_LIVE_BLOCKS, [
103
- block,
104
- ]);
105
- if (this.has(key)) {
106
- return this.get(key);
107
- }
108
- else {
109
- const response = this.rpcClient.getLiveBlocks({ block });
110
- this.put(key, response);
111
- return response;
112
- }
113
- }
114
- /**
115
- * @param address address from which we want to retrieve the spendable balance
116
- * @param options contains generic configuration for rpc calls to specified block (default to head)
117
- * The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'spendable' RPC.
118
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-balance
119
- */
120
- async getBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
121
- this.validateAddress(address);
122
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BALANCE, [
123
- block,
124
- address,
125
- ]);
126
- if (this.has(key)) {
127
- return this.get(key);
128
- }
129
- else {
130
- const response = this.rpcClient.getBalance(address, { block });
131
- this.put(key, response);
132
- return response;
133
- }
134
- }
135
- /**
136
- * @param address address from which we want to retrieve the balance
137
- * @param options contains generic configuration for rpc calls to specified block (default to head)
138
- * The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'balance' RPC.
139
- */
140
- async getSpendable(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
141
- this.validateAddress(address);
142
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SPENDABLE, [
143
- block,
144
- address,
145
- ]);
146
- if (this.has(key)) {
147
- return this.get(key);
148
- }
149
- else {
150
- const response = this.rpcClient.getSpendable(address, { block });
151
- this.put(key, response);
152
- return response;
153
- }
154
- }
155
- /**
156
- * @param address address from which we want to retrieve balance and frozen bonds
157
- * @param options contains generic configuration for rpc calls to specified block (default to head)
158
- * The sum (in mutez) of the spendable balance and frozen bonds of a contract. Corresponds to the contract's full balance from which staked funds and unstake requests have been excluded. Identical to the 'spendable_and_frozen_bonds' RPC.
159
- */
160
- async getBalanceAndFrozenBonds(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
161
- this.validateAddress(address);
162
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BALANCE_AND_FROZEN_BONDS, [block, address]);
163
- if (this.has(key)) {
164
- return this.get(key);
165
- }
166
- else {
167
- const response = this.rpcClient.getBalanceAndFrozenBonds(address, { block });
168
- this.put(key, response);
169
- return response;
170
- }
171
- }
172
- /**
173
- * @param address address from which we want to retrieve spendable and frozen bonds
174
- * @param options contains generic configuration for rpc calls to specified block (default to head)
175
- * The sum (in mutez) of the spendable balance and frozen bonds of a contract. Corresponds to the contract's full balance from which staked funds and unstake requests have been excluded. Identical to the 'balance_and_frozen_bonds' RPC.
176
- */
177
- async getSpendableAndFrozenBonds(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
178
- this.validateAddress(address);
179
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SPENDABLE_AND_FROZEN_BONDS, [block, address]);
180
- if (this.has(key)) {
181
- return this.get(key);
182
- }
183
- else {
184
- const response = this.rpcClient.getSpendableAndFrozenBonds(address, { block });
185
- this.put(key, response);
186
- return response;
187
- }
188
- }
189
- /**
190
- * @param address address from which we want to retrieve the full balance
191
- * @param options contains generic configuration for rpc calls to specified block (default to head)
192
- * Access the full balance of a contract, including frozen bonds and stake.
193
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-full-balance
194
- */
195
- async getFullBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
196
- this.validateAddress(address);
197
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_FULL_BALANCE, [
198
- block,
199
- address,
200
- ]);
201
- if (this.has(key)) {
202
- return this.get(key);
203
- }
204
- else {
205
- const response = this.rpcClient.getFullBalance(address, { block });
206
- this.put(key, response);
207
- return response;
208
- }
209
- }
210
- /**
211
- * @param address address from which we want to retrieve the staked balance
212
- * @param options contains generic configuration for rpc calls to specified block (default to head)
213
- * Access the staked balance of a contract. Returns None if the contract is originated, or neither delegated nor a delegate.
214
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-staked-balance
215
- */
216
- async getStakedBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
217
- this.validateAddress(address);
218
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STAKED_BALANCE, [
219
- block,
220
- address,
221
- ]);
222
- if (this.has(key)) {
223
- return this.get(key);
224
- }
225
- else {
226
- const response = this.rpcClient.getStakedBalance(address, { block });
227
- this.put(key, response);
228
- return response;
229
- }
230
- }
231
- /**
232
- * @param address address from which we want to retrieve the unstaked finalizable balance
233
- * @param options contains generic configuration for rpc calls to specified block (default to head)
234
- * Access the balance of a contract that was requested for an unstake operation, and is no longer frozen, which means it will appear in the spendable balance of the contract after any stake/unstake/finalize_unstake operation. Returns None if the contract is originated.
235
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-finalizable-balance
236
- */
237
- async getUnstakedFinalizableBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
238
- this.validateAddress(address);
239
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKED_FINALIZABLE_BALANCE, [block, address]);
240
- if (this.has(key)) {
241
- return this.get(key);
242
- }
243
- else {
244
- const response = this.rpcClient.getUnstakedFinalizableBalance(address, { block });
245
- this.put(key, response);
246
- return response;
247
- }
248
- }
249
- /**
250
- * @param address address from which we want to retrieve the unstaked frozen balance
251
- * @param options contains generic configuration for rpc calls to specified block (default to head)
252
- * Access the balance of a contract that was requested for an unstake operation, but is still frozen for the duration of the slashing period. Returns None if the contract is originated.
253
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-frozen-balance
254
- */
255
- async getUnstakedFrozenBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
256
- this.validateAddress(address);
257
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKED_FROZEN_BALANCE, [block, address]);
258
- if (this.has(key)) {
259
- return this.get(key);
260
- }
261
- else {
262
- const response = this.rpcClient.getUnstakedFrozenBalance(address, { block });
263
- this.put(key, response);
264
- return response;
265
- }
266
- }
267
- /**
268
- * @param address address from which we want to retrieve the unstake requests
269
- * @param options contains generic configuration for rpc calls to specified block (default to head)
270
- * Access the unstake requests of the contract. The requests that appear in the finalizable field can be finalized, which means that the contract can transfer these (no longer frozen) funds to their spendable balance with a [finalize_unstake] operation call. Returns null if there is no unstake request pending.
271
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstake-requests
272
- */
273
- async getUnstakeRequests(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
274
- this.validateAddress(address);
275
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKE_REQUESTS, [block, address]);
276
- if (this.has(key)) {
277
- return this.get(key);
278
- }
279
- else {
280
- const response = this.rpcClient.getUnstakeRequests(address, { block });
281
- this.put(key, response);
282
- return response;
283
- }
284
- }
285
- /**
286
- * @param address contract address from which we want to retrieve the storage
287
- * @param options contains generic configuration for rpc calls to specified block (default to head)
288
- * Access the data of the contract.
289
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-storage
290
- */
291
- async getStorage(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
292
- this.validateContract(address);
293
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STORAGE, [
294
- block,
295
- address,
296
- ]);
297
- if (this.has(key)) {
298
- return this.get(key);
299
- }
300
- else {
301
- const response = this.rpcClient.getStorage(address, { block });
302
- this.put(key, response);
303
- return response;
304
- }
305
- }
306
- /**
307
- * @param address contract address from which we want to retrieve the script
308
- * @param options contains generic configuration for rpc calls to specified block (default to head)
309
- * Access the code and data of the contract.
310
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-script
311
- */
312
- async getScript(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
313
- this.validateContract(address);
314
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SCRIPT, [
315
- block,
316
- address,
317
- ]);
318
- if (this.has(key)) {
319
- return this.get(key);
320
- }
321
- else {
322
- const response = this.rpcClient.getScript(address, { block });
323
- this.put(key, response);
324
- return response;
325
- }
326
- }
327
- /**
328
- * @param address contract address from which we want to retrieve the script
329
- * @param unparsingMode default is { unparsing_mode: "Readable" }
330
- * @param options contains generic configuration for rpc calls to specified block (default to head)
331
- * Access the script of the contract and normalize it using the requested unparsing mode.
332
- */
333
- async getNormalizedScript(address, unparsingMode = { unparsing_mode: 'Readable' }, { block } = rpc_client_interface_2.defaultRPCOptions) {
334
- this.validateContract(address);
335
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_NORMALIZED_SCRIPT, [block, address], unparsingMode);
336
- if (this.has(key)) {
337
- return this.get(key);
338
- }
339
- else {
340
- const response = this.rpcClient.getNormalizedScript(address, unparsingMode, { block });
341
- this.put(key, response);
342
- return response;
343
- }
344
- }
345
- /**
346
- * @param address contract address from which we want to retrieve
347
- * @param options contains generic configuration for rpc calls to specified block (default to head)
348
- * Access the complete status of a contract.
349
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id
350
- */
351
- async getContract(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
352
- this.validateAddress(address);
353
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CONTRACT, [
354
- block,
355
- address,
356
- ]);
357
- if (this.has(key)) {
358
- return this.get(key);
359
- }
360
- else {
361
- const response = this.rpcClient.getContract(address, { block });
362
- this.put(key, response);
363
- return response;
364
- }
365
- }
366
- /**
367
- * @param address contract address from which we want to retrieve the manager
368
- * @param options contains generic configuration for rpc calls to specified block (default to head)
369
- * Access the manager of an implicit contract
370
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-manager-key
371
- */
372
- async getManagerKey(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
373
- this.validateAddress(address);
374
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_MANAGER_KEY, [
375
- block,
376
- address,
377
- ]);
378
- if (this.has(key)) {
379
- return this.get(key);
380
- }
381
- else {
382
- const response = this.rpcClient.getManagerKey(address, { block });
383
- this.put(key, response);
384
- return response;
385
- }
386
- }
387
- /**
388
- * @param address contract address from which we want to retrieve the delegate (baker)
389
- * @param options contains generic configuration for rpc calls to specified block (default to head)
390
- * Access the delegate of a contract, if any
391
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-delegate
392
- */
393
- async getDelegate(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
394
- this.validateAddress(address);
395
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_DELEGATE, [
396
- block,
397
- address,
398
- ]);
399
- if (this.has(key)) {
400
- return this.get(key);
401
- }
402
- else {
403
- const response = this.rpcClient.getDelegate(address, { block });
404
- this.put(key, response);
405
- return response;
406
- }
407
- }
408
- /**
409
- * @param id Big Map ID
410
- * @param expr Expression hash to query (A b58check encoded Blake2b hash of the expression (The expression can be packed using the pack_data method))
411
- * @param options contains generic configuration for rpc calls to specified block (default to head)
412
- * Access the value associated with a key in a big map.
413
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
414
- */
415
- async getBigMapExpr(id, expr, { block } = rpc_client_interface_2.defaultRPCOptions) {
416
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BIG_MAP_EXPR, [
417
- block,
418
- id,
419
- expr,
420
- ]);
421
- if (this.has(key)) {
422
- return this.get(key);
423
- }
424
- else {
425
- const response = this.rpcClient.getBigMapExpr(id, expr, { block });
426
- this.put(key, response);
427
- return response;
428
- }
429
- }
430
- /**
431
- * @param args contains optional query arguments (active, inactive, with_minimal_stake, without_minimal_stake)
432
- * @param options contains generic configuration for rpc calls to specified block (default to head)
433
- * Lists all registered delegates by default with query arguments to filter unneeded values.
434
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh
435
- */
436
- async getAllDelegates(args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) {
437
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ALL_DELEGATES, [
438
- block,
439
- args,
440
- ]);
441
- if (this.has(key)) {
442
- return this.get(key);
443
- }
444
- else {
445
- const response = this.rpcClient.getAllDelegates(args, { block });
446
- this.put(key, response);
447
- return response;
448
- }
449
- }
450
- /**
451
- * @param address delegate address which we want to retrieve
452
- * @param options contains generic configuration for rpc calls to specified block (default to head)
453
- * Everything about a delegate
454
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh
455
- */
456
- async getDelegates(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
457
- this.validateAddress(address);
458
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_DELEGATES, [
459
- block,
460
- address,
461
- ]);
462
- if (this.has(key)) {
463
- return this.get(key);
464
- }
465
- else {
466
- const response = this.rpcClient.getDelegates(address, { block });
467
- this.put(key, response);
468
- return response;
469
- }
470
- }
471
- /**
472
- * @param address delegate address which we want to retrieve
473
- * @param options contains generic configuration for rpc calls to specified block (default to head)
474
- * Returns the delegate info (e.g. voting power) found in the listings of the current voting period
475
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-voting-info
476
- */
477
- async getVotingInfo(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
478
- this.validateAddress(address);
479
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_VOTING_INFO, [
480
- block,
481
- address,
482
- ]);
483
- if (this.has(key)) {
484
- return this.get(key);
485
- }
486
- else {
487
- const response = this.rpcClient.getVotingInfo(address, { block });
488
- this.put(key, response);
489
- return response;
490
- }
491
- }
492
- /**
493
- * @param options contains generic configuration for rpc calls to specified block (default to head)
494
- * All constants
495
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-constants
496
- */
497
- async getConstants({ block } = rpc_client_interface_2.defaultRPCOptions) {
498
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CONSTANTS, [
499
- block,
500
- ]);
501
- if (this.has(key)) {
502
- return this.get(key);
503
- }
504
- else {
505
- const response = this.rpcClient.getConstants({ block });
506
- this.put(key, response);
507
- return response;
508
- }
509
- }
510
- /**
511
- * @param options contains generic configuration for rpc calls to specified block (default to head) and version.
512
- * All the information about a block
513
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id
514
- * @example getBlock() will default to `/main/chains/block/head?version=1`
515
- * @example getBlock({ block: 'head~2') will return an offset of 2 from head blocks
516
- * @example getBlock({ block: 'BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2' }) will return an offset of 2 blocks from given block hash..
517
- */
518
- async getBlock({ block } = rpc_client_interface_2.defaultRPCOptions) {
519
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BLOCK, [block]);
520
- if (this.has(key)) {
521
- return this.get(key);
522
- }
523
- else {
524
- const response = this.rpcClient.getBlock({ block });
525
- this.put(key, response);
526
- return response;
527
- }
528
- }
529
- /**
530
- * @param options contains generic configuration for rpc calls to specified block (default to head)
531
- * The whole block header
532
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-header
533
- */
534
- async getBlockHeader({ block } = rpc_client_interface_2.defaultRPCOptions) {
535
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BLOCK_HEADER, [
536
- block,
537
- ]);
538
- if (this.has(key)) {
539
- return this.get(key);
540
- }
541
- else {
542
- const response = this.rpcClient.getBlockHeader({ block });
543
- this.put(key, response);
544
- return response;
545
- }
546
- }
547
- /**
548
- * @param options contains generic configuration for rpc calls to specified block (default to head) and version
549
- * All the metadata associated to the block
550
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-metadata
551
- */
552
- async getBlockMetadata({ block } = rpc_client_interface_2.defaultRPCOptions) {
553
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BLOCK_METADATA, [
554
- block,
555
- ]);
556
- if (this.has(key)) {
557
- return this.get(key);
558
- }
559
- else {
560
- const response = this.rpcClient.getBlockMetadata({ block });
561
- this.put(key, response);
562
- return response;
563
- }
564
- }
565
- /**
566
- * @param args contains optional query arguments (level, cycle, delegate, consensus_key, and max_round)
567
- * @param options contains generic configuration for rpc calls to specified block (default to head)
568
- * Retrieves the list of delegates allowed to bake a block.
569
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
570
- */
571
- async getBakingRights(args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) {
572
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BAKING_RIGHTS, [
573
- block,
574
- args,
575
- ]);
576
- if (this.has(key)) {
577
- return this.get(key);
578
- }
579
- else {
580
- const response = this.rpcClient.getBakingRights(args, { block });
581
- this.put(key, response);
582
- return response;
583
- }
584
- }
585
- /**
586
- * @param args contains optional query arguments (level, cycle, delegate, and consensus_key)
587
- * @param options contains generic configuration for rpc calls to specified block (default to head)
588
- * Retrieves the delegates allowed to attest a block
589
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
590
- */
591
- async getAttestationRights(args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) {
592
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ATTESTATION_RIGHTS, [block, args]);
593
- if (this.has(key)) {
594
- return this.get(key);
595
- }
596
- else {
597
- const response = this.rpcClient.getAttestationRights(args, { block });
598
- this.put(key, response);
599
- return response;
600
- }
601
- }
602
- /**
603
- * @param options contains generic configuration for rpc calls to specified block (default to head)
604
- * Ballots casted so far during a voting period
605
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballot-list
606
- */
607
- async getBallotList({ block } = rpc_client_interface_2.defaultRPCOptions) {
608
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BALLOT_LIST, [
609
- block,
610
- ]);
611
- if (this.has(key)) {
612
- return this.get(key);
613
- }
614
- else {
615
- const response = this.rpcClient.getBallotList({ block });
616
- this.put(key, response);
617
- return response;
618
- }
619
- }
620
- /**
621
- * @param options contains generic configuration for rpc calls to specified block (default to head)
622
- * Sum of ballots casted so far during a voting period
623
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballots
624
- */
625
- async getBallots({ block } = rpc_client_interface_2.defaultRPCOptions) {
626
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BALLOTS, [block]);
627
- if (this.has(key)) {
628
- return this.get(key);
629
- }
630
- else {
631
- const response = this.rpcClient.getBallots({ block });
632
- this.put(key, response);
633
- return response;
634
- }
635
- }
636
- /**
637
- * @param options contains generic configuration for rpc calls to specified block (default to head)
638
- * Current proposal under evaluation.
639
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-proposal
640
- */
641
- async getCurrentProposal({ block, } = rpc_client_interface_2.defaultRPCOptions) {
642
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CURRENT_PROPOSAL, [block]);
643
- if (this.has(key)) {
644
- return this.get(key);
645
- }
646
- else {
647
- const response = this.rpcClient.getCurrentProposal({ block });
648
- this.put(key, response);
649
- return response;
650
- }
651
- }
652
- /**
653
- * @param options contains generic configuration for rpc calls to specified block (default to head)
654
- * Current expected quorum.
655
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-quorum
656
- */
657
- async getCurrentQuorum({ block, } = rpc_client_interface_2.defaultRPCOptions) {
658
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CURRENT_QUORUM, [
659
- block,
660
- ]);
661
- if (this.has(key)) {
662
- return this.get(key);
663
- }
664
- else {
665
- const response = this.rpcClient.getCurrentQuorum({ block });
666
- this.put(key, response);
667
- return response;
668
- }
669
- }
670
- /**
671
- * @param options contains generic configuration for rpc calls to specified block (default to head)
672
- * List of delegates with their voting power
673
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-listings
674
- */
675
- async getVotesListings({ block, } = rpc_client_interface_2.defaultRPCOptions) {
676
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_VOTES_LISTINGS, [
677
- block,
678
- ]);
679
- if (this.has(key)) {
680
- return this.get(key);
681
- }
682
- else {
683
- const response = this.rpcClient.getVotesListings({ block });
684
- this.put(key, response);
685
- return response;
686
- }
687
- }
688
- /**
689
- * @param options contains generic configuration for rpc calls to specified block (default to head)
690
- * List of proposals with number of supporters
691
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-proposals
692
- */
693
- async getProposals({ block } = rpc_client_interface_2.defaultRPCOptions) {
694
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PROPOSALS, [
695
- block,
696
- ]);
697
- if (this.has(key)) {
698
- return this.get(key);
699
- }
700
- else {
701
- const response = this.rpcClient.getProposals({ block });
702
- this.put(key, response);
703
- return response;
704
- }
705
- }
706
- /**
707
- * @param data operation contents to forge
708
- * @param options contains generic configuration for rpc calls to specified block (default to head)
709
- * Forge an operation returning the unsigned bytes
710
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
711
- */
712
- async forgeOperations(data, { block } = rpc_client_interface_2.defaultRPCOptions) {
713
- return this.rpcClient.forgeOperations(data, { block });
714
- }
715
- /**
716
- * @param signedOpBytes signed bytes to inject
717
- * Inject an operation in node and broadcast it and return the ID of the operation
718
- * @see https://tezos.gitlab.io/shell/rpc.html#post-injection-operation
719
- */
720
- async injectOperation(signedOpBytes) {
721
- return this.rpcClient.injectOperation(signedOpBytes);
722
- }
723
- /**
724
- * @param ops Operations to apply
725
- * @param options contains generic configuration for rpc calls to specified block and version
726
- * Simulate the application of the operations with the context of the given block and return the result of each operation application
727
- * @see https://tezos.gitlab.io/active/rpc.html#post-block-id-helpers-preapply-operations
728
- */
729
- async preapplyOperations(ops, { block } = rpc_client_interface_2.defaultRPCOptions) {
730
- return this.rpcClient.preapplyOperations(ops, { block });
731
- }
732
- /**
733
- * @param contract address of the contract we want to get the entrypoints of
734
- * @param options contains generic configuration for rpc calls to specified block (default to head)
735
- * Return the list of entrypoints of the contract
736
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
737
- * @remarks version 005_PsBABY5H
738
- */
739
- async getEntrypoints(contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
740
- this.validateContract(contract);
741
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ENTRYPOINTS, [
742
- block,
743
- contract,
744
- ]);
745
- if (this.has(key)) {
746
- return this.get(key);
747
- }
748
- else {
749
- const response = this.rpcClient.getEntrypoints(contract, { block });
750
- this.put(key, response);
751
- return response;
752
- }
753
- }
754
- /**
755
- * @param op Operation to simulate
756
- * @param options contains generic configuration for rpc calls to specified block and version
757
- * Simulate running an operation at some future moment (based on the number of blocks given in the `latency` argument), and return the operation application result.
758
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
759
- */
760
- async simulateOperation(op, { block } = rpc_client_interface_2.defaultRPCOptions) {
761
- return this.rpcClient.simulateOperation(op, { block });
762
- }
763
- /**
764
- * @param code Code to run
765
- * @param options contains generic configuration for rpc calls to specified block (default to head)
766
- * Run a Michelson script in the current context
767
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
768
- */
769
- async runCode(code, { block } = rpc_client_interface_2.defaultRPCOptions) {
770
- return this.rpcClient.runCode(code, { block });
771
- }
772
- /**
773
- * @param viewScriptParams Parameters of the script view to run
774
- * @param options contains generic configuration for rpc calls to specified block (default to head)
775
- * Simulate a call to a michelson view
776
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
777
- */
778
- async runScriptView({ unparsing_mode = 'Readable', ...rest }, { block } = rpc_client_interface_2.defaultRPCOptions) {
779
- return this.rpcClient.runScriptView({
780
- unparsing_mode,
781
- ...rest,
782
- }, { block });
783
- }
784
- /**
785
- * @param viewParams Parameters of the view to run
786
- * @param options contains generic configuration for rpc calls to specified block (default to head)
787
- * Simulate a call to a view following the TZIP-4 standard.
788
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
789
- */
790
- async runView({ unparsing_mode = 'Readable', ...rest }, { block } = rpc_client_interface_2.defaultRPCOptions) {
791
- return this.rpcClient.runView({
792
- unparsing_mode,
793
- ...rest,
794
- }, { block });
795
- }
796
- async getChainId() {
797
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CHAIN_ID, []);
798
- if (this.has(key)) {
799
- return this.get(key);
800
- }
801
- else {
802
- const response = this.rpcClient.getChainId();
803
- this.put(key, response);
804
- return response;
805
- }
806
- }
807
- /**
808
- * @param data Data to pack
809
- * @param options contains generic configuration for rpc calls to specified block (default to head)
810
- * Computes the serialized version of a data expression using the same algorithm as script instruction PACK
811
- * Note: You should always verify the packed bytes before signing or requesting that they be signed when using the RPC to pack.
812
- * This precaution helps protect you and your applications users from RPC nodes that have been compromised.
813
- * A node that is operated by a bad actor, or compromised by a bad actor could return a fully formed operation that does not correspond to the input provided to the RPC endpoint.
814
- * A safer solution to pack and sign data would be to use the `packDataBytes` function available in the `@taquito/michel-codec` package.
815
- * @example packData({ data: { string: "test" }, type: { prim: "string" } })
816
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
817
- */
818
- async packData(data, { block } = rpc_client_interface_2.defaultRPCOptions) {
819
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.PACK_DATA, [block], data);
820
- if (this.has(key)) {
821
- return this.get(key);
822
- }
823
- else {
824
- const response = this.rpcClient.packData(data, { block });
825
- this.put(key, response);
826
- return response;
827
- }
828
- }
829
- /**
830
- *
831
- * Return rpc root url
832
- */
833
- getRpcUrl() {
834
- return this.rpcClient.getRpcUrl();
835
- }
836
- /**
837
- * @param options contains generic configuration for rpc calls to specified block (default to head)
838
- * Returns the voting period (index, kind, starting position) and related information (position, remaining) of the interrogated block
839
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-period
840
- */
841
- async getCurrentPeriod({ block, } = rpc_client_interface_2.defaultRPCOptions) {
842
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CURRENT_PERIOD, [
843
- block,
844
- ]);
845
- if (this.has(key)) {
846
- return this.get(key);
847
- }
848
- else {
849
- const response = this.rpcClient.getCurrentPeriod({ block });
850
- this.put(key, response);
851
- return response;
852
- }
853
- }
854
- /**
855
- * @param options contains generic configuration for rpc calls to specified block (default to head)
856
- * Returns the voting period (index, kind, starting position) and related information (position, remaining) of the next block.Useful to craft operations that will be valid in the next block
857
- * @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.
858
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-successor-period
859
- */
860
- async getSuccessorPeriod({ block, } = rpc_client_interface_2.defaultRPCOptions) {
861
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SUCCESSOR_PERIOD, [block]);
862
- if (this.has(key)) {
863
- return this.get(key);
864
- }
865
- else {
866
- const response = this.rpcClient.getSuccessorPeriod({ block });
867
- this.put(key, response);
868
- return response;
869
- }
870
- }
871
- /**
872
- * @param id Sapling state ID
873
- * @param options contains generic configuration for rpc calls to specified block (default to head)
874
- * Returns the root and a diff of a state starting from an optional offset which is zero by default
875
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-sapling-sapling-state-id-get-diff
876
- */
877
- async getSaplingDiffById(id, { block } = rpc_client_interface_2.defaultRPCOptions) {
878
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SAPLING_DIFF_BY_ID, [block, id]);
879
- if (this.has(key)) {
880
- return this.get(key);
881
- }
882
- else {
883
- const response = this.rpcClient.getSaplingDiffById(id, { block });
884
- this.put(key, response);
885
- return response;
886
- }
887
- }
888
- /**
889
- * @param contract address of the contract we want to get the sapling diff
890
- * @param options contains generic configuration for rpc calls to specified block (default to head)
891
- * Returns the root and a diff of a state starting from an optional offset which is zero by default
892
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-single-sapling-get-diff
893
- */
894
- async getSaplingDiffByContract(contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
895
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SAPLING_DIFF_BY_CONTRACT, [block, contract]);
896
- if (this.has(key)) {
897
- return this.get(key);
898
- }
899
- else {
900
- const response = this.rpcClient.getSaplingDiffByContract(contract, { block });
901
- this.put(key, response);
902
- return response;
903
- }
904
- }
905
- /**
906
- * @param options contains generic configuration for rpc calls to specified block (default to head)
907
- * get current and next protocol
908
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
909
- */
910
- async getProtocols({ block } = rpc_client_interface_2.defaultRPCOptions) {
911
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PROTOCOLS, [
912
- block,
913
- ]);
914
- if (this.has(key)) {
915
- return this.get(key);
916
- }
917
- else {
918
- const response = this.rpcClient.getProtocols({ block });
919
- this.put(key, response);
920
- return response;
921
- }
922
- }
923
- /**
924
- * @param protocol the protocol hash to look up (default to empty string)
925
- * get current and next protocol
926
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
927
- */
928
- async getProtocolActivations(protocol = '') {
929
- if (protocol) {
930
- const protocolValidation = (0, utils_1.validateProtocol)(protocol);
931
- if (protocolValidation !== utils_1.ValidationResult.VALID) {
932
- throw new utils_1.InvalidProtocolHashError(protocol, protocolValidation);
933
- }
934
- }
935
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PROTOCOL_ACTIVATIONS, [protocol]);
936
- if (this.has(key)) {
937
- return this.get(key);
938
- }
939
- else {
940
- const response = this.rpcClient.getProtocolActivations(protocol);
941
- this.put(key, response);
942
- return response;
943
- }
944
- }
945
- /**
946
- * @param contract address of the contract we want to retrieve storage information of
947
- * @param options contains generic configuration for rpc calls to specified block (default to head)
948
- * Access the used storage space of the contract
949
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
950
- */
951
- async getStorageUsedSpace(contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
952
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STORAGE_USED_SPACE, [block, contract]);
953
- if (this.has(key)) {
954
- return this.get(key);
955
- }
956
- else {
957
- const response = this.rpcClient.getStorageUsedSpace(contract, { block });
958
- this.put(key, response);
959
- return response;
960
- }
961
- }
962
- /**
963
- * @param contract address of the contract we want to retrieve storage information of
964
- * @param options contains generic configuration for rpc calls to specified block (default to head)
965
- = * Access the paid storage space of the contract
966
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
967
- */
968
- async getStoragePaidSpace(contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
969
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STORAGE_PAID_SPACE, [block, contract]);
970
- if (this.has(key)) {
971
- return this.get(key);
972
- }
973
- else {
974
- const response = this.rpcClient.getStoragePaidSpace(contract, { block });
975
- this.put(key, response);
976
- return response;
977
- }
978
- }
979
- /**
980
- * @param contract implicit or originated address we want to retrieve ticket balance of
981
- * @param ticket object to specify a ticket by ticketer, content type and content
982
- * @param options contains generic configuration for rpc calls to specified block (default to head)
983
- * Access the contract's balance of ticket with specified ticketer, content type, and content.
984
- * @example ticket { ticketer: 'address', content_type: { prim: "string" }, content: { string: 'ticket1' } }
985
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
986
- */
987
- async getTicketBalance(contract, ticket, { block } = rpc_client_interface_2.defaultRPCOptions) {
988
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_TICKET_BALANCE, [block, contract], ticket);
989
- if (this.has(key)) {
990
- return this.get(key);
991
- }
992
- else {
993
- const response = this.rpcClient.getTicketBalance(contract, ticket, { block });
994
- this.put(key, response);
995
- return response;
996
- }
997
- }
998
- /**
999
- * @param contract originated address we want to retrieve ticket balances of
1000
- * @param options contains generic configuration for rpc calls to specified block (default to head)
1001
- * Access the complete list of tickets owned by the given contract by scanning the contract's storage.
1002
- * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json
1003
- */
1004
- async getAllTicketBalances(contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
1005
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ALL_TICKET_BALANCES, [block, contract]);
1006
- if (this.has(key)) {
1007
- return this.get(key);
1008
- }
1009
- else {
1010
- const response = this.rpcClient.getAllTicketBalances(contract, { block });
1011
- this.put(key, response);
1012
- return response;
1013
- }
1014
- }
1015
- /**
1016
- * Returns the cycle at which the launch of the Adaptive Issuance feature is set to happen. A result of null means that the feature is not yet set to launch.
1017
- * @param options contains generic configuration for rpc calls to specified block (default to head)
1018
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-adaptive-issuance-launch-cycle
1019
- */
1020
- async getAdaptiveIssuanceLaunchCycle({ block, } = rpc_client_interface_2.defaultRPCOptions) {
1021
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE, [block]);
1022
- if (this.has(key)) {
1023
- return this.get(key);
1024
- }
1025
- else {
1026
- const response = this.rpcClient.getAdaptiveIssuanceLaunchCycle({ block });
1027
- this.put(key, response);
1028
- return response;
1029
- }
1030
- }
1031
- /**
1032
- * List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
1033
- * @param args has 5 optional properties
1034
- * @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
1035
- */
1036
- async getPendingOperations(args = {}) {
1037
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PENDING_OPERATIONS, [args]);
1038
- if (this.has(key)) {
1039
- return this.get(key);
1040
- }
1041
- else {
1042
- const response = this.rpcClient.getPendingOperations(args);
1043
- this.put(key, response);
1044
- return response;
1045
- }
1046
- }
1047
- /**
1048
- * Returns the current mempool fee filter configuration.
1049
- * @param args optional query arguments for the mempool/filter endpoint
1050
- */
1051
- async getMempoolFilter(args = {}) {
1052
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_MEMPOOL_FILTER, [
1053
- args,
1054
- ]);
1055
- if (this.has(key)) {
1056
- return this.get(key);
1057
- }
1058
- else {
1059
- const response = this.rpcClient.getMempoolFilter(args);
1060
- this.put(key, response);
1061
- return response;
1062
- }
1063
- }
1064
- /**
1065
- * @param delegate delegate address which we want to retrieve active staking parameters
1066
- * @param options contains generic configuration for rpc calls to specified block (default to head)
1067
- * Returns the currently active staking parameters for the given delegate
1068
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-active-staking-parameters
1069
- */
1070
- async getActiveStakingParameters(delegate, { block } = rpc_client_interface_2.defaultRPCOptions) {
1071
- this.validateAddress(delegate);
1072
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ACTIVE_STAKING_PARAMETERS, [block, delegate]);
1073
- if (this.has(key)) {
1074
- return this.get(key);
1075
- }
1076
- else {
1077
- const response = this.rpcClient.getActiveStakingParameters(delegate, { block });
1078
- this.put(key, response);
1079
- return response;
1080
- }
1081
- }
1082
- /**
1083
- * @param delegate delegate address which we want to retrieve pending staking parameters
1084
- * @param options contains generic configuration for rpc calls to specified block (default to head)
1085
- * Returns the pending values for the given delegate's staking parameters
1086
- * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-pending-staking-parameters
1087
- */
1088
- async getPendingStakingParameters(delegate, { block } = rpc_client_interface_2.defaultRPCOptions) {
1089
- this.validateAddress(delegate);
1090
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PENDING_STAKING_PARAMETERS, [block, delegate]);
1091
- if (this.has(key)) {
1092
- return this.get(key);
1093
- }
1094
- else {
1095
- const response = this.rpcClient.getPendingStakingParameters(delegate, { block });
1096
- this.put(key, response);
1097
- return response;
1098
- }
1099
- }
1100
- /**
1101
- * @param destination address to retrieve the index for
1102
- * @param options contains generic configuration for rpc calls to specified block (default to head)
1103
- * Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
1104
- * @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
1105
- */
1106
- async getDestinationIndex(destination, { block } = rpc_client_interface_2.defaultRPCOptions) {
1107
- const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_DESTINATION_INDEX, [block, destination]);
1108
- if (this.has(key)) {
1109
- return this.get(key);
1110
- }
1111
- else {
1112
- const response = this.rpcClient.getDestinationIndex(destination, { block });
1113
- this.put(key, response);
1114
- return response;
1115
- }
1116
- }
1117
- }
1118
- exports.RpcClientCache = RpcClientCache;