Skip to content

ModuleAccount

ratranqu edited this page Apr 26, 2021 · 2 revisions

ModuleAccount

public protocol ModuleAccount: AccountProtocol 

Inheritance

AccountProtocol, GenesisAccount

Initializers

init(name:permissions:)

public init(name: String, permissions: [String]) 

init(from:)

public init(from decoder: Decoder) throws 

Properties

metaType

public static var metaType: MetaType 

address

public var address: AccountAddress 

coins

public var coins: Coins 

publicKey

public var publicKey: PublicKeyProtocol? 

accountNumber

public var accountNumber: UInt64 

sequence

public var sequence: UInt64 

description

public 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: Coins) throws 

validate()

public func validate() throws 

spendableCoins(blockTime:)

public func spendableCoins(blockTime: TimeInterval) -> Coins 

moduleAddress(name:)

public static func moduleAddress(name: String) -> AccountAddress 

Default Implementations

moduleAddress(name:)

public static func moduleAddress(name: String) -> AccountAddress 

Requirements

name

var name: String 

permissions

var permissions: [String] 

has(permission:​)

func has(permission: String) -> Bool
Types
Protocols
Global Typealiases
Global Variables
Global Functions
Extensions
Clone this wiki locally