Skip to main content

SimpleKeypairProtocol

SimpleKeypairProtocol Objects​

class SimpleKeypairProtocol(typing.Protocol)

sign_personal_message​

def sign_personal_message(message: PersonalMessage) -> UserSignature

Sign a personal message and return a UserSignature.

sign_transaction​

def sign_transaction(transaction: Transaction) -> UserSignature

Sign a transaction and return a UserSignature.

to_bech32​

def to_bech32() -> str

Encode a SimpleKeypair as flag || privkey in Bech32 starting with "iotaprivkey" to a string. Note that the pubkey is not encoded.

to_bytes​

def to_bytes() -> bytes

Encode a SimpleKeypair as flag || privkey in bytes

to_der​

def to_der() -> bytes

Serialize this private key as DER-encoded PKCS#8

to_pem​

def to_pem() -> str

Serialize this private key as DER-encoded PKCS#8