@airgap/tezos 0.13.7-beta.11

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 (370) hide show
  1. package/LICENSE.md +7 -0
  2. package/actions/GetKtAccountsAction.d.ts +8 -0
  3. package/actions/GetKtAccountsAction.js +85 -0
  4. package/actions/GetKtAccountsAction.js.map +1 -0
  5. package/airgap-coinlib-tezos.min.js +103587 -0
  6. package/constants.d.ts +18 -0
  7. package/constants.js +28 -0
  8. package/constants.js.map +1 -0
  9. package/index.d.ts +46 -0
  10. package/index.js +103 -0
  11. package/index.js.map +1 -0
  12. package/package.json +70 -0
  13. package/protocol/TezosAddress.d.ts +11 -0
  14. package/protocol/TezosAddress.js +102 -0
  15. package/protocol/TezosAddress.js.map +1 -0
  16. package/protocol/TezosCryptoClient.d.ts +15 -0
  17. package/protocol/TezosCryptoClient.js +152 -0
  18. package/protocol/TezosCryptoClient.js.map +1 -0
  19. package/protocol/TezosProtocol.d.ts +349 -0
  20. package/protocol/TezosProtocol.js +1853 -0
  21. package/protocol/TezosProtocol.js.map +1 -0
  22. package/protocol/TezosProtocolOptions.d.ts +29 -0
  23. package/protocol/TezosProtocolOptions.js +114 -0
  24. package/protocol/TezosProtocolOptions.js.map +1 -0
  25. package/protocol/TezosUtils.d.ts +40 -0
  26. package/protocol/TezosUtils.js +296 -0
  27. package/protocol/TezosUtils.js.map +1 -0
  28. package/protocol/contract/TezosContract.d.ts +52 -0
  29. package/protocol/contract/TezosContract.js +509 -0
  30. package/protocol/contract/TezosContract.js.map +1 -0
  31. package/protocol/contract/TezosContractCall.d.ts +10 -0
  32. package/protocol/contract/TezosContractCall.js +23 -0
  33. package/protocol/contract/TezosContractCall.js.map +1 -0
  34. package/protocol/contract/TezosContractEntrypoint.d.ts +8 -0
  35. package/protocol/contract/TezosContractEntrypoint.js +27 -0
  36. package/protocol/contract/TezosContractEntrypoint.js.map +1 -0
  37. package/protocol/contract/TezosContractStorage.d.ts +7 -0
  38. package/protocol/contract/TezosContractStorage.js +16 -0
  39. package/protocol/contract/TezosContractStorage.js.map +1 -0
  40. package/protocol/contract/remote-data/TezosContractRemoteDataFactory.d.ts +11 -0
  41. package/protocol/contract/remote-data/TezosContractRemoteDataFactory.js +34 -0
  42. package/protocol/contract/remote-data/TezosContractRemoteDataFactory.js.map +1 -0
  43. package/protocol/contract/remote-data/TezosStorageRemoteData.d.ts +12 -0
  44. package/protocol/contract/remote-data/TezosStorageRemoteData.js +151 -0
  45. package/protocol/contract/remote-data/TezosStorageRemoteData.js.map +1 -0
  46. package/protocol/domains/TezosDomains.d.ts +20 -0
  47. package/protocol/domains/TezosDomains.js +306 -0
  48. package/protocol/domains/TezosDomains.js.map +1 -0
  49. package/protocol/fa/TezosBTC.d.ts +12 -0
  50. package/protocol/fa/TezosBTC.js +107 -0
  51. package/protocol/fa/TezosBTC.js.map +1 -0
  52. package/protocol/fa/TezosBTCtez.d.ts +10 -0
  53. package/protocol/fa/TezosBTCtez.js +54 -0
  54. package/protocol/fa/TezosBTCtez.js.map +1 -0
  55. package/protocol/fa/TezosCTez.d.ts +10 -0
  56. package/protocol/fa/TezosCTez.js +51 -0
  57. package/protocol/fa/TezosCTez.js.map +1 -0
  58. package/protocol/fa/TezosDOGA.d.ts +10 -0
  59. package/protocol/fa/TezosDOGA.js +51 -0
  60. package/protocol/fa/TezosDOGA.js.map +1 -0
  61. package/protocol/fa/TezosETHtz.d.ts +9 -0
  62. package/protocol/fa/TezosETHtz.js +72 -0
  63. package/protocol/fa/TezosETHtz.js.map +1 -0
  64. package/protocol/fa/TezosFA1Protocol.d.ts +27 -0
  65. package/protocol/fa/TezosFA1Protocol.js +310 -0
  66. package/protocol/fa/TezosFA1Protocol.js.map +1 -0
  67. package/protocol/fa/TezosFA1p2Protocol.d.ts +8 -0
  68. package/protocol/fa/TezosFA1p2Protocol.js +117 -0
  69. package/protocol/fa/TezosFA1p2Protocol.js.map +1 -0
  70. package/protocol/fa/TezosFA2Protocol.d.ts +58 -0
  71. package/protocol/fa/TezosFA2Protocol.js +449 -0
  72. package/protocol/fa/TezosFA2Protocol.js.map +1 -0
  73. package/protocol/fa/TezosFAProtocol.d.ts +65 -0
  74. package/protocol/fa/TezosFAProtocol.js +510 -0
  75. package/protocol/fa/TezosFAProtocol.js.map +1 -0
  76. package/protocol/fa/TezosFAProtocolOptions.d.ts +54 -0
  77. package/protocol/fa/TezosFAProtocolOptions.js +228 -0
  78. package/protocol/fa/TezosFAProtocolOptions.js.map +1 -0
  79. package/protocol/fa/TezosKolibriUSD.d.ts +10 -0
  80. package/protocol/fa/TezosKolibriUSD.js +74 -0
  81. package/protocol/fa/TezosKolibriUSD.js.map +1 -0
  82. package/protocol/fa/TezosPlanty.d.ts +10 -0
  83. package/protocol/fa/TezosPlanty.js +51 -0
  84. package/protocol/fa/TezosPlanty.js.map +1 -0
  85. package/protocol/fa/TezosQUIPU.d.ts +10 -0
  86. package/protocol/fa/TezosQUIPU.js +54 -0
  87. package/protocol/fa/TezosQUIPU.js.map +1 -0
  88. package/protocol/fa/TezosSIRS.d.ts +10 -0
  89. package/protocol/fa/TezosSIRS.js +51 -0
  90. package/protocol/fa/TezosSIRS.js.map +1 -0
  91. package/protocol/fa/TezosStaker.d.ts +10 -0
  92. package/protocol/fa/TezosStaker.js +74 -0
  93. package/protocol/fa/TezosStaker.js.map +1 -0
  94. package/protocol/fa/TezosUBTC.d.ts +10 -0
  95. package/protocol/fa/TezosUBTC.js +54 -0
  96. package/protocol/fa/TezosUBTC.js.map +1 -0
  97. package/protocol/fa/TezosUDEFI.d.ts +10 -0
  98. package/protocol/fa/TezosUDEFI.js +54 -0
  99. package/protocol/fa/TezosUDEFI.js.map +1 -0
  100. package/protocol/fa/TezosUSD.d.ts +10 -0
  101. package/protocol/fa/TezosUSD.js +74 -0
  102. package/protocol/fa/TezosUSD.js.map +1 -0
  103. package/protocol/fa/TezosUSDT.d.ts +10 -0
  104. package/protocol/fa/TezosUSDT.js +54 -0
  105. package/protocol/fa/TezosUSDT.js.map +1 -0
  106. package/protocol/fa/TezosUUSD.d.ts +6 -0
  107. package/protocol/fa/TezosUUSD.js +31 -0
  108. package/protocol/fa/TezosUUSD.js.map +1 -0
  109. package/protocol/fa/TezosWRAP.d.ts +10 -0
  110. package/protocol/fa/TezosWRAP.js +54 -0
  111. package/protocol/fa/TezosWRAP.js.map +1 -0
  112. package/protocol/fa/TezosWrapped.d.ts +10 -0
  113. package/protocol/fa/TezosWrapped.js +74 -0
  114. package/protocol/fa/TezosWrapped.js.map +1 -0
  115. package/protocol/fa/TezosYOU.d.ts +6 -0
  116. package/protocol/fa/TezosYOU.js +31 -0
  117. package/protocol/fa/TezosYOU.js.map +1 -0
  118. package/protocol/indexerClient/TezosIndexerClient.d.ts +25 -0
  119. package/protocol/indexerClient/TezosIndexerClient.js +251 -0
  120. package/protocol/indexerClient/TezosIndexerClient.js.map +1 -0
  121. package/protocol/indexerClient/TezosProtocolIndexerClient.d.ts +26 -0
  122. package/protocol/indexerClient/TezosProtocolIndexerClient.js +3 -0
  123. package/protocol/indexerClient/TezosProtocolIndexerClient.js.map +1 -0
  124. package/protocol/kt/TezosKtAddress.d.ts +5 -0
  125. package/protocol/kt/TezosKtAddress.js +72 -0
  126. package/protocol/kt/TezosKtAddress.js.map +1 -0
  127. package/protocol/kt/TezosKtProtocol.d.ts +30 -0
  128. package/protocol/kt/TezosKtProtocol.js +317 -0
  129. package/protocol/kt/TezosKtProtocol.js.map +1 -0
  130. package/protocol/sapling/TezosSaplingAddress.d.ts +12 -0
  131. package/protocol/sapling/TezosSaplingAddress.js +134 -0
  132. package/protocol/sapling/TezosSaplingAddress.js.map +1 -0
  133. package/protocol/sapling/TezosSaplingCryptoClient.d.ts +34 -0
  134. package/protocol/sapling/TezosSaplingCryptoClient.js +241 -0
  135. package/protocol/sapling/TezosSaplingCryptoClient.js.map +1 -0
  136. package/protocol/sapling/TezosSaplingProtocol.d.ts +130 -0
  137. package/protocol/sapling/TezosSaplingProtocol.js +1101 -0
  138. package/protocol/sapling/TezosSaplingProtocol.js.map +1 -0
  139. package/protocol/sapling/TezosSaplingProtocolOptions.d.ts +43 -0
  140. package/protocol/sapling/TezosSaplingProtocolOptions.js +78 -0
  141. package/protocol/sapling/TezosSaplingProtocolOptions.js.map +1 -0
  142. package/protocol/sapling/TezosShieldedTezProtocol.d.ts +9 -0
  143. package/protocol/sapling/TezosShieldedTezProtocol.js +109 -0
  144. package/protocol/sapling/TezosShieldedTezProtocol.js.map +1 -0
  145. package/protocol/sapling/node/TezosSaplingNodeClient.d.ts +8 -0
  146. package/protocol/sapling/node/TezosSaplingNodeClient.js +78 -0
  147. package/protocol/sapling/node/TezosSaplingNodeClient.js.map +1 -0
  148. package/protocol/sapling/utils/TezosSaplingBookkeeper.d.ts +34 -0
  149. package/protocol/sapling/utils/TezosSaplingBookkeeper.js +586 -0
  150. package/protocol/sapling/utils/TezosSaplingBookkeeper.js.map +1 -0
  151. package/protocol/sapling/utils/TezosSaplingEncoder.d.ts +22 -0
  152. package/protocol/sapling/utils/TezosSaplingEncoder.js +158 -0
  153. package/protocol/sapling/utils/TezosSaplingEncoder.js.map +1 -0
  154. package/protocol/sapling/utils/TezosSaplingForger.d.ts +26 -0
  155. package/protocol/sapling/utils/TezosSaplingForger.js +278 -0
  156. package/protocol/sapling/utils/TezosSaplingForger.js.map +1 -0
  157. package/protocol/sapling/utils/TezosSaplingState.d.ts +17 -0
  158. package/protocol/sapling/utils/TezosSaplingState.js +260 -0
  159. package/protocol/sapling/utils/TezosSaplingState.js.map +1 -0
  160. package/protocol/types/TezosAddressCursor.d.ts +3 -0
  161. package/protocol/types/TezosAddressCursor.js +3 -0
  162. package/protocol/types/TezosAddressCursor.js.map +1 -0
  163. package/protocol/types/TezosAddressResult.d.ts +4 -0
  164. package/protocol/types/TezosAddressResult.js +3 -0
  165. package/protocol/types/TezosAddressResult.js.map +1 -0
  166. package/protocol/types/TezosBlockHeader.d.ts +13 -0
  167. package/protocol/types/TezosBlockHeader.js +3 -0
  168. package/protocol/types/TezosBlockHeader.js.map +1 -0
  169. package/protocol/types/TezosBlockMetadata.d.ts +7 -0
  170. package/protocol/types/TezosBlockMetadata.js +3 -0
  171. package/protocol/types/TezosBlockMetadata.js.map +1 -0
  172. package/protocol/types/TezosContractCode.d.ts +5 -0
  173. package/protocol/types/TezosContractCode.js +3 -0
  174. package/protocol/types/TezosContractCode.js.map +1 -0
  175. package/protocol/types/TezosOperationType.d.ts +13 -0
  176. package/protocol/types/TezosOperationType.js +18 -0
  177. package/protocol/types/TezosOperationType.js.map +1 -0
  178. package/protocol/types/TezosTransactionCursor.d.ts +3 -0
  179. package/protocol/types/TezosTransactionCursor.js +3 -0
  180. package/protocol/types/TezosTransactionCursor.js.map +1 -0
  181. package/protocol/types/TezosTransactionResult.d.ts +6 -0
  182. package/protocol/types/TezosTransactionResult.js +3 -0
  183. package/protocol/types/TezosTransactionResult.js.map +1 -0
  184. package/protocol/types/TezosWrappedOperation.d.ts +5 -0
  185. package/protocol/types/TezosWrappedOperation.js +3 -0
  186. package/protocol/types/TezosWrappedOperation.js.map +1 -0
  187. package/protocol/types/contract/BigMap.d.ts +7 -0
  188. package/protocol/types/contract/BigMap.js +3 -0
  189. package/protocol/types/contract/BigMap.js.map +1 -0
  190. package/protocol/types/contract/BigMapEnrtyFilter.d.ts +5 -0
  191. package/protocol/types/contract/BigMapEnrtyFilter.js +3 -0
  192. package/protocol/types/contract/BigMapEnrtyFilter.js.map +1 -0
  193. package/protocol/types/contract/BigMapEntry.d.ts +7 -0
  194. package/protocol/types/contract/BigMapEntry.js +3 -0
  195. package/protocol/types/contract/BigMapEntry.js.map +1 -0
  196. package/protocol/types/contract/BigMapRequest.d.ts +8 -0
  197. package/protocol/types/contract/BigMapRequest.js +3 -0
  198. package/protocol/types/contract/BigMapRequest.js.map +1 -0
  199. package/protocol/types/contract/TezosContractMetadata.d.ts +61 -0
  200. package/protocol/types/contract/TezosContractMetadata.js +3 -0
  201. package/protocol/types/contract/TezosContractMetadata.js.map +1 -0
  202. package/protocol/types/domains/TezosDomainsRecord.d.ts +8 -0
  203. package/protocol/types/domains/TezosDomainsRecord.js +3 -0
  204. package/protocol/types/domains/TezosDomainsRecord.js.map +1 -0
  205. package/protocol/types/domains/TezosDomainsReverseRecord.d.ts +5 -0
  206. package/protocol/types/domains/TezosDomainsReverseRecord.js +3 -0
  207. package/protocol/types/domains/TezosDomainsReverseRecord.js.map +1 -0
  208. package/protocol/types/fa/TezosFA2BalanceOfRequest.d.ts +4 -0
  209. package/protocol/types/fa/TezosFA2BalanceOfRequest.js +3 -0
  210. package/protocol/types/fa/TezosFA2BalanceOfRequest.js.map +1 -0
  211. package/protocol/types/fa/TezosFA2BalanceOfResponse.d.ts +5 -0
  212. package/protocol/types/fa/TezosFA2BalanceOfResponse.js +3 -0
  213. package/protocol/types/fa/TezosFA2BalanceOfResponse.js.map +1 -0
  214. package/protocol/types/fa/TezosFA2TransferRequest.d.ts +8 -0
  215. package/protocol/types/fa/TezosFA2TransferRequest.js +3 -0
  216. package/protocol/types/fa/TezosFA2TransferRequest.js.map +1 -0
  217. package/protocol/types/fa/TezosFA2UpdateOperatorRequest.d.ts +6 -0
  218. package/protocol/types/fa/TezosFA2UpdateOperatorRequest.js +3 -0
  219. package/protocol/types/fa/TezosFA2UpdateOperatorRequest.js.map +1 -0
  220. package/protocol/types/fa/TezosFATokenMetadata.d.ts +6 -0
  221. package/protocol/types/fa/TezosFATokenMetadata.js +3 -0
  222. package/protocol/types/fa/TezosFATokenMetadata.js.map +1 -0
  223. package/protocol/types/kt/TezosKtAddressCursor.d.ts +4 -0
  224. package/protocol/types/kt/TezosKtAddressCursor.js +3 -0
  225. package/protocol/types/kt/TezosKtAddressCursor.js.map +1 -0
  226. package/protocol/types/kt/TezosKtAddressResult.d.ts +5 -0
  227. package/protocol/types/kt/TezosKtAddressResult.js +3 -0
  228. package/protocol/types/kt/TezosKtAddressResult.js.map +1 -0
  229. package/protocol/types/micheline/MichelineNode.d.ts +15 -0
  230. package/protocol/types/micheline/MichelineNode.js +5 -0
  231. package/protocol/types/micheline/MichelineNode.js.map +1 -0
  232. package/protocol/types/micheline/MichelineNodeUtils.d.ts +6 -0
  233. package/protocol/types/micheline/MichelineNodeUtils.js +40 -0
  234. package/protocol/types/micheline/MichelineNodeUtils.js.map +1 -0
  235. package/protocol/types/michelson/MichelsonType.d.ts +11 -0
  236. package/protocol/types/michelson/MichelsonType.js +22 -0
  237. package/protocol/types/michelson/MichelsonType.js.map +1 -0
  238. package/protocol/types/michelson/MichelsonTypeMeta.d.ts +33 -0
  239. package/protocol/types/michelson/MichelsonTypeMeta.js +132 -0
  240. package/protocol/types/michelson/MichelsonTypeMeta.js.map +1 -0
  241. package/protocol/types/michelson/MichelsonTypeUtils.d.ts +19 -0
  242. package/protocol/types/michelson/MichelsonTypeUtils.js +249 -0
  243. package/protocol/types/michelson/MichelsonTypeUtils.js.map +1 -0
  244. package/protocol/types/michelson/generics/MichelsonList.d.ts +11 -0
  245. package/protocol/types/michelson/generics/MichelsonList.js +68 -0
  246. package/protocol/types/michelson/generics/MichelsonList.js.map +1 -0
  247. package/protocol/types/michelson/generics/MichelsonMap.d.ts +14 -0
  248. package/protocol/types/michelson/generics/MichelsonMap.js +118 -0
  249. package/protocol/types/michelson/generics/MichelsonMap.js.map +1 -0
  250. package/protocol/types/michelson/generics/MichelsonOption.d.ts +25 -0
  251. package/protocol/types/michelson/generics/MichelsonOption.js +119 -0
  252. package/protocol/types/michelson/generics/MichelsonOption.js.map +1 -0
  253. package/protocol/types/michelson/generics/MichelsonOr.d.ts +25 -0
  254. package/protocol/types/michelson/generics/MichelsonOr.js +132 -0
  255. package/protocol/types/michelson/generics/MichelsonOr.js.map +1 -0
  256. package/protocol/types/michelson/generics/MichelsonPair.d.ts +17 -0
  257. package/protocol/types/michelson/generics/MichelsonPair.js +135 -0
  258. package/protocol/types/michelson/generics/MichelsonPair.js.map +1 -0
  259. package/protocol/types/michelson/grammar/MichelsonGrammarData.d.ts +2 -0
  260. package/protocol/types/michelson/grammar/MichelsonGrammarData.js +4 -0
  261. package/protocol/types/michelson/grammar/MichelsonGrammarData.js.map +1 -0
  262. package/protocol/types/michelson/grammar/MichelsonGrammarInstruction.d.ts +1 -0
  263. package/protocol/types/michelson/grammar/MichelsonGrammarInstruction.js +4 -0
  264. package/protocol/types/michelson/grammar/MichelsonGrammarInstruction.js.map +1 -0
  265. package/protocol/types/michelson/grammar/MichelsonGrammarType.d.ts +1 -0
  266. package/protocol/types/michelson/grammar/MichelsonGrammarType.js +4 -0
  267. package/protocol/types/michelson/grammar/MichelsonGrammarType.js.map +1 -0
  268. package/protocol/types/michelson/primitives/MichelsonAddress.d.ts +15 -0
  269. package/protocol/types/michelson/primitives/MichelsonAddress.js +72 -0
  270. package/protocol/types/michelson/primitives/MichelsonAddress.js.map +1 -0
  271. package/protocol/types/michelson/primitives/MichelsonBool.d.ts +12 -0
  272. package/protocol/types/michelson/primitives/MichelsonBool.js +57 -0
  273. package/protocol/types/michelson/primitives/MichelsonBool.js.map +1 -0
  274. package/protocol/types/michelson/primitives/MichelsonBytes.d.ts +14 -0
  275. package/protocol/types/michelson/primitives/MichelsonBytes.js +75 -0
  276. package/protocol/types/michelson/primitives/MichelsonBytes.js.map +1 -0
  277. package/protocol/types/michelson/primitives/MichelsonInt.d.ts +14 -0
  278. package/protocol/types/michelson/primitives/MichelsonInt.js +72 -0
  279. package/protocol/types/michelson/primitives/MichelsonInt.js.map +1 -0
  280. package/protocol/types/michelson/primitives/MichelsonString.d.ts +14 -0
  281. package/protocol/types/michelson/primitives/MichelsonString.js +74 -0
  282. package/protocol/types/michelson/primitives/MichelsonString.js.map +1 -0
  283. package/protocol/types/michelson/primitives/MichelsonUnit.d.ts +9 -0
  284. package/protocol/types/michelson/primitives/MichelsonUnit.js +53 -0
  285. package/protocol/types/michelson/primitives/MichelsonUnit.js.map +1 -0
  286. package/protocol/types/operations/ActivateAccount.d.ts +7 -0
  287. package/protocol/types/operations/ActivateAccount.js +3 -0
  288. package/protocol/types/operations/ActivateAccount.js.map +1 -0
  289. package/protocol/types/operations/Ballot.d.ts +9 -0
  290. package/protocol/types/operations/Ballot.js +3 -0
  291. package/protocol/types/operations/Ballot.js.map +1 -0
  292. package/protocol/types/operations/Delegation.d.ts +11 -0
  293. package/protocol/types/operations/Delegation.js +3 -0
  294. package/protocol/types/operations/Delegation.js.map +1 -0
  295. package/protocol/types/operations/DoubleBakingEvidence.d.ts +8 -0
  296. package/protocol/types/operations/DoubleBakingEvidence.js +3 -0
  297. package/protocol/types/operations/DoubleBakingEvidence.js.map +1 -0
  298. package/protocol/types/operations/DoubleEndorsementEvidence.d.ts +16 -0
  299. package/protocol/types/operations/DoubleEndorsementEvidence.js +3 -0
  300. package/protocol/types/operations/DoubleEndorsementEvidence.js.map +1 -0
  301. package/protocol/types/operations/Endorsement.d.ts +6 -0
  302. package/protocol/types/operations/Endorsement.js +3 -0
  303. package/protocol/types/operations/Endorsement.js.map +1 -0
  304. package/protocol/types/operations/Origination.d.ts +13 -0
  305. package/protocol/types/operations/Origination.js +3 -0
  306. package/protocol/types/operations/Origination.js.map +1 -0
  307. package/protocol/types/operations/Proposal.d.ts +7 -0
  308. package/protocol/types/operations/Proposal.js +3 -0
  309. package/protocol/types/operations/Proposal.js.map +1 -0
  310. package/protocol/types/operations/Reveal.d.ts +11 -0
  311. package/protocol/types/operations/Reveal.js +3 -0
  312. package/protocol/types/operations/Reveal.js.map +1 -0
  313. package/protocol/types/operations/SeedNonceRevelation.d.ts +7 -0
  314. package/protocol/types/operations/SeedNonceRevelation.js +3 -0
  315. package/protocol/types/operations/SeedNonceRevelation.js.map +1 -0
  316. package/protocol/types/operations/TezosOperation.d.ts +4 -0
  317. package/protocol/types/operations/TezosOperation.js +3 -0
  318. package/protocol/types/operations/TezosOperation.js.map +1 -0
  319. package/protocol/types/operations/Transaction.d.ts +23 -0
  320. package/protocol/types/operations/Transaction.js +3 -0
  321. package/protocol/types/operations/Transaction.js.map +1 -0
  322. package/protocol/types/sapling/TezosSaplingAddressCursor.d.ts +4 -0
  323. package/protocol/types/sapling/TezosSaplingAddressCursor.js +3 -0
  324. package/protocol/types/sapling/TezosSaplingAddressCursor.js.map +1 -0
  325. package/protocol/types/sapling/TezosSaplingAddressResult.d.ts +4 -0
  326. package/protocol/types/sapling/TezosSaplingAddressResult.js +3 -0
  327. package/protocol/types/sapling/TezosSaplingAddressResult.js.map +1 -0
  328. package/protocol/types/sapling/TezosSaplingCiphertext.d.ts +8 -0
  329. package/protocol/types/sapling/TezosSaplingCiphertext.js +3 -0
  330. package/protocol/types/sapling/TezosSaplingCiphertext.js.map +1 -0
  331. package/protocol/types/sapling/TezosSaplingInput.d.ts +6 -0
  332. package/protocol/types/sapling/TezosSaplingInput.js +3 -0
  333. package/protocol/types/sapling/TezosSaplingInput.js.map +1 -0
  334. package/protocol/types/sapling/TezosSaplingOutput.d.ts +6 -0
  335. package/protocol/types/sapling/TezosSaplingOutput.js +3 -0
  336. package/protocol/types/sapling/TezosSaplingOutput.js.map +1 -0
  337. package/protocol/types/sapling/TezosSaplingStateDiff.d.ts +6 -0
  338. package/protocol/types/sapling/TezosSaplingStateDiff.js +3 -0
  339. package/protocol/types/sapling/TezosSaplingStateDiff.js.map +1 -0
  340. package/protocol/types/sapling/TezosSaplingStateTree.d.ts +7 -0
  341. package/protocol/types/sapling/TezosSaplingStateTree.js +3 -0
  342. package/protocol/types/sapling/TezosSaplingStateTree.js.map +1 -0
  343. package/protocol/types/sapling/TezosSaplingTransaction.d.ts +23 -0
  344. package/protocol/types/sapling/TezosSaplingTransaction.js +3 -0
  345. package/protocol/types/sapling/TezosSaplingTransaction.js.map +1 -0
  346. package/protocol/types/sapling/TezosSaplingTransactionCursor.d.ts +3 -0
  347. package/protocol/types/sapling/TezosSaplingTransactionCursor.js +3 -0
  348. package/protocol/types/sapling/TezosSaplingTransactionCursor.js.map +1 -0
  349. package/protocol/types/sapling/TezosSaplingTransactionResult.d.ts +6 -0
  350. package/protocol/types/sapling/TezosSaplingTransactionResult.js +3 -0
  351. package/protocol/types/sapling/TezosSaplingTransactionResult.js.map +1 -0
  352. package/protocol/types/utils.d.ts +8 -0
  353. package/protocol/types/utils.js +41 -0
  354. package/protocol/types/utils.js.map +1 -0
  355. package/readme.md +121 -0
  356. package/types/signed-transaction-tezos-sapling.d.ts +3 -0
  357. package/types/signed-transaction-tezos-sapling.js +3 -0
  358. package/types/signed-transaction-tezos-sapling.js.map +1 -0
  359. package/types/signed-transaction-tezos.d.ts +5 -0
  360. package/types/signed-transaction-tezos.js +3 -0
  361. package/types/signed-transaction-tezos.js.map +1 -0
  362. package/types/transaction-tezos.d.ts +14 -0
  363. package/types/transaction-tezos.js +3 -0
  364. package/types/transaction-tezos.js.map +1 -0
  365. package/types/unsigned-transaction-tezos-sapling.d.ts +38 -0
  366. package/types/unsigned-transaction-tezos-sapling.js +3 -0
  367. package/types/unsigned-transaction-tezos-sapling.js.map +1 -0
  368. package/types/unsigned-transaction-tezos.d.ts +8 -0
  369. package/types/unsigned-transaction-tezos.js +3 -0
  370. package/types/unsigned-transaction-tezos.js.map +1 -0
