WalletDB¶
Description¶
WalletDB
stores and manages access to standard keystore files. We require that keystore files MUST be encrypted for the safety of user funds.
API¶
Structs¶
Keystore¶
interface Keystore {
address: string
crypto: {
cipher: string
ciphertext: string
cipherparams: {
iv: string
}
kdf: string
kdfparams: {
dklen: number
n: number
p: number
r: number
salt: string
}
mac: string
}
id: string
version: number
}
Description¶
Standard format for storing keystore objects in Ethereum.
Methods¶
putKeystore¶
async function setKeystore(address: string): Promise<void>
Description¶
Sets the keystore file for a given address.
Parameters¶
address
-string
: Address to set a keystore for.
Returns¶
Promise<void>
: Promise that resolves once the keystore has been inserted.
getKeystore¶
async function getKeystore(address: string): Promise<Keystore>
Description¶
Pulls the keystore file for a given address.
Parameters¶
address
-string
: Address to query a keystore for.