diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-15 21:40:06 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-15 21:40:06 +0100 |
commit | 1b9c5855a8afb6833ff7a706f5bed5650e1191ad (patch) | |
tree | d880c4418fe337ac7dd362466b80edf94296b58e /src/types/walletTypes.ts | |
parent | 59bd755f7d6a3451859ca08084df83d465cd8500 (diff) | |
download | wallet-core-1b9c5855a8afb6833ff7a706f5bed5650e1191ad.tar.xz |
simplify /pay, add pay event
Diffstat (limited to 'src/types/walletTypes.ts')
-rw-r--r-- | src/types/walletTypes.ts | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/types/walletTypes.ts b/src/types/walletTypes.ts index eedae6f2c..df19d8dc2 100644 --- a/src/types/walletTypes.ts +++ b/src/types/walletTypes.ts @@ -195,14 +195,30 @@ export interface WalletBalanceEntry { pendingIncomingDirty: AmountJson; } +export interface CoinPayInfo { + /** + * Amount that will be subtracted from the coin when the payment is finalized. + */ + subtractedAmount: AmountJson; + + /** + * Public key of the coin that is being spent. + */ + coinPub: string; + + /** + * Signature together with the other information needed by the merchant, + * directly in the format expected by the merchant. + */ + sig: CoinPaySig; +} + /** * Coins used for a payment, with signatures authorizing the payment and the * coins with remaining value updated to accomodate for a payment. */ -export interface PayCoinInfo { - originalCoins: CoinRecord[]; - updatedCoins: CoinRecord[]; - sigs: CoinPaySig[]; +export interface PaySigInfo { + coinInfo: CoinPayInfo[]; } /** |