dp-worker 0.1.34 → 0.1.39

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 (185) hide show
  1. package/builtin-skills/x.md +6 -2
  2. package/dist/agent/agent.d.ts +6 -0
  3. package/dist/agent/agent.js +21 -2
  4. package/dist/agent/agent.js.map +1 -1
  5. package/dist/agent/task-runner.d.ts +1 -1
  6. package/dist/agent/task-runner.js +13 -4
  7. package/dist/agent/task-runner.js.map +1 -1
  8. package/dist/browser/account-health.d.ts +8 -1
  9. package/dist/browser/account-health.js +33 -10
  10. package/dist/browser/account-health.js.map +1 -1
  11. package/dist/browser/actions.js +7 -8
  12. package/dist/browser/actions.js.map +1 -1
  13. package/dist/browser/cloakbrowser-backend.js +4 -3
  14. package/dist/browser/cloakbrowser-backend.js.map +1 -1
  15. package/dist/browser/dispatch.js +2 -2
  16. package/dist/browser/dispatch.js.map +1 -1
  17. package/dist/browser/dom-helpers.d.ts +2 -1
  18. package/dist/browser/dom-helpers.js +22 -0
  19. package/dist/browser/dom-helpers.js.map +1 -1
  20. package/dist/browser/growth-baseline.d.ts +10 -0
  21. package/dist/browser/growth-baseline.js +104 -0
  22. package/dist/browser/growth-baseline.js.map +1 -0
  23. package/dist/browser/snapshot.d.ts +1 -0
  24. package/dist/browser/snapshot.js +6 -5
  25. package/dist/browser/snapshot.js.map +1 -1
  26. package/dist/center/center-frontend.d.ts +7 -0
  27. package/dist/center/center-frontend.js +47 -17
  28. package/dist/center/center-frontend.js.map +1 -1
  29. package/dist/center/task-completion-outbox.d.ts +27 -0
  30. package/dist/center/task-completion-outbox.js +94 -0
  31. package/dist/center/task-completion-outbox.js.map +1 -0
  32. package/dist/chrome-extension/omni-flow/manifest.json +1 -1
  33. package/dist/config/center-config.js +6 -0
  34. package/dist/config/center-config.js.map +1 -1
  35. package/dist/config/types.d.ts +10 -0
  36. package/dist/config/types.js +7 -0
  37. package/dist/config/types.js.map +1 -1
  38. package/dist/index.js +2 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/llm/client.d.ts +11 -2
  41. package/dist/llm/client.js +41 -19
  42. package/dist/llm/client.js.map +1 -1
  43. package/dist/llm/failover.d.ts +15 -0
  44. package/dist/llm/failover.js +72 -0
  45. package/dist/llm/failover.js.map +1 -0
  46. package/node_modules/dp-shared/dist/configs-contracts.d.ts +8 -0
  47. package/node_modules/dp-shared/dist/configs-contracts.d.ts.map +1 -1
  48. package/node_modules/dp-shared/dist/configs-contracts.js +8 -0
  49. package/node_modules/dp-shared/dist/configs-contracts.js.map +1 -1
  50. package/node_modules/dp-shared/dist/desk-contracts.d.ts +10 -2
  51. package/node_modules/dp-shared/dist/desk-contracts.d.ts.map +1 -1
  52. package/node_modules/dp-shared/dist/desk-contracts.js +44 -7
  53. package/node_modules/dp-shared/dist/desk-contracts.js.map +1 -1
  54. package/node_modules/dp-shared/dist/growth-contracts.d.ts +500 -0
  55. package/node_modules/dp-shared/dist/growth-contracts.d.ts.map +1 -0
  56. package/node_modules/dp-shared/dist/growth-contracts.js +300 -0
  57. package/node_modules/dp-shared/dist/growth-contracts.js.map +1 -0
  58. package/node_modules/dp-shared/dist/growth-existing.d.ts +131 -0
  59. package/node_modules/dp-shared/dist/growth-existing.d.ts.map +1 -0
  60. package/node_modules/dp-shared/dist/growth-existing.js +53 -0
  61. package/node_modules/dp-shared/dist/growth-existing.js.map +1 -0
  62. package/node_modules/dp-shared/dist/growth-operations.d.ts +163 -0
  63. package/node_modules/dp-shared/dist/growth-operations.d.ts.map +1 -0
  64. package/node_modules/dp-shared/dist/growth-operations.js +67 -0
  65. package/node_modules/dp-shared/dist/growth-operations.js.map +1 -0
  66. package/node_modules/dp-shared/dist/growth-policy.d.ts +14 -0
  67. package/node_modules/dp-shared/dist/growth-policy.d.ts.map +1 -0
  68. package/node_modules/dp-shared/dist/growth-policy.js +63 -0
  69. package/node_modules/dp-shared/dist/growth-policy.js.map +1 -0
  70. package/node_modules/dp-shared/dist/growth-presets.d.ts +63 -0
  71. package/node_modules/dp-shared/dist/growth-presets.d.ts.map +1 -0
  72. package/node_modules/dp-shared/dist/growth-presets.js +117 -0
  73. package/node_modules/dp-shared/dist/growth-presets.js.map +1 -0
  74. package/node_modules/dp-shared/dist/index.d.ts +8 -0
  75. package/node_modules/dp-shared/dist/index.d.ts.map +1 -1
  76. package/node_modules/dp-shared/dist/index.js +8 -0
  77. package/node_modules/dp-shared/dist/index.js.map +1 -1
  78. package/node_modules/dp-shared/dist/post-drafts-contracts.d.ts +1 -1
  79. package/node_modules/dp-shared/dist/promo-contracts.d.ts +15 -15
  80. package/node_modules/dp-shared/dist/proxy-relay.d.ts +19 -0
  81. package/node_modules/dp-shared/dist/proxy-relay.d.ts.map +1 -0
  82. package/node_modules/dp-shared/dist/proxy-relay.js +226 -0
  83. package/node_modules/dp-shared/dist/proxy-relay.js.map +1 -0
  84. package/node_modules/dp-shared/dist/relay-compose.d.ts +18 -0
  85. package/node_modules/dp-shared/dist/relay-compose.d.ts.map +1 -0
  86. package/node_modules/dp-shared/dist/relay-compose.js +32 -0
  87. package/node_modules/dp-shared/dist/relay-compose.js.map +1 -0
  88. package/node_modules/dp-shared/dist/relay-contracts.d.ts +9 -4
  89. package/node_modules/dp-shared/dist/relay-contracts.d.ts.map +1 -1
  90. package/node_modules/dp-shared/dist/relay-contracts.js +8 -4
  91. package/node_modules/dp-shared/dist/relay-contracts.js.map +1 -1
  92. package/node_modules/dp-shared/dist/rest-contracts.d.ts +20 -2
  93. package/node_modules/dp-shared/dist/rest-contracts.d.ts.map +1 -1
  94. package/node_modules/dp-shared/dist/rest-contracts.js +8 -2
  95. package/node_modules/dp-shared/dist/rest-contracts.js.map +1 -1
  96. package/node_modules/dp-shared/dist/risk-reasons.d.ts +2 -0
  97. package/node_modules/dp-shared/dist/risk-reasons.d.ts.map +1 -0
  98. package/node_modules/dp-shared/dist/risk-reasons.js +25 -0
  99. package/node_modules/dp-shared/dist/risk-reasons.js.map +1 -0
  100. package/node_modules/dp-shared/dist/ws-protocol.d.ts +4 -0
  101. package/node_modules/dp-shared/dist/ws-protocol.d.ts.map +1 -1
  102. package/node_modules/dp-shared/dist/ws-protocol.js +2 -0
  103. package/node_modules/dp-shared/dist/ws-protocol.js.map +1 -1
  104. package/node_modules/dp-shared/dist/x-text.d.ts +3 -0
  105. package/node_modules/dp-shared/dist/x-text.d.ts.map +1 -0
  106. package/node_modules/dp-shared/dist/x-text.js +19 -0
  107. package/node_modules/dp-shared/dist/x-text.js.map +1 -0
  108. package/node_modules/dp-shared/package.json +6 -0
  109. package/node_modules/ip-address/LICENSE +19 -0
  110. package/node_modules/ip-address/README.md +298 -0
  111. package/node_modules/ip-address/dist/address-error.d.ts +4 -0
  112. package/node_modules/ip-address/dist/address-error.js +12 -0
  113. package/node_modules/ip-address/dist/address-error.js.map +1 -0
  114. package/node_modules/ip-address/dist/common.d.ts +49 -0
  115. package/node_modules/ip-address/dist/common.js +106 -0
  116. package/node_modules/ip-address/dist/common.js.map +1 -0
  117. package/node_modules/ip-address/dist/ip-address.d.ts +7 -0
  118. package/node_modules/ip-address/dist/ip-address.js +35 -0
  119. package/node_modules/ip-address/dist/ip-address.js.map +1 -0
  120. package/node_modules/ip-address/dist/ipv4.d.ts +274 -0
  121. package/node_modules/ip-address/dist/ipv4.js +489 -0
  122. package/node_modules/ip-address/dist/ipv4.js.map +1 -0
  123. package/node_modules/ip-address/dist/ipv6.d.ts +554 -0
  124. package/node_modules/ip-address/dist/ipv6.js +1344 -0
  125. package/node_modules/ip-address/dist/ipv6.js.map +1 -0
  126. package/node_modules/ip-address/dist/v4/constants.d.ts +4 -0
  127. package/node_modules/ip-address/dist/v4/constants.js +12 -0
  128. package/node_modules/ip-address/dist/v4/constants.js.map +1 -0
  129. package/node_modules/ip-address/dist/v6/constants.d.ts +44 -0
  130. package/node_modules/ip-address/dist/v6/constants.js +82 -0
  131. package/node_modules/ip-address/dist/v6/constants.js.map +1 -0
  132. package/node_modules/ip-address/dist/v6/helpers.d.ts +18 -0
  133. package/node_modules/ip-address/dist/v6/helpers.js +54 -0
  134. package/node_modules/ip-address/dist/v6/helpers.js.map +1 -0
  135. package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +5 -0
  136. package/node_modules/ip-address/dist/v6/regular-expressions.js +95 -0
  137. package/node_modules/ip-address/dist/v6/regular-expressions.js.map +1 -0
  138. package/node_modules/ip-address/package.json +90 -0
  139. package/node_modules/smart-buffer/.prettierrc.yaml +5 -0
  140. package/node_modules/smart-buffer/.travis.yml +13 -0
  141. package/node_modules/smart-buffer/LICENSE +20 -0
  142. package/node_modules/smart-buffer/README.md +633 -0
  143. package/node_modules/smart-buffer/build/smartbuffer.js +1233 -0
  144. package/node_modules/smart-buffer/build/smartbuffer.js.map +1 -0
  145. package/node_modules/smart-buffer/build/utils.js +108 -0
  146. package/node_modules/smart-buffer/build/utils.js.map +1 -0
  147. package/node_modules/smart-buffer/docs/CHANGELOG.md +70 -0
  148. package/node_modules/smart-buffer/docs/README_v3.md +367 -0
  149. package/node_modules/smart-buffer/docs/ROADMAP.md +0 -0
  150. package/node_modules/smart-buffer/package.json +79 -0
  151. package/node_modules/smart-buffer/typings/smartbuffer.d.ts +755 -0
  152. package/node_modules/smart-buffer/typings/utils.d.ts +66 -0
  153. package/node_modules/socks/.eslintrc.cjs +11 -0
  154. package/node_modules/socks/.prettierrc.yaml +7 -0
  155. package/node_modules/socks/LICENSE +20 -0
  156. package/node_modules/socks/README.md +686 -0
  157. package/node_modules/socks/build/client/socksclient.js +793 -0
  158. package/node_modules/socks/build/client/socksclient.js.map +1 -0
  159. package/node_modules/socks/build/common/constants.js +108 -0
  160. package/node_modules/socks/build/common/constants.js.map +1 -0
  161. package/node_modules/socks/build/common/helpers.js +167 -0
  162. package/node_modules/socks/build/common/helpers.js.map +1 -0
  163. package/node_modules/socks/build/common/receivebuffer.js +43 -0
  164. package/node_modules/socks/build/common/receivebuffer.js.map +1 -0
  165. package/node_modules/socks/build/common/util.js +25 -0
  166. package/node_modules/socks/build/common/util.js.map +1 -0
  167. package/node_modules/socks/build/index.js +18 -0
  168. package/node_modules/socks/build/index.js.map +1 -0
  169. package/node_modules/socks/docs/examples/index.md +17 -0
  170. package/node_modules/socks/docs/examples/javascript/associateExample.md +90 -0
  171. package/node_modules/socks/docs/examples/javascript/bindExample.md +83 -0
  172. package/node_modules/socks/docs/examples/javascript/connectExample.md +258 -0
  173. package/node_modules/socks/docs/examples/typescript/associateExample.md +93 -0
  174. package/node_modules/socks/docs/examples/typescript/bindExample.md +86 -0
  175. package/node_modules/socks/docs/examples/typescript/connectExample.md +265 -0
  176. package/node_modules/socks/docs/index.md +5 -0
  177. package/node_modules/socks/docs/migratingFromV1.md +86 -0
  178. package/node_modules/socks/package.json +58 -0
  179. package/node_modules/socks/typings/client/socksclient.d.ts +162 -0
  180. package/node_modules/socks/typings/common/constants.d.ts +151 -0
  181. package/node_modules/socks/typings/common/helpers.d.ts +17 -0
  182. package/node_modules/socks/typings/common/receivebuffer.d.ts +12 -0
  183. package/node_modules/socks/typings/common/util.d.ts +14 -0
  184. package/node_modules/socks/typings/index.d.ts +1 -0
  185. package/package.json +1 -1
