Skip to content

Commit a78ae99

Browse files
authored
Merge pull request #23 from bsv-blockchain/output-index-support
non-zero output index
2 parents a8d42b4 + 3f35d95 commit a78ae99

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bsv/message-box-client",
3-
"version": "1.4.2",
3+
"version": "1.4.3",
44
"publishConfig": {
55
"access": "public"
66
},

src/PeerPayClient.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface PaymentToken {
5959
}
6060
transaction: AtomicBEEF
6161
amount: number
62+
outputIndex?: number
6263
}
6364

6465
/**
@@ -68,6 +69,7 @@ export interface IncomingPayment {
6869
messageId: string
6970
sender: string
7071
token: PaymentToken
72+
outputIndex?: number
7173
}
7274

7375
/**
@@ -296,7 +298,7 @@ export class PeerPayClient extends MessageBoxClient {
296298
derivationSuffix: payment.token.customInstructions.derivationSuffix,
297299
senderIdentityKey: payment.sender
298300
},
299-
outputIndex: STANDARD_PAYMENT_OUTPUT_INDEX,
301+
outputIndex: payment.token.outputIndex ?? STANDARD_PAYMENT_OUTPUT_INDEX,
300302
protocol: 'wallet payment'
301303
}],
302304
labels: ['peerpay'],

0 commit comments

Comments
 (0)