@layerzerolabs/protocol-stellar-v2 0.2.12 → 0.2.15

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 (319) hide show
  1. package/.turbo/turbo-build.log +384 -278
  2. package/.turbo/turbo-lint.log +110 -78
  3. package/.turbo/turbo-test.log +1248 -1014
  4. package/Cargo.lock +130 -3
  5. package/Cargo.toml +2 -1
  6. package/contracts/common-macros/src/contract_impl.rs +6 -1
  7. package/contracts/common-macros/src/lib.rs +47 -8
  8. package/contracts/common-macros/src/ownable.rs +7 -25
  9. package/contracts/common-macros/src/storage.rs +1 -1
  10. package/contracts/common-macros/src/tests/contract_impl.rs +5 -0
  11. package/contracts/common-macros/src/tests/mod.rs +1 -0
  12. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__contract_impl__snapshot_generated_contract_impl_code.snap +23 -7
  13. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ownable__snapshot_generated_ownable_code.snap +5 -25
  14. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__storage__snapshot_generated_storage_code.snap +48 -48
  15. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ttl_configurable__snapshot_generated_ttl_configurable_code.snap +5 -25
  16. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__upgradeable__snapshot_generated_upgradeable_code.snap +21 -0
  17. package/contracts/common-macros/src/tests/upgradeable.rs +31 -0
  18. package/contracts/common-macros/src/ttl_configurable.rs +14 -44
  19. package/contracts/common-macros/src/upgradeable.rs +76 -0
  20. package/contracts/endpoint-v2/src/endpoint_v2.rs +25 -1
  21. package/contracts/endpoint-v2/src/tests/endpoint_setup.rs +175 -8
  22. package/contracts/endpoint-v2/src/tests/endpoint_v2/build_outbound_packet.rs +76 -0
  23. package/contracts/endpoint-v2/src/tests/endpoint_v2/clear.rs +342 -159
  24. package/contracts/endpoint-v2/src/tests/endpoint_v2/delegate.rs +3 -15
  25. package/contracts/endpoint-v2/src/tests/endpoint_v2/initializable.rs +20 -31
  26. package/contracts/endpoint-v2/src/tests/endpoint_v2/lz_receive_alert.rs +126 -164
  27. package/contracts/endpoint-v2/src/tests/endpoint_v2/mod.rs +1 -0
  28. package/contracts/endpoint-v2/src/tests/endpoint_v2/native_token.rs +0 -1
  29. package/contracts/endpoint-v2/src/tests/endpoint_v2/owner.rs +0 -1
  30. package/contracts/endpoint-v2/src/tests/endpoint_v2/pay_messaging_fees.rs +311 -304
  31. package/contracts/endpoint-v2/src/tests/endpoint_v2/quote.rs +423 -96
  32. package/contracts/endpoint-v2/src/tests/endpoint_v2/recover_token.rs +1 -1
  33. package/contracts/endpoint-v2/src/tests/endpoint_v2/require_oapp_auth.rs +47 -20
  34. package/contracts/endpoint-v2/src/tests/endpoint_v2/send.rs +373 -403
  35. package/contracts/endpoint-v2/src/tests/endpoint_v2/set_delegate.rs +96 -22
  36. package/contracts/endpoint-v2/src/tests/endpoint_v2/set_zro.rs +61 -9
  37. package/contracts/endpoint-v2/src/tests/endpoint_v2/transfer_ownership.rs +4 -4
  38. package/contracts/endpoint-v2/src/tests/endpoint_v2/ttl_config.rs +8 -11
  39. package/contracts/endpoint-v2/src/tests/endpoint_v2/verifiable.rs +81 -30
  40. package/contracts/endpoint-v2/src/tests/endpoint_v2/verify.rs +209 -76
  41. package/contracts/endpoint-v2/src/tests/endpoint_v2/zro.rs +0 -1
  42. package/contracts/endpoint-v2/src/tests/message_lib_manager/default_receive_library.rs +24 -0
  43. package/contracts/endpoint-v2/src/tests/message_lib_manager/default_receive_library_timeout.rs +40 -0
  44. package/contracts/endpoint-v2/src/tests/message_lib_manager/default_send_library.rs +24 -0
  45. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_config.rs +108 -0
  46. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_library_index.rs +52 -0
  47. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_receive_library.rs +92 -0
  48. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_registered_libraries.rs +74 -0
  49. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_send_library.rs +83 -0
  50. package/contracts/endpoint-v2/src/tests/message_lib_manager/is_registered_library.rs +32 -0
  51. package/contracts/endpoint-v2/src/tests/message_lib_manager/is_supported_eid.rs +28 -0
  52. package/contracts/endpoint-v2/src/tests/message_lib_manager/is_valid_receive_library.rs +261 -0
  53. package/contracts/endpoint-v2/src/tests/message_lib_manager/mod.rs +16 -0
  54. package/contracts/endpoint-v2/src/tests/message_lib_manager/receive_library_timeout.rs +62 -0
  55. package/contracts/endpoint-v2/src/tests/message_lib_manager/register_library.rs +65 -43
  56. package/contracts/endpoint-v2/src/tests/message_lib_manager/registered_libraries_count.rs +42 -0
  57. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_receive_lib_for_eid.rs +61 -0
  58. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_registered.rs +3 -5
  59. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_send_lib_for_eid.rs +59 -0
  60. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_supported_eid.rs +15 -1
  61. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_config.rs +155 -51
  62. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_default_receive_lib_timeout.rs +114 -92
  63. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_default_receive_library.rs +235 -132
  64. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_default_send_library.rs +93 -87
  65. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_receive_library.rs +346 -245
  66. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_receive_library_timeout.rs +406 -60
  67. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_send_library.rs +252 -78
  68. package/contracts/endpoint-v2/src/tests/message_lib_manager/timeout.rs +102 -0
  69. package/contracts/endpoint-v2/src/tests/messaging_channel/burn.rs +212 -273
  70. package/contracts/endpoint-v2/src/tests/messaging_channel/clear_payload.rs +203 -0
  71. package/contracts/endpoint-v2/src/tests/messaging_channel/inbound.rs +94 -0
  72. package/contracts/endpoint-v2/src/tests/messaging_channel/inbound_nonce.rs +78 -248
  73. package/contracts/endpoint-v2/src/tests/messaging_channel/inbound_payload_hash.rs +7 -282
  74. package/contracts/endpoint-v2/src/tests/messaging_channel/lazy_inbound_nonce.rs +6 -274
  75. package/contracts/endpoint-v2/src/tests/messaging_channel/mod.rs +3 -2
  76. package/contracts/endpoint-v2/src/tests/messaging_channel/next_guid.rs +86 -178
  77. package/contracts/endpoint-v2/src/tests/messaging_channel/nilify.rs +328 -212
  78. package/contracts/endpoint-v2/src/tests/messaging_channel/outbound.rs +68 -0
  79. package/contracts/endpoint-v2/src/tests/messaging_channel/outbound_nonce.rs +6 -209
  80. package/contracts/endpoint-v2/src/tests/messaging_channel/skip.rs +207 -159
  81. package/contracts/endpoint-v2/src/tests/messaging_composer/clear_compose.rs +142 -153
  82. package/contracts/endpoint-v2/src/tests/messaging_composer/compose_queue.rs +6 -179
  83. package/contracts/endpoint-v2/src/tests/messaging_composer/lz_compose_alert.rs +163 -221
  84. package/contracts/endpoint-v2/src/tests/messaging_composer/send_compose.rs +90 -121
  85. package/contracts/endpoint-v2/src/tests/mock.rs +18 -4
  86. package/contracts/endpoint-v2/src/tests/util/build_payload.rs +4 -70
  87. package/contracts/endpoint-v2/src/tests/util/compute_guid.rs +2 -1
  88. package/contracts/endpoint-v2/src/tests/util/keccak256.rs +17 -106
  89. package/contracts/layerzero-views/Cargo.toml +35 -0
  90. package/contracts/layerzero-views/src/errors.rs +10 -0
  91. package/contracts/layerzero-views/src/layerzero_view.rs +229 -0
  92. package/contracts/layerzero-views/src/lib.rs +38 -0
  93. package/contracts/layerzero-views/src/storage.rs +18 -0
  94. package/contracts/layerzero-views/src/tests/layerzero_view_tests.rs +423 -0
  95. package/contracts/layerzero-views/src/tests/mod.rs +4 -0
  96. package/contracts/layerzero-views/src/tests/setup.rs +377 -0
  97. package/contracts/layerzero-views/src/types.rs +50 -0
  98. package/contracts/macro-integration-tests/Cargo.toml +30 -0
  99. package/contracts/macro-integration-tests/src/lib.rs +1 -0
  100. package/contracts/macro-integration-tests/tests/runtime/ownable/initialization.rs +62 -0
  101. package/contracts/macro-integration-tests/tests/runtime/ownable/mod.rs +22 -0
  102. package/contracts/macro-integration-tests/tests/runtime/ownable/only_owner_guard.rs +97 -0
  103. package/contracts/macro-integration-tests/tests/runtime/ownable/ownership_transfer.rs +101 -0
  104. package/contracts/macro-integration-tests/tests/runtime/storage/keyed_roundtrip.rs +225 -0
  105. package/contracts/macro-integration-tests/tests/runtime/storage/mod.rs +4 -0
  106. package/contracts/macro-integration-tests/tests/runtime/storage/name_override_runtime.rs +52 -0
  107. package/contracts/macro-integration-tests/tests/runtime/storage/ttl_extension.rs +261 -0
  108. package/contracts/macro-integration-tests/tests/runtime/storage/unkeyed_roundtrip.rs +137 -0
  109. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/configuration.rs +113 -0
  110. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/extend_instance_ttl.rs +50 -0
  111. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/freeze.rs +139 -0
  112. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/mod.rs +3 -0
  113. package/contracts/macro-integration-tests/tests/runtime.rs +5 -0
  114. package/contracts/macro-integration-tests/tests/ui/error/fail/attr_not_empty.rs +12 -0
  115. package/contracts/macro-integration-tests/tests/ui/error/fail/attr_not_empty.stderr +7 -0
  116. package/contracts/macro-integration-tests/tests/ui/error/fail/decreasing_discriminant.rs +12 -0
  117. package/contracts/macro-integration-tests/tests/ui/error/fail/decreasing_discriminant.stderr +7 -0
  118. package/contracts/macro-integration-tests/tests/ui/error/fail/non_int_discriminant.rs +21 -0
  119. package/contracts/macro-integration-tests/tests/ui/error/fail/non_int_discriminant.stderr +7 -0
  120. package/contracts/macro-integration-tests/tests/ui/error/fail/non_unit_variant.rs +13 -0
  121. package/contracts/macro-integration-tests/tests/ui/error/fail/non_unit_variant.stderr +7 -0
  122. package/contracts/macro-integration-tests/tests/ui/error/pass/attr_on_variant_allowed.rs +20 -0
  123. package/contracts/macro-integration-tests/tests/ui/error/pass/basic_auto_discriminants.rs +15 -0
  124. package/contracts/macro-integration-tests/tests/ui/error/pass/mixed_discriminants.rs +16 -0
  125. package/contracts/macro-integration-tests/tests/ui/ownable/fail/only_owner_missing_env.rs +22 -0
  126. package/contracts/macro-integration-tests/tests/ui/ownable/fail/only_owner_missing_env.stderr +16 -0
  127. package/contracts/macro-integration-tests/tests/ui/ownable/pass/minimal_contract.rs +26 -0
  128. package/contracts/macro-integration-tests/tests/ui/ownable/pass/namespacing_and_imports.rs +22 -0
  129. package/contracts/macro-integration-tests/tests/ui/ownable/pass/only_owner_env_param_variants.rs +46 -0
  130. package/contracts/macro-integration-tests/tests/ui/storage/fail/invalid_storage_type_param.rs +13 -0
  131. package/contracts/macro-integration-tests/tests/ui/storage/fail/invalid_storage_type_param.stderr +7 -0
  132. package/contracts/macro-integration-tests/tests/ui/storage/fail/missing_storage_type_param.rs +13 -0
  133. package/contracts/macro-integration-tests/tests/ui/storage/fail/missing_storage_type_param.stderr +7 -0
  134. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_storage_kinds.rs +10 -0
  135. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_storage_kinds.stderr +7 -0
  136. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_type_params.rs +12 -0
  137. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_type_params.stderr +7 -0
  138. package/contracts/macro-integration-tests/tests/ui/storage/fail/no_ttl_extension_on_non_persistent.rs +10 -0
  139. package/contracts/macro-integration-tests/tests/ui/storage/fail/no_ttl_extension_on_non_persistent.stderr +7 -0
  140. package/contracts/macro-integration-tests/tests/ui/storage/fail/non_enum_input.rs +10 -0
  141. package/contracts/macro-integration-tests/tests/ui/storage/fail/non_enum_input.stderr +7 -0
  142. package/contracts/macro-integration-tests/tests/ui/storage/fail/storage_attr_rejects_args.rs +12 -0
  143. package/contracts/macro-integration-tests/tests/ui/storage/fail/storage_attr_rejects_args.stderr +7 -0
  144. package/contracts/macro-integration-tests/tests/ui/storage/fail/tuple_variant_rejected.rs +13 -0
  145. package/contracts/macro-integration-tests/tests/ui/storage/fail/tuple_variant_rejected.stderr +7 -0
  146. package/contracts/macro-integration-tests/tests/ui/storage/fail/unknown_variant_attr.rs +13 -0
  147. package/contracts/macro-integration-tests/tests/ui/storage/fail/unknown_variant_attr.stderr +7 -0
  148. package/contracts/macro-integration-tests/tests/ui/storage/pass/default_value_on_variant.rs +14 -0
  149. package/contracts/macro-integration-tests/tests/ui/storage/pass/enum_instance_unit_basic.rs +14 -0
  150. package/contracts/macro-integration-tests/tests/ui/storage/pass/enum_persistent_named_fields_keyed.rs +16 -0
  151. package/contracts/macro-integration-tests/tests/ui/storage/pass/enum_temporary_unit_option.rs +15 -0
  152. package/contracts/macro-integration-tests/tests/ui/storage/pass/name_override.rs +14 -0
  153. package/contracts/macro-integration-tests/tests/ui/storage/pass/no_auto_ttl_extension.rs +19 -0
  154. package/contracts/macro-integration-tests/tests/ui/storage/pass/ttl_provider_basic.rs +15 -0
  155. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/pass/minimal_contract.rs +44 -0
  156. package/contracts/macro-integration-tests/tests/ui_error.rs +11 -0
  157. package/contracts/macro-integration-tests/tests/ui_ownable.rs +11 -0
  158. package/contracts/macro-integration-tests/tests/ui_storage.rs +11 -0
  159. package/contracts/macro-integration-tests/tests/ui_ttl_configurable.rs +12 -0
  160. package/contracts/message-libs/blocked-message-lib/src/lib.rs +17 -17
  161. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/decode_packet_header.rs +64 -0
  162. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/encode_packet.rs +58 -0
  163. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/encode_packet_header.rs +138 -0
  164. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/mod.rs +6 -0
  165. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/payload.rs +30 -0
  166. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/payload_hash.rs +15 -0
  167. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/test_helper.rs +39 -0
  168. package/contracts/message-libs/message-lib-common/src/tests/worker_options/append_dvn_option.rs +57 -0
  169. package/contracts/message-libs/message-lib-common/src/tests/worker_options/append_lz_receive_option.rs +50 -0
  170. package/contracts/message-libs/message-lib-common/src/tests/worker_options/append_native_drop_option.rs +74 -0
  171. package/contracts/message-libs/message-lib-common/src/tests/worker_options/convert_legacy_options.rs +280 -0
  172. package/contracts/message-libs/message-lib-common/src/tests/worker_options/extract_type_3_options.rs +126 -0
  173. package/contracts/message-libs/message-lib-common/src/tests/worker_options/left_pad_to_bytes32.rs +48 -0
  174. package/contracts/message-libs/message-lib-common/src/tests/worker_options/mod.rs +7 -0
  175. package/contracts/message-libs/message-lib-common/src/tests/worker_options/split_worker_options.rs +139 -0
  176. package/contracts/message-libs/message-lib-common/src/worker_options.rs +31 -1
  177. package/contracts/message-libs/simple-message-lib/src/simple_message_lib.rs +2 -2
  178. package/contracts/message-libs/treasury/src/errors.rs +0 -1
  179. package/contracts/message-libs/treasury/src/lib.rs +3 -3
  180. package/contracts/message-libs/treasury/src/storage.rs +2 -0
  181. package/contracts/message-libs/treasury/src/treasury.rs +12 -13
  182. package/contracts/message-libs/uln-302/Cargo.toml +1 -1
  183. package/contracts/message-libs/uln-302/src/errors.rs +0 -5
  184. package/contracts/message-libs/uln-302/src/events.rs +5 -6
  185. package/contracts/message-libs/uln-302/src/receive_uln.rs +24 -54
  186. package/contracts/message-libs/uln-302/src/send_uln.rs +89 -135
  187. package/contracts/message-libs/uln-302/src/storage.rs +5 -5
  188. package/contracts/message-libs/uln-302/src/tests/receive_uln302/effective_receive_uln_config.rs +5 -7
  189. package/contracts/message-libs/uln-302/src/tests/receive_uln302/set_default_receive_uln_configs.rs +3 -3
  190. package/contracts/message-libs/uln-302/src/tests/send_uln302/effective_send_uln_config.rs +6 -9
  191. package/contracts/message-libs/uln-302/src/tests/send_uln302/set_default_executor_configs.rs +2 -2
  192. package/contracts/message-libs/uln-302/src/tests/send_uln302/set_default_send_uln_configs.rs +3 -3
  193. package/contracts/message-libs/uln-302/src/tests/setup.rs +9 -0
  194. package/contracts/message-libs/uln-302/src/tests/testing_utils.rs +5 -0
  195. package/contracts/message-libs/uln-302/src/tests/uln302/get_app_receive_uln_config.rs +1 -2
  196. package/contracts/message-libs/uln-302/src/tests/uln302/get_app_send_uln_config.rs +1 -2
  197. package/contracts/message-libs/uln-302/src/tests/uln302/set_config.rs +37 -55
  198. package/contracts/message-libs/uln-302/src/uln302.rs +8 -5
  199. package/contracts/oapps/counter/src/counter.rs +0 -1
  200. package/contracts/oapps/oapp/src/macro_tests/test_macros.rs +306 -224
  201. package/contracts/oapps/oapp/src/tests/test_oapp_core.rs +0 -1
  202. package/contracts/oapps/oapp/src/tests/test_oapp_options_type3.rs +0 -1
  203. package/contracts/oapps/oapp/src/tests/test_oapp_receiver.rs +0 -1
  204. package/contracts/oapps/oapp/src/tests/test_oapp_sender.rs +0 -1
  205. package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_core.rs +1 -0
  206. package/contracts/oapps/oft/integration-tests/setup.rs +10 -3
  207. package/contracts/oapps/oft/integration-tests/utils.rs +1 -1
  208. package/contracts/oapps/oft/src/default_oft_impl.rs +9 -3
  209. package/contracts/oapps/oft/src/extensions/oft_fee.rs +5 -5
  210. package/contracts/oapps/oft/src/extensions/pausable.rs +1 -1
  211. package/contracts/oapps/oft/src/extensions/rate_limiter.rs +18 -18
  212. package/contracts/oapps/oft/src/oft.rs +9 -9
  213. package/contracts/oapps/oft/src/oft_types/lock_unlock.rs +1 -1
  214. package/contracts/oapps/oft/src/tests/extensions/setup.rs +26 -11
  215. package/contracts/oapps/oft/src/tests/extensions/test_rate_limiter.rs +1 -1
  216. package/contracts/oapps/oft/src/tests/test_send.rs +4 -4
  217. package/contracts/oapps/oft/src/tests/test_utils.rs +93 -74
  218. package/contracts/oapps/oft-std/Cargo.toml +6 -0
  219. package/contracts/oapps/oft-std/integration-tests/extensions/mod.rs +3 -0
  220. package/contracts/oapps/oft-std/integration-tests/extensions/test_oft_fee.rs +157 -0
  221. package/contracts/oapps/oft-std/integration-tests/extensions/test_pausable.rs +162 -0
  222. package/contracts/oapps/oft-std/integration-tests/extensions/test_rate_limiter.rs +186 -0
  223. package/contracts/oapps/oft-std/integration-tests/mod.rs +3 -0
  224. package/contracts/oapps/oft-std/integration-tests/setup.rs +245 -0
  225. package/contracts/oapps/oft-std/integration-tests/utils.rs +427 -0
  226. package/contracts/oapps/oft-std/src/lib.rs +12 -1
  227. package/contracts/oapps/oft-std/src/oft.rs +122 -25
  228. package/contracts/upgrader/Cargo.toml +19 -0
  229. package/contracts/upgrader/src/lib.rs +96 -0
  230. package/contracts/upgrader/src/tests/mod.rs +1 -0
  231. package/contracts/upgrader/src/tests/test_data/test_upgradeable_contract1.wasm +0 -0
  232. package/contracts/upgrader/src/tests/test_data/test_upgradeable_contract2.wasm +0 -0
  233. package/contracts/upgrader/src/tests/test_upgrader.rs +120 -0
  234. package/contracts/utils/src/errors.rs +6 -1
  235. package/contracts/utils/src/lib.rs +2 -1
  236. package/contracts/utils/src/ownable.rs +49 -61
  237. package/contracts/utils/src/tests/mod.rs +3 -1
  238. package/contracts/utils/src/tests/option_ext.rs +21 -0
  239. package/contracts/utils/src/tests/ownable.rs +10 -69
  240. package/contracts/utils/src/tests/ttl_configurable.rs +596 -0
  241. package/contracts/utils/src/tests/upgradeable.rs +288 -0
  242. package/contracts/utils/src/{ttl.rs → ttl_configurable.rs} +67 -52
  243. package/contracts/utils/src/upgradeable.rs +54 -0
  244. package/contracts/workers/dvn/Cargo.toml +1 -1
  245. package/contracts/workers/dvn/src/auth.rs +21 -32
  246. package/contracts/workers/dvn/src/dvn.rs +40 -3
  247. package/contracts/workers/dvn/src/errors.rs +1 -0
  248. package/contracts/workers/dvn/src/multisig.rs +10 -6
  249. package/contracts/workers/dvn/src/tests/multisig/set_threshold.rs +2 -2
  250. package/contracts/workers/dvn/src/tests/multisig/verify_signatures.rs +4 -4
  251. package/contracts/workers/dvn-fee-lib/Cargo.toml +1 -2
  252. package/contracts/workers/dvn-fee-lib/src/dvn_fee_lib.rs +46 -14
  253. package/contracts/workers/dvn-fee-lib/src/errors.rs +3 -2
  254. package/contracts/workers/dvn-fee-lib/src/lib.rs +5 -11
  255. package/contracts/workers/dvn-fee-lib/src/tests/dvn_fee_lib.rs +30 -16
  256. package/contracts/workers/executor/src/executor.rs +16 -2
  257. package/contracts/workers/executor-fee-lib/src/errors.rs +9 -7
  258. package/contracts/workers/executor-fee-lib/src/executor_fee_lib.rs +154 -119
  259. package/contracts/workers/executor-helper/Cargo.toml +0 -5
  260. package/contracts/workers/executor-helper/src/lib.rs +1 -7
  261. package/contracts/workers/price-feed/Cargo.toml +0 -1
  262. package/contracts/workers/price-feed/src/errors.rs +3 -2
  263. package/contracts/workers/price-feed/src/lib.rs +5 -6
  264. package/contracts/workers/price-feed/src/price_feed.rs +39 -17
  265. package/contracts/workers/worker/Cargo.toml +4 -0
  266. package/contracts/workers/worker/src/interfaces/price_feed.rs +3 -3
  267. package/contracts/workers/worker/src/lib.rs +2 -2
  268. package/contracts/workers/worker/src/tests/mod.rs +4 -0
  269. package/contracts/workers/worker/src/tests/setup.rs +147 -0
  270. package/contracts/workers/worker/src/tests/worker.rs +501 -0
  271. package/contracts/workers/worker/src/worker.rs +10 -16
  272. package/package.json +3 -3
  273. package/sdk/dist/generated/bml.d.ts +40 -30
  274. package/sdk/dist/generated/bml.js +16 -11
  275. package/sdk/dist/generated/counter.d.ts +168 -134
  276. package/sdk/dist/generated/counter.js +26 -21
  277. package/sdk/dist/generated/dvn.d.ts +1932 -0
  278. package/sdk/dist/generated/dvn.js +288 -0
  279. package/sdk/dist/generated/dvn_fee_lib.d.ts +615 -0
  280. package/sdk/dist/generated/dvn_fee_lib.js +123 -0
  281. package/sdk/dist/generated/endpoint.d.ts +75 -41
  282. package/sdk/dist/generated/endpoint.js +22 -17
  283. package/sdk/dist/generated/executor.d.ts +1809 -0
  284. package/sdk/dist/generated/executor.js +269 -0
  285. package/sdk/dist/generated/executor_fee_lib.d.ts +999 -0
  286. package/sdk/dist/generated/executor_fee_lib.js +208 -0
  287. package/sdk/dist/generated/executor_helper.d.ts +869 -0
  288. package/sdk/dist/generated/executor_helper.js +187 -0
  289. package/sdk/dist/generated/oft_std.d.ts +1544 -0
  290. package/sdk/dist/generated/oft_std.js +271 -0
  291. package/sdk/dist/generated/price_feed.d.ts +1002 -0
  292. package/sdk/dist/generated/price_feed.js +170 -0
  293. package/sdk/dist/generated/sml.d.ts +75 -41
  294. package/sdk/dist/generated/sml.js +22 -17
  295. package/sdk/dist/generated/uln302.d.ts +79 -60
  296. package/sdk/dist/generated/uln302.js +37 -37
  297. package/sdk/dist/generated/upgrader.d.ts +70 -0
  298. package/sdk/dist/generated/upgrader.js +19 -0
  299. package/sdk/dist/index.d.ts +8 -0
  300. package/sdk/dist/index.js +11 -0
  301. package/sdk/package.json +4 -3
  302. package/sdk/src/index.ts +13 -0
  303. package/sdk/test/index.test.ts +0 -1
  304. package/sdk/test/oft.test.ts +12 -23
  305. package/sdk/test/suites/testUpgradeable.ts +169 -0
  306. package/sdk/test/upgrader.test.ts +309 -0
  307. package/tools/ts-bindings-gen/src/main.rs +11 -1
  308. package/contracts/endpoint-v2/src/tests/messaging_channel/clear.rs +0 -316
  309. package/contracts/endpoint-v2/src/tests/messaging_channel/internal.rs +0 -388
  310. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1.rs +0 -162
  311. package/contracts/message-libs/message-lib-common/src/tests/worker_options.rs +0 -319
  312. package/contracts/utils/src/tests/ttl.rs +0 -421
  313. /package/contracts/{oapp-macros → oapps/oapp-macros}/Cargo.toml +0 -0
  314. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/lib.rs +0 -0
  315. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_full.rs +0 -0
  316. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_options_type3.rs +0 -0
  317. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_receiver.rs +0 -0
  318. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_sender.rs +0 -0
  319. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/util.rs +0 -0
