class BitShares::Wallet

Overview

内存钱包对象,用于管理各种私钥匙。

Defined in:

bitshares-crystal/wallet.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : BitShares::Client) #

[View source]

Instance Method Detail

def clear #

清空钱包内存中保存的所有私钥。


[View source]
def get_private_key?(public_key : String) : Secp256k1Zkp::PrivateKey | Nil #

根据公钥 WIF 格式字符串获取对应的私钥信息,不存在则返回 nil


[View source]
def get_sign_keys(raw_permission_json) #

获取钱包中需要参与签名的公钥列表。


[View source]
def get_sign_keys_from_fee_paying_account(fee_paying_account, require_owner_permission = false) #

根据手续费支付账号获取本地钱包中需要参与签名的公钥列表。


[View source]
def have_private_key?(pubkey) #

是否存在指定公钥的私钥对象。


[View source]
def import_key(private_wif) #

导入 WIF 格式的私钥到钱包文件中。


[View source]
def import_password(account, password, role = "active") #

通过账号密码导入私钥。


[View source]
def sign(sign_message_digest : Bytes, sign_keys_hash : Hash(String, Secp256k1Zkp::PrivateKey) | Nil = nil) : Array(Bytes) #

签名。如果未指定签名私钥,则使用钱包中默认私钥。


[View source]