wowok 2.2.2 → 2.2.4

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 (301) hide show
  1. package/LICENSE +145 -201
  2. package/NOTICE +94 -26
  3. package/THIRD_PARTY_LICENSES/APACHE_LICENSE.txt +196 -0
  4. package/THIRD_PARTY_LICENSES/MIT_LICENSE.txt +58 -0
  5. package/dist/cjs/bcs/bcs.d.ts +30 -68
  6. package/dist/cjs/bcs/bcs.js +1 -1
  7. package/dist/cjs/bcs/index.js +1 -1
  8. package/dist/cjs/cryptography/index.d.ts +1 -1
  9. package/dist/cjs/cryptography/index.js +1 -1
  10. package/dist/cjs/cryptography/intent.js +1 -1
  11. package/dist/cjs/cryptography/keypair.d.ts +2 -2
  12. package/dist/cjs/cryptography/keypair.js +1 -1
  13. package/dist/cjs/cryptography/publickey.d.ts +1 -1
  14. package/dist/cjs/cryptography/publickey.js +1 -1
  15. package/dist/cjs/cryptography/signature-scheme.d.ts +4 -15
  16. package/dist/cjs/cryptography/signature-scheme.js +1 -1
  17. package/dist/cjs/cryptography/signature.d.ts +1 -9
  18. package/dist/cjs/cryptography/signature.js +1 -1
  19. package/dist/cjs/grpc/client.d.ts +0 -2
  20. package/dist/cjs/grpc/client.js +1 -1
  21. package/dist/cjs/grpc/proto/google/protobuf/any.d.ts +7 -0
  22. package/dist/cjs/grpc/proto/google/protobuf/any.js +1 -1
  23. package/dist/cjs/grpc/proto/google/protobuf/duration.d.ts +8 -0
  24. package/dist/cjs/grpc/proto/google/protobuf/duration.js +1 -1
  25. package/dist/cjs/grpc/proto/google/protobuf/empty.d.ts +8 -0
  26. package/dist/cjs/grpc/proto/google/protobuf/empty.js +1 -1
  27. package/dist/cjs/grpc/proto/google/protobuf/field_mask.d.ts +8 -0
  28. package/dist/cjs/grpc/proto/google/protobuf/field_mask.js +1 -1
  29. package/dist/cjs/grpc/proto/google/protobuf/struct.d.ts +15 -0
  30. package/dist/cjs/grpc/proto/google/protobuf/struct.js +1 -1
  31. package/dist/cjs/grpc/proto/google/protobuf/timestamp.d.ts +8 -0
  32. package/dist/cjs/grpc/proto/google/protobuf/timestamp.js +1 -1
  33. package/dist/cjs/grpc/proto/google/rpc/error_details.d.ts +48 -0
  34. package/dist/cjs/grpc/proto/google/rpc/error_details.js +1 -1
  35. package/dist/cjs/grpc/proto/google/rpc/status.d.ts +8 -0
  36. package/dist/cjs/grpc/proto/google/rpc/status.js +1 -1
  37. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js +1 -1
  38. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js +1 -1
  39. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js +1 -1
  40. package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js +1 -1
  41. package/dist/cjs/grpc/proto/sui/rpc/v2/event.js +1 -1
  42. package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js +1 -1
  43. package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.d.ts +2 -2
  44. package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js +1 -1
  45. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js +1 -1
  46. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js +1 -1
  47. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js +1 -1
  48. package/dist/cjs/grpc/proto/sui/rpc/v2/object.js +1 -1
  49. package/dist/cjs/grpc/proto/sui/rpc/v2/signature.d.ts +9 -87
  50. package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js +1 -1
  51. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.d.ts +2 -6
  52. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.js +1 -1
  53. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.d.ts +0 -2
  54. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js +1 -1
  55. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js +1 -1
  56. package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.d.ts +2 -2
  57. package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js +1 -1
  58. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.d.ts +13 -51
  59. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js +1 -1
  60. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js +1 -1
  61. package/dist/cjs/index.d.ts +1 -1
  62. package/dist/cjs/index.js +1 -1
  63. package/dist/cjs/jsonRpc/types/chain.d.ts +0 -5
  64. package/dist/cjs/jsonRpc/types/generated.d.ts +5 -57
  65. package/dist/cjs/jsonRpc/types/params.d.ts +0 -17
  66. package/dist/cjs/keypairs/falcon512/index.d.ts +2 -0
  67. package/dist/cjs/keypairs/falcon512/index.js +1 -0
  68. package/dist/cjs/keypairs/falcon512/keypair.d.ts +19 -0
  69. package/dist/cjs/keypairs/falcon512/keypair.js +1 -0
  70. package/dist/{esm/keypairs/ed25519 → cjs/keypairs/falcon512}/publickey.d.ts +2 -2
  71. package/dist/cjs/keypairs/falcon512/publickey.js +1 -0
  72. package/dist/cjs/keypairs/index.d.ts +1 -4
  73. package/dist/cjs/keypairs/index.js +1 -1
  74. package/dist/cjs/utils/move-registry.js +1 -1
  75. package/dist/cjs/utils/sui-types.js +1 -1
  76. package/dist/cjs/verify/verify.js +1 -1
  77. package/dist/cjs/w/call/arbitration.js +1 -1
  78. package/dist/cjs/w/call/base.js +1 -1
  79. package/dist/cjs/w/call/contact.js +1 -1
  80. package/dist/cjs/w/call/demand.js +1 -1
  81. package/dist/cjs/w/call/guard.js +1 -1
  82. package/dist/cjs/w/call/machine.js +1 -1
  83. package/dist/cjs/w/call/personal.js +1 -1
  84. package/dist/cjs/w/call/proof.d.ts +3 -3
  85. package/dist/cjs/w/call/proof.js +1 -1
  86. package/dist/cjs/w/call/repository.js +1 -1
  87. package/dist/cjs/w/call/reward.js +1 -1
  88. package/dist/cjs/w/call/service.js +1 -1
  89. package/dist/cjs/w/call/treasury.js +1 -1
  90. package/dist/cjs/w/local/account.d.ts +11 -4
  91. package/dist/cjs/w/local/account.js +1 -1
  92. package/dist/cjs/w/local/storage.js +1 -1
  93. package/dist/cjs/w/local/util.js +1 -1
  94. package/dist/cjs/w/local/wip.d.ts +1 -1
  95. package/dist/cjs/w/local/wip.js +1 -1
  96. package/dist/cjs/w/messenger/crypto.d.ts +1 -3
  97. package/dist/cjs/w/messenger/crypto.js +1 -1
  98. package/dist/cjs/w/messenger/messenger-api.js +1 -1
  99. package/dist/cjs/w/messenger/messenger-manager.js +1 -1
  100. package/dist/cjs/w/messenger/messenger.js +1 -1
  101. package/dist/cjs/w/messenger/pq/crypto.d.ts +6 -6
  102. package/dist/cjs/w/messenger/pq/crypto.js +1 -1
  103. package/dist/cjs/w/messenger/pq/pqxdh.d.ts +3 -6
  104. package/dist/cjs/w/messenger/pq/pqxdh.js +1 -1
  105. package/dist/cjs/w/messenger/pq/session.d.ts +6 -4
  106. package/dist/cjs/w/messenger/pq/session.js +1 -1
  107. package/dist/cjs/w/messenger/pq/spqr.js +1 -1
  108. package/dist/cjs/w/messenger/pq/store-adapter.d.ts +1 -3
  109. package/dist/cjs/w/messenger/pq/store-adapter.js +1 -1
  110. package/dist/cjs/w/messenger/pq/types.d.ts +4 -5
  111. package/dist/cjs/w/messenger/pq/types.js +1 -1
  112. package/dist/cjs/w/messenger/session.d.ts +4 -5
  113. package/dist/cjs/w/messenger/session.js +1 -1
  114. package/dist/cjs/w/messenger/storage.js +1 -1
  115. package/dist/cjs/w/messenger/types.d.ts +7 -10
  116. package/dist/cjs/w/messenger/types.js +1 -1
  117. package/dist/cjs/w/query/object.js +1 -1
  118. package/dist/esm/bcs/bcs.d.ts +30 -68
  119. package/dist/esm/bcs/bcs.js +1 -1
  120. package/dist/esm/bcs/index.js +1 -1
  121. package/dist/esm/cryptography/index.d.ts +1 -1
  122. package/dist/esm/cryptography/index.js +1 -1
  123. package/dist/esm/cryptography/intent.js +1 -1
  124. package/dist/esm/cryptography/keypair.d.ts +2 -2
  125. package/dist/esm/cryptography/keypair.js +1 -1
  126. package/dist/esm/cryptography/publickey.d.ts +1 -1
  127. package/dist/esm/cryptography/publickey.js +1 -1
  128. package/dist/esm/cryptography/signature-scheme.d.ts +4 -15
  129. package/dist/esm/cryptography/signature-scheme.js +1 -1
  130. package/dist/esm/cryptography/signature.d.ts +1 -9
  131. package/dist/esm/cryptography/signature.js +1 -1
  132. package/dist/esm/grpc/client.d.ts +0 -2
  133. package/dist/esm/grpc/client.js +1 -1
  134. package/dist/esm/grpc/proto/google/protobuf/any.d.ts +7 -0
  135. package/dist/esm/grpc/proto/google/protobuf/any.js +1 -1
  136. package/dist/esm/grpc/proto/google/protobuf/duration.d.ts +8 -0
  137. package/dist/esm/grpc/proto/google/protobuf/duration.js +1 -1
  138. package/dist/esm/grpc/proto/google/protobuf/empty.d.ts +8 -0
  139. package/dist/esm/grpc/proto/google/protobuf/empty.js +1 -1
  140. package/dist/esm/grpc/proto/google/protobuf/field_mask.d.ts +8 -0
  141. package/dist/esm/grpc/proto/google/protobuf/field_mask.js +1 -1
  142. package/dist/esm/grpc/proto/google/protobuf/struct.d.ts +15 -0
  143. package/dist/esm/grpc/proto/google/protobuf/struct.js +1 -1
  144. package/dist/esm/grpc/proto/google/protobuf/timestamp.d.ts +8 -0
  145. package/dist/esm/grpc/proto/google/protobuf/timestamp.js +1 -1
  146. package/dist/esm/grpc/proto/google/rpc/error_details.d.ts +48 -0
  147. package/dist/esm/grpc/proto/google/rpc/error_details.js +1 -1
  148. package/dist/esm/grpc/proto/google/rpc/status.d.ts +8 -0
  149. package/dist/esm/grpc/proto/google/rpc/status.js +1 -1
  150. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js +1 -1
  151. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js +1 -1
  152. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js +1 -1
  153. package/dist/esm/grpc/proto/sui/rpc/v2/effects.js +1 -1
  154. package/dist/esm/grpc/proto/sui/rpc/v2/event.js +1 -1
  155. package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js +1 -1
  156. package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.d.ts +2 -2
  157. package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js +1 -1
  158. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js +1 -1
  159. package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js +1 -1
  160. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js +1 -1
  161. package/dist/esm/grpc/proto/sui/rpc/v2/object.js +1 -1
  162. package/dist/esm/grpc/proto/sui/rpc/v2/signature.d.ts +9 -87
  163. package/dist/esm/grpc/proto/sui/rpc/v2/signature.js +1 -1
  164. package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.d.ts +2 -6
  165. package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.js +1 -1
  166. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.d.ts +0 -2
  167. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js +1 -1
  168. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js +1 -1
  169. package/dist/esm/grpc/proto/sui/rpc/v2/system_state.d.ts +2 -2
  170. package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js +1 -1
  171. package/dist/esm/grpc/proto/sui/rpc/v2/transaction.d.ts +13 -51
  172. package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js +1 -1
  173. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js +1 -1
  174. package/dist/esm/index.d.ts +1 -1
  175. package/dist/esm/index.js +1 -1
  176. package/dist/esm/jsonRpc/types/chain.d.ts +0 -5
  177. package/dist/esm/jsonRpc/types/generated.d.ts +5 -57
  178. package/dist/esm/jsonRpc/types/params.d.ts +0 -17
  179. package/dist/esm/keypairs/falcon512/index.d.ts +2 -0
  180. package/dist/esm/keypairs/falcon512/index.js +1 -0
  181. package/dist/esm/keypairs/falcon512/keypair.d.ts +19 -0
  182. package/dist/esm/keypairs/falcon512/keypair.js +1 -0
  183. package/dist/{cjs/keypairs/ed25519 → esm/keypairs/falcon512}/publickey.d.ts +2 -2
  184. package/dist/esm/keypairs/falcon512/publickey.js +1 -0
  185. package/dist/esm/keypairs/index.d.ts +1 -4
  186. package/dist/esm/keypairs/index.js +1 -1
  187. package/dist/esm/utils/move-registry.js +1 -1
  188. package/dist/esm/utils/sui-types.js +1 -1
  189. package/dist/esm/verify/verify.js +1 -1
  190. package/dist/esm/w/call/arbitration.js +1 -1
  191. package/dist/esm/w/call/base.js +1 -1
  192. package/dist/esm/w/call/contact.js +1 -1
  193. package/dist/esm/w/call/demand.js +1 -1
  194. package/dist/esm/w/call/guard.js +1 -1
  195. package/dist/esm/w/call/machine.js +1 -1
  196. package/dist/esm/w/call/personal.js +1 -1
  197. package/dist/esm/w/call/proof.d.ts +3 -3
  198. package/dist/esm/w/call/proof.js +1 -1
  199. package/dist/esm/w/call/repository.js +1 -1
  200. package/dist/esm/w/call/reward.js +1 -1
  201. package/dist/esm/w/call/service.js +1 -1
  202. package/dist/esm/w/call/treasury.js +1 -1
  203. package/dist/esm/w/local/account.d.ts +11 -4
  204. package/dist/esm/w/local/account.js +1 -1
  205. package/dist/esm/w/local/storage.js +1 -1
  206. package/dist/esm/w/local/util.js +1 -1
  207. package/dist/esm/w/local/wip.d.ts +1 -1
  208. package/dist/esm/w/local/wip.js +1 -1
  209. package/dist/esm/w/messenger/crypto.d.ts +1 -3
  210. package/dist/esm/w/messenger/crypto.js +1 -1
  211. package/dist/esm/w/messenger/messenger-api.js +1 -1
  212. package/dist/esm/w/messenger/messenger-manager.js +1 -1
  213. package/dist/esm/w/messenger/messenger.js +1 -1
  214. package/dist/esm/w/messenger/pq/crypto.d.ts +6 -6
  215. package/dist/esm/w/messenger/pq/crypto.js +1 -1
  216. package/dist/esm/w/messenger/pq/pqxdh.d.ts +3 -6
  217. package/dist/esm/w/messenger/pq/pqxdh.js +1 -1
  218. package/dist/esm/w/messenger/pq/session.d.ts +6 -4
  219. package/dist/esm/w/messenger/pq/session.js +1 -1
  220. package/dist/esm/w/messenger/pq/spqr.js +1 -1
  221. package/dist/esm/w/messenger/pq/store-adapter.d.ts +1 -3
  222. package/dist/esm/w/messenger/pq/store-adapter.js +1 -1
  223. package/dist/esm/w/messenger/pq/types.d.ts +4 -5
  224. package/dist/esm/w/messenger/pq/types.js +1 -1
  225. package/dist/esm/w/messenger/session.d.ts +4 -5
  226. package/dist/esm/w/messenger/session.js +1 -1
  227. package/dist/esm/w/messenger/storage.js +1 -1
  228. package/dist/esm/w/messenger/types.d.ts +7 -10
  229. package/dist/esm/w/messenger/types.js +1 -1
  230. package/dist/esm/w/query/object.js +1 -1
  231. package/package.json +25 -25
  232. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.d.ts +0 -20
  233. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js +0 -1
  234. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.d.ts +0 -23
  235. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js +0 -1
  236. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.d.ts +0 -47
  237. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js +0 -1
  238. package/dist/cjs/keypairs/ed25519/ed25519-hd-key.d.ts +0 -8
  239. package/dist/cjs/keypairs/ed25519/ed25519-hd-key.js +0 -1
  240. package/dist/cjs/keypairs/ed25519/index.d.ts +0 -2
  241. package/dist/cjs/keypairs/ed25519/index.js +0 -1
  242. package/dist/cjs/keypairs/ed25519/keypair.d.ts +0 -22
  243. package/dist/cjs/keypairs/ed25519/keypair.js +0 -1
  244. package/dist/cjs/keypairs/ed25519/publickey.js +0 -1
  245. package/dist/cjs/keypairs/passkey/index.d.ts +0 -3
  246. package/dist/cjs/keypairs/passkey/index.js +0 -1
  247. package/dist/cjs/keypairs/passkey/keypair.d.ts +0 -33
  248. package/dist/cjs/keypairs/passkey/keypair.js +0 -1
  249. package/dist/cjs/keypairs/passkey/publickey.d.ts +0 -25
  250. package/dist/cjs/keypairs/passkey/publickey.js +0 -1
  251. package/dist/cjs/keypairs/passkey/types.d.ts +0 -6
  252. package/dist/cjs/keypairs/passkey/types.js +0 -1
  253. package/dist/cjs/keypairs/secp256k1/index.d.ts +0 -2
  254. package/dist/cjs/keypairs/secp256k1/index.js +0 -1
  255. package/dist/cjs/keypairs/secp256k1/keypair.d.ts +0 -22
  256. package/dist/cjs/keypairs/secp256k1/keypair.js +0 -1
  257. package/dist/cjs/keypairs/secp256k1/publickey.d.ts +0 -11
  258. package/dist/cjs/keypairs/secp256k1/publickey.js +0 -1
  259. package/dist/cjs/keypairs/secp256r1/index.d.ts +0 -2
  260. package/dist/cjs/keypairs/secp256r1/index.js +0 -1
  261. package/dist/cjs/keypairs/secp256r1/keypair.d.ts +0 -22
  262. package/dist/cjs/keypairs/secp256r1/keypair.js +0 -1
  263. package/dist/cjs/keypairs/secp256r1/publickey.d.ts +0 -11
  264. package/dist/cjs/keypairs/secp256r1/publickey.js +0 -1
  265. package/dist/cjs/utils/suins.d.ts +0 -2
  266. package/dist/cjs/utils/suins.js +0 -1
  267. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.d.ts +0 -20
  268. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js +0 -1
  269. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.d.ts +0 -23
  270. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js +0 -1
  271. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.d.ts +0 -47
  272. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js +0 -1
  273. package/dist/esm/keypairs/ed25519/ed25519-hd-key.d.ts +0 -8
  274. package/dist/esm/keypairs/ed25519/ed25519-hd-key.js +0 -1
  275. package/dist/esm/keypairs/ed25519/index.d.ts +0 -2
  276. package/dist/esm/keypairs/ed25519/index.js +0 -1
  277. package/dist/esm/keypairs/ed25519/keypair.d.ts +0 -22
  278. package/dist/esm/keypairs/ed25519/keypair.js +0 -1
  279. package/dist/esm/keypairs/ed25519/publickey.js +0 -1
  280. package/dist/esm/keypairs/passkey/index.d.ts +0 -3
  281. package/dist/esm/keypairs/passkey/index.js +0 -1
  282. package/dist/esm/keypairs/passkey/keypair.d.ts +0 -33
  283. package/dist/esm/keypairs/passkey/keypair.js +0 -1
  284. package/dist/esm/keypairs/passkey/publickey.d.ts +0 -25
  285. package/dist/esm/keypairs/passkey/publickey.js +0 -1
  286. package/dist/esm/keypairs/passkey/types.d.ts +0 -6
  287. package/dist/esm/keypairs/passkey/types.js +0 -1
  288. package/dist/esm/keypairs/secp256k1/index.d.ts +0 -2
  289. package/dist/esm/keypairs/secp256k1/index.js +0 -1
  290. package/dist/esm/keypairs/secp256k1/keypair.d.ts +0 -22
  291. package/dist/esm/keypairs/secp256k1/keypair.js +0 -1
  292. package/dist/esm/keypairs/secp256k1/publickey.d.ts +0 -11
  293. package/dist/esm/keypairs/secp256k1/publickey.js +0 -1
  294. package/dist/esm/keypairs/secp256r1/index.d.ts +0 -2
  295. package/dist/esm/keypairs/secp256r1/index.js +0 -1
  296. package/dist/esm/keypairs/secp256r1/keypair.d.ts +0 -22
  297. package/dist/esm/keypairs/secp256r1/keypair.js +0 -1
  298. package/dist/esm/keypairs/secp256r1/publickey.d.ts +0 -11
  299. package/dist/esm/keypairs/secp256r1/publickey.js +0 -1
  300. package/dist/esm/utils/suins.d.ts +0 -2
  301. package/dist/esm/utils/suins.js +0 -1
