kaspa/kaspa library
Classes
- Address
- AddressBalance
- Amount
- ApiAddressBalance
- ApiOutpoint
- ApiScriptPublicKey
- ApiTransaction
- ApiTxId
- ApiTxInput
- ApiTxLink
- ApiTxOutput
- ApiUtxo
- ApiUtxoEntry
- EcdsaAddressGenerator
- ExPrivateKey
-
Use this class to generate extended keys. You can create an instance of
this class with either a serialized extended key (
Chain.import) or a hex encoded master seed (Chain.seed). - ExtendedKey
- Abstract class on which ExtendedPrivateKey and ExtendedPublicKey are based.
- ExtendedPrivateKey
- An extended private key as defined by the BIP32 specification.
- ExtendedPublicKey
- An extended public key as defined by the BIP32 specification.
- HdAddressGenerator
- HdWallet
- HdWalletEcdsa
- HdWalletLegacy
- HdWalletSchnorr
- HdWalletView
- HdWalletViewECDSA
- HdWalletViewSchnorr
- KaspaApi
- KaspaApiEmpty
- KaspaApiMainnet
- KaspaApiService
- KaspaClient
- KaspaUri
- KaspaUriParam
- KeyPair
- LegacyAddressGenerator
- Outpoint
- SchnorrAddressGenerator
- ScriptPublicKey
- SendResult
- SighashReusedValues
- SignerBase
- TokenInfo
- Transaction
- TxInput
- TxOutput
- Utxo
- UtxoChanges
- UtxoEntry
- VoidKaspaClient
- WalletService
Extensions
Constants
- alphabet → const String
- Used for the Base58 encoding.
- firstHardenedChild → const int
- FirstHardenedChild is the index of the firxt "hardened" child key as per the bip32 spec
- kAddressIdPubKey → const int
- kAddressIdPubKeyECDSA → const int
- kAddressIdScriptHash → const int
- kAmountKey → const String
- kaspaDecimals → const int
- kDevnetRpcPort → const int
- kDomainHashSize → const int
- kDomainSubnetworkIDSize → const int
- kKaspaDerivationPath → const String
- kLabelKey → const String
- kLegacyDerivationPath → const String
- kMainnetRpcPort → const int
- kMaxInputsPerTransaction → const int
- kMaxTransactionVersion → const int
- kMessageKey → const String
- kPublicKeyLength → const int
- kPublicKeySizeECDSA → const int
- kSeedSize → const int
- kSigHashAll → const int
- kSigHashAnyOneCanPay → const int
- kSigHashNone → const int
- kSigHashSingle → const int
- kSimnetRpcPort → const int
- kTestnetPpcPort → const int
- lengthOfChecksum → const int
- Length of checksum in bytes
- lengthOfKey → const int
- From the specification the length of a private of public key
- lengthOfSerializedKey → const int
- From the specification (in bytes): 4 version 1 depth 4 fingerprint 4 child number 32 chain code 33 public or private key
- throwBadHash → const String
- throwBadPoint → const String
- throwBadPrivate → const String
- throwBadSignature → const String
- throwBadTweak → const String
Properties
- curve → ECCurve_secp256k1
-
The Bitcoin curve
final
-
ecP
→ List<
int> -
final
-
egGroupOrder
→ List<
int> -
final
- G → ECPoint
-
final
- kaspaDevnet → NetworkType
-
final
- kaspaMainnet → NetworkType
-
final
- kaspaSimnet → NetworkType
-
final
- kaspaTestnet → NetworkType
-
final
- kFeePerInput → BigInt
-
final
- kMaximumStandardTransactionMass → BigInt
-
final
- kSubnetworkIdCoinbase → Uint8List
-
final
- kSubnetworkIdCoinbaseHex → String
-
final
- kSubnetworkIdNative → Uint8List
-
final
- kSubnetworkIdNativeHex → String
-
final
- kSubnetworkIdRegistry → Uint8List
-
final
- kSubnetworkIdRegistryHex → String
-
final
- kUnacceptedDAASccore → Int64
-
final
- masterKey → Uint8List
-
From the BIP32 spec. Used when calculating the hmac of the seed
final
- n → BigInt
-
final
- nDiv2 ↔ BigInt
-
getter/setter pair
- privateKeyVersion → Uint8List
-
The 4 version bytes for the private key serialization as defined in the
BIP21 spec
final
- publicKeyVersion → Uint8List
-
The 4 version bytes for the public key serialization as defined in the
BIP21 spec
final
- ripemd160digest → RIPEMD160Digest
-
final
- secp256k1 → ECCurve_secp256k1
-
final
- sha256digest → SHA256Digest
-
final
- sha512digest → SHA512Digest
-
final
- zero32 → Uint8List
-
final
Functions
-
addressPrefixForNetwork(
KaspaNetwork network) → AddressPrefix -
assumeCompression(
bool? value, Uint8List? pubkey) → bool -
compressed(
ECPoint q) → Uint8List - AKA 'ser_P(P)' in the specification
-
convertHdPublicKey(
String hdPubKey, KaspaNetwork toNetwork) → String -
convertIfXpub(
String hdPubKey) → String -
debug(
List< int> payload) → void -
decodeFrom(
Uint8List P) → ECPoint? -
deriveExtendedPrivateChildKey(
ExtendedPrivateKey parent, int childNumber) → ExtendedPrivateKey - CKDpriv in the specficiation
-
deriveExtendedPublicChildKey(
ExtendedPublicKey parent, int childNumber) → ExtendedPublicKey - CKDpub in the specification
-
equal(
Iterable a, Iterable b) → bool -
fromBuffer(
Uint8List d) → BigInt -
getEncoded(
ECPoint? P, dynamic compressed) → Uint8List -
hash160(
Uint8List data) → Uint8List - Double hash the data: RIPEMD160(SHA256(data))
-
hmacSha512(
Uint8List key, Uint8List message) → Uint8List - This function returns a list of length 64. The first half is the key, the second half is the chain code.
-
isOrderScalar(
dynamic x) → bool -
isPoint(
Uint8List p) → bool -
isPrivate(
Uint8List x) → bool -
isScalar(
Uint8List x) → bool -
networkForKpub(
String kpub) → KaspaNetwork -
networkForPort(
int port) → KaspaNetwork -
networkTypeForNetwork(
KaspaNetwork network) → NetworkType -
pointAddScalar(
Uint8List p, Uint8List tweak, bool compressedArg) → Uint8List? -
pointFromScalar(
Uint8List d, bool compressed) → Uint8List? -
portForNetwork(
KaspaNetwork network) → int -
privateAdd(
Uint8List d, Uint8List tweak) → Uint8List? -
privateKeyToPublicKey(
Uint8List privateKey) → Uint8List -
publicKeyFor(
BigInt d) → ECPoint - AKA 'point(k)' in the specification
-
serializeTo4bytes(
int i) → Uint8List - AKA 'ser_32(i)' in the specification
-
sublist(
Uint8List list, int start, int end) → Uint8List -
toBuffer(
BigInt d) → Uint8List
Typedefs
-
LegacyPubKeyCallback
= Future<
Uint8List> Function({required int index, required int typeIndex})