@metamask/browser-playground 0.1.0

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.
@@ -0,0 +1,230 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*! *****************************************************************************
9
+ Copyright (c) Microsoft Corporation.
10
+
11
+ Permission to use, copy, modify, and/or distribute this software for any
12
+ purpose with or without fee is hereby granted.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
16
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
17
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
18
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
+ PERFORMANCE OF THIS SOFTWARE.
21
+ ***************************************************************************** */
22
+
23
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
24
+
25
+ /*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
26
+
27
+ /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
28
+
29
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
30
+
31
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
32
+
33
+ /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
34
+
35
+ /**
36
+ * @license
37
+ * Lodash <https://lodash.com/>
38
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
39
+ * Released under MIT license <https://lodash.com/license>
40
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
41
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
42
+ */
43
+
44
+ /**
45
+ * @license React
46
+ * react-dom-client.production.js
47
+ *
48
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
49
+ *
50
+ * This source code is licensed under the MIT license found in the
51
+ * LICENSE file in the root directory of this source tree.
52
+ */
53
+
54
+ /**
55
+ * @license React
56
+ * react-dom.production.js
57
+ *
58
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */
63
+
64
+ /**
65
+ * @license React
66
+ * react-jsx-runtime.production.js
67
+ *
68
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
69
+ *
70
+ * This source code is licensed under the MIT license found in the
71
+ * LICENSE file in the root directory of this source tree.
72
+ */
73
+
74
+ /**
75
+ * @license React
76
+ * react.production.js
77
+ *
78
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
79
+ *
80
+ * This source code is licensed under the MIT license found in the
81
+ * LICENSE file in the root directory of this source tree.
82
+ */
83
+
84
+ /**
85
+ * @license React
86
+ * scheduler.production.js
87
+ *
88
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
89
+ *
90
+ * This source code is licensed under the MIT license found in the
91
+ * LICENSE file in the root directory of this source tree.
92
+ */
93
+
94
+ /**
95
+ * @license React
96
+ * use-sync-external-store-shim.production.js
97
+ *
98
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
99
+ *
100
+ * This source code is licensed under the MIT license found in the
101
+ * LICENSE file in the root directory of this source tree.
102
+ */
103
+
104
+ /**
105
+ * @license React
106
+ * use-sync-external-store-shim/with-selector.production.js
107
+ *
108
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
109
+ *
110
+ * This source code is licensed under the MIT license found in the
111
+ * LICENSE file in the root directory of this source tree.
112
+ */
113
+
114
+ /**
115
+ * Support for translating between Uint8Array instances and JavaScript
116
+ * native types.
117
+ *
118
+ * {@link module:Layout~Layout|Layout} is the basis of a class
119
+ * hierarchy that associates property names with sequences of encoded
120
+ * bytes.
121
+ *
122
+ * Layouts are supported for these scalar (numeric) types:
123
+ * * {@link module:Layout~UInt|Unsigned integers in little-endian
124
+ * format} with {@link module:Layout.u8|8-bit}, {@link
125
+ * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},
126
+ * {@link module:Layout.u32|32-bit}, {@link
127
+ * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}
128
+ * representation ranges;
129
+ * * {@link module:Layout~UIntBE|Unsigned integers in big-endian
130
+ * format} with {@link module:Layout.u16be|16-bit}, {@link
131
+ * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},
132
+ * {@link module:Layout.u40be|40-bit}, and {@link
133
+ * module:Layout.u48be|48-bit} representation ranges;
134
+ * * {@link module:Layout~Int|Signed integers in little-endian
135
+ * format} with {@link module:Layout.s8|8-bit}, {@link
136
+ * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},
137
+ * {@link module:Layout.s32|32-bit}, {@link
138
+ * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}
139
+ * representation ranges;
140
+ * * {@link module:Layout~IntBE|Signed integers in big-endian format}
141
+ * with {@link module:Layout.s16be|16-bit}, {@link
142
+ * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},
143
+ * {@link module:Layout.s40be|40-bit}, and {@link
144
+ * module:Layout.s48be|48-bit} representation ranges;
145
+ * * 64-bit integral values that decode to an exact (if magnitude is
146
+ * less than 2^53) or nearby integral Number in {@link
147
+ * module:Layout.nu64|unsigned little-endian}, {@link
148
+ * module:Layout.nu64be|unsigned big-endian}, {@link
149
+ * module:Layout.ns64|signed little-endian}, and {@link
150
+ * module:Layout.ns64be|unsigned big-endian} encodings;
151
+ * * 32-bit floating point values with {@link
152
+ * module:Layout.f32|little-endian} and {@link
153
+ * module:Layout.f32be|big-endian} representations;
154
+ * * 64-bit floating point values with {@link
155
+ * module:Layout.f64|little-endian} and {@link
156
+ * module:Layout.f64be|big-endian} representations;
157
+ * * {@link module:Layout.const|Constants} that take no space in the
158
+ * encoded expression.
159
+ *
160
+ * and for these aggregate types:
161
+ * * {@link module:Layout.seq|Sequence}s of instances of a {@link
162
+ * module:Layout~Layout|Layout}, with JavaScript representation as
163
+ * an Array and constant or data-dependent {@link
164
+ * module:Layout~Sequence#count|length};
165
+ * * {@link module:Layout.struct|Structure}s that aggregate a
166
+ * heterogeneous sequence of {@link module:Layout~Layout|Layout}
167
+ * instances, with JavaScript representation as an Object;
168
+ * * {@link module:Layout.union|Union}s that support multiple {@link
169
+ * module:Layout~VariantLayout|variant layouts} over a fixed
170
+ * (padded) or variable (not padded) span of bytes, using an
171
+ * unsigned integer at the start of the data or a separate {@link
172
+ * module:Layout.unionLayoutDiscriminator|layout element} to
173
+ * determine which layout to use when interpreting the buffer
174
+ * contents;
175
+ * * {@link module:Layout.bits|BitStructure}s that contain a sequence
176
+ * of individual {@link
177
+ * module:Layout~BitStructure#addField|BitField}s packed into an 8,
178
+ * 16, 24, or 32-bit unsigned integer starting at the least- or
179
+ * most-significant bit;
180
+ * * {@link module:Layout.cstr|C strings} of varying length;
181
+ * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link
182
+ * module:Layout~Blob#length|length} raw data.
183
+ *
184
+ * All {@link module:Layout~Layout|Layout} instances are immutable
185
+ * after construction, to prevent internal state from becoming
186
+ * inconsistent.
187
+ *
188
+ * @local Layout
189
+ * @local ExternalLayout
190
+ * @local GreedyCount
191
+ * @local OffsetLayout
192
+ * @local UInt
193
+ * @local UIntBE
194
+ * @local Int
195
+ * @local IntBE
196
+ * @local NearUInt64
197
+ * @local NearUInt64BE
198
+ * @local NearInt64
199
+ * @local NearInt64BE
200
+ * @local Float
201
+ * @local FloatBE
202
+ * @local Double
203
+ * @local DoubleBE
204
+ * @local Sequence
205
+ * @local Structure
206
+ * @local UnionDiscriminator
207
+ * @local UnionLayoutDiscriminator
208
+ * @local Union
209
+ * @local VariantLayout
210
+ * @local BitStructure
211
+ * @local BitField
212
+ * @local Boolean
213
+ * @local Blob
214
+ * @local CString
215
+ * @local Constant
216
+ * @local bindConstructorLayout
217
+ * @module Layout
218
+ * @license MIT
219
+ * @author Peter A. Bigot
220
+ * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}
221
+ */
222
+
223
+ /**
224
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
225
+ *
226
+ * @version 0.5.7
227
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
228
+ * @copyright Chen, Yi-Cyuan 2015-2016
229
+ * @license MIT
230
+ */