Documentation
¶
Index ¶
- func MakeTransferTransaction(par MakeTransferTransactionParams) ([]byte, error)
- type APIClient
- func (c *APIClient) CheckTransactionIDInLRB(txid base.TransactionID, maxDepth ...int) (lrbID base.TransactionID, foundAtDepth int, err error)
- func (c *APIClient) Get(path string) ([]byte, error)
- func (c *APIClient) GetAccountOutputs(account ledger.Accountable, ...) ([]*ledger.OutputWithID, *base.TransactionID, error)
- func (c *APIClient) GetAccountOutputsExt(account ledger.Accountable, maxOutputs int, sortOption string, ...) ([]*ledger.OutputWithID, *base.TransactionID, error)
- func (c *APIClient) GetAccountParsedOutputs(account ledger.Accountable, maxOutputs int, sortOption ...string) (*api.ParsedOutputList, error)
- func (c *APIClient) GetAllChains() ([]*ledger.OutputWithChainID, *base.TransactionID, error)
- func (c *APIClient) GetAllSequencerOutputs() (map[base.ChainID]ledger.OutputWithSequencerData, *base.TransactionID, error)
- func (c *APIClient) GetChainOutput(chainID base.ChainID) (*ledger.OutputWithChainID, byte, base.TransactionID, error)
- func (c *APIClient) GetChainOutputData(chainID base.ChainID) (*ledger.OutputDataWithID, base.TransactionID, error)
- func (c *APIClient) GetChainedOutputs(accountable ledger.Accountable) ([]*ledger.OutputWithChainID, *base.TransactionID, error)
- func (c *APIClient) GetDelegationOutputs(accountable ledger.Accountable) ([]ledger.DelegationOutput, *base.TransactionID, error)
- func (c *APIClient) GetLastKnownSequencerData() (map[string]tippool.LatestSequencerTipDataJSONAble, error)
- func (c *APIClient) GetLatestReliableBranch() (*multistate.RootRecord, base.TransactionID, error)
- func (c *APIClient) GetLedgerIdentityData() ([]byte, error)
- func (c *APIClient) GetNodeInfo() (*global.NodeInfo, error)
- func (c *APIClient) GetNonChainBalance(addr ledger.Accountable) (uint64, *base.TransactionID, error)
- func (c *APIClient) GetOutputData(oid *base.OutputID) ([]byte, error)
- func (c *APIClient) GetOutputsForAmount(addr ledger.AddressED25519, amount uint64) ([]*ledger.OutputWithID, *base.TransactionID, uint64, error)
- func (c *APIClient) GetPeersInfo() (*api.PeersInfo, error)
- func (c *APIClient) GetSequencerData(chainID base.ChainID) (ret seqdata.SequencerData, err error)
- func (c *APIClient) GetSimpleSigLockedOutputs(addr ledger.AddressED25519, maxOutputs int, sort ...string) ([]*ledger.OutputWithID, *base.TransactionID, error)
- func (c *APIClient) GetSnapshotBranchID() (ret base.TransactionID, err error)
- func (c *APIClient) GetSyncInfo() (*api.SyncInfo, error)
- func (c *APIClient) GetTransferableOutputs(account ledger.Accountable, maxOutputs ...int) ([]*ledger.OutputWithID, *base.TransactionID, uint64, error)
- func (c *APIClient) MakeChainOrigin(par TransferFromED25519WalletParams) (*transaction.TxContext, base.ChainID, error)
- func (c *APIClient) MakeCompactTransaction(walletPrivateKey ed25519.PrivateKey, tagAlongSeqID *base.ChainID, ...) (*transaction.TxContext, error)
- func (c *APIClient) MakeSendOutputTransaction(o *ledger.Output, privateKey ed25519.PrivateKey, ts base.LedgerTime) ([]byte, base.TransactionID, string, error)
- func (c *APIClient) SubmitTransaction(txBytes []byte) error
- func (c *APIClient) TransferFromED25519Wallet(par TransferFromED25519WalletParams) (*transaction.TxContext, error)
- type MakeTransferTransactionParams
- type SequencerData
- type TransferFromED25519WalletParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeTransferTransaction ¶
func MakeTransferTransaction(par MakeTransferTransactionParams) ([]byte, error)
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
func NewWithGoogleDNS ¶
NewWithGoogleDNS following ChatGPT suggestion to use GoogleDNS to speed up DNS name resolution Otherwise it takes too long in Proxi
func (*APIClient) CheckTransactionIDInLRB ¶
func (c *APIClient) CheckTransactionIDInLRB(txid base.TransactionID, maxDepth ...int) (lrbID base.TransactionID, foundAtDepth int, err error)
func (*APIClient) GetAccountOutputs ¶
func (c *APIClient) GetAccountOutputs(account ledger.Accountable, filter ...func(oid *base.OutputID, o *ledger.Output) bool) ([]*ledger.OutputWithID, *base.TransactionID, error)
GetAccountOutputs returns all UTXOs in the account
func (*APIClient) GetAccountOutputsExt ¶
func (c *APIClient) GetAccountOutputsExt(account ledger.Accountable, maxOutputs int, sortOption string, filter ...func(oid *base.OutputID, o *ledger.Output) bool) ([]*ledger.OutputWithID, *base.TransactionID, error)
func (*APIClient) GetAccountParsedOutputs ¶
func (c *APIClient) GetAccountParsedOutputs(account ledger.Accountable, maxOutputs int, sortOption ...string) (*api.ParsedOutputList, error)
func (*APIClient) GetAllChains ¶
func (c *APIClient) GetAllChains() ([]*ledger.OutputWithChainID, *base.TransactionID, error)
func (*APIClient) GetAllSequencerOutputs ¶
func (c *APIClient) GetAllSequencerOutputs() (map[base.ChainID]ledger.OutputWithSequencerData, *base.TransactionID, error)
func (*APIClient) GetChainOutput ¶
func (c *APIClient) GetChainOutput(chainID base.ChainID) (*ledger.OutputWithChainID, byte, base.TransactionID, error)
GetChainOutput returns parsed output for the chain id and index of the chain constraint in it
func (*APIClient) GetChainOutputData ¶
func (c *APIClient) GetChainOutputData(chainID base.ChainID) (*ledger.OutputDataWithID, base.TransactionID, error)
func (*APIClient) GetChainedOutputs ¶
func (c *APIClient) GetChainedOutputs(accountable ledger.Accountable) ([]*ledger.OutputWithChainID, *base.TransactionID, error)
GetChainedOutputs fetches all outputs of the account. Optionally sorts them on the server
func (*APIClient) GetDelegationOutputs ¶
func (c *APIClient) GetDelegationOutputs(accountable ledger.Accountable) ([]ledger.DelegationOutput, *base.TransactionID, error)
GetDelegationOutputs fetches all delegation outputs of the account. Optionally sorts them on the server
func (*APIClient) GetLastKnownSequencerData ¶
func (c *APIClient) GetLastKnownSequencerData() (map[string]tippool.LatestSequencerTipDataJSONAble, error)
func (*APIClient) GetLatestReliableBranch ¶
func (c *APIClient) GetLatestReliableBranch() (*multistate.RootRecord, base.TransactionID, error)
GetLatestReliableBranch retrieves latest reliable branch info from the node
func (*APIClient) GetLedgerIdentityData ¶
GetLedgerIdentityData retrieves raw ledger identity YAML from server
func (*APIClient) GetNonChainBalance ¶
func (c *APIClient) GetNonChainBalance(addr ledger.Accountable) (uint64, *base.TransactionID, error)
GetNonChainBalance total of outputs locked in the account but without chain constraint
func (*APIClient) GetOutputData ¶
GetOutputData returns output data from the LRB state, if it exists there Returns nil, nil if output does not exist
func (*APIClient) GetOutputsForAmount ¶
func (c *APIClient) GetOutputsForAmount(addr ledger.AddressED25519, amount uint64) ([]*ledger.OutputWithID, *base.TransactionID, uint64, error)
GetOutputsForAmount returns all UTXOs locked in the specified ED25519 address, which ar not chain outputs
func (*APIClient) GetSequencerData ¶
func (*APIClient) GetSimpleSigLockedOutputs ¶
func (c *APIClient) GetSimpleSigLockedOutputs(addr ledger.AddressED25519, maxOutputs int, sort ...string) ([]*ledger.OutputWithID, *base.TransactionID, error)
func (*APIClient) GetSnapshotBranchID ¶
func (c *APIClient) GetSnapshotBranchID() (ret base.TransactionID, err error)
func (*APIClient) GetTransferableOutputs ¶
func (c *APIClient) GetTransferableOutputs(account ledger.Accountable, maxOutputs ...int) ([]*ledger.OutputWithID, *base.TransactionID, uint64, error)
GetTransferableOutputs returns a reasonable maximum number of outputs owned by accountable with only 2 constraints and returns total
func (*APIClient) MakeChainOrigin ¶
func (c *APIClient) MakeChainOrigin(par TransferFromED25519WalletParams) (*transaction.TxContext, base.ChainID, error)
func (*APIClient) MakeCompactTransaction ¶
func (c *APIClient) MakeCompactTransaction(walletPrivateKey ed25519.PrivateKey, tagAlongSeqID *base.ChainID, tagAlongFee uint64, maxInputs ...int) (*transaction.TxContext, error)
MakeCompactTransaction requests server and creates a compact transaction for ED25519 outputs in the form of transaction context. Does not submit it
func (*APIClient) MakeSendOutputTransaction ¶
func (c *APIClient) MakeSendOutputTransaction(o *ledger.Output, privateKey ed25519.PrivateKey, ts base.LedgerTime) ([]byte, base.TransactionID, string, error)
func (*APIClient) SubmitTransaction ¶
func (*APIClient) TransferFromED25519Wallet ¶
func (c *APIClient) TransferFromED25519Wallet(par TransferFromED25519WalletParams) (*transaction.TxContext, error)
type MakeTransferTransactionParams ¶
type MakeTransferTransactionParams struct {
Inputs []*ledger.OutputWithID
Target ledger.Lock
Amount uint64
Remainder ledger.Lock
PrivateKey ed25519.PrivateKey
TagAlongSeqID *base.ChainID
TagAlongFee uint64
Timestamp base.LedgerTime
}
type SequencerData ¶
type SequencerData struct {
ledger.OutputWithChainID
NumDelegations int
}