transactions

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateConversionRequest

type CreateConversionRequest struct {
	PortfolioId         string `json:"portfolio_id"`
	SourceWalletId      string `json:"wallet_id"`
	SourceSymbol        string `json:"source_symbol"`
	DestinationWalletId string `json:"destination"`
	DestinationSymbol   string `json:"destination_symbol"`
	IdempotencyKey      string `json:"idempotency_key"`
	Amount              string `json:"amount"`
}

type CreateConversionResponse

type CreateConversionResponse struct {
	ActivityId          string                   `json:"activity_id"`
	SourceSymbol        string                   `json:"source_symbol"`
	DestinationSymbol   string                   `json:"destination_symbol"`
	Amount              string                   `json:"amount"`
	DestinationWalletId string                   `json:"destination"`
	SourceWalletId      string                   `json:"source"`
	TransactionId       string                   `json:"transaction_id"`
	Request             *CreateConversionRequest `json:"-"`
}

type CreateOnchainTransactionRequest

type CreateOnchainTransactionRequest struct {
	PortfolioId        string                    `json:"portfolio_id"`
	WalletId           string                    `json:"wallet_id"`
	OnchainTransaction *model.OnchainTransaction `json:"onchain_tx"`
}

type CreateOnchainTransactionResposne

type CreateOnchainTransactionResposne struct {
	TransactionId string                           `json:"transaction_id"`
	Request       *CreateOnchainTransactionRequest `json:"-"`
}

type CreateWalletTransferRequest

type CreateWalletTransferRequest struct {
	PortfolioId         string `json:"portfolio_id"`
	SourceWalletId      string `json:"wallet_id"`
	Symbol              string `json:"currency_symbol"`
	DestinationWalletId string `json:"destination"`
	IdempotencyKey      string `json:"idempotency_key"`
	Amount              string `json:"amount"`
}

type CreateWalletTransferResponse

type CreateWalletTransferResponse struct {
	ActivityId         string                       `json:"activity_id"`
	ApprovalUrl        string                       `json:"approval_url"`
	Symbol             string                       `json:"symbol"`
	Amount             string                       `json:"amount"`
	Fee                string                       `json:"fee"`
	DestinationAddress string                       `json:"destination_address"`
	DestinationType    string                       `json:"destination_type"`
	SourceAddress      string                       `json:"source_address"`
	SourceType         string                       `json:"source_type"`
	TransactionId      string                       `json:"transaction_id"`
	Request            *CreateWalletTransferRequest `json:"-"`
}

type CreateWalletWithdrawalPaymentMethod

type CreateWalletWithdrawalPaymentMethod struct {
	Id string `json:"payment_method_id"`
}

type CreateWalletWithdrawalRequest

type CreateWalletWithdrawalRequest struct {
	PortfolioId       string                               `json:"portfolio_id"`
	SourceWalletId    string                               `json:"wallet_id"`
	Amount            string                               `json:"amount"`
	DestinationType   string                               `json:"destination_type"`
	IdempotencyKey    string                               `json:"idempotency_key"`
	Symbol            string                               `json:"currency_symbol"`
	PaymentMethod     *CreateWalletWithdrawalPaymentMethod `json:"payment_method"`
	BlockchainAddress *model.BlockchainAddress             `json:"blockchain_address"`
	Counterparty      *model.CounterpartyDestination       `json:"counterparty,omitempty"`
	TravelRuleData    *model.TravelRuleData                `json:"travel_rule_data,omitempty"`
}

type CreateWalletWithdrawalResponse

type CreateWalletWithdrawalResponse struct {
	ActivityId              string                         `json:"activity_id"`
	ApprovalUrl             string                         `json:"approval_url"`
	Symbol                  string                         `json:"symbol"`
	Amount                  string                         `json:"amount"`
	Fee                     string                         `json:"fee"`
	DestinationType         string                         `json:"destination_type"`
	SourceType              string                         `json:"source_type"`
	Destination             *model.BlockchainAddress       `json:"blockchain_destination"`
	Source                  *model.BlockchainAddress       `json:"blockchain_source"`
	CounterpartyDestination *model.CounterpartyDestination `json:"counterparty_destination,omitempty"`
	TransactionId           string                         `json:"transaction_id"`
	Request                 *CreateWalletWithdrawalRequest `json:"-"`
}

type GetTransactionRequest

type GetTransactionRequest struct {
	PortfolioId   string `json:"portfolio_id"`
	TransactionId string `json:"transaction_id"`
}

type GetTransactionResponse

type GetTransactionResponse struct {
	Transaction *model.Transaction     `json:"transaction"`
	Request     *GetTransactionRequest `json:"-"`
}

type GetTransactionTravelRuleDataRequest

type GetTransactionTravelRuleDataRequest struct {
	PortfolioId   string `json:"-"`
	TransactionId string `json:"-"`
}

type GetTransactionTravelRuleDataResponse

