tasks

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDerivationPrefix = "84h/0h"
	SsmMaxUnusedAddress     = 1000
	SsmFillBatchSize        = 16
)
View Source
const (
	PolicyAssetLiquid = "6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d"
	TickerAssetLiquid = "LBTC"

	ConfirmedBlockCount   = 3 // number of confirmation to consider transaction complete
	UnconfirmedBlockCount = 6 // number of confirmation to continue fetching addressInfos

	AddressInfoMinConfirmation = 0
	AddressInfoMaxConfirmation = 9999
)
View Source
const (
	AssetInfoEndpoint = "https://assets.blockstream.info/"
	AssetIconEndpoint = "https://assets.blockstream.info/icons.json"
)

Variables

View Source
var (
	ErrProcessingBatchWithdraw = errors.New("Error Processing BatchWithdraw")
)

Functions

func BatchWithdraw added in v0.0.5

func BatchWithdraw(ctx context.Context, epoch time.Time, chains []string)

func SsmPool added in v0.0.5

func SsmPool(ctx context.Context, epoch time.Time, infos []SsmInfo)

SsmPool

func UpdateAssetInfo

func UpdateAssetInfo(ctx context.Context, epoch time.Time)

UpdateAssetInfo

func UpdateChains

func UpdateChains(ctx context.Context, epoch time.Time, chains []string)

UpdateChains

func UpdateOperations

func UpdateOperations(ctx context.Context, epoch time.Time, chains []string)

UpdateOperations

Types

type AddressMap

type AddressMap map[string]model.CryptoAddress

type AssetIcon

type AssetIcon struct {
	AssetID string `json:"asset_id"`
	Data    []byte
}

type AssetInfo

type AssetInfo struct {
	AssetID  string `json:"asset_id"`
	Contract struct {
		Entity struct {
			Domain string `json:"domain"`
		} `json:"entity"`
		IssuerPubkey string `json:"issuer_pubkey"`
		Name         string `json:"name"`
		Nonce        string `json:"nonce"`
		Precision    int    `json:"precision"`
		Ticker       string `json:"ticker"`
		Version      int    `json:"version"`
	} `json:"contract"`
	IssuanceTxin struct {
		Txid string `json:"txid"`
		Vin  int    `json:"vin"`
	} `json:"issuance_txin"`
	IssuancePrevout struct {
		Txid string `json:"txid"`
		Vout int    `json:"vout"`
	} `json:"issuance_prevout"`
	Name      string `json:"name"`
	Ticker    string `json:"ticker"`
	Precision int    `json:"precision"`
	Entity    struct {
		Domain string `json:"domain"`
	} `json:"entity"`
	Version      int    `json:"version"`
	IssuerPubkey string `json:"issuer_pubkey"`
}

type ChainHeightMap added in v0.0.5

type ChainHeightMap map[string]uint64

type SsmInfo added in v0.0.5

type SsmInfo struct {
	Device           string
	Chain            string
	Fingerprint      string
	DerivationPrefix string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL