Skip to content

Commit

Permalink
fix(channel): add missed types for minimumDepth, fee, gasPrice
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Sep 20, 2022
1 parent 73c50b5 commit a14ddfc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/channel/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ export default class Channel {
* @param options.host - Host of the responder's node
* @param options.port - The port of the responders node
* @param options.lockPeriod - Amount of blocks for disputing a solo close
* @param options.minimumDepthStrategy - How to calculate minimum depth (default: txfee)
* @param options.minimumDepth - The minimum amount of blocks to be mined
* @param options.fee - The fee to be used for the channel open transaction
* @param options.gasPrice - Used for the fee computation of the channel open transaction
* @param options.existingChannelId - Existing channel id (required if reestablishing a
* channel)
* @param options.offchainTx - Offchain transaction (required if reestablishing
Expand Down
15 changes: 12 additions & 3 deletions src/channel/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,27 @@ export type SignTx = (tx: Encoded.Transaction, options?: SignOptions) => (
export interface ChannelOptions {
existingFsmId?: Encoded.Bytearray;
url: string;
role: 'initiator' | 'responder';

/**
* @see {@link https://github.com/aeternity/protocol/blob/6734de2e4c7cce7e5e626caa8305fb535785131d/node/api/channels_api_usage.md#channel-establishing-parameters}
*/
initiatorId: Encoded.AccountAddress;
responderId: Encoded.AccountAddress;
lockPeriod: number;
pushAmount: number;
initiatorAmount: BigNumber;
responderAmount: BigNumber;
channelReserve?: BigNumber | number;
signedTx?: string;
ttl?: number;
host: string;
port: number;
lockPeriod: number;
role: 'initiator' | 'responder';
minimumDepthStrategy?: 'txfee' | 'plain';
minimumDepth?: number;
fee?: BigNumber | number;
gasPrice?: BigNumber | number;

signedTx?: string;
existingChannelId?: string;
offChainTx?: string;
reconnectTx?: string;
Expand Down

0 comments on commit a14ddfc

Please sign in to comment.