1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! # Neo Builder Module
//!
//! Advanced tooling for constructing Neo N3 transactions and smart contract scripts.
//!
//! ## Overview
//!
//! The neo_builder module provides a comprehensive set of utilities for constructing
//! and manipulating Neo N3 transactions and scripts. It offers a flexible API for
//! building various types of transactions, from simple transfers to complex
//! multi-signature contract invocations.
//!
//! ## Key Components
//!
//! ### Transaction Building
//!
//! - **Transaction Builder**: Fluent API for creating and configuring transactions
//! - **Fee Calculation**: Automatic network and system fee calculation
//! - **Signer Management**: Support for multiple transaction signers with different scopes
//! - **Witness Configuration**: Tools for creating and managing transaction witnesses
//! - **Attribute Handling**: Support for transaction attributes
//!
//! ### Script Construction
//!
//! - **Script Builder**: Create VM scripts for contract invocation
//! - **Opcode Support**: Full support for Neo VM opcodes
//! - **Parameter Handling**: Type-safe handling of contract parameters
//! - **Verification Scripts**: Utilities for building signature verification scripts
//!
//! ### Advanced Features
//!
//! - **Multi-signature Support**: Create and work with multi-signature accounts
//! - **Helper Methods**: Convenience methods for common operations
//! - **Serialization**: Serialization utilities for network transmission
//!
//! ## Examples
//!
//! ### Building Transactions and Scripts
//!
//! ```no_run
//! use neo3::neo_builder::{ScriptBuilder, Signer, WitnessScope, TransactionSigner};
//! use neo3::neo_types::{ContractParameter, ScriptHash};
//! use std::str::FromStr;
//!
//! fn basic_examples() -> Result<(), Box<dyn std::error::Error>> {
//! // 1. Create a simple script builder
//! let mut script_builder = ScriptBuilder::new();
//! script_builder.push_data("Hello Neo!".as_bytes().to_vec());
//! let script = script_builder.to_bytes();
//! println!("Script length: {} bytes", script.len());
//!
//! // 2. Create a transaction signer
//! let script_hash = ScriptHash::from_str("0x1234567890123456789012345678901234567890")?;
//! let _signer = Signer::TransactionSigner(
//! TransactionSigner::new(script_hash, vec![WitnessScope::CalledByEntry])?
//! );
//!
//! // 3. Example contract call
//! let mut contract_builder = ScriptBuilder::new();
//! let gas_token = ScriptHash::from_str("d2a4cff31913016155e38e474a2c06d08be276cf")?;
//! contract_builder.contract_call(
//! &gas_token,
//! "balanceOf",
//! &[ContractParameter::h160(&script_hash)],
//! None,
//! )?;
//! let contract_script = contract_builder.to_bytes();
//! println!("Contract script length: {} bytes", contract_script.len());
//!
//! Ok(())
//! }
//! ```
pub use *;
pub use *;
pub use *;
pub use *;