@@ -0,0 +1,1932 @@
1
+ import { Buffer } from "buffer";
2
+ import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, MethodOptions } from '@stellar/stellar-sdk/contract';
3
+ import type { u32, u64, u128, i128, Option } from '@stellar/stellar-sdk/contract';
4
+ export * from '@stellar/stellar-sdk';
5
+ export * as contract from '@stellar/stellar-sdk/contract';
6
+ export * as rpc from '@stellar/stellar-sdk/rpc';
7
+ export type MigrationData = void;
8
+ export declare const DvnError: {
9
+ 1: {
10
+ message: string;
11
+ };
12
+ 2: {
13
+ message: string;
14
+ };
15
+ 3: {
16
+ message: string;
17
+ };
18
+ 4: {
19
+ message: string;
20
+ };
21
+ 5: {
22
+ message: string;
23
+ };
24
+ 6: {
25
+ message: string;
26
+ };
27
+ 7: {
28
+ message: string;
29
+ };
30
+ 8: {
31
+ message: string;
32
+ };
33
+ 9: {
34
+ message: string;
35
+ };
36
+ 10: {
37
+ message: string;
38
+ };
39
+ 11: {
40
+ message: string;
41
+ };
42
+ 12: {
43
+ message: string;
44
+ };
45
+ 13: {
46
+ message: string;
47
+ };
48
+ 14: {
49
+ message: string;
50
+ };
51
+ };
52
+ /**
53
+ * Configuration for a destination chain.
54
+ *
55
+ * Contains fee calculation parameters specific to each destination endpoint.
56
+ */
57
+ export interface DstConfig {
58
+ /**
59
+ * Minimum fee margin in USD (scaled by native decimals rate).
60
+ */
61
+ floor_margin_usd: u128;
62
+ /**
63
+ * Gas for verification on the destination chain.
64
+ */
65
+ gas: u128;
66
+ /**
67
+ * Fee multiplier in basis points (10000 = 100%).
68
+ * If 0, the default multiplier from worker config is used.
69
+ */
70
+ multiplier_bps: u32;
71
+ }
72
+ /**
73
+ * Parameter for setting destination chain configuration.
74
+ */
75
+ export interface DstConfigParam {
76
+ /**
77
+ * The configuration for this destination.
78
+ */
79
+ config: DstConfig;
80
+ /**
81
+ * The destination endpoint ID.
82
+ */
83
+ dst_eid: u32;
84
+ }
85
+ /**
86
+ * Represents a single contract invocation for multisig authorization.
87
+ *
88
+ * Used in `hash_call_data` to compute the hash that signers sign over.
89
+ */
90
+ export interface Call {
91
+ /**
92
+ * Function arguments.
93
+ */
94
+ args: Array<any>;
95
+ /**
96
+ * Function name to invoke.
97
+ */
98
+ func: string;
99
+ /**
100
+ * Target contract address.
101
+ */
102
+ to: string;
103
+ }
104
+ /**
105
+ * Authentication data for DVN contract transactions.
106
+ *
107
+ * This struct is used with Soroban's custom account interface to authorize
108
+ * transactions through a combination of admin signature and multisig quorum.
109
+ */
110
+ export interface TransactionAuthData {
111
+ /**
112
+ * Expiration timestamp (ledger time) after which this auth is invalid.
113
+ */
114
+ expiration: u64;
115
+ /**
116
+ * Entity submitting the transaction (admin, or permissionless).
117
+ */
118
+ sender: Sender;
119
+ /**
120
+ * Signatures from multisig signers (secp256k1, 65 bytes each).
121
+ */
122
+ signatures: Array<Buffer>;
123
+ /**
124
+ * Verifier ID - must match the DVN's configured VID.
125
+ */
126
+ vid: u32;
127
+ }
128
+ export type Sender = {
129
+ tag: "None";
130
+ values: void;
131
+ } | {
132
+ tag: "Admin";
133
+ values: readonly [Buffer, Buffer];
134
+ };
135
+ export type DvnStorage = {
136
+ tag: "Signers";
137
+ values: void;
138
+ } | {
139
+ tag: "Threshold";
140
+ values: void;
141
+ } | {
142
+ tag: "Vid";
143
+ values: void;
144
+ } | {
145
+ tag: "DstConfig";
146
+ values: readonly [u32];
147
+ } | {
148
+ tag: "UsedHash";
149
+ values: readonly [Buffer];
150
+ };
151
+ export declare const EndpointError: {
152
+ 1: {
153
+ message: string;
154
+ };
155
+ 2: {
156
+ message: string;
157
+ };
158
+ 3: {
159
+ message: string;
160
+ };
161
+ 4: {
162
+ message: string;
163
+ };
164
+ 5: {
165
+ message: string;
166
+ };
167
+ 6: {
168
+ message: string;
169
+ };
170
+ 7: {
171
+ message: string;
172
+ };
173
+ 8: {
174
+ message: string;
175
+ };
176
+ 9: {
177
+ message: string;
178
+ };
179
+ 10: {
180
+ message: string;
181
+ };
182
+ 11: {
183
+ message: string;
184
+ };
185
+ 12: {
186
+ message: string;
187
+ };
188
+ 13: {
189
+ message: string;
190
+ };
191
+ 14: {
192
+ message: string;
193
+ };
194
+ 15: {
195
+ message: string;
196
+ };
197
+ 16: {
198
+ message: string;
199
+ };
200
+ 17: {
201
+ message: string;
202
+ };
203
+ 18: {
204
+ message: string;
205
+ };
206
+ 19: {
207
+ message: string;
208
+ };
209
+ 20: {
210
+ message: string;
211
+ };
212
+ 21: {
213
+ message: string;
214
+ };
215
+ 22: {
216
+ message: string;
217
+ };
218
+ 23: {
219
+ message: string;
220
+ };
221
+ 24: {
222
+ message: string;
223
+ };
224
+ };
225
+ /**
226
+ * Parameters for sending a cross-chain message.
227
+ */
228
+ export interface MessagingParams {
229
+ /**
230
+ * Destination endpoint ID (chain identifier).
231
+ */
232
+ dst_eid: u32;
233
+ /**
234
+ * The message payload to send.
235
+ */
236
+ message: Buffer;
237
+ /**
238
+ * Encoded executor and DVN options.
239
+ */
240
+ options: Buffer;
241
+ /**
242
+ * Whether to pay fees in ZRO token instead of native token.
243
+ */
244
+ pay_in_zro: boolean;
245
+ /**
246
+ * Receiver address on the destination chain (32 bytes).
247
+ */
248
+ receiver: Buffer;
249
+ }
250
+ /**
251
+ * Source message information identifying where a cross-chain message came from.
252
+ */
253
+ export interface Origin {
254
+ /**
255
+ * Nonce for this pathway.
256
+ */
257
+ nonce: u64;
258
+ /**
259
+ * Sender address on the source chain (32 bytes).
260
+ */
261
+ sender: Buffer;
262
+ /**
263
+ * Source endpoint ID (chain identifier).
264
+ */
265
+ src_eid: u32;
266
+ }
267
+ /**
268
+ * Fee structure for cross-chain messaging.
269
+ */
270
+ export interface MessagingFee {
271
+ /**
272
+ * Fee paid in native token (XLM).
273
+ */
274
+ native_fee: i128;
275
+ /**
276
+ * Fee paid in ZRO token (LayerZero token).
277
+ */
278
+ zro_fee: i128;
279
+ }
280
+ /**
281
+ * Receipt returned after successfully sending a cross-chain message.
282
+ */
283
+ export interface MessagingReceipt {
284
+ /**
285
+ * The fees charged for sending the message.
286
+ */
287
+ fee: MessagingFee;
288
+ /**
289
+ * Globally unique identifier for the message.
290
+ */
291
+ guid: Buffer;
292
+ /**
293
+ * The outbound nonce for this pathway.
294
+ */
295
+ nonce: u64;
296
+ }
297
+ /**
298
+ * Type of message library indicating supported operations.
299
+ */
300
+ export type MessageLibType = {
301
+ tag: "Send";
302
+ values: void;
303
+ } | {
304
+ tag: "Receive";
305
+ values: void;
306
+ } | {
307
+ tag: "SendAndReceive";
308
+ values: void;
309
+ };
310
+ /**
311
+ * Version information for a message library.
312
+ *
313
+ * Note: `minor` and `endpoint_version` use `u32` instead of `u8` because Stellar does not
314
+ * support `u8` types in contract interface functions.
315
+ */
316
+ export interface MessageLibVersion {
317
+ /**
318
+ * Endpoint version (should not exceed u8::MAX = 255).
319
+ */
320
+ endpoint_version: u32;
321
+ /**
322
+ * Major version number.
323
+ */
324
+ major: u64;
325
+ /**
326
+ * Minor version number (should not exceed u8::MAX = 255).
327
+ */
328
+ minor: u32;
329
+ }
330
+ /**
331
+ * Timeout configuration for receive library transitions.
332
+ */
333
+ export interface Timeout {
334
+ /**
335
+ * Unix timestamp when the timeout expires.
336
+ */
337
+ expiry: u64;
338
+ /**
339
+ * The new library address to transition to.
340
+ */
341
+ lib: string;
342
+ }
343
+ /**
344
+ * Parameters for setting message library configuration.
345
+ */
346
+ export interface SetConfigParam {
347
+ /**
348
+ * XDR-encoded configuration data.
349
+ */
350
+ config: Buffer;
351
+ /**
352
+ * The type of configuration (e.g., executor, ULN).
353
+ */
354
+ config_type: u32;
355
+ /**
356
+ * The endpoint ID this config applies to.
357
+ */
358
+ eid: u32;
359
+ }
360
+ /**
361
+ * Resolved library information with default status.
362
+ */
363
+ export interface ResolvedLibrary {
364
+ /**
365
+ * Whether this is the default library (true) or OApp-specific (false).
366
+ */
367
+ is_default: boolean;
368
+ /**
369
+ * The resolved library address.
370
+ */
371
+ lib: string;
372
+ }
373
+ /**
374
+ * Outbound packet containing all information for cross-chain transmission.
375
+ */
376
+ export interface OutboundPacket {
377
+ /**
378
+ * Destination endpoint ID.
379
+ */
380
+ dst_eid: u32;
381
+ /**
382
+ * Globally unique identifier for this message.
383
+ */
384
+ guid: Buffer;
385
+ /**
386
+ * The message payload.
387
+ */
388
+ message: Buffer;
389
+ /**
390
+ * Outbound nonce for this pathway.
391
+ */
392
+ nonce: u64;
393
+ /**
394
+ * Receiver address on destination chain (32 bytes).
395
+ */
396
+ receiver: Buffer;
397
+ /**
398
+ * Sender address on source chain.
399
+ */
400
+ sender: string;
401
+ /**
402
+ * Source endpoint ID.
403
+ */
404
+ src_eid: u32;
405
+ }
406
+ /**
407
+ * A fee recipient with the amount to be paid.
408
+ */
409
+ export interface FeeRecipient {
410
+ /**
411
+ * Amount of fee to pay.
412
+ */
413
+ amount: i128;
414
+ /**
415
+ * The address to send the fee to.
416
+ */
417
+ to: string;
418
+ }
419
+ /**
420
+ * Result of send operation containing fees and encoded packet.
421
+ */
422
+ export interface FeesAndPacket {
423
+ /**
424
+ * The encoded packet ready for transmission.
425
+ */
426
+ encoded_packet: Buffer;
427
+ /**
428
+ * List of native token fee recipients (executor, DVNs, treasury).
429
+ */
430
+ native_fee_recipients: Array<FeeRecipient>;
431
+ /**
432
+ * List of ZRO token fee recipients (treasury).
433
+ */
434
+ zro_fee_recipients: Array<FeeRecipient>;
435
+ }
436
+ export declare const PacketCodecV1Error: {
437
+ 1001: {
438
+ message: string;
439
+ };
440
+ 1002: {
441
+ message: string;
442
+ };
443
+ };
444
+ export declare const WorkerOptionsError: {
445
+ 1101: {
446
+ message: string;
447
+ };
448
+ 1102: {
449
+ message: string;
450
+ };
451
+ 1103: {
452
+ message: string;
453
+ };
454
+ 1104: {
455
+ message: string;
456
+ };
457
+ 1105: {
458
+ message: string;
459
+ };
460
+ 1106: {
461
+ message: string;
462
+ };
463
+ 1107: {
464
+ message: string;
465
+ };
466
+ 1108: {
467
+ message: string;
468
+ };
469
+ 1109: {
470
+ message: string;
471
+ };
472
+ };
473
+ export declare const BufferReaderError: {
474
+ 1000: {
475
+ message: string;
476
+ };
477
+ 1001: {
478
+ message: string;
479
+ };
480
+ };
481
+ export declare const BufferWriterError: {
482
+ 1100: {
483
+ message: string;
484
+ };
485
+ };
486
+ export declare const TtlConfigurableError: {
487
+ 1200: {
488
+ message: string;
489
+ };
490
+ 1201: {
491
+ message: string;
492
+ };
493
+ 1202: {
494
+ message: string;
495
+ };
496
+ };
497
+ export declare const OwnableError: {
498
+ 1300: {
499
+ message: string;
500
+ };
501
+ 1301: {
502
+ message: string;
503
+ };
504
+ };
505
+ export declare const BytesExtError: {
506
+ 1400: {
507
+ message: string;
508
+ };
509
+ };
510
+ export declare const UpgradeableError: {
511
+ 1500: {
512
+ message: string;
513
+ };
514
+ };
515
+ export type OwnableStorage = {
516
+ tag: "Owner";
517
+ values: void;
518
+ };
519
+ /**
520
+ * TTL configuration: threshold (when to extend) and extend_to (target TTL).
521
+ */
522
+ export interface TtlConfig {
523
+ /**
524
+ * Target TTL after extension (in ledgers).
525
+ */
526
+ extend_to: u32;
527
+ /**
528
+ * TTL threshold that triggers extension (in ledgers).
529
+ */
530
+ threshold: u32;
531
+ }
532
+ export type TtlConfigStorage = {
533
+ tag: "Frozen";
534
+ values: void;
535
+ } | {
536
+ tag: "Instance";
537
+ values: void;
538
+ } | {
539
+ tag: "Persistent";
540
+ values: void;
541
+ };
542
+ export type UpgradeableStorage = {
543
+ tag: "Migrating";
544
+ values: void;
545
+ };
546
+ export declare const WorkerError: {
547
+ 1200: {
548
+ message: string;
549
+ };
550
+ 1201: {
551
+ message: string;
552
+ };
553
+ 1202: {
554
+ message: string;
555
+ };
556
+ 1203: {
557
+ message: string;
558
+ };
559
+ 1204: {
560
+ message: string;
561
+ };
562
+ 1205: {
563
+ message: string;
564
+ };
565
+ 1206: {
566
+ message: string;
567
+ };
568
+ 1207: {
569
+ message: string;
570
+ };
571
+ 1208: {
572
+ message: string;
573
+ };
574
+ 1209: {
575
+ message: string;
576
+ };
577
+ 1210: {
578
+ message: string;
579
+ };
580
+ 1211: {
581
+ message: string;
582
+ };
583
+ 1212: {
584
+ message: string;
585
+ };
586
+ 1213: {
587
+ message: string;
588
+ };
589
+ 1214: {
590
+ message: string;
591
+ };
592
+ 1215: {
593
+ message: string;
594
+ };
595
+ 1216: {
596
+ message: string;
597
+ };
598
+ 1217: {
599
+ message: string;
600
+ };
601
+ 1218: {
602
+ message: string;
603
+ };
604
+ };
605
+ /**
606
+ * Parameters for DVN fee calculation.
607
+ *
608
+ * Contains all inputs needed by the fee library to calculate verification fees
609
+ * for cross-chain messages. Includes message parameters, common configuration,
610
+ * and destination-specific settings.
611
+ */
612
+ export interface DvnFeeParams {
613
+ /**
614
+ * Number of block confirmations required.
615
+ */
616
+ confirmations: u64;
617
+ /**
618
+ * Default fee multiplier in basis points (used if no dst-specific multiplier).
619
+ */
620
+ default_multiplier_bps: u32;
621
+ /**
622
+ * Destination endpoint ID (chain identifier).
623
+ */
624
+ dst_eid: u32;
625
+ /**
626
+ * Minimum fee margin in USD (scaled).
627
+ */
628
+ floor_margin_usd: u128;
629
+ /**
630
+ * ============================================================================================
631
+ * Destination-Specific Configuration
632
+ * ============================================================================================
633
+ * Gas estimate for verification on destination chain.
634
+ */
635
+ gas: u128;
636
+ /**
637
+ * Destination-specific fee multiplier in basis points (0 = use default).
638
+ */
639
+ multiplier_bps: u32;
640
+ /**
641
+ * DVN options
642
+ */
643
+ options: Buffer;
644
+ /**
645
+ * ============================================================================================
646
+ * Common Configuration
647
+ * ============================================================================================
648
+ * Price feed contract address for gas price and exchange rate data.
649
+ */
650
+ price_feed: string;
651
+ /**
652
+ * Number of required signatures (quorum).
653
+ */
654
+ quorum: u32;
655
+ /**
656
+ * ============================================================================================
657
+ * Message Parameters
658
+ * ============================================================================================
659
+ * The OApp sender address.
660
+ */
661
+ sender: string;
662
+ }
663
+ /**
664
+ * Parameters for executor fee calculation.
665
+ *
666
+ * Contains all inputs needed by the fee library to calculate execution fees
667
+ * for cross-chain messages. Includes message parameters, common configuration,
668
+ * and destination-specific settings.
669
+ */
670
+ export interface FeeParams {
671
+ /**
672
+ * Size of the message calldata in bytes.
673
+ */
674
+ calldata_size: u32;
675
+ /**
676
+ * Default fee multiplier in basis points (used if no dst-specific multiplier).
677
+ */
678
+ default_multiplier_bps: u32;
679
+ /**
680
+ * Destination endpoint ID (chain identifier).
681
+ */
682
+ dst_eid: u32;
683
+ /**
684
+ * Minimum fee margin in USD (scaled).
685
+ */
686
+ floor_margin_usd: u128;
687
+ /**
688
+ * Base gas for each lzCompose call on destination chain.
689
+ */
690
+ lz_compose_base_gas: u64;
691
+ /**
692
+ * ============================================================================================
693
+ * Destination-Specific Configuration
694
+ * ============================================================================================
695
+ * Base gas for lzReceive execution on destination chain.
696
+ */
697
+ lz_receive_base_gas: u64;
698
+ /**
699
+ * Destination-specific fee multiplier in basis points (0 = use default).
700
+ */
701
+ multiplier_bps: u32;
702
+ /**
703
+ * Maximum native token value that can be sent.
704
+ */
705
+ native_cap: u128;
706
+ /**
707
+ * Encoded executor options (lzReceive gas, lzCompose, nativeDrop, etc.).
708
+ */
709
+ options: Buffer;
710
+ /**
711
+ * ============================================================================================
712
+ * Common Configuration
713
+ * ============================================================================================
714
+ * Price feed contract address for gas price and exchange rate data.
715
+ */
716
+ price_feed: string;
717
+ /**
718
+ * ============================================================================================
719
+ * Message Parameters
720
+ * ============================================================================================
721
+ * The OApp sender address.
722
+ */
723
+ sender: string;
724
+ }
725
+ /**
726
+ * Gas price information for a destination endpoint.
727
+ *
728
+ * Contains the exchange rate and gas costs needed for cross-chain fee calculations.
729
+ */
730
+ export interface Price {
731
+ /**
732
+ * Gas cost per byte of calldata on the destination chain.
733
+ */
734
+ gas_per_byte: u32;
735
+ /**
736
+ * Gas price in the smallest unit (wei for EVM, stroops for Stellar).
737
+ */
738
+ gas_price_in_unit: u64;
739
+ /**
740
+ * Price ratio = (remote native token price / local native token price) * PRICE_RATIO_DENOMINATOR.
741
+ * Used to convert destination chain gas costs to source chain native token.
742
+ */
743
+ price_ratio: u128;
744
+ }
745
+ /**
746
+ * Fee estimation result with detailed breakdown.
747
+ *
748
+ * Contains the calculated fee and all intermediate values used in the calculation.
749
+ */
750
+ export interface FeeEstimate {
751
+ /**
752
+ * Source chain native token price in USD (scaled).
753
+ */
754
+ native_price_usd: u128;
755
+ /**
756
+ * Price ratio used for the calculation.
757
+ */
758
+ price_ratio: u128;
759
+ /**
760
+ * Denominator for the price ratio (typically 10^20).
761
+ */
762
+ price_ratio_denominator: u128;
763
+ /**
764
+ * Total gas fee in source chain native token units.
765
+ */
766
+ total_gas_fee: i128;
767
+ }
768
+ export type WorkerStorage = {
769
+ tag: "Paused";
770
+ values: void;
771
+ } | {
772
+ tag: "DepositAddress";
773
+ values: void;
774
+ } | {
775
+ tag: "PriceFeed";
776
+ values: void;
777
+ } | {
778
+ tag: "WorkerFeeLib";
779
+ values: void;
780
+ } | {
781
+ tag: "DefaultMultiplierBps";
782
+ values: void;
783
+ } | {
784
+ tag: "SupportedOptionTypes";
785
+ values: readonly [u32];
786
+ } | {
787
+ tag: "MessageLibs";
788
+ values: void;
789
+ } | {
790
+ tag: "Allowlist";
791
+ values: readonly [string];
792
+ } | {
793
+ tag: "Denylist";
794
+ values: readonly [string];
795
+ } | {
796
+ tag: "AllowlistSize";
797
+ values: void;
798
+ } | {
799
+ tag: "Admins";
800
+ values: void;
801
+ };
802
+ export interface Client {
803
+ /**
804
+ * Construct and simulate a set_signer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
805
+ * Adds or removes a signer. Requires multisig approval.
806
+ */
807
+ set_signer: ({ signer, active }: {
808
+ signer: Buffer;
809
+ active: boolean;
810
+ }, txnOptions?: {
811
+ /**
812
+ * The fee to pay for the transaction. Default: BASE_FEE
813
+ */
814
+ fee?: number;
815
+ /**
816
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
817
+ */
818
+ timeoutInSeconds?: number;
819
+ /**
820
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
821
+ */
822
+ simulate?: boolean;
823
+ }) => Promise<AssembledTransaction<null>>;
824
+ /**
825
+ * Construct and simulate a set_threshold transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
826
+ * Updates the signature threshold. Requires multisig approval.
827
+ */
828
+ set_threshold: ({ threshold }: {
829
+ threshold: u32;
830
+ }, txnOptions?: {
831
+ /**
832
+ * The fee to pay for the transaction. Default: BASE_FEE
833
+ */
834
+ fee?: number;
835
+ /**
836
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
837
+ */
838
+ timeoutInSeconds?: number;
839
+ /**
840
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
841
+ */
842
+ simulate?: boolean;
843
+ }) => Promise<AssembledTransaction<null>>;
844
+ /**
845
+ * Construct and simulate a get_signers transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
846
+ * Returns the list of all registered signers.
847
+ */
848
+ get_signers: (txnOptions?: {
849
+ /**
850
+ * The fee to pay for the transaction. Default: BASE_FEE
851
+ */
852
+ fee?: number;
853
+ /**
854
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
855
+ */
856
+ timeoutInSeconds?: number;
857
+ /**
858
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
859
+ */
860
+ simulate?: boolean;
861
+ }) => Promise<AssembledTransaction<Array<Buffer>>>;
862
+ /**
863
+ * Construct and simulate a total_signers transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
864
+ * Returns the total number of registered signers.
865
+ */
866
+ total_signers: (txnOptions?: {
867
+ /**
868
+ * The fee to pay for the transaction. Default: BASE_FEE
869
+ */
870
+ fee?: number;
871
+ /**
872
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
873
+ */
874
+ timeoutInSeconds?: number;
875
+ /**
876
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
877
+ */
878
+ simulate?: boolean;
879
+ }) => Promise<AssembledTransaction<u32>>;
880
+ /**
881
+ * Construct and simulate a is_signer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
882
+ * Checks if an address is a registered signer.
883
+ */
884
+ is_signer: ({ signer }: {
885
+ signer: Buffer;
886
+ }, txnOptions?: {
887
+ /**
888
+ * The fee to pay for the transaction. Default: BASE_FEE
889
+ */
890
+ fee?: number;
891
+ /**
892
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
893
+ */
894
+ timeoutInSeconds?: number;
895
+ /**
896
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
897
+ */
898
+ simulate?: boolean;
899
+ }) => Promise<AssembledTransaction<boolean>>;
900
+ /**
901
+ * Construct and simulate a threshold transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
902
+ * Returns the current signature threshold.
903
+ */
904
+ threshold: (txnOptions?: {
905
+ /**
906
+ * The fee to pay for the transaction. Default: BASE_FEE
907
+ */
908
+ fee?: number;
909
+ /**
910
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
911
+ */
912
+ timeoutInSeconds?: number;
913
+ /**
914
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
915
+ */
916
+ simulate?: boolean;
917
+ }) => Promise<AssembledTransaction<u32>>;
918
+ /**
919
+ * Construct and simulate a verify_signatures transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
920
+ * Verifies signatures against the current threshold.
921
+ */
922
+ verify_signatures: ({ hash, signatures }: {
923
+ hash: Buffer;
924
+ signatures: Array<Buffer>;
925
+ }, txnOptions?: {
926
+ /**
927
+ * The fee to pay for the transaction. Default: BASE_FEE
928
+ */
929
+ fee?: number;
930
+ /**
931
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
932
+ */
933
+ timeoutInSeconds?: number;
934
+ /**
935
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
936
+ */
937
+ simulate?: boolean;
938
+ }) => Promise<AssembledTransaction<null>>;
939
+ /**
940
+ * Construct and simulate a verify_n_signatures transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
941
+ * Verifies that at least `threshold` valid signatures exist for the given hash.
942
+ *
943
+ * Signatures must be:
944
+ * - From registered signers
945
+ * - Sorted by signer address (ascending, no duplicates)
946
+ */
947
+ verify_n_signatures: ({ hash, signatures, threshold }: {
948
+ hash: Buffer;
949
+ signatures: Array<Buffer>;
950
+ threshold: u32;
951
+ }, txnOptions?: {
952
+ /**
953
+ * The fee to pay for the transaction. Default: BASE_FEE
954
+ */
955
+ fee?: number;
956
+ /**
957
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
958
+ */
959
+ timeoutInSeconds?: number;
960
+ /**
961
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
962
+ */
963
+ simulate?: boolean;
964
+ }) => Promise<AssembledTransaction<null>>;
965
+ /**
966
+ * Construct and simulate a set_paused transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
967
+ * Sets the paused state of the worker.
968
+ *
969
+ * When paused, the worker will reject new job assignments (e.g., assign_job, get_fee).
970
+ * Existing jobs in progress are not affected.
971
+ *
972
+ * # Arguments
973
+ * * `paused` - `true` to pause, `false` to unpause
974
+ */
975
+ set_paused: ({ paused }: {
976
+ paused: boolean;
977
+ }, txnOptions?: {
978
+ /**
979
+ * The fee to pay for the transaction. Default: BASE_FEE
980
+ */
981
+ fee?: number;
982
+ /**
983
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
984
+ */
985
+ timeoutInSeconds?: number;
986
+ /**
987
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
988
+ */
989
+ simulate?: boolean;
990
+ }) => Promise<AssembledTransaction<null>>;
991
+ /**
992
+ * Construct and simulate a set_supported_message_lib transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
993
+ * Sets whether a message library is supported by this worker.
994
+ *
995
+ * Message libraries (e.g., ULN302) call workers to assign jobs. Only supported
996
+ * libraries can interact with this worker.
997
+ *
998
+ * # Arguments
999
+ * * `message_lib` - The message library contract address
1000
+ * * `supported` - `true` to add support, `false` to remove support
1001
+ */
1002
+ set_supported_message_lib: ({ message_lib, supported }: {
1003
+ message_lib: string;
1004
+ supported: boolean;
1005
+ }, txnOptions?: {
1006
+ /**
1007
+ * The fee to pay for the transaction. Default: BASE_FEE
1008
+ */
1009
+ fee?: number;
1010
+ /**
1011
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1012
+ */
1013
+ timeoutInSeconds?: number;
1014
+ /**
1015
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1016
+ */
1017
+ simulate?: boolean;
1018
+ }) => Promise<AssembledTransaction<null>>;
1019
+ /**
1020
+ * Construct and simulate a set_allowlist transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1021
+ * Sets allowlist status for an OApp address.
1022
+ *
1023
+ * When the allowlist is empty, all OApps are allowed (unless on denylist).
1024
+ * When the allowlist is not empty, only allowlisted OApps are allowed.
1025
+ * Denylist always takes precedence over allowlist.
1026
+ *
1027
+ * # Arguments
1028
+ * * `oapp` - The OApp contract address
1029
+ * * `allowed` - `true` to add to allowlist, `false` to remove
1030
+ */
1031
+ set_allowlist: ({ oapp, allowed }: {
1032
+ oapp: string;
1033
+ allowed: boolean;
1034
+ }, txnOptions?: {
1035
+ /**
1036
+ * The fee to pay for the transaction. Default: BASE_FEE
1037
+ */
1038
+ fee?: number;
1039
+ /**
1040
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1041
+ */
1042
+ timeoutInSeconds?: number;
1043
+ /**
1044
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1045
+ */
1046
+ simulate?: boolean;
1047
+ }) => Promise<AssembledTransaction<null>>;
1048
+ /**
1049
+ * Construct and simulate a set_denylist transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1050
+ * Sets denylist status for an OApp address.
1051
+ *
1052
+ * Denylisted OApps are blocked from using this worker, even if they're on
1053
+ * the allowlist (denylist takes precedence).
1054
+ *
1055
+ * # Arguments
1056
+ * * `oapp` - The OApp contract address
1057
+ * * `denied` - `true` to add to denylist, `false` to remove
1058
+ */
1059
+ set_denylist: ({ oapp, denied }: {
1060
+ oapp: string;
1061
+ denied: boolean;
1062
+ }, txnOptions?: {
1063
+ /**
1064
+ * The fee to pay for the transaction. Default: BASE_FEE
1065
+ */
1066
+ fee?: number;
1067
+ /**
1068
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1069
+ */
1070
+ timeoutInSeconds?: number;
1071
+ /**
1072
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1073
+ */
1074
+ simulate?: boolean;
1075
+ }) => Promise<AssembledTransaction<null>>;
1076
+ /**
1077
+ * Construct and simulate a set_default_multiplier_bps transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1078
+ * Sets the default fee multiplier in basis points.
1079
+ *
1080
+ * The multiplier is applied to base fees during fee calculation. Used when
1081
+ * no destination-specific multiplier is configured.
1082
+ *
1083
+ * # Arguments
1084
+ * * `admin` - Admin address (must provide authorization)
1085
+ * * `multiplier_bps` - Multiplier in basis points (10000 = 1x, 12000 = 1.2x)
1086
+ */
1087
+ set_default_multiplier_bps: ({ admin, multiplier_bps }: {
1088
+ admin: string;
1089
+ multiplier_bps: u32;
1090
+ }, txnOptions?: {
1091
+ /**
1092
+ * The fee to pay for the transaction. Default: BASE_FEE
1093
+ */
1094
+ fee?: number;
1095
+ /**
1096
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1097
+ */
1098
+ timeoutInSeconds?: number;
1099
+ /**
1100
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1101
+ */
1102
+ simulate?: boolean;
1103
+ }) => Promise<AssembledTransaction<null>>;
1104
+ /**
1105
+ * Construct and simulate a set_deposit_address transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1106
+ * Sets the deposit address where worker fees are collected.
1107
+ *
1108
+ * When jobs are assigned, fees are directed to this address.
1109
+ *
1110
+ * # Arguments
1111
+ * * `admin` - Admin address (must provide authorization)
1112
+ * * `deposit_address` - Address to receive collected fees
1113
+ */
1114
+ set_deposit_address: ({ admin, deposit_address }: {
1115
+ admin: string;
1116
+ deposit_address: string;
1117
+ }, txnOptions?: {
1118
+ /**
1119
+ * The fee to pay for the transaction. Default: BASE_FEE
1120
+ */
1121
+ fee?: number;
1122
+ /**
1123
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1124
+ */
1125
+ timeoutInSeconds?: number;
1126
+ /**
1127
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1128
+ */
1129
+ simulate?: boolean;
1130
+ }) => Promise<AssembledTransaction<null>>;
1131
+ /**
1132
+ * Construct and simulate a set_supported_option_types transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1133
+ * Sets supported executor option types for a destination endpoint.
1134
+ *
1135
+ * # Arguments
1136
+ * * `admin` - Admin address (must provide authorization)
1137
+ * * `eid` - Destination endpoint ID (chain identifier)
1138
+ * * `option_types` - Encoded supported option types
1139
+ */
1140
+ set_supported_option_types: ({ admin, eid, option_types }: {
1141
+ admin: string;
1142
+ eid: u32;
1143
+ option_types: Buffer;
1144
+ }, txnOptions?: {
1145
+ /**
1146
+ * The fee to pay for the transaction. Default: BASE_FEE
1147
+ */
1148
+ fee?: number;
1149
+ /**
1150
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1151
+ */
1152
+ timeoutInSeconds?: number;
1153
+ /**
1154
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1155
+ */
1156
+ simulate?: boolean;
1157
+ }) => Promise<AssembledTransaction<null>>;
1158
+ /**
1159
+ * Construct and simulate a set_worker_fee_lib transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1160
+ * Sets the worker fee library contract address.
1161
+ *
1162
+ * The fee library calculates fees based on executor options and price feed data.
1163
+ *
1164
+ * # Arguments
1165
+ * * `admin` - Admin address (must provide authorization)
1166
+ * * `worker_fee_lib` - Fee library contract address implementing `IExecutorFeeLib`
1167
+ */
1168
+ set_worker_fee_lib: ({ admin, worker_fee_lib }: {
1169
+ admin: string;
1170
+ worker_fee_lib: string;
1171
+ }, txnOptions?: {
1172
+ /**
1173
+ * The fee to pay for the transaction. Default: BASE_FEE
1174
+ */
1175
+ fee?: number;
1176
+ /**
1177
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1178
+ */
1179
+ timeoutInSeconds?: number;
1180
+ /**
1181
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1182
+ */
1183
+ simulate?: boolean;
1184
+ }) => Promise<AssembledTransaction<null>>;
1185
+ /**
1186
+ * Construct and simulate a set_price_feed transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1187
+ * Sets the price feed contract address.
1188
+ *
1189
+ * The price feed provides gas prices and exchange rates for cross-chain
1190
+ * fee calculations.
1191
+ *
1192
+ * # Arguments
1193
+ * * `admin` - Admin address (must provide authorization)
1194
+ * * `price_feed` - Price feed contract address implementing `ILayerZeroPriceFeed`
1195
+ */
1196
+ set_price_feed: ({ admin, price_feed }: {
1197
+ admin: string;
1198
+ price_feed: string;
1199
+ }, txnOptions?: {
1200
+ /**
1201
+ * The fee to pay for the transaction. Default: BASE_FEE
1202
+ */
1203
+ fee?: number;
1204
+ /**
1205
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1206
+ */
1207
+ timeoutInSeconds?: number;
1208
+ /**
1209
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1210
+ */
1211
+ simulate?: boolean;
1212
+ }) => Promise<AssembledTransaction<null>>;
1213
+ /**
1214
+ * Construct and simulate a is_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1215
+ * Returns whether an address is an admin.
1216
+ *
1217
+ * # Arguments
1218
+ * * `admin` - The address to check
1219
+ */
1220
+ is_admin: ({ admin }: {
1221
+ admin: string;
1222
+ }, txnOptions?: {
1223
+ /**
1224
+ * The fee to pay for the transaction. Default: BASE_FEE
1225
+ */
1226
+ fee?: number;
1227
+ /**
1228
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1229
+ */
1230
+ timeoutInSeconds?: number;
1231
+ /**
1232
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1233
+ */
1234
+ simulate?: boolean;
1235
+ }) => Promise<AssembledTransaction<boolean>>;
1236
+ /**
1237
+ * Construct and simulate a admins transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1238
+ * Returns all admin addresses.
1239
+ */
1240
+ admins: (txnOptions?: {
1241
+ /**
1242
+ * The fee to pay for the transaction. Default: BASE_FEE
1243
+ */
1244
+ fee?: number;
1245
+ /**
1246
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1247
+ */
1248
+ timeoutInSeconds?: number;
1249
+ /**
1250
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1251
+ */
1252
+ simulate?: boolean;
1253
+ }) => Promise<AssembledTransaction<Array<string>>>;
1254
+ /**
1255
+ * Construct and simulate a paused transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1256
+ * Returns whether the worker is paused.
1257
+ */
1258
+ paused: (txnOptions?: {
1259
+ /**
1260
+ * The fee to pay for the transaction. Default: BASE_FEE
1261
+ */
1262
+ fee?: number;
1263
+ /**
1264
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1265
+ */
1266
+ timeoutInSeconds?: number;
1267
+ /**
1268
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1269
+ */
1270
+ simulate?: boolean;
1271
+ }) => Promise<AssembledTransaction<boolean>>;
1272
+ /**
1273
+ * Construct and simulate a is_supported_message_lib transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1274
+ * Returns whether a message library is supported.
1275
+ *
1276
+ * # Arguments
1277
+ * * `message_lib` - Message library contract address
1278
+ */
1279
+ is_supported_message_lib: ({ message_lib }: {
1280
+ message_lib: string;
1281
+ }, txnOptions?: {
1282
+ /**
1283
+ * The fee to pay for the transaction. Default: BASE_FEE
1284
+ */
1285
+ fee?: number;
1286
+ /**
1287
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1288
+ */
1289
+ timeoutInSeconds?: number;
1290
+ /**
1291
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1292
+ */
1293
+ simulate?: boolean;
1294
+ }) => Promise<AssembledTransaction<boolean>>;
1295
+ /**
1296
+ * Construct and simulate a message_libs transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1297
+ * Returns all supported message library addresses.
1298
+ *
1299
+ * # Returns
1300
+ * Vector of supported message library contract addresses.
1301
+ */
1302
+ message_libs: (txnOptions?: {
1303
+ /**
1304
+ * The fee to pay for the transaction. Default: BASE_FEE
1305
+ */
1306
+ fee?: number;
1307
+ /**
1308
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1309
+ */
1310
+ timeoutInSeconds?: number;
1311
+ /**
1312
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1313
+ */
1314
+ simulate?: boolean;
1315
+ }) => Promise<AssembledTransaction<Array<string>>>;
1316
+ /**
1317
+ * Construct and simulate a is_on_allowlist transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1318
+ * Returns whether an OApp is on the allowlist.
1319
+ *
1320
+ * # Arguments
1321
+ * * `oapp` - OApp contract address
1322
+ */
1323
+ is_on_allowlist: ({ oapp }: {
1324
+ oapp: string;
1325
+ }, txnOptions?: {
1326
+ /**
1327
+ * The fee to pay for the transaction. Default: BASE_FEE
1328
+ */
1329
+ fee?: number;
1330
+ /**
1331
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1332
+ */
1333
+ timeoutInSeconds?: number;
1334
+ /**
1335
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1336
+ */
1337
+ simulate?: boolean;
1338
+ }) => Promise<AssembledTransaction<boolean>>;
1339
+ /**
1340
+ * Construct and simulate a is_on_denylist transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1341
+ * Returns whether an OApp is on the denylist.
1342
+ *
1343
+ * # Arguments
1344
+ * * `oapp` - OApp contract address
1345
+ */
1346
+ is_on_denylist: ({ oapp }: {
1347
+ oapp: string;
1348
+ }, txnOptions?: {
1349
+ /**
1350
+ * The fee to pay for the transaction. Default: BASE_FEE
1351
+ */
1352
+ fee?: number;
1353
+ /**
1354
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1355
+ */
1356
+ timeoutInSeconds?: number;
1357
+ /**
1358
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1359
+ */
1360
+ simulate?: boolean;
1361
+ }) => Promise<AssembledTransaction<boolean>>;
1362
+ /**
1363
+ * Construct and simulate a has_acl transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1364
+ * Returns whether an OApp has access control list (ACL) permission.
1365
+ *
1366
+ * ACL evaluation order:
1367
+ * 1. If on denylist → denied
1368
+ * 2. If allowlist is empty OR on allowlist → allowed
1369
+ * 3. Otherwise → denied
1370
+ *
1371
+ * # Arguments
1372
+ * * `sender` - OApp contract address to check
1373
+ */
1374
+ has_acl: ({ sender }: {
1375
+ sender: string;
1376
+ }, txnOptions?: {
1377
+ /**
1378
+ * The fee to pay for the transaction. Default: BASE_FEE
1379
+ */
1380
+ fee?: number;
1381
+ /**
1382
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1383
+ */
1384
+ timeoutInSeconds?: number;
1385
+ /**
1386
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1387
+ */
1388
+ simulate?: boolean;
1389
+ }) => Promise<AssembledTransaction<boolean>>;
1390
+ /**
1391
+ * Construct and simulate a allowlist_size transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1392
+ * Returns the number of addresses on the allowlist.
1393
+ */
1394
+ allowlist_size: (txnOptions?: {
1395
+ /**
1396
+ * The fee to pay for the transaction. Default: BASE_FEE
1397
+ */
1398
+ fee?: number;
1399
+ /**
1400
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1401
+ */
1402
+ timeoutInSeconds?: number;
1403
+ /**
1404
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1405
+ */
1406
+ simulate?: boolean;
1407
+ }) => Promise<AssembledTransaction<u32>>;
1408
+ /**
1409
+ * Construct and simulate a default_multiplier_bps transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1410
+ * Returns the default fee multiplier in basis points.
1411
+ */
1412
+ default_multiplier_bps: (txnOptions?: {
1413
+ /**
1414
+ * The fee to pay for the transaction. Default: BASE_FEE
1415
+ */
1416
+ fee?: number;
1417
+ /**
1418
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1419
+ */
1420
+ timeoutInSeconds?: number;
1421
+ /**
1422
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1423
+ */
1424
+ simulate?: boolean;
1425
+ }) => Promise<AssembledTransaction<u32>>;
1426
+ /**
1427
+ * Construct and simulate a deposit_address transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1428
+ * Returns the deposit address where fees are collected.
1429
+ */
1430
+ deposit_address: (txnOptions?: {
1431
+ /**
1432
+ * The fee to pay for the transaction. Default: BASE_FEE
1433
+ */
1434
+ fee?: number;
1435
+ /**
1436
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1437
+ */
1438
+ timeoutInSeconds?: number;
1439
+ /**
1440
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1441
+ */
1442
+ simulate?: boolean;
1443
+ }) => Promise<AssembledTransaction<string>>;
1444
+ /**
1445
+ * Construct and simulate a price_feed transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1446
+ * Returns the price feed contract address.
1447
+ */
1448
+ price_feed: (txnOptions?: {
1449
+ /**
1450
+ * The fee to pay for the transaction. Default: BASE_FEE
1451
+ */
1452
+ fee?: number;
1453
+ /**
1454
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1455
+ */
1456
+ timeoutInSeconds?: number;
1457
+ /**
1458
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1459
+ */
1460
+ simulate?: boolean;
1461
+ }) => Promise<AssembledTransaction<string>>;
1462
+ /**
1463
+ * Construct and simulate a get_supported_option_types transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1464
+ * Returns supported option types for a destination endpoint.
1465
+ *
1466
+ * # Arguments
1467
+ * * `eid` - Destination endpoint ID (chain identifier)
1468
+ */
1469
+ get_supported_option_types: ({ eid }: {
1470
+ eid: u32;
1471
+ }, txnOptions?: {
1472
+ /**
1473
+ * The fee to pay for the transaction. Default: BASE_FEE
1474
+ */
1475
+ fee?: number;
1476
+ /**
1477
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1478
+ */
1479
+ timeoutInSeconds?: number;
1480
+ /**
1481
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1482
+ */
1483
+ simulate?: boolean;
1484
+ }) => Promise<AssembledTransaction<Option<Buffer>>>;
1485
+ /**
1486
+ * Construct and simulate a worker_fee_lib transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1487
+ * Returns the worker fee library contract address.
1488
+ */
1489
+ worker_fee_lib: (txnOptions?: {
1490
+ /**
1491
+ * The fee to pay for the transaction. Default: BASE_FEE
1492
+ */
1493
+ fee?: number;
1494
+ /**
1495
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1496
+ */
1497
+ timeoutInSeconds?: number;
1498
+ /**
1499
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1500
+ */
1501
+ simulate?: boolean;
1502
+ }) => Promise<AssembledTransaction<string>>;
1503
+ /**
1504
+ * Construct and simulate a get_fee transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1505
+ * Calculates the verification fee for a cross-chain message.
1506
+ *
1507
+ * Called by the send library to quote DVN fees before sending.
1508
+ */
1509
+ get_fee: ({ send_lib, sender, dst_eid, packet_header, payload_hash, confirmations, options }: {
1510
+ send_lib: string;
1511
+ sender: string;
1512
+ dst_eid: u32;
1513
+ packet_header: Buffer;
1514
+ payload_hash: Buffer;
1515
+ confirmations: u64;
1516
+ options: Buffer;
1517
+ }, txnOptions?: {
1518
+ /**
1519
+ * The fee to pay for the transaction. Default: BASE_FEE
1520
+ */
1521
+ fee?: number;
1522
+ /**
1523
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1524
+ */
1525
+ timeoutInSeconds?: number;
1526
+ /**
1527
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1528
+ */
1529
+ simulate?: boolean;
1530
+ }) => Promise<AssembledTransaction<i128>>;
1531
+ /**
1532
+ * Construct and simulate a assign_job transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1533
+ * Assigns a verification job to this DVN and returns fee payment info.
1534
+ *
1535
+ * Called by the send library when a message is sent. The DVN will later
1536
+ * verify the message on the destination chain.
1537
+ */
1538
+ assign_job: ({ send_lib, sender, dst_eid, packet_header, payload_hash, confirmations, options }: {
1539
+ send_lib: string;
1540
+ sender: string;
1541
+ dst_eid: u32;
1542
+ packet_header: Buffer;
1543
+ payload_hash: Buffer;
1544
+ confirmations: u64;
1545
+ options: Buffer;
1546
+ }, txnOptions?: {
1547
+ /**
1548
+ * The fee to pay for the transaction. Default: BASE_FEE
1549
+ */
1550
+ fee?: number;
1551
+ /**
1552
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1553
+ */
1554
+ timeoutInSeconds?: number;
1555
+ /**
1556
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1557
+ */
1558
+ simulate?: boolean;
1559
+ }) => Promise<AssembledTransaction<FeeRecipient>>;
1560
+ /**
1561
+ * Construct and simulate a set_dst_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1562
+ * Sets destination chain configurations. Requires admin authorization.
1563
+ */
1564
+ set_dst_config: ({ admin, params }: {
1565
+ admin: string;
1566
+ params: Array<DstConfigParam>;
1567
+ }, txnOptions?: {
1568
+ /**
1569
+ * The fee to pay for the transaction. Default: BASE_FEE
1570
+ */
1571
+ fee?: number;
1572
+ /**
1573
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1574
+ */
1575
+ timeoutInSeconds?: number;
1576
+ /**
1577
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1578
+ */
1579
+ simulate?: boolean;
1580
+ }) => Promise<AssembledTransaction<null>>;
1581
+ /**
1582
+ * Construct and simulate a dst_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1583
+ * Returns the destination configuration for a specific endpoint ID.
1584
+ */
1585
+ dst_config: ({ dst_eid }: {
1586
+ dst_eid: u32;
1587
+ }, txnOptions?: {
1588
+ /**
1589
+ * The fee to pay for the transaction. Default: BASE_FEE
1590
+ */
1591
+ fee?: number;
1592
+ /**
1593
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1594
+ */
1595
+ timeoutInSeconds?: number;
1596
+ /**
1597
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1598
+ */
1599
+ simulate?: boolean;
1600
+ }) => Promise<AssembledTransaction<Option<DstConfig>>>;
1601
+ /**
1602
+ * Construct and simulate a vid transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1603
+ * Returns the Verifier ID for this DVN.
1604
+ */
1605
+ vid: (txnOptions?: {
1606
+ /**
1607
+ * The fee to pay for the transaction. Default: BASE_FEE
1608
+ */
1609
+ fee?: number;
1610
+ /**
1611
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1612
+ */
1613
+ timeoutInSeconds?: number;
1614
+ /**
1615
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1616
+ */
1617
+ simulate?: boolean;
1618
+ }) => Promise<AssembledTransaction<u32>>;
1619
+ /**
1620
+ * Construct and simulate a hash_call_data transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1621
+ * Computes the hash of call data for multisig signing.
1622
+ *
1623
+ * Off-chain signers use this to compute the hash they need to sign.
1624
+ */
1625
+ hash_call_data: ({ vid, expiration, calls }: {
1626
+ vid: u32;
1627
+ expiration: u64;
1628
+ calls: Array<Call>;
1629
+ }, txnOptions?: {
1630
+ /**
1631
+ * The fee to pay for the transaction. Default: BASE_FEE
1632
+ */
1633
+ fee?: number;
1634
+ /**
1635
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1636
+ */
1637
+ timeoutInSeconds?: number;
1638
+ /**
1639
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1640
+ */
1641
+ simulate?: boolean;
1642
+ }) => Promise<AssembledTransaction<Buffer>>;
1643
+ /**
1644
+ * Construct and simulate a set_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1645
+ * Sets admin status for an address. Can be called by an existing admin.
1646
+ *
1647
+ * This allows existing admins to add or remove other admins without going through
1648
+ * the owner/multisig path.
1649
+ *
1650
+ * # Arguments
1651
+ * * `caller` - The admin calling this function (must provide authorization)
1652
+ * * `admin` - The address to set admin status for
1653
+ * * `active` - `true` to add admin, `false` to remove
1654
+ */
1655
+ set_admin: ({ caller, admin, active }: {
1656
+ caller: string;
1657
+ admin: string;
1658
+ active: boolean;
1659
+ }, txnOptions?: {
1660
+ /**
1661
+ * The fee to pay for the transaction. Default: BASE_FEE
1662
+ */
1663
+ fee?: number;
1664
+ /**
1665
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1666
+ */
1667
+ timeoutInSeconds?: number;
1668
+ /**
1669
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1670
+ */
1671
+ simulate?: boolean;
1672
+ }) => Promise<AssembledTransaction<null>>;
1673
+ /**
1674
+ * Construct and simulate a quorum_change_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1675
+ * Allows the quorum to add/remove admins without requiring an admin signature.
1676
+ *
1677
+ * This function bypasses the normal admin verification in `__check_auth`,
1678
+ * requiring only multisig quorum signatures. Must be called as a single
1679
+ * operation (cannot be bundled with other calls).
1680
+ *
1681
+ * # Arguments
1682
+ * * `admin` - The address to set admin status for
1683
+ * * `active` - `true` to add admin, `false` to remove
1684
+ */
1685
+ quorum_change_admin: ({ admin, active }: {
1686
+ admin: string;
1687
+ active: boolean;
1688
+ }, txnOptions?: {
1689
+ /**
1690
+ * The fee to pay for the transaction. Default: BASE_FEE
1691
+ */
1692
+ fee?: number;
1693
+ /**
1694
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1695
+ */
1696
+ timeoutInSeconds?: number;
1697
+ /**
1698
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1699
+ */
1700
+ simulate?: boolean;
1701
+ }) => Promise<AssembledTransaction<null>>;
1702
+ /**
1703
+ * Construct and simulate a upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1704
+ */
1705
+ upgrade: ({ new_wasm_hash }: {
1706
+ new_wasm_hash: Buffer;
1707
+ }, txnOptions?: {
1708
+ /**
1709
+ * The fee to pay for the transaction. Default: BASE_FEE
1710
+ */
1711
+ fee?: number;
1712
+ /**
1713
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1714
+ */
1715
+ timeoutInSeconds?: number;
1716
+ /**
1717
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1718
+ */
1719
+ simulate?: boolean;
1720
+ }) => Promise<AssembledTransaction<null>>;
1721
+ /**
1722
+ * Construct and simulate a migrate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1723
+ */
1724
+ migrate: ({ migration_data }: {
1725
+ migration_data: MigrationData;
1726
+ }, txnOptions?: {
1727
+ /**
1728
+ * The fee to pay for the transaction. Default: BASE_FEE
1729
+ */
1730
+ fee?: number;
1731
+ /**
1732
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1733
+ */
1734
+ timeoutInSeconds?: number;
1735
+ /**
1736
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1737
+ */
1738
+ simulate?: boolean;
1739
+ }) => Promise<AssembledTransaction<null>>;
1740
+ /**
1741
+ * Construct and simulate a extend_instance_ttl transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1742
+ * Extends the instance TTL.
1743
+ *
1744
+ * # Arguments
1745
+ *
1746
+ * * `threshold` - The threshold to extend the TTL.
1747
+ * * `extend_to` - The TTL to extend to.
1748
+ */
1749
+ extend_instance_ttl: ({ threshold, extend_to }: {
1750
+ threshold: u32;
1751
+ extend_to: u32;
1752
+ }, txnOptions?: {
1753
+ /**
1754
+ * The fee to pay for the transaction. Default: BASE_FEE
1755
+ */
1756
+ fee?: number;
1757
+ /**
1758
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1759
+ */
1760
+ timeoutInSeconds?: number;
1761
+ /**
1762
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1763
+ */
1764
+ simulate?: boolean;
1765
+ }) => Promise<AssembledTransaction<null>>;
1766
+ /**
1767
+ * Construct and simulate a set_ttl_configs transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1768
+ * Sets TTL configs for instance and persistent storage.
1769
+ *
1770
+ * - `None` values remove the corresponding config (disables auto-extension for that type)
1771
+ * - Validates that `threshold <= extend_to <= MAX_TTL`
1772
+ *
1773
+ * # Arguments
1774
+ * - `instance` - TTL config for instance storage
1775
+ * - `persistent` - TTL config for persistent storage
1776
+ *
1777
+ * # Panics
1778
+ * - `TtlConfigFrozen` if configs are frozen
1779
+ * - `InvalidTtlConfig` if validation fails
1780
+ */
1781
+ set_ttl_configs: ({ instance, persistent }: {
1782
+ instance: Option<TtlConfig>;
1783
+ persistent: Option<TtlConfig>;
1784
+ }, txnOptions?: {
1785
+ /**
1786
+ * The fee to pay for the transaction. Default: BASE_FEE
1787
+ */
1788
+ fee?: number;
1789
+ /**
1790
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1791
+ */
1792
+ timeoutInSeconds?: number;
1793
+ /**
1794
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1795
+ */
1796
+ simulate?: boolean;
1797
+ }) => Promise<AssembledTransaction<null>>;
1798
+ /**
1799
+ * Construct and simulate a ttl_configs transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1800
+ * Returns the current TTL configs as (instance_config, persistent_config).
1801
+ */
1802
+ ttl_configs: (txnOptions?: {
1803
+ /**
1804
+ * The fee to pay for the transaction. Default: BASE_FEE
1805
+ */
1806
+ fee?: number;
1807
+ /**
1808
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1809
+ */
1810
+ timeoutInSeconds?: number;
1811
+ /**
1812
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1813
+ */
1814
+ simulate?: boolean;
1815
+ }) => Promise<AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>>;
1816
+ /**
1817
+ * Construct and simulate a freeze_ttl_configs transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1818
+ * Permanently freezes TTL configs, preventing any future modifications.
1819
+ *
1820
+ * This is irreversible and provides immutability guarantees to users.
1821
+ * Emits `TtlConfigsFrozen` event.
1822
+ *
1823
+ * # Panics
1824
+ * - `TtlConfigAlreadyFrozen` if already frozen
1825
+ */
1826
+ freeze_ttl_configs: (txnOptions?: {
1827
+ /**
1828
+ * The fee to pay for the transaction. Default: BASE_FEE
1829
+ */
1830
+ fee?: number;
1831
+ /**
1832
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1833
+ */
1834
+ timeoutInSeconds?: number;
1835
+ /**
1836
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1837
+ */
1838
+ simulate?: boolean;
1839
+ }) => Promise<AssembledTransaction<null>>;
1840
+ /**
1841
+ * Construct and simulate a is_ttl_configs_frozen transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1842
+ * Returns whether TTL configs are frozen.
1843
+ */
1844
+ is_ttl_configs_frozen: (txnOptions?: {
1845
+ /**
1846
+ * The fee to pay for the transaction. Default: BASE_FEE
1847
+ */
1848
+ fee?: number;
1849
+ /**
1850
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1851
+ */
1852
+ timeoutInSeconds?: number;
1853
+ /**
1854
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1855
+ */
1856
+ simulate?: boolean;
1857
+ }) => Promise<AssembledTransaction<boolean>>;
1858
+ }
1859
+ export declare class Client extends ContractClient {
1860
+ readonly options: ContractClientOptions;
1861
+ static deploy<T = Client>(
1862
+ /** Constructor/Initialization Args for the contract's `__constructor` method */
1863
+ { vid, signers, threshold, admins, supported_msglibs, price_feed, default_multiplier_bps, worker_fee_lib, deposit_address }: {
1864
+ vid: u32;
1865
+ signers: Array<Buffer>;
1866
+ threshold: u32;
1867
+ admins: Array<string>;
1868
+ supported_msglibs: Array<string>;
1869
+ price_feed: string;
1870
+ default_multiplier_bps: u32;
1871
+ worker_fee_lib: string;
1872
+ deposit_address: string;
1873
+ },
1874
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
1875
+ options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
1876
+ /** The hash of the Wasm blob, which must already be installed on-chain. */
1877
+ wasmHash: Buffer | string;
1878
+ /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
1879
+ salt?: Buffer | Uint8Array;
1880
+ /** The format used to decode `wasmHash`, if it's provided as a string. */
1881
+ format?: "hex" | "base64";
1882
+ }): Promise<AssembledTransaction<T>>;
1883
+ constructor(options: ContractClientOptions);
1884
+ readonly fromJSON: {
1885
+ set_signer: (json: string) => AssembledTransaction<null>;
1886
+ set_threshold: (json: string) => AssembledTransaction<null>;
1887
+ get_signers: (json: string) => AssembledTransaction<Buffer<ArrayBufferLike>[]>;
1888
+ total_signers: (json: string) => AssembledTransaction<number>;
1889
+ is_signer: (json: string) => AssembledTransaction<boolean>;
1890
+ threshold: (json: string) => AssembledTransaction<number>;
1891
+ verify_signatures: (json: string) => AssembledTransaction<null>;
1892
+ verify_n_signatures: (json: string) => AssembledTransaction<null>;
1893
+ set_paused: (json: string) => AssembledTransaction<null>;
1894
+ set_supported_message_lib: (json: string) => AssembledTransaction<null>;
1895
+ set_allowlist: (json: string) => AssembledTransaction<null>;
1896
+ set_denylist: (json: string) => AssembledTransaction<null>;
1897
+ set_default_multiplier_bps: (json: string) => AssembledTransaction<null>;
1898
+ set_deposit_address: (json: string) => AssembledTransaction<null>;
1899
+ set_supported_option_types: (json: string) => AssembledTransaction<null>;
1900
+ set_worker_fee_lib: (json: string) => AssembledTransaction<null>;
1901
+ set_price_feed: (json: string) => AssembledTransaction<null>;
1902
+ is_admin: (json: string) => AssembledTransaction<boolean>;
1903
+ admins: (json: string) => AssembledTransaction<string[]>;
1904
+ paused: (json: string) => AssembledTransaction<boolean>;
1905
+ is_supported_message_lib: (json: string) => AssembledTransaction<boolean>;
1906
+ message_libs: (json: string) => AssembledTransaction<string[]>;
1907
+ is_on_allowlist: (json: string) => AssembledTransaction<boolean>;
1908
+ is_on_denylist: (json: string) => AssembledTransaction<boolean>;
1909
+ has_acl: (json: string) => AssembledTransaction<boolean>;
1910
+ allowlist_size: (json: string) => AssembledTransaction<number>;
1911
+ default_multiplier_bps: (json: string) => AssembledTransaction<number>;
1912
+ deposit_address: (json: string) => AssembledTransaction<string>;
1913
+ price_feed: (json: string) => AssembledTransaction<string>;
1914
+ get_supported_option_types: (json: string) => AssembledTransaction<Option<Buffer<ArrayBufferLike>>>;
1915
+ worker_fee_lib: (json: string) => AssembledTransaction<string>;
1916
+ get_fee: (json: string) => AssembledTransaction<bigint>;
1917
+ assign_job: (json: string) => AssembledTransaction<FeeRecipient>;
1918
+ set_dst_config: (json: string) => AssembledTransaction<null>;
1919
+ dst_config: (json: string) => AssembledTransaction<Option<DstConfig>>;
1920
+ vid: (json: string) => AssembledTransaction<number>;
1921
+ hash_call_data: (json: string) => AssembledTransaction<Buffer<ArrayBufferLike>>;
1922
+ set_admin: (json: string) => AssembledTransaction<null>;
1923
+ quorum_change_admin: (json: string) => AssembledTransaction<null>;
1924
+ upgrade: (json: string) => AssembledTransaction<null>;
1925
+ migrate: (json: string) => AssembledTransaction<null>;
1926
+ extend_instance_ttl: (json: string) => AssembledTransaction<null>;
1927
+ set_ttl_configs: (json: string) => AssembledTransaction<null>;
1928
+ ttl_configs: (json: string) => AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>;
1929
+ freeze_ttl_configs: (json: string) => AssembledTransaction<null>;
1930
+ is_ttl_configs_frozen: (json: string) => AssembledTransaction<boolean>;
1931
+ };
1932
+ }