CosmosWallet class
Represents a wallet which contains the hex private key, the hex public key
and the hex address.
In order to create one properly, the Wallet.derive method should always
be used.
The associated networkInfo will be used when computing the bech32Address
associated with the wallet.
Constructors
- CosmosWallet({required CosmosNetworkInfo networkInfo, required Uint8List address, required Uint8List privateKey, required Uint8List publicKey})
- 
          
            const
- CosmosWallet.convert(CosmosWallet wallet, CosmosNetworkInfo networkInfo)
- 
          Creates a new CosmosWallet instance based on the existent walletfor the givennetworkInfo.factory
- 
          CosmosWallet.derive(List<String> mnemonic, CosmosNetworkInfo networkInfo, {String derivationPath = derivationPath})
- 
          Derives the private key from the given mnemonicusing the specifiednetworkInfo.factory
- 
          CosmosWallet.fromJson(Map<String, dynamic> json, Uint8List privateKey)
- 
          Creates a new Wallet instance from the given jsonandprivateKey.factory
- CosmosWallet.import(CosmosNetworkInfo networkInfo, Uint8List privateKey)
- 
          Creates a new Wallet instance from privateKey.factory
- CosmosWallet.random(CosmosNetworkInfo networkInfo, {String derivationPath = derivationPath})
- 
          Generated a new random CosmosWallet using the specified networkInfoand the optionalderivationPath.factory
Properties
- address → Uint8List
- 
  
  final
- bech32Address → String
- 
  Returns the associated address as a Bech32 string.
  no setter
- ecPublicKey → ECPublicKey
- 
  Returns the associated publicKey as an ECPublicKeyinstance.no setter
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- networkInfo → CosmosNetworkInfo
- 
  
  final
- privateKey → Uint8List
- 
  
  final
- 
  props
  → List<Object> 
- 
  The list of properties that will be used to determine whether
two instances are equal.
  no setter
- publicKey → Uint8List
- 
  
  final
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
- stringify → bool?
- 
  If set to true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  sign(Uint8List data) → Uint8List 
- 
  Hashes the given datawith SHA-256, and then sign the hash using the private key associated with this wallet, returning the signature encoded as a 64 bytes array.
- 
  toJson() → Map< String, dynamic> 
- Converts the current Wallet instance into a JSON object. Note that the private key is not serialized for safety reasons.
- 
  toString() → String 
- A string representation of this object.
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited
Constants
- derivationPath → const String