whisky
Github
  • whisky
  • WASM - whisky-js
  • Tx Builder
    • Getting Started
      • Lock Fund
      • Unlock Fund
      • Mint Tokens
      • Delegate Stake
      • Complex Transaction
    • Service Integration
  • Tx Parser
    • Parse Transaction CBOR
    • Unit Testing Transaction
    • Rebuilding Transaction
  • Services
    • Providers
      • Fetcher
      • Evaluator
      • Submitter
Powered by GitBook
On this page
  1. Tx Builder

Getting Started

PreviousWASM - whisky-jsNextLock Fund

Last updated 11 days ago

To start building an customized transaction, you need to first initialize TxBuilder:

let tx_builder_params = TxBuilderParam {
    evaluator: None,
    fetcher: None,
    submitter: None,
    params: None,
};
let mut tx_builder = TxBuilder::new(tx_builder_params);

There are 4 optional fields to pass in to initialize the TxBuilder instance:

  1. fetcher - Refer to .

  2. submitter - Refer to .

  3. evaluator - Refer to .

  4. paramsYou can pass in the protocol parameters directly.

For details about providers' eligibility for each service role, please refer to the session.

Alternatively, if you do not need any of the provider services, you can initialize a TxBuilder with the new_core method:

let mut tx_builder = TxBuilder::new_core();

Remarks

  • Only evaluator service with off-node evaluation is integrated at the moment. Other integrations, as described above have been planned and are coming soon.

service integration
service integration
service integration
providers'