@@ -0,0 +1,554 @@
1
+ import * as common from './common';
2
+ import { Address4 } from './ipv4';
3
+ interface SixToFourProperties {
4
+ prefix: string;
5
+ gateway: string;
6
+ }
7
+ interface TeredoProperties {
8
+ prefix: string;
9
+ server4: string;
10
+ client4: string;
11
+ flags: string;
12
+ coneNat: boolean;
13
+ microsoft: {
14
+ reserved: boolean;
15
+ universalLocal: boolean;
16
+ groupIndividual: boolean;
17
+ nonce: string;
18
+ };
19
+ udpPort: string;
20
+ }
21
+ /**
22
+ * Represents an IPv6 address
23
+ * @param {string} address - An IPv6 address string
24
+ * @param {number} [groups=8] - How many octets to parse
25
+ * @example
26
+ * var address = new Address6('2001::/32');
27
+ */
28
+ export declare class Address6 {
29
+ address4?: Address4;
30
+ address: string;
31
+ addressMinusSuffix: string;
32
+ elidedGroups?: number;
33
+ elisionBegin?: number;
34
+ elisionEnd?: number;
35
+ groups: number;
36
+ parsedAddress4?: string;
37
+ parsedAddress: string[];
38
+ parsedSubnet: string;
39
+ subnet: string;
40
+ subnetMask: number;
41
+ v4: boolean;
42
+ zone: string;
43
+ private _binaryZeroPad?;
44
+ constructor(address: string, optionalGroups?: number);
45
+ /**
46
+ * Returns true if the given string is a valid IPv6 address (with optional
47
+ * CIDR subnet and zone identifier), false otherwise. Host bits in the
48
+ * subnet portion are allowed (e.g. `2001:db8::1/32` is valid); for strict
49
+ * network-address validation compare `correctForm()` to
50
+ * `startAddress().correctForm()`, or use `networkForm()`.
51
+ */
52
+ static isValid(address: string): boolean;
53
+ /**
54
+ * Convert a BigInt to a v6 address object. The value must be in the
55
+ * range `[0, 2**128 - 1]`; otherwise `AddressError` is thrown.
56
+ * @param {bigint} bigInt - a BigInt to convert
57
+ * @returns {Address6}
58
+ * @example
59
+ * var bigInt = BigInt('1000000000000');
60
+ * var address = Address6.fromBigInt(bigInt);
61
+ * address.correctForm(); // '::e8:d4a5:1000'
62
+ */
63
+ static fromBigInt(bigInt: bigint): Address6;
64
+ /**
65
+ * Parse a URL (with optional bracketed host and port) into an address and
66
+ * port. Returns either `{ address, port }` on success or
67
+ * `{ error, address: null, port: null }` if the URL could not be parsed.
68
+ * Ports are returned as numbers (or `null` if absent or out of range).
69
+ * @example
70
+ * var addressAndPort = Address6.fromURL('http://[ffff::]:8080/foo/');
71
+ * addressAndPort.address.correctForm(); // 'ffff::'
72
+ * addressAndPort.port; // 8080
73
+ */
74
+ static fromURL(url: string): {
75
+ error: string;
76
+ address: null;
77
+ port: null;
78
+ } | {
79
+ address: Address6;
80
+ port: number | null;
81
+ error?: undefined;
82
+ };
83
+ /**
84
+ * Construct an `Address6` from an address and a hex subnet mask given as
85
+ * separate strings (e.g. as returned by Node's `os.networkInterfaces()`).
86
+ * Throws `AddressError` if the mask is non-contiguous (e.g.
87
+ * `ffff::ffff`).
88
+ * @example
89
+ * var address = Address6.fromAddressAndMask('fe80::1', 'ffff:ffff:ffff:ffff::');
90
+ * address.subnetMask; // 64
91
+ */
92
+ static fromAddressAndMask(address: string, mask: string): Address6;
93
+ /**
94
+ * Construct an `Address6` from an address and a Cisco-style wildcard mask
95
+ * given as separate strings (e.g. `::ffff:ffff:ffff:ffff` for a `/64`).
96
+ * The wildcard mask is the bitwise inverse of the subnet mask. Throws
97
+ * `AddressError` if the mask is non-contiguous.
98
+ * @example
99
+ * var address = Address6.fromAddressAndWildcardMask('fe80::1', '::ffff:ffff:ffff:ffff');
100
+ * address.subnetMask; // 64
101
+ */
102
+ static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address6;
103
+ /**
104
+ * Construct an `Address6` from a wildcard pattern with trailing `*`
105
+ * groups. The number of trailing wildcards determines the prefix
106
+ * length: each `*` represents 16 bits. `::` is expanded to zero groups
107
+ * (not wildcards) before evaluating trailing wildcards.
108
+ *
109
+ * Only trailing whole-group wildcards are supported. Partial-group
110
+ * wildcards (e.g. `2001:db8::0*`) and interior wildcards (e.g.
111
+ * `*::1`) throw `AddressError`.
112
+ * @example
113
+ * Address6.fromWildcard('2001:db8:*:*:*:*:*:*').subnet; // '/32'
114
+ * Address6.fromWildcard('2001:db8::*').subnet; // '/112'
115
+ * Address6.fromWildcard('*:*:*:*:*:*:*:*').subnet; // '/0'
116
+ */
117
+ static fromWildcard(input: string): Address6;
118
+ /**
119
+ * Create an IPv6-mapped address given an IPv4 address
120
+ * @param {string} address - An IPv4 address string
121
+ * @returns {Address6}
122
+ * @example
123
+ * var address = Address6.fromAddress4('192.168.0.1');
124
+ * address.correctForm(); // '::ffff:c0a8:1'
125
+ * address.to4in6(); // '::ffff:192.168.0.1'
126
+ */
127
+ static fromAddress4(address: string): Address6;
128
+ /**
129
+ * Return an address from ip6.arpa form
130
+ * @param {string} arpaFormAddress - an 'ip6.arpa' form address
131
+ * @returns {Adress6}
132
+ * @example
133
+ * var address = Address6.fromArpa(e.f.f.f.3.c.2.6.f.f.f.e.6.6.8.e.1.0.6.7.9.4.e.c.0.0.0.0.1.0.0.2.ip6.arpa.)
134
+ * address.correctForm(); // '2001:0:ce49:7601:e866:efff:62c3:fffe'
135
+ */
136
+ static fromArpa(arpaFormAddress: string): Address6;
137
+ /**
138
+ * Return the Microsoft UNC transcription of the address
139
+ * @returns {String} the Microsoft UNC transcription of the address
140
+ */
141
+ microsoftTranscription(): string;
142
+ /**
143
+ * Return the first n bits of the address, defaulting to the subnet mask
144
+ * @param {number} [mask=subnet] - the number of bits to mask
145
+ * @returns {String} the first n bits of the address as a string
146
+ */
147
+ mask(mask?: number): string;
148
+ /**
149
+ * Return the number of possible subnets of a given size in the address
150
+ * @param {number} [subnetSize=128] - the subnet size
151
+ * @returns {String}
152
+ */
153
+ possibleSubnets(subnetSize?: number): string;
154
+ /**
155
+ * Helper function getting start address.
156
+ * @returns {bigint}
157
+ */
158
+ _startAddress(): bigint;
159
+ /**
160
+ * The first address in the range given by this address' subnet
161
+ * Often referred to as the Network Address.
162
+ * @returns {Address6}
163
+ */
164
+ startAddress(): Address6;
165
+ /**
166
+ * The first host address in the range given by this address's subnet ie
167
+ * the first address after the Network Address
168
+ * @returns {Address6}
169
+ */
170
+ startAddressExclusive(): Address6;
171
+ /**
172
+ * Helper function getting end address.
173
+ * @returns {bigint}
174
+ */
175
+ _endAddress(): bigint;
176
+ /**
177
+ * The last address in the range given by this address' subnet
178
+ * Often referred to as the Broadcast
179
+ * @returns {Address6}
180
+ */
181
+ endAddress(): Address6;
182
+ /**
183
+ * The last host address in the range given by this address's subnet ie
184
+ * the last address prior to the Broadcast Address
185
+ * @returns {Address6}
186
+ */
187
+ endAddressExclusive(): Address6;
188
+ /**
189
+ * The hex form of the subnet mask, e.g. `ffff:ffff:ffff:ffff::` for a
190
+ * `/64`. Returns an `Address6`; call `.correctForm()` for the string.
191
+ * @returns {Address6}
192
+ */
193
+ subnetMaskAddress(): Address6;
194
+ /**
195
+ * The Cisco-style wildcard mask, e.g. `::ffff:ffff:ffff:ffff` for a
196
+ * `/64`. This is the bitwise inverse of `subnetMaskAddress()`. Returns
197
+ * an `Address6`; call `.correctForm()` for the string.
198
+ * @returns {Address6}
199
+ */
200
+ wildcardMask(): Address6;
201
+ /**
202
+ * The network address in CIDR string form, e.g. `2001:db8::/32` for
203
+ * `2001:db8::1/32`. For an address with no explicit subnet the prefix
204
+ * is `/128`, e.g. `networkForm()` on `2001:db8::1` returns
205
+ * `2001:db8::1/128`.
206
+ * @returns {string}
207
+ */
208
+ networkForm(): string;
209
+ /**
210
+ * Return the scope of the address. The 4-bit scope field
211
+ * ([RFC 4291 §2.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7))
212
+ * is only defined for multicast addresses; for unicast addresses the scope
213
+ * is derived from the address type per
214
+ * [RFC 4007 §6](https://datatracker.ietf.org/doc/html/rfc4007#section-6).
215
+ * @returns {String}
216
+ */
217
+ getScope(): string;
218
+ /**
219
+ * Return the type of the address
220
+ * @returns {String}
221
+ */
222
+ getType(): string;
223
+ /**
224
+ * Return the bits in the given range as a BigInt
225
+ * @returns {bigint}
226
+ */
227
+ getBits(start: number, end: number): bigint;
228
+ /**
229
+ * Return the bits in the given range as a base-2 string
230
+ * @returns {String}
231
+ */
232
+ getBitsBase2(start: number, end: number): string;
233
+ /**
234
+ * Return the bits in the given range as a base-16 string
235
+ * @returns {String}
236
+ */
237
+ getBitsBase16(start: number, end: number): string;
238
+ /**
239
+ * Return the bits that are set past the subnet mask length
240
+ * @returns {String}
241
+ */
242
+ getBitsPastSubnet(): string;
243
+ /**
244
+ * Return the reversed ip6.arpa form of the address
245
+ * @param {Object} options
246
+ * @param {boolean} options.omitSuffix - omit the "ip6.arpa" suffix
247
+ * @returns {String}
248
+ */
249
+ reverseForm(options?: common.ReverseFormOptions): string;
250
+ /**
251
+ * Returns the address in correct form, per
252
+ * [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros
253
+ * stripped, the longest run of zero groups collapsed to `::`, and hex digits
254
+ * lowercased (e.g. `2001:db8::1`). This is the recommended form for display.
255
+ */
256
+ correctForm(): string;
257
+ /**
258
+ * Return a zero-padded base-2 string representation of the address
259
+ * @returns {String}
260
+ * @example
261
+ * var address = new Address6('2001:4860:4001:803::1011');
262
+ * address.binaryZeroPad();
263
+ * // '0010000000000001010010000110000001000000000000010000100000000011
264
+ * // 0000000000000000000000000000000000000000000000000001000000010001'
265
+ */
266
+ binaryZeroPad(): string;
267
+ /**
268
+ * Parses a v4-in-v6 string (e.g. `::ffff:192.168.0.1`) by extracting the
269
+ * trailing IPv4 address into `this.address4` / `this.parsedAddress4` and
270
+ * returning the address with the v4 portion converted to two v6 groups.
271
+ * Used internally by `parse()`.
272
+ */
273
+ parse4in6(address: string): string;
274
+ /**
275
+ * Parses an IPv6 address string into its 8 hexadecimal groups (expanding
276
+ * any `::` elision and any trailing v4-in-v6 portion) and stores the result
277
+ * on `this.parsedAddress`. Called automatically by the constructor; you
278
+ * typically don't need to call it directly. Throws `AddressError` if the
279
+ * input is malformed.
280
+ */
281
+ parse(address: string): string[];
282
+ /**
283
+ * Returns the canonical (fully expanded) form of the address: all 8 groups,
284
+ * each padded to 4 hex digits, with no `::` collapsing
285
+ * (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and
286
+ * byte-exact comparison.
287
+ */
288
+ canonicalForm(): string;
289
+ /**
290
+ * Return the decimal form of the address
291
+ * @returns {String}
292
+ */
293
+ decimal(): string;
294
+ /**
295
+ * Return the address as a BigInt
296
+ * @returns {bigint}
297
+ */
298
+ bigInt(): bigint;
299
+ /**
300
+ * Return the last two groups of this address as an IPv4 address string.
301
+ * If this address carries a CIDR prefix that covers the trailing 32 bits
302
+ * (i.e. `subnetMask >= 96`), the resulting `Address4` inherits the
303
+ * corresponding v4 prefix (`subnetMask - 96`); otherwise it defaults to
304
+ * `/32`.
305
+ * @returns {Address4}
306
+ * @example
307
+ * var address = new Address6('2001:4860:4001::1825:bf11');
308
+ * address.to4().correctForm(); // '24.37.191.17'
309
+ */
310
+ to4(): Address4;
311
+ /**
312
+ * Return the v4-in-v6 form of the address
313
+ * @returns {String}
314
+ */
315
+ to4in6(): string;
316
+ /**
317
+ * Decodes the Teredo tunneling fields embedded in this address. Returns the
318
+ * Teredo prefix, server IPv4, client IPv4, raw flag bits, cone-NAT flag,
319
+ * UDP port, and Microsoft-format flag breakdown (reserved, universal/local,
320
+ * group/individual, nonce). Only meaningful for addresses in `2001::/32`.
321
+ */
322
+ inspectTeredo(): TeredoProperties;
323
+ /**
324
+ * Decodes the 6to4 tunneling fields embedded in this address. Returns the
325
+ * 6to4 prefix and the embedded IPv4 gateway address. Only meaningful for
326
+ * addresses in `2002::/16`.
327
+ */
328
+ inspect6to4(): SixToFourProperties;
329
+ /**
330
+ * Return a v6 6to4 address from a v6 v4inv6 address
331
+ * @returns {Address6}
332
+ */
333
+ to6to4(): Address6 | null;
334
+ /**
335
+ * Embed an IPv4 address into a NAT64 IPv6 address using the encoding
336
+ * defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052).
337
+ * The default prefix is the well-known prefix `64:ff9b::/96`. The prefix
338
+ * length must be one of 32, 40, 48, 56, 64, or 96; for prefixes shorter
339
+ * than /64 the IPv4 octets are split around the reserved bits 64–71.
340
+ * @example
341
+ * Address6.fromAddress4Nat64('192.0.2.33').correctForm(); // '64:ff9b::c000:221'
342
+ * Address6.fromAddress4Nat64('192.0.2.33', '2001:db8::/32').correctForm(); // '2001:db8:c000:221::'
343
+ */
344
+ static fromAddress4Nat64(address: string, prefix?: string): Address6;
345
+ /**
346
+ * Extract the embedded IPv4 address from a NAT64 IPv6 address using the
347
+ * encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052).
348
+ * The default prefix is the well-known prefix `64:ff9b::/96`. Returns
349
+ * `null` if this address is not contained within the given prefix.
350
+ * @example
351
+ * new Address6('64:ff9b::c000:221').toAddress4Nat64()!.correctForm(); // '192.0.2.33'
352
+ */
353
+ toAddress4Nat64(prefix?: string): Address4 | null;
354
+ /**
355
+ * Return a byte array.
356
+ *
357
+ * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toByteArray())`.
358
+ * @returns {Array}
359
+ */
360
+ toByteArray(): number[];
361
+ /**
362
+ * Return an unsigned byte array.
363
+ *
364
+ * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toUnsignedByteArray())`.
365
+ * @returns {Array}
366
+ */
367
+ toUnsignedByteArray(): number[];
368
+ /**
369
+ * Convert a byte array to an Address6 object.
370
+ *
371
+ * Accepts unsigned bytes (0 to 255) or signed bytes (-128 to 127, as an
372
+ * `Int8Array` or a Java `byte[]` holds them), folding signed values to their
373
+ * unsigned equivalent. Throws `AddressError` unless given exactly 16
374
+ * integers from -128 to 255.
375
+ *
376
+ * To convert from a Node.js `Buffer`, spread it: `Address6.fromByteArray([...buf])`.
377
+ * @returns {Address6}
378
+ */
379
+ static fromByteArray(bytes: Array<number>): Address6;
380
+ /**
381
+ * Convert an unsigned byte array to an Address6 object.
382
+ *
383
+ * Throws `AddressError` unless given exactly 16 integers from 0 to 255.
384
+ *
385
+ * To convert from a Node.js `Buffer`, spread it: `Address6.fromUnsignedByteArray([...buf])`.
386
+ * @returns {Address6}
387
+ */
388
+ static fromUnsignedByteArray(bytes: Array<number>): Address6;
389
+ /**
390
+ * Returns true if the given address is in the subnet of the current address
391
+ * @returns {boolean}
392
+ */
393
+ isInSubnet: typeof common.isInSubnet;
394
+ /**
395
+ * Returns true if this address's host bits fall inside the given subnet,
396
+ * ignoring this address's own subnet mask. See
397
+ * {@link common.isHostInSubnet}.
398
+ * @returns {boolean}
399
+ */
400
+ isHostInSubnet: typeof common.isHostInSubnet;
401
+ /**
402
+ * Returns true if the address is correct, false otherwise
403
+ * @returns {boolean}
404
+ */
405
+ isCorrect: (this: Address4 | Address6) => boolean;
406
+ /**
407
+ * Returns true if the address is in the canonical form, false otherwise
408
+ * @returns {boolean}
409
+ */
410
+ isCanonical(): boolean;
411
+ /**
412
+ * Returns true if the address is a link local address, false otherwise
413
+ * @returns {boolean}
414
+ */
415
+ isLinkLocal(): boolean;
416
+ /**
417
+ * Returns true if the address is a multicast address, false otherwise
418
+ * @returns {boolean}
419
+ */
420
+ isMulticast(): boolean;
421
+ /**
422
+ * Returns true if the address was written in v4-in-v6 dotted-quad notation
423
+ * (e.g. `::ffff:127.0.0.1`), false otherwise. This is a notation-level flag
424
+ * and does not reflect whether the address bits lie in the IPv4-mapped
425
+ * (`::ffff:0:0/96`) subnet — for that, see {@link isMapped4}.
426
+ * @returns {boolean}
427
+ */
428
+ is4(): boolean;
429
+ /**
430
+ * Returns true if the address is an IPv4-mapped IPv6 address in
431
+ * `::ffff:0:0/96` ([RFC 4291 §2.5.5.2](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2)),
432
+ * false otherwise. Unlike {@link is4}, this checks the underlying address
433
+ * bits rather than the textual notation, so `::ffff:127.0.0.1` and
434
+ * `::ffff:7f00:1` both return true.
435
+ * @returns {boolean}
436
+ */
437
+ isMapped4(): boolean;
438
+ /**
439
+ * If this address embeds a routable IPv4 address — i.e. it is IPv4-mapped
440
+ * (`::ffff:0:0/96`) or sits in the NAT64 well-known prefix (`64:ff9b::/96`,
441
+ * [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052)) — return that
442
+ * embedded address as an {@link Address4}; otherwise return null.
443
+ *
444
+ * The special-property checks (`isLoopback`, `isLinkLocal`, `isMulticast`,
445
+ * `isUnspecified`, `isPrivate`, `isCGNAT`, `isBroadcast`) call this first and
446
+ * delegate to the embedded {@link Address4} when present, so a literal such as
447
+ * `::ffff:127.0.0.1` is classified by what it actually reaches (loopback)
448
+ * rather than by its IPv6 wrapper (which `getType()` reports as IPv4-mapped).
449
+ * This matters wherever the checks back a trust-boundary decision (e.g. an
450
+ * SSRF allow/deny filter): without normalization, `::ffff:10.0.0.1`,
451
+ * `::ffff:169.254.169.254`, `64:ff9b::7f00:1`, etc. would all read as
452
+ * non-internal.
453
+ * @returns {Address4 | null}
454
+ */
455
+ embeddedIPv4(): Address4 | null;
456
+ /**
457
+ * Returns true if the address is a Teredo address, false otherwise
458
+ * @returns {boolean}
459
+ */
460
+ isTeredo(): boolean;
461
+ /**
462
+ * Returns true if the address is a 6to4 address, false otherwise
463
+ * @returns {boolean}
464
+ */
465
+ is6to4(): boolean;
466
+ /**
467
+ * Returns true if the address is a loopback address, false otherwise
468
+ * @returns {boolean}
469
+ */
470
+ isLoopback(): boolean;
471
+ /**
472
+ * Returns true if the address is a Unique Local Address in `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)). ULAs are the IPv6 equivalent of IPv4 [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private addresses.
473
+ * @returns {boolean}
474
+ */
475
+ isULA(): boolean;
476
+ /**
477
+ * Returns true if the address is private, i.e. a Unique Local Address in
478
+ * `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)) or an
479
+ * IPv4-mapped / NAT64 address whose embedded IPv4 address is in one of the
480
+ * [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private ranges
481
+ * (e.g. `::ffff:10.0.0.1`). This is the IPv6 counterpart to
482
+ * {@link Address4.isPrivate}; use it instead of {@link isULA} when you need to
483
+ * catch mapped RFC 1918 addresses as well as native ULAs.
484
+ * @returns {boolean}
485
+ */
486
+ isPrivate(): boolean;
487
+ /**
488
+ * Returns true if the address is an IPv4-mapped / NAT64 address whose embedded
489
+ * IPv4 address is in the carrier-grade NAT range `100.64.0.0/10`
490
+ * ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)), false
491
+ * otherwise. There is no native IPv6 CGNAT range, so this only ever returns
492
+ * true for an embedded IPv4 address (e.g. `::ffff:100.64.0.1`).
493
+ * @returns {boolean}
494
+ */
495
+ isCGNAT(): boolean;
496
+ /**
497
+ * Returns true if the address is an IPv4-mapped / NAT64 address whose embedded
498
+ * IPv4 address is the limited broadcast address `255.255.255.255`
499
+ * ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)), false otherwise.
500
+ * There is no IPv6 broadcast, so this only ever returns true for an embedded
501
+ * IPv4 address (e.g. `::ffff:255.255.255.255`).
502
+ * @returns {boolean}
503
+ */
504
+ isBroadcast(): boolean;
505
+ /**
506
+ * Returns true if the address is the unspecified address `::`.
507
+ * @returns {boolean}
508
+ */
509
+ isUnspecified(): boolean;
510
+ /**
511
+ * Returns true if the address is in the documentation prefix `2001:db8::/32` ([RFC 3849](https://datatracker.ietf.org/doc/html/rfc3849)).
512
+ * @returns {boolean}
513
+ */
514
+ isDocumentation(): boolean;
515
+ /**
516
+ * Returns the address as an HTTP URL with the host bracketed, e.g.
517
+ * `http://[2001:db8::1]/`. If `optionalPort` is provided it is appended,
518
+ * e.g. `http://[2001:db8::1]:8080/`.
519
+ */
520
+ href(optionalPort?: number | string): string;
521
+ /**
522
+ * Returns an HTML `<a>` element whose `href` encodes the address in a URL
523
+ * hash fragment (default prefix `/#address=`). Useful for linking between
524
+ * pages of an address-inspector UI.
525
+ * @param options.className - CSS class for the rendered `<a>` element
526
+ * @param options.prefix - hash prefix prepended to the address (default `/#address=`)
527
+ * @param options.v4 - when true, render the address in v4-in-v6 form
528
+ */
529
+ link(options?: {
530
+ className?: string;
531
+ prefix?: string;
532
+ v4?: boolean;
533
+ }): string;
534
+ /**
535
+ * Groups an address
536
+ * @returns {String}
537
+ */
538
+ group(): string;
539
+ /**
540
+ * Generate a regular expression string that can be used to find or validate
541
+ * all variations of this address
542
+ * @param {boolean} substringSearch
543
+ * @returns {string}
544
+ */
545
+ regularExpressionString(this: Address6, substringSearch?: boolean): string;
546
+ /**
547
+ * Generate a regular expression that can be used to find or validate all
548
+ * variations of this address.
549
+ * @param {boolean} substringSearch
550
+ * @returns {RegExp}
551
+ */
552
+ regularExpression(this: Address6, substringSearch?: boolean): RegExp;
553
+ }
554
+ export {};