add payto type

This commit is contained in:
Sebastian 2023-09-04 12:20:39 -03:00
parent 1c3e9473fd
commit 241a37c889
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069
2 changed files with 8 additions and 6 deletions

View File

@ -24,7 +24,7 @@ export type PaytoUri =
| PaytoUriBitcoin;
export interface PaytoUriGeneric {
targetType: string;
targetType: PaytoType | string;
targetPath: string;
params: { [name: string]: string };
}
@ -55,6 +55,8 @@ export interface PaytoUriBitcoin extends PaytoUriGeneric {
const paytoPfx = "payto://";
export type PaytoType = "iban" | "bitcoin" | "x-taler-bank"
export function buildPayto(
type: "iban",
iban: string,
@ -71,7 +73,7 @@ export function buildPayto(
account: string,
): PaytoUriTalerBank;
export function buildPayto(
type: "iban" | "bitcoin" | "x-taler-bank",
type: PaytoType,
first: string,
second?: string,
): PaytoUriGeneric {