@nktkas/hyperliquid 0.13.1 → 0.13.2

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 (183) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +33 -17
  3. package/esm/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts +9 -0
  4. package/esm/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts.map +1 -0
  5. package/esm/deps/jsr.io/@std/bytes/1.0.5/_types.js +2 -0
  6. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/concat.d.ts +3 -1
  7. package/esm/deps/jsr.io/@std/bytes/1.0.5/concat.d.ts.map +1 -0
  8. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/concat.js +1 -1
  9. package/esm/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts +9 -0
  10. package/esm/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts.map +1 -0
  11. package/esm/deps/jsr.io/@std/encoding/1.0.7/_types.js +2 -0
  12. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts.map +1 -1
  13. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.js +1 -1
  14. package/{script/deps/jsr.io/@std/encoding/1.0.6 → esm/deps/jsr.io/@std/encoding/1.0.7}/hex.d.ts +3 -1
  15. package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  16. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/hex.js +1 -1
  17. package/esm/deps/jsr.io/@std/msgpack/1.0.3/_types.d.ts +9 -0
  18. package/esm/deps/jsr.io/@std/msgpack/1.0.3/_types.d.ts.map +1 -0
  19. package/esm/deps/jsr.io/@std/msgpack/1.0.3/_types.js +2 -0
  20. package/esm/deps/jsr.io/@std/msgpack/{1.0.2 → 1.0.3}/encode.d.ts +3 -1
  21. package/esm/deps/jsr.io/@std/msgpack/1.0.3/encode.d.ts.map +1 -0
  22. package/esm/deps/jsr.io/@std/msgpack/{1.0.2 → 1.0.3}/encode.js +2 -2
  23. package/esm/mod.d.ts +1 -0
  24. package/esm/mod.d.ts.map +1 -1
  25. package/esm/src/clients/event.d.ts +57 -16
  26. package/esm/src/clients/event.d.ts.map +1 -1
  27. package/esm/src/clients/event.js +72 -16
  28. package/esm/src/clients/public.d.ts +241 -49
  29. package/esm/src/clients/public.d.ts.map +1 -1
  30. package/esm/src/clients/public.js +243 -47
  31. package/esm/src/clients/wallet.d.ts +120 -51
  32. package/esm/src/clients/wallet.d.ts.map +1 -1
  33. package/esm/src/clients/wallet.js +192 -58
  34. package/esm/src/transports/websocket/hyperliquid_event_target.d.ts +27 -21
  35. package/esm/src/transports/websocket/hyperliquid_event_target.d.ts.map +1 -1
  36. package/esm/src/transports/websocket/hyperliquid_event_target.js +37 -0
  37. package/esm/src/transports/websocket/websocket_request_dispatcher.js +3 -3
  38. package/esm/src/transports/websocket/websocket_transport.d.ts +7 -10
  39. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  40. package/esm/src/transports/websocket/websocket_transport.js +41 -35
  41. package/esm/src/types/exchange/common.d.ts +6 -6
  42. package/esm/src/types/exchange/common.d.ts.map +1 -1
  43. package/esm/src/types/exchange/requests.d.ts +131 -64
  44. package/esm/src/types/exchange/requests.d.ts.map +1 -1
  45. package/esm/src/types/exchange/responses.d.ts +7 -7
  46. package/esm/src/types/exchange/responses.d.ts.map +1 -1
  47. package/esm/src/types/explorer/common.d.ts +15 -15
  48. package/esm/src/types/explorer/common.d.ts.map +1 -1
  49. package/esm/src/types/explorer/requests.d.ts +19 -6
  50. package/esm/src/types/explorer/requests.d.ts.map +1 -1
  51. package/esm/src/types/explorer/responses.d.ts +9 -2
  52. package/esm/src/types/explorer/responses.d.ts.map +1 -1
  53. package/esm/src/types/info/accounts.d.ts +189 -124
  54. package/esm/src/types/info/accounts.d.ts.map +1 -1
  55. package/esm/src/types/info/assets.d.ts +82 -78
  56. package/esm/src/types/info/assets.d.ts.map +1 -1
  57. package/esm/src/types/info/delegations.d.ts +117 -0
  58. package/esm/src/types/info/delegations.d.ts.map +1 -0
  59. package/esm/src/types/info/delegations.js +1 -0
  60. package/esm/src/types/info/orders.d.ts +67 -67
  61. package/esm/src/types/info/orders.d.ts.map +1 -1
  62. package/esm/src/types/info/requests.d.ts +128 -63
  63. package/esm/src/types/info/requests.d.ts.map +1 -1
  64. package/esm/src/types/info/vaults.d.ts +41 -84
  65. package/esm/src/types/info/vaults.d.ts.map +1 -1
  66. package/esm/src/types/subscriptions/common.d.ts +3 -0
  67. package/esm/src/types/subscriptions/common.d.ts.map +1 -1
  68. package/esm/src/types/subscriptions/requests.d.ts +10 -0
  69. package/esm/src/types/subscriptions/requests.d.ts.map +1 -1
  70. package/esm/src/utils/key_sort.d.ts +2 -2
  71. package/esm/src/utils/key_sort.d.ts.map +1 -1
  72. package/esm/src/utils/signing.d.ts +1 -1
  73. package/esm/src/utils/signing.js +2 -2
  74. package/package.json +1 -1
  75. package/script/deps/jsr.io/@derzade/typescript-event-target/1.1.1/mod.js +13 -3
  76. package/script/deps/jsr.io/@derzade/typescript-event-target/1.1.1/src/TypedEventTarget.js +23 -13
  77. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/_assert.js +55 -45
  78. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/_u64.js +97 -87
  79. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/crypto.js +14 -4
  80. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/sha3.js +288 -278
  81. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/utils.js +238 -228
  82. package/script/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts +9 -0
  83. package/script/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts.map +1 -0
  84. package/script/deps/jsr.io/@std/bytes/1.0.5/_types.js +13 -0
  85. package/script/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/concat.d.ts +3 -1
  86. package/script/deps/jsr.io/@std/bytes/1.0.5/concat.d.ts.map +1 -0
  87. package/script/deps/jsr.io/@std/bytes/1.0.5/concat.js +45 -0
  88. package/script/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts +9 -0
  89. package/script/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts.map +1 -0
  90. package/script/deps/jsr.io/@std/encoding/1.0.7/_types.js +13 -0
  91. package/script/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts.map +1 -1
  92. package/script/deps/jsr.io/@std/encoding/1.0.7/_validate_binary_like.js +39 -0
  93. package/{esm/deps/jsr.io/@std/encoding/1.0.6 → script/deps/jsr.io/@std/encoding/1.0.7}/hex.d.ts +3 -1
  94. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  95. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.js +123 -0
  96. package/script/deps/jsr.io/@std/msgpack/1.0.3/_types.d.ts +9 -0
  97. package/script/deps/jsr.io/@std/msgpack/1.0.3/_types.d.ts.map +1 -0
  98. package/script/deps/jsr.io/@std/msgpack/1.0.3/_types.js +13 -0
  99. package/script/deps/jsr.io/@std/msgpack/{1.0.2 → 1.0.3}/encode.d.ts +3 -1
  100. package/script/deps/jsr.io/@std/msgpack/1.0.3/encode.d.ts.map +1 -0
  101. package/script/deps/jsr.io/@std/msgpack/1.0.3/encode.js +250 -0
  102. package/script/mod.d.ts +1 -0
  103. package/script/mod.d.ts.map +1 -1
  104. package/script/mod.js +23 -13
  105. package/script/src/clients/event.d.ts +57 -16
  106. package/script/src/clients/event.d.ts.map +1 -1
  107. package/script/src/clients/event.js +551 -485
  108. package/script/src/clients/public.d.ts +241 -49
  109. package/script/src/clients/public.d.ts.map +1 -1
  110. package/script/src/clients/public.js +914 -708
  111. package/script/src/clients/wallet.d.ts +120 -51
  112. package/script/src/clients/wallet.d.ts.map +1 -1
  113. package/script/src/clients/wallet.js +1121 -977
  114. package/script/src/transports/base.js +25 -15
  115. package/script/src/transports/http/http_transport.js +174 -164
  116. package/script/src/transports/websocket/hyperliquid_event_target.d.ts +27 -21
  117. package/script/src/transports/websocket/hyperliquid_event_target.d.ts.map +1 -1
  118. package/script/src/transports/websocket/hyperliquid_event_target.js +80 -33
  119. package/script/src/transports/websocket/reconnecting_websocket.js +364 -354
  120. package/script/src/transports/websocket/websocket_request_dispatcher.js +196 -186
  121. package/script/src/transports/websocket/websocket_transport.d.ts +7 -10
  122. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  123. package/script/src/transports/websocket/websocket_transport.js +236 -220
  124. package/script/src/types/common.js +12 -2
  125. package/script/src/types/exchange/common.d.ts +6 -6
  126. package/script/src/types/exchange/common.d.ts.map +1 -1
  127. package/script/src/types/exchange/common.js +12 -2
  128. package/script/src/types/exchange/requests.d.ts +131 -64
  129. package/script/src/types/exchange/requests.d.ts.map +1 -1
  130. package/script/src/types/exchange/requests.js +12 -2
  131. package/script/src/types/exchange/responses.d.ts +7 -7
  132. package/script/src/types/exchange/responses.d.ts.map +1 -1
  133. package/script/src/types/exchange/responses.js +12 -2
  134. package/script/src/types/explorer/common.d.ts +15 -15
  135. package/script/src/types/explorer/common.d.ts.map +1 -1
  136. package/script/src/types/explorer/common.js +12 -2
  137. package/script/src/types/explorer/requests.d.ts +19 -6
  138. package/script/src/types/explorer/requests.d.ts.map +1 -1
  139. package/script/src/types/explorer/requests.js +12 -2
  140. package/script/src/types/explorer/responses.d.ts +9 -2
  141. package/script/src/types/explorer/responses.d.ts.map +1 -1
  142. package/script/src/types/explorer/responses.js +12 -2
  143. package/script/src/types/info/accounts.d.ts +189 -124
  144. package/script/src/types/info/accounts.d.ts.map +1 -1
  145. package/script/src/types/info/accounts.js +12 -2
  146. package/script/src/types/info/assets.d.ts +82 -78
  147. package/script/src/types/info/assets.d.ts.map +1 -1
  148. package/script/src/types/info/assets.js +12 -2
  149. package/script/src/types/info/delegations.d.ts +117 -0
  150. package/script/src/types/info/delegations.d.ts.map +1 -0
  151. package/script/src/types/info/delegations.js +12 -0
  152. package/script/src/types/info/orders.d.ts +67 -67
  153. package/script/src/types/info/orders.d.ts.map +1 -1
  154. package/script/src/types/info/orders.js +12 -2
  155. package/script/src/types/info/requests.d.ts +128 -63
  156. package/script/src/types/info/requests.d.ts.map +1 -1
  157. package/script/src/types/info/requests.js +12 -2
  158. package/script/src/types/info/vaults.d.ts +41 -84
  159. package/script/src/types/info/vaults.d.ts.map +1 -1
  160. package/script/src/types/info/vaults.js +12 -2
  161. package/script/src/types/subscriptions/common.d.ts +3 -0
  162. package/script/src/types/subscriptions/common.d.ts.map +1 -1
  163. package/script/src/types/subscriptions/common.js +12 -2
  164. package/script/src/types/subscriptions/requests.d.ts +10 -0
  165. package/script/src/types/subscriptions/requests.d.ts.map +1 -1
  166. package/script/src/types/subscriptions/requests.js +12 -2
  167. package/script/src/utils/key_sort.d.ts +2 -2
  168. package/script/src/utils/key_sort.d.ts.map +1 -1
  169. package/script/src/utils/key_sort.js +133 -123
  170. package/script/src/utils/signing.d.ts +1 -1
  171. package/script/src/utils/signing.js +172 -162
  172. package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
  173. package/esm/deps/jsr.io/@std/encoding/1.0.6/hex.d.ts.map +0 -1
  174. package/esm/deps/jsr.io/@std/msgpack/1.0.2/encode.d.ts.map +0 -1
  175. package/script/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
  176. package/script/deps/jsr.io/@std/bytes/1.0.4/concat.js +0 -35
  177. package/script/deps/jsr.io/@std/encoding/1.0.6/_validate_binary_like.js +0 -29
  178. package/script/deps/jsr.io/@std/encoding/1.0.6/hex.d.ts.map +0 -1
  179. package/script/deps/jsr.io/@std/encoding/1.0.6/hex.js +0 -113
  180. package/script/deps/jsr.io/@std/msgpack/1.0.2/encode.d.ts.map +0 -1
  181. package/script/deps/jsr.io/@std/msgpack/1.0.2/encode.js +0 -240
  182. /package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts +0 -0
  183. /package/script/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts +0 -0
