activeledger_falcon library
Falcon-512 for the Activeledger Dart SDK.
import 'package:activeledger_falcon/activeledger_falcon.dart';
void main() {
ActiveledgerFalcon.enable();
final key = KeyHandler().generateKey('me', type: KeyType.preferredPostQuantum);
}
Re-exports package:activeledger, so this one import is enough.
Classes
- Activeledger
- Everything in one place, for the common case.
- ActiveledgerFalcon
- Turns Falcon-512 on for the whole SDK.
- Connection
- A connection to one Activeledger node.
- CryptoProvider
-
Generates keys and signs and verifies strings - the Dart counterpart of
the JavaScript SDK's
ICryptoProvider. - DefaultCryptoProvider
- The built-in CryptoProvider.
- Falcon512Scheme
- Falcon-512 (FN-DSA), backed by liboqs.
- Key
- A named key, and the identity (stream id) it controls once onboarded.
- KeyCodec
- Decoded, checked key bytes, for code that needs to validate a key before it reaches a node (where a wrong length comes back as 1220).
- KeyHandler
- Generates, recovers, onboards and stores keys.
- KeyMaterial
- The encoded halves of a key pair, as the ledger and key files carry them.
- LedgerResponse
- The ledger's reply to a submitted transaction.
- LedgerStreams
-
$streams: stream ids the transaction created and updated. - LedgerSummary
-
$summary: how many nodes took part, voted and committed. - MlDsa65Scheme
- ML-DSA-65 (FIPS 204), in pure Dart.
- PayloadHandler
- Signs and verifies arbitrary payloads - an exchange order, an attestation, an auth challenge - as opposed to transactions, which TransactionHandler covers.
- PostQuantum
- The registry of post-quantum schemes available in this process.
- PostQuantumScheme
- A post-quantum signature scheme, operating on raw key and signature bytes.
- Recovery
- BIP-39 recovery phrases, and the seed each key type derives from one.
- Secp256k1
- secp256k1, encoded the way Activeledger stores it.
- StreamRef
- A stream id and its name.
- Transaction
-
A transaction envelope: the
$txbody, its$sigs, and$selfsign. - TransactionHandler
- Builds, signs and sends transactions.
Enums
- KeyType
- The key types Activeledger understands, and their exact wire strings.
Functions
-
canonicalJson(
Object? value) → String -
Serialises
valueexactly as JavaScript'sJSON.stringifywould. -
canonicalJsonBytes(
Object? value) → Uint8List - The UTF-8 bytes of canonicalJson - what actually gets signed.
-
jsNumber(
double value) → String -
Formats a number exactly as JavaScript's
Number.prototype.toString(and thereforeJSON.stringify) would.
Exceptions / Errors
- ActiveledgerException
- Base class for errors this SDK raises about the ledger or its data, as opposed to programming errors (which are ArgumentErrors and StateErrors).
-
A key type was requested whose implementation is not present in this
process - Falcon-512 without the
activeledger_falconadd-on. - LedgerHttpException
- The node answered with a non-2xx HTTP status.
- OnboardException
- Onboarding did not produce an identity.