DotCoin class
Create a Dot wallet using mnemonic or private key, with a signature algorithm of SR25519 or ED25519.
- Inheritance
-
- Object
- WalletType
- DotCoin
Constructors
- DotCoin({dynamic setting, bool setEd = false})
- DotCoin.fromPrivateKey(dynamic privateKey, [WalletSetting? setting])
-
factory
Properties
- address → String
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- kusamaAddress → String
-
set dot address prefix
polkadot (Prefix: 0) : 15rRgsWxz4H5LTnNGcCFsszfXD8oeAFd8QRsR6MbQE2f6XFF; //default address
kusama (Prefix: 2) : HRkCrbmke2XeabJ5fxJdgXWpBRPkXWfWHY8eTeCKwDdf4k6;
rococo (Prefix: 42): 5Gv8YYFu8H1btvmrJy9FjjAWfb99wrhV3uhPFoNEr918utyR;
no setter
- mnemonic ↔ String?
-
privateKey and publicKey key are always Uint8List;
mnemonic and address are always String
latefinalinherited
-
PREFIX_LIST
→ List<
int> -
final
- privateKey ↔ Uint8List
-
latefinalinherited
- publicKey → Uint8List
-
no setterinherited
- rococoAddress → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setting ↔ WalletSetting?
-
getter/setter pair
Methods
-
initFromMnemonic(
String mnemonic) → Future< void> -
inherited
-
initFromPrivateKey(
Uint8List privateKey) → void -
inherited
-
mnemonicToAddress(
String mnemonic) → Future< String> -
inherited
-
mnemonicToPrivateKey(
String mnemonic) → Future< Uint8List> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
privateKeyToPublicKey(
Uint8List privateKey) → Uint8List -
override
-
publicKeyToAddress(
Uint8List publicKey, {int prefix = 0}) → String -
override
-
setEd25519(
) → void -
setSr25519(
) → void - set signature schemes, support sr25519 and ed25519.
-
sign(
String txData) → String -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
verify(
String signedMessage, String message) → bool -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromMnemonic(
String mnemonic, [WalletSetting? setting]) → Future< DotCoin>