checkTxCode: (
code: string,
record: any,
presented: unknown,
) => Promise<
| {
attemptsLeft?: undefined;
missing?: undefined;
ok: boolean;
spent?: undefined;
store?: undefined;
}
| {
attemptsLeft?: undefined;
missing: boolean;
ok: boolean;
spent?: undefined;
store?: undefined;
}
| {
attemptsLeft?: undefined;
missing?: undefined;
ok: boolean;
spent?: undefined;
store: boolean;
}
| {
attemptsLeft: number;
missing?: undefined;
ok: boolean;
spent: boolean;
store?: undefined;
}
| {
attemptsLeft: number;
missing?: undefined;
ok: boolean;
spent?: undefined;
store?: undefined;
},
> = ...
Checks a Transaction Code presented with a pre-authorized code, counting wrong ones across the cluster and spending the code when its attempts run out.