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

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 (444) hide show
  1. package/README.md +15 -1
  2. package/dist/lib/{taquito-wallet-connect/src/taquito-wallet-connect.js → taquito-wallet-connect.js} +1 -4
  3. package/dist/lib/{taquito-http-utils/src/version.js → version.js} +2 -2
  4. package/package.json +5 -7
  5. package/dist/lib/taquito/src/batch/constants.js +0 -16
  6. package/dist/lib/taquito/src/batch/rpc-batch-provider.js +0 -327
  7. package/dist/lib/taquito/src/constants.js +0 -135
  8. package/dist/lib/taquito/src/context.js +0 -178
  9. package/dist/lib/taquito/src/contract/big-map.js +0 -57
  10. package/dist/lib/taquito/src/contract/compose.js +0 -6
  11. package/dist/lib/taquito/src/contract/constants.js +0 -4
  12. package/dist/lib/taquito/src/contract/contract-methods/contract-method-factory.js +0 -18
  13. package/dist/lib/taquito/src/contract/contract-methods/contract-method-interface.js +0 -2
  14. package/dist/lib/taquito/src/contract/contract-methods/contract-method-object-param.js +0 -72
  15. package/dist/lib/taquito/src/contract/contract-methods/contract-on-chain-view.js +0 -111
  16. package/dist/lib/taquito/src/contract/contract.js +0 -158
  17. package/dist/lib/taquito/src/contract/errors.js +0 -140
  18. package/dist/lib/taquito/src/contract/index.js +0 -30
  19. package/dist/lib/taquito/src/contract/interface.js +0 -2
  20. package/dist/lib/taquito/src/contract/manager-lambda.js +0 -71
  21. package/dist/lib/taquito/src/contract/prepare.js +0 -231
  22. package/dist/lib/taquito/src/contract/rpc-contract-provider.js +0 -675
  23. package/dist/lib/taquito/src/contract/sapling-state-abstraction.js +0 -24
  24. package/dist/lib/taquito/src/contract/semantic.js +0 -43
  25. package/dist/lib/taquito/src/contract/view_lambda.js +0 -27
  26. package/dist/lib/taquito/src/errors.js +0 -42
  27. package/dist/lib/taquito/src/estimate/errors.js +0 -16
  28. package/dist/lib/taquito/src/estimate/estimate-provider-interface.js +0 -2
  29. package/dist/lib/taquito/src/estimate/estimate.js +0 -176
  30. package/dist/lib/taquito/src/estimate/index.js +0 -20
  31. package/dist/lib/taquito/src/estimate/rpc-estimate-provider.js +0 -640
  32. package/dist/lib/taquito/src/extension/extension.js +0 -2
  33. package/dist/lib/taquito/src/forger/composite-forger.js +0 -32
  34. package/dist/lib/taquito/src/forger/errors.js +0 -30
  35. package/dist/lib/taquito/src/forger/rpc-forger.js +0 -12
  36. package/dist/lib/taquito/src/forger/taquito-local-forger.js +0 -21
  37. package/dist/lib/taquito/src/global-constants/default-global-constants-provider.js +0 -35
  38. package/dist/lib/taquito/src/global-constants/errors.js +0 -30
  39. package/dist/lib/taquito/src/global-constants/interface-global-constants-provider.js +0 -2
  40. package/dist/lib/taquito/src/global-constants/noop-global-constants-provider.js +0 -10
  41. package/dist/lib/taquito/src/import-key.js +0 -40
  42. package/dist/lib/taquito/src/injector/helper.js +0 -18
  43. package/dist/lib/taquito/src/injector/interface.js +0 -2
  44. package/dist/lib/taquito/src/injector/rpc-injector.js +0 -27
  45. package/dist/lib/taquito/src/operations/ballot-operation.js +0 -32
  46. package/dist/lib/taquito/src/operations/batch-operation.js +0 -69
  47. package/dist/lib/taquito/src/operations/delegate-operation.js +0 -54
  48. package/dist/lib/taquito/src/operations/drain-delegate-operation.js +0 -31
  49. package/dist/lib/taquito/src/operations/errors.js +0 -133
  50. package/dist/lib/taquito/src/operations/failing-noop-operation.js +0 -2
  51. package/dist/lib/taquito/src/operations/increase-paid-storage-operation.js +0 -49
  52. package/dist/lib/taquito/src/operations/index.js +0 -54
  53. package/dist/lib/taquito/src/operations/operations.js +0 -193
  54. package/dist/lib/taquito/src/operations/origination-operation.js +0 -78
  55. package/dist/lib/taquito/src/operations/proposals-operation.js +0 -29
  56. package/dist/lib/taquito/src/operations/register-global-constant-operation.js +0 -52
  57. package/dist/lib/taquito/src/operations/reveal-operation.js +0 -74
  58. package/dist/lib/taquito/src/operations/smart-rollup-add-messages-operation.js +0 -44
  59. package/dist/lib/taquito/src/operations/smart-rollup-execute-outbox-message-operation.js +0 -53
  60. package/dist/lib/taquito/src/operations/smart-rollup-originate-operation.js +0 -50
  61. package/dist/lib/taquito/src/operations/transaction-operation.js +0 -73
  62. package/dist/lib/taquito/src/operations/transfer-ticket-operation.js +0 -47
  63. package/dist/lib/taquito/src/operations/types.js +0 -88
  64. package/dist/lib/taquito/src/operations/update-companion-key-operation.js +0 -55
  65. package/dist/lib/taquito/src/operations/update-consensus-key-operation.js +0 -55
  66. package/dist/lib/taquito/src/packer/interface.js +0 -2
  67. package/dist/lib/taquito/src/packer/michel-codec-packer.js +0 -11
  68. package/dist/lib/taquito/src/packer/rpc-packer.js +0 -12
  69. package/dist/lib/taquito/src/parser/interface.js +0 -2
  70. package/dist/lib/taquito/src/parser/michel-codec-parser.js +0 -110
  71. package/dist/lib/taquito/src/parser/noop-parser.js +0 -9
  72. package/dist/lib/taquito/src/prepare/index.js +0 -18
  73. package/dist/lib/taquito/src/prepare/interface.js +0 -2
  74. package/dist/lib/taquito/src/prepare/prepare-provider.js +0 -1049
  75. package/dist/lib/taquito/src/provider.js +0 -363
  76. package/dist/lib/taquito/src/read-provider/interface.js +0 -2
  77. package/dist/lib/taquito/src/read-provider/rpc-read-adapter.js +0 -183
  78. package/dist/lib/taquito/src/signer/errors.js +0 -17
  79. package/dist/lib/taquito/src/signer/noop.js +0 -23
  80. package/dist/lib/taquito/src/subscribe/create-observable-from-subscription.js +0 -20
  81. package/dist/lib/taquito/src/subscribe/errors.js +0 -30
  82. package/dist/lib/taquito/src/subscribe/filters.js +0 -96
  83. package/dist/lib/taquito/src/subscribe/interface.js +0 -2
  84. package/dist/lib/taquito/src/subscribe/observable-subscription.js +0 -79
  85. package/dist/lib/taquito/src/subscribe/polling-subcribe-provider.js +0 -118
  86. package/dist/lib/taquito/src/taquito.js +0 -404
  87. package/dist/lib/taquito/src/tz/interface.js +0 -2
  88. package/dist/lib/taquito/src/tz/rpc-tz-provider.js +0 -46
  89. package/dist/lib/taquito/src/version.js +0 -8
  90. package/dist/lib/taquito/src/wallet/batch-operation.js +0 -71
  91. package/dist/lib/taquito/src/wallet/delegation-operation.js +0 -42
  92. package/dist/lib/taquito/src/wallet/errors.js +0 -40
  93. package/dist/lib/taquito/src/wallet/increase-paid-storage-operation.js +0 -42
  94. package/dist/lib/taquito/src/wallet/index.js +0 -25
  95. package/dist/lib/taquito/src/wallet/interface.js +0 -2
  96. package/dist/lib/taquito/src/wallet/legacy.js +0 -51
  97. package/dist/lib/taquito/src/wallet/operation-factory.js +0 -88
  98. package/dist/lib/taquito/src/wallet/operation.js +0 -221
  99. package/dist/lib/taquito/src/wallet/origination-operation.js +0 -53
  100. package/dist/lib/taquito/src/wallet/receipt.js +0 -46
  101. package/dist/lib/taquito/src/wallet/register-global-constant-operation.js +0 -45
  102. package/dist/lib/taquito/src/wallet/transaction-operation.js +0 -38
  103. package/dist/lib/taquito/src/wallet/transfer-ticket-operation.js +0 -38
  104. package/dist/lib/taquito/src/wallet/wallet.js +0 -445
  105. package/dist/lib/taquito-core/src/errors.js +0 -351
  106. package/dist/lib/taquito-core/src/signer-interfaces.js +0 -2
  107. package/dist/lib/taquito-core/src/taquito-core.js +0 -22
  108. package/dist/lib/taquito-http-utils/src/errors.js +0 -103
  109. package/dist/lib/taquito-http-utils/src/status_code.js +0 -322
  110. package/dist/lib/taquito-http-utils/src/taquito-http-utils.js +0 -308
  111. package/dist/lib/taquito-http-utils/src/transport-errors.js +0 -141
  112. package/dist/lib/taquito-local-forging/src/codec.js +0 -543
  113. package/dist/lib/taquito-local-forging/src/constants.js +0 -291
  114. package/dist/lib/taquito-local-forging/src/decoder.js +0 -64
  115. package/dist/lib/taquito-local-forging/src/encoder.js +0 -63
  116. package/dist/lib/taquito-local-forging/src/errors.js +0 -179
  117. package/dist/lib/taquito-local-forging/src/interface.js +0 -2
  118. package/dist/lib/taquito-local-forging/src/michelson/codec.js +0 -283
  119. package/dist/lib/taquito-local-forging/src/protocols.js +0 -60
  120. package/dist/lib/taquito-local-forging/src/schema/operation.js +0 -259
  121. package/dist/lib/taquito-local-forging/src/taquito-local-forging.js +0 -117
  122. package/dist/lib/taquito-local-forging/src/uint8array-consumer.js +0 -35
  123. package/dist/lib/taquito-local-forging/src/utils.js +0 -18
  124. package/dist/lib/taquito-local-forging/src/validator.js +0 -57
  125. package/dist/lib/taquito-local-forging/src/version.js +0 -8
  126. package/dist/lib/taquito-michel-codec/src/base58.js +0 -255
  127. package/dist/lib/taquito-michel-codec/src/binary.js +0 -1271
  128. package/dist/lib/taquito-michel-codec/src/errors.js +0 -90
  129. package/dist/lib/taquito-michel-codec/src/formatters.js +0 -58
  130. package/dist/lib/taquito-michel-codec/src/global-constants.js +0 -12
  131. package/dist/lib/taquito-michel-codec/src/macros.js +0 -551
  132. package/dist/lib/taquito-michel-codec/src/micheline-emitter.js +0 -128
  133. package/dist/lib/taquito-michel-codec/src/micheline-parser.js +0 -402
  134. package/dist/lib/taquito-michel-codec/src/micheline.js +0 -5
  135. package/dist/lib/taquito-michel-codec/src/michelson-contract.js +0 -93
  136. package/dist/lib/taquito-michel-codec/src/michelson-typecheck.js +0 -1756
  137. package/dist/lib/taquito-michel-codec/src/michelson-types.js +0 -83
  138. package/dist/lib/taquito-michel-codec/src/michelson-validator.js +0 -833
  139. package/dist/lib/taquito-michel-codec/src/scan.js +0 -128
  140. package/dist/lib/taquito-michel-codec/src/taquito-michel-codec.js +0 -38
  141. package/dist/lib/taquito-michel-codec/src/utils.js +0 -323
  142. package/dist/lib/taquito-michel-codec/src/version.js +0 -8
  143. package/dist/lib/taquito-michelson-encoder/src/constants.js +0 -11
  144. package/dist/lib/taquito-michelson-encoder/src/errors.js +0 -38
  145. package/dist/lib/taquito-michelson-encoder/src/michelson-map.js +0 -201
  146. package/dist/lib/taquito-michelson-encoder/src/schema/errors.js +0 -127
  147. package/dist/lib/taquito-michelson-encoder/src/schema/event-schema.js +0 -52
  148. package/dist/lib/taquito-michelson-encoder/src/schema/parameter.js +0 -113
  149. package/dist/lib/taquito-michelson-encoder/src/schema/storage.js +0 -260
  150. package/dist/lib/taquito-michelson-encoder/src/schema/types.js +0 -2
  151. package/dist/lib/taquito-michelson-encoder/src/schema/view-schema.js +0 -90
  152. package/dist/lib/taquito-michelson-encoder/src/taquito-michelson-encoder.js +0 -36
  153. package/dist/lib/taquito-michelson-encoder/src/tokens/bigmap.js +0 -130
  154. package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-fr.js +0 -86
  155. package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-g1.js +0 -76
  156. package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-g2.js +0 -76
  157. package/dist/lib/taquito-michelson-encoder/src/tokens/chain-id.js +0 -78
  158. package/dist/lib/taquito-michelson-encoder/src/tokens/chest-key.js +0 -74
  159. package/dist/lib/taquito-michelson-encoder/src/tokens/chest.js +0 -74
  160. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/address.js +0 -116
  161. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/bool.js +0 -59
  162. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/bytes.js +0 -90
  163. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/int.js +0 -90
  164. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/key_hash.js +0 -90
  165. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/mutez.js +0 -90
  166. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/nat.js +0 -93
  167. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/string.js +0 -48
  168. package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/timestamp.js +0 -66
  169. package/dist/lib/taquito-michelson-encoder/src/tokens/constant.js +0 -80
  170. package/dist/lib/taquito-michelson-encoder/src/tokens/contract.js +0 -86
  171. package/dist/lib/taquito-michelson-encoder/src/tokens/createToken.js +0 -35
  172. package/dist/lib/taquito-michelson-encoder/src/tokens/key.js +0 -97
  173. package/dist/lib/taquito-michelson-encoder/src/tokens/lambda.js +0 -55
  174. package/dist/lib/taquito-michelson-encoder/src/tokens/list.js +0 -85
  175. package/dist/lib/taquito-michelson-encoder/src/tokens/map.js +0 -112
  176. package/dist/lib/taquito-michelson-encoder/src/tokens/never.js +0 -61
  177. package/dist/lib/taquito-michelson-encoder/src/tokens/operation.js +0 -39
  178. package/dist/lib/taquito-michelson-encoder/src/tokens/option.js +0 -88
  179. package/dist/lib/taquito-michelson-encoder/src/tokens/or.js +0 -282
  180. package/dist/lib/taquito-michelson-encoder/src/tokens/pair.js +0 -233
  181. package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-state.js +0 -84
  182. package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-transaction-deprecated.js +0 -74
  183. package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-transaction.js +0 -74
  184. package/dist/lib/taquito-michelson-encoder/src/tokens/set.js +0 -82
  185. package/dist/lib/taquito-michelson-encoder/src/tokens/signature.js +0 -82
  186. package/dist/lib/taquito-michelson-encoder/src/tokens/ticket-deprecated.js +0 -92
  187. package/dist/lib/taquito-michelson-encoder/src/tokens/ticket.js +0 -92
  188. package/dist/lib/taquito-michelson-encoder/src/tokens/token.js +0 -100
  189. package/dist/lib/taquito-michelson-encoder/src/tokens/tokens.js +0 -75
  190. package/dist/lib/taquito-michelson-encoder/src/tokens/unit.js +0 -52
  191. package/dist/lib/taquito-michelson-encoder/src/version.js +0 -8
  192. package/dist/lib/taquito-rpc/src/opkind.js +0 -49
  193. package/dist/lib/taquito-rpc/src/rpc-client-interface.js +0 -60
  194. package/dist/lib/taquito-rpc/src/rpc-client-modules/rpc-cache.js +0 -1118
  195. package/dist/lib/taquito-rpc/src/taquito-rpc.js +0 -990
  196. package/dist/lib/taquito-rpc/src/types.js +0 -114
  197. package/dist/lib/taquito-rpc/src/utils/utils.js +0 -65
  198. package/dist/lib/taquito-rpc/src/version.js +0 -8
  199. package/dist/lib/taquito-signer/src/bls-key.js +0 -104
  200. package/dist/lib/taquito-signer/src/derivation-tools/ecdsa.js +0 -156
  201. package/dist/lib/taquito-signer/src/derivation-tools/ed25519.js +0 -82
  202. package/dist/lib/taquito-signer/src/derivation-tools/index.js +0 -79
  203. package/dist/lib/taquito-signer/src/derivation-tools/types.js +0 -4
  204. package/dist/lib/taquito-signer/src/derivation-tools/utils.js +0 -16
  205. package/dist/lib/taquito-signer/src/ec-key.js +0 -196
  206. package/dist/lib/taquito-signer/src/ed-key.js +0 -130
  207. package/dist/lib/taquito-signer/src/errors.js +0 -77
  208. package/dist/lib/taquito-signer/src/helpers.js +0 -44
  209. package/dist/lib/taquito-signer/src/in-memory-signer.js +0 -240
  210. package/dist/lib/taquito-signer/src/key-interface.js +0 -6
  211. package/dist/lib/taquito-signer/src/taquito-signer.js +0 -28
  212. package/dist/lib/taquito-signer/src/version.js +0 -8
  213. package/dist/lib/taquito-utils/src/constants.js +0 -203
  214. package/dist/lib/taquito-utils/src/encoding.js +0 -606
  215. package/dist/lib/taquito-utils/src/errors.js +0 -45
  216. package/dist/lib/taquito-utils/src/format.js +0 -29
  217. package/dist/lib/taquito-utils/src/taquito-utils.js +0 -42
  218. package/dist/lib/taquito-utils/src/validators.js +0 -236
  219. package/dist/lib/taquito-utils/src/verify-signature.js +0 -136
  220. package/dist/lib/taquito-utils/src/version.js +0 -8
  221. package/dist/lib/taquito-wallet-connect/src/version.js +0 -8
  222. package/dist/types/taquito/src/batch/constants.d.ts +0 -3
  223. package/dist/types/taquito/src/batch/rpc-batch-provider.d.ts +0 -139
  224. package/dist/types/taquito/src/constants.d.ts +0 -81
  225. package/dist/types/taquito/src/context.d.ts +0 -100
  226. package/dist/types/taquito/src/contract/big-map.d.ts +0 -35
  227. package/dist/types/taquito/src/contract/compose.d.ts +0 -5
  228. package/dist/types/taquito/src/contract/constants.d.ts +0 -1
  229. package/dist/types/taquito/src/contract/contract-methods/contract-method-factory.d.ts +0 -14
  230. package/dist/types/taquito/src/contract/contract-methods/contract-method-interface.d.ts +0 -28
  231. package/dist/types/taquito/src/contract/contract-methods/contract-method-object-param.d.ts +0 -39
  232. package/dist/types/taquito/src/contract/contract-methods/contract-on-chain-view.d.ts +0 -43
  233. package/dist/types/taquito/src/contract/contract.d.ts +0 -75
  234. package/dist/types/taquito/src/contract/errors.d.ts +0 -83
  235. package/dist/types/taquito/src/contract/index.d.ts +0 -11
  236. package/dist/types/taquito/src/contract/interface.d.ts +0 -254
  237. package/dist/types/taquito/src/contract/manager-lambda.d.ts +0 -73
  238. package/dist/types/taquito/src/contract/prepare.d.ts +0 -18
  239. package/dist/types/taquito/src/contract/rpc-contract-provider.d.ts +0 -270
  240. package/dist/types/taquito/src/contract/sapling-state-abstraction.d.ts +0 -17
  241. package/dist/types/taquito/src/contract/semantic.d.ts +0 -7
  242. package/dist/types/taquito/src/contract/view_lambda.d.ts +0 -34
  243. package/dist/types/taquito/src/errors.d.ts +0 -26
  244. package/dist/types/taquito/src/estimate/errors.d.ts +0 -8
  245. package/dist/types/taquito/src/estimate/estimate-provider-interface.d.ts +0 -153
  246. package/dist/types/taquito/src/estimate/estimate.d.ts +0 -111
  247. package/dist/types/taquito/src/estimate/index.d.ts +0 -4
  248. package/dist/types/taquito/src/estimate/rpc-estimate-provider.d.ts +0 -174
  249. package/dist/types/taquito/src/extension/extension.d.ts +0 -4
  250. package/dist/types/taquito/src/forger/composite-forger.d.ts +0 -6
  251. package/dist/types/taquito/src/forger/errors.d.ts +0 -16
  252. package/dist/types/taquito/src/forger/rpc-forger.d.ts +0 -7
  253. package/dist/types/taquito/src/forger/taquito-local-forger.d.ts +0 -8
  254. package/dist/types/taquito/src/global-constants/default-global-constants-provider.d.ts +0 -18
  255. package/dist/types/taquito/src/global-constants/errors.d.ts +0 -16
  256. package/dist/types/taquito/src/global-constants/interface-global-constants-provider.d.ts +0 -11
  257. package/dist/types/taquito/src/global-constants/noop-global-constants-provider.d.ts +0 -5
  258. package/dist/types/taquito/src/import-key.d.ts +0 -13
  259. package/dist/types/taquito/src/injector/helper.d.ts +0 -2
  260. package/dist/types/taquito/src/injector/interface.d.ts +0 -5
  261. package/dist/types/taquito/src/injector/rpc-injector.d.ts +0 -7
  262. package/dist/types/taquito/src/operations/ballot-operation.d.ts +0 -18
  263. package/dist/types/taquito/src/operations/batch-operation.d.ts +0 -19
  264. package/dist/types/taquito/src/operations/delegate-operation.d.ts +0 -24
  265. package/dist/types/taquito/src/operations/drain-delegate-operation.d.ts +0 -17
  266. package/dist/types/taquito/src/operations/errors.d.ts +0 -50
  267. package/dist/types/taquito/src/operations/failing-noop-operation.d.ts +0 -17
  268. package/dist/types/taquito/src/operations/increase-paid-storage-operation.d.ts +0 -23
  269. package/dist/types/taquito/src/operations/index.d.ts +0 -18
  270. package/dist/types/taquito/src/operations/operations.d.ts +0 -35
  271. package/dist/types/taquito/src/operations/origination-operation.d.ts +0 -35
  272. package/dist/types/taquito/src/operations/proposals-operation.d.ts +0 -17
  273. package/dist/types/taquito/src/operations/register-global-constant-operation.d.ts +0 -25
  274. package/dist/types/taquito/src/operations/reveal-operation.d.ts +0 -25
  275. package/dist/types/taquito/src/operations/smart-rollup-add-messages-operation.d.ts +0 -20
  276. package/dist/types/taquito/src/operations/smart-rollup-execute-outbox-message-operation.d.ts +0 -24
  277. package/dist/types/taquito/src/operations/smart-rollup-originate-operation.d.ts +0 -23
  278. package/dist/types/taquito/src/operations/transaction-operation.d.ts +0 -28
  279. package/dist/types/taquito/src/operations/transfer-ticket-operation.d.ts +0 -22
  280. package/dist/types/taquito/src/operations/types.d.ts +0 -823
  281. package/dist/types/taquito/src/operations/update-companion-key-operation.d.ts +0 -23
  282. package/dist/types/taquito/src/operations/update-consensus-key-operation.d.ts +0 -23
  283. package/dist/types/taquito/src/packer/interface.d.ts +0 -4
  284. package/dist/types/taquito/src/packer/michel-codec-packer.d.ts +0 -5
  285. package/dist/types/taquito/src/packer/rpc-packer.d.ts +0 -8
  286. package/dist/types/taquito/src/parser/interface.d.ts +0 -4
  287. package/dist/types/taquito/src/parser/michel-codec-parser.d.ts +0 -16
  288. package/dist/types/taquito/src/parser/noop-parser.d.ts +0 -5
  289. package/dist/types/taquito/src/prepare/index.d.ts +0 -2
  290. package/dist/types/taquito/src/prepare/interface.d.ts +0 -152
  291. package/dist/types/taquito/src/prepare/prepare-provider.d.ts +0 -187
  292. package/dist/types/taquito/src/provider.d.ts +0 -50
  293. package/dist/types/taquito/src/read-provider/interface.d.ts +0 -132
  294. package/dist/types/taquito/src/read-provider/rpc-read-adapter.d.ts +0 -130
  295. package/dist/types/taquito/src/signer/errors.d.ts +0 -8
  296. package/dist/types/taquito/src/signer/noop.d.ts +0 -11
  297. package/dist/types/taquito/src/subscribe/create-observable-from-subscription.d.ts +0 -4
  298. package/dist/types/taquito/src/subscribe/errors.d.ts +0 -18
  299. package/dist/types/taquito/src/subscribe/filters.d.ts +0 -6
  300. package/dist/types/taquito/src/subscribe/interface.d.ts +0 -48
  301. package/dist/types/taquito/src/subscribe/observable-subscription.d.ts +0 -21
  302. package/dist/types/taquito/src/subscribe/polling-subcribe-provider.d.ts +0 -23
  303. package/dist/types/taquito/src/taquito.d.ts +0 -248
  304. package/dist/types/taquito/src/tz/interface.d.ts +0 -20
  305. package/dist/types/taquito/src/tz/rpc-tz-provider.d.ts +0 -13
  306. package/dist/types/taquito/src/version.d.ts +0 -4
  307. package/dist/types/taquito/src/wallet/batch-operation.d.ts +0 -13
  308. package/dist/types/taquito/src/wallet/delegation-operation.d.ts +0 -12
  309. package/dist/types/taquito/src/wallet/errors.d.ts +0 -24
  310. package/dist/types/taquito/src/wallet/increase-paid-storage-operation.d.ts +0 -12
  311. package/dist/types/taquito/src/wallet/index.d.ts +0 -9
  312. package/dist/types/taquito/src/wallet/interface.d.ts +0 -66
  313. package/dist/types/taquito/src/wallet/legacy.d.ts +0 -21
  314. package/dist/types/taquito/src/wallet/operation-factory.d.ts +0 -32
  315. package/dist/types/taquito/src/wallet/operation.d.ts +0 -55
  316. package/dist/types/taquito/src/wallet/origination-operation.d.ts +0 -14
  317. package/dist/types/taquito/src/wallet/receipt.d.ts +0 -16
  318. package/dist/types/taquito/src/wallet/register-global-constant-operation.d.ts +0 -13
  319. package/dist/types/taquito/src/wallet/transaction-operation.d.ts +0 -12
  320. package/dist/types/taquito/src/wallet/transfer-ticket-operation.d.ts +0 -12
  321. package/dist/types/taquito/src/wallet/wallet.d.ts +0 -196
  322. package/dist/types/taquito-core/src/errors.d.ts +0 -213
  323. package/dist/types/taquito-core/src/signer-interfaces.d.ts +0 -38
  324. package/dist/types/taquito-core/src/taquito-core.d.ts +0 -6
  325. package/dist/types/taquito-http-utils/src/errors.d.ts +0 -63
  326. package/dist/types/taquito-http-utils/src/status_code.d.ts +0 -318
  327. package/dist/types/taquito-http-utils/src/taquito-http-utils.d.ts +0 -58
  328. package/dist/types/taquito-http-utils/src/transport-errors.d.ts +0 -28
  329. package/dist/types/taquito-local-forging/src/codec.d.ts +0 -79
  330. package/dist/types/taquito-local-forging/src/constants.d.ts +0 -75
  331. package/dist/types/taquito-local-forging/src/decoder.d.ts +0 -5
  332. package/dist/types/taquito-local-forging/src/encoder.d.ts +0 -4
  333. package/dist/types/taquito-local-forging/src/errors.d.ts +0 -109
  334. package/dist/types/taquito-local-forging/src/interface.d.ts +0 -9
  335. package/dist/types/taquito-local-forging/src/michelson/codec.d.ts +0 -49
  336. package/dist/types/taquito-local-forging/src/protocols.d.ts +0 -27
  337. package/dist/types/taquito-local-forging/src/schema/operation.d.ts +0 -198
  338. package/dist/types/taquito-local-forging/src/taquito-local-forging.d.ts +0 -27
  339. package/dist/types/taquito-local-forging/src/uint8array-consumer.d.ts +0 -10
  340. package/dist/types/taquito-local-forging/src/utils.d.ts +0 -3
  341. package/dist/types/taquito-local-forging/src/validator.d.ts +0 -13
  342. package/dist/types/taquito-local-forging/src/version.d.ts +0 -4
  343. package/dist/types/taquito-michel-codec/src/base58.d.ts +0 -13
  344. package/dist/types/taquito-michel-codec/src/binary.d.ts +0 -127
  345. package/dist/types/taquito-michel-codec/src/errors.d.ts +0 -57
  346. package/dist/types/taquito-michel-codec/src/formatters.d.ts +0 -6
  347. package/dist/types/taquito-michel-codec/src/global-constants.d.ts +0 -3
  348. package/dist/types/taquito-michel-codec/src/macros.d.ts +0 -13
  349. package/dist/types/taquito-michel-codec/src/micheline-emitter.d.ts +0 -17
  350. package/dist/types/taquito-michel-codec/src/micheline-parser.d.ts +0 -130
  351. package/dist/types/taquito-michel-codec/src/micheline.d.ts +0 -44
  352. package/dist/types/taquito-michel-codec/src/michelson-contract.d.ts +0 -24
  353. package/dist/types/taquito-michel-codec/src/michelson-typecheck.d.ts +0 -38
  354. package/dist/types/taquito-michel-codec/src/michelson-types.d.ts +0 -147
  355. package/dist/types/taquito-michel-codec/src/michelson-validator.d.ts +0 -66
  356. package/dist/types/taquito-michel-codec/src/scan.d.ts +0 -26
  357. package/dist/types/taquito-michel-codec/src/taquito-michel-codec.d.ts +0 -16
  358. package/dist/types/taquito-michel-codec/src/utils.d.ts +0 -76
  359. package/dist/types/taquito-michel-codec/src/version.d.ts +0 -4
  360. package/dist/types/taquito-michelson-encoder/src/constants.d.ts +0 -8
  361. package/dist/types/taquito-michelson-encoder/src/errors.d.ts +0 -17
  362. package/dist/types/taquito-michelson-encoder/src/michelson-map.d.ts +0 -82
  363. package/dist/types/taquito-michelson-encoder/src/schema/errors.d.ts +0 -83
  364. package/dist/types/taquito-michelson-encoder/src/schema/event-schema.d.ts +0 -12
  365. package/dist/types/taquito-michelson-encoder/src/schema/parameter.d.ts +0 -54
  366. package/dist/types/taquito-michelson-encoder/src/schema/storage.d.ts +0 -97
  367. package/dist/types/taquito-michelson-encoder/src/schema/types.d.ts +0 -105
  368. package/dist/types/taquito-michelson-encoder/src/schema/view-schema.d.ts +0 -53
  369. package/dist/types/taquito-michelson-encoder/src/taquito-michelson-encoder.d.ts +0 -16
  370. package/dist/types/taquito-michelson-encoder/src/tokens/bigmap.d.ts +0 -51
  371. package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-fr.d.ts +0 -51
  372. package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-g1.d.ts +0 -47
  373. package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-g2.d.ts +0 -47
  374. package/dist/types/taquito-michelson-encoder/src/tokens/chain-id.d.ts +0 -51
  375. package/dist/types/taquito-michelson-encoder/src/tokens/chest-key.d.ts +0 -47
  376. package/dist/types/taquito-michelson-encoder/src/tokens/chest.d.ts +0 -47
  377. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/address.d.ts +0 -61
  378. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/bool.d.ts +0 -32
  379. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/bytes.d.ts +0 -52
  380. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/int.d.ts +0 -56
  381. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/key_hash.d.ts +0 -55
  382. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/mutez.d.ts +0 -53
  383. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/nat.d.ts +0 -55
  384. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/string.d.ts +0 -31
  385. package/dist/types/taquito-michelson-encoder/src/tokens/comparable/timestamp.d.ts +0 -34
  386. package/dist/types/taquito-michelson-encoder/src/tokens/constant.d.ts +0 -51
  387. package/dist/types/taquito-michelson-encoder/src/tokens/contract.d.ts +0 -48
  388. package/dist/types/taquito-michelson-encoder/src/tokens/createToken.d.ts +0 -18
  389. package/dist/types/taquito-michelson-encoder/src/tokens/key.d.ts +0 -55
  390. package/dist/types/taquito-michelson-encoder/src/tokens/lambda.d.ts +0 -24
  391. package/dist/types/taquito-michelson-encoder/src/tokens/list.d.ts +0 -46
  392. package/dist/types/taquito-michelson-encoder/src/tokens/map.d.ts +0 -47
  393. package/dist/types/taquito-michelson-encoder/src/tokens/never.d.ts +0 -41
  394. package/dist/types/taquito-michelson-encoder/src/tokens/operation.d.ts +0 -24
  395. package/dist/types/taquito-michelson-encoder/src/tokens/option.d.ts +0 -37
  396. package/dist/types/taquito-michelson-encoder/src/tokens/or.d.ts +0 -53
  397. package/dist/types/taquito-michelson-encoder/src/tokens/pair.d.ts +0 -50
  398. package/dist/types/taquito-michelson-encoder/src/tokens/sapling-state.d.ts +0 -44
  399. package/dist/types/taquito-michelson-encoder/src/tokens/sapling-transaction-deprecated.d.ts +0 -40
  400. package/dist/types/taquito-michelson-encoder/src/tokens/sapling-transaction.d.ts +0 -40
  401. package/dist/types/taquito-michelson-encoder/src/tokens/set.d.ts +0 -43
  402. package/dist/types/taquito-michelson-encoder/src/tokens/signature.d.ts +0 -53
  403. package/dist/types/taquito-michelson-encoder/src/tokens/ticket-deprecated.d.ts +0 -38
  404. package/dist/types/taquito-michelson-encoder/src/tokens/ticket.d.ts +0 -38
  405. package/dist/types/taquito-michelson-encoder/src/tokens/token.d.ts +0 -68
  406. package/dist/types/taquito-michelson-encoder/src/tokens/tokens.d.ts +0 -36
  407. package/dist/types/taquito-michelson-encoder/src/tokens/unit.d.ts +0 -34
  408. package/dist/types/taquito-michelson-encoder/src/version.d.ts +0 -4
  409. package/dist/types/taquito-rpc/src/opkind.d.ts +0 -45
  410. package/dist/types/taquito-rpc/src/rpc-client-interface.d.ts +0 -126
  411. package/dist/types/taquito-rpc/src/rpc-client-modules/rpc-cache.d.ts +0 -473
  412. package/dist/types/taquito-rpc/src/taquito-rpc.d.ts +0 -483
  413. package/dist/types/taquito-rpc/src/types.d.ts +0 -2362
  414. package/dist/types/taquito-rpc/src/utils/utils.d.ts +0 -14
  415. package/dist/types/taquito-rpc/src/version.d.ts +0 -4
  416. package/dist/types/taquito-signer/src/bls-key.d.ts +0 -21
  417. package/dist/types/taquito-signer/src/derivation-tools/ecdsa.d.ts +0 -49
  418. package/dist/types/taquito-signer/src/derivation-tools/ed25519.d.ts +0 -33
  419. package/dist/types/taquito-signer/src/derivation-tools/index.d.ts +0 -12
  420. package/dist/types/taquito-signer/src/derivation-tools/types.d.ts +0 -10
  421. package/dist/types/taquito-signer/src/derivation-tools/utils.d.ts +0 -1
  422. package/dist/types/taquito-signer/src/ec-key.d.ts +0 -42
  423. package/dist/types/taquito-signer/src/ed-key.d.ts +0 -39
  424. package/dist/types/taquito-signer/src/errors.d.ts +0 -51
  425. package/dist/types/taquito-signer/src/helpers.d.ts +0 -10
  426. package/dist/types/taquito-signer/src/in-memory-signer.d.ts +0 -56
  427. package/dist/types/taquito-signer/src/key-interface.d.ts +0 -37
  428. package/dist/types/taquito-signer/src/taquito-signer.d.ts +0 -10
  429. package/dist/types/taquito-signer/src/version.d.ts +0 -4
  430. package/dist/types/taquito-utils/src/constants.d.ts +0 -78
  431. package/dist/types/taquito-utils/src/encoding.d.ts +0 -184
  432. package/dist/types/taquito-utils/src/errors.d.ts +0 -20
  433. package/dist/types/taquito-utils/src/format.d.ts +0 -4
  434. package/dist/types/taquito-utils/src/taquito-utils.d.ts +0 -11
  435. package/dist/types/taquito-utils/src/validators.d.ts +0 -167
  436. package/dist/types/taquito-utils/src/verify-signature.d.ts +0 -22
  437. package/dist/types/taquito-utils/src/version.d.ts +0 -4
  438. package/dist/types/taquito-wallet-connect/src/version.d.ts +0 -4
  439. /package/dist/lib/{taquito-wallet-connect/src/errors.js → errors.js} +0 -0
  440. /package/dist/lib/{taquito-wallet-connect/src/types.js → types.js} +0 -0
  441. /package/dist/types/{taquito-wallet-connect/src/errors.d.ts → errors.d.ts} +0 -0
  442. /package/dist/types/{taquito-wallet-connect/src/taquito-wallet-connect.d.ts → taquito-wallet-connect.d.ts} +0 -0
  443. /package/dist/types/{taquito-wallet-connect/src/types.d.ts → types.d.ts} +0 -0
  444. /package/dist/types/{taquito-http-utils/src/version.d.ts → version.d.ts} +0 -0
