mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-13 09:05:49 +00:00
29 lines
821 B
Plaintext
29 lines
821 B
Plaintext
## signPaymentChannelClaim
|
|
|
|
`signPaymentChannelClaim(channel: string, amount: string, privateKey: string): string`
|
|
|
|
Sign a payment channel claim. The signature can be submitted in a subsequent [PaymentChannelClaim](#preparepaymentchannelclaim) transaction.
|
|
|
|
### Parameters
|
|
|
|
<%- renderSchema("input/sign-payment-channel-claim.json") %>
|
|
|
|
### Return Value
|
|
|
|
This method returns a signature string:
|
|
|
|
<%- renderSchema("output/sign-payment-channel-claim.json") %>
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
const channel =
|
|
'3E18C05AD40319B809520F1A136370C4075321B285217323396D6FD9EE1E9037';
|
|
const amount = '.00001';
|
|
const privateKey =
|
|
'ACCD3309DB14D1A4FC9B1DAE608031F4408C85C73EE05E035B7DC8B25840107A';
|
|
return api.signPaymentChannelClaim(channel, amount, privateKey);
|
|
```
|
|
|
|
<%- renderFixture("responses/sign-payment-channel-claim.json") %>
|