mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
Co-authored-by: Antoine Wacheux <[email protected]> Co-authored-by: Maxence Maireaux <[email protected]> Co-authored-by: Brieuc Caillot <[email protected]>
20 lines
660 B
Go
20 lines
660 B
Go
package command
|
|
|
|
import (
|
|
"context"
|
|
"math/big"
|
|
|
|
ledger "github.com/formancehq/ledger/internal"
|
|
"github.com/formancehq/ledger/internal/machine/vm"
|
|
)
|
|
|
|
type Store interface {
|
|
vm.Store
|
|
InsertLogs(ctx context.Context, logs ...*ledger.ChainedLog) error
|
|
GetLastLog(ctx context.Context) (*ledger.ChainedLog, error)
|
|
GetLastTransaction(ctx context.Context) (*ledger.ExpandedTransaction, error)
|
|
ReadLogWithIdempotencyKey(ctx context.Context, key string) (*ledger.ChainedLog, error)
|
|
GetTransactionByReference(ctx context.Context, ref string) (*ledger.ExpandedTransaction, error)
|
|
GetTransaction(ctx context.Context, txID *big.Int) (*ledger.Transaction, error)
|
|
}
|