BaseAccount - CosmosSwift/swift-coin GitHub Wiki
BaseAccount
public struct BaseAccount: Account, GenesisAccount
Inheritance
Account, GenesisAccount
Initializers
init(address:coins:publicKey:accountNumber:sequence:)
public init(address: AccountAddress, coins: [Coin] = [], publicKey: PublicKeyProtocol? = nil, accountNumber: UInt64 = 0, sequence: UInt64 = 0)
init(from:)
public init(from decoder: Decoder) throws
Properties
metaType
let metaType: MetaType
address
var address: AccountAddress
coins
var coins: [Coin]
publicKey
var publicKey: PublicKeyProtocol?
accountNumber
var accountNumber: UInt64
sequence
var sequence: UInt64
description
var description: String
Methods
encode(to:)
public func encode(to encoder: Encoder) throws
set(address:)
public mutating func set(address: AccountAddress) throws
set(publicKey:)
public mutating func set(publicKey: PublicKeyProtocol) throws
set(accountNumber:)
public mutating func set(accountNumber: UInt64) throws
set(sequence:)
public mutating func set(sequence: UInt64) throws
set(coins:)
public mutating func set(coins: [Coin]) throws
validate()
public func validate() throws
spendableCoins(blockTime:)
public func spendableCoins(blockTime: TimeInterval) -> [Coin]