type GetTransactionTravelRuleDataResponse struct {
	Fulfilled          bool                                 `json:"fulfilled"`
	IsSelf             bool                                 `json:"is_self"`
	Originator         *model.TravelRuleParty               `json:"originator,omitempty"`
	Beneficiary        *model.TravelRuleParty               `json:"beneficiary,omitempty"`
	Amount             string                               `json:"amount,omitempty"`
	AmountCurrency     string                               `json:"amount_currency,omitempty"`
	FiatAmount         string                               `json:"fiat_amount,omitempty"`
	FiatAmountCurrency string                               `json:"fiat_amount_currency,omitempty"`
	BlockchainNetwork  string                               `json:"blockchain_network,omitempty"`
	Request            *GetTransactionTravelRuleDataRequest `json:"-"`
}

type ListPortfolioTransactionsRequest

type ListPortfolioTransactionsRequest struct {
	PortfolioId string                  `json:"portfolio_id"`
	Symbols     string                  `json:"symbols"`
	Types       []string                `json:"types"`
	Start       time.Time               `json:"start_time"`
	End         time.Time               `json:"end_time"`
	Pagination  *model.PaginationParams `json:"pagination_params"`
}

type ListPortfolioTransactionsResponse

type ListPortfolioTransactionsResponse struct {
	model.PaginationMixin                                   // provides Pagination, HasNext(), GetNextCursor()
	Transactions          []*model.Transaction              `json:"transactions"`
	Request               *ListPortfolioTransactionsRequest `json:"-"`
	// contains filtered or unexported fields
}

func (*ListPortfolioTransactionsResponse) Iterator

Iterator returns a PageIterator for convenient iteration and FetchAll. The iterator respects the service's ServiceConfig for MaxPages and MaxItems.

func (*ListPortfolioTransactionsResponse) Next

Next fetches the next page of results. Returns nil, nil if no more pages.

type ListWalletTransactionsRequest

type ListWalletTransactionsRequest struct {
	PortfolioId string                  `json:"portfolio_id"`
	WalletId    string                  `json:"wallet_id"`
	Symbols     string                  `json:"symbols"`
	Types       []string                `json:"types"`
	Start       time.Time               `json:"start_time"`
	End         time.Time               `json:"end_time"`
	Pagination  *model.PaginationParams `json:"pagination_params"`
}

type ListWalletTransactionsResponse

type ListWalletTransactionsResponse struct {
	model.PaginationMixin
	Transactions []*model.Transaction           `json:"transactions"`
	Request      *ListWalletTransactionsRequest `json:"-"`
	// contains filtered or unexported fields
}

func (*ListWalletTransactionsResponse) Iterator

Iterator returns a PageIterator for convenient iteration and FetchAll.

func (*ListWalletTransactionsResponse) Next

Next fetches the next page of results. Returns nil, nil if no more pages.

type SubmitDepositTravelRuleDataRequest

type SubmitDepositTravelRuleDataRequest struct {
	PortfolioId                   string                 `json:"-"`
	TransactionId                 string                 `json:"-"`
	Originator                    *model.TravelRuleParty `json:"originator,omitempty"`
	Beneficiary                   *model.TravelRuleParty `json:"beneficiary,omitempty"`
	IsSelf                        bool                   `json:"is_self,omitempty"`
	OptOutOfOwnershipVerification bool                   `json:"opt_out_of_ownership_verification,omitempty"`
}

type SubmitDepositTravelRuleDataResponse

type SubmitDepositTravelRuleDataResponse struct {
	OwnershipVerificationRequired bool                                `json:"ownership_verification_required"`
	Request                       *SubmitDepositTravelRuleDataRequest `json:"-"`
}

type TransactionsService

type TransactionsService interface {
	ListPortfolioTransactions(ctx context.Context, request *ListPortfolioTransactionsRequest) (*ListPortfolioTransactionsResponse, error)
	GetTransaction(ctx context.Context, request *GetTransactionRequest) (*GetTransactionResponse, error)
	CreateConversion(ctx context.Context, request *CreateConversionRequest) (*CreateConversionResponse, error)
	ListWalletTransactions(ctx context.Context, request *ListWalletTransactionsRequest) (*ListWalletTransactionsResponse, error)
	CreateWalletTransfer(ctx context.Context, request *CreateWalletTransferRequest) (*CreateWalletTransferResponse, error)
	CreateWalletWithdrawal(ctx context.Context, request *CreateWalletWithdrawalRequest) (*CreateWalletWithdrawalResponse, error)
	CreateOnchainTransaction(ctx context.Context, request *CreateOnchainTransactionRequest) (*CreateOnchainTransactionResposne, error)
	SubmitDepositTravelRuleData(ctx context.Context, request *SubmitDepositTravelRuleDataRequest) (*SubmitDepositTravelRuleDataResponse, error)
	GetTransactionTravelRuleData(ctx context.Context, request *GetTransactionTravelRuleDataRequest) (*GetTransactionTravelRuleDataResponse, error)
	ServiceConfig() *model.ServiceConfig
}

func NewTransactionsService

func NewTransactionsService(c client.RestClient) TransactionsService

NewTransactionsService creates a new TransactionsService with default pagination config

func NewTransactionsServiceWithConfig

func NewTransactionsServiceWithConfig(c client.RestClient, config *model.ServiceConfig) TransactionsService

NewTransactionsServiceWithConfig creates a new TransactionsService with custom pagination config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL