2023-02-09 08:42:15 +01:00
|
|
|
package store
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/grassrootseconomics/cic-custodial/pkg/status"
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
OTX struct {
|
2023-02-12 10:50:43 +01:00
|
|
|
TrackingId string
|
|
|
|
Type string
|
2023-02-09 08:42:15 +01:00
|
|
|
RawTx string
|
|
|
|
TxHash string
|
|
|
|
From string
|
|
|
|
Data string
|
|
|
|
GasPrice uint64
|
|
|
|
Nonce uint64
|
|
|
|
}
|
|
|
|
|
|
|
|
DispatchStatus struct {
|
2023-02-12 10:50:43 +01:00
|
|
|
OtxId uint
|
|
|
|
Status status.Status
|
2023-02-09 08:42:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Store interface {
|
|
|
|
// OTX (Custodial originating transactions).
|
|
|
|
CreateOTX(ctx context.Context, otx OTX) (id uint, err error)
|
|
|
|
// Dispatch status.
|
|
|
|
CreateDispatchStatus(ctx context.Context, dispatch DispatchStatus) (id uint, err error)
|
|
|
|
}
|
|
|
|
)
|