identity/identity library

Classes

DelegationChain
A chain of delegations. This is JSON Serializable. This is the object to serialize and pass to a DelegationIdentity. It does not keep any private keys.
DelegationIdentity
An Identity that adds delegation to a request. Everywhere in this class, the name innerKey refers to the SignIdentity that is being used to sign the requests, while originalKey is the identity that is being borrowed. More identities can be used in the middle to delegate.
DelegationIdentityPublicKey
Ed25519KeyIdentity
Ed25519KeyIdentityRecoveredFromII
Ed25519KeyPair
Ed25519PublicKey
IJsonnableDelegationChain
SignedDelegation

Constants

HARDENED → const int
The following part is ported from InternetIdentity service. It's main purpose is to recover an identity that registered. These truths are covered.
IC_BASE_PATH → const List<int>
IC_DERIVATION_PATH → const List<int>

Properties

authDelegationDomainSeparator Uint8List
final
DER_COSE_OID Uint8List
A DER encoded SEQUENCE(OID) for DER-encoded-COSE
final
ED25519_OID Uint8List
A DER encoded SEQUENCE(OID) for the Ed25519 algorithm
final
requestDomainSeparator Uint8List
final

Functions

bufEquals(ByteBuffer b1, ByteBuffer b2) bool
decodeLenBytes(Uint8List buf, int offset) int
derive(Uint8List parentKey, Uint8List parentChaincode, int i) Set<Uint8List>
dropLeadingUserNumber(String s) String
encodeLen(Uint8List buf, int offset, int len) int
encodeLenBytes(int len) int
extractUserNumber(String s) BigInt?
fromMnemonicWithoutValidation(String mnemonic, List<int>? derivationPath, {int offset = HARDENED}) Ed25519KeyIdentity
Create an Ed25519 based on a mnemonic phrase according to SLIP 0010: https://github.com/satoshilabs/slips/blob/master/slip-0010.md
fromSeedWithSlip0010(Uint8List masterSeed, List<int>? derivationPath, {int offset = HARDENED}) Ed25519KeyIdentity
Create an Ed25519 according to SLIP 0010: https://github.com/satoshilabs/slips/blob/master/slip-0010.md
generateMasterKey(Uint8List seed) Set<Uint8List>
parseUserNumber(String s) BigInt?
toBigEndianArray(int n) Uint8List
unwrapDER(ByteBuffer derEncoded, Uint8List oid) Uint8List
Extracts a payload from the given derEncoded data, and checks that it was tagged with the given oid.
wrapDER(ByteBuffer payload, Uint8List oid) Uint8List
Wraps the given payload in a DER encoding tagged with the given encoded oid like so: SEQUENCE(oid, BITSTRING(payload))