fuels/
lib.rs

1//! # Fuel Rust SDK.
2//!
3//! ## Quickstart: `prelude`
4//!
5//! A prelude is provided which imports all the important data types and traits for you. Use this when you want to quickly bootstrap a new project.
6//!
7//! ```no_run
8//! # #[allow(unused)]
9//! use fuels::prelude::*;
10//! ```
11//!
12//! Examples on how you can use the types imported by the prelude can be found in
13//! the [test suite](https://github.com/FuelLabs/fuels-rs/tree/master/packages/fuels/tests)
14
15pub mod tx {
16    pub use fuel_tx::{
17        ConsensusParameters, ContractIdExt, ContractParameters, FeeParameters, GasCosts,
18        PredicateParameters, Receipt, ScriptExecutionResult, ScriptParameters, StorageSlot,
19        Transaction as FuelTransaction, TxId, TxParameters, TxPointer, UpgradePurpose,
20        UploadSubsection, UtxoId, Witness, consensus_parameters, field,
21    };
22}
23
24#[cfg(feature = "std")]
25pub mod client {
26    pub use fuel_core_client::client::{
27        FuelClient,
28        pagination::{PageDirection, PaginationRequest},
29    };
30}
31
32pub mod macros {
33    pub use fuels_macros::*;
34}
35
36pub mod programs {
37    pub use fuels_programs::*;
38}
39
40pub mod core {
41    pub use fuels_core::{Configurable, Configurables, codec, constants, offsets, traits};
42}
43
44pub mod crypto {
45    pub use fuel_crypto::{Hasher, Message, PublicKey, SecretKey, Signature};
46}
47
48pub mod accounts {
49    pub use fuels_accounts::*;
50}
51
52pub mod types {
53    pub use fuels_core::types::*;
54}
55
56#[cfg(feature = "std")]
57pub mod test_helpers {
58    pub use fuels_test_helpers::*;
59}
60
61#[doc(hidden)]
62pub mod prelude {
63    #[cfg(feature = "std")]
64    pub use super::{
65        accounts::{
66            Account, ViewOnlyAccount, predicate::Predicate, provider::*, signers::*, wallet::Wallet,
67        },
68        core::{
69            codec::{LogDecoder, LogId, LogResult},
70            traits::Signer,
71        },
72        macros::setup_program_test,
73        programs::{
74            calls::{CallHandler, CallParameters, ContractDependency, Execution},
75            contract::{Contract, LoadConfiguration, StorageConfiguration},
76        },
77        test_helpers::*,
78        types::transaction_builders::*,
79    };
80    pub use super::{
81        core::constants::*,
82        macros::abigen,
83        tx::Receipt,
84        types::{
85            Address, AssetId, Bytes, ContractId, RawSlice, Salt,
86            errors::{Error, Result},
87            transaction::*,
88        },
89    };
90}