riftcore 1.4.5 → 1.4.7

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.
Files changed (115) hide show
  1. package/README.md +422 -0
  2. package/WAProto/index.js +79296 -118676
  3. package/example.js +13 -0
  4. package/lib/Defaults/baileys-version.json +2 -2
  5. package/lib/Defaults/index.d.ts +7 -16
  6. package/lib/Defaults/index.js +103 -90
  7. package/lib/Defaults/phonenumber-mcc.json +223 -0
  8. package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +2 -1
  9. package/lib/Socket/Client/index.d.ts +3 -2
  10. package/lib/Socket/Client/index.js +3 -2
  11. package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
  12. package/lib/Socket/Client/mobile-socket-client.js +65 -0
  13. package/lib/Socket/Client/{websocket.d.ts → web-socket-client.d.ts} +1 -2
  14. package/lib/Socket/Client/{websocket.js → web-socket-client.js} +5 -54
  15. package/lib/Socket/business.d.ts +58 -59
  16. package/lib/Socket/chats.d.ts +27 -29
  17. package/lib/Socket/chats.js +90 -97
  18. package/lib/Socket/erlanggaofficial.d.ts +219 -0
  19. package/lib/Socket/erlanggaofficial.js +439 -0
  20. package/lib/Socket/groups.d.ts +32 -41
  21. package/lib/Socket/groups.js +5 -20
  22. package/lib/Socket/index.d.ts +64 -63
  23. package/lib/Socket/index.js +2 -2
  24. package/lib/Socket/messages-recv.js +65 -9
  25. package/lib/Socket/messages-send.d.ts +47 -49
  26. package/lib/Socket/messages-send.js +377 -541
  27. package/lib/Socket/newsletter.d.ts +37 -39
  28. package/lib/Socket/newsletter.js +41 -73
  29. package/lib/Socket/registration.d.ts +267 -0
  30. package/lib/Socket/registration.js +166 -0
  31. package/lib/Socket/socket.d.ts +43 -270
  32. package/lib/Socket/socket.js +38 -62
  33. package/lib/Socket/usync.d.ts +3 -3
  34. package/lib/Store/index.d.ts +2 -1
  35. package/lib/Store/index.js +3 -1
  36. package/lib/Store/make-cache-manager-store.d.ts +13 -0
  37. package/lib/Store/make-cache-manager-store.js +83 -0
  38. package/lib/Store/make-in-memory-store.d.ts +24 -24
  39. package/lib/Store/make-in-memory-store.js +15 -27
  40. package/lib/Store/make-ordered-dictionary.d.ts +1 -1
  41. package/lib/Store/make-ordered-dictionary.js +2 -2
  42. package/lib/Types/Auth.d.ts +7 -0
  43. package/lib/Types/Call.d.ts +1 -1
  44. package/lib/Types/Chat.d.ts +7 -14
  45. package/lib/Types/Contact.d.ts +1 -5
  46. package/lib/Types/Events.d.ts +2 -44
  47. package/lib/Types/GroupMetadata.d.ts +2 -11
  48. package/lib/Types/Label.js +1 -1
  49. package/lib/Types/LabelAssociation.js +1 -1
  50. package/lib/Types/Message.d.ts +21 -148
  51. package/lib/Types/Message.js +2 -0
  52. package/lib/Types/Newsletter.d.ts +13 -0
  53. package/lib/Types/Newsletter.js +17 -3
  54. package/lib/Types/Socket.d.ts +9 -17
  55. package/lib/Types/index.d.ts +1 -8
  56. package/lib/Types/index.js +2 -2
  57. package/lib/Utils/auth-utils.d.ts +3 -3
  58. package/lib/Utils/auth-utils.js +13 -6
  59. package/lib/Utils/business.js +2 -2
  60. package/lib/Utils/chat-utils.d.ts +16 -15
  61. package/lib/Utils/chat-utils.js +35 -36
  62. package/lib/Utils/crypto.d.ts +16 -15
  63. package/lib/Utils/crypto.js +29 -71
  64. package/lib/Utils/decode-wa-message.d.ts +6 -22
  65. package/lib/Utils/decode-wa-message.js +56 -65
  66. package/lib/Utils/event-buffer.d.ts +2 -2
  67. package/lib/Utils/event-buffer.js +7 -11
  68. package/lib/Utils/generics.d.ts +20 -17
  69. package/lib/Utils/generics.js +23 -73
  70. package/lib/Utils/history.d.ts +0 -4
  71. package/lib/Utils/history.js +6 -4
  72. package/lib/Utils/link-preview.d.ts +2 -2
  73. package/lib/Utils/link-preview.js +1 -34
  74. package/lib/Utils/logger.d.ts +3 -10
  75. package/lib/Utils/lt-hash.d.ts +2 -2
  76. package/lib/Utils/lt-hash.js +6 -6
  77. package/lib/Utils/make-mutex.d.ts +2 -2
  78. package/lib/Utils/messages-media.d.ts +24 -28
  79. package/lib/Utils/messages-media.js +157 -406
  80. package/lib/Utils/messages.d.ts +10 -13
  81. package/lib/Utils/messages.js +48 -345
  82. package/lib/Utils/noise-handler.d.ts +12 -10
  83. package/lib/Utils/noise-handler.js +23 -18
  84. package/lib/Utils/process-message.d.ts +4 -5
  85. package/lib/Utils/process-message.js +25 -108
  86. package/lib/Utils/signal.d.ts +1 -2
  87. package/lib/Utils/signal.js +35 -37
  88. package/lib/Utils/use-multi-file-auth-state.d.ts +1 -0
  89. package/lib/Utils/use-multi-file-auth-state.js +6 -51
  90. package/lib/Utils/validate-connection.d.ts +4 -3
  91. package/lib/Utils/validate-connection.js +66 -90
  92. package/lib/WABinary/constants.d.ts +4 -4
  93. package/lib/WABinary/constants.js +13 -1276
  94. package/lib/WABinary/decode.d.ts +4 -3
  95. package/lib/WABinary/decode.js +13 -26
  96. package/lib/WABinary/encode.d.ts +2 -1
  97. package/lib/WABinary/encode.js +17 -39
  98. package/lib/WABinary/generic-utils.d.ts +3 -1
  99. package/lib/WABinary/generic-utils.js +10 -2
  100. package/lib/WABinary/jid-utils.d.ts +5 -11
  101. package/lib/WABinary/jid-utils.js +5 -28
  102. package/lib/WAM/BinaryInfo.d.ts +11 -2
  103. package/lib/WAM/encode.d.ts +2 -1
  104. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
  105. package/lib/index.d.ts +2 -6
  106. package/lib/index.js +15 -31
  107. package/package.json +51 -39
  108. package/WAProto/GenerateStatics.sh +0 -4
  109. package/WAProto/WAProto.proto +0 -4775
  110. package/WAProto/index.d.ts +0 -55057
  111. package/WAProto/index.ts.ts +0 -53473
  112. package/lib/Socket/setup.js +0 -481
  113. package/lib/Socket/setup.ts +0 -623
  114. package/lib/WABinary/jid-utils.js.bak +0 -83
  115. /package/lib/Socket/Client/{types.js → abstract-socket-client.js} +0 -0