@@ -1,240 +0,0 @@
1
- "use strict";
2
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
- // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.encode = encode;
6
- const concat_js_1 = require("../../bytes/1.0.4/concat.js");
7
- const FOUR_BITS = 16;
8
- const FIVE_BITS = 32;
9
- const SEVEN_BITS = 128;
10
- const EIGHT_BITS = 256;
11
- const FIFTEEN_BITS = 32768;
12
- const SIXTEEN_BITS = 65536;
13
- const THIRTY_ONE_BITS = 2147483648;
14
- const THIRTY_TWO_BITS = 4294967296;
15
- const SIXTY_THREE_BITS = 9223372036854775808n;
16
- const SIXTY_FOUR_BITS = 18446744073709551616n;
17
- const encoder = new TextEncoder();
18
- /**
19
- * Encode a value to {@link https://msgpack.org/ | MessagePack} binary format.
20
- *
21
- * @example Usage
22
- * ```ts
23
- * import { encode } from "@std/msgpack/encode";
24
- * import { assertEquals } from "@std/assert";
25
- *
26
- * const obj = {
27
- * str: "deno",
28
- * arr: [1, 2, 3],
29
- * map: {
30
- * foo: "bar"
31
- * }
32
- * }
33
- *
34
- * const encoded = encode(obj);
35
- *
36
- * assertEquals(encoded.length, 31);
37
- * ```
38
- *
39
- * @param object Value to encode to MessagePack binary format.
40
- * @returns Encoded MessagePack binary data.
41
- */
42
- function encode(object) {
43
- const byteParts = [];
44
- encodeSlice(object, byteParts);
45
- return (0, concat_js_1.concat)(byteParts);
46
- }
47
- function encodeFloat64(num) {
48
- const dataView = new DataView(new ArrayBuffer(9));
49
- dataView.setFloat64(1, num);
50
- dataView.setUint8(0, 0xcb);
51
- return new Uint8Array(dataView.buffer);
52
- }
53
- function encodeNumber(num) {
54
- if (!Number.isInteger(num)) { // float 64
55
- return encodeFloat64(num);
56
- }
57
- if (num < 0) {
58
- if (num >= -FIVE_BITS) { // negative fixint
59
- return new Uint8Array([num]);
60
- }
61
- if (num >= -SEVEN_BITS) { // int 8
62
- return new Uint8Array([0xd0, num]);
63
- }
64
- if (num >= -FIFTEEN_BITS) { // int 16
65
- const dataView = new DataView(new ArrayBuffer(3));
66
- dataView.setInt16(1, num);
67
- dataView.setUint8(0, 0xd1);
68
- return new Uint8Array(dataView.buffer);
69
- }
70
- if (num >= -THIRTY_ONE_BITS) { // int 32
71
- const dataView = new DataView(new ArrayBuffer(5));
72
- dataView.setInt32(1, num);
73
- dataView.setUint8(0, 0xd2);
74
- return new Uint8Array(dataView.buffer);
75
- }
76
- // float 64
77
- return encodeFloat64(num);
78
- }
79
- // if the number fits within a positive fixint, use it
80
- if (num <= 0x7f) {
81
- return new Uint8Array([num]);
82
- }
83
- if (num < EIGHT_BITS) { // uint8
84
- return new Uint8Array([0xcc, num]);
85
- }
86
- if (num < SIXTEEN_BITS) { // uint16
87
- const dataView = new DataView(new ArrayBuffer(3));
88
- dataView.setUint16(1, num);
89
- dataView.setUint8(0, 0xcd);
90
- return new Uint8Array(dataView.buffer);
91
- }
92
- if (num < THIRTY_TWO_BITS) { // uint32
93
- const dataView = new DataView(new ArrayBuffer(5));
94
- dataView.setUint32(1, num);
95
- dataView.setUint8(0, 0xce);
96
- return new Uint8Array(dataView.buffer);
97
- }
98
- // float 64
99
- return encodeFloat64(num);
100
- }
101
- function encodeSlice(object, byteParts) {
102
- if (object === null) {
103
- byteParts.push(new Uint8Array([0xc0]));
104
- return;
105
- }
106
- if (object === false) {
107
- byteParts.push(new Uint8Array([0xc2]));
108
- return;
109
- }
110
- if (object === true) {
111
- byteParts.push(new Uint8Array([0xc3]));
112
- return;
113
- }
114
- if (typeof object === "number") {
115
- byteParts.push(encodeNumber(object));
116
- return;
117
- }
118
- if (typeof object === "bigint") {
119
- if (object < 0) {
120
- if (object < -SIXTY_THREE_BITS) {
121
- throw new Error("Cannot safely encode bigint larger than 64 bits");
122
- }
123
- const dataView = new DataView(new ArrayBuffer(9));
124
- dataView.setBigInt64(1, object);
125
- dataView.setUint8(0, 0xd3);
126
- byteParts.push(new Uint8Array(dataView.buffer));
127
- return;
128
- }
129
- if (object >= SIXTY_FOUR_BITS) {
130
- throw new Error("Cannot safely encode bigint larger than 64 bits");
131
- }
132
- const dataView = new DataView(new ArrayBuffer(9));
133
- dataView.setBigUint64(1, object);
134
- dataView.setUint8(0, 0xcf);
135
- byteParts.push(new Uint8Array(dataView.buffer));
136
- return;
137
- }
138
- if (typeof object === "string") {
139
- const encoded = encoder.encode(object);
140
- const len = encoded.length;
141
- if (len < FIVE_BITS) { // fixstr
142
- byteParts.push(new Uint8Array([0xa0 | len]));
143
- }
144
- else if (len < EIGHT_BITS) { // str 8
145
- byteParts.push(new Uint8Array([0xd9, len]));
146
- }
147
- else if (len < SIXTEEN_BITS) { // str 16
148
- const dataView = new DataView(new ArrayBuffer(3));
149
- dataView.setUint16(1, len);
150
- dataView.setUint8(0, 0xda);
151
- byteParts.push(new Uint8Array(dataView.buffer));
152
- }
153
- else if (len < THIRTY_TWO_BITS) { // str 32
154
- const dataView = new DataView(new ArrayBuffer(5));
155
- dataView.setUint32(1, len);
156
- dataView.setUint8(0, 0xdb);
157
- byteParts.push(new Uint8Array(dataView.buffer));
158
- }
159
- else {
160
- throw new Error("Cannot safely encode string with size larger than 32 bits");
161
- }
162
- byteParts.push(encoded);
163
- return;
164
- }
165
- if (object instanceof Uint8Array) {
166
- if (object.length < EIGHT_BITS) { // bin 8
167
- byteParts.push(new Uint8Array([0xc4, object.length]));
168
- }
169
- else if (object.length < SIXTEEN_BITS) { // bin 16
170
- const dataView = new DataView(new ArrayBuffer(3));
171
- dataView.setUint16(1, object.length);
172
- dataView.setUint8(0, 0xc5);
173
- byteParts.push(new Uint8Array(dataView.buffer));
174
- }
175
- else if (object.length < THIRTY_TWO_BITS) { // bin 32
176
- const dataView = new DataView(new ArrayBuffer(5));
177
- dataView.setUint32(1, object.length);
178
- dataView.setUint8(0, 0xc6);
179
- byteParts.push(new Uint8Array(dataView.buffer));
180
- }
181
- else {
182
- throw new Error("Cannot safely encode Uint8Array with size larger than 32 bits");
183
- }
184
- byteParts.push(object);
185
- return;
186
- }
187
- if (Array.isArray(object)) {
188
- if (object.length < FOUR_BITS) { // fixarray
189
- byteParts.push(new Uint8Array([0x90 | object.length]));
190
- }
191
- else if (object.length < SIXTEEN_BITS) { // array 16
192
- const dataView = new DataView(new ArrayBuffer(3));
193
- dataView.setUint16(1, object.length);
194
- dataView.setUint8(0, 0xdc);
195
- byteParts.push(new Uint8Array(dataView.buffer));
196
- }
197
- else if (object.length < THIRTY_TWO_BITS) { // array 32
198
- const dataView = new DataView(new ArrayBuffer(5));
199
- dataView.setUint32(1, object.length);
200
- dataView.setUint8(0, 0xdd);
201
- byteParts.push(new Uint8Array(dataView.buffer));
202
- }
203
- else {
204
- throw new Error("Cannot safely encode array with size larger than 32 bits");
205
- }
206
- for (const obj of object) {
207
- encodeSlice(obj, byteParts);
208
- }
209
- return;
210
- }
211
- // If object is a plain object
212
- const prototype = Object.getPrototypeOf(object);
213
- if (prototype === null || prototype === Object.prototype) {
214
- const numKeys = Object.keys(object).length;
215
- if (numKeys < FOUR_BITS) { // fixarray
216
- byteParts.push(new Uint8Array([0x80 | numKeys]));
217
- }
218
- else if (numKeys < SIXTEEN_BITS) { // map 16
219
- const dataView = new DataView(new ArrayBuffer(3));
220
- dataView.setUint16(1, numKeys);
221
- dataView.setUint8(0, 0xde);
222
- byteParts.push(new Uint8Array(dataView.buffer));
223
- }
224
- else if (numKeys < THIRTY_TWO_BITS) { // map 32
225
- const dataView = new DataView(new ArrayBuffer(5));
226
- dataView.setUint32(1, numKeys);
227
- dataView.setUint8(0, 0xdf);
228
- byteParts.push(new Uint8Array(dataView.buffer));
229
- }
230
- else {
231
- throw new Error("Cannot safely encode map with size larger than 32 bits");
232
- }
233
- for (const [key, value] of Object.entries(object)) {
234
- encodeSlice(key, byteParts);
235
- encodeSlice(value, byteParts);
236
- }
237
- return;
238
- }
239
- throw new Error("Cannot safely encode value into messagepack");
240
- }