trucoshi 2.0.6 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,25 +1,23 @@
1
1
  # Trucoshi
2
2
 
3
- ### English
4
-
5
- Work in progress
3
+ Bitcoin Lightning "Truco" Server
6
4
 
7
- Pretends to be an Argentinian Truco game socket server that allows you to put Satoshis on the table ;)
5
+ ### English
8
6
 
9
7
  Try current demo at [Trucoshi](https://trucoshi.com)
10
8
 
11
9
  ### Spanish
12
10
 
13
- En construccion
14
-
15
- Pretende ser un server basado en sockets del juego de Truco Argentino que te permita poner unos Satoshis en la mesa ;)
16
-
17
11
  Proba la demo actual en [Trucoshi](https://trucoshi.com)
18
12
 
19
13
  # Client
20
14
 
21
15
  [Trucoshi React Client](https://github.com/jfrader/trucoshi-client)
22
16
 
17
+ # Accounts
18
+
19
+ [Lightning Accounts](https://github.com/jfrader/lightning-accounts)
20
+
23
21
  ### Installation
24
22
 
25
23
  `yarn`
@@ -46,14 +44,16 @@ Proba la demo actual en [Trucoshi](https://trucoshi.com)
46
44
  [x] Irse al mazo
47
45
  [x] Cantar truco
48
46
  [x] Cantar envido
49
- [] Cantar flor
50
47
  [x] Socket server
51
48
  [x] Unit tests
52
- [] Bitcoin Lightning integration
49
+ [x] Bitcoin Lightning integration
50
+ [ ] Cantar flor
51
+ [ ] Historial de partidas
52
+ [ ] Torneos
53
53
 
54
54
  # Donations
55
55
 
56
- Donate Bitcoin at [jfrader.com](https://jfrader.com)
56
+ Donate Bitcoin at [geyser.fund/project/trucoshi](https://geyser.fund/project/trucoshi)
57
57
 
58
58
  # License
59
59
 
package/dist/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { User } from "lightning-accounts";
2
2
  import { CARDS, IHand } from "./lib";
3
3
  import { IUserData } from "./server";
4
+ import { SocketError } from "./server/classes/SocketError";
4
5
  export { CARDS, CARDS_HUMAN_READABLE, BURNT_CARD } from "./lib/constants";
5
6
  export declare enum EMatchState {
6
7
  UNREADY = "UNREADY",
@@ -114,6 +115,7 @@ export type IHandCommands = {
114
115
  };
115
116
  export type IEventCallback<T = {}> = (args: {
116
117
  success: boolean;
118
+ error?: SocketError;
117
119
  } & T) => void;
118
120
  export declare enum EServerEvent {
119
121
  PONG = "PONG",
@@ -208,6 +210,9 @@ export declare class TMap<K, V> extends Map<K, V> {
208
210
  getOrThrow(key?: K): NonNullable<V>;
209
211
  }
210
212
  export declare enum GAME_ERROR {
213
+ UNEXPECTED_ERROR = "UNEXPECTED_ERROR",
214
+ FORBIDDEN = "FORBIDDEN",
215
+ NOT_FOUND = "NOT_FOUND",
211
216
  MATCH_ALREADY_STARTED = "MATCH_ALREADY_STARTED",
212
217
  LOBBY_IS_FULL = "LOBBY_IS_FULL",
213
218
  UNEXPECTED_TEAM_SIZE = "UNEXPECTED_TEAM_SIZE",
package/dist/types.js CHANGED
@@ -105,6 +105,9 @@ export class TMap extends Map {
105
105
  }
106
106
  export var GAME_ERROR;
107
107
  (function (GAME_ERROR) {
108
+ GAME_ERROR["UNEXPECTED_ERROR"] = "UNEXPECTED_ERROR";
109
+ GAME_ERROR["FORBIDDEN"] = "FORBIDDEN";
110
+ GAME_ERROR["NOT_FOUND"] = "NOT_FOUND";
108
111
  GAME_ERROR["MATCH_ALREADY_STARTED"] = "MATCH_ALREADY_STARTED";
109
112
  GAME_ERROR["LOBBY_IS_FULL"] = "LOBBY_IS_FULL";
110
113
  GAME_ERROR["UNEXPECTED_TEAM_SIZE"] = "UNEXPECTED_TEAM_SIZE";
package/package.json CHANGED
@@ -1,8 +1,14 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "2.0.6",
3
+ "version": "2.2.1",
4
+ "description": "Lightning Truco Server",
4
5
  "main": "dist/types.js",
5
6
  "license": "GPL-3.0",
7
+ "author": "Fran <jfrader.com>",
8
+ "keywords": [
9
+ "bitcoin",
10
+ "lightning"
11
+ ],
6
12
  "paths": {
7
13
  "trucoshi": [
8
14
  "./"
@@ -60,7 +66,7 @@
60
66
  "dotenv-cli": "^7.3.0",
61
67
  "form-data": "^4.0.0",
62
68
  "jsonwebtoken": "^9.0.2",
63
- "lightning-accounts": "2.0.1",
69
+ "lightning-accounts": "2.2.0",
64
70
  "path-scurry": "^1.9.2",
65
71
  "pino": "^8.11.0",
66
72
  "pino-pretty": "^10.0.0",