Skip to main content

Crate arweave_keygen

Crate arweave_keygen 

Source
Expand description

Generate and inspect Arweave JWK wallets.

An Arweave wallet is an RSA-4096 key pair stored as a JSON Web Key (JWK). The public exponent must be 65537. The wallet address is base64url(SHA-256(n)), where n is the RSA modulus.

Structs§

Jwk
Arweave RSA private key in JWK form (RFC 7517 / RFC 7518).
Wallet
A generated Arweave wallet: address plus JWK private key.

Enums§

Error

Constants§

KEY_BITS
RSA modulus size required by Arweave.
PUBLIC_EXPONENT
Public exponent required by Arweave (65537, JWK e = "AQAB").

Functions§

address_from_n
Wallet address from the JWK n field: base64url(SHA-256(decode(n))).
address_from_n_bytes
Wallet address from the raw RSA modulus bytes.
b64url_decode
Base64URL-decode a string without padding.
b64url_encode
Base64URL-encode bytes without padding.