Documentation ¶
Index ¶
- Constants
- func ChainClientContext(ctx context.Context, chain string, client ChainClient) context.Context
- func CryptoModeContext(ctx context.Context, mode CryptoMode) context.Context
- func SsmClientContext(ctx context.Context, device string, client SsmClient) context.Context
- func SsmDeviceInfoContext(ctx context.Context, info SsmDeviceInfo) context.Context
- type AddressInfo
- type ChainClient
- type CryptoAddress
- type CryptoMode
- type GetAddressInfo
- type SpendAssetInfo
- type SpendInfo
- type SpendTx
- type SsmAddress
- type SsmChain
- type SsmClient
- type SsmDevice
- type SsmDeviceInfo
- type SsmFingerprint
- type TransactionInfo
- type UTXOInfo
Constants ¶
View Source
const ( ChainClientKey = "Key.ChainClientKey" SsmClientKey = "Key.SsmClientKey" SsmDeviceInfoKey = "Key.SsmDeviceInfoKey" CryptoModeKey = "Key.CryptoModeKey" )
View Source
const ( CryptoAddressNextDepositSubject = chanPrefix + "CryptoAddress.NextDeposit" CryptoAddressNewDepositSubject = chanPrefix + "CryptoAddress.NewDeposit" AddressInfoSubject = chanPrefix + "CryptoAddress.AddressInfo" )
Variables ¶
This section is empty.
Functions ¶
func ChainClientContext ¶
func CryptoModeContext ¶ added in v0.0.5
func CryptoModeContext(ctx context.Context, mode CryptoMode) context.Context
func SsmClientContext ¶ added in v0.0.5
func SsmDeviceInfoContext ¶ added in v0.0.5
func SsmDeviceInfoContext(ctx context.Context, info SsmDeviceInfo) context.Context
Types ¶
type AddressInfo ¶
func (*AddressInfo) Decode ¶ added in v0.0.5
func (p *AddressInfo) Decode(data []byte) error
func (*AddressInfo) Encode ¶ added in v0.0.5
func (p *AddressInfo) Encode() ([]byte, error)
type ChainClient ¶
type ChainClient interface { GetNewAddress(ctx context.Context, account string) (string, error) ImportAddress(ctx context.Context, account, address, pubkey, blindingkey string) error GetAddressInfo(ctx context.Context, address string) (AddressInfo, error) GetBlockCount(ctx context.Context) (int64, error) ListUnspent(ctx context.Context, minConf, maxConf int, addresses ...string) ([]TransactionInfo, error) ListUnspentByAsset(ctx context.Context, minConf, maxConf int, asset string) ([]TransactionInfo, error) LockUnspent(ctx context.Context, unlock bool, transactions ...TransactionInfo) error ListLockUnspent(ctx context.Context) ([]TransactionInfo, error) GetTransaction(ctx context.Context, txID string) (TransactionInfo, error) SpendFunds(ctx context.Context, changeAddress string, inputs []UTXOInfo, outputs []SpendInfo, addressInfo GetAddressInfo, blindTransaction bool) (SpendTx, error) }
ChainClient interface specification for bitcoin and elements
func ChainClientFromContext ¶
func ChainClientFromContext(ctx context.Context, chain string) ChainClient
type CryptoAddress ¶
type CryptoAddress struct { CryptoAddressID uint64 Chain string AccountID uint64 PublicAddress string Unconfidential string IgnoreAccounting bool }
func (*CryptoAddress) Decode ¶
func (p *CryptoAddress) Decode(data []byte) error
func (*CryptoAddress) Encode ¶
func (p *CryptoAddress) Encode() ([]byte, error)
type CryptoMode ¶ added in v0.0.5
type CryptoMode string
const ( CryptoModeBitcoinCore CryptoMode = "bitcoin-core" CryptoModeCryptoSsm CryptoMode = "crypto-ssm" )
func CryptoModeFromContext ¶ added in v0.0.5
func CryptoModeFromContext(ctx context.Context) CryptoMode
type GetAddressInfo ¶ added in v0.0.5
type SpendAssetInfo ¶ added in v0.0.5
type SpendInfo ¶ added in v0.0.5
type SpendInfo struct { PublicAddress string Amount float64 // Asset optional Asset SpendAssetInfo }
type SsmAddress ¶ added in v0.0.5
type SsmClient ¶ added in v0.0.5
type SsmClient interface { NewAddress(ctx context.Context, ssmPath commands.SsmPath) (SsmAddress, error) SignTx(ctx context.Context, chain, inputransaction string, inputs ...commands.SignTxInputs) (string, error) }
SsmClient interface specification for crypto-ssm
type SsmDeviceInfo ¶ added in v0.0.5
type SsmDeviceInfo interface {
Fingerprint(ctx context.Context, chain SsmChain) (SsmFingerprint, error)
}
func SsmDeviceInfoFromContext ¶ added in v0.0.5
func SsmDeviceInfoFromContext(ctx context.Context) SsmDeviceInfo
type SsmFingerprint ¶ added in v0.0.5
type SsmFingerprint string
type TransactionInfo ¶
Click to show internal directories.
Click to hide internal directories.