Documentation
¶
Index ¶
- type Proxy
- func (oc *Proxy) AccountIdentifierFromPublicKey(pubKey *types.PublicKey) (*types.AccountIdentifier, error)
- func (oc *Proxy) Balances(ctx context.Context, addr string, height *int64) (res *types.AccountBalanceResponse, err error)
- func (oc *Proxy) BlockByHash(ctx context.Context, hash string) (*types.BlockResponse, error)
- func (oc *Proxy) BlockByHeight(ctx context.Context, height int64) (*types.BlockResponse, error)
- func (oc *Proxy) BlockTransactionsByHash(ctx context.Context, hash string) (*types.BlockTransactionResponse, error)
- func (oc *Proxy) BlockTransactionsByHeight(ctx context.Context, height *int64) (*types.BlockTransactionResponse, error)
- func (oc *Proxy) Bootstrap() error
- func (oc *Proxy) ConstructionMetadataFromOptions(ctx context.Context, options map[string]interface{}) (meta map[string]interface{}, err error)
- func (oc *Proxy) ConstructionPayload(ctx context.Context, req *types.ConstructionPayloadsRequest) (resp *types.ConstructionPayloadsResponse, err error)
- func (oc *Proxy) CurrentBlock(ctx context.Context) (*types.BlockResponse, error)
- func (oc *Proxy) GetTx(ctx context.Context, hash string) (*types.Transaction, error)
- func (oc *Proxy) GetUnconfirmedTx(ctx context.Context, hash string) (*types.Transaction, error)
- func (oc *Proxy) Mempool(ctx context.Context) ([]*types.TransactionIdentifier, error)
- func (oc *Proxy) OperationStatuses() []*types.OperationStatus
- func (oc *Proxy) Peers(ctx context.Context) ([]*types.Peer, error)
- func (oc *Proxy) PostTx(txBytes []byte) (res *types.TransactionIdentifier, meta map[string]interface{}, err error)
- func (oc *Proxy) PreprocessOperationsToOptions(ctx context.Context, req *types.ConstructionPreprocessRequest) (resp *types.ConstructionPreprocessResponse, err error)
- func (oc *Proxy) Ready() error
- func (oc *Proxy) SignedTx(ctx context.Context, txBytes []byte, sigs []*types.Signature) (signedTxBytes []byte, err error)
- func (oc *Proxy) Status(ctx context.Context) (*types.SyncStatus, error)
- func (oc *Proxy) SupportedOperations() []string
- func (oc *Proxy) TxOperationsAndSignersAccountIdentifiers(signed bool, hexBytes []byte) (ops []*types.Operation, signers []*types.AccountIdentifier, err error)
- func (oc *Proxy) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) AccountIdentifierFromPublicKey ¶
func (oc *Proxy) AccountIdentifierFromPublicKey(pubKey *types.PublicKey) (*types.AccountIdentifier, error)
AccountIdentifierFromPublicKey returns the account identifier given the public key
func (*Proxy) Balances ¶
func (oc *Proxy) Balances(ctx context.Context, addr string, height *int64) (res *types.AccountBalanceResponse, err error)
Balances fetches the balance of the given address if height is not nil, then the balance will be displayed at the provided height, otherwise last block balance will be returned
func (*Proxy) BlockByHash ¶
BlockByHashAlt gets a block and its transaction at the provided height
func (*Proxy) BlockByHeight ¶
BlockByHeightAlt gets a block given its height, if height is nil then last block is returned
func (*Proxy) BlockTransactionsByHash ¶
func (oc *Proxy) BlockTransactionsByHash(ctx context.Context, hash string) (*types.BlockTransactionResponse, error)
BlockTransactionsByHash gets the block, parent block and transactions given the block hash.
func (*Proxy) BlockTransactionsByHeight ¶
func (oc *Proxy) BlockTransactionsByHeight(ctx context.Context, height *int64) (*types.BlockTransactionResponse, error)
BlockTransactionsByHash gets the block, parent block and transactions given the block hash.
func (*Proxy) ConstructionMetadataFromOptions ¶
func (oc *Proxy) ConstructionMetadataFromOptions(ctx context.Context, options map[string]interface{}) (meta map[string]interface{}, err error)
ConstructionMetadataFromOptions
func (*Proxy) ConstructionPayload ¶
func (oc *Proxy) ConstructionPayload(ctx context.Context, req *types.ConstructionPayloadsRequest) (resp *types.ConstructionPayloadsResponse, err error)
ConstructionPayload returns the construction payload given the request
func (*Proxy) CurrentBlock ¶
func (*Proxy) GetUnconfirmedTx ¶
GetUnconfirmedTx gets an unconfirmed Tx given its hash NOTE(fdymylja): NOT IMPLEMENTED YET!
func (*Proxy) OperationStatuses ¶
func (oc *Proxy) OperationStatuses() []*types.OperationStatus
OperationsStatuses returns the list of statuses supported by the implementation
func (*Proxy) PostTx ¶
func (oc *Proxy) PostTx(txBytes []byte) (res *types.TransactionIdentifier, meta map[string]interface{}, err error)
PostTx posts txBytes to the node and returns the transaction identifier plus metadata related to the transaction itself.
func (*Proxy) PreprocessOperationsToOptions ¶
func (oc *Proxy) PreprocessOperationsToOptions(ctx context.Context, req *types.ConstructionPreprocessRequest) (resp *types.ConstructionPreprocessResponse, err error)
PreprocessOperationsToOptions returns the options given the preprocess operations
func (*Proxy) Ready ¶
Ready checks if the servicer constraints for queries are satisfied for example the node might still not be ready, it's useful in process when the rosetta instance might come up before the node itself the servicer must return nil if the node is ready
func (*Proxy) SignedTx ¶
func (oc *Proxy) SignedTx(ctx context.Context, txBytes []byte, sigs []*types.Signature) (signedTxBytes []byte, err error)
SignedTx returns the signed transaction given the tx bytes (msgs) plus the signatures
func (*Proxy) SupportedOperations ¶
SupportedOperations lists the operations supported by the implementation
func (*Proxy) TxOperationsAndSignersAccountIdentifiers ¶
func (oc *Proxy) TxOperationsAndSignersAccountIdentifiers(signed bool, hexBytes []byte) (ops []*types.Operation, signers []*types.AccountIdentifier, err error)
TxOperationsAndSignersAccountIdentifiers returns the operations related to a transaction and the account identifiers if the transaction is signed