web3_signers library

Classes

abi
Abstract base class for handling Ethereum's Application Binary Interface (ABI).
AuthData
DartRandom
EOAWallet
HardwareSigner
Methods
MultiSignerInterface
An interface for a multi-signer, allowing signing of data and returning the result.
P256Credential
P256PublicKey
P256Signature
PassKeyPair
PassKeySignature
PassKeySigner
PassKeysOptions
PrivateKeySigner
PublicKey
SecureP256
Uint256

Properties

oidP256 Uint8List
final

Functions

arrayify(String hexString) Uint8List
Converts a hex string to a 32bytes Uint8List.
b64d(String b64) Uint8List
Decode a Base64 URL encoded string adding in any required '='
b64e(List<int> bytes) String
Encode a byte list into Base64 URL encoding, stripping any trailing '='
bufEquals(ByteBuffer b1, ByteBuffer b2) bool
bytesUnwrapDer(Uint8List derEncoded, Uint8List oid) Uint8List
Extracts a payload from the given derEncoded data, and checks that it was tagged with the given oid.
bytesUnwrapDerSignature(Uint8List derEncoded) Uint8List
ECDSA DER Signature 0x30|b1|0x02|b2|r|0x02|b3|s b1 = Length of remaining data b2 = Length of r b3 = Length of s
bytesWrapDer(Uint8List payload, Uint8List oid) Uint8List
Wraps the given payload in a DER encoding tagged with the given encoded oid like so: SEQUENCE(oid, BITSTRING(payload))
bytesWrapDerSignature(Uint8List rawSignature) Uint8List
decodeLenBytes(Uint8List buf, int offset) int
encodeLen(Uint8List buf, int offset, int len) int
encodeLenBytes(int len) int
getMessagingSignature(Uint8List signatureBytes) → Tuple<Uint256, Uint256>
Parses ASN1-encoded signature bytes and returns a List of two hex strings representing the r and s values.
getPublicKeyFromBytes(Uint8List publicKeyBytes) Future<Tuple<Uint256, Uint256>>
Retrieves the X and Y components of an ECDSA public key from its bytes.
getRandomValues([int length = _defaultLength]) Uint8List
hexHasPrefix(String value) bool
hexlify(List<int> intArray) String
Converts a list of integers to a hexadecimal string.
hexStripPrefix(String value) String
hexToU8a(String value, [int bitLength = -1]) Uint8List
value should be 0x hex string.
isDerPublicKey(Uint8List pub, Uint8List oid) bool
isDerSignature(Uint8List sig) bool
isHex(dynamic value, {int bits = -1, bool ignoreLength = false}) bool
main() → void
padBase64(String b64) String
randomAsU8a([int length = _defaultLength]) Uint8List
require(bool requirement, String exception) → dynamic
Throws an exception if the specified requirement is not met.
sha256Hash(List<int> input) List<int>
Computes the SHA-256 hash of the specified input.
shouldRemoveLeadingZero(Uint8List bytes) bool
Checks whether the leading zero should be removed from the byte array.
toBuffer(List<List<int>> buff) List<int>
Combines multiple lists of integers into a single list.