@layerzerolabs/protocol-stellar-v2 0.2.13 → 0.2.18

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