wowok 1.8.2 → 2.1.9

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 (892) hide show
  1. package/README.md +4 -33
  2. package/dist/cjs/bcs/bcs.d.ts +1973 -0
  3. package/dist/cjs/bcs/bcs.js +327 -0
  4. package/dist/cjs/bcs/effects.d.ts +579 -0
  5. package/dist/cjs/bcs/effects.js +231 -0
  6. package/dist/cjs/bcs/index.d.ts +2589 -0
  7. package/dist/cjs/bcs/index.js +79 -0
  8. package/dist/cjs/bcs/pure.d.ts +22 -0
  9. package/dist/cjs/bcs/pure.js +62 -0
  10. package/dist/cjs/bcs/type-tag-serializer.d.ts +7 -0
  11. package/dist/cjs/bcs/type-tag-serializer.js +124 -0
  12. package/dist/cjs/bcs/types.d.ts +114 -0
  13. package/dist/cjs/bcs/types.js +26 -0
  14. package/dist/cjs/client/index.d.ts +5 -0
  15. package/dist/cjs/client/index.js +34 -0
  16. package/dist/cjs/client/network.d.ts +5 -0
  17. package/dist/cjs/client/network.js +43 -0
  18. package/dist/cjs/cryptography/index.d.ts +7 -0
  19. package/dist/cjs/cryptography/index.js +46 -0
  20. package/dist/cjs/cryptography/intent.d.ts +6 -0
  21. package/dist/cjs/cryptography/intent.js +34 -0
  22. package/dist/cjs/cryptography/keypair.d.ts +73 -0
  23. package/dist/cjs/cryptography/keypair.js +125 -0
  24. package/dist/cjs/cryptography/mnemonics.d.ts +27 -0
  25. package/dist/cjs/cryptography/mnemonics.js +50 -0
  26. package/dist/cjs/cryptography/publickey.d.ts +67 -0
  27. package/dist/cjs/cryptography/publickey.js +142 -0
  28. package/dist/cjs/cryptography/signature-scheme.d.ts +24 -0
  29. package/dist/cjs/cryptography/signature-scheme.js +47 -0
  30. package/dist/cjs/cryptography/signature.d.ts +62 -0
  31. package/dist/cjs/cryptography/signature.js +71 -0
  32. package/dist/cjs/experimental/cache.d.ts +12 -0
  33. package/dist/cjs/experimental/client.d.ts +12 -0
  34. package/dist/cjs/experimental/core.d.ts +33 -0
  35. package/dist/cjs/experimental/errors.d.ts +8 -0
  36. package/dist/cjs/experimental/index.d.ts +7 -0
  37. package/dist/cjs/experimental/persistent-storage.d.ts +134 -0
  38. package/dist/cjs/experimental/persistent-storage.test.d.ts +5 -0
  39. package/dist/cjs/experimental/transports/utils.d.ts +3 -0
  40. package/dist/cjs/experimental/types.d.ts +367 -0
  41. package/dist/cjs/faucet/faucet.d.ts +66 -0
  42. package/dist/cjs/faucet/faucet.js +138 -0
  43. package/dist/cjs/faucet/index.d.ts +1 -0
  44. package/dist/cjs/faucet/index.js +29 -0
  45. package/dist/cjs/graphql/client.js +98 -0
  46. package/dist/cjs/graphql/core.js +506 -0
  47. package/dist/cjs/graphql/generated/2024.1/tada-env.js +13141 -0
  48. package/dist/cjs/graphql/generated/2024.1/tsconfig.tada.js +11 -0
  49. package/dist/cjs/graphql/generated/2024.4/tada-env.js +13287 -0
  50. package/dist/cjs/graphql/generated/2024.4/tsconfig.tada.js +11 -0
  51. package/dist/cjs/graphql/generated/latest/tada-env.js +12925 -0
  52. package/dist/cjs/graphql/generated/latest/tsconfig.tada.js +11 -0
  53. package/dist/cjs/graphql/generated/queries.js +807 -0
  54. package/dist/cjs/graphql/index.js +25 -0
  55. package/dist/cjs/graphql/schemas/2024.1/index.js +28 -0
  56. package/dist/cjs/graphql/schemas/2024.4/index.js +28 -0
  57. package/dist/cjs/graphql/schemas/latest/index.js +28 -0
  58. package/dist/cjs/graphql/types.js +16 -0
  59. package/dist/cjs/grpc/client.d.ts +32 -0
  60. package/dist/cjs/grpc/client.js +64 -0
  61. package/dist/cjs/grpc/core.d.ts +28 -0
  62. package/dist/cjs/grpc/core.js +645 -0
  63. package/dist/cjs/grpc/index.d.ts +4 -0
  64. package/dist/cjs/grpc/index.js +26 -0
  65. package/dist/cjs/grpc/proto/google/protobuf/any.d.ts +173 -0
  66. package/dist/cjs/grpc/proto/google/protobuf/any.js +138 -0
  67. package/dist/cjs/grpc/proto/google/protobuf/duration.d.ts +104 -0
  68. package/dist/cjs/grpc/proto/google/protobuf/duration.js +94 -0
  69. package/dist/cjs/grpc/proto/google/protobuf/empty.d.ts +25 -0
  70. package/dist/cjs/grpc/proto/google/protobuf/empty.js +30 -0
  71. package/dist/cjs/grpc/proto/google/protobuf/field_mask.d.ts +231 -0
  72. package/dist/cjs/grpc/proto/google/protobuf/field_mask.js +77 -0
  73. package/dist/cjs/grpc/proto/google/protobuf/struct.d.ts +169 -0
  74. package/dist/cjs/grpc/proto/google/protobuf/struct.js +224 -0
  75. package/dist/cjs/grpc/proto/google/protobuf/timestamp.d.ts +145 -0
  76. package/dist/cjs/grpc/proto/google/protobuf/timestamp.js +134 -0
  77. package/dist/cjs/grpc/proto/google/rpc/error_details.d.ts +525 -0
  78. package/dist/cjs/grpc/proto/google/rpc/error_details.js +317 -0
  79. package/dist/cjs/grpc/proto/google/rpc/status.d.ts +46 -0
  80. package/dist/cjs/grpc/proto/google/rpc/status.js +52 -0
  81. package/dist/cjs/grpc/proto/sui/rpc/v2/argument.d.ts +66 -0
  82. package/dist/cjs/grpc/proto/sui/rpc/v2/argument.js +70 -0
  83. package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.d.ts +34 -0
  84. package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.js +52 -0
  85. package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.d.ts +30 -0
  86. package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.js +45 -0
  87. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.d.ts +68 -0
  88. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js +77 -0
  89. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.d.ts +74 -0
  90. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js +84 -0
  91. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.d.ts +195 -0
  92. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js +170 -0
  93. package/dist/cjs/grpc/proto/sui/rpc/v2/effects.d.ts +338 -0
  94. package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js +300 -0
  95. package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.d.ts +62 -0
  96. package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.js +87 -0
  97. package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.d.ts +17 -0
  98. package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.js +29 -0
  99. package/dist/cjs/grpc/proto/sui/rpc/v2/event.d.ts +88 -0
  100. package/dist/cjs/grpc/proto/sui/rpc/v2/event.js +86 -0
  101. package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.d.ts +80 -0
  102. package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js +87 -0
  103. package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.d.ts +843 -0
  104. package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js +519 -0
  105. package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.d.ts +41 -0
  106. package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.js +63 -0
  107. package/dist/cjs/grpc/proto/sui/rpc/v2/input.d.ts +98 -0
  108. package/dist/cjs/grpc/proto/sui/rpc/v2/input.js +85 -0
  109. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.d.ts +70 -0
  110. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js +81 -0
  111. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +95 -0
  112. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.js +122 -0
  113. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.d.ts +420 -0
  114. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js +368 -0
  115. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.d.ts +579 -0
  116. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js +485 -0
  117. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +61 -0
  118. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.js +81 -0
  119. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.d.ts +229 -0
  120. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js +241 -0
  121. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.d.ts +41 -0
  122. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js +55 -0
  123. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.d.ts +144 -0
  124. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js +141 -0
  125. package/dist/cjs/grpc/proto/sui/rpc/v2/object.d.ts +127 -0
  126. package/dist/cjs/grpc/proto/sui/rpc/v2/object.js +114 -0
  127. package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.d.ts +34 -0
  128. package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.js +53 -0
  129. package/dist/cjs/grpc/proto/sui/rpc/v2/owner.d.ts +61 -0
  130. package/dist/cjs/grpc/proto/sui/rpc/v2/owner.js +63 -0
  131. package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.d.ts +30 -0
  132. package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.js +61 -0
  133. package/dist/cjs/grpc/proto/sui/rpc/v2/signature.d.ts +630 -0
  134. package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js +541 -0
  135. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.d.ts +40 -0
  136. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.js +33 -0
  137. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.ts +35 -0
  138. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +50 -0
  139. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.d.ts +79 -0
  140. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js +90 -0
  141. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.d.ts +71 -0
  142. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js +88 -0
  143. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.d.ts +690 -0
  144. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js +546 -0
  145. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.d.ts +55 -0
  146. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.js +54 -0
  147. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.d.ts +57 -0
  148. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.js +65 -0
  149. package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.d.ts +684 -0
  150. package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js +740 -0
  151. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.d.ts +1321 -0
  152. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js +1005 -0
  153. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +41 -0
  154. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +49 -0
  155. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +184 -0
  156. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js +177 -0
  157. package/dist/cjs/index.d.ts +25 -0
  158. package/dist/cjs/index.js +93 -0
  159. package/dist/cjs/jsonRpc/client.d.ts +261 -0
  160. package/dist/cjs/jsonRpc/client.js +747 -0
  161. package/dist/cjs/jsonRpc/core.d.ts +87 -0
  162. package/dist/cjs/jsonRpc/core.js +638 -0
  163. package/dist/cjs/jsonRpc/errors.d.ts +12 -0
  164. package/dist/cjs/jsonRpc/errors.js +65 -0
  165. package/dist/cjs/jsonRpc/http-transport.d.ts +42 -0
  166. package/dist/cjs/jsonRpc/http-transport.js +121 -0
  167. package/dist/cjs/jsonRpc/index.d.ts +4 -0
  168. package/dist/cjs/jsonRpc/index.js +31 -0
  169. package/dist/cjs/jsonRpc/json-rpc-resolver.d.ts +4 -0
  170. package/dist/cjs/jsonRpc/json-rpc-resolver.js +321 -0
  171. package/dist/cjs/jsonRpc/rpc-websocket-client.d.ts +43 -0
  172. package/dist/cjs/jsonRpc/rpc-websocket-client.js +220 -0
  173. package/dist/cjs/jsonRpc/types/chain.d.ts +99 -0
  174. package/dist/cjs/jsonRpc/types/chain.js +16 -0
  175. package/dist/cjs/jsonRpc/types/changes.d.ts +19 -0
  176. package/dist/cjs/jsonRpc/types/changes.js +16 -0
  177. package/dist/cjs/jsonRpc/types/coins.d.ts +6 -0
  178. package/dist/cjs/jsonRpc/types/coins.js +16 -0
  179. package/dist/cjs/jsonRpc/types/common.d.ts +2 -0
  180. package/dist/cjs/jsonRpc/types/common.js +16 -0
  181. package/dist/cjs/jsonRpc/types/generated.d.ts +1492 -0
  182. package/dist/cjs/jsonRpc/types/generated.js +16 -0
  183. package/dist/cjs/jsonRpc/types/index.d.ts +6 -0
  184. package/dist/cjs/jsonRpc/types/index.js +16 -0
  185. package/dist/cjs/jsonRpc/types/params.d.ts +656 -0
  186. package/dist/cjs/jsonRpc/types/params.js +16 -0
  187. package/dist/cjs/keypairs/ed25519/ed25519-hd-key.d.ts +8 -0
  188. package/dist/cjs/keypairs/ed25519/ed25519-hd-key.js +82 -0
  189. package/dist/cjs/keypairs/ed25519/index.d.ts +2 -0
  190. package/dist/cjs/keypairs/ed25519/index.js +27 -0
  191. package/dist/cjs/keypairs/ed25519/keypair.d.ts +74 -0
  192. package/dist/cjs/keypairs/ed25519/keypair.js +169 -0
  193. package/dist/cjs/keypairs/ed25519/publickey.d.ts +30 -0
  194. package/dist/cjs/keypairs/ed25519/publickey.js +90 -0
  195. package/dist/cjs/keypairs/index.d.ts +4 -0
  196. package/dist/cjs/keypairs/index.js +21 -0
  197. package/dist/cjs/keypairs/passkey/index.d.ts +3 -0
  198. package/dist/cjs/keypairs/passkey/index.js +28 -0
  199. package/dist/cjs/keypairs/passkey/keypair.d.ts +113 -0
  200. package/dist/cjs/keypairs/passkey/keypair.js +268 -0
  201. package/dist/cjs/keypairs/passkey/publickey.d.ts +72 -0
  202. package/dist/cjs/keypairs/passkey/publickey.js +175 -0
  203. package/dist/cjs/keypairs/passkey/types.d.ts +12 -0
  204. package/dist/cjs/keypairs/passkey/types.js +16 -0
  205. package/dist/cjs/keypairs/secp256k1/index.d.ts +2 -0
  206. package/dist/cjs/keypairs/secp256k1/index.js +27 -0
  207. package/dist/cjs/keypairs/secp256k1/keypair.d.ts +73 -0
  208. package/dist/cjs/keypairs/secp256k1/keypair.js +159 -0
  209. package/dist/cjs/keypairs/secp256k1/publickey.d.ts +30 -0
  210. package/dist/cjs/keypairs/secp256k1/publickey.js +95 -0
  211. package/dist/cjs/keypairs/secp256r1/index.d.ts +2 -0
  212. package/dist/cjs/keypairs/secp256r1/index.js +27 -0
  213. package/dist/cjs/keypairs/secp256r1/keypair.d.ts +73 -0
  214. package/dist/cjs/keypairs/secp256r1/keypair.js +155 -0
  215. package/dist/cjs/keypairs/secp256r1/publickey.d.ts +30 -0
  216. package/dist/cjs/keypairs/secp256r1/publickey.js +96 -0
  217. package/dist/cjs/multisig/index.d.ts +2 -0
  218. package/dist/cjs/multisig/index.js +27 -0
  219. package/dist/cjs/multisig/publickey.d.ts +79 -0
  220. package/dist/cjs/multisig/publickey.js +296 -0
  221. package/dist/cjs/multisig/signer.d.ts +20 -0
  222. package/dist/cjs/multisig/signer.js +114 -0
  223. package/dist/cjs/package.json +5 -0
  224. package/dist/cjs/transactions/Arguments.d.ts +57 -0
  225. package/dist/cjs/transactions/Arguments.js +36 -0
  226. package/dist/cjs/transactions/Commands.d.ts +57 -0
  227. package/dist/cjs/transactions/Commands.js +143 -0
  228. package/dist/cjs/transactions/Inputs.d.ts +22 -0
  229. package/dist/cjs/transactions/Inputs.js +87 -0
  230. package/dist/cjs/transactions/ObjectCache.d.ts +83 -0
  231. package/dist/cjs/transactions/ObjectCache.js +251 -0
  232. package/dist/cjs/transactions/Transaction.d.ts +710 -0
  233. package/dist/cjs/transactions/Transaction.js +742 -0
  234. package/dist/cjs/transactions/TransactionData.d.ts +73 -0
  235. package/dist/cjs/transactions/TransactionData.js +472 -0
  236. package/dist/cjs/transactions/__tests__/Transaction.test.d.ts +1 -0
  237. package/dist/cjs/transactions/__tests__/bcs.test.d.ts +1 -0
  238. package/dist/cjs/transactions/data/internal.d.ts +1010 -0
  239. package/dist/cjs/transactions/data/internal.js +230 -0
  240. package/dist/cjs/transactions/data/v1.d.ts +312 -0
  241. package/dist/cjs/transactions/data/v1.js +538 -0
  242. package/dist/cjs/transactions/data/v2.d.ts +153 -0
  243. package/dist/cjs/transactions/data/v2.js +124 -0
  244. package/dist/cjs/transactions/executor/caching.d.ts +31 -0
  245. package/dist/cjs/transactions/executor/caching.js +118 -0
  246. package/dist/cjs/transactions/executor/parallel.d.ts +37 -0
  247. package/dist/cjs/transactions/executor/parallel.js +395 -0
  248. package/dist/cjs/transactions/executor/queue.d.ts +11 -0
  249. package/dist/cjs/transactions/executor/queue.js +87 -0
  250. package/dist/cjs/transactions/executor/serial.d.ts +31 -0
  251. package/dist/cjs/transactions/executor/serial.js +136 -0
  252. package/dist/cjs/transactions/hash.d.ts +7 -0
  253. package/dist/cjs/transactions/hash.js +31 -0
  254. package/dist/cjs/transactions/index.d.ts +21 -0
  255. package/dist/cjs/transactions/index.js +50 -0
  256. package/dist/cjs/transactions/intents/CoinWithBalance.d.ts +9 -0
  257. package/dist/cjs/transactions/intents/CoinWithBalance.js +206 -0
  258. package/dist/cjs/transactions/object.d.ts +24 -0
  259. package/dist/cjs/transactions/object.js +116 -0
  260. package/dist/cjs/transactions/plugins/NamedPackagesPlugin.d.ts +31 -0
  261. package/dist/cjs/transactions/plugins/NamedPackagesPlugin.js +37 -0
  262. package/dist/cjs/transactions/pure.d.ts +20 -0
  263. package/dist/cjs/transactions/pure.js +64 -0
  264. package/dist/cjs/transactions/resolve.d.ts +13 -0
  265. package/dist/cjs/transactions/resolve.js +103 -0
  266. package/dist/cjs/transactions/serializer.d.ts +7 -0
  267. package/dist/cjs/transactions/serializer.js +189 -0
  268. package/dist/cjs/transactions/utils.d.ts +10 -0
  269. package/dist/cjs/transactions/utils.js +143 -0
  270. package/dist/cjs/utils/constants.d.ts +17 -0
  271. package/dist/cjs/utils/constants.js +57 -0
  272. package/dist/cjs/utils/derived-objects.d.ts +5 -0
  273. package/dist/cjs/utils/derived-objects.js +33 -0
  274. package/dist/cjs/utils/dynamic-fields.d.ts +2 -0
  275. package/dist/cjs/utils/dynamic-fields.js +40 -0
  276. package/dist/cjs/utils/format.d.ts +2 -0
  277. package/dist/cjs/utils/format.js +35 -0
  278. package/dist/cjs/utils/index.d.ts +8 -0
  279. package/dist/cjs/utils/index.js +65 -0
  280. package/dist/cjs/utils/move-registry.d.ts +6 -0
  281. package/dist/cjs/utils/move-registry.js +44 -0
  282. package/dist/cjs/utils/sui-types.d.ts +26 -0
  283. package/dist/cjs/utils/sui-types.js +90 -0
  284. package/dist/cjs/utils/suins.d.ts +2 -0
  285. package/dist/cjs/utils/suins.js +56 -0
  286. package/dist/cjs/verify/index.d.ts +1 -0
  287. package/dist/cjs/verify/index.js +28 -0
  288. package/dist/cjs/verify/verify.d.ts +16 -0
  289. package/dist/cjs/verify/verify.js +125 -0
  290. package/dist/cjs/version.d.ts +2 -0
  291. package/dist/cjs/version.js +26 -0
  292. package/dist/cjs/w/call/allocation.d.ts +35 -0
  293. package/dist/cjs/w/call/allocation.js +439 -0
  294. package/dist/cjs/w/call/arb.d.ts +17 -0
  295. package/dist/cjs/w/call/arb.js +149 -0
  296. package/dist/cjs/w/call/arbitration.d.ts +106 -0
  297. package/dist/cjs/w/call/arbitration.js +1623 -0
  298. package/dist/cjs/w/call/base.d.ts +42 -0
  299. package/dist/cjs/w/call/base.js +363 -0
  300. package/dist/cjs/w/call/contact.d.ts +45 -0
  301. package/dist/cjs/w/call/contact.js +479 -0
  302. package/dist/cjs/w/call/demand.d.ts +79 -0
  303. package/dist/cjs/w/call/demand.js +872 -0
  304. package/dist/cjs/w/call/entity.d.ts +33 -0
  305. package/dist/cjs/w/call/entity.js +230 -0
  306. package/dist/cjs/w/call/guard-ins.d.ts +31 -0
  307. package/dist/cjs/w/call/guard-ins.js +4391 -0
  308. package/dist/cjs/w/call/guard.d.ts +254 -0
  309. package/dist/cjs/w/call/guard.js +1210 -0
  310. package/dist/cjs/w/call/index.d.ts +37 -0
  311. package/dist/cjs/w/call/index.js +71 -0
  312. package/dist/cjs/w/call/machine.d.ts +124 -0
  313. package/dist/cjs/w/call/machine.js +1486 -0
  314. package/dist/cjs/w/call/order.d.ts +73 -0
  315. package/dist/cjs/w/call/order.js +485 -0
  316. package/dist/cjs/w/call/passport.d.ts +24 -0
  317. package/dist/cjs/w/call/passport.js +281 -0
  318. package/dist/cjs/w/call/payment.d.ts +27 -0
  319. package/dist/cjs/w/call/payment.js +241 -0
  320. package/dist/cjs/w/call/permission.d.ts +222 -0
  321. package/dist/cjs/w/call/permission.js +1368 -0
  322. package/dist/cjs/w/call/personal.d.ts +51 -0
  323. package/dist/cjs/w/call/personal.js +184 -0
  324. package/dist/cjs/w/call/progress.d.ts +94 -0
  325. package/dist/cjs/w/call/progress.js +833 -0
  326. package/dist/cjs/w/call/proof.d.ts +27 -0
  327. package/dist/cjs/w/call/proof.js +124 -0
  328. package/dist/cjs/w/call/repository.d.ts +97 -0
  329. package/dist/cjs/w/call/repository.js +1324 -0
  330. package/dist/cjs/w/call/resource.d.ts +27 -0
  331. package/dist/cjs/w/call/resource.js +149 -0
  332. package/dist/cjs/w/call/reward.d.ts +52 -0
  333. package/dist/cjs/w/call/reward.js +879 -0
  334. package/dist/cjs/w/call/service.d.ts +184 -0
  335. package/dist/cjs/w/call/service.js +2468 -0
  336. package/dist/cjs/w/call/treasury.d.ts +77 -0
  337. package/dist/cjs/w/call/treasury.js +1192 -0
  338. package/dist/cjs/w/call/util.d.ts +12 -0
  339. package/dist/cjs/w/call/util.js +661 -0
  340. package/dist/cjs/w/common.d.ts +359 -0
  341. package/dist/cjs/w/common.js +625 -0
  342. package/dist/cjs/w/exception.d.ts +82 -0
  343. package/dist/cjs/w/exception.js +604 -0
  344. package/dist/cjs/w/index.d.ts +8 -0
  345. package/dist/cjs/w/index.js +25 -0
  346. package/dist/cjs/w/local/.eslintrc.js +15 -0
  347. package/dist/cjs/w/local/account.d.ts +134 -0
  348. package/dist/cjs/w/local/account.js +770 -0
  349. package/dist/cjs/w/local/cache.d.ts +35 -0
  350. package/dist/cjs/w/local/cache.js +181 -0
  351. package/dist/cjs/w/local/config.d.ts +15 -0
  352. package/dist/cjs/w/local/config.js +83 -0
  353. package/dist/cjs/w/local/index.d.ts +193 -0
  354. package/dist/cjs/w/local/index.js +322 -0
  355. package/dist/cjs/w/local/local.d.ts +93 -0
  356. package/dist/cjs/w/local/local.js +673 -0
  357. package/dist/cjs/w/local/storage.d.ts +61 -0
  358. package/dist/cjs/w/local/storage.js +219 -0
  359. package/dist/cjs/w/local/token.d.ts +22 -0
  360. package/dist/cjs/w/local/token.js +182 -0
  361. package/dist/cjs/w/local/util.d.ts +5 -0
  362. package/dist/cjs/w/local/util.js +57 -0
  363. package/dist/cjs/w/local/wip.d.ts +218 -0
  364. package/dist/cjs/w/local/wip.js +911 -0
  365. package/dist/cjs/w/messenger/.eslintrc.js +15 -0
  366. package/dist/cjs/w/messenger/crypto.d.ts +269 -0
  367. package/dist/cjs/w/messenger/crypto.js +448 -0
  368. package/dist/cjs/w/messenger/index.d.ts +23 -0
  369. package/dist/cjs/w/messenger/index.js +37 -0
  370. package/dist/cjs/w/messenger/messenger-api.d.ts +225 -0
  371. package/dist/cjs/w/messenger/messenger-api.js +1247 -0
  372. package/dist/cjs/w/messenger/messenger-manager.d.ts +80 -0
  373. package/dist/cjs/w/messenger/messenger-manager.js +1143 -0
  374. package/dist/cjs/w/messenger/messenger.d.ts +231 -0
  375. package/dist/cjs/w/messenger/messenger.js +1512 -0
  376. package/dist/cjs/w/messenger/server.d.ts +134 -0
  377. package/dist/cjs/w/messenger/server.js +535 -0
  378. package/dist/cjs/w/messenger/session.d.ts +78 -0
  379. package/dist/cjs/w/messenger/session.js +418 -0
  380. package/dist/cjs/w/messenger/storage.d.ts +192 -0
  381. package/dist/cjs/w/messenger/storage.js +964 -0
  382. package/dist/cjs/w/messenger/types.d.ts +705 -0
  383. package/dist/cjs/w/messenger/types.js +107 -0
  384. package/dist/cjs/w/messenger/utils.d.ts +15 -0
  385. package/dist/cjs/w/messenger/utils.js +37 -0
  386. package/dist/cjs/w/query/bult-in.d.ts +73 -0
  387. package/dist/cjs/w/query/bult-in.js +121 -0
  388. package/dist/cjs/w/query/event.d.ts +82 -0
  389. package/dist/cjs/w/query/event.js +157 -0
  390. package/dist/cjs/w/query/index.d.ts +5 -0
  391. package/dist/cjs/w/query/index.js +22 -0
  392. package/dist/cjs/w/query/object.d.ts +658 -0
  393. package/dist/cjs/w/query/object.js +1671 -0
  394. package/dist/cjs/w/query/received.d.ts +34 -0
  395. package/dist/cjs/w/query/received.js +93 -0
  396. package/dist/cjs/w/query/util.d.ts +5 -0
  397. package/dist/cjs/w/query/util.js +82 -0
  398. package/dist/cjs/w/util.d.ts +19 -0
  399. package/dist/cjs/w/util.js +715 -0
  400. package/dist/cjs/zklogin/address.js +93 -0
  401. package/dist/cjs/zklogin/bcs.js +41 -0
  402. package/dist/cjs/zklogin/index.js +45 -0
  403. package/dist/cjs/zklogin/jwt-decode.js +88 -0
  404. package/dist/cjs/zklogin/jwt-utils.js +128 -0
  405. package/dist/cjs/zklogin/nonce.js +60 -0
  406. package/dist/cjs/zklogin/poseidon.js +64 -0
  407. package/dist/cjs/zklogin/publickey.js +281 -0
  408. package/dist/cjs/zklogin/signature.js +57 -0
  409. package/dist/cjs/zklogin/utils.js +98 -0
  410. package/dist/esm/bcs/bcs.d.ts +1973 -0
  411. package/dist/esm/bcs/bcs.js +319 -0
  412. package/dist/esm/bcs/effects.d.ts +579 -0
  413. package/dist/esm/bcs/effects.js +211 -0
  414. package/dist/esm/bcs/index.d.ts +2589 -0
  415. package/dist/esm/bcs/index.js +98 -0
  416. package/dist/esm/bcs/pure.d.ts +22 -0
  417. package/dist/esm/bcs/pure.js +42 -0
  418. package/dist/esm/bcs/type-tag-serializer.d.ts +7 -0
  419. package/dist/esm/bcs/type-tag-serializer.js +104 -0
  420. package/dist/esm/bcs/types.d.ts +114 -0
  421. package/dist/esm/bcs/types.js +6 -0
  422. package/dist/esm/client/index.d.ts +5 -0
  423. package/dist/esm/client/index.js +23 -0
  424. package/dist/esm/client/network.d.ts +5 -0
  425. package/dist/esm/client/network.js +23 -0
  426. package/dist/esm/cryptography/index.d.ts +7 -0
  427. package/dist/esm/cryptography/index.js +46 -0
  428. package/dist/esm/cryptography/intent.d.ts +6 -0
  429. package/dist/esm/cryptography/intent.js +14 -0
  430. package/dist/esm/cryptography/keypair.d.ts +73 -0
  431. package/dist/esm/cryptography/keypair.js +108 -0
  432. package/dist/esm/cryptography/mnemonics.d.ts +27 -0
  433. package/dist/esm/cryptography/mnemonics.js +30 -0
  434. package/dist/esm/cryptography/publickey.d.ts +67 -0
  435. package/dist/esm/cryptography/publickey.js +125 -0
  436. package/dist/esm/cryptography/signature-scheme.d.ts +24 -0
  437. package/dist/esm/cryptography/signature-scheme.js +27 -0
  438. package/dist/esm/cryptography/signature.d.ts +62 -0
  439. package/dist/esm/cryptography/signature.js +54 -0
  440. package/dist/esm/experimental/cache.d.ts +12 -0
  441. package/dist/esm/experimental/client.d.ts +12 -0
  442. package/dist/esm/experimental/core.d.ts +33 -0
  443. package/dist/esm/experimental/errors.d.ts +8 -0
  444. package/dist/esm/experimental/index.d.ts +7 -0
  445. package/dist/esm/experimental/persistent-storage.d.ts +134 -0
  446. package/dist/esm/experimental/persistent-storage.test.d.ts +5 -0
  447. package/dist/esm/experimental/transports/utils.d.ts +3 -0
  448. package/dist/esm/experimental/types.d.ts +367 -0
  449. package/dist/esm/faucet/faucet.d.ts +66 -0
  450. package/dist/esm/faucet/faucet.js +118 -0
  451. package/dist/esm/faucet/index.d.ts +1 -0
  452. package/dist/esm/faucet/index.js +16 -0
  453. package/dist/esm/graphql/client.js +79 -0
  454. package/dist/esm/graphql/core.js +505 -0
  455. package/dist/esm/graphql/generated/2024.1/tada-env.js +13121 -0
  456. package/dist/esm/graphql/generated/2024.1/tsconfig.tada.js +16 -0
  457. package/dist/esm/graphql/generated/2024.4/tada-env.js +13267 -0
  458. package/dist/esm/graphql/generated/2024.4/tsconfig.tada.js +16 -0
  459. package/dist/esm/graphql/generated/latest/tada-env.js +12905 -0
  460. package/dist/esm/graphql/generated/latest/tsconfig.tada.js +16 -0
  461. package/dist/esm/graphql/generated/queries.js +788 -0
  462. package/dist/esm/graphql/index.js +8 -0
  463. package/dist/esm/graphql/schemas/2024.1/index.js +8 -0
  464. package/dist/esm/graphql/schemas/2024.4/index.js +8 -0
  465. package/dist/esm/graphql/schemas/latest/index.js +8 -0
  466. package/dist/esm/graphql/types.js +0 -0
  467. package/dist/esm/grpc/client.d.ts +32 -0
  468. package/dist/esm/grpc/client.js +45 -0
  469. package/dist/esm/grpc/core.d.ts +28 -0
  470. package/dist/esm/grpc/core.js +634 -0
  471. package/dist/esm/grpc/index.d.ts +4 -0
  472. package/dist/esm/grpc/index.js +6 -0
  473. package/dist/esm/grpc/proto/google/protobuf/any.d.ts +173 -0
  474. package/dist/esm/grpc/proto/google/protobuf/any.js +118 -0
  475. package/dist/esm/grpc/proto/google/protobuf/duration.d.ts +104 -0
  476. package/dist/esm/grpc/proto/google/protobuf/duration.js +74 -0
  477. package/dist/esm/grpc/proto/google/protobuf/empty.d.ts +25 -0
  478. package/dist/esm/grpc/proto/google/protobuf/empty.js +10 -0
  479. package/dist/esm/grpc/proto/google/protobuf/field_mask.d.ts +231 -0
  480. package/dist/esm/grpc/proto/google/protobuf/field_mask.js +57 -0
  481. package/dist/esm/grpc/proto/google/protobuf/struct.d.ts +169 -0
  482. package/dist/esm/grpc/proto/google/protobuf/struct.js +204 -0
  483. package/dist/esm/grpc/proto/google/protobuf/timestamp.d.ts +145 -0
  484. package/dist/esm/grpc/proto/google/protobuf/timestamp.js +114 -0
  485. package/dist/esm/grpc/proto/google/rpc/error_details.d.ts +525 -0
  486. package/dist/esm/grpc/proto/google/rpc/error_details.js +297 -0
  487. package/dist/esm/grpc/proto/google/rpc/status.d.ts +46 -0
  488. package/dist/esm/grpc/proto/google/rpc/status.js +32 -0
  489. package/dist/esm/grpc/proto/sui/rpc/v2/argument.d.ts +66 -0
  490. package/dist/esm/grpc/proto/sui/rpc/v2/argument.js +50 -0
  491. package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.d.ts +34 -0
  492. package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.js +32 -0
  493. package/dist/esm/grpc/proto/sui/rpc/v2/bcs.d.ts +30 -0
  494. package/dist/esm/grpc/proto/sui/rpc/v2/bcs.js +25 -0
  495. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.d.ts +68 -0
  496. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js +57 -0
  497. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.d.ts +74 -0
  498. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js +64 -0
  499. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.d.ts +195 -0
  500. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js +150 -0
  501. package/dist/esm/grpc/proto/sui/rpc/v2/effects.d.ts +338 -0
  502. package/dist/esm/grpc/proto/sui/rpc/v2/effects.js +280 -0
  503. package/dist/esm/grpc/proto/sui/rpc/v2/epoch.d.ts +62 -0
  504. package/dist/esm/grpc/proto/sui/rpc/v2/epoch.js +67 -0
  505. package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.d.ts +17 -0
  506. package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.js +9 -0
  507. package/dist/esm/grpc/proto/sui/rpc/v2/event.d.ts +88 -0
  508. package/dist/esm/grpc/proto/sui/rpc/v2/event.js +66 -0
  509. package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.d.ts +80 -0
  510. package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js +67 -0
  511. package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.d.ts +843 -0
  512. package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js +499 -0
  513. package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.d.ts +41 -0
  514. package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.js +43 -0
  515. package/dist/esm/grpc/proto/sui/rpc/v2/input.d.ts +98 -0
  516. package/dist/esm/grpc/proto/sui/rpc/v2/input.js +65 -0
  517. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.d.ts +70 -0
  518. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js +61 -0
  519. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +95 -0
  520. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js +103 -0
  521. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.d.ts +420 -0
  522. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js +348 -0
  523. package/dist/esm/grpc/proto/sui/rpc/v2/move_package.d.ts +579 -0
  524. package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js +465 -0
  525. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +61 -0
  526. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.js +62 -0
  527. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.d.ts +229 -0
  528. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js +221 -0
  529. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.d.ts +41 -0
  530. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js +36 -0
  531. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.d.ts +144 -0
  532. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js +121 -0
  533. package/dist/esm/grpc/proto/sui/rpc/v2/object.d.ts +127 -0
  534. package/dist/esm/grpc/proto/sui/rpc/v2/object.js +94 -0
  535. package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.d.ts +34 -0
  536. package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.js +33 -0
  537. package/dist/esm/grpc/proto/sui/rpc/v2/owner.d.ts +61 -0
  538. package/dist/esm/grpc/proto/sui/rpc/v2/owner.js +43 -0
  539. package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.d.ts +30 -0
  540. package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js +41 -0
  541. package/dist/esm/grpc/proto/sui/rpc/v2/signature.d.ts +630 -0
  542. package/dist/esm/grpc/proto/sui/rpc/v2/signature.js +521 -0
  543. package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.d.ts +40 -0
  544. package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.js +13 -0
  545. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.ts +35 -0
  546. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +31 -0
  547. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.d.ts +79 -0
  548. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js +70 -0
  549. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.d.ts +71 -0
  550. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js +69 -0
  551. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.d.ts +690 -0
  552. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js +526 -0
  553. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.d.ts +55 -0
  554. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.js +35 -0
  555. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.d.ts +57 -0
  556. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.js +45 -0
  557. package/dist/esm/grpc/proto/sui/rpc/v2/system_state.d.ts +684 -0
  558. package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js +720 -0
  559. package/dist/esm/grpc/proto/sui/rpc/v2/transaction.d.ts +1321 -0
  560. package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js +985 -0
  561. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +41 -0
  562. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +30 -0
  563. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +184 -0
  564. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js +157 -0
  565. package/dist/esm/index.d.ts +25 -0
  566. package/dist/esm/index.js +119 -0
  567. package/dist/esm/jsonRpc/client.d.ts +261 -0
  568. package/dist/esm/jsonRpc/client.js +734 -0
  569. package/dist/esm/jsonRpc/core.d.ts +87 -0
  570. package/dist/esm/jsonRpc/core.js +621 -0
  571. package/dist/esm/jsonRpc/errors.d.ts +12 -0
  572. package/dist/esm/jsonRpc/errors.js +46 -0
  573. package/dist/esm/jsonRpc/http-transport.d.ts +42 -0
  574. package/dist/esm/jsonRpc/http-transport.js +101 -0
  575. package/dist/esm/jsonRpc/index.d.ts +4 -0
  576. package/dist/esm/jsonRpc/index.js +20 -0
  577. package/dist/esm/jsonRpc/json-rpc-resolver.d.ts +4 -0
  578. package/dist/esm/jsonRpc/json-rpc-resolver.js +309 -0
  579. package/dist/esm/jsonRpc/rpc-websocket-client.d.ts +43 -0
  580. package/dist/esm/jsonRpc/rpc-websocket-client.js +201 -0
  581. package/dist/esm/jsonRpc/types/chain.d.ts +99 -0
  582. package/dist/esm/jsonRpc/types/chain.js +0 -0
  583. package/dist/esm/jsonRpc/types/changes.d.ts +19 -0
  584. package/dist/esm/jsonRpc/types/changes.js +0 -0
  585. package/dist/esm/jsonRpc/types/coins.d.ts +6 -0
  586. package/dist/esm/jsonRpc/types/coins.js +0 -0
  587. package/dist/esm/jsonRpc/types/common.d.ts +2 -0
  588. package/dist/esm/jsonRpc/types/common.js +0 -0
  589. package/dist/esm/jsonRpc/types/generated.d.ts +1492 -0
  590. package/dist/esm/jsonRpc/types/generated.js +0 -0
  591. package/dist/esm/jsonRpc/types/index.d.ts +6 -0
  592. package/dist/esm/jsonRpc/types/index.js +0 -0
  593. package/dist/esm/jsonRpc/types/params.d.ts +656 -0
  594. package/dist/esm/jsonRpc/types/params.js +0 -0
  595. package/dist/esm/keypairs/ed25519/ed25519-hd-key.d.ts +8 -0
  596. package/dist/esm/keypairs/ed25519/ed25519-hd-key.js +62 -0
  597. package/dist/esm/keypairs/ed25519/index.d.ts +2 -0
  598. package/dist/esm/keypairs/ed25519/index.js +10 -0
  599. package/dist/esm/keypairs/ed25519/keypair.d.ts +74 -0
  600. package/dist/esm/keypairs/ed25519/keypair.js +158 -0
  601. package/dist/esm/keypairs/ed25519/publickey.d.ts +30 -0
  602. package/dist/esm/keypairs/ed25519/publickey.js +75 -0
  603. package/dist/esm/keypairs/index.d.ts +4 -0
  604. package/dist/esm/keypairs/index.js +4 -0
  605. package/dist/esm/keypairs/passkey/index.d.ts +3 -0
  606. package/dist/esm/keypairs/passkey/index.js +12 -0
  607. package/dist/esm/keypairs/passkey/keypair.d.ts +113 -0
  608. package/dist/esm/keypairs/passkey/keypair.js +258 -0
  609. package/dist/esm/keypairs/passkey/publickey.d.ts +72 -0
  610. package/dist/esm/keypairs/passkey/publickey.js +156 -0
  611. package/dist/esm/keypairs/passkey/types.d.ts +12 -0
  612. package/dist/esm/keypairs/passkey/types.js +0 -0
  613. package/dist/esm/keypairs/secp256k1/index.d.ts +2 -0
  614. package/dist/esm/keypairs/secp256k1/index.js +10 -0
  615. package/dist/esm/keypairs/secp256k1/keypair.d.ts +73 -0
  616. package/dist/esm/keypairs/secp256k1/keypair.js +147 -0
  617. package/dist/esm/keypairs/secp256k1/publickey.d.ts +30 -0
  618. package/dist/esm/keypairs/secp256k1/publickey.js +80 -0
  619. package/dist/esm/keypairs/secp256r1/index.d.ts +2 -0
  620. package/dist/esm/keypairs/secp256r1/index.js +10 -0
  621. package/dist/esm/keypairs/secp256r1/keypair.d.ts +73 -0
  622. package/dist/esm/keypairs/secp256r1/keypair.js +143 -0
  623. package/dist/esm/keypairs/secp256r1/publickey.d.ts +30 -0
  624. package/dist/esm/keypairs/secp256r1/publickey.js +77 -0
  625. package/dist/esm/multisig/index.d.ts +2 -0
  626. package/dist/esm/multisig/index.js +10 -0
  627. package/dist/esm/multisig/publickey.d.ts +79 -0
  628. package/dist/esm/multisig/publickey.js +280 -0
  629. package/dist/esm/multisig/signer.d.ts +20 -0
  630. package/dist/esm/multisig/signer.js +94 -0
  631. package/dist/esm/package.json +5 -0
  632. package/dist/esm/transactions/Arguments.d.ts +57 -0
  633. package/dist/esm/transactions/Arguments.js +16 -0
  634. package/dist/esm/transactions/Commands.d.ts +57 -0
  635. package/dist/esm/transactions/Commands.js +123 -0
  636. package/dist/esm/transactions/Inputs.d.ts +22 -0
  637. package/dist/esm/transactions/Inputs.js +67 -0
  638. package/dist/esm/transactions/ObjectCache.d.ts +83 -0
  639. package/dist/esm/transactions/ObjectCache.js +231 -0
  640. package/dist/esm/transactions/Transaction.d.ts +710 -0
  641. package/dist/esm/transactions/Transaction.js +731 -0
  642. package/dist/esm/transactions/TransactionData.d.ts +73 -0
  643. package/dist/esm/transactions/TransactionData.js +453 -0
  644. package/dist/esm/transactions/__tests__/Transaction.test.d.ts +1 -0
  645. package/dist/esm/transactions/__tests__/bcs.test.d.ts +1 -0
  646. package/dist/esm/transactions/data/internal.d.ts +1010 -0
  647. package/dist/esm/transactions/data/internal.js +232 -0
  648. package/dist/esm/transactions/data/v1.d.ts +312 -0
  649. package/dist/esm/transactions/data/v1.js +542 -0
  650. package/dist/esm/transactions/data/v2.d.ts +153 -0
  651. package/dist/esm/transactions/data/v2.js +126 -0
  652. package/dist/esm/transactions/executor/caching.d.ts +31 -0
  653. package/dist/esm/transactions/executor/caching.js +99 -0
  654. package/dist/esm/transactions/executor/parallel.d.ts +37 -0
  655. package/dist/esm/transactions/executor/parallel.js +375 -0
  656. package/dist/esm/transactions/executor/queue.d.ts +11 -0
  657. package/dist/esm/transactions/executor/queue.js +68 -0
  658. package/dist/esm/transactions/executor/serial.d.ts +31 -0
  659. package/dist/esm/transactions/executor/serial.js +116 -0
  660. package/dist/esm/transactions/hash.d.ts +7 -0
  661. package/dist/esm/transactions/hash.js +11 -0
  662. package/dist/esm/transactions/index.d.ts +21 -0
  663. package/dist/esm/transactions/index.js +41 -0
  664. package/dist/esm/transactions/intents/CoinWithBalance.d.ts +9 -0
  665. package/dist/esm/transactions/intents/CoinWithBalance.js +186 -0
  666. package/dist/esm/transactions/object.d.ts +24 -0
  667. package/dist/esm/transactions/object.js +96 -0
  668. package/dist/esm/transactions/plugins/NamedPackagesPlugin.d.ts +31 -0
  669. package/dist/esm/transactions/plugins/NamedPackagesPlugin.js +17 -0
  670. package/dist/esm/transactions/pure.d.ts +20 -0
  671. package/dist/esm/transactions/pure.js +44 -0
  672. package/dist/esm/transactions/resolve.d.ts +13 -0
  673. package/dist/esm/transactions/resolve.js +83 -0
  674. package/dist/esm/transactions/serializer.d.ts +7 -0
  675. package/dist/esm/transactions/serializer.js +169 -0
  676. package/dist/esm/transactions/utils.d.ts +10 -0
  677. package/dist/esm/transactions/utils.js +123 -0
  678. package/dist/esm/utils/constants.d.ts +17 -0
  679. package/dist/esm/utils/constants.js +37 -0
  680. package/dist/esm/utils/derived-objects.d.ts +5 -0
  681. package/dist/esm/utils/derived-objects.js +13 -0
  682. package/dist/esm/utils/dynamic-fields.d.ts +2 -0
  683. package/dist/esm/utils/dynamic-fields.js +20 -0
  684. package/dist/esm/utils/format.d.ts +2 -0
  685. package/dist/esm/utils/format.js +15 -0
  686. package/dist/esm/utils/index.d.ts +8 -0
  687. package/dist/esm/utils/index.js +76 -0
  688. package/dist/esm/utils/move-registry.d.ts +6 -0
  689. package/dist/esm/utils/move-registry.js +24 -0
  690. package/dist/esm/utils/sui-types.d.ts +26 -0
  691. package/dist/esm/utils/sui-types.js +70 -0
  692. package/dist/esm/utils/suins.d.ts +2 -0
  693. package/dist/esm/utils/suins.js +36 -0
  694. package/dist/esm/verify/index.d.ts +1 -0
  695. package/dist/esm/verify/index.js +14 -0
  696. package/dist/esm/verify/verify.d.ts +16 -0
  697. package/dist/esm/verify/verify.js +108 -0
  698. package/dist/esm/version.d.ts +2 -0
  699. package/dist/esm/version.js +6 -0
  700. package/dist/esm/w/call/allocation.d.ts +35 -0
  701. package/dist/esm/w/call/allocation.js +433 -0
  702. package/dist/esm/w/call/arb.d.ts +17 -0
  703. package/dist/esm/w/call/arb.js +138 -0
  704. package/dist/esm/w/call/arbitration.d.ts +106 -0
  705. package/dist/esm/w/call/arbitration.js +1620 -0
  706. package/dist/esm/w/call/base.d.ts +42 -0
  707. package/dist/esm/w/call/base.js +350 -0
  708. package/dist/esm/w/call/contact.d.ts +45 -0
  709. package/dist/esm/w/call/contact.js +474 -0
  710. package/dist/esm/w/call/demand.d.ts +79 -0
  711. package/dist/esm/w/call/demand.js +869 -0
  712. package/dist/esm/w/call/entity.d.ts +33 -0
  713. package/dist/esm/w/call/entity.js +220 -0
  714. package/dist/esm/w/call/guard-ins.d.ts +31 -0
  715. package/dist/esm/w/call/guard-ins.js +4371 -0
  716. package/dist/esm/w/call/guard.d.ts +254 -0
  717. package/dist/esm/w/call/guard.js +1202 -0
  718. package/dist/esm/w/call/index.d.ts +37 -0
  719. package/dist/esm/w/call/index.js +57 -0
  720. package/dist/esm/w/call/machine.d.ts +124 -0
  721. package/dist/esm/w/call/machine.js +1492 -0
  722. package/dist/esm/w/call/order.d.ts +73 -0
  723. package/dist/esm/w/call/order.js +481 -0
  724. package/dist/esm/w/call/passport.d.ts +24 -0
  725. package/dist/esm/w/call/passport.js +266 -0
  726. package/dist/esm/w/call/payment.d.ts +27 -0
  727. package/dist/esm/w/call/payment.js +233 -0
  728. package/dist/esm/w/call/permission.d.ts +222 -0
  729. package/dist/esm/w/call/permission.js +1375 -0
  730. package/dist/esm/w/call/personal.d.ts +51 -0
  731. package/dist/esm/w/call/personal.js +177 -0
  732. package/dist/esm/w/call/progress.d.ts +94 -0
  733. package/dist/esm/w/call/progress.js +827 -0
  734. package/dist/esm/w/call/proof.d.ts +27 -0
  735. package/dist/esm/w/call/proof.js +110 -0
  736. package/dist/esm/w/call/repository.d.ts +97 -0
  737. package/dist/esm/w/call/repository.js +1325 -0
  738. package/dist/esm/w/call/resource.d.ts +27 -0
  739. package/dist/esm/w/call/resource.js +135 -0
  740. package/dist/esm/w/call/reward.d.ts +52 -0
  741. package/dist/esm/w/call/reward.js +874 -0
  742. package/dist/esm/w/call/service.d.ts +184 -0
  743. package/dist/esm/w/call/service.js +2472 -0
  744. package/dist/esm/w/call/treasury.d.ts +77 -0
  745. package/dist/esm/w/call/treasury.js +1186 -0
  746. package/dist/esm/w/call/util.d.ts +12 -0
  747. package/dist/esm/w/call/util.js +646 -0
  748. package/dist/esm/w/common.d.ts +359 -0
  749. package/dist/esm/w/common.js +605 -0
  750. package/dist/esm/w/exception.d.ts +82 -0
  751. package/dist/esm/w/exception.js +585 -0
  752. package/dist/esm/w/index.d.ts +8 -0
  753. package/dist/esm/w/index.js +8 -0
  754. package/dist/esm/w/local/.eslintrc.js +23 -0
  755. package/dist/esm/w/local/account.d.ts +134 -0
  756. package/dist/esm/w/local/account.js +746 -0
  757. package/dist/esm/w/local/cache.d.ts +35 -0
  758. package/dist/esm/w/local/cache.js +162 -0
  759. package/dist/esm/w/local/config.d.ts +15 -0
  760. package/dist/esm/w/local/config.js +64 -0
  761. package/dist/esm/w/local/index.d.ts +193 -0
  762. package/dist/esm/w/local/index.js +301 -0
  763. package/dist/esm/w/local/local.d.ts +93 -0
  764. package/dist/esm/w/local/local.js +654 -0
  765. package/dist/esm/w/local/storage.d.ts +61 -0
  766. package/dist/esm/w/local/storage.js +190 -0
  767. package/dist/esm/w/local/token.d.ts +22 -0
  768. package/dist/esm/w/local/token.js +163 -0
  769. package/dist/esm/w/local/util.d.ts +5 -0
  770. package/dist/esm/w/local/util.js +27 -0
  771. package/dist/esm/w/local/wip.d.ts +218 -0
  772. package/dist/esm/w/local/wip.js +882 -0
  773. package/dist/esm/w/messenger/.eslintrc.js +23 -0
  774. package/dist/esm/w/messenger/crypto.d.ts +269 -0
  775. package/dist/esm/w/messenger/crypto.js +428 -0
  776. package/dist/esm/w/messenger/index.d.ts +23 -0
  777. package/dist/esm/w/messenger/index.js +25 -0
  778. package/dist/esm/w/messenger/messenger-api.d.ts +225 -0
  779. package/dist/esm/w/messenger/messenger-api.js +1228 -0
  780. package/dist/esm/w/messenger/messenger-manager.d.ts +80 -0
  781. package/dist/esm/w/messenger/messenger-manager.js +1118 -0
  782. package/dist/esm/w/messenger/messenger.d.ts +231 -0
  783. package/dist/esm/w/messenger/messenger.js +1492 -0
  784. package/dist/esm/w/messenger/server.d.ts +134 -0
  785. package/dist/esm/w/messenger/server.js +520 -0
  786. package/dist/esm/w/messenger/session.d.ts +78 -0
  787. package/dist/esm/w/messenger/session.js +415 -0
  788. package/dist/esm/w/messenger/storage.d.ts +192 -0
  789. package/dist/esm/w/messenger/storage.js +935 -0
  790. package/dist/esm/w/messenger/types.d.ts +705 -0
  791. package/dist/esm/w/messenger/types.js +88 -0
  792. package/dist/esm/w/messenger/utils.d.ts +15 -0
  793. package/dist/esm/w/messenger/utils.js +17 -0
  794. package/dist/esm/w/query/bult-in.d.ts +73 -0
  795. package/dist/esm/w/query/bult-in.js +112 -0
  796. package/dist/esm/w/query/event.d.ts +82 -0
  797. package/dist/esm/w/query/event.js +137 -0
  798. package/dist/esm/w/query/index.d.ts +5 -0
  799. package/dist/esm/w/query/index.js +5 -0
  800. package/dist/esm/w/query/object.d.ts +658 -0
  801. package/dist/esm/w/query/object.js +1648 -0
  802. package/dist/esm/w/query/received.d.ts +34 -0
  803. package/dist/esm/w/query/received.js +73 -0
  804. package/dist/esm/w/query/util.d.ts +5 -0
  805. package/dist/esm/w/query/util.js +62 -0
  806. package/dist/esm/w/util.d.ts +19 -0
  807. package/dist/esm/w/util.js +710 -0
  808. package/dist/esm/zklogin/address.js +78 -0
  809. package/dist/esm/zklogin/bcs.js +21 -0
  810. package/dist/esm/zklogin/index.js +38 -0
  811. package/dist/esm/zklogin/jwt-decode.js +68 -0
  812. package/dist/esm/zklogin/jwt-utils.js +108 -0
  813. package/dist/esm/zklogin/nonce.js +40 -0
  814. package/dist/esm/zklogin/poseidon.js +61 -0
  815. package/dist/esm/zklogin/publickey.js +265 -0
  816. package/dist/esm/zklogin/signature.js +37 -0
  817. package/dist/esm/zklogin/utils.js +78 -0
  818. package/dist/tsconfig.esm.tsbuildinfo +1 -0
  819. package/dist/tsconfig.tsbuildinfo +1 -0
  820. package/package.json +295 -61
  821. package/dist/arbitration.d.ts +0 -65
  822. package/dist/arbitration.d.ts.map +0 -1
  823. package/dist/arbitration.js +0 -517
  824. package/dist/arbitration.js.map +0 -1
  825. package/dist/demand.d.ts +0 -27
  826. package/dist/demand.d.ts.map +0 -1
  827. package/dist/demand.js +0 -266
  828. package/dist/demand.js.map +0 -1
  829. package/dist/entity.d.ts +0 -46
  830. package/dist/entity.d.ts.map +0 -1
  831. package/dist/entity.js +0 -146
  832. package/dist/entity.js.map +0 -1
  833. package/dist/exception.d.ts +0 -37
  834. package/dist/exception.d.ts.map +0 -1
  835. package/dist/exception.js +0 -41
  836. package/dist/exception.js.map +0 -1
  837. package/dist/guard.d.ts +0 -110
  838. package/dist/guard.d.ts.map +0 -1
  839. package/dist/guard.js +0 -936
  840. package/dist/guard.js.map +0 -1
  841. package/dist/index.d.ts +0 -40
  842. package/dist/index.d.ts.map +0 -1
  843. package/dist/index.js +0 -28
  844. package/dist/index.js.map +0 -1
  845. package/dist/machine.d.ts +0 -68
  846. package/dist/machine.d.ts.map +0 -1
  847. package/dist/machine.js +0 -520
  848. package/dist/machine.js.map +0 -1
  849. package/dist/passport.d.ts +0 -129
  850. package/dist/passport.d.ts.map +0 -1
  851. package/dist/passport.js +0 -1233
  852. package/dist/passport.js.map +0 -1
  853. package/dist/payment.d.ts +0 -28
  854. package/dist/payment.d.ts.map +0 -1
  855. package/dist/payment.js +0 -60
  856. package/dist/payment.js.map +0 -1
  857. package/dist/permission.d.ts +0 -155
  858. package/dist/permission.d.ts.map +0 -1
  859. package/dist/permission.js +0 -462
  860. package/dist/permission.js.map +0 -1
  861. package/dist/progress.d.ts +0 -66
  862. package/dist/progress.d.ts.map +0 -1
  863. package/dist/progress.js +0 -311
  864. package/dist/progress.js.map +0 -1
  865. package/dist/protocol.d.ts +0 -247
  866. package/dist/protocol.d.ts.map +0 -1
  867. package/dist/protocol.js +0 -726
  868. package/dist/protocol.js.map +0 -1
  869. package/dist/repository.d.ts +0 -94
  870. package/dist/repository.d.ts.map +0 -1
  871. package/dist/repository.js +0 -783
  872. package/dist/repository.js.map +0 -1
  873. package/dist/resource.d.ts +0 -36
  874. package/dist/resource.d.ts.map +0 -1
  875. package/dist/resource.js +0 -129
  876. package/dist/resource.js.map +0 -1
  877. package/dist/service.d.ts +0 -144
  878. package/dist/service.d.ts.map +0 -1
  879. package/dist/service.js +0 -1303
  880. package/dist/service.js.map +0 -1
  881. package/dist/treasury.d.ts +0 -55
  882. package/dist/treasury.d.ts.map +0 -1
  883. package/dist/treasury.js +0 -393
  884. package/dist/treasury.js.map +0 -1
  885. package/dist/utils.d.ts +0 -94
  886. package/dist/utils.d.ts.map +0 -1
  887. package/dist/utils.js +0 -582
  888. package/dist/utils.js.map +0 -1
  889. package/dist/wowok.d.ts +0 -15
  890. package/dist/wowok.d.ts.map +0 -1
  891. package/dist/wowok.js +0 -66
  892. package/dist/wowok.js.map +0 -1
