@layerzerolabs/protocol-stellar-v2 0.2.15 → 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 (257) hide show
  1. package/.turbo/turbo-build.log +350 -309
  2. package/.turbo/turbo-lint.log +146 -108
  3. package/.turbo/turbo-test.log +1423 -1238
  4. package/Cargo.lock +12 -0
  5. package/Cargo.toml +3 -0
  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 +181 -30
  10. package/contracts/common-macros/src/lz_contract.rs +83 -0
  11. package/contracts/common-macros/src/tests/{ownable.rs → auth.rs} +48 -15
  12. package/contracts/common-macros/src/tests/contract_ttl.rs +662 -0
  13. package/contracts/common-macros/src/tests/mod.rs +2 -2
  14. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__auth__snapshot_generated_multisig_code.snap +20 -0
  15. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__auth__snapshot_generated_ownable_code.snap +24 -0
  16. 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
  17. 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} +3 -3
  18. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__contract_ttl__snapshot_generated_contracttrait_code.snap +69 -0
  19. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ttl_configurable__snapshot_generated_ttl_configurable_code.snap +7 -21
  20. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__upgradeable__snapshot_generated_upgradeable_code.snap +2 -2
  21. package/contracts/common-macros/src/ttl_configurable.rs +19 -34
  22. package/contracts/common-macros/src/ttl_extendable.rs +36 -0
  23. package/contracts/common-macros/src/upgradeable.rs +5 -5
  24. package/contracts/common-macros/src/utils.rs +9 -0
  25. package/contracts/endpoint-v2/src/constants.rs +4 -4
  26. package/contracts/endpoint-v2/src/endpoint_v2.rs +38 -40
  27. package/contracts/endpoint-v2/src/errors.rs +4 -3
  28. package/contracts/endpoint-v2/src/events.rs +1 -1
  29. package/contracts/endpoint-v2/src/message_lib_manager.rs +18 -5
  30. package/contracts/endpoint-v2/src/messaging_channel.rs +11 -1
  31. package/contracts/endpoint-v2/src/messaging_composer.rs +11 -1
  32. package/contracts/endpoint-v2/src/storage.rs +1 -1
  33. package/contracts/endpoint-v2/src/tests/endpoint_v2/pay_messaging_fees.rs +3 -3
  34. package/contracts/endpoint-v2/src/tests/endpoint_v2/quote.rs +1 -1
  35. package/contracts/endpoint-v2/src/tests/endpoint_v2/require_oapp_auth.rs +2 -2
  36. package/contracts/endpoint-v2/src/tests/endpoint_v2/send.rs +3 -3
  37. package/contracts/endpoint-v2/src/tests/endpoint_v2/set_zro.rs +4 -4
  38. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_receive_lib_for_eid.rs +3 -3
  39. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_registered.rs +1 -1
  40. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_send_lib_for_eid.rs +3 -3
  41. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_supported_eid.rs +1 -1
  42. package/contracts/endpoint-v2/src/tests/messaging_channel/clear_payload.rs +4 -4
  43. package/contracts/endpoint-v2/src/tests/messaging_channel/inbound.rs +1 -1
  44. package/contracts/layerzero-views/src/layerzero_view.rs +3 -6
  45. package/contracts/macro-integration-tests/tests/runtime/ownable/mod.rs +2 -2
  46. package/contracts/macro-integration-tests/tests/runtime/ownable/{only_owner_guard.rs → only_auth_guard.rs} +1 -1
  47. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/configuration.rs +1 -1
  48. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/freeze.rs +1 -1
  49. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/mod.rs +0 -1
  50. package/contracts/macro-integration-tests/tests/ui/ownable/fail/{only_owner_missing_env.rs → only_auth_missing_env.rs} +3 -3
  51. package/contracts/macro-integration-tests/tests/ui/ownable/fail/{only_owner_missing_env.stderr → only_auth_missing_env.stderr} +4 -4
  52. package/contracts/macro-integration-tests/tests/ui/ownable/pass/namespacing_and_imports.rs +2 -3
  53. package/contracts/macro-integration-tests/tests/ui/ownable/pass/{only_owner_env_param_variants.rs → only_auth_env_param_variants.rs} +9 -9
  54. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/pass/minimal_contract.rs +6 -6
  55. package/contracts/message-libs/message-lib-common/src/errors.rs +7 -2
  56. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/decode_packet_header.rs +3 -3
  57. package/contracts/message-libs/message-lib-common/src/tests/worker_options/append_lz_receive_option.rs +1 -2
  58. package/contracts/message-libs/message-lib-common/src/tests/worker_options/append_native_drop_option.rs +1 -2
  59. package/contracts/message-libs/message-lib-common/src/tests/worker_options/convert_legacy_options.rs +9 -9
  60. package/contracts/message-libs/message-lib-common/src/tests/worker_options/extract_type_3_options.rs +1 -1
  61. package/contracts/message-libs/message-lib-common/src/tests/worker_options/left_pad_to_bytes32.rs +1 -1
  62. package/contracts/message-libs/message-lib-common/src/tests/worker_options/split_worker_options.rs +2 -2
  63. package/contracts/message-libs/simple-message-lib/src/simple_message_lib.rs +7 -9
  64. package/contracts/message-libs/treasury/src/errors.rs +2 -2
  65. package/contracts/message-libs/treasury/src/events.rs +1 -1
  66. package/contracts/message-libs/treasury/src/interfaces/zro_fee_lib.rs +2 -2
  67. package/contracts/message-libs/treasury/src/storage.rs +1 -1
  68. package/contracts/message-libs/treasury/src/tests/treasury_tests.rs +1 -1
  69. package/contracts/message-libs/treasury/src/treasury.rs +14 -16
  70. package/contracts/message-libs/uln-302/src/receive_uln.rs +13 -2
  71. package/contracts/message-libs/uln-302/src/send_uln.rs +23 -3
  72. package/contracts/message-libs/uln-302/src/uln302.rs +6 -24
  73. package/contracts/oapps/counter/Cargo.toml +14 -1
  74. package/contracts/oapps/counter/integration_tests/mod.rs +4 -1
  75. package/contracts/oapps/counter/integration_tests/{setup.rs → setup_sml.rs} +48 -80
  76. package/contracts/oapps/counter/integration_tests/setup_uln.rs +997 -0
  77. package/contracts/oapps/counter/integration_tests/signing.rs +62 -0
  78. package/contracts/oapps/counter/integration_tests/test_with_sml.rs +24 -55
  79. package/contracts/oapps/counter/integration_tests/test_with_uln.rs +314 -0
  80. package/contracts/oapps/counter/integration_tests/utils.rs +196 -53
  81. package/contracts/oapps/counter/src/counter.rs +67 -43
  82. package/contracts/oapps/counter/src/tests/mod.rs +0 -13
  83. package/contracts/oapps/counter/src/tests/test_counter.rs +5 -7
  84. package/contracts/oapps/oapp/src/errors.rs +5 -1
  85. package/contracts/oapps/oapp/src/macro_tests/test_macros.rs +93 -78
  86. package/contracts/oapps/oapp/src/oapp_core.rs +36 -21
  87. package/contracts/oapps/oapp/src/oapp_options_type3.rs +48 -12
  88. package/contracts/oapps/oapp/src/oapp_receiver.rs +106 -41
  89. package/contracts/oapps/oapp/src/oapp_sender.rs +26 -34
  90. package/contracts/oapps/oapp/src/tests/test_oapp_core.rs +9 -8
  91. package/contracts/oapps/oapp/src/tests/test_oapp_options_type3.rs +25 -17
  92. package/contracts/oapps/oapp/src/tests/test_oapp_receiver.rs +7 -7
  93. package/contracts/oapps/oapp/src/tests/test_oapp_sender.rs +14 -15
  94. package/contracts/oapps/oapp-macros/src/generators.rs +128 -0
  95. package/contracts/oapps/oapp-macros/src/lib.rs +113 -56
  96. package/contracts/oapps/oft/integration-tests/setup.rs +25 -7
  97. package/contracts/oapps/oft/src/errors.rs +6 -1
  98. package/contracts/oapps/oft/src/extensions/oft_fee.rs +8 -8
  99. package/contracts/oapps/oft/src/extensions/pausable.rs +4 -4
  100. package/contracts/oapps/oft/src/extensions/rate_limiter.rs +5 -5
  101. package/contracts/oapps/oft/src/lib.rs +4 -2
  102. package/contracts/oapps/oft/src/oft.rs +24 -64
  103. package/contracts/oapps/oft/src/oft_impl.rs +201 -0
  104. package/contracts/oapps/oft/src/oft_types/lock_unlock.rs +1 -3
  105. package/contracts/oapps/oft/src/oft_types/mint_burn.rs +1 -4
  106. package/contracts/oapps/oft/src/storage.rs +2 -0
  107. package/contracts/oapps/oft/src/tests/extensions/setup.rs +36 -22
  108. package/contracts/oapps/oft/src/tests/extensions/test_oft_fee.rs +5 -3
  109. package/contracts/oapps/oft/src/tests/extensions/test_pausable.rs +5 -3
  110. package/contracts/oapps/oft/src/tests/extensions/test_rate_limiter.rs +5 -3
  111. package/contracts/oapps/oft/src/tests/test_decimals.rs +2 -2
  112. package/contracts/oapps/oft/src/tests/test_oft_msg_codec.rs +1 -2
  113. package/contracts/oapps/oft/src/tests/test_utils.rs +45 -23
  114. package/contracts/oapps/oft/src/types.rs +20 -0
  115. package/contracts/oapps/oft-std/integration-tests/setup.rs +4 -2
  116. package/contracts/oapps/oft-std/src/oft.rs +24 -6
  117. package/contracts/upgrader/src/lib.rs +4 -4
  118. package/contracts/utils/src/auth.rs +44 -0
  119. package/contracts/utils/src/errors.rs +27 -5
  120. package/contracts/utils/src/lib.rs +3 -0
  121. package/contracts/utils/src/multisig.rs +211 -0
  122. package/contracts/utils/src/ownable.rs +12 -10
  123. package/contracts/utils/src/tests/buffer_reader.rs +6 -6
  124. package/contracts/utils/src/tests/buffer_writer.rs +6 -6
  125. package/contracts/utils/src/tests/bytes_ext.rs +2 -4
  126. package/contracts/utils/src/tests/mod.rs +1 -0
  127. package/contracts/utils/src/tests/multisig.rs +731 -0
  128. package/contracts/utils/src/tests/option_ext.rs +2 -5
  129. package/contracts/utils/src/tests/ownable.rs +16 -5
  130. package/contracts/utils/src/tests/ttl_configurable.rs +27 -16
  131. package/contracts/utils/src/tests/upgradeable.rs +4 -2
  132. package/contracts/utils/src/ttl_configurable.rs +23 -8
  133. package/contracts/utils/src/ttl_extendable.rs +27 -0
  134. package/contracts/utils/src/upgradeable.rs +2 -0
  135. package/contracts/workers/dvn/Cargo.toml +1 -1
  136. package/contracts/workers/dvn/src/auth.rs +7 -7
  137. package/contracts/workers/dvn/src/dvn.rs +10 -38
  138. package/contracts/workers/dvn/src/errors.rs +0 -7
  139. package/contracts/workers/dvn/src/events.rs +1 -14
  140. package/contracts/workers/dvn/src/interfaces/dvn.rs +2 -2
  141. package/contracts/workers/dvn/src/interfaces/mod.rs +0 -2
  142. package/contracts/workers/dvn/src/storage.rs +3 -13
  143. package/contracts/workers/dvn/src/tests/auth.rs +4 -4
  144. package/contracts/workers/dvn/src/tests/dvn.rs +1 -2
  145. package/contracts/workers/dvn/src/tests/multisig/set_signer.rs +7 -8
  146. package/contracts/workers/dvn/src/tests/multisig/set_threshold.rs +11 -8
  147. package/contracts/workers/dvn/src/tests/multisig/verify_signatures.rs +11 -12
  148. package/contracts/workers/dvn/src/tests/setup.rs +5 -5
  149. package/contracts/workers/dvn-fee-lib/Cargo.toml +1 -1
  150. package/contracts/workers/dvn-fee-lib/src/dvn_fee_lib.rs +3 -6
  151. package/contracts/workers/executor/src/auth.rs +80 -16
  152. package/contracts/workers/executor/src/executor.rs +5 -31
  153. package/contracts/workers/executor/src/storage.rs +2 -9
  154. package/contracts/workers/executor-fee-lib/Cargo.toml +1 -1
  155. package/contracts/workers/executor-fee-lib/src/executor_fee_lib.rs +3 -6
  156. package/contracts/workers/executor-helper/Cargo.toml +1 -1
  157. package/contracts/workers/executor-helper/src/executor_helper.rs +53 -73
  158. package/contracts/workers/price-feed/Cargo.toml +1 -1
  159. package/contracts/workers/price-feed/src/price_feed.rs +7 -10
  160. package/contracts/workers/worker/src/errors.rs +4 -0
  161. package/contracts/workers/worker/src/tests/worker.rs +7 -6
  162. package/contracts/workers/worker/src/worker.rs +20 -16
  163. package/package.json +8 -5
  164. package/sdk/.turbo/turbo-build.log +1 -0
  165. package/sdk/.turbo/turbo-test.log +1009 -0
  166. package/sdk/dist/generated/bml.d.ts +65 -8
  167. package/sdk/dist/generated/bml.js +70 -34
  168. package/sdk/dist/generated/counter.d.ts +167 -42
  169. package/sdk/dist/generated/counter.js +86 -45
  170. package/sdk/dist/generated/dvn.d.ts +282 -229
  171. package/sdk/dist/generated/dvn.js +119 -81
  172. package/sdk/dist/generated/dvn_fee_lib.d.ts +142 -67
  173. package/sdk/dist/generated/dvn_fee_lib.js +64 -24
  174. package/sdk/dist/generated/endpoint.d.ts +97 -22
  175. package/sdk/dist/generated/endpoint.js +75 -37
  176. package/sdk/dist/generated/executor.d.ts +117 -85
  177. package/sdk/dist/generated/executor.js +102 -59
  178. package/sdk/dist/generated/executor_fee_lib.d.ts +162 -78
  179. package/sdk/dist/generated/executor_fee_lib.js +104 -57
  180. package/sdk/dist/generated/executor_helper.d.ts +133 -21
  181. package/sdk/dist/generated/executor_helper.js +99 -50
  182. package/sdk/dist/generated/oft_std.d.ts +233 -55
  183. package/sdk/dist/generated/oft_std.js +99 -54
  184. package/sdk/dist/generated/price_feed.d.ts +142 -67
  185. package/sdk/dist/generated/price_feed.js +64 -24
  186. package/sdk/dist/generated/sml.d.ts +113 -32
  187. package/sdk/dist/generated/sml.js +93 -49
  188. package/sdk/dist/generated/treasury.d.ts +896 -0
  189. package/sdk/dist/generated/treasury.js +219 -0
  190. package/sdk/dist/generated/uln302.d.ts +113 -32
  191. package/sdk/dist/generated/uln302.js +93 -49
  192. package/sdk/dist/generated/upgrader.d.ts +2 -2
  193. package/sdk/dist/generated/upgrader.js +1 -1
  194. package/sdk/dist/index.d.ts +2 -0
  195. package/sdk/dist/index.js +3 -0
  196. package/sdk/dist/wasm/blocked-message-lib.d.ts +1 -0
  197. package/sdk/dist/wasm/blocked-message-lib.js +2 -0
  198. package/sdk/dist/wasm/counter.d.ts +1 -0
  199. package/sdk/dist/wasm/counter.js +2 -0
  200. package/sdk/dist/wasm/dvn-fee-lib.d.ts +1 -0
  201. package/sdk/dist/wasm/dvn-fee-lib.js +2 -0
  202. package/sdk/dist/wasm/dvn.d.ts +1 -0
  203. package/sdk/dist/wasm/dvn.js +2 -0
  204. package/sdk/dist/wasm/endpoint-v2.d.ts +1 -0
  205. package/sdk/dist/wasm/endpoint-v2.js +2 -0
  206. package/sdk/dist/wasm/executor-fee-lib.d.ts +1 -0
  207. package/sdk/dist/wasm/executor-fee-lib.js +2 -0
  208. package/sdk/dist/wasm/executor-helper.d.ts +1 -0
  209. package/sdk/dist/wasm/executor-helper.js +2 -0
  210. package/sdk/dist/wasm/executor.d.ts +1 -0
  211. package/sdk/dist/wasm/executor.js +2 -0
  212. package/sdk/dist/wasm/layerzero-views.d.ts +1 -0
  213. package/sdk/dist/wasm/layerzero-views.js +2 -0
  214. package/sdk/dist/wasm/oft-std.d.ts +1 -0
  215. package/sdk/dist/wasm/oft-std.js +2 -0
  216. package/sdk/dist/wasm/price-feed.d.ts +1 -0
  217. package/sdk/dist/wasm/price-feed.js +2 -0
  218. package/sdk/dist/wasm/simple-message-lib.d.ts +1 -0
  219. package/sdk/dist/wasm/simple-message-lib.js +2 -0
  220. package/sdk/dist/wasm/treasury.d.ts +1 -0
  221. package/sdk/dist/wasm/treasury.js +2 -0
  222. package/sdk/dist/wasm/uln302.d.ts +1 -0
  223. package/sdk/dist/wasm/uln302.js +2 -0
  224. package/sdk/dist/wasm/upgrader.d.ts +1 -0
  225. package/sdk/dist/wasm/upgrader.js +2 -0
  226. package/sdk/dist/wasm.d.ts +15 -0
  227. package/sdk/dist/wasm.js +15 -0
  228. package/sdk/package.json +4 -2
  229. package/sdk/src/index.ts +4 -0
  230. package/sdk/test/counter-sml.test.ts +376 -0
  231. package/sdk/test/counter-uln.test.ts +493 -0
  232. package/sdk/test/{oft.test.ts → oft-sml.test.ts} +185 -310
  233. package/sdk/test/suites/constants.ts +22 -2
  234. package/sdk/test/suites/globalSetup.ts +450 -0
  235. package/sdk/test/suites/localnet.ts +23 -6
  236. package/sdk/test/upgrader.test.ts +7 -16
  237. package/sdk/test/utils.ts +558 -85
  238. package/sdk/vitest.config.ts +21 -0
  239. package/tools/ts-bindings-gen/src/main.rs +1 -0
  240. package/turbo.json +2 -0
  241. package/contracts/common-macros/src/contract_impl.rs +0 -52
  242. package/contracts/common-macros/src/ownable.rs +0 -41
  243. package/contracts/common-macros/src/tests/contract_impl.rs +0 -386
  244. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ownable__snapshot_generated_ownable_code.snap +0 -12
  245. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/extend_instance_ttl.rs +0 -50
  246. package/contracts/oapps/oapp-macros/src/oapp_core.rs +0 -41
  247. package/contracts/oapps/oapp-macros/src/oapp_full.rs +0 -21
  248. package/contracts/oapps/oapp-macros/src/oapp_options_type3.rs +0 -31
  249. package/contracts/oapps/oapp-macros/src/oapp_receiver.rs +0 -48
  250. package/contracts/oapps/oapp-macros/src/oapp_sender.rs +0 -21
  251. package/contracts/oapps/oapp-macros/src/util.rs +0 -107
  252. package/contracts/oapps/oft/src/constants.rs +0 -5
  253. package/contracts/oapps/oft/src/default_oft_impl.rs +0 -152
  254. package/contracts/workers/dvn/src/interfaces/multisig.rs +0 -56
  255. package/contracts/workers/dvn/src/multisig.rs +0 -157
  256. package/sdk/test/index.test.ts +0 -375
  257. /package/sdk/test/suites/{testUpgradeable.ts → dummyContractClient.ts} +0 -0
