Documentation
¶
Index ¶
- Variables
- func NewBlockchainRouter(config *configuration.Configuration, client *icon.Client, ...) http.Handler
- type AccountAPIService
- type BlockAPIService
- type Client
- type ConstructionAPIService
- func (s *ConstructionAPIService) ConstructionCombine(ctx context.Context, request *types.ConstructionCombineRequest) (*types.ConstructionCombineResponse, *types.Error)
- func (s *ConstructionAPIService) ConstructionDerive(ctx context.Context, request *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error)
- func (s *ConstructionAPIService) ConstructionHash(ctx context.Context, request *types.ConstructionHashRequest) (*types.TransactionIdentifierResponse, *types.Error)
- func (s *ConstructionAPIService) ConstructionMetadata(ctx context.Context, request *types.ConstructionMetadataRequest) (*types.ConstructionMetadataResponse, *types.Error)
- func (s *ConstructionAPIService) ConstructionParse(ctx context.Context, request *types.ConstructionParseRequest) (*types.ConstructionParseResponse, *types.Error)
- func (s *ConstructionAPIService) ConstructionPayloads(ctx context.Context, request *types.ConstructionPayloadsRequest) (*types.ConstructionPayloadsResponse, *types.Error)
- func (s *ConstructionAPIService) ConstructionPreprocess(ctx context.Context, request *types.ConstructionPreprocessRequest) (*types.ConstructionPreprocessResponse, *types.Error)
- func (s *ConstructionAPIService) ConstructionSubmit(ctx context.Context, request *types.ConstructionSubmitRequest) (*types.TransactionIdentifierResponse, *types.Error)
- type NetworkAPIService
- func (s *NetworkAPIService) NetworkList(ctx context.Context, request *types.MetadataRequest) (*types.NetworkListResponse, *types.Error)
- func (s *NetworkAPIService) NetworkOptions(ctx context.Context, request *types.NetworkRequest) (*types.NetworkOptionsResponse, *types.Error)
- func (s *NetworkAPIService) NetworkStatus(ctx context.Context, request *types.NetworkRequest) (*types.NetworkStatusResponse, *types.Error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Errors contains all errors that could be returned // by this Rosetta implementation. Errors = []*types.Error{ ErrUnimplemented, ErrUnavailableOffline, ErrNotReady, ErrWrongBlockHash, } // ErrUnimplemented is returned when an endpoint // is called that is not implemented. ErrUnimplemented = &types.Error{ Code: 0, Message: "Endpoint not implemented", } // is called that is not available offline. ErrUnavailableOffline = &types.Error{ Code: 1, Message: "Endpoint unavailable offline", } // ErrNotReady is returned when ICON Node is not // yet ready to serve queries. ErrNotReady = &types.Error{ Code: 2, Message: "ICON Node is not ready", Retriable: true, } // ErrUnableToDecompressPubkey is returned when // the *types.PublicKey provided in /construction/derive // cannot be decompressed. ErrUnableToDecompressPubkey = &types.Error{ Code: 3, Message: "unable to decompress public key", } // ErrUnclearIntent is returned when operations // provided in /construction/preprocess or /construction/payloads // are not valid. ErrUnclearIntent = &types.Error{ Code: 4, Message: "Unable to parse intent", } // ErrUnableToParseIntermediateResult is returned // when a data structure passed between Construction // API calls is not valid. ErrUnableToParseIntermediateResult = &types.Error{ Code: 5, Message: "Unable to parse intermediate result", } // ErrSignatureInvalid is returned when a signature // cannot be parsed. ErrSignatureInvalid = &types.Error{ Code: 6, Message: "Signature invalid", } // ErrBroadcastFailed is returned when transaction // broadcast fails. ErrBroadcastFailed = &types.Error{ Code: 7, Message: "Unable to broadcast transaction", } // ErrInvalidAddress is returned when an address // is not valid. ErrInvalidAddress = &types.Error{ Code: 12, Message: "Invalid address", } // ErrNotReady is returned when ICON Node is not // yet ready to serve queries. ErrWrongBlockHash = &types.Error{ Code: 13, Message: "Wrong Block Hash", Retriable: true, } )
Functions ¶
func NewBlockchainRouter ¶
func NewBlockchainRouter( config *configuration.Configuration, client *icon.Client, asserter *asserter.Asserter, ) http.Handler
NewBlockchainRouter creates a Mux http.Handler from a collection of server controllers.
Types ¶
type AccountAPIService ¶
type AccountAPIService struct {
// contains filtered or unexported fields
}
func NewAccountAPIService ¶
func NewAccountAPIService( config *configuration.Configuration, client *icon.Client, ) *AccountAPIService
func (*AccountAPIService) AccountBalance ¶
func (s *AccountAPIService) AccountBalance( ctx context.Context, request *types.AccountBalanceRequest, ) (*types.AccountBalanceResponse, *types.Error)
AccountBalance implements /account/balance.
type BlockAPIService ¶
type BlockAPIService struct {
// contains filtered or unexported fields
}
func NewBlockAPIService ¶
func NewBlockAPIService( config *configuration.Configuration, client *icon.Client, ) *BlockAPIService
func (*BlockAPIService) Block ¶
func (s *BlockAPIService) Block( ctx context.Context, request *types.BlockRequest, ) (*types.BlockResponse, *types.Error)
Block implements the /block endpoint.
func (*BlockAPIService) BlockTransaction ¶
func (s *BlockAPIService) BlockTransaction( ctx context.Context, request *types.BlockTransactionRequest, ) (*types.BlockTransactionResponse, *types.Error)
BlockTransaction implements the /block/transaction endpoint.
type Client ¶
type Client interface { GetBlock( context.Context, *types.PartialBlockIdentifier, ) (*types.Block, error) }
Client is used by the servicers to get block data and to submit transactions.
type ConstructionAPIService ¶
type ConstructionAPIService struct {
// contains filtered or unexported fields
}
func NewConstructionAPIService ¶
func NewConstructionAPIService( cfg *configuration.Configuration, client *icon.Client, ) *ConstructionAPIService
func (*ConstructionAPIService) ConstructionCombine ¶
func (s *ConstructionAPIService) ConstructionCombine( ctx context.Context, request *types.ConstructionCombineRequest, ) (*types.ConstructionCombineResponse, *types.Error)
func (*ConstructionAPIService) ConstructionDerive ¶
func (s *ConstructionAPIService) ConstructionDerive( ctx context.Context, request *types.ConstructionDeriveRequest, ) (*types.ConstructionDeriveResponse, *types.Error)
func (*ConstructionAPIService) ConstructionHash ¶
func (s *ConstructionAPIService) ConstructionHash( ctx context.Context, request *types.ConstructionHashRequest, ) (*types.TransactionIdentifierResponse, *types.Error)
func (*ConstructionAPIService) ConstructionMetadata ¶
func (s *ConstructionAPIService) ConstructionMetadata( ctx context.Context, request *types.ConstructionMetadataRequest, ) (*types.ConstructionMetadataResponse, *types.Error)
func (*ConstructionAPIService) ConstructionParse ¶
func (s *ConstructionAPIService) ConstructionParse( ctx context.Context, request *types.ConstructionParseRequest, ) (*types.ConstructionParseResponse, *types.Error)
ConstructionParse implements the /construction/parse endpoint.
func (*ConstructionAPIService) ConstructionPayloads ¶
func (s *ConstructionAPIService) ConstructionPayloads( ctx context.Context, request *types.ConstructionPayloadsRequest, ) (*types.ConstructionPayloadsResponse, *types.Error)
func (*ConstructionAPIService) ConstructionPreprocess ¶
func (s *ConstructionAPIService) ConstructionPreprocess( ctx context.Context, request *types.ConstructionPreprocessRequest, ) (*types.ConstructionPreprocessResponse, *types.Error)
func (*ConstructionAPIService) ConstructionSubmit ¶
func (s *ConstructionAPIService) ConstructionSubmit( ctx context.Context, request *types.ConstructionSubmitRequest, ) (*types.TransactionIdentifierResponse, *types.Error)
type NetworkAPIService ¶
type NetworkAPIService struct {
// contains filtered or unexported fields
}
func NewNetworkAPIService ¶
func NewNetworkAPIService( config *configuration.Configuration, client *icon.Client, ) *NetworkAPIService
func (*NetworkAPIService) NetworkList ¶
func (s *NetworkAPIService) NetworkList( ctx context.Context, request *types.MetadataRequest, ) (*types.NetworkListResponse, *types.Error)
NetworkList implements the /network/list endpoint
func (*NetworkAPIService) NetworkOptions ¶
func (s *NetworkAPIService) NetworkOptions( ctx context.Context, request *types.NetworkRequest, ) (*types.NetworkOptionsResponse, *types.Error)
NetworkOptions implements the /network/options endpoint.
func (*NetworkAPIService) NetworkStatus ¶
func (s *NetworkAPIService) NetworkStatus( ctx context.Context, request *types.NetworkRequest, ) (*types.NetworkStatusResponse, *types.Error)
NetworkStatus implements the /network/status endpoint.
Click to show internal directories.
Click to hide internal directories.