Skip to content

Commit

Permalink
Merge pull request #66 from aeternity/doc/server
Browse files Browse the repository at this point in the history
Adds jsdoc comments for server methods
Adds tests for contract methods
Updates aesdk to 12.1.1
  • Loading branch information
martinkaintas authored Aug 1, 2022
2 parents 0c47907 + 6fc8f3f commit ebdd84e
Show file tree
Hide file tree
Showing 15 changed files with 379 additions and 128 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:
node:
image: aeternity/aeternity:${NODE_TAG-v6.5.1}
image: aeternity/aeternity:${NODE_TAG-v6.5.2}
hostname: node
ports: ["3013:3013", "3113:3113", "3014:3014", "3114:3114"]
volumes:
Expand Down
174 changes: 129 additions & 45 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@aeternity/aepp-sdk": "^12.0.0",
"@aeternity/aepp-sdk": "^12.1.1",
"@aeternity/rock-paper-scissors": "../contract",
"axios": "^0.27.2",
"bignumber.js": "^9.0.2",
Expand Down
4 changes: 2 additions & 2 deletions server/src/route/route.interface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EncodedData } from '@aeternity/aepp-sdk/es/utils/encoder';
import { Encoded } from '@aeternity/aepp-sdk/es/utils/encoder';

export interface ResponderBaseChannelConfig {
address: EncodedData<'ak'>;
address: Encoded.AccountAddress;
port: number;
host: string;
}
11 changes: 10 additions & 1 deletion server/src/services/bot/bot.constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { ChannelOptions } from '@aeternity/aepp-sdk/es/channel/internal';
import BigNumber from 'bignumber.js';
import { WEBSOCKET_URL } from '../sdk';

export const MUTUAL_CHANNEL_CONFIGURATION = {
/**
* @see {@link https://github.com/aeternity/protocol/blob/master/node/api/channels_api_usage.md#channel-establishing-parameters}
*/
export const MUTUAL_CHANNEL_CONFIGURATION: Partial<ChannelOptions> & {
minimumDepthStrategy: 'plain' | 'txFee';
minimumDepth: number;
} = {
url: WEBSOCKET_URL,
pushAmount: 0,
initiatorAmount: new BigNumber('4.5e18'),
Expand All @@ -10,6 +17,8 @@ export const MUTUAL_CHANNEL_CONFIGURATION = {
lockPeriod: 10,
debug: false,
timeoutIdle: 60000,
// How to calculate minimum depth - either txfee (default) or plain. We use
// `plain` with `minimumDepth` in order to reduce delay.
minimumDepthStrategy: 'plain',
minimumDepth: 0,
} as const;
Loading

0 comments on commit ebdd84e

Please sign in to comment.