package/dist/demand.js DELETED
@@ -1,266 +0,0 @@
1
- import { Protocol } from './protocol.js';
2
- import { IsValidDesription, IsValidAddress, IsValidArgType, IsValidU64, parseObjectType, IsValidU8, IsValidLocation } from './utils.js';
3
- import { Errors, ERROR } from './exception.js';
4
- export class Demand {
5
- get_bounty_type() { return this.bounty_type; }
6
- get_object() { return this.object; }
7
- static From(txb, bounty_type, permission, object) {
8
- let d = new Demand(txb, bounty_type, permission);
9
- d.object = Protocol.TXB_OBJECT(txb, object);
10
- return d;
11
- }
12
- constructor(txb, bounty_type, permission) {
13
- this.bounty_type = bounty_type;
14
- this.permission = permission;
15
- this.txb = txb;
16
- this.object = '';
17
- }
18
- static New(txb, bounty_type, minutes_duration, time, permission, description, passport) {
19
- if (!IsValidDesription(description)) {
20
- ERROR(Errors.IsValidDesription);
21
- }
22
- if (!IsValidArgType(bounty_type)) {
23
- ERROR(Errors.IsValidArgType, bounty_type);
24
- }
25
- if (!IsValidU64(time)) {
26
- ERROR(Errors.IsValidUint, 'time');
27
- }
28
- let d = new Demand(txb, bounty_type, permission);
29
- const clock = txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
30
- if (minutes_duration)
31
- time = time * 1000 * 60; //@ duration minutes
32
- if (passport) {
33
- d.object = txb.moveCall({
34
- target: Protocol.Instance().demandFn('new_with_passport'),
35
- arguments: [passport, txb.pure.string(description), txb.pure.bool(minutes_duration), txb.pure.u64(time),
36
- txb.object(clock), Protocol.TXB_OBJECT(txb, permission)],
37
- typeArguments: [bounty_type],
38
- });
39
- }
40
- else {
41
- d.object = txb.moveCall({
42
- target: Protocol.Instance().demandFn('new'),
43
- arguments: [txb.pure.string(description), txb.pure.bool(minutes_duration), txb.pure.u64(time),
44
- txb.object(clock), Protocol.TXB_OBJECT(txb, permission)],
45
- typeArguments: [bounty_type],
46
- });
47
- }
48
- return d;
49
- }
50
- launch() {
51
- return this.txb.moveCall({
52
- target: Protocol.Instance().demandFn('create'),
53
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object)],
54
- typeArguments: [this.bounty_type],
55
- });
56
- }
57
- refund(passport) {
58
- const clock = this.txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
59
- if (passport) {
60
- this.txb.moveCall({
61
- target: Protocol.Instance().demandFn('refund_with_passport'),
62
- arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object),
63
- this.txb.object(clock), Protocol.TXB_OBJECT(this.txb, this.permission)],
64
- typeArguments: [this.bounty_type],
65
- });
66
- }
67
- else {
68
- this.txb.moveCall({
69
- target: Protocol.Instance().demandFn('refund'),
70
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(clock), Protocol.TXB_OBJECT(this.txb, this.permission)],
71
- typeArguments: [this.bounty_type],
72
- });
73
- }
74
- }
75
- // minutes_duration TRUE , time is minutes count; otherwise, the deadline time
76
- expand_time(minutes_duration, time, passport) {
77
- if (!IsValidU64(time)) {
78
- ERROR(Errors.IsValidUint, `expand_time.time ${time}`);
79
- }
80
- if (minutes_duration)
81
- time = time * 1000 * 60; //@ duration minutes
82
- if (passport) {
83
- this.txb.moveCall({
84
- target: Protocol.Instance().demandFn('time_expand_with_passport'),
85
- arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.bool(minutes_duration),
86
- this.txb.pure.u64(time), Protocol.TXB_OBJECT(this.txb, this.permission)],
87
- typeArguments: [this.bounty_type],
88
- });
89
- }
90
- else {
91
- this.txb.moveCall({
92
- target: Protocol.Instance().demandFn('time_expand'),
93
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.bool(minutes_duration),
94
- this.txb.pure.u64(time), Protocol.TXB_OBJECT(this.txb, this.permission)],
95
- typeArguments: [this.bounty_type],
96
- });
97
- }
98
- }
99
- set_guard(guard, service_identifier, passport) {
100
- if (typeof (guard) === 'string') {
101
- if (!IsValidAddress(guard)) {
102
- ERROR(Errors.IsValidAddress, `demand.set_guard.guard: ${guard}`);
103
- }
104
- }
105
- else if (guard && !Protocol.IsValidObjects([guard])) {
106
- ERROR(Errors.IsValidObjects, `demand.set_guard.guard: ${guard}`);
107
- }
108
- if (service_identifier !== undefined && !IsValidU8(service_identifier)) {
109
- ERROR(Errors.InvalidParam, 'set_guard.service_identifier');
110
- }
111
- let id = this.txb.pure.option('u8', service_identifier !== undefined ? service_identifier : undefined);
112
- if (guard === null) { // set to null
113
- if (passport) {
114
- this.txb.moveCall({
115
- target: Protocol.Instance().demandFn('guard_none_with_passport'),
116
- arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission)],
117
- typeArguments: [this.bounty_type],
118
- });
119
- }
120
- else {
121
- this.txb.moveCall({
122
- target: Protocol.Instance().demandFn('guard_none'),
123
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission)],
124
- typeArguments: [this.bounty_type],
125
- });
126
- }
127
- }
128
- else if (guard) { // set
129
- if (passport) {
130
- this.txb.moveCall({
131
- target: Protocol.Instance().demandFn('guard_set_with_passport'),
132
- arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, guard), id,
133
- Protocol.TXB_OBJECT(this.txb, this.permission)],
134
- typeArguments: [this.bounty_type],
135
- });
136
- }
137
- else {
138
- this.txb.moveCall({
139
- target: Protocol.Instance().demandFn('guard_set'),
140
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, guard), id,
141
- Protocol.TXB_OBJECT(this.txb, this.permission)],
142
- typeArguments: [this.bounty_type],
143
- });
144
- }
145
- }
146
- }
147
- set_location(location, passport) {
148
- if (!IsValidLocation(location)) {
149
- ERROR(Errors.IsValidLocation, `Demand.set_location.location ${location}`);
150
- }
151
- if (passport) {
152
- this.txb.moveCall({
153
- target: Protocol.Instance().demandFn('location_set_with_passport'),
154
- arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(location),
155
- Protocol.TXB_OBJECT(this.txb, this.permission)],
156
- typeArguments: [this.bounty_type],
157
- });
158
- }
159
- else {
160
- this.txb.moveCall({
161
- target: Protocol.Instance().demandFn('location_set'),
162
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(location),
163
- Protocol.TXB_OBJECT(this.txb, this.permission)],
164
- typeArguments: [this.bounty_type],
165
- });
166
- }
167
- }
168
- set_description(description, passport) {
169
- if (!IsValidDesription(description)) {
170
- ERROR(Errors.IsValidDesription);
171
- }
172
- if (passport) {
173
- this.txb.moveCall({
174
- target: Protocol.Instance().demandFn('description_set_with_passport'),
175
- arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(description),
176
- Protocol.TXB_OBJECT(this.txb, this.permission)],
177
- typeArguments: [this.bounty_type],
178
- });
179
- }
180
- else {
181
- this.txb.moveCall({
182
- target: Protocol.Instance().demandFn('description_set'),
183
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(description), Protocol.TXB_OBJECT(this.txb, this.permission)],
184
- typeArguments: [this.bounty_type],
185
- });
186
- }
187
- }
188
- yes(service_address, passport) {
189
- if (!IsValidAddress(service_address)) {
190
- ERROR(Errors.IsValidAddress, 'yes.service_address');
191
- }
192
- if (passport) {
193
- this.txb.moveCall({
194
- target: Protocol.Instance().demandFn('yes_with_passport'),
195
- arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object),
196
- this.txb.pure.address(service_address),
197
- Protocol.TXB_OBJECT(this.txb, this.permission)],
198
- typeArguments: [this.bounty_type],
199
- });
200
- }
201
- else {
202
- this.txb.moveCall({
203
- target: Protocol.Instance().demandFn('yes'),
204
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object),
205
- this.txb.pure.address(service_address),
206
- Protocol.TXB_OBJECT(this.txb, this.permission)],
207
- typeArguments: [this.bounty_type],
208
- });
209
- }
210
- }
211
- deposit(bounty) {
212
- if (!Protocol.IsValidObjects([bounty])) {
213
- ERROR(Errors.IsValidObjects);
214
- }
215
- this.txb.moveCall({
216
- target: Protocol.Instance().demandFn('deposit'),
217
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, bounty)],
218
- typeArguments: [this.bounty_type],
219
- });
220
- }
221
- present(service, service_pay_type, tips, passport) {
222
- tips = tips ?? '';
223
- if (!IsValidDesription(tips)) {
224
- ERROR(Errors.IsValidDesription, 'present.tips');
225
- }
226
- if (!service_pay_type || !IsValidArgType(service_pay_type)) {
227
- ERROR(Errors.IsValidArgType, 'service_pay_type');
228
- }
229
- if (!Protocol.IsValidObjects([service])) {
230
- ERROR(Errors.IsValidObjects, 'present.service');
231
- }
232
- if (passport) {
233
- this.txb.moveCall({
234
- target: Protocol.Instance().demandFn('present_with_passport'),
235
- arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, service),
236
- this.txb.pure.string(tips)],
237
- typeArguments: [this.bounty_type, service_pay_type],
238
- });
239
- }
240
- else {
241
- this.txb.moveCall({
242
- target: Protocol.Instance().demandFn('present'),
243
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, service),
244
- this.txb.pure.string(tips)],
245
- typeArguments: [this.bounty_type, service_pay_type],
246
- });
247
- }
248
- }
249
- change_permission(new_permission) {
250
- if (!Protocol.IsValidObjects([new_permission])) {
251
- ERROR(Errors.IsValidObjects);
252
- }
253
- this.txb.moveCall({
254
- target: Protocol.Instance().demandFn('permission_set'),
255
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission), Protocol.TXB_OBJECT(this.txb, new_permission)],
256
- typeArguments: [this.bounty_type]
257
- });
258
- this.permission = new_permission;
259
- }
260
- }
261
- Demand.parseObjectType = (chain_type) => {
262
- return parseObjectType(chain_type, 'demand::Demand<');
263
- };
264
- Demand.MAX_BOUNTY_COUNT = 300;
265
- Demand.MAX_PRESENTERS_COUNT = 200;
266
- //# sourceMappingURL=demand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"demand.js","sourceRoot":"","sources":["../src/demand.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AAM,CAAC,IAAI,CAAC,CAAC;gBAC/B,aAAa,EAAC,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAiB,CAAC;aACtD,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IAED,iBAAiB,CAAC,cAA+B;QAC7C,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC;YAC7C,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;QAChC,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;YACd,MAAM,EAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAe;YACnE,SAAS,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;YACtJ,aAAa,EAAC,CAAC,IAAI,CAAC,WAAW,CAAC;SACnC,CAAC,CAAA;QACF,IAAI,CAAC,UAAU,GAAG,cAAc,CAAA;IACpC,CAAC;;AACM,sBAAe,GAAG,CAAC,UAAyB,EAAW,EAAE;IAC5D,OAAO,eAAe,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAA;AACzD,CAAC,CAAA;AAEM,uBAAgB,GAAG,GAAG,CAAC;AACvB,2BAAoB,GAAG,GAAG,CAAC"}
package/dist/entity.d.ts DELETED
@@ -1,46 +0,0 @@
1
- import { TxbObject, ResourceAddress, ResourceObject } from './protocol.js';
2
- import { TagName, Resource } from './resource.js';
3
- import { Transaction as TransactionBlock, TransactionResult } from '@mysten/sui/transactions';
4
- export interface EntityData {
5
- info?: Map<string, string>;
6
- resource_object?: string;
7
- like?: number;
8
- dislike?: number;
9
- address?: string;
10
- description?: string;
11
- lastActive_digest?: string;
12
- time?: number;
13
- }
14
- export declare enum EntityInfo_Default {
15
- name = "name",
16
- avatar = "avatar",
17
- x = "x",
18
- discord = "discord",
19
- location = "location",
20
- homepage = "homepage"
21
- }
22
- export interface EntityInfo {
23
- title: string;
24
- value: string;
25
- }
26
- export declare class Entity {
27
- protected object: TxbObject;
28
- protected txb: TransactionBlock;
29
- get_object(): TxbObject;
30
- private constructor();
31
- static From(txb: TransactionBlock): Entity;
32
- mark(resource: Resource, address: string | TransactionResult, like: TagName.Like | TagName.Dislike): void;
33
- add_info(info: Map<string, string>): void;
34
- remove_info(titles: string[]): void;
35
- removeall_info(): void;
36
- create_resource(): ResourceAddress;
37
- create_resource2(): ResourceObject;
38
- set_description(description: string): TransactionResult;
39
- destroy_resource(resource: Resource): TransactionResult;
40
- use_resource(resource: Resource): TransactionResult;
41
- transfer_resource(resource: Resource, new_address: string): TransactionResult;
42
- static EntityData: (address: string) => Promise<EntityData | "dynamicFieldNotFound" | undefined>;
43
- static MAX_INFO_LENGTH: number;
44
- static MAX_INFO_VALUE_LENGTH: number;
45
- }
46
- //# sourceMappingURL=entity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,SAAS,EAAE,eAAe,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AAGhG,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE9F,MAAM,WAAW,UAAU;IACvB,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAC,MAA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,146 +0,0 @@
1
- var _a;
2
- import { Protocol } from './protocol.js';
3
- import { IsValidDesription, IsValidAddress, IsValidName, IsValidStringLength } from './utils.js';
4
- import { ERROR, Errors } from './exception.js';
5
- export var EntityInfo_Default;
6
- (function (EntityInfo_Default) {
7
- EntityInfo_Default["name"] = "name";
8
- EntityInfo_Default["avatar"] = "avatar";
9
- EntityInfo_Default["x"] = "x";
10
- EntityInfo_Default["discord"] = "discord";
11
- EntityInfo_Default["location"] = "location";
12
- EntityInfo_Default["homepage"] = "homepage";
13
- })(EntityInfo_Default || (EntityInfo_Default = {}));
14
- export class Entity {
15
- get_object() { return this.object; }
16
- constructor(txb) {
17
- this.txb = txb;
18
- this.object = '';
19
- }
20
- static From(txb) {
21
- let r = new _a(txb);
22
- r.object = Protocol.TXB_OBJECT(txb, Protocol.Instance().objectEntity());
23
- return r;
24
- }
25
- mark(resource, address, like) {
26
- if (typeof (address) === 'string' && !IsValidAddress(address)) {
27
- ERROR(Errors.IsValidAddress, like);
28
- }
29
- const clock = this.txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
30
- this.txb.moveCall({
31
- target: Protocol.Instance().entityFn(like),
32
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, resource.get_object()),
33
- typeof (address) === 'string' ? this.txb.pure.address(address) : address, this.txb.object(clock)]
34
- });
35
- }
36
- add_info(info) {
37
- if (info.size === 0)
38
- return;
39
- if (info.size > _a.MAX_INFO_LENGTH) {
40
- ERROR(Errors.IsValidValue, `Entity.update: info size too long ${info.size}`);
41
- }
42
- info.forEach((v, k) => {
43
- if (!IsValidName(k)) {
44
- ERROR(Errors.IsValidName, `Entity.update: ${k} key too long `);
45
- }
46
- if (!IsValidStringLength(v, _a.MAX_INFO_VALUE_LENGTH)) {
47
- ERROR(Errors.IsValidValue, `Entity.update: ${k} value too long`);
48
- }
49
- });
50
- const keys = Array.from(info.keys()).map(v => v.toLocaleLowerCase());
51
- const values = Array.from(info.values());
52
- const clock = this.txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
53
- this.txb.moveCall({
54
- target: Protocol.Instance().entityFn('info_add'),
55
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object),
56
- this.txb.pure.vector('string', keys),
57
- this.txb.pure.vector('string', values),
58
- this.txb.object(clock)]
59
- });
60
- }
61
- remove_info(titles) {
62
- if (titles.length === 0)
63
- return;
64
- const t = titles.map(v => v.toLowerCase());
65
- this.txb.moveCall({
66
- target: Protocol.Instance().entityFn('info_remove'),
67
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object),
68
- this.txb.pure.vector('string', t)]
69
- });
70
- }
71
- removeall_info() {
72
- this.txb.moveCall({
73
- target: Protocol.Instance().entityFn('info_removeall'),
74
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object)]
75
- });
76
- }
77
- create_resource() {
78
- const clock = this.txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
79
- return this.txb.moveCall({
80
- target: Protocol.Instance().entityFn('resource_create'),
81
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(clock)]
82
- });
83
- }
84
- create_resource2() {
85
- const clock = this.txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
86
- return this.txb.moveCall({
87
- target: Protocol.Instance().entityFn('resource_create2'),
88
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(clock)]
89
- });
90
- }
91
- set_description(description) {
92
- if (!IsValidDesription(description)) {
93
- ERROR(Errors.IsValidDesription, 'Entity.set_description');
94
- }
95
- const clock = this.txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
96
- return this.txb.moveCall({
97
- target: Protocol.Instance().entityFn('description_set'),
98
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(description), this.txb.object(clock)]
99
- });
100
- }
101
- destroy_resource(resource) {
102
- return this.txb.moveCall({
103
- target: Protocol.Instance().entityFn('resource_destroy'),
104
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, resource.get_object())]
105
- });
106
- }
107
- use_resource(resource) {
108
- return this.txb.moveCall({
109
- target: Protocol.Instance().entityFn('resource_use'),
110
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, resource.get_object())]
111
- });
112
- }
113
- transfer_resource(resource, new_address) {
114
- if (!IsValidAddress(new_address))
115
- ERROR(Errors.IsValidAddress, 'transfer_resource');
116
- return this.txb.moveCall({
117
- target: Protocol.Instance().entityFn('resource_transfer'),
118
- arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, resource.get_object()),
119
- this.txb.pure.address(new_address)]
120
- });
121
- }
122
- }
123
- _a = Entity;
124
- Entity.EntityData = async (address) => {
125
- if (IsValidAddress(address)) {
126
- const res = await Protocol.Client().getDynamicFieldObject({
127
- parentId: Protocol.Instance().objectEntity(), name: { type: 'address', value: address }
128
- });
129
- if (res?.error?.code === 'dynamicFieldNotFound') {
130
- return 'dynamicFieldNotFound';
131
- }
132
- if (!res || !res.data)
133
- return;
134
- const content = res?.data?.content?.fields;
135
- const info = new Map();
136
- content?.value?.fields?.info?.fields?.contents?.forEach((v) => {
137
- info.set(v?.fields?.key, v?.fields?.value);
138
- });
139
- return { like: content?.value?.fields?.like, dislike: content?.value?.fields?.dislike, address: address,
140
- resource_object: content?.value?.fields?.resource, lastActive_digest: res?.data?.previousTransaction ?? '',
141
- info: info, description: content?.value?.fields?.description, time: content?.value?.fields?.time };
142
- }
143
- };
144
- Entity.MAX_INFO_LENGTH = 32;
145
- Entity.MAX_INFO_VALUE_LENGTH = 256; // The max length of each info value.
146
- //# sourceMappingURL=entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAyD,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAA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IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QAEF,OAAO,EAAC,IAAI,EAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;YAChG,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,EAAE,IAAI,EAAE,mBAAmB,IAAI,EAAE;YAC1G,IAAI,EAAG,IAAI,EAAE,WAAW,EAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAC,CAAA;IACxG,CAAC;AACP,CAAC,AAnBkB,CAmBlB;AACM,sBAAe,GAAG,EAAE,AAAL,CAAM;AACrB,4BAAqB,GAAG,GAAG,AAAN,CAAO,CAAC,qCAAqC"}
@@ -1,37 +0,0 @@
1
- export declare enum Errors {
2
- IsValidDesription = "invalid description",
3
- IsValidName = "invalid name",
4
- IsValidName_AllowEmpty = "invalid name",
5
- IsValidEndpoint = "invalid endpoint",
6
- IsValidAddress = "invalid address",
7
- IsValidArgType = "invalid argument type",
8
- IsValidTokenType = "invalid token type",
9
- IsValidUint = "invalid uint",
10
- IsValidInt = "invalid int",
11
- IsValidU64 = "invalid u64",
12
- IsValidU8 = "invalid u8",
13
- IsValidU16 = "invalid u16",
14
- IsValidRate = "invalid rate[0-10000]",
15
- IsValidArray = "invalid array",
16
- IsValidObjects = "invalid objects",
17
- AllInvalid = "one valid at least",
18
- InvalidParam = "invalid parameter",
19
- IsValidPermissionIndex = "invalid permission index",
20
- IsValidKey = "invalid key",
21
- Fail = "fail",
22
- IsValidIndentifier = "indentifier invalid",
23
- isValidHttpUrl = "invalid url",
24
- IsValidBizPermissionIndex = "invalid biz-permission id[1000 - 65535]",
25
- bcsTypeInvalid = "invalid bcs type",
26
- IsValidServiceItemName = "invalid service item name",
27
- IsValidCoinType = "not the coin type",
28
- IsValidGuardIdentifier = "guard identifier invalid",
29
- noPermission = "no permission",
30
- IsValidValue = "invalid value",
31
- IsValidValueType = "invalid value type",
32
- IsValidLocation = "invalid location",
33
- networkInvalid = "protocol network not specified",
34
- WitnessTypeInvalid = "witness type invalid"
35
- }
36
- export declare const ERROR: (error: Errors, info?: any) => never;
37
- //# sourceMappingURL=exception.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exception.d.ts","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"AACA,oBAAY,MAAM;IACd,iBAAiB,wBAAwB;IACzC,WAAW,iBAAiB;IAC5B,sBAAsB,iBAAiB;IACvC,eAAe,qBAAqB;IACpC,cAAc,oBAAoB;IAClC,cAAc,0BAA0B;IACxC,gBAAgB,uBAAuB;IACvC,WAAW,iBAAiB;IAC5B,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,WAAW,0BAA0B;IACrC,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,UAAU,uBAAuB;IACjC,YAAY,sBAAuB;IACnC,sBAAsB,6BAA6B;IACnD,UAAU,gBAAgB;IAC1B,IAAI,SAAS;IACb,kBAAkB,wBAAwB;IAC1C,cAAc,gBAAgB;IAC9B,yBAAyB,4CAA4C;IACrE,cAAc,qBAAqB;IACnC,sBAAsB,8BAA8B;IACpD,eAAe,sBAAsB;IACrC,sBAAsB,6BAA6B;IACnD,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,gBAAgB,uBAAuB;IACvC,eAAe,qBAAqB;IACpC,cAAc,mCAAmC;IACjD,kBAAkB,yBAAyB;CAE9C;AAED,eAAO,MAAM,KAAK,GAAI,OAAM,MAAM,EAAE,OAAM,GAAG,UAG5C,CAAA"}
package/dist/exception.js DELETED
@@ -1,41 +0,0 @@
1
- export var Errors;
2
- (function (Errors) {
3
- Errors["IsValidDesription"] = "invalid description";
4
- Errors["IsValidName"] = "invalid name";
5
- Errors["IsValidName_AllowEmpty"] = "invalid name";
6
- Errors["IsValidEndpoint"] = "invalid endpoint";
7
- Errors["IsValidAddress"] = "invalid address";
8
- Errors["IsValidArgType"] = "invalid argument type";
9
- Errors["IsValidTokenType"] = "invalid token type";
10
- Errors["IsValidUint"] = "invalid uint";
11
- Errors["IsValidInt"] = "invalid int";
12
- Errors["IsValidU64"] = "invalid u64";
13
- Errors["IsValidU8"] = "invalid u8";
14
- Errors["IsValidU16"] = "invalid u16";
15
- Errors["IsValidRate"] = "invalid rate[0-10000]";
16
- Errors["IsValidArray"] = "invalid array";
17
- Errors["IsValidObjects"] = "invalid objects";
18
- Errors["AllInvalid"] = "one valid at least";
19
- Errors["InvalidParam"] = "invalid parameter";
20
- Errors["IsValidPermissionIndex"] = "invalid permission index";
21
- Errors["IsValidKey"] = "invalid key";
22
- Errors["Fail"] = "fail";
23
- Errors["IsValidIndentifier"] = "indentifier invalid";
24
- Errors["isValidHttpUrl"] = "invalid url";
25
- Errors["IsValidBizPermissionIndex"] = "invalid biz-permission id[1000 - 65535]";
26
- Errors["bcsTypeInvalid"] = "invalid bcs type";
27
- Errors["IsValidServiceItemName"] = "invalid service item name";
28
- Errors["IsValidCoinType"] = "not the coin type";
29
- Errors["IsValidGuardIdentifier"] = "guard identifier invalid";
30
- Errors["noPermission"] = "no permission";
31
- Errors["IsValidValue"] = "invalid value";
32
- Errors["IsValidValueType"] = "invalid value type";
33
- Errors["IsValidLocation"] = "invalid location";
34
- Errors["networkInvalid"] = "protocol network not specified";
35
- Errors["WitnessTypeInvalid"] = "witness type invalid";
36
- })(Errors || (Errors = {}));
37
- export const ERROR = (error, info) => {
38
- const e = error.toString() + (info ? (' ' + info) : '');
39
- throw e;
40
- };
41
- //# sourceMappingURL=exception.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exception.js","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,MAmCX;AAnCD,WAAY,MAAM;IACd,mDAAyC,CAAA;IACzC,sCAA4B,CAAA;IAC5B,iDAAuC,CAAA;IACvC,8CAAoC,CAAA;IACpC,4CAAkC,CAAA;IAClC,kDAAwC,CAAA;IACxC,iDAAuC,CAAA;IACvC,sCAA4B,CAAA;IAC5B,oCAA0B,CAAA;IAC1B,oCAA0B,CAAA;IAC1B,kCAAwB,CAAA;IACxB,oCAA0B,CAAA;IAC1B,+CAAqC,CAAA;IACrC,wCAA8B,CAAA;IAC9B,4CAAkC,CAAA;IAClC,2CAAiC,CAAA;IACjC,4CAAmC,CAAA;IACnC,6DAAmD,CAAA;IACnD,oCAA0B,CAAA;IAC1B,uBAAa,CAAA;IACb,oDAA0C,CAAA;IAC1C,wCAA8B,CAAA;IAC9B,+EAAqE,CAAA;IACrE,6CAAmC,CAAA;IACnC,8DAAoD,CAAA;IACpD,+CAAqC,CAAA;IACrC,6DAAmD,CAAA;IACnD,wCAA8B,CAAA;IAC9B,wCAA8B,CAAA;IAC9B,iDAAuC,CAAA;IACvC,8CAAoC,CAAA;IACpC,2DAAiD,CAAA;IACjD,qDAA2C,CAAA;AAE/C,CAAC,EAnCW,MAAM,KAAN,MAAM,QAmCjB;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAY,EAAE,IAAS,EAAE,EAAE;IAC7C,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACxD,MAAM,CAAC,CAAC;AACZ,CAAC,CAAA"}