define TypeScript types for Payment Channel methods (#1518)

add TypeScript type for payment channel methods
This commit is contained in:
Omar Khan
2021-08-11 15:07:55 -04:00
committed by Mayukha Vadari
parent 18810208b6
commit b2b4b86f4d
2 changed files with 23 additions and 0 deletions

View 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
}
}

View File

@@ -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,