v1

package
v0.0.0-...-1bfa4a9 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TxOutputFromV2QueryTxOutput

func TxOutputFromV2QueryTxOutput(output engine.LockMintBurnReleaseOutput) pack.Typed

v0.4 darknodes respond with empty strings instead of omitting nil fields This causes issues with ren-js v2 so we need to manually strip the responses

Types

type AccountState

type AccountState struct {
	Address           string    `json:"address"`
	Gascap            string    `json:"gasCap"`
	Gaslimit          string    `json:"gasLimit"`
	Gasprice          string    `json:"gasPrice"`
	Gnonces           []Gnonces `json:"gnonces"`
	Latestchainhash   string    `json:"latestChainHash"`
	Latestchainheight string    `json:"latestChainHeight"`
	Minimumamount     string    `json:"minimumAmount"`
	Nonce             string    `json:"nonce"`
	Pubkey            string    `json:"pubKey"`
}

type Gnonces

type Gnonces struct {
	Address string `json:"address"`
	Nonce   string `json:"nonce"`
}

type GpubkeyCompatStore

type GpubkeyCompatStore interface {
	RemoveGpubkey(tx.Tx) (tx.Tx, error)
	UpdatedHash(id.Hash) (id.Hash, error)
}

type Outpoint

type Outpoint struct {
	Hash  string `json:"hash"`
	Index string `json:"index"`
}

type Output

type Output struct {
	Outpoint     Outpoint `json:"outpoint"`
	Pubkeyscript string   `json:"pubKeyScript"`
	Value        string   `json:"value"`
}

type QueryStateResponse

type QueryStateResponse struct {
	State State `json:"state"`
}

func QueryStateResponseFromState

func QueryStateResponseFromState(bindings binding.Bindings, state map[string]engine.XState) (QueryStateResponse, error)

type State

type State struct {
	Bitcoin     UTXOState    `json:"Bitcoin,omitempty"`
	Bitcoincash UTXOState    `json:"BitcoinCash,omitempty"`
	Digibyte    UTXOState    `json:"DigiByte,omitempty"`
	Dogecoin    UTXOState    `json:"Dogecoin,omitempty"`
	Filecoin    AccountState `json:"Filecoin,omitempty"`
	Terra       AccountState `json:"Terra,omitempty"`
	Zcash       UTXOState    `json:"Zcash,omitempty"`
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewCompatStore

func NewCompatStore(client redis.Cmdable) *Store

func (*Store) RemoveGpubkey

func (store *Store) RemoveGpubkey(transaction tx.Tx) (tx.Tx, error)

func (*Store) UpdatedHash

func (store *Store) UpdatedHash(hash id.Hash) (id.Hash, error)

type UTXOState

type UTXOState struct {
	Address           string `json:"address"`
	Dust              string `json:"dust"`
	Gascap            string `json:"gasCap"`
	Gaslimit          string `json:"gasLimit"`
	Gasprice          string `json:"gasPrice"`
	Latestchainhash   string `json:"latestChainHash"`
	Latestchainheight string `json:"latestChainHeight"`
	Minimumamount     string `json:"minimumAmount"`
	Output            Output `json:"output"`
	Pubkey            string `json:"pubKey"`
}

Jump to

Keyboard shortcuts

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