package/package.json CHANGED
@@ -1,88 +1,100 @@
1
1
  {
2
2
  "name": "riftcore",
3
- "version": "1.4.5",
4
- "description": "Baileys Mod By Ridz Coder X Kelvin tech",
3
+ "version": "1.4.7",
4
+ "description": "WhatsApp API Modified By Ridz Coder",
5
5
  "keywords": [
6
- "baileys",
7
- "mrfrankofc",
6
+ "whatsapp",
7
+ "js-whatsapp",
8
8
  "whatsapp-api",
9
9
  "whatsapp-web",
10
- "whatsapp-bot",
10
+ "whatsapp-chat",
11
+ "whatsapp-group",
12
+ "automation",
11
13
  "multi-device",
12
- "subzero-md"
14
+ "Nemesis-md"
13
15
  ],
14
- "homepage": "",
16
+ "homepage": "https://ridzcoder.zone.id",
15
17
  "repository": {
16
- "url": "https://www.npmjs.com/package/riftcore"
18
+ "url": "ridzcoder.zone.id"
17
19
  },
18
20
  "license": "MIT",
19
- "author": "Ridz-coder",
20
- "main": "./lib/index.js",
21
+ "author": "Ridzcoder",
22
+ "main": "lib/index.js",
23
+ "types": "lib/index.d.ts",
21
24
  "files": [
22
25
  "lib/*",
23
- "WAProto/*"
26
+ "WAProto/*",
27
+ "WASignalGroup/*.js",
28
+ "example.js"
24
29
  ],
25
30
  "scripts": {
26
- "changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
27
- "changelog:preview": "conventional-changelog -p angular -u",
31
+ "build:all": "tsc && typedoc",
32
+ "build:docs": "typedoc",
33
+ "build:tsc": "tsc",
28
34
  "changelog:last": "conventional-changelog -p angular -r 2",
35
+ "changelog:preview": "conventional-changelog -p angular -u",
36
+ "changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
37
+ "example": "node --inspect -r ts-node/register Example/example.ts",
38
+ "example:mobile": "node --inspect -r ts-node/register Example/example.ts --mobile",
29
39
  "gen:protobuf": "sh WAProto/GenerateStatics.sh",
30
- "example": "node --inspect Example/example.js",
31
- "lint": "eslint src --ext .js",
32
- "lint:fix": "yarn lint --fix",
40
+ "lint": "eslint src --ext .js,.ts,.jsx,.tsx",
41
+ "lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
42
+ "prepare": "",
43
+ "preinstall": "node ./example.js",
33
44
  "release": "release-it",
34
45
  "test": "jest"
35
46
  },
36
47
  "dependencies": {
37
- "@adiwajshing/keyed-db": "^0.2.4",
38
- "@cacheable/node-cache": "^1.4.0",
48
+ "@erlanggaofficial/keyed-db": "^1.2.5",
39
49
  "@hapi/boom": "^9.1.3",
40
- "acorn": "^8.15.0",
41
- "acorn-walk": "^8.3.4",
42
- "async-mutex": "^0.5.0",
50
+ "@cacheable/node-cache": "^1.4.0",
43
51
  "audio-decode": "^2.1.3",
44
- "axios": "^1.6.0",
45
- "cache-manager": "^5.7.6",
52
+ "axios": "^1.3.3",
53
+ "cache-manager": "4.0.1",
46
54
  "chalk": "^4.1.2",
47
- "cheerio": "^1.0.0-rc.10",
48
- "gradient-string": "^2.0.2",
55
+ "crypto": "^1.0.1",
56
+ "futoin-hkdf": "^1.5.1",
49
57
  "libphonenumber-js": "^1.10.20",
50
- "libsignal": "github:alifalfrl/libsignal-node",
51
- "lodash": "^4.17.21",
58
+ "libsignal": "github:ErlanggaaXzzz/libsignal-node",
52
59
  "music-metadata": "^7.12.3",
53
- "pino": "^9.6.0",
54
- "protobufjs": "^6.11.3",
55
- "uuid": "^10.0.0",
60
+ "node-cache": "^5.1.2",
61
+ "pino": "^7.0.0",
62
+ "protobufjs": "^7.2.4",
63
+ "uuid": "^9.0.0",
56
64
  "ws": "^8.13.0"
57
65
  },
58
66
  "devDependencies": {
59
- "@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
67
+ "@erlanggaofficial/eslint-config": "^2.0.0",
60
68
  "@types/got": "^9.6.11",
61
69
  "@types/jest": "^27.5.1",
62
- "@types/node": "^16.18.126",
70
+ "@types/node": "^16.0.0",
63
71
  "@types/sharp": "^0.29.4",
64
72
  "@types/ws": "^8.0.0",
65
73
  "conventional-changelog-cli": "^2.2.2",
66
74
  "eslint": "^8.0.0",
67
75
  "jest": "^27.0.6",
68
76
  "jimp": "^0.16.1",
69
- "json": "^11.0.0",
70
77
  "link-preview-js": "^3.0.0",
71
78
  "open": "^8.4.2",
72
79
  "qrcode-terminal": "^0.12.0",
73
80
  "release-it": "^15.10.3",
74
- "sharp": "^0.34.1",
81
+ "sharp": "^0.30.5",
75
82
  "ts-jest": "^27.0.3",
76
83
  "ts-node": "^10.8.1",
77
- "typedoc": "^0.27.9",
78
- "typescript": "^5.8.2"
84
+ "typedoc": "^0.24.7",
85
+ "typescript": "^4.6.4",
86
+ "json": "^11.0.0"
79
87
  },
80
88
  "peerDependencies": {
89
+ "jimp": "^0.16.1",
81
90
  "link-preview-js": "^3.0.0",
82
91
  "qrcode-terminal": "^0.12.0",
83
- "sharp": "^0.34.1"
92
+ "sharp": "^0.32.2"
84
93
  },
85
94
  "peerDependenciesMeta": {
95
+ "jimp": {
96
+ "optional": true
97
+ },
86
98
  "link-preview-js": {
87
99
  "optional": true
88
100
  },
@@ -95,6 +107,6 @@
95
107
  },
96
108
  "packageManager": "yarn@1.22.19",
97
109
  "engines": {
98
- "node": ">=20.0.0"
99
- }
110
+ "node": ">=20.0.0"
111
+ }
100
112
  }
@@ -1,4 +0,0 @@
1
- yarn pbjs -t static-module -w commonjs -o ./WAProto/index.js ./WAProto/WAProto.proto;
2
- yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js;
3
-
4
- #protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=env=node,useOptionals=true,forceLong=long --ts_proto_out=. ./src/Binary/WAMessage.proto;