@linenext/dapp-portal-sdk
Version:
Dapp Portal SDK
18 lines (17 loc) • 1.15 kB
TypeScript
import { PaymentClient } from '../../client/PaymentClient';
import { DappPortalSDKConfig } from '../../config/config';
import { CryptoApproveTxInfo, FeeDelegatedTransactionResponse, PaymentInfo } from '../../message/PaymentMessage';
export declare class PaymentProviderHandler {
protected readonly paymentClient: PaymentClient;
constructor(config: DappPortalSDKConfig);
getPayment(paymentId: string): Promise<PaymentInfo>;
getCryptoApproveTxInfo(paymentId: string): Promise<CryptoApproveTxInfo>;
cancelCryptoPayment(paymentId: string): Promise<string>;
startPayment(paymentId: string): Promise<unknown>;
waitForConfirm(paymentId: string): Promise<void>;
registerTxHash(paymentId: string, txHash: string): Promise<void>;
openStripePaymentPage(url: string, width: number, height: number): Window | undefined | null;
getNonceForPaymentHistory(walletAddress: string): Promise<string>;
getSessionTokenForPaymentHistory(walletAddress: string, signature: string): Promise<string>;
signTransactionAsFeePayer(paymentId: string, userSignedRawTransaction: string): Promise<FeeDelegatedTransactionResponse>;
}