libs

package
v0.0.0-...-4c3d690 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRand32

func GetRand32() string

GetRand32 creates a 32-'byte' pseudo random hex string

func Hash256

func Hash256(s string) (string, error)

Hash256 takes a 32-'byte' hex string and hashes the binary number represented then outputs as a hex string

Types

type AuditParams

type AuditParams struct {
	Contract   string
	ContractTx string
}

AuditParams is passed to Audit command

type AuditResult

type AuditResult struct {
	ContractAmount           int64
	ContractAddress          string
	ContractSecretHash       string
	ContractRecipientAddress string
	ContractRefundAddress    string
	ContractRefundLocktime   int64
}

AuditResult is returned from Audit command

type GetTxResult

type GetTxResult struct {
	Confirmations uint64
	Blockhash     string
	Blockindex    int
	Blocktime     uint64
	Time          uint64
	TimeReceived  uint64
	Hex           string
}

GetTxResult is returned from GetTx command

type InitiateParams

type InitiateParams struct {
	SecretHash string // Hash of the shared secret
	CP2Addr    string // Counterparty 2 (Participant) Adddress
	CP2Amount  int64  // Amount (sats) to pay into Participant redeemable contract
}

InitiateParams is passed to the Initiate function

type InitiateResult

type InitiateResult struct {
	Contract               string
	ContractP2SH           string
	ContractTx             string
	ContractTxHash         string
	ContractFee            int64
	ContractFeePerKb       float64
	ContractRefundLocktime int64
}

InitiateResult is returned from the Initiate function

type ParticipateParams

type ParticipateParams struct {
	SecretHash string
	CP1Addr    string // Counterparty 1 (Initiator) contract Adddress
	CP1Amount  int64  // Amount (sats) to pay into Initiator redeemable contract
}

ParticipateParams is passed to the Participate command

type ParticipateResult

type ParticipateResult struct {
	Contract               string
	ContractP2SH           string
	ContractTx             string
	ContractTxHash         string
	ContractFee            int64
	ContractFeePerKb       float64
	ContractRefundLocktime int64
}

ParticipateResult is returned from the Participate command

type RPCInfo

type RPCInfo struct {
	User       string // RPC Username
	Pass       string // RPC Password
	HostPort   string // RPC host[:port] can be ipv4 [ipv6]
	WalletPass string // Wallet-passphrase
	Certs      string // DCR Wallet
}

RPCInfo is RPC information passed into commands HostPort: If no port specified defaults to the coin's default

port for the network

type RedeemParams

type RedeemParams struct {
	Secret     string
	Contract   string
	ContractTx string
}

RedeemParams is passed to the Redeem command

type RedeemResult

type RedeemResult struct {
	RedeemTx       string
	RedeemTxHash   string
	RedeemFee      int64
	RedeemFeePerKb float64
}

RedeemResult is returned from the Redeem command

type RefundParams

type RefundParams struct {
	Contract   string
	ContractTx string
}

RefundParams is passed to Refund command

type RefundResult

type RefundResult struct {
	RefundTx       string
	RefundTxHash   string
	RefundFee      int64
	RefundFeePerKb float64
}

RefundResult is returned from Refund command

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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