@@ -0,0 +1,260 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
+ return new (P || (P = Promise))(function (resolve, reject) {
24
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28
+ });
29
+ };
30
+ var __generator = (this && this.__generator) || function (thisArg, body) {
31
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
32
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
33
+ function verb(n) { return function (v) { return step([n, v]); }; }
34
+ function step(op) {
35
+ if (f) throw new TypeError("Generator is already executing.");
36
+ while (_) try {
37
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
38
+ if (y = 0, t) op = [op[0] & 2, t.value];
39
+ switch (op[0]) {
40
+ case 0: case 1: t = op; break;
41
+ case 4: _.label++; return { value: op[1], done: false };
42
+ case 5: _.label++; y = op[1]; op = [0]; continue;
43
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
44
+ default:
45
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
46
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
47
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
48
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
49
+ if (t[2]) _.ops.pop();
50
+ _.trys.pop(); continue;
51
+ }
52
+ op = body.call(thisArg, _);
53
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
54
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
55
+ }
56
+ };
57
+ var __spreadArrays = (this && this.__spreadArrays) || function () {
58
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
59
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
60
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
61
+ r[k] = a[j];
62
+ return r;
63
+ };
64
+ var __importDefault = (this && this.__importDefault) || function (mod) {
65
+ return (mod && mod.__esModule) ? mod : { "default": mod };
66
+ };
67
+ Object.defineProperty(exports, "__esModule", { value: true });
68
+ exports.TezosSaplingState = void 0;
69
+ var Lazy_1 = require("@airgap/coinlib-core/data/Lazy");
70
+ var bignumber_1 = __importDefault(require("@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber"));
71
+ var array_1 = require("@airgap/coinlib-core/utils/array");
72
+ var hex_1 = require("@airgap/coinlib-core/utils/hex");
73
+ var sapling = __importStar(require("@airgap/sapling-wasm"));
74
+ var TezosSaplingState = /** @class */ (function () {
75
+ function TezosSaplingState(treeHeight) {
76
+ var _this = this;
77
+ this.treeHeight = treeHeight;
78
+ this.uncommitedMerkleHash = '0100000000000000000000000000000000000000000000000000000000000000';
79
+ this.uncommitedMerkleHashes = new Lazy_1.LazyAsync(function () { return _this.createUncommitedMerkleHashes(); });
80
+ }
81
+ TezosSaplingState.prototype.getStateTreeFromStateDiff = function (saplingStateDiff, skipConstruction) {
82
+ if (skipConstruction === void 0) { skipConstruction = false; }
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var commitments, merkleTree;
85
+ return __generator(this, function (_a) {
86
+ switch (_a.label) {
87
+ case 0:
88
+ if (this.stateTree !== undefined && this.stateTree.root === saplingStateDiff.root) {
89
+ return [2 /*return*/, this.stateTree];
90
+ }
91
+ commitments = saplingStateDiff.commitments_and_ciphertexts.map(function (_a) {
92
+ var commitment = _a[0], _ = _a[1];
93
+ return commitment;
94
+ });
95
+ if (!!skipConstruction) return [3 /*break*/, 3];
96
+ return [4 /*yield*/, this.constructMerkleTree(commitments, 0)];
97
+ case 1:
98
+ merkleTree = _a.sent();
99
+ return [4 /*yield*/, this.verifyMerkleTree(merkleTree, saplingStateDiff.root)];
100
+ case 2:
101
+ _a.sent();
102
+ _a.label = 3;
103
+ case 3:
104
+ this.stateTree = {
105
+ height: this.treeHeight,
106
+ size: commitments.length,
107
+ root: saplingStateDiff.root,
108
+ tree: merkleTree
109
+ };
110
+ return [2 /*return*/, this.stateTree];
111
+ }
112
+ });
113
+ });
114
+ };
115
+ TezosSaplingState.prototype.getWitness = function (stateTree, position) {
116
+ return __awaiter(this, void 0, void 0, function () {
117
+ var heightBuffer, positionBuffer, neighboringHashes, witness;
118
+ return __generator(this, function (_a) {
119
+ switch (_a.label) {
120
+ case 0:
121
+ heightBuffer = hex_1.hexToBytes(hex_1.changeEndianness(hex_1.toHexString(stateTree.height)));
122
+ positionBuffer = hex_1.hexToBytes(hex_1.changeEndianness(hex_1.toHexString(position, 64)));
123
+ return [4 /*yield*/, this.getNeighboringHashes([], stateTree.height, position, stateTree.tree)];
124
+ case 1:
125
+ neighboringHashes = _a.sent();
126
+ witness = neighboringHashes
127
+ .map(function (hash) { return Buffer.concat([hex_1.hexToBytes(hex_1.changeEndianness(hex_1.toHexString(hash.length))), hash]); })
128
+ .reverse()
129
+ .reduce(function (acc, next) { return Buffer.concat([acc, next]); });
130
+ return [2 /*return*/, Buffer.concat([heightBuffer, witness, positionBuffer]).toString('hex')];
131
+ }
132
+ });
133
+ });
134
+ };
135
+ TezosSaplingState.prototype.constructMerkleTree = function (children, height) {
136
+ return __awaiter(this, void 0, void 0, function () {
137
+ var chunkedChildren, newChildren;
138
+ var _this = this;
139
+ return __generator(this, function (_a) {
140
+ switch (_a.label) {
141
+ case 0:
142
+ if (height === this.treeHeight && children.length === 1) {
143
+ return [2 /*return*/, children[0]];
144
+ }
145
+ if (height === this.treeHeight || children.length > Math.pow(2, this.treeHeight - 1 - height)) {
146
+ return [2 /*return*/, Promise.reject('Invalid Merkle tree')];
147
+ }
148
+ chunkedChildren = array_1.chunkedArray(children, 2);
149
+ return [4 /*yield*/, Promise.all(chunkedChildren.map(function (chunk) { return __awaiter(_this, void 0, void 0, function () {
150
+ var _a, lhs, rhs, parentHash;
151
+ return __generator(this, function (_b) {
152
+ switch (_b.label) {
153
+ case 0: return [4 /*yield*/, Promise.all([this.getMerkleHash(chunk[0], height), this.getMerkleHash(chunk[1], height)])];
154
+ case 1:
155
+ _a = _b.sent(), lhs = _a[0], rhs = _a[1];
156
+ return [4 /*yield*/, sapling.merkleHash(height, lhs, rhs)];
157
+ case 2:
158
+ parentHash = _b.sent();
159
+ return [2 /*return*/, [parentHash.toString('hex'), chunk[0], chunk[1]]];
160
+ }
161
+ });
162
+ }); }))];
163
+ case 1:
164
+ newChildren = _a.sent();
165
+ return [2 /*return*/, this.constructMerkleTree(newChildren, height + 1)];
166
+ }
167
+ });
168
+ });
169
+ };
170
+ TezosSaplingState.prototype.verifyMerkleTree = function (tree, expectedRoot) {
171
+ return __awaiter(this, void 0, void 0, function () {
172
+ var root;
173
+ return __generator(this, function (_a) {
174
+ switch (_a.label) {
175
+ case 0: return [4 /*yield*/, this.getMerkleHash(tree, this.treeHeight - 1)];
176
+ case 1:
177
+ root = _a.sent();
178
+ if (root.toString('hex') !== expectedRoot) {
179
+ return [2 /*return*/, Promise.reject('Merkle tree root is invalid')];
180
+ }
181
+ return [2 /*return*/];
182
+ }
183
+ });
184
+ });
185
+ };
186
+ TezosSaplingState.prototype.getMerkleHash = function (tree, height) {
187
+ return __awaiter(this, void 0, void 0, function () {
188
+ return __generator(this, function (_a) {
189
+ switch (_a.label) {
190
+ case 0:
191
+ if (!(tree === undefined)) return [3 /*break*/, 2];
192
+ return [4 /*yield*/, this.uncommitedMerkleHashes.get()];
193
+ case 1: return [2 /*return*/, (_a.sent())[height]];
194
+ case 2:
195
+ if (typeof tree === 'string') {
196
+ return [2 /*return*/, Buffer.from(tree, 'hex')];
197
+ }
198
+ else {
199
+ return [2 /*return*/, Buffer.from(tree[0], 'hex')];
200
+ }
201
+ _a.label = 3;
202
+ case 3: return [2 /*return*/];
203
+ }
204
+ });
205
+ });
206
+ };
207
+ TezosSaplingState.prototype.createUncommitedMerkleHashes = function () {
208
+ return __awaiter(this, void 0, void 0, function () {
209
+ var res, i, hash, _a, _b;
210
+ return __generator(this, function (_c) {
211
+ switch (_c.label) {
212
+ case 0:
213
+ res = new Array(this.treeHeight);
214
+ res[0] = Buffer.from(this.uncommitedMerkleHash, 'hex');
215
+ i = 0;
216
+ _c.label = 1;
217
+ case 1:
218
+ if (!(i < this.treeHeight)) return [3 /*break*/, 4];
219
+ hash = res[i];
220
+ _a = res;
221
+ _b = i + 1;
222
+ return [4 /*yield*/, sapling.merkleHash(i, hash, hash)];
223
+ case 2:
224
+ _a[_b] = _c.sent();
225
+ _c.label = 3;
226
+ case 3:
227
+ i++;
228
+ return [3 /*break*/, 1];
229
+ case 4: return [2 /*return*/, res];
230
+ }
231
+ });
232
+ });
233
+ };
234
+ TezosSaplingState.prototype.getNeighboringHashes = function (acc, height, position, tree) {
235
+ return __awaiter(this, void 0, void 0, function () {
236
+ var full, _a, nextPosition, nextTree, otherTree, _b;
237
+ return __generator(this, function (_c) {
238
+ switch (_c.label) {
239
+ case 0:
240
+ if (!(typeof tree === 'undefined')) return [3 /*break*/, 1];
241
+ return [2 /*return*/, Promise.reject('Invalid tree')];
242
+ case 1:
243
+ if (!(typeof tree === 'string')) return [3 /*break*/, 2];
244
+ return [2 /*return*/, acc];
245
+ case 2:
246
+ full = new bignumber_1.default(2).pow(height - 1);
247
+ _a = position.lt(full)
248
+ ? [position, tree[1], tree[2]]
249
+ : [position.minus(full), tree[2], tree[1]], nextPosition = _a[0], nextTree = _a[1], otherTree = _a[2];
250
+ _b = this.getNeighboringHashes;
251
+ return [4 /*yield*/, this.getMerkleHash(otherTree, height - 1)];
252
+ case 3: return [2 /*return*/, _b.apply(this, [__spreadArrays.apply(void 0, [[_c.sent()], acc]), height - 1, nextPosition, nextTree])];
253
+ }
254
+ });
255
+ });
256
+ };
257
+ return TezosSaplingState;
258
+ }());
259
+ exports.TezosSaplingState = TezosSaplingState;
260
+ //# sourceMappingURL=TezosSaplingState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosSaplingState.js","sourceRoot":"","sources":["../../../../src/protocol/sapling/utils/TezosSaplingState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAA0D;AAC1D,iHAA0F;AAC1F,0DAA+D;AAC/D,sDAA0F;AAC1F,4DAA+C;AAM/C;IAME,2BAA4B,UAAkB;QAA9C,iBAAkD;QAAtB,eAAU,GAAV,UAAU,CAAQ;QAL7B,yBAAoB,GAAW,kEAAkE,CAAA;QACjG,2BAAsB,GAAwB,IAAI,gBAAS,CAAC,cAAM,OAAA,KAAI,CAAC,4BAA4B,EAAE,EAAnC,CAAmC,CAAC,CAAA;IAItE,CAAC;IAErC,qDAAyB,GAAtC,UACE,gBAAuC,EACvC,gBAAiC;QAAjC,iCAAA,EAAA,wBAAiC;;;;;;wBAEjC,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,gBAAgB,CAAC,IAAI,EAAE;4BACjF,sBAAO,IAAI,CAAC,SAAS,EAAA;yBACtB;wBAEK,WAAW,GAAa,gBAAgB,CAAC,2BAA2B,CAAC,GAAG,CAC5E,UAAC,EAAiD;gCAAhD,UAAU,QAAA,EAAE,CAAC,QAAA;4BAAwC,OAAA,UAAU;wBAAV,CAAU,CAClE,CAAA;6BAGG,CAAC,gBAAgB,EAAjB,wBAAiB;wBACN,qB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AC;AAAD,CAAC,AApHD,IAoHC;AApHY,8CAAiB"}
@@ -0,0 +1,3 @@
1
+ import { IProtocolAddressCursor } from '@airgap/coinlib-core/interfaces/IAirGapAddress';
2
+ export interface TezosAddressCursor extends IProtocolAddressCursor {
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosAddressCursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosAddressCursor.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosAddressCursor.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { IAirGapAddressResult } from '@airgap/coinlib-core/interfaces/IAirGapAddress';
2
+ import { TezosAddressCursor } from './TezosAddressCursor';
3
+ export interface TezosAddressResult extends IAirGapAddressResult<TezosAddressCursor> {
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosAddressResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosAddressResult.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosAddressResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export interface TezosBlockHeader {
2
+ level: number;
3
+ proto: number;
4
+ predecessor: string;
5
+ timestamp: string;
6
+ validation_pass: number;
7
+ operations_hash: string;
8
+ fitness: string[];
9
+ context: string;
10
+ priority: number;
11
+ proof_of_work_nonce: string;
12
+ signature: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosBlockHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosBlockHeader.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosBlockHeader.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { TezosBlockHeader } from './TezosBlockHeader';
2
+ export interface TezosBlockMetadata {
3
+ protocol: string;
4
+ chain_id: string;
5
+ hash: string;
6
+ metadata: TezosBlockHeader;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosBlockMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosBlockMetadata.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosBlockMetadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { MichelinePrimitiveApplication, MichelineTypeNode } from './micheline/MichelineNode';
2
+ export interface TezosContractCode extends MichelinePrimitiveApplication<any> {
3
+ prim: 'parameter' | 'storage';
4
+ args: MichelineTypeNode[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosContractCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosContractCode.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosContractCode.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export declare enum TezosOperationType {
2
+ ENDORSEMENT = "endorsement",
3
+ SEED_NONCE_REVELATION = "seed_nonce_revelation",
4
+ DOUBLE_ENDORSEMENT_EVIDENCE = "double_endorsement_evidence",
5
+ DOUBLE_BAKING_EVIDENCE = "double_baking_evidence",
6
+ ACTIVATE_ACCOUNT = "activate_account",
7
+ PROPOSALS = "proposals",
8
+ BALLOT = "ballot",
9
+ REVEAL = "reveal",
10
+ TRANSACTION = "transaction",
11
+ ORIGINATION = "origination",
12
+ DELEGATION = "delegation"
13
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TezosOperationType = void 0;
4
+ var TezosOperationType;
5
+ (function (TezosOperationType) {
6
+ TezosOperationType["ENDORSEMENT"] = "endorsement";
7
+ TezosOperationType["SEED_NONCE_REVELATION"] = "seed_nonce_revelation";
8
+ TezosOperationType["DOUBLE_ENDORSEMENT_EVIDENCE"] = "double_endorsement_evidence";
9
+ TezosOperationType["DOUBLE_BAKING_EVIDENCE"] = "double_baking_evidence";
10
+ TezosOperationType["ACTIVATE_ACCOUNT"] = "activate_account";
11
+ TezosOperationType["PROPOSALS"] = "proposals";
12
+ TezosOperationType["BALLOT"] = "ballot";
13
+ TezosOperationType["REVEAL"] = "reveal";
14
+ TezosOperationType["TRANSACTION"] = "transaction";
15
+ TezosOperationType["ORIGINATION"] = "origination";
16
+ TezosOperationType["DELEGATION"] = "delegation";
17
+ })(TezosOperationType = exports.TezosOperationType || (exports.TezosOperationType = {}));
18
+ //# sourceMappingURL=TezosOperationType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosOperationType.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosOperationType.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAYX;AAZD,WAAY,kBAAkB;IAC5B,iDAA2B,CAAA;IAC3B,qEAA+C,CAAA;IAC/C,iFAA2D,CAAA;IAC3D,uEAAiD,CAAA;IACjD,2DAAqC,CAAA;IACrC,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,iDAA2B,CAAA;IAC3B,iDAA2B,CAAA;IAC3B,+CAAyB,CAAA;AAC3B,CAAC,EAZW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAY7B"}
@@ -0,0 +1,3 @@
1
+ export interface TezosTransactionCursor {
2
+ offset: number;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosTransactionCursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosTransactionCursor.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosTransactionCursor.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { IAirGapTransaction } from '@airgap/coinlib-core/interfaces/IAirGapTransaction';
2
+ import { TezosTransactionCursor } from './TezosTransactionCursor';
3
+ export interface TezosTransactionResult {
4
+ transactions: IAirGapTransaction[];
5
+ cursor: TezosTransactionCursor;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosTransactionResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosTransactionResult.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosTransactionResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { TezosOperation } from './operations/TezosOperation';
2
+ export interface TezosWrappedOperation {
3
+ branch: string;
4
+ contents: TezosOperation[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosWrappedOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosWrappedOperation.js","sourceRoot":"","sources":["../../../src/protocol/types/TezosWrappedOperation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { MichelineTypeNode } from '../micheline/MichelineNode';
2
+ export interface BigMap {
3
+ id: number;
4
+ path: string;
5
+ keyType: MichelineTypeNode;
6
+ valueType: MichelineTypeNode;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BigMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BigMap.js","sourceRoot":"","sources":["../../../../src/protocol/types/contract/BigMap.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface BigMapEntryFilter {
2
+ field: 'key' | 'value';
3
+ operation: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le' | 'as' | 'un' | 'in' | 'ni' | 'null';
4
+ value: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BigMapEnrtyFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BigMapEnrtyFilter.js","sourceRoot":"","sources":["../../../../src/protocol/types/contract/BigMapEnrtyFilter.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { MichelineDataNode } from '../micheline/MichelineNode';
2
+ export interface BigMapEntry {
3
+ bigMapId: number;
4
+ key: MichelineDataNode;
5
+ keyHash: string;
6
+ value: MichelineDataNode;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BigMapEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BigMapEntry.js","sourceRoot":"","sources":["../../../../src/protocol/types/contract/BigMapEntry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { BigMap } from './BigMap';
2
+ import { BigMapEntryFilter } from './BigMapEnrtyFilter';
3
+ export interface BigMapRequest {
4
+ bigMap?: Omit<BigMap, 'valueType' | 'keyType'>;
5
+ filters?: BigMapEntryFilter[];
6
+ key?: string;
7
+ limit?: number;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BigMapRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BigMapRequest.js","sourceRoot":"","sources":["../../../../src/protocol/types/contract/BigMapRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,61 @@
1
+ import { MichelineCodeNode, MichelineDataNode, MichelineTypeNode } from '../micheline/MichelineNode';
2
+ interface MetadataLicense {
3
+ name: string;
4
+ details?: string;
5
+ }
6
+ interface MetadataSource {
7
+ tools?: string;
8
+ location?: string;
9
+ }
10
+ interface MetadataErrorBase {
11
+ languages?: string[];
12
+ }
13
+ interface MetadataErrorStatic extends MetadataErrorBase {
14
+ error: MichelineDataNode;
15
+ expansion: MichelineDataNode;
16
+ }
17
+ interface MetadataErrorDynamic extends MetadataErrorBase {
18
+ view: string;
19
+ }
20
+ declare type MetadataError = MetadataErrorStatic | MetadataErrorDynamic;
21
+ interface MetadataAnnotation {
22
+ name: string;
23
+ description: string;
24
+ }
25
+ interface MetadataMichelsonStorageView {
26
+ parameter?: MichelineTypeNode;
27
+ returnType: MichelineTypeNode;
28
+ code: MichelineCodeNode;
29
+ annotations?: MetadataAnnotation[];
30
+ version?: string;
31
+ }
32
+ interface MetadataRestApiQuery {
33
+ specificationUri: string;
34
+ baseUri?: string;
35
+ path: string;
36
+ method?: string;
37
+ }
38
+ declare type MetadataViewImplementations = {
39
+ michelsonStorageView: MetadataMichelsonStorageView;
40
+ } | {
41
+ restApiQuery: MetadataRestApiQuery;
42
+ };
43
+ interface MetadataView {
44
+ name: string;
45
+ description?: string;
46
+ implementations: MetadataViewImplementations[];
47
+ pure?: boolean;
48
+ }
49
+ export interface TezosContractMetadata {
50
+ name?: string;
51
+ description?: string;
52
+ version?: string;
53
+ license?: MetadataLicense;
54
+ authors?: string[];
55
+ homepage?: string;
56
+ source?: MetadataSource;
57
+ interfaces?: string[];
58
+ errors?: MetadataError[];
59
+ views?: MetadataView[];
60
+ }
61
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosContractMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosContractMetadata.js","sourceRoot":"","sources":["../../../../src/protocol/types/contract/TezosContractMetadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface TezosDomainsRecord {
2
+ address?: string;
3
+ expiryKey?: string;
4
+ expiryTimestamp?: number;
5
+ level: number;
6
+ owner: string;
7
+ tokenId?: number;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosDomainsRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosDomainsRecord.js","sourceRoot":"","sources":["../../../../src/protocol/types/domains/TezosDomainsRecord.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface TezosDomainsReverseRecord {
2
+ name?: string;
3
+ owner: string;
4
+ expiryTimestamp?: number;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosDomainsReverseRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosDomainsReverseRecord.js","sourceRoot":"","sources":["../../../../src/protocol/types/domains/TezosDomainsReverseRecord.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface TezosFA2BalanceOfRequest {
2
+ address: string;
3
+ tokenID: number | string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TezosFA2BalanceOfRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TezosFA2BalanceOfRequest.js","sourceRoot":"","sources":["../../../../src/protocol/types/fa/TezosFA2BalanceOfRequest.ts"],"names":[],"mappings":""}