Documentation ¶
Index ¶
- Constants
- Variables
- func NewAccountService(models *data.Models) (*accountService, error)
- func NewAccountSponsorshipService(opts AccountSponsorshipServiceOptions) (*accountSponsorshipService, error)
- func NewChannelAccountService(opts ChannelAccountServiceOptions) (*channelAccountService, error)
- func NewIngestService(models *data.Models, ledgerCursorName string, appTracker apptracker.AppTracker, ...) (*ingestService, error)
- func NewKMSImportService(client kmsiface.KMSAPI, kmsKeyARN string, keypairStore store.KeypairStore, ...) (*kmsImportService, error)
- func NewPaymentService(models *data.Models, serverBaseURL string) (*paymentService, error)
- func NewRPCService(rpcURL string, httpClient utils.HTTPClient) (*rpcService, error)
- type AccountService
- type AccountSponsorshipService
- type AccountSponsorshipServiceOptions
- type ChannelAccountService
- type ChannelAccountServiceOptions
- type ErrOperationNotAllowed
- type IngestService
- type KMSImportService
- type PaymentService
- type RPCService
- type RPCServiceMock
- func (r *RPCServiceMock) GetHealth() (entities.RPCGetHealthResult, error)
- func (r *RPCServiceMock) GetTransaction(transactionHash string) (entities.RPCGetTransactionResult, error)
- func (r *RPCServiceMock) GetTransactions(startLedger int64, startCursor string, limit int) (entities.RPCGetTransactionsResult, error)
- func (r *RPCServiceMock) SendTransaction(transactionXdr string) (entities.RPCSendTransactionResult, error)
Constants ¶
View Source
const ( // Sufficient to cover three average ledger close time. CreateAccountTxnTimeBounds = 18 CreateAccountTxnTimeBoundsSafetyMargin = 12 )
Variables ¶
View Source
var ( ErrAccountAlreadyExists = errors.New("account already exists") ErrSponsorshipLimitExceeded = errors.New("sponsorship limit exceeded") ErrAccountNotEligibleForBeingSponsored = errors.New("account not eligible for being sponsored") ErrFeeExceedsMaximumBaseFee = errors.New("fee exceeds maximum base fee to sponsor") ErrNoSignaturesProvided = errors.New("should have at least one signature") )
View Source
var ( ErrInvalidPrivateKeyProvided = errors.New("invalid private key provided") ErrMismatchDistributionAccount = errors.New("mismatch distribution account") )
View Source
var PageLimit = 200
Functions ¶
func NewAccountService ¶
func NewAccountSponsorshipService ¶
func NewAccountSponsorshipService(opts AccountSponsorshipServiceOptions) (*accountSponsorshipService, error)
func NewChannelAccountService ¶
func NewChannelAccountService(opts ChannelAccountServiceOptions) (*channelAccountService, error)
func NewIngestService ¶
func NewIngestService( models *data.Models, ledgerCursorName string, appTracker apptracker.AppTracker, rpcService RPCService, tssRouter tssrouter.Router, tssStore tssstore.Store, ) (*ingestService, error)
func NewKMSImportService ¶
func NewPaymentService ¶
func NewRPCService ¶
func NewRPCService(rpcURL string, httpClient utils.HTTPClient) (*rpcService, error)
Types ¶
type AccountService ¶
type AccountService interface { // RegisterAccount registers an externally created Stellar account to be sponsored, and tracked by ingestion RegisterAccount(ctx context.Context, address string) error // DeregisterAccount deregisters a Stellar account, no longer sponsoring its transactions, nor tracking it on ingestion DeregisterAccount(ctx context.Context, address string) error }
type AccountSponsorshipServiceOptions ¶
type AccountSponsorshipServiceOptions struct { DistributionAccountSignatureClient signing.SignatureClient ChannelAccountSignatureClient signing.SignatureClient HorizonClient horizonclient.ClientInterface MaxSponsoredBaseReserves int BaseFee int64 Models *data.Models BlockedOperationsTypes []xdr.OperationType }
func (*AccountSponsorshipServiceOptions) Validate ¶
func (o *AccountSponsorshipServiceOptions) Validate() error
type ChannelAccountService ¶
type ChannelAccountServiceOptions ¶
type ChannelAccountServiceOptions struct { DB db.ConnectionPool HorizonClient horizonclient.ClientInterface BaseFee int64 DistributionAccountSignatureClient signing.SignatureClient ChannelAccountStore store.ChannelAccountStore PrivateKeyEncrypter signingutils.PrivateKeyEncrypter EncryptionPassphrase string }
func (*ChannelAccountServiceOptions) Validate ¶
func (o *ChannelAccountServiceOptions) Validate() error
type ErrOperationNotAllowed ¶
type ErrOperationNotAllowed struct {
OperationType xdr.OperationType
}
func (ErrOperationNotAllowed) Error ¶
func (e ErrOperationNotAllowed) Error() string
type IngestService ¶
type KMSImportService ¶
type PaymentService ¶
type RPCService ¶
type RPCService interface { GetTransaction(transactionHash string) (entities.RPCGetTransactionResult, error) GetTransactions(startLedger int64, startCursor string, limit int) (entities.RPCGetTransactionsResult, error) SendTransaction(transactionXDR string) (entities.RPCSendTransactionResult, error) GetHealth() (entities.RPCGetHealthResult, error) }
type RPCServiceMock ¶
func (*RPCServiceMock) GetHealth ¶
func (r *RPCServiceMock) GetHealth() (entities.RPCGetHealthResult, error)
func (*RPCServiceMock) GetTransaction ¶
func (r *RPCServiceMock) GetTransaction(transactionHash string) (entities.RPCGetTransactionResult, error)
func (*RPCServiceMock) GetTransactions ¶
func (r *RPCServiceMock) GetTransactions(startLedger int64, startCursor string, limit int) (entities.RPCGetTransactionsResult, error)
func (*RPCServiceMock) SendTransaction ¶
func (r *RPCServiceMock) SendTransaction(transactionXdr string) (entities.RPCSendTransactionResult, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.