Files
1641c3c852 feat: update for Ledger v2 (#468)
Co-authored-by: Antoine Wacheux <[email protected]>
Co-authored-by: Maxence Maireaux <[email protected]>
Co-authored-by: Brieuc Caillot <[email protected]>
2023-09-20 16:40:28 +02:00

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)
}