Documentation ¶
Index ¶
- func CategorizeResponse(batchByTransferID map[string]settlement.AggregateTransaction, ...) ([]custodian.Transaction, string)
- func CategorizeResponses(batch []settlement.AggregateTransaction, ...) map[string][]custodian.Transaction
- func CheckPayoutTransactionsStatus(ctx context.Context, batch []settlement.AggregateTransaction, ...) (map[string][]custodian.Transaction, error)
- func GroupSettlements(settlements *[]custodian.Transaction) map[string][]custodian.Transaction
- func IterateRequest(ctx context.Context, action string, bitflyerClient bitflyer.Client, ...) (map[string][]custodian.Transaction, error)
- func SubmitBulkPayoutTransactions(ctx context.Context, batch []settlement.AggregateTransaction, ...) (map[string][]custodian.Transaction, error)
- type PreparedTransactions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CategorizeResponse ¶
func CategorizeResponse( batchByTransferID map[string]settlement.AggregateTransaction, payout *bitflyer.WithdrawToDepositIDResponse, ) ([]custodian.Transaction, string)
CategorizeResponse categorizes a response from bitflyer as pending, complete, failed, or unknown
func CategorizeResponses ¶
func CategorizeResponses( batch []settlement.AggregateTransaction, response *[]bitflyer.WithdrawToDepositIDResponse, ) map[string][]custodian.Transaction
CategorizeResponses categorizes the series of responses
func CheckPayoutTransactionsStatus ¶
func CheckPayoutTransactionsStatus( ctx context.Context, batch []settlement.AggregateTransaction, submittedTransactions map[string][]custodian.Transaction, bulkPayoutRequestRequirements bitflyer.WithdrawToDepositIDBulkPayload, bitflyerClient bitflyer.Client, total int, blockProgress int, ) (map[string][]custodian.Transaction, error)
CheckPayoutTransactionsStatus checks the status of given transactions
func GroupSettlements ¶
func GroupSettlements( settlements *[]custodian.Transaction, ) map[string][]custodian.Transaction
GroupSettlements groups settlements under a single wallet provider id so that we can impose limits based on price no signing here, just grouping settlements under a single deposit id
func IterateRequest ¶
func IterateRequest( ctx context.Context, action string, bitflyerClient bitflyer.Client, prepared PreparedTransactions, dryRun *bitflyer.DryRunOption, ) (map[string][]custodian.Transaction, error)
IterateRequest iterates requests
func SubmitBulkPayoutTransactions ¶
func SubmitBulkPayoutTransactions( ctx context.Context, batch []settlement.AggregateTransaction, submittedTransactions map[string][]custodian.Transaction, bulkPayoutRequestRequirements bitflyer.WithdrawToDepositIDBulkPayload, bitflyerClient bitflyer.Client, total int, blockProgress int, ) (map[string][]custodian.Transaction, error)
SubmitBulkPayoutTransactions submits bulk payout transactions
Types ¶
type PreparedTransactions ¶
type PreparedTransactions struct { // goes to bitflyer AggregateTransactionBatches [][]settlement.AggregateTransaction `json:"aggregateTransactionBatches"` // a list of settlements that are not being sent NotSubmittedTransactions []custodian.Transaction `json:"notSubmittedTransactions"` }
PreparedTransactions are the transactions which have been prepared into batches after applying limits, etc
func PrepareRequests ¶
func PrepareRequests( ctx context.Context, bitflyerClient bitflyer.Client, txs []custodian.Transaction, excludeLimited bool, sourceFrom string, ) (*PreparedTransactions, error)
PrepareRequests prepares requests
Click to show internal directories.
Click to hide internal directories.