cic-custodial/internal/nonce/nonce.go
Mohammed Sohail 448b142f7c
refactor: nonce store interface
* A nonce value can  now be bootstrapped externally from any source
* Removed unecessary SetNewAccountNonce method
2023-03-29 07:37:59 +00:00

12 lines
342 B
Go

package nonce
import "context"
// Noncestore defines how a nonce store should be implemented for any storage backend.
type Noncestore interface {
Peek(context.Context, string) (uint64, error)
Acquire(context.Context, string) (uint64, error)
Return(context.Context, string) error
SetAccountNonce(context.Context, string, uint64) error
}