@@ -0,0 +1,196 @@
1
+ ================================================================================
2
+ APACHE LICENSE 2.0
3
+ ================================================================================
4
+
5
+ The following software components are licensed under the Apache License 2.0:
6
+
7
+ 1. @mysten/bcs, @mysten/utils
8
+ Copyright (c) Mysten Labs, Inc.
9
+ Source: https://github.com/MystenLabs/sui
10
+
11
+ 2. @protobuf-ts/grpcweb-transport, @protobuf-ts/runtime, @protobuf-ts/runtime-rpc
12
+ Copyright (c) Timo Stamm
13
+ Source: https://github.com/timostamm/protobuf-ts
14
+
15
+ ================================================================================
16
+
17
+ Apache License
18
+ Version 2.0, January 2004
19
+ http://www.apache.org/licenses/
20
+
21
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
22
+
23
+ 1. Definitions.
24
+
25
+ "License" shall mean the terms and conditions for use, reproduction,
26
+ and distribution as defined by Sections 1 through 9 of this document.
27
+
28
+ "Licensor" shall mean the copyright owner or entity authorized by
29
+ the copyright owner that is granting the License.
30
+
31
+ "Legal Entity" shall mean the union of the acting entity and all
32
+ other entities that control, are controlled by, or are under common
33
+ control with that entity. For the purposes of this definition,
34
+ "control" means (i) the power, direct or indirect, to cause the
35
+ direction or management of such entity, whether by contract or
36
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
37
+ outstanding shares, or (iii) beneficial ownership of such entity.
38
+
39
+ "You" (or "Your") shall mean an individual or Legal Entity
40
+ exercising permissions granted by this License.
41
+
42
+ "Source" form shall mean the preferred form for making modifications,
43
+ including but not limited to software source code, documentation
44
+ source, and configuration files.
45
+
46
+ "Object" form shall mean any form resulting from mechanical
47
+ transformation or translation of a Source form, including but
48
+ not limited to compiled object code, generated documentation,
49
+ and conversions to other media types.
50
+
51
+ "Work" shall mean the work of authorship, whether in Source or
52
+ Object form, made available under the License, as indicated by a
53
+ copyright notice that is included in or attached to the work
54
+ (an example is provided in the Appendix below).
55
+
56
+ "Derivative Works" shall mean any work, whether in Source or Object
57
+ form, that is based on (or derived from) the Work and for which the
58
+ editorial revisions, annotations, elaborations, or other modifications
59
+ represent, as a whole, an original work of authorship. For the purposes
60
+ of this License, Derivative Works shall not include works that remain
61
+ separable from, or merely link (or bind by name) to the interfaces of,
62
+ the Work and Derivative Works thereof.
63
+
64
+ "Contribution" shall mean any work of authorship, including
65
+ the original version of the Work and any modifications or additions
66
+ to that Work or Derivative Works thereof, that is intentionally
67
+ submitted to the Licensor for inclusion in the Work by the copyright owner
68
+ or by an individual or Legal Entity authorized to submit on behalf of
69
+ the copyright owner. For the purposes of this definition, "submitted"
70
+ means any form of electronic, verbal, or written communication sent
71
+ to the Licensor or its representatives, including but not limited to
72
+ communication on electronic mailing lists, source code control systems,
73
+ and issue tracking systems that are managed by, or on behalf of, the
74
+ Licensor for the purpose of discussing and improving the Work, but
75
+ excluding communication that is conspicuously marked or otherwise
76
+ designated in writing by the copyright owner as "Not a Contribution."
77
+
78
+ "Contributor" shall mean Licensor and any individual or Legal Entity
79
+ on behalf of whom a Contribution has been received by Licensor and
80
+ subsequently incorporated within the Work.
81
+
82
+ 2. Grant of Copyright License. Subject to the terms and conditions of
83
+ this License, each Contributor hereby grants to You a perpetual,
84
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
85
+ copyright license to reproduce, prepare Derivative Works of,
86
+ publicly display, publicly perform, sublicense, and distribute the
87
+ Work and such Derivative Works in Source or Object form.
88
+
89
+ 3. Grant of Patent License. Subject to the terms and conditions of
90
+ this License, each Contributor hereby grants to You a perpetual,
91
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
92
+ (except as stated in this section) patent license to make, have made,
93
+ use, offer to sell, sell, import, and otherwise transfer the Work,
94
+ where such license applies only to those patent claims licensable
95
+ by such Contributor that are necessarily infringed by their
96
+ Contribution(s) alone or by combination of their Contribution(s)
97
+ with the Work to which such Contribution(s) was submitted. If You
98
+ institute patent litigation against any entity (including a
99
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
100
+ or a Contribution incorporated within the Work constitutes direct
101
+ or contributory patent infringement, then any patent licenses
102
+ granted to You under this License for that Work shall terminate
103
+ as of the date such litigation is filed.
104
+
105
+ 4. Redistribution. You may reproduce and distribute copies of the
106
+ Work or Derivative Works thereof in any medium, with or without
107
+ modifications, and in Source or Object form, provided that You
108
+ meet the following conditions:
109
+
110
+ (a) You must give any other recipients of the Work or
111
+ Derivative Works a copy of this License; and
112
+
113
+ (b) You must cause any modified files to carry prominent notices
114
+ stating that You changed the files; and
115
+
116
+ (c) You must retain, in the Source form of any Derivative Works
117
+ that You distribute, all copyright, patent, trademark, and
118
+ attribution notices from the Source form of the Work,
119
+ excluding those notices that do not pertain to any part of
120
+ the Derivative Works; and
121
+
122
+ (d) If the Work includes a "NOTICE" text file as part of its
123
+ distribution, then any Derivative Works that You distribute must
124
+ include a readable copy of the attribution notices contained
125
+ within such NOTICE file, excluding those notices that do not
126
+ pertain to any part of the Derivative Works, in at least one
127
+ of the following places: within a NOTICE text file distributed
128
+ as part of the Derivative Works; within the Source form or
129
+ documentation, if provided along with the Derivative Works; or,
130
+ within a display generated by the Derivative Works, if and
131
+ wherever such third-party notices normally appear. The contents
132
+ of the NOTICE file are for informational purposes only and
133
+ do not modify the License. You may add Your own attribution
134
+ notices within Derivative Works that You distribute, alongside
135
+ or as an addendum to the NOTICE text from the Work, provided
136
+ that such additional attribution notices cannot be construed
137
+ as modifying the License.
138
+
139
+ You may add Your own copyright statement to Your modifications and
140
+ may provide additional or different license terms and conditions
141
+ for use, reproduction, or distribution of Your modifications, or
142
+ for any such Derivative Works as a whole, provided Your use,
143
+ reproduction, and distribution of the Work otherwise complies with
144
+ the conditions stated in this License.
145
+
146
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
147
+ any Contribution intentionally submitted for inclusion in the Work
148
+ by You to the Licensor shall be under the terms and conditions of
149
+ this License, without any additional terms or conditions.
150
+ Notwithstanding the above, nothing herein shall supersede or modify
151
+ the terms of any separate license agreement you may have executed
152
+ with Licensor regarding such Contributions.
153
+
154
+ 6. Trademarks. This License does not grant permission to use the trade
155
+ names, trademarks, service marks, or product names of the Licensor,
156
+ except as required for reasonable and customary use in describing the
157
+ origin of the Work and reproducing the content of the NOTICE file.
158
+
159
+ 7. Disclaimer of Warranty. Unless required by applicable law or
160
+ agreed to in writing, Licensor provides the Work (and each
161
+ Contributor provides its Contributions) on an "AS IS" BASIS,
162
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
163
+ implied, including, without limitation, any warranties or conditions
164
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
165
+ PARTICULAR PURPOSE. You are solely responsible for determining the
166
+ appropriateness of using or redistributing the Work and assume any
167
+ risks associated with Your exercise of permissions under this License.
168
+
169
+ 8. Limitation of Liability. In no event and under no legal theory,
170
+ whether in tort (including negligence), contract, or otherwise,
171
+ unless required by applicable law (such as deliberate and grossly
172
+ negligent acts) or agreed to in writing, shall any Contributor be
173
+ liable to You for damages, including any direct, indirect, special,
174
+ incidental, or consequential damages of any character arising as a
175
+ result of this License or out of the use or inability to use the
176
+ Work (including but not limited to damages for loss of goodwill,
177
+ work stoppage, computer failure or malfunction, or any and all
178
+ other commercial damages or losses), even if such Contributor
179
+ has been advised of the possibility of such damages.
180
+
181
+ 9. Accepting Warranty or Additional Liability. While redistributing
182
+ the Work or Derivative Works thereof, You may choose to offer,
183
+ and charge a fee for, acceptance of support, warranty, indemnity,
184
+ or other liability obligations and/or rights consistent with this
185
+ License. However, in accepting such obligations, You may act only
186
+ on Your own behalf and on Your sole responsibility, not on behalf
187
+ of any other Contributor, and only if You agree to indemnify,
188
+ defend, and hold each Contributor harmless for any liability
189
+ incurred by, or claims asserted against, such Contributor by reason
190
+ of your accepting any such warranty or additional liability.
191
+
192
+ END OF TERMS AND CONDITIONS
193
+
194
+ ================================================================================
195
+ END OF APACHE LICENSE 2.0
196
+ ================================================================================
@@ -0,0 +1,58 @@
1
+ ================================================================================
2
+ MIT LICENSE
3
+ ================================================================================
4
+
5
+ The following software components are licensed under the MIT License:
6
+
7
+ 1. @noble/curves (https://github.com/paulmillr/noble-curves)
8
+ Copyright (c) 2022 Paul Miller (https://paulmillr.com)
9
+
10
+ 2. @noble/hashes (https://github.com/paulmillr/noble-hashes)
11
+ Copyright (c) 2022 Paul Miller (https://paulmillr.com)
12
+
13
+ 3. @noble/post-quantum (https://github.com/paulmillr/noble-post-quantum)
14
+ Copyright (c) 2023 Paul Miller (https://paulmillr.com)
15
+
16
+ 4. @scure/base (https://github.com/paulmillr/scure-base)
17
+ Copyright (c) 2022 Paul Miller (https://paulmillr.com)
18
+
19
+ 5. @scure/bip32 (https://github.com/paulmillr/scure-bip32)
20
+ Copyright (c) 2022 Paul Miller (https://paulmillr.com)
21
+
22
+ 6. @scure/bip39 (https://github.com/paulmillr/scure-bip39)
23
+ Copyright (c) 2022 Paul Miller (https://paulmillr.com)
24
+
25
+ 7. better-sqlite3 (https://github.com/WiseLibs/better-sqlite3)
26
+ Copyright (c) 2017 Joshua Wise
27
+
28
+ 8. lodash (https://github.com/lodash/lodash)
29
+ Copyright (c) OpenJS Foundation and other contributors
30
+
31
+ 9. valibot (https://github.com/fabian-hiller/valibot)
32
+ Copyright (c) 2023 Fabian Hiller
33
+
34
+ ================================================================================
35
+
36
+ MIT License
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining a copy
39
+ of this software and associated documentation files (the "Software"), to deal
40
+ in the Software without restriction, including without limitation the rights
41
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42
+ copies of the Software, and to permit persons to whom the Software is
43
+ furnished to do so, subject to the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be included in all
46
+ copies or substantial portions of the Software.
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54
+ SOFTWARE.
55
+
56
+ ================================================================================
57
+ END OF MIT LICENSE
58
+ ================================================================================
@@ -1229,7 +1229,7 @@ export declare const IntentVersion: import("@mysten/bcs").BcsEnum<{
1229
1229
  V0: any;
1230
1230
  }, "IntentVersion">;
1231
1231
  export declare const AppId: import("@mysten/bcs").BcsEnum<{
1232
- Sui: any;
1232
+ Wow: any;
1233
1233
  }, "AppId">;
1234
1234
  export declare const Intent: import("@mysten/bcs").BcsStruct<{
1235
1235
  scope: import("@mysten/bcs").BcsEnum<{
@@ -1242,7 +1242,7 @@ export declare const Intent: import("@mysten/bcs").BcsStruct<{
1242
1242
  V0: any;
1243
1243
  }, "IntentVersion">;
1244
1244
  appId: import("@mysten/bcs").BcsEnum<{
1245
- Sui: any;
1245
+ Wow: any;
1246
1246
  }, "AppId">;
1247
1247
  }, string>;
1248
1248
  export declare function IntentMessage<T extends BcsType<any>>(T: T): import("@mysten/bcs").BcsStruct<{
@@ -1257,53 +1257,34 @@ export declare function IntentMessage<T extends BcsType<any>>(T: T): import("@my
1257
1257
  V0: any;
1258
1258
  }, "IntentVersion">;
1259
1259
  appId: import("@mysten/bcs").BcsEnum<{
1260
- Sui: any;
1260
+ Wow: any;
1261
1261
  }, "AppId">;
1262
1262
  }, string>;
1263
1263
  value: T;
1264
1264
  }, string>;
1265
1265
  export declare const CompressedSignature: import("@mysten/bcs").BcsEnum<{
1266
- ED25519: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[64]">;
1267
- Secp256k1: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[64]">;
1268
- Secp256r1: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[64]">;
1269
- ZkLogin: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
1270
- Passkey: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
1266
+ Falcon512: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
1271
1267
  }, "CompressedSignature">;
1272
1268
  export declare const PublicKey: import("@mysten/bcs").BcsEnum<{
1273
- ED25519: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[32]">;
1274
- Secp256k1: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[33]">;
1275
- Secp256r1: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[33]">;
1276
- ZkLogin: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
1277
- Passkey: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[33]">;
1269
+ Falcon512: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[897]">;
1278
1270
  }, "PublicKey">;
1279
1271
  export declare const MultiSigPkMap: import("@mysten/bcs").BcsStruct<{
1280
1272
  pubKey: import("@mysten/bcs").BcsEnum<{
1281
- ED25519: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[32]">;
1282
- Secp256k1: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[33]">;
1283
- Secp256r1: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[33]">;
1284
- ZkLogin: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
1285
- Passkey: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[33]">;
1273
+ Falcon512: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "bytes[897]">;
1286
1274
  }, "PublicKey">;
1287
1275
  weight: BcsType<number, number, "u8">;
1288
1276
  }, string>;
1289
1277
  export declare const MultiSigPublicKey: import("@mysten/bcs").BcsStruct<{
1290
1278
  pk_map: BcsType<{
1291
- pubKey: import("@mysten/bcs").EnumOutputShapeWithKeys<{
1292
- ED25519: Uint8Array<ArrayBufferLike>;
1293
- Secp256k1: Uint8Array<ArrayBufferLike>;
1294
- Secp256r1: Uint8Array<ArrayBufferLike>;
1295
- ZkLogin: Uint8Array<ArrayBufferLike>;
1296
- Passkey: Uint8Array<ArrayBufferLike>;
1297
- }, "ED25519" | "Secp256k1" | "Secp256r1" | "ZkLogin" | "Passkey">;
1279
+ pubKey: {
1280
+ Falcon512: Uint8Array<ArrayBufferLike>;
1281
+ $kind: "Falcon512";
1282
+ };
1298
1283
  weight: number;
1299
1284
  }[], Iterable<{
1300
- pubKey: import("@mysten/bcs").EnumInputShape<{
1301
- ED25519: Iterable<number>;
1302
- Secp256k1: Iterable<number>;
1303
- Secp256r1: Iterable<number>;
1304
- ZkLogin: Iterable<number>;
1305
- Passkey: Iterable<number>;
1306
- }>;
1285
+ pubKey: {
1286
+ Falcon512: Iterable<number>;
1287
+ };
1307
1288
  weight: number;
1308
1289
  }> & {
1309
1290
  length: number;
@@ -1311,40 +1292,26 @@ export declare const MultiSigPublicKey: import("@mysten/bcs").BcsStruct<{
1311
1292
  threshold: BcsType<number, number, "u16">;
1312
1293
  }, string>;
1313
1294
  export declare const MultiSig: import("@mysten/bcs").BcsStruct<{
1314
- sigs: BcsType<import("@mysten/bcs").EnumOutputShapeWithKeys<{
1315
- ED25519: Uint8Array<ArrayBufferLike>;
1316
- Secp256k1: Uint8Array<ArrayBufferLike>;
1317
- Secp256r1: Uint8Array<ArrayBufferLike>;
1318
- ZkLogin: Uint8Array<ArrayBufferLike>;
1319
- Passkey: Uint8Array<ArrayBufferLike>;
1320
- }, "ED25519" | "Secp256k1" | "Secp256r1" | "ZkLogin" | "Passkey">[], Iterable<import("@mysten/bcs").EnumInputShape<{
1321
- ED25519: Iterable<number>;
1322
- Secp256k1: Iterable<number>;
1323
- Secp256r1: Iterable<number>;
1324
- ZkLogin: Iterable<number>;
1325
- Passkey: Iterable<number>;
1326
- }>> & {
1295
+ sigs: BcsType<{
1296
+ Falcon512: Uint8Array<ArrayBufferLike>;
1297
+ $kind: "Falcon512";
1298
+ }[], Iterable<{
1299
+ Falcon512: Iterable<number>;
1300
+ }> & {
1327
1301
  length: number;
1328
1302
  }, string>;
1329
1303
  bitmap: BcsType<number, number, "u16">;
1330
1304
  multisig_pk: import("@mysten/bcs").BcsStruct<{
1331
1305
  pk_map: BcsType<{
1332
- pubKey: import("@mysten/bcs").EnumOutputShapeWithKeys<{
1333
- ED25519: Uint8Array<ArrayBufferLike>;
1334
- Secp256k1: Uint8Array<ArrayBufferLike>;
1335
- Secp256r1: Uint8Array<ArrayBufferLike>;
1336
- ZkLogin: Uint8Array<ArrayBufferLike>;
1337
- Passkey: Uint8Array<ArrayBufferLike>;
1338
- }, "ED25519" | "Secp256k1" | "Secp256r1" | "ZkLogin" | "Passkey">;
1306
+ pubKey: {
1307
+ Falcon512: Uint8Array<ArrayBufferLike>;
1308
+ $kind: "Falcon512";
1309
+ };
1339
1310
  weight: number;
1340
1311
  }[], Iterable<{
1341
- pubKey: import("@mysten/bcs").EnumInputShape<{
1342
- ED25519: Iterable<number>;
1343
- Secp256k1: Iterable<number>;
1344
- Secp256r1: Iterable<number>;
1345
- ZkLogin: Iterable<number>;
1346
- Passkey: Iterable<number>;
1347
- }>;
1312
+ pubKey: {
1313
+ Falcon512: Iterable<number>;
1314
+ };
1348
1315
  weight: number;
1349
1316
  }> & {
1350
1317
  length: number;
@@ -1366,7 +1333,7 @@ export declare const SenderSignedTransaction: import("@mysten/bcs").BcsStruct<{
1366
1333
  V0: any;
1367
1334
  }, "IntentVersion">;
1368
1335
  appId: import("@mysten/bcs").BcsEnum<{
1369
- Sui: any;
1336
+ Wow: any;
1370
1337
  }, "AppId">;
1371
1338
  }, string>;
1372
1339
  value: import("@mysten/bcs").BcsEnum<{
@@ -1646,8 +1613,8 @@ export declare const SenderSignedData: BcsType<{
1646
1613
  $kind: "V0";
1647
1614
  };
1648
1615
  appId: {
1649
- Sui: unknown;
1650
- $kind: "Sui";
1616
+ Wow: unknown;
1617
+ $kind: "Wow";
1651
1618
  };
1652
1619
  };
1653
1620
  value: {
@@ -1794,7 +1761,7 @@ export declare const SenderSignedData: BcsType<{
1794
1761
  V0: unknown;
1795
1762
  };
1796
1763
  appId: {
1797
- Sui: unknown;
1764
+ Wow: unknown;
1798
1765
  };
1799
1766
  };
1800
1767
  value: {
@@ -1958,8 +1925,3 @@ export declare const SenderSignedData: BcsType<{
1958
1925
  }> & {
1959
1926
  length: number;
1960
1927
  }, "SenderSignedData">;
1961
- export declare const PasskeyAuthenticator: import("@mysten/bcs").BcsStruct<{
1962
- authenticatorData: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
1963
- clientDataJson: BcsType<string, string, "string">;
1964
- userSignature: BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
1965
- }, string>;
@@ -1 +1 @@
1
- import{bcs,fromBase58,fromBase64,fromHex,toBase58,toBase64,toHex}from'@mysten/bcs';import{isValidWowAddress,normalizeWowAddress,WOW_ADDRESS_LENGTH}from'../utils/sui-types.js';import{TypeTagSerializer}from'./type-tag-serializer.js';function unsafe_u64(a){return bcs['u64']({'name':'unsafe_u64',...a})['transform']({'input':b=>b,'output':b=>Number(b)});}function optionEnum(a){return bcs['enum']('Option',{'None':null,'Some':a});}export const Address=bcs['bytes'](WOW_ADDRESS_LENGTH)['transform']({'validate':a=>{const b=typeof a==='string'?a:toHex(a);if(!b||!isValidWowAddress(normalizeWowAddress(b)))throw new Error('Invalid\x20Wow\x20address\x20'+b);},'input':a=>typeof a==='string'?fromHex(normalizeWowAddress(a)):a,'output':a=>normalizeWowAddress(toHex(a))});export const ObjectDigest=bcs['byteVector']()['transform']({'name':'ObjectDigest','input':a=>fromBase58(a),'output':a=>toBase58(new Uint8Array(a)),'validate':a=>{if(fromBase58(a)['length']!==0x20)throw new Error('ObjectDigest\x20must\x20be\x2032\x20bytes');}});export const SuiObjectRef=bcs['struct']('SuiObjectRef',{'objectId':Address,'version':bcs['u64'](),'digest':ObjectDigest});export const SharedObjectRef=bcs['struct']('SharedObjectRef',{'objectId':Address,'initialSharedVersion':bcs['u64'](),'mutable':bcs['bool']()});export const ObjectArg=bcs['enum']('ObjectArg',{'ImmOrOwnedObject':SuiObjectRef,'SharedObject':SharedObjectRef,'Receiving':SuiObjectRef});export const Owner=bcs['enum']('Owner',{'AddressOwner':Address,'ObjectOwner':Address,'Shared':bcs['struct']('Shared',{'initialSharedVersion':bcs['u64']()}),'Immutable':null,'ConsensusAddressOwner':bcs['struct']('ConsensusAddressOwner',{'owner':Address,'startVersion':bcs['u64']()})});export const CallArg=bcs['enum']('CallArg',{'Pure':bcs['struct']('Pure',{'bytes':bcs['byteVector']()['transform']({'input':a=>typeof a==='string'?fromBase64(a):a,'output':a=>toBase64(new Uint8Array(a))})}),'Object':ObjectArg});const InnerTypeTag=bcs['enum']('TypeTag',{'bool':null,'u8':null,'u64':null,'u128':null,'address':null,'signer':null,'vector':bcs['lazy'](()=>InnerTypeTag),'struct':bcs['lazy'](()=>StructTag),'u16':null,'u32':null,'u256':null});export const TypeTag=InnerTypeTag['transform']({'input':a=>typeof a==='string'?TypeTagSerializer['parseFromStr'](a,!![]):a,'output':a=>TypeTagSerializer['tagToString'](a)});export const Argument=bcs['enum']('Argument',{'GasCoin':null,'Input':bcs['u16'](),'Result':bcs['u16'](),'NestedResult':bcs['tuple']([bcs['u16'](),bcs['u16']()])});export const ProgrammableMoveCall=bcs['struct']('ProgrammableMoveCall',{'package':Address,'module':bcs['string'](),'function':bcs['string'](),'typeArguments':bcs['vector'](TypeTag),'arguments':bcs['vector'](Argument)});export const Command=bcs['enum']('Command',{'MoveCall':ProgrammableMoveCall,'TransferObjects':bcs['struct']('TransferObjects',{'objects':bcs['vector'](Argument),'address':Argument}),'SplitCoins':bcs['struct']('SplitCoins',{'coin':Argument,'amounts':bcs['vector'](Argument)}),'MergeCoins':bcs['struct']('MergeCoins',{'destination':Argument,'sources':bcs['vector'](Argument)}),'Publish':bcs['struct']('Publish',{'modules':bcs['vector'](bcs['byteVector']()['transform']({'input':a=>typeof a==='string'?fromBase64(a):a,'output':a=>toBase64(new Uint8Array(a))})),'dependencies':bcs['vector'](Address)}),'MakeMoveVec':bcs['struct']('MakeMoveVec',{'type':optionEnum(TypeTag)['transform']({'input':a=>a===null?{'None':!![]}:{'Some':a},'output':a=>a['Some']??null}),'elements':bcs['vector'](Argument)}),'Upgrade':bcs['struct']('Upgrade',{'modules':bcs['vector'](bcs['byteVector']()['transform']({'input':a=>typeof a==='string'?fromBase64(a):a,'output':a=>toBase64(new Uint8Array(a))})),'dependencies':bcs['vector'](Address),'package':Address,'ticket':Argument})});export const ProgrammableTransaction=bcs['struct']('ProgrammableTransaction',{'inputs':bcs['vector'](CallArg),'commands':bcs['vector'](Command)});export const TransactionKind=bcs['enum']('TransactionKind',{'ProgrammableTransaction':ProgrammableTransaction,'ChangeEpoch':null,'Genesis':null,'ConsensusCommitPrologue':null});export const TransactionExpiration=bcs['enum']('TransactionExpiration',{'None':null,'Epoch':unsafe_u64()});export const StructTag=bcs['struct']('StructTag',{'address':Address,'module':bcs['string'](),'name':bcs['string'](),'typeParams':bcs['vector'](InnerTypeTag)});export const GasData=bcs['struct']('GasData',{'payment':bcs['vector'](SuiObjectRef),'owner':Address,'price':bcs['u64'](),'budget':bcs['u64']()});export const TransactionDataV1=bcs['struct']('TransactionDataV1',{'kind':TransactionKind,'sender':Address,'gasData':GasData,'expiration':TransactionExpiration});export const TransactionData=bcs['enum']('TransactionData',{'V1':TransactionDataV1});export const IntentScope=bcs['enum']('IntentScope',{'TransactionData':null,'TransactionEffects':null,'CheckpointSummary':null,'PersonalMessage':null});export const IntentVersion=bcs['enum']('IntentVersion',{'V0':null});export const AppId=bcs['enum']('AppId',{'Sui':null});export const Intent=bcs['struct']('Intent',{'scope':IntentScope,'version':IntentVersion,'appId':AppId});export function IntentMessage(a){return bcs['struct']('IntentMessage<'+a['name']+'>',{'intent':Intent,'value':a});}export const CompressedSignature=bcs['enum']('CompressedSignature',{'ED25519':bcs['bytes'](0x40),'Secp256k1':bcs['bytes'](0x40),'Secp256r1':bcs['bytes'](0x40),'ZkLogin':bcs['byteVector'](),'Passkey':bcs['byteVector']()});export const PublicKey=bcs['enum']('PublicKey',{'ED25519':bcs['bytes'](0x20),'Secp256k1':bcs['bytes'](0x21),'Secp256r1':bcs['bytes'](0x21),'ZkLogin':bcs['byteVector'](),'Passkey':bcs['bytes'](0x21)});export const MultiSigPkMap=bcs['struct']('MultiSigPkMap',{'pubKey':PublicKey,'weight':bcs['u8']()});export const MultiSigPublicKey=bcs['struct']('MultiSigPublicKey',{'pk_map':bcs['vector'](MultiSigPkMap),'threshold':bcs['u16']()});export const MultiSig=bcs['struct']('MultiSig',{'sigs':bcs['vector'](CompressedSignature),'bitmap':bcs['u16'](),'multisig_pk':MultiSigPublicKey});export const base64String=bcs['byteVector']()['transform']({'input':a=>typeof a==='string'?fromBase64(a):a,'output':a=>toBase64(new Uint8Array(a))});export const SenderSignedTransaction=bcs['struct']('SenderSignedTransaction',{'intentMessage':IntentMessage(TransactionData),'txSignatures':bcs['vector'](base64String)});export const SenderSignedData=bcs['vector'](SenderSignedTransaction,{'name':'SenderSignedData'});export const PasskeyAuthenticator=bcs['struct']('PasskeyAuthenticator',{'authenticatorData':bcs['byteVector'](),'clientDataJson':bcs['string'](),'userSignature':bcs['byteVector']()});
1
+ import{bcs,fromBase58,fromBase64,fromHex,toBase58,toBase64,toHex}from'@mysten/bcs';import{isValidWowAddress,normalizeWowAddress,WOW_ADDRESS_LENGTH}from'../utils/sui-types.js';import{TypeTagSerializer}from'./type-tag-serializer.js';function unsafe_u64(a){return bcs['u64']({'name':'unsafe_u64',...a})['transform']({'input':b=>b,'output':b=>Number(b)});}function optionEnum(a){return bcs['enum']('Option',{'None':null,'Some':a});}export const Address=bcs['bytes'](WOW_ADDRESS_LENGTH)['transform']({'validate':a=>{const b=typeof a==='string'?a:toHex(a);if(!b||!isValidWowAddress(normalizeWowAddress(b)))throw new Error('Invalid\x20Wow\x20address\x20'+b);},'input':a=>typeof a==='string'?fromHex(normalizeWowAddress(a)):a,'output':a=>normalizeWowAddress(toHex(a))});export const ObjectDigest=bcs['byteVector']()['transform']({'name':'ObjectDigest','input':a=>fromBase58(a),'output':a=>toBase58(new Uint8Array(a)),'validate':a=>{if(fromBase58(a)['length']!==0x20)throw new Error('ObjectDigest\x20must\x20be\x2032\x20bytes');}});export const SuiObjectRef=bcs['struct']('SuiObjectRef',{'objectId':Address,'version':bcs['u64'](),'digest':ObjectDigest});export const SharedObjectRef=bcs['struct']('SharedObjectRef',{'objectId':Address,'initialSharedVersion':bcs['u64'](),'mutable':bcs['bool']()});export const ObjectArg=bcs['enum']('ObjectArg',{'ImmOrOwnedObject':SuiObjectRef,'SharedObject':SharedObjectRef,'Receiving':SuiObjectRef});export const Owner=bcs['enum']('Owner',{'AddressOwner':Address,'ObjectOwner':Address,'Shared':bcs['struct']('Shared',{'initialSharedVersion':bcs['u64']()}),'Immutable':null,'ConsensusAddressOwner':bcs['struct']('ConsensusAddressOwner',{'owner':Address,'startVersion':bcs['u64']()})});export const CallArg=bcs['enum']('CallArg',{'Pure':bcs['struct']('Pure',{'bytes':bcs['byteVector']()['transform']({'input':a=>typeof a==='string'?fromBase64(a):a,'output':a=>toBase64(new Uint8Array(a))})}),'Object':ObjectArg});const InnerTypeTag=bcs['enum']('TypeTag',{'bool':null,'u8':null,'u64':null,'u128':null,'address':null,'signer':null,'vector':bcs['lazy'](()=>InnerTypeTag),'struct':bcs['lazy'](()=>StructTag),'u16':null,'u32':null,'u256':null});export const TypeTag=InnerTypeTag['transform']({'input':a=>typeof a==='string'?TypeTagSerializer['parseFromStr'](a,!![]):a,'output':a=>TypeTagSerializer['tagToString'](a)});export const Argument=bcs['enum']('Argument',{'GasCoin':null,'Input':bcs['u16'](),'Result':bcs['u16'](),'NestedResult':bcs['tuple']([bcs['u16'](),bcs['u16']()])});export const ProgrammableMoveCall=bcs['struct']('ProgrammableMoveCall',{'package':Address,'module':bcs['string'](),'function':bcs['string'](),'typeArguments':bcs['vector'](TypeTag),'arguments':bcs['vector'](Argument)});export const Command=bcs['enum']('Command',{'MoveCall':ProgrammableMoveCall,'TransferObjects':bcs['struct']('TransferObjects',{'objects':bcs['vector'](Argument),'address':Argument}),'SplitCoins':bcs['struct']('SplitCoins',{'coin':Argument,'amounts':bcs['vector'](Argument)}),'MergeCoins':bcs['struct']('MergeCoins',{'destination':Argument,'sources':bcs['vector'](Argument)}),'Publish':bcs['struct']('Publish',{'modules':bcs['vector'](bcs['byteVector']()['transform']({'input':a=>typeof a==='string'?fromBase64(a):a,'output':a=>toBase64(new Uint8Array(a))})),'dependencies':bcs['vector'](Address)}),'MakeMoveVec':bcs['struct']('MakeMoveVec',{'type':optionEnum(TypeTag)['transform']({'input':a=>a===null?{'None':!![]}:{'Some':a},'output':a=>a['Some']??null}),'elements':bcs['vector'](Argument)}),'Upgrade':bcs['struct']('Upgrade',{'modules':bcs['vector'](bcs['byteVector']()['transform']({'input':a=>typeof a==='string'?fromBase64(a):a,'output':a=>toBase64(new Uint8Array(a))})),'dependencies':bcs['vector'](Address),'package':Address,'ticket':Argument})});export const ProgrammableTransaction=bcs['struct']('ProgrammableTransaction',{'inputs':bcs['vector'](CallArg),'commands':bcs['vector'](Command)});export const TransactionKind=bcs['enum']('TransactionKind',{'ProgrammableTransaction':ProgrammableTransaction,'ChangeEpoch':null,'Genesis':null,'ConsensusCommitPrologue':null});export const TransactionExpiration=bcs['enum']('TransactionExpiration',{'None':null,'Epoch':unsafe_u64()});export const StructTag=bcs['struct']('StructTag',{'address':Address,'module':bcs['string'](),'name':bcs['string'](),'typeParams':bcs['vector'](InnerTypeTag)});export const GasData=bcs['struct']('GasData',{'payment':bcs['vector'](SuiObjectRef),'owner':Address,'price':bcs['u64'](),'budget':bcs['u64']()});export const TransactionDataV1=bcs['struct']('TransactionDataV1',{'kind':TransactionKind,'sender':Address,'gasData':GasData,'expiration':TransactionExpiration});export const TransactionData=bcs['enum']('TransactionData',{'V1':TransactionDataV1});export const IntentScope=bcs['enum']('IntentScope',{'TransactionData':null,'TransactionEffects':null,'CheckpointSummary':null,'PersonalMessage':null});export const IntentVersion=bcs['enum']('IntentVersion',{'V0':null});export const AppId=bcs['enum']('AppId',{'Wow':null});export const Intent=bcs['struct']('Intent',{'scope':IntentScope,'version':IntentVersion,'appId':AppId});export function IntentMessage(a){return bcs['struct']('IntentMessage<'+a['name']+'>',{'intent':Intent,'value':a});}export const CompressedSignature=bcs['enum']('CompressedSignature',{'Falcon512':bcs['byteVector']()});export const PublicKey=bcs['enum']('PublicKey',{'Falcon512':bcs['bytes'](0x381)});export const MultiSigPkMap=bcs['struct']('MultiSigPkMap',{'pubKey':PublicKey,'weight':bcs['u8']()});export const MultiSigPublicKey=bcs['struct']('MultiSigPublicKey',{'pk_map':bcs['vector'](MultiSigPkMap),'threshold':bcs['u16']()});export const MultiSig=bcs['struct']('MultiSig',{'sigs':bcs['vector'](CompressedSignature),'bitmap':bcs['u16'](),'multisig_pk':MultiSigPublicKey});export const base64String=bcs['byteVector']()['transform']({'input':a=>typeof a==='string'?fromBase64(a):a,'output':a=>toBase64(new Uint8Array(a))});export const SenderSignedTransaction=bcs['struct']('SenderSignedTransaction',{'intentMessage':IntentMessage(TransactionData),'txSignatures':bcs['vector'](base64String)});export const SenderSignedData=bcs['vector'](SenderSignedTransaction,{'name':'SenderSignedData'});
@@ -1 +1 @@
1
- import{bcs}from'@mysten/bcs';import{Address,AppId,Argument,CallArg,Command,CompressedSignature,GasData,Intent,IntentMessage,IntentScope,IntentVersion,MultiSig,MultiSigPkMap,MultiSigPublicKey,ObjectArg,ObjectDigest,Owner,PasskeyAuthenticator,ProgrammableMoveCall,ProgrammableTransaction,PublicKey,SenderSignedData,SenderSignedTransaction,SharedObjectRef,StructTag,SuiObjectRef,TransactionData,TransactionDataV1,TransactionExpiration,TransactionKind,TypeTag}from'./bcs.js';import{TransactionEffects}from'./effects.js';export{TypeTagSerializer}from'./type-tag-serializer.js';export{BcsType,BcsStruct,BcsEnum,BcsTuple}from'@mysten/bcs';const suiBcs={...bcs,'U8':bcs['u8'](),'U16':bcs['u16'](),'U32':bcs['u32'](),'U64':bcs['u64'](),'U128':bcs['u128'](),'U256':bcs['u256'](),'ULEB128':bcs['uleb128'](),'Bool':bcs['bool'](),'String':bcs['string'](),'Address':Address,'AppId':AppId,'Argument':Argument,'CallArg':CallArg,'Command':Command,'CompressedSignature':CompressedSignature,'GasData':GasData,'Intent':Intent,'IntentMessage':IntentMessage,'IntentScope':IntentScope,'IntentVersion':IntentVersion,'MultiSig':MultiSig,'MultiSigPkMap':MultiSigPkMap,'MultiSigPublicKey':MultiSigPublicKey,'ObjectArg':ObjectArg,'ObjectDigest':ObjectDigest,'Owner':Owner,'PasskeyAuthenticator':PasskeyAuthenticator,'ProgrammableMoveCall':ProgrammableMoveCall,'ProgrammableTransaction':ProgrammableTransaction,'PublicKey':PublicKey,'SenderSignedData':SenderSignedData,'SenderSignedTransaction':SenderSignedTransaction,'SharedObjectRef':SharedObjectRef,'StructTag':StructTag,'SuiObjectRef':SuiObjectRef,'TransactionData':TransactionData,'TransactionDataV1':TransactionDataV1,'TransactionEffects':TransactionEffects,'TransactionExpiration':TransactionExpiration,'TransactionKind':TransactionKind,'TypeTag':TypeTag};export{pureBcsSchemaFromTypeName}from'./pure.js';export{suiBcs as bcs};
1
+ import{bcs}from'@mysten/bcs';import{Address,AppId,Argument,CallArg,Command,CompressedSignature,GasData,Intent,IntentMessage,IntentScope,IntentVersion,MultiSig,MultiSigPkMap,MultiSigPublicKey,ObjectArg,ObjectDigest,Owner,ProgrammableMoveCall,ProgrammableTransaction,PublicKey,SenderSignedData,SenderSignedTransaction,SharedObjectRef,StructTag,SuiObjectRef,TransactionData,TransactionDataV1,TransactionExpiration,TransactionKind,TypeTag}from'./bcs.js';import{TransactionEffects}from'./effects.js';export{TypeTagSerializer}from'./type-tag-serializer.js';export{BcsType,BcsStruct,BcsEnum,BcsTuple}from'@mysten/bcs';const suiBcs={...bcs,'U8':bcs['u8'](),'U16':bcs['u16'](),'U32':bcs['u32'](),'U64':bcs['u64'](),'U128':bcs['u128'](),'U256':bcs['u256'](),'ULEB128':bcs['uleb128'](),'Bool':bcs['bool'](),'String':bcs['string'](),'Address':Address,'AppId':AppId,'Argument':Argument,'CallArg':CallArg,'Command':Command,'CompressedSignature':CompressedSignature,'GasData':GasData,'Intent':Intent,'IntentMessage':IntentMessage,'IntentScope':IntentScope,'IntentVersion':IntentVersion,'MultiSig':MultiSig,'MultiSigPkMap':MultiSigPkMap,'MultiSigPublicKey':MultiSigPublicKey,'ObjectArg':ObjectArg,'ObjectDigest':ObjectDigest,'Owner':Owner,'ProgrammableMoveCall':ProgrammableMoveCall,'ProgrammableTransaction':ProgrammableTransaction,'PublicKey':PublicKey,'SenderSignedData':SenderSignedData,'SenderSignedTransaction':SenderSignedTransaction,'SharedObjectRef':SharedObjectRef,'StructTag':StructTag,'SuiObjectRef':SuiObjectRef,'TransactionData':TransactionData,'TransactionDataV1':TransactionDataV1,'TransactionEffects':TransactionEffects,'TransactionExpiration':TransactionExpiration,'TransactionKind':TransactionKind,'TypeTag':TypeTag};export{pureBcsSchemaFromTypeName}from'./pure.js';export{suiBcs as bcs};
@@ -3,5 +3,5 @@ export { SIGNATURE_SCHEME_TO_FLAG, SIGNATURE_SCHEME_TO_SIZE, SIGNATURE_FLAG_TO_S
3
3
  export { isValidHardenedPath, isValidBIP32Path, mnemonicToSeed, mnemonicToSeedHex, } from "./mnemonics.js";
4
4
  export { messageWithIntent } from "./intent.js";
5
5
  export type { IntentScope } from "./intent.js";
6
- export { PRIVATE_KEY_SIZE, LEGACY_PRIVATE_KEY_SIZE, W_PRIVATE_KEY_PREFIX, type ParsedKeypair, type SignatureWithBytes, Signer, Keypair, decodeWowPrivateKey, encodeWowPrivateKey, } from "./keypair.js";
6
+ export { PRIVATE_KEY_SIZE, FALCON512_PRIVATE_KEY_SIZE, W_PRIVATE_KEY_PREFIX, type ParsedKeypair, type SignatureWithBytes, Signer, Keypair, decodeWowPrivateKey, encodeWowPrivateKey, } from "./keypair.js";
7
7
  export { PublicKey } from "./publickey.js";
@@ -1 +1 @@
1
- export{toSerializedSignature,parseSerializedSignature}from'./signature.js';export{SIGNATURE_SCHEME_TO_FLAG,SIGNATURE_SCHEME_TO_SIZE,SIGNATURE_FLAG_TO_SCHEME}from'./signature-scheme.js';export{isValidHardenedPath,isValidBIP32Path,mnemonicToSeed,mnemonicToSeedHex}from'./mnemonics.js';export{messageWithIntent}from'./intent.js';export{PRIVATE_KEY_SIZE,LEGACY_PRIVATE_KEY_SIZE,W_PRIVATE_KEY_PREFIX,Signer,Keypair,decodeWowPrivateKey,encodeWowPrivateKey}from'./keypair.js';export{PublicKey}from'./publickey.js';
1
+ export{toSerializedSignature,parseSerializedSignature}from'./signature.js';export{SIGNATURE_SCHEME_TO_FLAG,SIGNATURE_SCHEME_TO_SIZE,SIGNATURE_FLAG_TO_SCHEME}from'./signature-scheme.js';export{isValidHardenedPath,isValidBIP32Path,mnemonicToSeed,mnemonicToSeedHex}from'./mnemonics.js';export{messageWithIntent}from'./intent.js';export{PRIVATE_KEY_SIZE,FALCON512_PRIVATE_KEY_SIZE,W_PRIVATE_KEY_PREFIX,Signer,Keypair,decodeWowPrivateKey,encodeWowPrivateKey}from'./keypair.js';export{PublicKey}from'./publickey.js';
@@ -1 +1 @@
1
- import{bcs}from'../bcs/index.js';export function messageWithIntent(a,b){return bcs['IntentMessage'](bcs['bytes'](b['length']))['serialize']({'intent':{'scope':{[a]:!![]},'version':{'V0':!![]},'appId':{'Sui':!![]}},'value':b})['toBytes']();}
1
+ import{bcs}from'../bcs/index.js';export function messageWithIntent(a,b){return bcs['IntentMessage'](bcs['bytes'](b['length']))['serialize']({'intent':{'scope':{[a]:!![]},'version':{'V0':!![]},'appId':{'Wow':!![]}},'value':b})['toBytes']();}
@@ -3,8 +3,8 @@ import type { PublicKey } from "./publickey.js";
3
3
  import type { SignatureScheme } from "./signature-scheme.js";
4
4
  import type { Transaction } from "../transactions/Transaction.js";
5
5
  import type { ClientWithCoreApi, Experimental_SuiClientTypes } from "../experimental/index.js";
6
- export declare const PRIVATE_KEY_SIZE = 32;
7
- export declare const LEGACY_PRIVATE_KEY_SIZE = 64;
6
+ export declare const FALCON512_PRIVATE_KEY_SIZE = 1281;
7
+ export declare const PRIVATE_KEY_SIZE = 1281;
8
8
  export declare const W_PRIVATE_KEY_PREFIX = "wowprivkey";
9
9
  export type ParsedKeypair = {
10
10
  scheme: SignatureScheme;
@@ -1 +1 @@
1
- import{bcs,toBase64}from'@mysten/bcs';import{blake2b}from'@noble/hashes/blake2b';import{bech32}from'@scure/base';import{messageWithIntent}from'./intent.js';import{SIGNATURE_FLAG_TO_SCHEME,SIGNATURE_SCHEME_TO_FLAG}from'./signature-scheme.js';import{toSerializedSignature}from'./signature.js';export const PRIVATE_KEY_SIZE=0x20;export const LEGACY_PRIVATE_KEY_SIZE=0x40;export const W_PRIVATE_KEY_PREFIX='wowprivkey';export class Signer{async['signWithIntent'](a,b){const c=messageWithIntent(b,a),d=blake2b(c,{'dkLen':0x20}),e=toSerializedSignature({'signature':await this['sign'](d),'signatureScheme':this['getKeyScheme'](),'publicKey':this['getPublicKey']()});return{'signature':e,'bytes':toBase64(a)};}async['signTransaction'](a){return this['signWithIntent'](a,'TransactionData');}async['signPersonalMessage'](a){const {signature:b}=await this['signWithIntent'](bcs['byteVector']()['serialize'](a)['toBytes'](),'PersonalMessage');return{'bytes':toBase64(a),'signature':b};}async['signAndExecuteTransaction']({transaction:a,client:b}){const c=await a['build']({'client':b}),{signature:d}=await this['signTransaction'](c),e=await b['core']['executeTransaction']({'transaction':c,'signatures':[d]});return e['transaction'];}['toWowAddress'](){return this['getPublicKey']()['toWAddress']();}['toWAddress'](){return this['toWowAddress']();}}export class Keypair extends Signer{}export function decodeWowPrivateKey(a){const {prefix:b,words:c}=bech32['decode'](a);if(b!==W_PRIVATE_KEY_PREFIX)throw new Error('invalid\x20private\x20key\x20prefix');const d=new Uint8Array(bech32['fromWords'](c)),e=d['slice'](0x1),f=SIGNATURE_FLAG_TO_SCHEME[d[0x0]];return{'scheme':f,'secretKey':e};}export function encodeWowPrivateKey(a,b){if(a['length']!==PRIVATE_KEY_SIZE)throw new Error('Invalid\x20bytes\x20length');const c=SIGNATURE_SCHEME_TO_FLAG[b],d=new Uint8Array(a['length']+0x1);return d['set']([c]),d['set'](a,0x1),bech32['encode'](W_PRIVATE_KEY_PREFIX,bech32['toWords'](d));}
1
+ import{bcs,toBase64}from'@mysten/bcs';import{blake2b}from'@noble/hashes/blake2b';import{bech32}from'@scure/base';import{messageWithIntent}from'./intent.js';import{SIGNATURE_FLAG_TO_SCHEME,SIGNATURE_SCHEME_TO_FLAG}from'./signature-scheme.js';import{toSerializedSignature}from'./signature.js';export const FALCON512_PRIVATE_KEY_SIZE=0x501;export const PRIVATE_KEY_SIZE=FALCON512_PRIVATE_KEY_SIZE;export const W_PRIVATE_KEY_PREFIX='wowprivkey';export class Signer{async['signWithIntent'](a,b){const c=messageWithIntent(b,a),d=blake2b(c,{'dkLen':0x20}),e=toSerializedSignature({'signature':await this['sign'](d),'signatureScheme':this['getKeyScheme'](),'publicKey':this['getPublicKey']()});return{'signature':e,'bytes':toBase64(a)};}async['signTransaction'](a){return this['signWithIntent'](a,'TransactionData');}async['signPersonalMessage'](a){const {signature:b}=await this['signWithIntent'](bcs['byteVector']()['serialize'](a)['toBytes'](),'PersonalMessage');return{'bytes':toBase64(a),'signature':b};}async['signAndExecuteTransaction']({transaction:a,client:b}){const c=await a['build']({'client':b}),{signature:d}=await this['signTransaction'](c),e=await b['core']['executeTransaction']({'transaction':c,'signatures':[d]});return e['transaction'];}['toWowAddress'](){return this['getPublicKey']()['toWAddress']();}['toWAddress'](){return this['toWowAddress']();}}export class Keypair extends Signer{}export function decodeWowPrivateKey(a){const {prefix:b,words:c}=bech32['decode'](a,![]);if(b!==W_PRIVATE_KEY_PREFIX)throw new Error('invalid\x20private\x20key\x20prefix');const d=new Uint8Array(bech32['fromWords'](c)),e=d['slice'](0x1),f=SIGNATURE_FLAG_TO_SCHEME[d[0x0]];if(f!=='Falcon512')throw new Error('Unsupported\x20signature\x20scheme:\x20'+f+'.\x20Only\x20Falcon512\x20is\x20supported.');return{'scheme':f,'secretKey':e};}export function encodeWowPrivateKey(a,b){if(b!=='Falcon512')throw new Error('Unsupported\x20signature\x20scheme:\x20'+b+'.\x20Only\x20Falcon512\x20is\x20supported.');if(a['length']!==FALCON512_PRIVATE_KEY_SIZE)throw new Error('Invalid\x20bytes\x20length.\x20Expected\x20'+FALCON512_PRIVATE_KEY_SIZE+'\x20bytes\x20for\x20'+b+',\x20got\x20'+a['length']);const c=SIGNATURE_SCHEME_TO_FLAG[b],d=new Uint8Array(a['length']+0x1);return d['set']([c]),d['set'](a,0x1),bech32['encode'](W_PRIVATE_KEY_PREFIX,bech32['toWords'](d),![]);}
@@ -18,7 +18,7 @@ export declare abstract class PublicKey {
18
18
  }
19
19
  export declare function parseSerializedKeypairSignature(serializedSignature: string): {
20
20
  serializedSignature: string;
21
- signatureScheme: "ED25519" | "Secp256k1" | "Secp256r1";
21
+ signatureScheme: "Falcon512" | "MultiSig";
22
22
  signature: Uint8Array<ArrayBuffer>;
23
23
  publicKey: Uint8Array<ArrayBuffer>;
24
24
  bytes: Uint8Array<ArrayBuffer>;
@@ -1 +1 @@
1
- import{fromBase64,toBase64}from'@mysten/bcs';import{blake2b}from'@noble/hashes/blake2b';import{bytesToHex}from'@noble/hashes/utils';import{bcs}from'../bcs/index.js';import{normalizeWowAddress,WOW_ADDRESS_LENGTH}from'../utils/sui-types.js';import{messageWithIntent}from'./intent.js';import{SIGNATURE_FLAG_TO_SCHEME,SIGNATURE_SCHEME_TO_SIZE}from'./signature-scheme.js';export function bytesEqual(c,d){if(c===d)return!![];if(c['length']!==d['length'])return![];for(let e=0x0;e<c['length'];e++){if(c[e]!==d[e])return![];}return!![];}export class PublicKey{['equals'](a){return bytesEqual(this['toRawBytes'](),a['toRawBytes']());}['toBase64'](){return toBase64(this['toRawBytes']());}['toString'](){throw new Error('`toString`\x20is\x20not\x20implemented\x20on\x20public\x20keys.\x20Use\x20`toBase64()`\x20or\x20`toRawBytes()`\x20instead.');}['toWPublicKey'](){const a=this['toWBytes']();return toBase64(a);}['verifyWithIntent'](a,b,c){const d=messageWithIntent(c,a),e=blake2b(d,{'dkLen':0x20});return this['verify'](e,b);}['verifyPersonalMessage'](a,b){return this['verifyWithIntent'](bcs['byteVector']()['serialize'](a)['toBytes'](),b,'PersonalMessage');}['verifyTransaction'](a,b){return this['verifyWithIntent'](a,b,'TransactionData');}['verifyAddress'](a){return this['toWAddress']()===a;}['toWBytes'](){const a=this['toRawBytes'](),b=new Uint8Array(a['length']+0x1);return b['set']([this['flag']()]),b['set'](a,0x1),b;}['toWAddress'](){return normalizeWowAddress(bytesToHex(blake2b(this['toWBytes'](),{'dkLen':0x20}))['slice'](0x0,WOW_ADDRESS_LENGTH*0x2));}}export function parseSerializedKeypairSignature(a){const b=fromBase64(a),c=SIGNATURE_FLAG_TO_SCHEME[b[0x0]];switch(c){case'ED25519':case'Secp256k1':case'Secp256r1':const d=SIGNATURE_SCHEME_TO_SIZE[c],e=b['slice'](0x1,b['length']-d),f=b['slice'](0x1+e['length']);return{'serializedSignature':a,'signatureScheme':c,'signature':e,'publicKey':f,'bytes':b};default:throw new Error('Unsupported\x20signature\x20scheme');}}
1
+ import{fromBase64,toBase64}from'@mysten/bcs';import{blake2b}from'@noble/hashes/blake2b';import{bytesToHex}from'@noble/hashes/utils';import{bcs}from'../bcs/index.js';import{normalizeWowAddress,WOW_ADDRESS_LENGTH}from'../utils/sui-types.js';import{messageWithIntent}from'./intent.js';import{SIGNATURE_FLAG_TO_SCHEME,SIGNATURE_SCHEME_TO_SIZE}from'./signature-scheme.js';export function bytesEqual(c,d){if(c===d)return!![];if(c['length']!==d['length'])return![];for(let e=0x0;e<c['length'];e++){if(c[e]!==d[e])return![];}return!![];}export class PublicKey{['equals'](a){return bytesEqual(this['toRawBytes'](),a['toRawBytes']());}['toBase64'](){return toBase64(this['toRawBytes']());}['toString'](){throw new Error('`toString`\x20is\x20not\x20implemented\x20on\x20public\x20keys.\x20Use\x20`toBase64()`\x20or\x20`toRawBytes()`\x20instead.');}['toWPublicKey'](){const a=this['toWBytes']();return toBase64(a);}['verifyWithIntent'](a,b,c){const d=messageWithIntent(c,a),e=blake2b(d,{'dkLen':0x20});return this['verify'](e,b);}['verifyPersonalMessage'](a,b){return this['verifyWithIntent'](bcs['byteVector']()['serialize'](a)['toBytes'](),b,'PersonalMessage');}['verifyTransaction'](a,b){return this['verifyWithIntent'](a,b,'TransactionData');}['verifyAddress'](a){return this['toWAddress']()===a;}['toWBytes'](){const a=this['toRawBytes'](),b=new Uint8Array(a['length']+0x1);return b['set']([this['flag']()]),b['set'](a,0x1),b;}['toWAddress'](){return normalizeWowAddress(bytesToHex(blake2b(this['toWBytes'](),{'dkLen':0x20}))['slice'](0x0,WOW_ADDRESS_LENGTH*0x2));}}export function parseSerializedKeypairSignature(a){const b=fromBase64(a),c=SIGNATURE_FLAG_TO_SCHEME[b[0x0]];switch(c){case'MultiSig':case'Falcon512':const d=SIGNATURE_SCHEME_TO_SIZE[c],e=b['slice'](0x1,b['length']-d),f=b['slice'](0x1+e['length']);return{'serializedSignature':a,'signatureScheme':c,'signature':e,'publicKey':f,'bytes':b};default:throw new Error('Unsupported\x20signature\x20scheme');}}
@@ -1,24 +1,13 @@
1
1
  export declare const SIGNATURE_SCHEME_TO_FLAG: {
2
- readonly ED25519: 0;
3
- readonly Secp256k1: 1;
4
- readonly Secp256r1: 2;
5
2
  readonly MultiSig: 3;
6
- readonly ZkLogin: 5;
7
- readonly Passkey: 6;
3
+ readonly Falcon512: 7;
8
4
  };
9
5
  export declare const SIGNATURE_SCHEME_TO_SIZE: {
10
- ED25519: number;
11
- Secp256k1: number;
12
- Secp256r1: number;
13
- Passkey: number;
6
+ Falcon512: number;
14
7
  };
15
8
  export declare const SIGNATURE_FLAG_TO_SCHEME: {
16
- readonly 0: "ED25519";
17
- readonly 1: "Secp256k1";
18
- readonly 2: "Secp256r1";
19
9
  readonly 3: "MultiSig";
20
- readonly 5: "ZkLogin";
21
- readonly 6: "Passkey";
10
+ readonly 7: "Falcon512";
22
11
  };
23
- export type SignatureScheme = "ED25519" | "Secp256k1" | "Secp256r1" | "MultiSig" | "ZkLogin" | "Passkey";
12
+ export type SignatureScheme = "MultiSig" | "Falcon512";
24
13
  export type SignatureFlag = keyof typeof SIGNATURE_FLAG_TO_SCHEME;
@@ -1 +1 @@
1
- export const SIGNATURE_SCHEME_TO_FLAG={'ED25519':0x0,'Secp256k1':0x1,'Secp256r1':0x2,'MultiSig':0x3,'ZkLogin':0x5,'Passkey':0x6};export const SIGNATURE_SCHEME_TO_SIZE={'ED25519':0x20,'Secp256k1':0x21,'Secp256r1':0x21,'Passkey':0x21};export const SIGNATURE_FLAG_TO_SCHEME={0x0:'ED25519',0x1:'Secp256k1',0x2:'Secp256r1',0x3:'MultiSig',0x5:'ZkLogin',0x6:'Passkey'};
1
+ export const SIGNATURE_SCHEME_TO_FLAG={'MultiSig':0x3,'Falcon512':0x7};export const SIGNATURE_SCHEME_TO_SIZE={'Falcon512':0x381};export const SIGNATURE_FLAG_TO_SCHEME={0x3:'MultiSig',0x7:'Falcon512'};
@@ -8,18 +8,10 @@ export type SerializeSignatureInput = {
8
8
  export declare function toSerializedSignature({ signature, signatureScheme, publicKey, }: SerializeSignatureInput): string;
9
9
  export declare function parseSerializedSignature(serializedSignature: string): {
10
10
  serializedSignature: string;
11
- signatureScheme: "ED25519" | "Secp256k1" | "Secp256r1";
11
+ signatureScheme: "Falcon512" | "MultiSig";
12
12
  signature: Uint8Array<ArrayBuffer>;
13
13
  publicKey: Uint8Array<ArrayBuffer>;
14
14
  bytes: Uint8Array<ArrayBuffer>;
15
- } | {
16
- signatureScheme: "Passkey";
17
- serializedSignature: string;
18
- signature: Uint8Array<ArrayBufferLike>;
19
- authenticatorData: Uint8Array<ArrayBufferLike>;
20
- clientDataJson: string;
21
- userSignature: Uint8Array<ArrayBuffer>;
22
- publicKey: Uint8Array<ArrayBuffer>;
23
15
  } | {
24
16
  serializedSignature: string;
25
17
  signatureScheme: "MultiSig";
@@ -1 +1 @@
1
- import{fromBase64,toBase64}from'@mysten/bcs';import{bcs}from'../bcs/index.js';import{parseSerializedPasskeySignature}from'../keypairs/passkey/publickey.js';import{parseSerializedKeypairSignature}from'./publickey.js';import{SIGNATURE_FLAG_TO_SCHEME,SIGNATURE_SCHEME_TO_FLAG}from'./signature-scheme.js';export function toSerializedSignature({signature:a,signatureScheme:b,publicKey:c}){if(!c)throw new Error('`publicKey`\x20is\x20required');const d=c['toRawBytes'](),e=new Uint8Array(0x1+a['length']+d['length']);return e['set']([SIGNATURE_SCHEME_TO_FLAG[b]]),e['set'](a,0x1),e['set'](d,0x1+a['length']),toBase64(e);}export function parseSerializedSignature(a){const b=fromBase64(a),c=SIGNATURE_FLAG_TO_SCHEME[b[0x0]];switch(c){case'Passkey':return parseSerializedPasskeySignature(a);case'MultiSig':const d=bcs['MultiSig']['parse'](b['slice'](0x1));return{'serializedSignature':a,'signatureScheme':c,'multisig':d,'bytes':b,'signature':undefined};case'ZkLogin':throw new Error('ZkLogin\x20signature\x20scheme\x20is\x20not\x20supported');case'ED25519':case'Secp256k1':case'Secp256r1':return parseSerializedKeypairSignature(a);default:throw new Error('Unsupported\x20signature\x20scheme');}}
1
+ import{fromBase64,toBase64}from'@mysten/bcs';import{bcs}from'../bcs/index.js';import{parseSerializedKeypairSignature}from'./publickey.js';import{SIGNATURE_FLAG_TO_SCHEME,SIGNATURE_SCHEME_TO_FLAG}from'./signature-scheme.js';export function toSerializedSignature({signature:a,signatureScheme:b,publicKey:c}){if(!c)throw new Error('`publicKey`\x20is\x20required');const d=c['toRawBytes'](),e=new Uint8Array(0x1+a['length']+d['length']);return e['set']([SIGNATURE_SCHEME_TO_FLAG[b]]),e['set'](a,0x1),e['set'](d,0x1+a['length']),toBase64(e);}export function parseSerializedSignature(a){const b=fromBase64(a),c=SIGNATURE_FLAG_TO_SCHEME[b[0x0]];switch(c){case'MultiSig':const d=bcs['MultiSig']['parse'](b['slice'](0x1));return{'serializedSignature':a,'signatureScheme':'MultiSig','multisig':d,'bytes':b,'signature':undefined};case'Falcon512':return parseSerializedKeypairSignature(a);default:throw new Error('Unsupported\x20signature\x20scheme');}}