-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The SDK should export typings that can be included in subsequent typescript applications, for greatest experience integrating into other systems.
Currently no typings are exported and for this specific issue it should expose interfaces around a Payment and PaymentConfirmation
Proposed interfaces:
interface PaymentConfirmation {
invoice_uid: string;
txid: string;
block_hash: string;
block_height: number;
current_hash: string;
current_height: number;
confirmations: number;
timestamp: Date;
}
block_hash and block_height describe the block in which the transaction was originally included. current_hash and current_height describe the current state of the block chain. By subtracting the current_height from the block_height and adding one you get the total number of confirmations.
interface UnconfirmedPayment {
invoice_uid: string;
txid: string;
timestamp: Date;
}
Metadata
Metadata
Assignees
Labels
No labels