Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SaitoTech/saito-rust
/ functions
Functions
495 in github.com/SaitoTech/saito-rust
⨍
Functions
495
◇
Types & classes
53
↓ 68 callers
Method
read
read from a path to a Vec<u8>
src/storage.rs:40
↓ 68 callers
Method
write
(data: Vec<u8>, filename: &str)
src/storage.rs:47
↓ 51 callers
Method
get_hash
(&self)
src/block.rs:252
↓ 43 callers
Function
hash
(data: &Vec<u8>)
src/crypto.rs:88
↓ 41 callers
Method
set_amount
(&mut self, amount: u64)
src/slip.rs:174
↓ 39 callers
Method
set_slip_type
(&mut self, slip_type: SlipType)
src/slip.rs:190
↓ 34 callers
Method
add_block
(&mut self, block: Block)
src/mempool.rs:60
↓ 32 callers
Method
get_publickey
(&self)
src/peer.rs:209
↓ 31 callers
Method
add_block
(&mut self, mut block: Block)
src/blockchain.rs:82
↓ 28 callers
Method
get_slip_type
(&self)
src/slip.rs:166
↓ 27 callers
Method
is_empty
(&self)
src/blockring.rs:130
↓ 24 callers
Function
create_timestamp
()
src/time.rs:4
↓ 24 callers
Method
generate_block_and_metadata
( &self, parent_hash: SaitoHash, timestamp: u64, vip_transactions: usize,
src/test_utilities/test_manager.rs:259
↓ 24 callers
Method
get_utxoset_key
33 bytes publickey 32 bytes uuid 8 bytes amount 1 byte slip_ordinal
src/slip.rs:290
↓ 24 callers
Method
set_publickey
(&mut self, publickey: SaitoPublicKey)
src/peer.rs:206
↓ 22 callers
Method
generate_metadata
before we validate the block we need to generate some information such as the hash of the transaction message data that is used to generate the signat
src/block.rs:1219
↓ 22 callers
Method
get_privatekey
(&self)
src/wallet.rs:180
↓ 21 callers
Method
serialize
(&self)
src/networking/api_message.rs:77
↓ 20 callers
Method
add_output
(&mut self, output_slip: Slip)
src/transaction.rs:382
↓ 20 callers
Method
get_id
(&self)
src/block.rs:261
↓ 19 callers
Method
get_amount
(&self)
src/slip.rs:150
↓ 19 callers
Method
get_transactions
(&self)
src/block.rs:248
↓ 18 callers
Method
sign
(&mut self, publickey: SaitoPublicKey, privatekey: SaitoPrivateKey)
src/block.rs:537
↓ 17 callers
Method
add_deposit
(&mut self, slip: Slip)
src/staking.rs:186
↓ 16 callers
Method
add_staker
slips are added in ascending order based on publickey and then UUID. this is simply to ensure that chain reorgs do not cause disagreements about which
src/staking.rs:195
↓ 15 callers
Method
on_chain_reorganization
(&mut self, hash: SaitoHash, lc: bool)
src/blockring.rs:66
↓ 15 callers
Method
set_uuid
(&mut self, uuid: SaitoHash)
src/slip.rs:182
↓ 14 callers
Method
get_block
(&self, block_hash: &SaitoHash)
src/blockchain.rs:751
↓ 14 callers
Method
get_publickey
(&self)
src/wallet.rs:184
↓ 13 callers
Method
add_input
(&mut self, input_slip: Slip)
src/transaction.rs:378
↓ 13 callers
Method
get_timestamp
(&self)
src/block.rs:265
↓ 13 callers
Method
on_chain_reorganization
keeps any blockchain variables like fork_id or genesis_period tracking variables updated as the chain gets new blocks. also pre-loads any blocks neede
src/blockchain.rs:1200
↓ 13 callers
Method
serialize_for_signature
serialize major block components for block signature this will manually calculate the merkle_root if necessary but it is advised that the merkle_root
src/block.rs:580
↓ 12 callers
Method
get_latest_block_id
(&self)
src/blockchain.rs:744
↓ 12 callers
Method
get_longest_chain_block_hash_by_block_id
(&self, id: u64)
src/blockring.rs:205
↓ 12 callers
Method
get_previous_block_hash
(&self)
src/block.rs:269
↓ 12 callers
Method
get_transaction_type
(&self)
src/transaction.rs:414
↓ 12 callers
Method
set_transaction_type
(&mut self, transaction_type: TransactionType)
src/transaction.rs:513
↓ 11 callers
Method
set_slip_ordinal
(&mut self, slip_ordinal: u8)
src/slip.rs:186
↓ 10 callers
Method
get_amount
(&self)
src/wallet.rs:460
↓ 9 callers
Method
get_hash_for_signature
(&self)
src/transaction.rs:438
↓ 9 callers
Method
get_inputs
(&self)
src/transaction.rs:418
↓ 9 callers
Method
get_message_data
(&self)
src/networking/api_message.rs:58
↓ 9 callers
Method
set_amount
(&mut self, amount: u64)
src/wallet.rs:496
↓ 9 callers
Method
set_id
(&mut self, id: u64)
src/block.rs:396
↓ 8 callers
Method
generate_hashes
(&mut self)
src/block.rs:561
↓ 8 callers
Method
generate_utxoset_key
(&mut self)
src/slip.rs:281
↓ 8 callers
Method
get_staking_treasury
(&self)
src/block.rs:289
↓ 8 callers
Method
set_hash_for_signature
(&mut self, hash: SaitoHash)
src/transaction.rs:537
↓ 8 callers
Method
set_message
(&mut self, message: Vec<u8>)
src/transaction.rs:525
↓ 8 callers
Method
set_publickey
(&mut self, publickey: SaitoPublicKey)
src/wallet.rs:192
↓ 7 callers
Method
add_block
(&mut self, block_id: u64, hash: SaitoHash)
src/blockring.rs:38
↓ 7 callers
Method
get_block_sync
(&self, block_hash: &SaitoHash)
src/blockchain.rs:748
↓ 7 callers
Method
get_burnfee
(&self)
src/block.rs:293
↓ 7 callers
Method
get_difficulty
(&self)
src/block.rs:301
↓ 7 callers
Method
get_has_golden_ticket
(&self)
src/block.rs:305
↓ 7 callers
Method
get_outputs
(&self)
src/transaction.rs:430
↓ 7 callers
Method
get_slip_ordinal
(&self)
src/wallet.rs:476
↓ 7 callers
Method
get_total_fees
(&self)
src/block.rs:334
↓ 7 callers
Method
reset_staker_table
resets the staker table without using floating-point division, we calculate the share that each staker should earn of the upcoming sweep through the
src/staking.rs:74
↓ 7 callers
Method
serialize_for_net
(&self)
src/hop.rs:87
↓ 7 callers
Method
set_uuid
(&mut self, hash: SaitoHash)
src/wallet.rs:488
↓ 6 callers
Method
get_latest_block_hash
(&self)
src/blockring.rs:213
↓ 6 callers
Method
get_mut_block
(&mut self, block_hash: &SaitoHash)
src/blockchain.rs:755
↓ 6 callers
Method
get_to
(&self)
src/hop.rs:54
↓ 6 callers
Method
get_treasury
(&self)
src/block.rs:285
↓ 6 callers
Method
get_uuid
(&self)
src/wallet.rs:452
↓ 6 callers
Method
send_command
( &mut self, command: &str, message: Vec<u8>, )
src/peer.rs:258
↓ 6 callers
Method
send_error_response_from_str
Helper function for sending basic errors with a string message.
src/peer.rs:300
↓ 6 callers
Function
send_message_to_socket
Sends an APIMessage to a socket connection. Since Outbound and Inbound peers Streams(Sinks) are not unified into a single Trait yet, we must check bot
src/peer.rs:133
↓ 6 callers
Method
serialize_for_net
Serialize a Transaction for transport or disk. [len of inputs - 4 bytes - u32] [len of outputs - 4 bytes - u32] [len of message - 4 bytes - u32] [len
src/transaction.rs:643
↓ 6 callers
Method
set_timestamp
(&mut self, timestamp: u64)
src/block.rs:406
↓ 6 callers
Function
sign
(message_bytes: &[u8], privatekey: SaitoPrivateKey)
src/crypto.rs:101
↓ 5 callers
Method
add_transaction
(&mut self, tx: Transaction)
src/block.rs:464
↓ 5 callers
Method
as_str
(&self)
src/configuration.rs:63
↓ 5 callers
Method
check_token_supply
(&self)
src/test_utilities/test_manager.rs:469
↓ 5 callers
Method
check_utxoset
check that everything spendable in the main UTXOSET is spendable on the longest chain and vice-versa.
src/test_utilities/test_manager.rs:367
↓ 5 callers
Method
get_block_hash
(&self)
src/wallet.rs:468
↓ 5 callers
Method
get_from
(&self)
src/hop.rs:50
↓ 5 callers
Method
get_latest_block_hash
(&self)
src/blockchain.rs:740
↓ 5 callers
Method
get_message
(&self)
src/transaction.rs:434
↓ 5 callers
Method
get_signature
(&self)
src/transaction.rs:442
↓ 5 callers
Method
get_signature
(&self)
src/block.rs:281
↓ 5 callers
Method
on_chain_reorganization
handle staking / pending / deposit tables returns slips to SPEND, UNSPEND and DELETE this is required as staking table controlled by blockchain and
src/staking.rs:271
↓ 5 callers
Method
set_merkle_root
(&mut self, merkle_root: SaitoHash)
src/block.rs:424
↓ 5 callers
Method
set_signature
(&mut self, signature: SaitoSignature)
src/block.rs:430
↓ 5 callers
Method
set_transactions
TODO refactor: All of these setters which are setting something which is included in the pre_hash or hash are dangerous. The purpose of the set/get pa
src/block.rs:387
↓ 5 callers
Function
verify
(msg: &[u8], sig: SaitoSignature, publickey: SaitoPublicKey)
src/crypto.rs:108
↓ 4 callers
Function
clean_peers_dbs
This doesn't currently seem to create a problem, but I think
src/network.rs:501
↓ 4 callers
Function
create_socket_and_do_handshake
This function will be used in mosts test of network, it will open a socket, negotiate a handshake, and return the socket so we are ready to start send
src/network.rs:526
↓ 4 callers
Method
delete_slip
(&mut self, slip: &Slip)
src/wallet.rs:174
↓ 4 callers
Method
generate_merkle_root
TODO - this logic should probably be in the merkle-root class
src/block.rs:725
↓ 4 callers
Function
generate_random_bytes
(len: u64)
src/crypto.rs:80
↓ 4 callers
Method
generate_slips
the nolan_requested is omitted from the slips created - only the change address is provided as an output. so make sure that any function calling this
src/wallet.rs:225
↓ 4 callers
Method
get_pre_hash
(&self)
src/block.rs:329
↓ 4 callers
Method
get_publickey
Getters and Setters
src/slip.rs:146
↓ 4 callers
Method
save
(&mut self)
src/wallet.rs:65
↓ 4 callers
Method
send_response
Helper function for sending RESULT__.
src/peer.rs:292
↓ 4 callers
Method
set_burnfee
(&mut self, burnfee: u64)
src/block.rs:448
↓ 4 callers
Method
set_difficulty
(&mut self, difficulty: u64)
src/block.rs:454
next →
1–100 of 495, ranked by callers