XCBPrivateKey class
Credentials that can sign payloads with an Core Block Chain private key.
- Inheritance
-
- Object
- Credentials
- XCBPrivateKey
Constructors
- XCBPrivateKey(Uint8List privateKey)
- XCBPrivateKey.createPrivateKey(String seed, int index)
-
Creates a new, random private key from the
randomnumber generator.factory - XCBPrivateKey.fromHex(String hex)
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isolateSafe → bool
-
Whether these Credentials are safe to be copied to another isolate and
can operate there.
If this getter returns true, the client might chose to perform the
expensive signing operations on another isolate.
final
- privateKey → Uint8List
-
Returns a copy so callers cannot mutate the stored private key.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
extractAddress(
int networkId) → XCBAddress -
Loads the ethereum address specified by these credentials.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sign(
Uint8List payload, {required int networkId}) → Uint8List -
Signs the
payloadwith a private key. The output will be like the bytes representation of the xcb_sign RPC method, but without the "Core signed message" prefix. Thepayloadparameter contains the raw data, not a hash.inherited -
signPersonalMessage(
Uint8List payload, {required int networkId}) → Uint8List -
Signs an Core Block Chain specific signature. This method is equivalent to
sign, but with a special prefix so that this method can't be used to
sign, for instance, transactions.
inherited
-
signToSignature(
Uint8List payload, {required int networkId}) → Uint8List -
Signs the
payloadwith a private key and returns the obtained signature.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override