Skip to main content

Crate starknet_address_checker

Crate starknet_address_checker 

Source

Structs§

CheckAddressResponse
CheckRpcUrl

Functions§

check_address
This function takes in two parameters which are the address you want to check and the struct that contains the field for the rpc_url It checks to know if the address is a smart-wallet or a smart-contract. It returns a message from the CheckAddressResponse struct to confirm the type of address you are interacting with.
is_valid_starknet_address
This function takes in an address and if the address is a valid starknet address it returns it as it is else it pads it with the required zero to make it a complete address length,This works with starknet addresses that are one bit shorter than the required length, if it’s a valid address it returns it as it is, else it modifies it and returns the modified address, However if the address is not a valid starknet address you get false as your response.