pub struct CallOptions {
pub satoshis: Option<i64>,
pub change_address: Option<String>,
pub new_state: Option<HashMap<String, SdkValue>>,
pub outputs: Option<Vec<OutputSpec>>,
pub additional_contract_inputs: Option<Vec<Utxo>>,
pub additional_contract_input_args: Option<Vec<Vec<SdkValue>>>,
pub change_pub_key: Option<String>,
pub terminal_outputs: Option<Vec<TerminalOutput>>,
}Expand description
Options for calling a contract method.
Fields§
§satoshis: Option<i64>Satoshis for the next output (stateful contracts).
change_address: Option<String>§new_state: Option<HashMap<String, SdkValue>>New state values for the continuation output (stateful contracts).
outputs: Option<Vec<OutputSpec>>Multiple continuation outputs for multi-output methods (e.g., transfer).
When provided, replaces the single continuation output from new_state.
additional_contract_inputs: Option<Vec<Utxo>>Additional contract UTXOs as inputs (e.g., merge, swap). Each input is signed with the same method and args as the primary call, with OP_PUSH_TX and Sig auto-computed per input.
additional_contract_input_args: Option<Vec<Vec<SdkValue>>>Per-input args for additional contract inputs. When provided,
additional_contract_input_args[i] overrides args for
additional_contract_inputs[i]. Sig params (Auto) are still auto-computed.
change_pub_key: Option<String>Override the public key used for the change output (hex-encoded). Defaults to the signer’s public key.
terminal_outputs: Option<Vec<TerminalOutput>>Terminal outputs for methods that verify exact output structure via extractOutputHash(). When set, the transaction is built with ONLY the contract UTXO as input (no funding inputs, no change output). The fee comes from the contract balance. The contract is considered fully spent after this call (currentUtxo becomes None).
Trait Implementations§
Source§impl Clone for CallOptions
impl Clone for CallOptions
Source§fn clone(&self) -> CallOptions
fn clone(&self) -> CallOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CallOptions
impl Debug for CallOptions
Source§impl Default for CallOptions
impl Default for CallOptions
Source§fn default() -> CallOptions
fn default() -> CallOptions
Auto Trait Implementations§
impl Freeze for CallOptions
impl RefUnwindSafe for CallOptions
impl Send for CallOptions
impl Sync for CallOptions
impl Unpin for CallOptions
impl UnsafeUnpin for CallOptions
impl UnwindSafe for CallOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more