@@ -1,13 +0,0 @@
1
- import { TaquitoError } from '@taquito/core';
2
- import { Prim, Expr } from './micheline';
3
- import { ProtocolOptions } from './michelson-types';
4
- /**
5
- * @category Error
6
- * Error that indicates macros failed to be expanded
7
- */
8
- export declare class MacroError extends TaquitoError {
9
- readonly prim: Prim;
10
- readonly message: string;
11
- constructor(prim: Prim, message: string);
12
- }
13
- export declare function expandMacros(ex: Prim, opt?: ProtocolOptions): Expr;
@@ -1,17 +0,0 @@
1
- import { Expr } from './micheline';
2
- export interface FormatOptions {
3
- /**
4
- * A string used for code indentation if desired. Usually a tab character or a number of spaces.
5
- */
6
- indent?: string;
7
- /**
8
- * A string used for line separation. Usually a newline character ("\n");
9
- */
10
- newline?: string;
11
- }
12
- /**
13
- * Formats Micheline expression
14
- * @param expr An AST node
15
- * @param opt Options
16
- */
17
- export declare function emitMicheline(expr: Expr, opt?: FormatOptions, foldMacros?: boolean): string;
@@ -1,130 +0,0 @@
1
- import { Token } from './scan';
2
- import { Expr } from './micheline';
3
- import { ProtocolOptions } from './michelson-types';
4
- import { TaquitoError } from '@taquito/core';
5
- /**
6
- * @category Error
7
- * Error that indicates a failure when parsing Micheline expressions
8
- */
9
- export declare class MichelineParseError extends TaquitoError {
10
- readonly token: Token | null;
11
- readonly message: string;
12
- /**
13
- * @param token A token caused the error
14
- * @param message An error message
15
- */
16
- constructor(token: Token | null, message: string);
17
- }
18
- /**
19
- * @category Error
20
- * Error indicates a failure when parsing Micheline JSON
21
- */
22
- export declare class JSONParseError extends TaquitoError {
23
- readonly node: unknown;
24
- readonly message: string;
25
- /**
26
- * @param node A node caused the error
27
- * @param message An error message
28
- */
29
- constructor(node: unknown, message: string);
30
- }
31
- export interface GlobalConstantHashAndValue {
32
- [globalConstantHash: string]: Expr;
33
- }
34
- export interface ParserOptions extends ProtocolOptions {
35
- /**
36
- * Expand [Michelson macros](https://tezos.gitlab.io/whitedoc/michelson.html#macros) during parsing.
37
- */
38
- expandMacros?: boolean;
39
- /**
40
- * Expand global constants during parsing.
41
- * `expandGlobalConstant` expects an object where the keys are global constant hashes and the values are the corresponding JSON Micheline expressions.
42
- * @example
43
- * ```
44
- * const parserOptions: ParserOptions = {
45
- * expandGlobalConstant: {
46
- * 'expr...': { prim: 'DROP', args: [{ int: '2' }] }
47
- * }
48
- * }
49
- *
50
- * const p = new Parser(parserOptions);
51
- * ```
52
- */
53
- expandGlobalConstant?: GlobalConstantHashAndValue;
54
- }
55
- /**
56
- * Converts and validates Michelson expressions between JSON-based Michelson and Micheline
57
- *
58
- * Pretty Print a Michelson Smart Contract:
59
- * ```
60
- * const contract = await Tezos.contract.at("KT1Vsw3kh9638gqWoHTjvHCoHLPKvCbMVbCg");
61
- * const p = new Parser();
62
- *
63
- * const michelsonCode = p.parseJSON(contract.script.code);
64
- * const storage = p.parseJSON(contract.script.storage);
65
- *
66
- * console.log("Pretty print Michelson smart contract:");
67
- * console.log(emitMicheline(michelsonCode, {indent:" ", newline: "\n",}));
68
- *
69
- * console.log("Pretty print Storage:");
70
- * console.log(emitMicheline(storage, {indent:" ", newline: "\n",}));
71
- * ```
72
- *
73
- * Encode a Michelson expression for initial storage of a smart contract
74
- * ```
75
- * const src = `(Pair (Pair { Elt 1
76
- * (Pair (Pair "tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN" "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx")
77
- * 0x0501000000026869) }
78
- * 10000000)
79
- * (Pair 2 333))`;
80
- *
81
- * const p = new Parser();
82
- *
83
- * const exp = p.parseMichelineExpression(src);
84
- * console.log(JSON.stringify(exp));
85
- * ```
86
- */
87
- export declare class Parser {
88
- private opt?;
89
- constructor(opt?: ParserOptions | undefined);
90
- private expand;
91
- private parseListExpr;
92
- private parseArgs;
93
- private parseSequenceExpr;
94
- private parseExpr;
95
- /**
96
- * Parses a Micheline sequence expression, such as smart contract source. Enclosing curly brackets may be omitted.
97
- * @param src A Micheline sequence `{parameter ...; storage int; code { DUP ; ...};}` or `parameter ...; storage int; code { DUP ; ...};`
98
- */
99
- parseSequence(src: string): Expr[] | null;
100
- /**
101
- * Parse a Micheline sequence expression. Enclosing curly brackets may be omitted.
102
- * @param src A Michelson list expression such as `(Pair {Elt "0" 0} 0)` or `Pair {Elt "0" 0} 0`
103
- * @returns An AST node or null for empty document.
104
- */
105
- parseList(src: string): Expr | null;
106
- /**
107
- * Parse any Michelson expression
108
- * @param src A Michelson expression such as `(Pair {Elt "0" 0} 0)` or `{parameter ...; storage int; code { DUP ; ...};}`
109
- * @returns An AST node or null for empty document.
110
- */
111
- parseMichelineExpression(src: string): Expr | null;
112
- /**
113
- * Parse a Micheline sequence expression, such as smart contract source. Enclosing curly brackets may be omitted.
114
- * An alias for `parseSequence`
115
- * @param src A Micheline sequence `{parameter ...; storage int; code { DUP ; ...};}` or `parameter ...; storage int; code { DUP ; ...};`
116
- */
117
- parseScript(src: string): Expr[] | null;
118
- /**
119
- * Parse a Micheline sequence expression. Enclosing curly brackets may be omitted.
120
- * An alias for `parseList`
121
- * @param src A Michelson list expression such as `(Pair {Elt "0" 0} 0)` or `Pair {Elt "0" 0} 0`
122
- * @returns An AST node or null for empty document.
123
- */
124
- parseData(src: string): Expr | null;
125
- /**
126
- * Takes a JSON-encoded Michelson, validates it, strips away unneeded properties and optionally expands macros (See {@link ParserOptions}).
127
- * @param src An object containing JSON-encoded Michelson, usually returned by `JSON.parse()`
128
- */
129
- parseJSON(src: object): Expr;
130
- }
@@ -1,44 +0,0 @@
1
- export type SourceReference = {
2
- first: number;
3
- last: number;
4
- macro?: Expr;
5
- globalConstant?: Expr;
6
- };
7
- export declare const sourceReference: unique symbol;
8
- export interface Node {
9
- [sourceReference]?: SourceReference;
10
- }
11
- /**
12
- * An AST node representing Michelson string literal.
13
- */
14
- export interface StringLiteral extends Node {
15
- string: string;
16
- }
17
- /**
18
- * An AST node representing Michelson int literal.
19
- */
20
- export interface IntLiteral<T extends string = string> extends Node {
21
- int: T;
22
- }
23
- /**
24
- * An AST node representing Michelson bytes literal.
25
- */
26
- export interface BytesLiteral extends Node {
27
- bytes: string;
28
- }
29
- /**
30
- * An AST node representing Michelson primitive.
31
- */
32
- export interface Prim<PT extends string = string, AT extends Expr[] = Expr[]> extends Node {
33
- prim: PT;
34
- args?: AT;
35
- annots?: string[];
36
- }
37
- export type List<T extends Expr> = T[] & Node;
38
- interface ExprList extends List<Expr> {
39
- }
40
- /**
41
- * An AST node representing valid Michelson expression. Directly corresponds to JSON-encoded Michelson node
42
- */
43
- export type Expr = Prim | StringLiteral | IntLiteral | BytesLiteral | ExprList;
44
- export {};
@@ -1,24 +0,0 @@
1
- import { MichelsonContract, MichelsonContractSection, MichelsonType, MichelsonData, MichelsonCode, MichelsonReturnType } from './michelson-types';
2
- import { InstructionTrace } from './michelson-typecheck';
3
- import { ParserOptions } from './micheline-parser';
4
- export interface ContractOptions extends ParserOptions {
5
- traceCallback?: (t: InstructionTrace) => void;
6
- }
7
- export declare class Contract {
8
- readonly contract: MichelsonContract;
9
- private ctx;
10
- readonly output: MichelsonReturnType;
11
- constructor(contract: MichelsonContract, opt?: ContractOptions);
12
- static parse(src: string | object, opt?: ContractOptions): Contract;
13
- static parseTypeExpression(src: string | object, opt?: ParserOptions): MichelsonType;
14
- static parseDataExpression(src: string | object, opt?: ParserOptions): MichelsonData;
15
- section<T extends 'parameter' | 'storage' | 'code'>(section: T): MichelsonContractSection<T>;
16
- entryPoints(): [string, MichelsonType][];
17
- entryPoint(ep?: string): MichelsonType | null;
18
- assertDataValid(d: MichelsonData, t: MichelsonType): void;
19
- isDataValid(d: MichelsonData, t: MichelsonType): boolean;
20
- assertParameterValid(ep: string | null, d: MichelsonData): void;
21
- isParameterValid(ep: string | null, d: MichelsonData): boolean;
22
- functionType(inst: MichelsonCode, stack: MichelsonType[]): MichelsonReturnType;
23
- }
24
- export declare const dummyContract: Contract;
@@ -1,38 +0,0 @@
1
- import { MichelsonType, MichelsonData, MichelsonCode, MichelsonContract, MichelsonContractSection, MichelsonReturnType, MichelsonContractView } from './michelson-types';
2
- import { MichelsonError } from './utils';
3
- import { ParserOptions } from './micheline-parser';
4
- export interface Context extends ParserOptions {
5
- contract?: MichelsonContract;
6
- traceCallback?: (t: InstructionTrace) => void;
7
- }
8
- export declare class MichelsonInstructionError extends MichelsonError<MichelsonCode> {
9
- readonly val: MichelsonCode;
10
- readonly stackState: MichelsonReturnType;
11
- readonly message: string;
12
- /**
13
- * @param val Value of a type node caused the error
14
- * @param stackState Current stack state
15
- * @param message An error message
16
- */
17
- constructor(val: MichelsonCode, stackState: MichelsonReturnType, message: string);
18
- }
19
- export declare function assertTypeAnnotationsValid(t: MichelsonType, field?: boolean): void;
20
- export interface InstructionTrace {
21
- op: MichelsonCode;
22
- in: MichelsonType[];
23
- out: MichelsonReturnType;
24
- }
25
- export declare function contractSection<T extends 'parameter' | 'storage' | 'code'>(contract: MichelsonContract, section: T): MichelsonContractSection<T>;
26
- export declare function contractViews(contract: MichelsonContract): {
27
- [name: string]: MichelsonContractView;
28
- };
29
- export declare function contractEntryPoint(src: MichelsonContract | MichelsonType, ep?: string): MichelsonType | null;
30
- export declare function contractEntryPoints(src: MichelsonContract | MichelsonType): [string, MichelsonType][];
31
- export declare function assertContractValid(contract: MichelsonContract, ctx?: Context): MichelsonReturnType;
32
- export declare function assertDataValid(d: MichelsonData, t: MichelsonType, ctx?: Context): void;
33
- export declare function functionType(inst: MichelsonCode, stack: MichelsonType[], ctx?: Context): MichelsonReturnType;
34
- export declare function assertTypesEqual<T1 extends MichelsonType | MichelsonType[], T2 extends T1>(a: T1, b: T2, field?: boolean): void;
35
- export declare function isTypeAnnotationsValid(t: MichelsonType, field?: boolean): boolean;
36
- export declare function isContractValid(contract: MichelsonContract, ctx?: Context): MichelsonReturnType | null;
37
- export declare function isDataValid(d: MichelsonData, t: MichelsonType, ctx?: Context): boolean;
38
- export declare function isTypeEqual<T1 extends MichelsonType | MichelsonType[], T2 extends T1>(a: T1, b: T2, field?: boolean): boolean;
@@ -1,147 +0,0 @@
1
- import { Prim, Expr, IntLiteral, StringLiteral, BytesLiteral, List, Node } from './micheline';
2
- interface Prim0<PT extends string = string> extends Prim<PT> {
3
- args?: never;
4
- }
5
- interface PrimX<PT extends string = string, AT extends Expr[] = Expr[]> extends Prim<PT, AT> {
6
- args: AT;
7
- }
8
- type MichelsonNoArgInstructionID = 'ABS' | 'ADD' | 'ADDRESS' | 'AMOUNT' | 'AND' | 'APPLY' | 'BALANCE' | 'BLAKE2B' | 'CAR' | 'CDR' | 'CHAIN_ID' | 'CHECK_SIGNATURE' | 'COMPARE' | 'CONCAT' | 'CONS' | 'EDIV' | 'EQ' | 'EXEC' | 'FAILWITH' | 'GE' | 'GET_AND_UPDATE' | 'GT' | 'HASH_KEY' | 'IMPLICIT_ACCOUNT' | 'INT' | 'ISNAT' | 'JOIN_TICKETS' | 'KECCAK' | 'LE' | 'LEVEL' | 'LSL' | 'LSR' | 'LT' | 'MEM' | 'MUL' | 'NEG' | 'NEQ' | 'NEVER' | 'NOT' | 'NOW' | 'OR' | 'PACK' | 'PAIRING_CHECK' | 'READ_TICKET' | 'SAPLING_VERIFY_UPDATE' | 'SELF' | 'SELF_ADDRESS' | 'SENDER' | 'SET_DELEGATE' | 'SHA256' | 'SHA3' | 'SHA512' | 'SIZE' | 'SLICE' | 'SOME' | 'SOURCE' | 'SPLIT_TICKET' | 'SUB' | 'SUB_MUTEZ' | 'SWAP' | 'TICKET' | 'TICKET_DEPRECATED' | 'TOTAL_VOTING_POWER' | 'TRANSFER_TOKENS' | 'UNIT' | 'VOTING_POWER' | 'XOR' | 'RENAME' | 'OPEN_CHEST' | 'MIN_BLOCK_TIME' | 'BYTES' | 'NAT' | 'IS_IMPLICIT_ACCOUNT' | 'INDEX_ADDRESS' | 'GET_ADDRESS_INDEX';
9
- type MichelsonRegularInstructionID = 'CONTRACT' | 'CREATE_CONTRACT' | 'DIG' | 'DIP' | 'DROP' | 'DUG' | 'DUP' | 'EMPTY_BIG_MAP' | 'EMPTY_MAP' | 'EMPTY_SET' | 'GET' | 'IF' | 'IF_CONS' | 'IF_LEFT' | 'IF_NONE' | 'ITER' | 'LAMBDA' | 'LAMBDA_REC' | 'LEFT' | 'LOOP' | 'LOOP_LEFT' | 'MAP' | 'NIL' | 'NONE' | 'PAIR' | 'PUSH' | 'RIGHT' | 'SAPLING_EMPTY_STATE' | 'UNPACK' | 'UNPAIR' | 'UPDATE' | 'CAST' | 'VIEW' | 'EMIT' | 'CREATE_ACCOUNT' | 'STEPS_TO_QUOTA';
10
- export type MichelsonInstructionID = MichelsonNoArgInstructionID | MichelsonRegularInstructionID;
11
- type InstrPrim<PT extends MichelsonInstructionID, AT extends Expr[]> = Prim<PT, AT>;
12
- type Instr0<PT extends MichelsonNoArgInstructionID> = Prim0<PT>;
13
- type InstrX<PT extends MichelsonRegularInstructionID, AT extends Expr[]> = PrimX<PT, AT>;
14
- export type MichelsonCode = InstructionList | MichelsonInstruction;
15
- export interface InstructionList extends List<MichelsonCode> {
16
- }
17
- export type MichelsonNoArgInstruction = Instr0<MichelsonNoArgInstructionID>;
18
- export type MichelsonInstruction = MichelsonNoArgInstruction | InstrX<'DIG' | 'DUG' | 'SAPLING_EMPTY_STATE', [IntLiteral]> | InstrX<'NONE' | 'LEFT' | 'RIGHT' | 'NIL' | 'CAST', [MichelsonType]> | InstrX<'IF_NONE' | 'IF_LEFT' | 'IF_CONS' | 'IF', [InstructionList, InstructionList]> | InstrX<'MAP' | 'ITER' | 'LOOP' | 'LOOP_LEFT' | 'DIP', [InstructionList]> | InstrX<'UNPACK', [MichelsonType]> | InstrX<'CONTRACT', [MichelsonType]> | InstrX<'CREATE_CONTRACT', [MichelsonContract]> | InstrX<'PUSH', [MichelsonType, MichelsonData]> | InstrX<'EMPTY_SET', [MichelsonType]> | InstrX<'EMPTY_MAP', [MichelsonType, MichelsonType]> | InstrX<'EMPTY_BIG_MAP', [MichelsonType, MichelsonType]> | InstrX<'LAMBDA' | 'LAMBDA_REC', [MichelsonType, MichelsonType, InstructionList]> | InstrX<'DIP', [IntLiteral, InstructionList] | [InstructionList]> | InstrX<'VIEW', [StringLiteral, MichelsonType]> | InstrX<'EMIT', [MichelsonType]> | InstrPrim<'DROP' | 'PAIR' | 'UNPAIR' | 'DUP' | 'GET' | 'UPDATE', [IntLiteral]>;
19
- export type MichelsonSimpleComparableTypeID = 'string' | 'nat' | 'int' | 'bytes' | 'bool' | 'mutez' | 'key_hash' | 'address' | 'timestamp' | 'never' | 'key' | 'unit' | 'signature' | 'chain_id' | 'tx_rollup_l2_address';
20
- export type MichelsonTypeID = MichelsonSimpleComparableTypeID | 'option' | 'list' | 'set' | 'contract' | 'operation' | 'pair' | 'or' | 'lambda' | 'map' | 'big_map' | 'sapling_transaction' | 'sapling_transaction_deprecated' | 'sapling_state' | 'ticket' | 'bls12_381_g1' | 'bls12_381_g2' | 'bls12_381_fr' | 'chest_key' | 'chest';
21
- type Type0<PT extends MichelsonTypeID> = Prim0<PT>;
22
- type TypeX<PT extends MichelsonTypeID, AT extends Expr[]> = PrimX<PT, AT>;
23
- export declare const refContract: unique symbol;
24
- export interface MichelsonTypeAddress extends Type0<'address'> {
25
- [refContract]?: MichelsonTypeContract<MichelsonType>;
26
- }
27
- export type MichelsonTypeInt = Type0<'int'>;
28
- export type MichelsonTypeNat = Type0<'nat'>;
29
- export type MichelsonTypeString = Type0<'string'>;
30
- export type MichelsonTypeBytes = Type0<'bytes'>;
31
- export type MichelsonTypeMutez = Type0<'mutez'>;
32
- export type MichelsonTypeBool = Type0<'bool'>;
33
- export type MichelsonTypeKeyHash = Type0<'key_hash'>;
34
- export type MichelsonTypeTimestamp = Type0<'timestamp'>;
35
- export type MichelsonTypeKey = Type0<'key'>;
36
- export type MichelsonTypeUnit = Type0<'unit'>;
37
- export type MichelsonTypeSignature = Type0<'signature'>;
38
- export type MichelsonTypeOperation = Type0<'operation'>;
39
- export type MichelsonTypeChainID = Type0<'chain_id'>;
40
- export type MichelsonTypeNever = Type0<'never'>;
41
- export type MichelsonTypeBLS12_381_G1 = Type0<'bls12_381_g1'>;
42
- export type MichelsonTypeBLS12_381_G2 = Type0<'bls12_381_g2'>;
43
- export type MichelsonTypeBLS12_381_FR = Type0<'bls12_381_fr'>;
44
- export type MichelsonTypeChestKey = Type0<'chest_key'>;
45
- export type MichelsonTypeChest = Type0<'chest'>;
46
- type TypeList<T extends MichelsonType[]> = T & Node;
47
- export type MichelsonTypePair<T extends MichelsonType[]> = TypeX<'pair', T> | TypeList<T>;
48
- export interface MichelsonTypeOption<T extends MichelsonType> extends TypeX<'option', [T]> {
49
- }
50
- export interface MichelsonTypeList<T extends MichelsonType> extends TypeX<'list', [T]> {
51
- }
52
- export interface MichelsonTypeContract<T extends MichelsonType> extends TypeX<'contract', [T]> {
53
- }
54
- export interface MichelsonTypeOr<T extends [MichelsonType, MichelsonType]> extends TypeX<'or', T> {
55
- }
56
- export interface MichelsonTypeLambda<Arg extends MichelsonType, Ret extends MichelsonType> extends TypeX<'lambda', [Arg, Ret]> {
57
- }
58
- export interface MichelsonTypeSet<T extends MichelsonType> extends TypeX<'set', [T]> {
59
- }
60
- export interface MichelsonTypeMap<K extends MichelsonType, V extends MichelsonType> extends TypeX<'map', [K, V]> {
61
- }
62
- export interface MichelsonTypeBigMap<K extends MichelsonType, V extends MichelsonType> extends TypeX<'big_map', [K, V]> {
63
- }
64
- export interface MichelsonTypeSaplingState<S extends string = string> extends TypeX<'sapling_state', [IntLiteral<S>]> {
65
- }
66
- export interface MichelsonTypeSaplingTransaction<S extends string = string> extends TypeX<'sapling_transaction', [IntLiteral<S>]> {
67
- }
68
- export interface MichelsonTypeTicket<T extends MichelsonType> extends TypeX<'ticket', [T]> {
69
- }
70
- export type MichelsonType<T extends MichelsonTypeID = MichelsonTypeID> = T extends 'int' ? MichelsonTypeInt : T extends 'nat' ? MichelsonTypeNat : T extends 'string' ? MichelsonTypeString : T extends 'bytes' ? MichelsonTypeBytes : T extends 'mutez' ? MichelsonTypeMutez : T extends 'bool' ? MichelsonTypeBool : T extends 'key_hash' ? MichelsonTypeKeyHash : T extends 'timestamp' ? MichelsonTypeTimestamp : T extends 'address' ? MichelsonTypeAddress : T extends 'key' ? MichelsonTypeKey : T extends 'unit' ? MichelsonTypeUnit : T extends 'signature' ? MichelsonTypeSignature : T extends 'operation' ? MichelsonTypeOperation : T extends 'chain_id' ? MichelsonTypeChainID : T extends 'option' ? MichelsonTypeOption<MichelsonType> : T extends 'list' ? MichelsonTypeList<MichelsonType> : T extends 'contract' ? MichelsonTypeContract<MichelsonType> : T extends 'ticket' ? MichelsonTypeTicket<MichelsonType> : T extends 'pair' ? MichelsonTypePair<MichelsonType[]> : T extends 'or' ? MichelsonTypeOr<[MichelsonType, MichelsonType]> : T extends 'lambda' ? MichelsonTypeLambda<MichelsonType, MichelsonType> : T extends 'set' ? MichelsonTypeSet<MichelsonType> : T extends 'map' ? MichelsonTypeMap<MichelsonType, MichelsonType> : T extends 'big_map' ? MichelsonTypeBigMap<MichelsonType, MichelsonType> : T extends 'never' ? MichelsonTypeNever : T extends 'bls12_381_g1' ? MichelsonTypeBLS12_381_G1 : T extends 'bls12_381_g2' ? MichelsonTypeBLS12_381_G2 : T extends 'bls12_381_fr' ? MichelsonTypeBLS12_381_FR : T extends 'sapling_transaction' ? MichelsonTypeSaplingTransaction : T extends 'sapling_state' ? MichelsonTypeSaplingState : T extends 'chest_key' ? MichelsonTypeChestKey : MichelsonTypeChest;
71
- export type MichelsonDataID = 'Unit' | 'True' | 'False' | 'None' | 'Pair' | 'Left' | 'Right' | 'Some' | 'Lambda_rec' | 'Ticket';
72
- type Data0<PT extends MichelsonDataID> = Prim0<PT>;
73
- type DataX<PT extends MichelsonDataID, AT extends MichelsonData[]> = PrimX<PT, AT>;
74
- export type MichelsonDataOption = DataX<'Some', [MichelsonData]> | Data0<'None'>;
75
- export type MichelsonDataOr = DataX<'Left' | 'Right', [MichelsonData]>;
76
- type DataList<T extends MichelsonData[]> = T & Node;
77
- export type MichelsonDataPair<T extends MichelsonData[]> = DataX<'Pair', T> | DataList<T>;
78
- export type MichelsonMapElt = PrimX<'Elt', [MichelsonData, MichelsonData]>;
79
- export type MichelsonMapEltList = List<MichelsonMapElt>;
80
- export type MichelsonLambdaRec = DataX<'Lambda_rec', [InstructionList]>;
81
- export type MichelsonTicket = PrimX<'Ticket', [
82
- StringLiteral | BytesLiteral,
83
- MichelsonType,
84
- MichelsonData,
85
- IntLiteral
86
- ]>;
87
- export type MichelsonData = IntLiteral | StringLiteral | BytesLiteral | Data0<'Unit' | 'True' | 'False'> | MichelsonDataOption | MichelsonDataOr | DataList<MichelsonData[]> | MichelsonDataPair<MichelsonData[]> | InstructionList | MichelsonMapEltList | MichelsonLambdaRec | MichelsonTicket;
88
- export type MichelsonSectionID = 'parameter' | 'storage' | 'code' | 'view';
89
- type SectionPrim<PT extends MichelsonSectionID, AT extends Expr[]> = PrimX<PT, AT>;
90
- export type MichelsonContractParameter = SectionPrim<'parameter', [MichelsonType]>;
91
- export type MichelsonContractStorage = SectionPrim<'storage', [MichelsonType]>;
92
- export type MichelsonContractCode = SectionPrim<'code', [InstructionList]>;
93
- export type MichelsonContractView = SectionPrim<'view', [
94
- StringLiteral,
95
- MichelsonType,
96
- MichelsonType,
97
- InstructionList
98
- ]>;
99
- export type MichelsonContract = MichelsonContractSection[];
100
- export type MichelsonContractSection<T extends MichelsonSectionID = MichelsonSectionID> = T extends 'parameter' ? MichelsonContractParameter : T extends 'storage' ? MichelsonContractStorage : T extends 'view' ? MichelsonContractView : MichelsonContractCode;
101
- export interface MichelsonTypeFailed {
102
- failed: MichelsonType;
103
- level: number;
104
- }
105
- export type MichelsonReturnType = MichelsonType[] | MichelsonTypeFailed;
106
- export declare enum Protocol {
107
- Ps9mPmXa = "Ps9mPmXaRzmzk35gbAYNCAw6UXdE2qoABTHbN2oEEc1qM7CwT9P",
108
- PtCJ7pwo = "PtCJ7pwoxe8JasnHY8YonnLYjcVHmhiARPJvqcC6VfHT5s8k8sY",
109
- PsYLVpVv = "PsYLVpVvgbLhAhoqAkMFUo6gudkJ9weNXhUYCiLDzcUpFpkk8Wt",
110
- PsddFKi3 = "PsddFKi32cMJ2qPjf43Qv5GDWLDPZb3T3bF6fLKiF5HtvHNU7aP",
111
- Pt24m4xi = "Pt24m4xiPbLDhVgVfABUjirbmda3yohdN82Sp9FeuAXJ4eV9otd",
112
- PsBABY5H = "PsBABY5HQTSkA4297zNHfsZNKtxULfL18y95qb3m53QJiXGmrbU",
113
- PsBabyM1 = "PsBabyM1eUXZseaJdmXFApDSBqj8YBfwELoxZHHW77EMcAbbwAS",
114
- PsCARTHA = "PsCARTHAGazKbHtnKfLzQg3kms52kSRpgnDY982a9oYsSXRLQEb",
115
- PsDELPH1 = "PsDELPH1Kxsxt8f9eWbxQeRxkjfbxoqM52jvs5Y5fBxWWh4ifpo",
116
- PtEdoTez = "PtEdoTezd3RHSC31mpxxo1npxFjoWWcFgQtxapi51Z8TLu6v6Uq",
117
- PtEdo2Zk = "PtEdo2ZkT9oKpimTah6x2embF25oss54njMuPzkJTEi5RqfdZFA",
118
- PsFLorena = "PsFLorenaUUuikDWvMDr6fGBRG8kt3e3D3fHoXK1j1BFRxeSH4i",
119
- PtGRANADs = "PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV",
120
- PtHangzH = "PtHangzHogokSuiMHemCuowEavgYTP8J5qQ9fQS793MHYFpCY3r",
121
- PtHangz2 = "PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx",
122
- PsiThaCa = "PsiThaCaT47Zboaw71QWScM8sXeMM7bbQFncK9FLqYc6EKdpjVP",
123
- Psithaca2 = "Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A",
124
- PtJakarta = "PtJakartaiDz69SfDDLXJSiuZqTSeSKRDbKVZC8MNzJnvRjvnGw",
125
- PtJakart2 = "PtJakart2xVj7pYXJBXrqHgd82rdkLey5ZeeGwDgPp9rhQUbSqY",
126
- PtKathman = "PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg",
127
- PtLimaPtL = "PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW",
128
- PtMumbaii = "PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc",
129
- PtMumbai2 = "PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1",
130
- PtNairobi = "PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf",
131
- ProxfordY = "ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH",
132
- PtParisBx = "PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ",
133
- PsParisCZ = "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi",
134
- PsQuebecn = "PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg",
135
- PsRiotuma = "PsRiotumaAMotcRoDWW1bysEhQy2n1M5fy8JgRp8jjRfHGmfeA7",
136
- PtSeouLou = "PtSeouLouXkxhg39oWzjxDWaCydNfR3RxCUrNe4Q9Ro8BTehcbh",
137
- PtTALLiNt = "PtTALLiNtPec7mE7yY4m3k26J8Qukef3E3ehzhfXgFZKGtDdAXu",
138
- ProtoALpha = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK"
139
- }
140
- export declare const DefaultProtocol = Protocol.PtTALLiNt;
141
- export type ProtocolID = `${Protocol}`;
142
- export declare function ProtoGreaterOrEqual(a: ProtocolID, b: ProtocolID): boolean;
143
- export declare function ProtoInferiorTo(a: ProtocolID, b: ProtocolID): boolean;
144
- export interface ProtocolOptions {
145
- protocol?: ProtocolID;
146
- }
147
- export {};
@@ -1,66 +0,0 @@
1
- import { Prim, Expr, StringLiteral } from './micheline';
2
- import { MichelsonError } from './utils';
3
- import { MichelsonCode, MichelsonType, MichelsonData, MichelsonContract, MichelsonInstruction, InstructionList } from './michelson-types';
4
- export declare const instructionIDs: Record<MichelsonInstruction['prim'], true>;
5
- export declare class MichelsonValidationError extends MichelsonError {
6
- readonly val: Expr;
7
- readonly message: string;
8
- /**
9
- * @param val Value of a node caused the error
10
- * @param message An error message
11
- */
12
- constructor(val: Expr, message: string);
13
- }
14
- /**
15
- * Checks if the node is a valid Michelson code (sequence of instructions).
16
- * This is a type guard function which either returns true of throws an exception.
17
- * @param ex An AST node
18
- */
19
- export declare function assertMichelsonInstruction(ex: Expr): ex is MichelsonCode;
20
- export declare function assertMichelsonComparableType(ex: Expr): ex is MichelsonType;
21
- export declare function assertMichelsonPackableType(ex: Expr): ex is MichelsonType;
22
- export declare function assertMichelsonPushableType(ex: Expr): ex is MichelsonType;
23
- export declare function assertMichelsonStorableType(ex: Expr): ex is MichelsonType;
24
- export declare function assertMichelsonPassableType(ex: Expr): ex is MichelsonType;
25
- export declare function assertMichelsonBigMapStorableType(ex: Expr): ex is MichelsonType;
26
- export declare function assertViewNameValid(name: StringLiteral): void;
27
- /**
28
- * Checks if the node is a valid Michelson type expression.
29
- * This is a type guard function which either returns true of throws an exception.
30
- * @param ex An AST node
31
- */
32
- export declare function assertMichelsonType(ex: Expr): ex is MichelsonType;
33
- /**
34
- * Checks if the node is a valid Michelson data literal such as `(Pair {Elt "0" 0} 0)`.
35
- * This is a type guard function which either returns true of throws an exception.
36
- * @param ex An AST node
37
- */
38
- export declare function assertMichelsonData(ex: Expr): ex is MichelsonData;
39
- /**
40
- * Checks if the node is a valid Michelson smart contract source containing all required and valid properties such as `parameter`, `storage` and `code`.
41
- * This is a type guard function which either returns true of throws an exception.
42
- * @param ex An AST node
43
- */
44
- export declare function assertMichelsonContract(ex: Expr): ex is MichelsonContract;
45
- /**
46
- * Checks if the node is a valid Michelson smart contract source containing all required and valid properties such as `parameter`, `storage` and `code`.
47
- * @param ex An AST node
48
- */
49
- export declare function isMichelsonScript(ex: Expr): ex is MichelsonContract;
50
- /**
51
- * Checks if the node is a valid Michelson data literal such as `(Pair {Elt "0" 0} 0)`.
52
- * @param ex An AST node
53
- */
54
- export declare function isMichelsonData(ex: Expr): ex is MichelsonData;
55
- /**
56
- * Checks if the node is a valid Michelson code (sequence of instructions).
57
- * @param ex An AST node
58
- */
59
- export declare function isMichelsonCode(ex: Expr): ex is InstructionList;
60
- /**
61
- * Checks if the node is a valid Michelson type expression.
62
- * @param ex An AST node
63
- */
64
- export declare function isMichelsonType(ex: Expr): ex is MichelsonType;
65
- export declare function isInstruction(p: Prim): p is MichelsonInstruction;
66
- export declare function assertDataListIfAny(d: MichelsonData): d is MichelsonData[];
@@ -1,26 +0,0 @@
1
- import { TaquitoError } from '@taquito/core';
2
- /**
3
- * @category Error
4
- * Error that indicates a failure when performing the scan step when parsing Michelson
5
- */
6
- export declare class ScanError extends TaquitoError {
7
- readonly src: string;
8
- readonly idx: number;
9
- readonly message: string;
10
- constructor(src: string, idx: number, message: string);
11
- }
12
- export declare enum Literal {
13
- Comment = 0,
14
- Number = 1,
15
- String = 2,
16
- Bytes = 3,
17
- Ident = 4
18
- }
19
- export type TokenType = '(' | ')' | '{' | '}' | ';' | Literal;
20
- export interface Token {
21
- t: TokenType;
22
- v: string;
23
- first: number;
24
- last: number;
25
- }
26
- export declare function scan(src: string, scanComments?: boolean): Generator<Token, void>;
@@ -1,16 +0,0 @@
1
- /**
2
- * @packageDocumentation
3
- * @module @taquito/michel-codec
4
- */
5
- export * from './micheline';
6
- export * from './micheline-parser';
7
- export * from './micheline-emitter';
8
- export * from './michelson-validator';
9
- export * from './michelson-types';
10
- export * from './michelson-typecheck';
11
- export * from './michelson-contract';
12
- export * from './formatters';
13
- export * from './binary';
14
- export { MichelsonError, isMichelsonError, MichelsonTypeError } from './utils';
15
- export { MacroError } from './macros';
16
- export { VERSION } from './version';
@@ -1,76 +0,0 @@
1
- import { Prim, Expr, StringLiteral, IntLiteral } from './micheline';
2
- import { MichelsonData, MichelsonDataPair, MichelsonType, MichelsonTypePair } from './michelson-types';
3
- import { TaquitoError } from '@taquito/core';
4
- export type Tuple<N extends number, T> = N extends 1 ? [T] : N extends 2 ? [T, T] : N extends 3 ? [T, T, T] : N extends 4 ? [T, T, T, T] : N extends 5 ? [T, T, T, T, T] : N extends 6 ? [T, T, T, T, T, T] : N extends 7 ? [T, T, T, T, T, T, T] : N extends 8 ? [T, T, T, T, T, T, T, T] : T[];
5
- type RequiredProp<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
6
- type OmitProp<T, K extends keyof T> = Omit<T, K> & {
7
- [P in K]?: undefined;
8
- };
9
- export type ReqArgs<T extends Prim> = RequiredProp<T, 'args'>;
10
- export type NoArgs<T extends Prim> = OmitProp<T, 'args'>;
11
- export type NoAnnots<T extends Prim> = OmitProp<T, 'annots'>;
12
- export type Nullable<T> = {
13
- [P in keyof T]: T[P] | null;
14
- };
15
- /**
16
- * @category Error
17
- * Error that indicates a Michelson failure occurring
18
- */
19
- export declare class MichelsonError<T extends Expr = Expr> extends TaquitoError {
20
- readonly val: T;
21
- readonly message: string;
22
- /**
23
- * @param val Value of a AST node caused the error
24
- * @param message An error message
25
- */
26
- constructor(val: T, message: string);
27
- }
28
- export declare function isMichelsonError<T extends Expr = Expr>(err: unknown): err is MichelsonError<T>;
29
- export declare class MichelsonTypeError extends MichelsonError<MichelsonType | MichelsonType[]> {
30
- readonly val: MichelsonType | MichelsonType[];
31
- readonly message: string;
32
- data?: Expr;
33
- /**
34
- * @param val Value of a type node caused the error
35
- * @param data Value of a data node caused the error
36
- * @param message An error message
37
- */
38
- constructor(val: MichelsonType | MichelsonType[], message: string, data?: Expr);
39
- }
40
- export declare class LongInteger {
41
- private neg;
42
- private buf;
43
- private append;
44
- constructor(arg?: string | number);
45
- cmp(arg: LongInteger): number;
46
- get sign(): number;
47
- }
48
- export declare function parseBytes(s: string): number[] | null;
49
- export declare function compareBytes(a: number[] | Uint8Array, b: number[] | Uint8Array): number;
50
- export declare function isDecimal(x: string): boolean;
51
- export declare function isNatural(x: string): boolean;
52
- export interface UnpackedAnnotations {
53
- f?: string[];
54
- t?: string[];
55
- v?: string[];
56
- }
57
- export interface UnpackAnnotationsOptions {
58
- specialVar?: boolean;
59
- emptyVar?: boolean;
60
- specialFields?: boolean;
61
- emptyFields?: boolean;
62
- }
63
- export declare function unpackAnnotations(p: Prim | Expr[], opt?: UnpackAnnotationsOptions): UnpackedAnnotations;
64
- export type TezosIDType = 'BlockHash' | 'OperationHash' | 'OperationListHash' | 'OperationListListHash' | 'ProtocolHash' | 'ContextHash' | 'ED25519PublicKeyHash' | 'SECP256K1PublicKeyHash' | 'P256PublicKeyHash' | 'ContractHash' | 'CryptoboxPublicKeyHash' | 'ED25519Seed' | 'ED25519PublicKey' | 'SECP256K1SecretKey' | 'P256SecretKey' | 'ED25519EncryptedSeed' | 'SECP256K1EncryptedSecretKey' | 'P256EncryptedSecretKey' | 'SECP256K1PublicKey' | 'P256PublicKey' | 'SECP256K1Scalar' | 'SECP256K1Element' | 'ED25519SecretKey' | 'ED25519Signature' | 'SECP256K1Signature' | 'P256Signature' | 'GenericSignature' | 'ChainID' | 'RollupAddress';
65
- export type TezosIDPrefix = [number, number[]];
66
- export declare const tezosPrefix: Record<TezosIDType, TezosIDPrefix>;
67
- export declare function checkDecodeTezosID<T extends TezosIDType[]>(id: string, ...types: T): [T[number], number[]] | null;
68
- export declare function encodeTezosID(id: TezosIDType, data: number[] | Uint8Array): string;
69
- type PairTypeOrDataPrim<I extends 'pair' | 'Pair'> = I extends 'pair' ? Extract<MichelsonTypePair<MichelsonType[]>, Prim> : Extract<MichelsonDataPair<MichelsonData[]>, Prim>;
70
- export declare function unpackComb<I extends 'pair' | 'Pair'>(id: I, v: I extends 'pair' ? MichelsonTypePair<MichelsonType[]> : MichelsonDataPair<MichelsonData[]>): PairTypeOrDataPrim<I>;
71
- export declare function isPairType(t: MichelsonType): t is MichelsonTypePair<MichelsonType[]>;
72
- export declare function isPairData(d: Expr): d is MichelsonDataPair<MichelsonData[]>;
73
- export declare function parseDate(a: StringLiteral | IntLiteral): Date | null;
74
- export declare function parseHex(s: string): number[];
75
- export declare function hexBytes(bytes: number[]): string;
76
- export {};
@@ -1,4 +0,0 @@
1
- export declare const VERSION: {
2
- commitHash: string;
3
- version: string;
4
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * Symbol representing Unit value in Michelson
3
- */
4
- export declare const UnitValue: unique symbol;
5
- /**
6
- * Sapling state placeholder value
7
- */
8
- export declare const SaplingStateValue: {};
@@ -1,17 +0,0 @@
1
- export { ListValidationError } from './tokens/list';
2
- export { MapValidationError } from './tokens/map';
3
- export { SetValidationError } from './tokens/set';
4
- export { BigMapValidationError } from './tokens/bigmap';
5
- export { TokenArgumentValidationError, TokenComparisonError } from './tokens/pair';
6
- export { OrValidationError } from './tokens/or';
7
- export { ChainIDValidationError } from './tokens/chain-id';
8
- export { KeyValidationError } from './tokens/key';
9
- export { ContractValidationError } from './tokens/contract';
10
- export { SignatureValidationError } from './tokens/signature';
11
- export { AddressValidationError } from './tokens/comparable/address';
12
- export { BytesValidationError } from './tokens/comparable/bytes';
13
- export { IntValidationError } from './tokens/comparable/int';
14
- export { KeyHashValidationError } from './tokens/comparable/key_hash';
15
- export { MutezValidationError } from './tokens/comparable/mutez';
16
- export { NatValidationError } from './tokens/comparable/nat';
17
- export { EncodeTicketError } from './tokens/ticket';