@@ -0,0 +1,896 @@
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, 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 TreasuryError: {
9
+ 1: {
10
+ message: string;
11
+ };
12
+ 2: {
13
+ message: string;
14
+ };
15
+ 3: {
16
+ message: string;
17
+ };
18
+ 4: {
19
+ message: string;
20
+ };
21
+ };
22
+ export type TreasuryStorage = {
23
+ tag: "NativeFeeBp";
24
+ values: void;
25
+ } | {
26
+ tag: "FeeEnabled";
27
+ values: void;
28
+ } | {
29
+ tag: "ZroFeeLib";
30
+ values: void;
31
+ };
32
+ export declare const EndpointError: {
33
+ 1: {
34
+ message: string;
35
+ };
36
+ 2: {
37
+ message: string;
38
+ };
39
+ 3: {
40
+ message: string;
41
+ };
42
+ 4: {
43
+ message: string;
44
+ };
45
+ 5: {
46
+ message: string;
47
+ };
48
+ 6: {
49
+ message: string;
50
+ };
51
+ 7: {
52
+ message: string;
53
+ };
54
+ 8: {
55
+ message: string;
56
+ };
57
+ 9: {
58
+ message: string;
59
+ };
60
+ 10: {
61
+ message: string;
62
+ };
63
+ 11: {
64
+ message: string;
65
+ };
66
+ 12: {
67
+ message: string;
68
+ };
69
+ 13: {
70
+ message: string;
71
+ };
72
+ 14: {
73
+ message: string;
74
+ };
75
+ 15: {
76
+ message: string;
77
+ };
78
+ 16: {
79
+ message: string;
80
+ };
81
+ 17: {
82
+ message: string;
83
+ };
84
+ 18: {
85
+ message: string;
86
+ };
87
+ 19: {
88
+ message: string;
89
+ };
90
+ 20: {
91
+ message: string;
92
+ };
93
+ 21: {
94
+ message: string;
95
+ };
96
+ 22: {
97
+ message: string;
98
+ };
99
+ 23: {
100
+ message: string;
101
+ };
102
+ 24: {
103
+ message: string;
104
+ };
105
+ 25: {
106
+ message: string;
107
+ };
108
+ };
109
+ /**
110
+ * Parameters for sending a cross-chain message.
111
+ */
112
+ export interface MessagingParams {
113
+ /**
114
+ * Destination endpoint ID (chain identifier).
115
+ */
116
+ dst_eid: u32;
117
+ /**
118
+ * The message payload to send.
119
+ */
120
+ message: Buffer;
121
+ /**
122
+ * Encoded executor and DVN options.
123
+ */
124
+ options: Buffer;
125
+ /**
126
+ * Whether to pay fees in ZRO token instead of native token.
127
+ */
128
+ pay_in_zro: boolean;
129
+ /**
130
+ * Receiver address on the destination chain (32 bytes).
131
+ */
132
+ receiver: Buffer;
133
+ }
134
+ /**
135
+ * Source message information identifying where a cross-chain message came from.
136
+ */
137
+ export interface Origin {
138
+ /**
139
+ * Nonce for this pathway.
140
+ */
141
+ nonce: u64;
142
+ /**
143
+ * Sender address on the source chain (32 bytes).
144
+ */
145
+ sender: Buffer;
146
+ /**
147
+ * Source endpoint ID (chain identifier).
148
+ */
149
+ src_eid: u32;
150
+ }
151
+ /**
152
+ * Fee structure for cross-chain messaging.
153
+ */
154
+ export interface MessagingFee {
155
+ /**
156
+ * Fee paid in native token (XLM).
157
+ */
158
+ native_fee: i128;
159
+ /**
160
+ * Fee paid in ZRO token (LayerZero token).
161
+ */
162
+ zro_fee: i128;
163
+ }
164
+ /**
165
+ * Receipt returned after successfully sending a cross-chain message.
166
+ */
167
+ export interface MessagingReceipt {
168
+ /**
169
+ * The fees charged for sending the message.
170
+ */
171
+ fee: MessagingFee;
172
+ /**
173
+ * Globally unique identifier for the message.
174
+ */
175
+ guid: Buffer;
176
+ /**
177
+ * The outbound nonce for this pathway.
178
+ */
179
+ nonce: u64;
180
+ }
181
+ /**
182
+ * Type of message library indicating supported operations.
183
+ */
184
+ export type MessageLibType = {
185
+ tag: "Send";
186
+ values: void;
187
+ } | {
188
+ tag: "Receive";
189
+ values: void;
190
+ } | {
191
+ tag: "SendAndReceive";
192
+ values: void;
193
+ };
194
+ /**
195
+ * Version information for a message library.
196
+ *
197
+ * Note: `minor` and `endpoint_version` use `u32` instead of `u8` because Stellar does not
198
+ * support `u8` types in contract interface functions.
199
+ */
200
+ export interface MessageLibVersion {
201
+ /**
202
+ * Endpoint version (should not exceed u8::MAX = 255).
203
+ */
204
+ endpoint_version: u32;
205
+ /**
206
+ * Major version number.
207
+ */
208
+ major: u64;
209
+ /**
210
+ * Minor version number (should not exceed u8::MAX = 255).
211
+ */
212
+ minor: u32;
213
+ }
214
+ /**
215
+ * Timeout configuration for receive library transitions.
216
+ */
217
+ export interface Timeout {
218
+ /**
219
+ * Unix timestamp when the timeout expires.
220
+ */
221
+ expiry: u64;
222
+ /**
223
+ * The new library address to transition to.
224
+ */
225
+ lib: string;
226
+ }
227
+ /**
228
+ * Parameters for setting message library configuration.
229
+ */
230
+ export interface SetConfigParam {
231
+ /**
232
+ * XDR-encoded configuration data.
233
+ */
234
+ config: Buffer;
235
+ /**
236
+ * The type of configuration (e.g., executor, ULN).
237
+ */
238
+ config_type: u32;
239
+ /**
240
+ * The endpoint ID this config applies to.
241
+ */
242
+ eid: u32;
243
+ }
244
+ /**
245
+ * Resolved library information with default status.
246
+ */
247
+ export interface ResolvedLibrary {
248
+ /**
249
+ * Whether this is the default library (true) or OApp-specific (false).
250
+ */
251
+ is_default: boolean;
252
+ /**
253
+ * The resolved library address.
254
+ */
255
+ lib: string;
256
+ }
257
+ /**
258
+ * Outbound packet containing all information for cross-chain transmission.
259
+ */
260
+ export interface OutboundPacket {
261
+ /**
262
+ * Destination endpoint ID.
263
+ */
264
+ dst_eid: u32;
265
+ /**
266
+ * Globally unique identifier for this message.
267
+ */
268
+ guid: Buffer;
269
+ /**
270
+ * The message payload.
271
+ */
272
+ message: Buffer;
273
+ /**
274
+ * Outbound nonce for this pathway.
275
+ */
276
+ nonce: u64;
277
+ /**
278
+ * Receiver address on destination chain (32 bytes).
279
+ */
280
+ receiver: Buffer;
281
+ /**
282
+ * Sender address on source chain.
283
+ */
284
+ sender: string;
285
+ /**
286
+ * Source endpoint ID.
287
+ */
288
+ src_eid: u32;
289
+ }
290
+ /**
291
+ * A fee recipient with the amount to be paid.
292
+ */
293
+ export interface FeeRecipient {
294
+ /**
295
+ * Amount of fee to pay.
296
+ */
297
+ amount: i128;
298
+ /**
299
+ * The address to send the fee to.
300
+ */
301
+ to: string;
302
+ }
303
+ /**
304
+ * Result of send operation containing fees and encoded packet.
305
+ */
306
+ export interface FeesAndPacket {
307
+ /**
308
+ * The encoded packet ready for transmission.
309
+ */
310
+ encoded_packet: Buffer;
311
+ /**
312
+ * List of native token fee recipients (executor, DVNs, treasury).
313
+ */
314
+ native_fee_recipients: Array<FeeRecipient>;
315
+ /**
316
+ * List of ZRO token fee recipients (treasury).
317
+ */
318
+ zro_fee_recipients: Array<FeeRecipient>;
319
+ }
320
+ /**
321
+ * PacketCodecV1Error: 1100-1109
322
+ */
323
+ export declare const PacketCodecV1Error: {
324
+ 1100: {
325
+ message: string;
326
+ };
327
+ 1101: {
328
+ message: string;
329
+ };
330
+ };
331
+ /**
332
+ * WorkerOptionsError: 1110-1119
333
+ */
334
+ export declare const WorkerOptionsError: {
335
+ 1110: {
336
+ message: string;
337
+ };
338
+ 1111: {
339
+ message: string;
340
+ };
341
+ 1112: {
342
+ message: string;
343
+ };
344
+ 1113: {
345
+ message: string;
346
+ };
347
+ 1114: {
348
+ message: string;
349
+ };
350
+ 1115: {
351
+ message: string;
352
+ };
353
+ 1116: {
354
+ message: string;
355
+ };
356
+ 1117: {
357
+ message: string;
358
+ };
359
+ 1118: {
360
+ message: string;
361
+ };
362
+ };
363
+ /**
364
+ * BufferReaderError: 1000-1009
365
+ */
366
+ export declare const BufferReaderError: {
367
+ 1000: {
368
+ message: string;
369
+ };
370
+ 1001: {
371
+ message: string;
372
+ };
373
+ };
374
+ /**
375
+ * BufferWriterError: 1010-1019
376
+ */
377
+ export declare const BufferWriterError: {
378
+ 1010: {
379
+ message: string;
380
+ };
381
+ };
382
+ /**
383
+ * TtlConfigurableError: 1020-1029
384
+ */
385
+ export declare const TtlConfigurableError: {
386
+ 1020: {
387
+ message: string;
388
+ };
389
+ 1021: {
390
+ message: string;
391
+ };
392
+ 1022: {
393
+ message: string;
394
+ };
395
+ };
396
+ /**
397
+ * OwnableError: 1030-1039
398
+ */
399
+ export declare const OwnableError: {
400
+ 1030: {
401
+ message: string;
402
+ };
403
+ 1031: {
404
+ message: string;
405
+ };
406
+ };
407
+ /**
408
+ * BytesExtError: 1040-1049
409
+ */
410
+ export declare const BytesExtError: {
411
+ 1040: {
412
+ message: string;
413
+ };
414
+ };
415
+ /**
416
+ * UpgradeableError: 1050-1059
417
+ */
418
+ export declare const UpgradeableError: {
419
+ 1050: {
420
+ message: string;
421
+ };
422
+ };
423
+ /**
424
+ * MultisigError: 1060-1069
425
+ */
426
+ export declare const MultisigError: {
427
+ 1060: {
428
+ message: string;
429
+ };
430
+ 1061: {
431
+ message: string;
432
+ };
433
+ 1062: {
434
+ message: string;
435
+ };
436
+ 1063: {
437
+ message: string;
438
+ };
439
+ 1064: {
440
+ message: string;
441
+ };
442
+ 1065: {
443
+ message: string;
444
+ };
445
+ 1066: {
446
+ message: string;
447
+ };
448
+ 1067: {
449
+ message: string;
450
+ };
451
+ };
452
+ export type MultisigStorage = {
453
+ tag: "Signers";
454
+ values: void;
455
+ } | {
456
+ tag: "Threshold";
457
+ values: void;
458
+ };
459
+ export type OwnableStorage = {
460
+ tag: "Owner";
461
+ values: void;
462
+ };
463
+ /**
464
+ * TTL configuration: threshold (when to extend) and extend_to (target TTL).
465
+ */
466
+ export interface TtlConfig {
467
+ /**
468
+ * Target TTL after extension (in ledgers).
469
+ */
470
+ extend_to: u32;
471
+ /**
472
+ * TTL threshold that triggers extension (in ledgers).
473
+ */
474
+ threshold: u32;
475
+ }
476
+ export type TtlConfigStorage = {
477
+ tag: "Frozen";
478
+ values: void;
479
+ } | {
480
+ tag: "Instance";
481
+ values: void;
482
+ } | {
483
+ tag: "Persistent";
484
+ values: void;
485
+ };
486
+ export type UpgradeableStorage = {
487
+ tag: "Migrating";
488
+ values: void;
489
+ };
490
+ export interface Client {
491
+ /**
492
+ * 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.
493
+ * Get the treasury fee for a cross-chain message.
494
+ *
495
+ * Returns 0 if fee collection is disabled. For ZRO payments, delegates to the ZRO fee library.
496
+ */
497
+ get_fee: ({ sender, dst_eid, total_native_fee, pay_in_zro }: {
498
+ sender: string;
499
+ dst_eid: u32;
500
+ total_native_fee: i128;
501
+ pay_in_zro: boolean;
502
+ }, txnOptions?: {
503
+ /**
504
+ * The fee to pay for the transaction. Default: BASE_FEE
505
+ */
506
+ fee?: number;
507
+ /**
508
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
509
+ */
510
+ timeoutInSeconds?: number;
511
+ /**
512
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
513
+ */
514
+ simulate?: boolean;
515
+ }) => Promise<AssembledTransaction<i128>>;
516
+ /**
517
+ * Construct and simulate a set_native_fee_bp 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.
518
+ * Sets the native fee percentage in basis points.
519
+ *
520
+ * # Arguments
521
+ * * `native_fee_bp` - Fee percentage in basis points (0-10000, where 10000 = 100%)
522
+ */
523
+ set_native_fee_bp: ({ native_fee_bp }: {
524
+ native_fee_bp: u32;
525
+ }, txnOptions?: {
526
+ /**
527
+ * The fee to pay for the transaction. Default: BASE_FEE
528
+ */
529
+ fee?: number;
530
+ /**
531
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
532
+ */
533
+ timeoutInSeconds?: number;
534
+ /**
535
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
536
+ */
537
+ simulate?: boolean;
538
+ }) => Promise<AssembledTransaction<null>>;
539
+ /**
540
+ * Construct and simulate a set_fee_enabled 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.
541
+ * Enables or disables fee collection globally.
542
+ *
543
+ * # Arguments
544
+ * * `fee_enabled` - Whether fee collection is enabled
545
+ */
546
+ set_fee_enabled: ({ fee_enabled }: {
547
+ fee_enabled: boolean;
548
+ }, txnOptions?: {
549
+ /**
550
+ * The fee to pay for the transaction. Default: BASE_FEE
551
+ */
552
+ fee?: number;
553
+ /**
554
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
555
+ */
556
+ timeoutInSeconds?: number;
557
+ /**
558
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
559
+ */
560
+ simulate?: boolean;
561
+ }) => Promise<AssembledTransaction<null>>;
562
+ /**
563
+ * Construct and simulate a set_zro_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.
564
+ * Sets or removes the ZRO fee library for custom ZRO token fee calculations.
565
+ *
566
+ * # Arguments
567
+ * * `zro_fee_lib` - The ZRO fee library contract address, or `None` to remove
568
+ */
569
+ set_zro_fee_lib: ({ zro_fee_lib }: {
570
+ zro_fee_lib: Option<string>;
571
+ }, txnOptions?: {
572
+ /**
573
+ * The fee to pay for the transaction. Default: BASE_FEE
574
+ */
575
+ fee?: number;
576
+ /**
577
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
578
+ */
579
+ timeoutInSeconds?: number;
580
+ /**
581
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
582
+ */
583
+ simulate?: boolean;
584
+ }) => Promise<AssembledTransaction<null>>;
585
+ /**
586
+ * 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.
587
+ * Withdraws any token (including native XLM) from the contract to a specified address.
588
+ *
589
+ * Only the contract owner can execute this method.
590
+ *
591
+ * # Arguments
592
+ * * `token` - The token contract address (can be native XLM or any other token)
593
+ * * `to` - The recipient address
594
+ * * `amount` - The amount to withdraw (must be positive)
595
+ */
596
+ withdraw_token: ({ token, to, amount }: {
597
+ token: string;
598
+ to: string;
599
+ amount: i128;
600
+ }, txnOptions?: {
601
+ /**
602
+ * The fee to pay for the transaction. Default: BASE_FEE
603
+ */
604
+ fee?: number;
605
+ /**
606
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
607
+ */
608
+ timeoutInSeconds?: number;
609
+ /**
610
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
611
+ */
612
+ simulate?: boolean;
613
+ }) => Promise<AssembledTransaction<null>>;
614
+ /**
615
+ * Construct and simulate a native_fee_bp 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.
616
+ * Returns the native fee percentage in basis points.
617
+ */
618
+ native_fee_bp: (txnOptions?: {
619
+ /**
620
+ * The fee to pay for the transaction. Default: BASE_FEE
621
+ */
622
+ fee?: number;
623
+ /**
624
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
625
+ */
626
+ timeoutInSeconds?: number;
627
+ /**
628
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
629
+ */
630
+ simulate?: boolean;
631
+ }) => Promise<AssembledTransaction<u32>>;
632
+ /**
633
+ * Construct and simulate a fee_enabled 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.
634
+ * Returns whether fee collection is enabled.
635
+ */
636
+ fee_enabled: (txnOptions?: {
637
+ /**
638
+ * The fee to pay for the transaction. Default: BASE_FEE
639
+ */
640
+ fee?: number;
641
+ /**
642
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
643
+ */
644
+ timeoutInSeconds?: number;
645
+ /**
646
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
647
+ */
648
+ simulate?: boolean;
649
+ }) => Promise<AssembledTransaction<boolean>>;
650
+ /**
651
+ * Construct and simulate a zro_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.
652
+ * Returns the ZRO fee library address if set.
653
+ */
654
+ zro_fee_lib: (txnOptions?: {
655
+ /**
656
+ * The fee to pay for the transaction. Default: BASE_FEE
657
+ */
658
+ fee?: number;
659
+ /**
660
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
661
+ */
662
+ timeoutInSeconds?: number;
663
+ /**
664
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
665
+ */
666
+ simulate?: boolean;
667
+ }) => Promise<AssembledTransaction<Option<string>>>;
668
+ /**
669
+ * 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.
670
+ */
671
+ authorizer: (txnOptions?: {
672
+ /**
673
+ * The fee to pay for the transaction. Default: BASE_FEE
674
+ */
675
+ fee?: number;
676
+ /**
677
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
678
+ */
679
+ timeoutInSeconds?: number;
680
+ /**
681
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
682
+ */
683
+ simulate?: boolean;
684
+ }) => Promise<AssembledTransaction<string>>;
685
+ /**
686
+ * 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.
687
+ * Sets TTL configs for instance and persistent storage.
688
+ *
689
+ * - `None` values remove the corresponding config (disables auto-extension for that type)
690
+ * - Validates that `threshold <= extend_to <= MAX_TTL`
691
+ *
692
+ * # Arguments
693
+ * - `instance` - TTL config for instance storage
694
+ * - `persistent` - TTL config for persistent storage
695
+ *
696
+ * # Panics
697
+ * - `TtlConfigFrozen` if configs are frozen
698
+ * - `InvalidTtlConfig` if validation fails
699
+ */
700
+ set_ttl_configs: ({ instance, persistent }: {
701
+ instance: Option<TtlConfig>;
702
+ persistent: Option<TtlConfig>;
703
+ }, txnOptions?: {
704
+ /**
705
+ * The fee to pay for the transaction. Default: BASE_FEE
706
+ */
707
+ fee?: number;
708
+ /**
709
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
710
+ */
711
+ timeoutInSeconds?: number;
712
+ /**
713
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
714
+ */
715
+ simulate?: boolean;
716
+ }) => Promise<AssembledTransaction<null>>;
717
+ /**
718
+ * 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.
719
+ * Returns the current TTL configs as (instance_config, persistent_config).
720
+ */
721
+ ttl_configs: (txnOptions?: {
722
+ /**
723
+ * The fee to pay for the transaction. Default: BASE_FEE
724
+ */
725
+ fee?: number;
726
+ /**
727
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
728
+ */
729
+ timeoutInSeconds?: number;
730
+ /**
731
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
732
+ */
733
+ simulate?: boolean;
734
+ }) => Promise<AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>>;
735
+ /**
736
+ * 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.
737
+ * Permanently freezes TTL configs, preventing any future modifications.
738
+ *
739
+ * This is irreversible and provides immutability guarantees to users.
740
+ * Emits `TtlConfigsFrozen` event.
741
+ *
742
+ * # Panics
743
+ * - `TtlConfigAlreadyFrozen` if already frozen
744
+ */
745
+ freeze_ttl_configs: (txnOptions?: {
746
+ /**
747
+ * The fee to pay for the transaction. Default: BASE_FEE
748
+ */
749
+ fee?: number;
750
+ /**
751
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
752
+ */
753
+ timeoutInSeconds?: number;
754
+ /**
755
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
756
+ */
757
+ simulate?: boolean;
758
+ }) => Promise<AssembledTransaction<null>>;
759
+ /**
760
+ * 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.
761
+ * Returns whether TTL configs are frozen.
762
+ */
763
+ is_ttl_configs_frozen: (txnOptions?: {
764
+ /**
765
+ * The fee to pay for the transaction. Default: BASE_FEE
766
+ */
767
+ fee?: number;
768
+ /**
769
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
770
+ */
771
+ timeoutInSeconds?: number;
772
+ /**
773
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
774
+ */
775
+ simulate?: boolean;
776
+ }) => Promise<AssembledTransaction<boolean>>;
777
+ /**
778
+ * 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.
779
+ * Extends the instance TTL.
780
+ *
781
+ * # Arguments
782
+ *
783
+ * * `threshold` - The threshold to extend the TTL (if current TTL is below this, extend).
784
+ * * `extend_to` - The TTL to extend to.
785
+ */
786
+ extend_instance_ttl: ({ threshold, extend_to }: {
787
+ threshold: u32;
788
+ extend_to: u32;
789
+ }, txnOptions?: {
790
+ /**
791
+ * The fee to pay for the transaction. Default: BASE_FEE
792
+ */
793
+ fee?: number;
794
+ /**
795
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
796
+ */
797
+ timeoutInSeconds?: number;
798
+ /**
799
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
800
+ */
801
+ simulate?: boolean;
802
+ }) => Promise<AssembledTransaction<null>>;
803
+ /**
804
+ * 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.
805
+ * Returns the current owner address, or None if no owner is set.
806
+ */
807
+ owner: (txnOptions?: {
808
+ /**
809
+ * The fee to pay for the transaction. Default: BASE_FEE
810
+ */
811
+ fee?: number;
812
+ /**
813
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
814
+ */
815
+ timeoutInSeconds?: number;
816
+ /**
817
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
818
+ */
819
+ simulate?: boolean;
820
+ }) => Promise<AssembledTransaction<Option<string>>>;
821
+ /**
822
+ * 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.
823
+ * Transfers ownership to a new address. Requires current owner authorization.
824
+ */
825
+ transfer_ownership: ({ new_owner }: {
826
+ new_owner: string;
827
+ }, txnOptions?: {
828
+ /**
829
+ * The fee to pay for the transaction. Default: BASE_FEE
830
+ */
831
+ fee?: number;
832
+ /**
833
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
834
+ */
835
+ timeoutInSeconds?: number;
836
+ /**
837
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
838
+ */
839
+ simulate?: boolean;
840
+ }) => Promise<AssembledTransaction<null>>;
841
+ /**
842
+ * 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.
843
+ * Permanently renounces ownership. Requires current owner authorization.
844
+ */
845
+ renounce_ownership: (txnOptions?: {
846
+ /**
847
+ * The fee to pay for the transaction. Default: BASE_FEE
848
+ */
849
+ fee?: number;
850
+ /**
851
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
852
+ */
853
+ timeoutInSeconds?: number;
854
+ /**
855
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
856
+ */
857
+ simulate?: boolean;
858
+ }) => Promise<AssembledTransaction<null>>;
859
+ }
860
+ export declare class Client extends ContractClient {
861
+ readonly options: ContractClientOptions;
862
+ static deploy<T = Client>(
863
+ /** Constructor/Initialization Args for the contract's `__constructor` method */
864
+ { owner }: {
865
+ owner: string;
866
+ },
867
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
868
+ options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
869
+ /** The hash of the Wasm blob, which must already be installed on-chain. */
870
+ wasmHash: Buffer | string;
871
+ /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
872
+ salt?: Buffer | Uint8Array;
873
+ /** The format used to decode `wasmHash`, if it's provided as a string. */
874
+ format?: "hex" | "base64";
875
+ }): Promise<AssembledTransaction<T>>;
876
+ constructor(options: ContractClientOptions);
877
+ readonly fromJSON: {
878
+ get_fee: (json: string) => AssembledTransaction<bigint>;
879
+ set_native_fee_bp: (json: string) => AssembledTransaction<null>;
880
+ set_fee_enabled: (json: string) => AssembledTransaction<null>;
881
+ set_zro_fee_lib: (json: string) => AssembledTransaction<null>;
882
+ withdraw_token: (json: string) => AssembledTransaction<null>;
883
+ native_fee_bp: (json: string) => AssembledTransaction<number>;
884
+ fee_enabled: (json: string) => AssembledTransaction<boolean>;
885
+ zro_fee_lib: (json: string) => AssembledTransaction<Option<string>>;
886
+ authorizer: (json: string) => AssembledTransaction<string>;
887
+ set_ttl_configs: (json: string) => AssembledTransaction<null>;
888
+ ttl_configs: (json: string) => AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>;
889
+ freeze_ttl_configs: (json: string) => AssembledTransaction<null>;
890
+ is_ttl_configs_frozen: (json: string) => AssembledTransaction<boolean>;
891
+ extend_instance_ttl: (json: string) => AssembledTransaction<null>;
892
+ owner: (json: string) => AssembledTransaction<Option<string>>;
893
+ transfer_ownership: (json: string) => AssembledTransaction<null>;
894
+ renounce_ownership: (json: string) => AssembledTransaction<null>;
895
+ };
896
+ }