File tree Expand file tree Collapse file tree 2 files changed +3
-30
lines changed Expand file tree Collapse file tree 2 files changed +3
-30
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,9 @@ println!("Current height: {}", node.current_block_height());
30
30
Furthermore a number of helper methods are implemented as well, such as:
31
31
32
32
``` rust
33
- /// A CLI interactive interface for prompting a user to select an address
34
- pub fn select_wallet_address (& self ) -> Result <P2PKAddressString >
35
-
36
33
34
+ /// Get the current state context of the blockchain
35
+ pub fn get_state_context (& self ) -> Result <ErgoStateContext >
37
36
/// Returns a sorted list of unspent boxes which cover at least the
38
37
/// provided value `total` of nanoErgs.
39
38
/// Note: This box selection strategy simply uses the largest
@@ -99,4 +98,4 @@ cargo doc --open
99
98
100
99
Contributing
101
100
============
102
- See [ CONTRIBUTING] ( CONTRIBUTING.md )
101
+ See [ CONTRIBUTING] ( CONTRIBUTING.md )
Original file line number Diff line number Diff line change @@ -30,32 +30,6 @@ impl NodeInterface {
30
30
Ok ( addresses)
31
31
}
32
32
33
- /// A CLI interactive interface for prompting a user to select an address
34
- pub fn select_wallet_address ( & self ) -> Result < P2PKAddressString > {
35
- let address_list = self . wallet_addresses ( ) ?;
36
- if address_list. len ( ) == 1 {
37
- return Ok ( address_list[ 0 ] . clone ( ) ) ;
38
- }
39
-
40
- let mut n = 0 ;
41
- for address in & address_list {
42
- n += 1 ;
43
- println ! ( "{n}. {address}" ) ;
44
- }
45
- println ! ( "Which address would you like to select?" ) ;
46
- let mut input = String :: new ( ) ;
47
- if std:: io:: stdin ( ) . read_line ( & mut input) . is_ok ( ) {
48
- if let Ok ( input_n) = input. trim ( ) . parse :: < usize > ( ) {
49
- if input_n > address_list. len ( ) || input_n < 1 {
50
- println ! ( "Please select an address within the range." ) ;
51
- return self . select_wallet_address ( ) ;
52
- }
53
- return Ok ( address_list[ input_n - 1 ] . clone ( ) ) ;
54
- }
55
- }
56
- self . select_wallet_address ( )
57
- }
58
-
59
33
/// Acquires unspent boxes from the node wallet
60
34
pub fn unspent_boxes ( & self ) -> Result < Vec < ErgoBox > > {
61
35
let endpoint = "/wallet/boxes/unspent?minConfirmations=0&minInclusionHeight=0" ;
You can’t perform that action at this time.
0 commit comments