geminisettlement

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CategorizeResponse

func CategorizeResponse(
	originalTransactions map[string]settlement.Transaction,
	payout *gemini.PayoutResult,
) (settlement.Transaction, string)

CategorizeResponse categorizes a response from gemini as pending, complete, failed, or unknown

func CategorizeResponses

func CategorizeResponses(
	originalTransactions map[string]settlement.Transaction,
	response *[]gemini.PayoutResult,
) map[string][]settlement.Transaction

CategorizeResponses categorizes the series of responses

func CheckPayoutTransactionsStatus

func CheckPayoutTransactionsStatus(
	ctx context.Context,
	transactionsMap map[string]settlement.Transaction,
	submittedTransactions map[string][]settlement.Transaction,
	bulkPayoutRequestRequirements gemini.PrivateRequestSequence,
	geminiClient gemini.Client,
	total int,
	blockProgress int,
) (map[string][]settlement.Transaction, error)

CheckPayoutTransactionsStatus checks the status of given transactions

func ConvertTransactionsToPayouts

func ConvertTransactionsToPayouts(transactions *[]settlement.Transaction, txID string) (*[]gemini.PayoutPayload, decimal.Decimal)

ConvertTransactionsToPayouts converts transactions from antifraud to "payouts" for gemini

func GeminiWriteRequests

func GeminiWriteRequests(outPath string, metadata *[][]gemini.PayoutPayload) error

GeminiWriteRequests writes settlement transactions to a json file

func GeminiWriteTransactions

func GeminiWriteTransactions(ctx context.Context, outPath string, metadata *[]settlement.Transaction) error

GeminiWriteTransactions writes settlement transactions to a json file

func IterateRequest

func IterateRequest(
	ctx context.Context,
	action string,
	geminiClient gemini.Client,
	signatureSwitch int,
	bulkPayoutFiles []string,
	transactionsMap map[string]settlement.Transaction,
) (*map[string][]settlement.Transaction, error)

IterateRequest iterates requests

func SignRequests

func SignRequests(
	clientID string,
	clientKey string,
	hmacSecret *vaultsigner.HmacSigner,
	privateRequests *[][]gemini.PayoutPayload,
) (*[]gemini.PrivateRequestSequence, error)

SignRequests signs formed requests

func SubmitBulkPayoutTransactions

func SubmitBulkPayoutTransactions(
	ctx context.Context,
	transactionsMap map[string]settlement.Transaction,
	submittedTransactions map[string][]settlement.Transaction,
	bulkPayoutRequestRequirements gemini.PrivateRequestSequence,
	geminiClient gemini.Client,
	total int,
	blockProgress int,
	signatureSwitch int,
) (map[string][]settlement.Transaction, error)

SubmitBulkPayoutTransactions submits bulk payout transactions

func TransformTransactions

func TransformTransactions(ctx context.Context, oauthClientID string, transactions []settlement.Transaction) (*[][]gemini.PayoutPayload, error)

TransformTransactions splits the transactions into appropriately sized blocks for signing

Types

This section is empty.

Jump to

Keyboard shortcuts

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