Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiSigWallet ¶
type MultiSigWallet struct {
ConfirmationBlockHeight types.BlockHeight `json:"confirmationblockheight"`
ConfirmationBlockTimestamp types.Timestamp `json:"confirmationblocktime"`
Address types.UnlockHash `json:"address"`
CoinOutputIDs []types.CoinOutputID `json:"coinoutputids"`
BlockStakeOutputIDs []types.BlockStakeOutputID `json:"blockstakeoutputids"`
ConfirmedCoinBalance types.Currency `json:"confirmedcoinbalance"`
ConfirmedLockedCoinBalance types.Currency `json:"confirmedlockedcoinbalance"`
ConfirmedCustodyFeeDebt types.Currency `json:"confirmedcustodyfeedebt"`
UnconfirmedOutgoingCoins types.Currency `json:"unconfirmedoutgoingcoins"`
UnconfirmedIncomingCoins types.Currency `json:"unconfirmedincomingcoins"`
ConfirmedBlockStakeBalance types.Currency `json:"confirmedblockstakebalance"`
ConfirmedLockedBlockStakeBalance types.Currency `json:"confirmedlockedblockstakebalance"`
UnconfirmedOutgoingBlockStakes types.Currency `json:"unconfirmedoutgoingblockstakes"`
UnconfirmedIncomingBlockStakes types.Currency `json:"unconfirmedincomingblockstakes"`
Owners []types.UnlockHash `json:"owners"`
MinSigs uint64 `json:"minsigs"`
}
MultiSigWallet is a collection of coin and blockstake outputs, which have the same unlockhash.
type ProcessedInput ¶
type ProcessedInput struct {
FundType types.Specifier `json:"fundtype"`
// WalletAddress indicates it's an address owned by this wallet
WalletAddress bool `json:"walletaddress"`
RelatedAddress types.UnlockHash `json:"relatedaddress"`
Value types.Currency `json:"value"`
ParentOutputID types.OutputID `json:"parentid"`
CoinInfo *custodyfees.CoinOutputInfo `json:"coininfo,omitempty"`
}
A ProcessedInput represents funding to a transaction. The input is coming from an address and going to the outputs. The fund types are 'SiacoinInput', 'SiafundInput'.
func (*ProcessedInput) AsRivineProcessedInput ¶
func (gpi *ProcessedInput) AsRivineProcessedInput() modules.ProcessedInput
type ProcessedOutput ¶
type ProcessedOutput struct {
FundType types.Specifier `json:"fundtype"`
MaturityHeight types.BlockHeight `json:"maturityheight"`
// WalletAddress indicates it's an address owned by this wallet
WalletAddress bool `json:"walletaddress"`
RelatedAddress types.UnlockHash `json:"relatedaddress"`
Value types.Currency `json:"value"`
OutputID types.OutputID `json:"id"`
CoinInfo *custodyfees.CoinOutputInfo `json:"coininfo,omitempty"`
}
A ProcessedOutput is a coin output that appears in a transaction. Some outputs mature immediately, some are delayed.
Fund type can either be 'CoinOutput', 'BlockStakeOutput' or 'MinerFee'. All outputs except the miner fee create outputs accessible to an address. Miner fees are not spendable, and instead contribute to the block subsidy.
MaturityHeight indicates at what block height the output becomes available. CoinInputs and BlockStakeInputs become available immediately. MinerPayouts become available after 144 confirmations.
func (*ProcessedOutput) AsRivineProcessedOutput ¶
func (gpo *ProcessedOutput) AsRivineProcessedOutput() modules.ProcessedOutput
type ProcessedTransaction ¶
type ProcessedTransaction struct {
Transaction types.Transaction `json:"transaction"`
TransactionID types.TransactionID `json:"transactionid"`
ConfirmationHeight types.BlockHeight `json:"confirmationheight"`
ConfirmationTimestamp types.Timestamp `json:"confirmationtimestamp"`
Inputs []ProcessedInput `json:"inputs"`
Outputs []ProcessedOutput `json:"outputs"`
}
A ProcessedTransaction is a transaction that has been processed into explicit inputs and outputs and tagged with some header data such as confirmation height + timestamp.
Because of the block subsidy, a block is considered as a transaction. Since there is technically no transaction id for the block subsidy, the block id is used instead.
func (*ProcessedTransaction) AsRivineProcessedTransaction ¶
func (gpt *ProcessedTransaction) AsRivineProcessedTransaction() modules.ProcessedTransaction
type Wallet ¶
type Wallet interface {
modules.Wallet
// UnlockedUnspendOutputs returns all unlocked and unspend coin and blockstake outputs
// owned by this wallet, adding custody fee information to each spent unlocked coin output.
UnlockedUnspendOutputsWithCustodyFeeInfo() (map[types.CoinOutputID]WalletCoinOutput, map[types.BlockStakeOutputID]types.BlockStakeOutput, error)
// LockedUnspendOutputs returns all locked and unspend coin and blockstake outputs owned
// by this wallet, adding custody fee information to each spent locked coin output.
LockedUnspendOutputsWithCustodyFeeInfo() (map[types.CoinOutputID]WalletCoinOutput, map[types.BlockStakeOutputID]types.BlockStakeOutput, error)
// ConfirmedCustodyFeesToBePaid returns the total amount of custody fees to be paid
// for all unlocked and locked confirmed coin outputs, in case you would spent them all.
ConfirmedCustodyFeesToBePaid() (custodyfees types.Currency, err error)
// Transactions returns all of the transactions that were confirmed at
// heights [startHeight, endHeight]. Unconfirmed transactions are not
// included.
TransactionsWithCustodyInfo(startHeight types.BlockHeight, endHeight types.BlockHeight) ([]ProcessedTransaction, error)
// MultiSigWalletsWithCustodyFeeDebt is the same as regular MultiSigWalletsCall but with custody fee debt included.
MultiSigWalletsWithCustodyFeeDebt() ([]MultiSigWallet, error)
}
Wallet is an extended version of the regular Rivine Wallet
type WalletCoinOutput ¶
type WalletCoinOutput struct {
types.CoinOutput
CoinInfo custodyfees.CoinOutputInfo `json:"coininfo"`
}
type WalletProcessedInput ¶
type WalletProcessedInput struct {
FundType types.Specifier `json:"fundtype"`
// WalletAddress indicates it's an address owned by this wallet
WalletAddress bool `json:"walletaddress"`
RelatedAddress types.UnlockHash `json:"relatedaddress"`
Value types.Currency `json:"value"`
ParentOutputID types.OutputID `json:"parentid"`
}
WalletProcessedInput is similar to a ProcessedInput with with only static values.
func (*WalletProcessedInput) AsProcessedInput ¶
func (wpi *WalletProcessedInput) AsProcessedInput(view custodyfees.CoinOutputInfoView, blockTime types.Timestamp) (ProcessedInput, error)
func (*WalletProcessedInput) AsRivineProcessedInput ¶
func (wpi *WalletProcessedInput) AsRivineProcessedInput() modules.ProcessedInput
type WalletProcessedOutput ¶
type WalletProcessedOutput struct {
FundType types.Specifier `json:"fundtype"`
MaturityHeight types.BlockHeight `json:"maturityheight"`
// WalletAddress indicates it's an address owned by this wallet
WalletAddress bool `json:"walletaddress"`
RelatedAddress types.UnlockHash `json:"relatedaddress"`
Value types.Currency `json:"value"`
OutputID types.OutputID `json:"id"`
}
WalletProcessedOutput is similar to a ProcssedOutput with with only static values.
func (*WalletProcessedOutput) AsProcessedOutput ¶
func (wpo *WalletProcessedOutput) AsProcessedOutput(view custodyfees.CoinOutputInfoView, blockTime types.Timestamp) (ProcessedOutput, error)
func (*WalletProcessedOutput) AsRivineProcessedOutput ¶
func (wpo *WalletProcessedOutput) AsRivineProcessedOutput() modules.ProcessedOutput
type WalletProcessedTransaction ¶
type WalletProcessedTransaction struct {
Transaction types.Transaction `json:"transaction"`
TransactionID types.TransactionID `json:"transactionid"`
ConfirmationHeight types.BlockHeight `json:"confirmationheight"`
ConfirmationTimestamp types.Timestamp `json:"confirmationtimestamp"`
Inputs []WalletProcessedInput `json:"inputs"`
Outputs []WalletProcessedOutput `json:"outputs"`
}
WalletProcessedTransaction is similar to a regular ProcessedTransaction but with only static values.
func (*WalletProcessedTransaction) AsProcessedTransaction ¶
func (wpt *WalletProcessedTransaction) AsProcessedTransaction(view custodyfees.CoinOutputInfoView) (ProcessedTransaction, error)
func (*WalletProcessedTransaction) AsRivineProcessedTransaction ¶
func (wpt *WalletProcessedTransaction) AsRivineProcessedTransaction() modules.ProcessedTransaction