mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-30 17:15:49 +00:00
define TypeScript types for Payment Channel methods (#1518)
add TypeScript type for payment channel methods
This commit is contained in:
committed by
Mayukha Vadari
parent
18810208b6
commit
b2b4b86f4d
15
src/models/methods/channelVerify.ts
Normal file
15
src/models/methods/channelVerify.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import {BaseRequest, BaseResponse} from './baseMethod'
|
||||
|
||||
export interface ChannelVerifyRequest extends BaseRequest {
|
||||
command: 'channel_verify'
|
||||
amount: string
|
||||
channel_id: string
|
||||
public_key: string
|
||||
signature: string
|
||||
}
|
||||
|
||||
export interface ChannelVerifyResponse extends BaseResponse {
|
||||
result: {
|
||||
signature_verified: boolean
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { AccountObjectsRequest, AccountObjectsResponse } from "./accountObjects"
|
||||
import { AccountOffersRequest, AccountOffersResponse } from "./accountOffers";
|
||||
import { AccountTxRequest, AccountTxResponse } from "./accountTx";
|
||||
import { BookOffersRequest, BookOffersResponse } from "./bookOffers";
|
||||
import { ChannelVerifyRequest, ChannelVerifyResponse } from "./channelVerify";
|
||||
import { DepositAuthorizedRequest, DepositAuthorizedResponse } from "./depositAuthorized";
|
||||
import { FeeRequest, FeeResponse } from "./fee";
|
||||
import { GatewayBalancesRequest, GatewayBalancesResponse } from "./gatewayBalances";
|
||||
@@ -55,6 +56,8 @@ type Request = // account methods
|
||||
| DepositAuthorizedRequest
|
||||
| PathFindRequest
|
||||
| RipplePathFindRequest
|
||||
// payment channel methods
|
||||
| ChannelVerifyRequest
|
||||
// subscription methods
|
||||
| SubscribeRequest
|
||||
| UnsubscribeRequest
|
||||
@@ -94,6 +97,8 @@ type Response = // account methods
|
||||
| DepositAuthorizedResponse
|
||||
| PathFindResponse
|
||||
| RipplePathFindResponse
|
||||
// payment channel methods
|
||||
| ChannelVerifyResponse
|
||||
// subscription methods
|
||||
| SubscribeResponse
|
||||
| UnsubscribeResponse
|
||||
@@ -158,6 +163,9 @@ export {
|
||||
PathFindResponse,
|
||||
RipplePathFindRequest,
|
||||
RipplePathFindResponse,
|
||||
// payment channel methods
|
||||
ChannelVerifyRequest,
|
||||
ChannelVerifyResponse,
|
||||
// Subscribe methods/streams
|
||||
SubscribeRequest,
|
||||
SubscribeResponse,
|
||||
|
||||
Reference in New Issue
Block a user