quais 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.
Files changed (51) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +104 -0
  3. package/dist/ethers.esm.js.map +1 -0
  4. package/dist/ethers.esm.min.js.map +1 -0
  5. package/dist/ethers.umd.js.map +1 -0
  6. package/dist/ethers.umd.min.js.map +1 -0
  7. package/dist/quais.esm.js +24034 -0
  8. package/dist/quais.esm.js.map +1 -0
  9. package/dist/quais.esm.min.js +1 -0
  10. package/dist/quais.esm.min.js.map +1 -0
  11. package/dist/quais.umd.js +31445 -0
  12. package/dist/quais.umd.js.map +1 -0
  13. package/dist/quais.umd.min.js +1 -0
  14. package/dist/quais.umd.min.js.map +1 -0
  15. package/lib/_version.d.ts +2 -0
  16. package/lib/_version.d.ts.map +1 -0
  17. package/lib/_version.js +5 -0
  18. package/lib/_version.js.map +1 -0
  19. package/lib/index.d.ts +4 -0
  20. package/lib/index.d.ts.map +1 -0
  21. package/lib/index.js +53 -0
  22. package/lib/index.js.map +1 -0
  23. package/lib/quais.d.ts +19 -0
  24. package/lib/quais.d.ts.map +1 -0
  25. package/lib/quais.js +55 -0
  26. package/lib/quais.js.map +1 -0
  27. package/lib/utils.d.ts +34 -0
  28. package/lib/utils.d.ts.map +1 -0
  29. package/lib/utils.js +148 -0
  30. package/lib/utils.js.map +1 -0
  31. package/lib.esm/_version.d.ts +2 -0
  32. package/lib.esm/_version.d.ts.map +1 -0
  33. package/lib.esm/_version.js +2 -0
  34. package/lib.esm/_version.js.map +1 -0
  35. package/lib.esm/index.d.ts +4 -0
  36. package/lib.esm/index.d.ts.map +1 -0
  37. package/lib.esm/index.js +16 -0
  38. package/lib.esm/index.js.map +1 -0
  39. package/lib.esm/quais.d.ts +19 -0
  40. package/lib.esm/quais.d.ts.map +1 -0
  41. package/lib.esm/quais.js +23 -0
  42. package/lib.esm/quais.js.map +1 -0
  43. package/lib.esm/utils.d.ts +34 -0
  44. package/lib.esm/utils.d.ts.map +1 -0
  45. package/lib.esm/utils.js +33 -0
  46. package/lib.esm/utils.js.map +1 -0
  47. package/package.json +57 -0
  48. package/src.ts/_version.ts +1 -0
  49. package/src.ts/index.ts +80 -0
  50. package/src.ts/quais.ts +126 -0
  51. package/src.ts/utils.ts +216 -0
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "author": "",
3
+ "browser-old": "./dist/quais.umd.js",
4
+ "dependencies": {
5
+ "@quais/abi": "0.1.0",
6
+ "@quais/abstract-provider": "0.1.0",
7
+ "@quais/abstract-signer": "0.1.0",
8
+ "@quais/address": "0.1.0",
9
+ "@quais/base64": "0.1.0",
10
+ "@quais/basex": "0.1.0",
11
+ "@quais/bignumber": "0.1.0",
12
+ "@quais/bytes": "0.1.0",
13
+ "@quais/constants": "0.1.0",
14
+ "@quais/contracts": "0.1.0",
15
+ "@quais/hash": "0.1.0",
16
+ "@quais/hdnode": "0.1.0",
17
+ "@quais/json-wallets": "0.1.0",
18
+ "@quais/keccak256": "0.1.0",
19
+ "@quais/logger": "0.1.0",
20
+ "@quais/networks": "0.1.0",
21
+ "@quais/pbkdf2": "0.1.0",
22
+ "@quais/properties": "0.1.0",
23
+ "@quais/providers": "0.1.0",
24
+ "@quais/random": "0.1.0",
25
+ "@quais/rlp": "0.1.0",
26
+ "@quais/sha2": "0.1.0",
27
+ "@quais/signing-key": "0.1.0",
28
+ "@quais/solidity": "0.1.0",
29
+ "@quais/strings": "0.1.0",
30
+ "@quais/transactions": "0.1.0",
31
+ "@quais/units": "0.1.0",
32
+ "@quais/wallet": "0.1.0",
33
+ "@quais/web": "0.1.0",
34
+ "@quais/wordlists": "0.1.0"
35
+ },
36
+ "description": "Umbrella package for most common Ethers libraries.",
37
+ "keywords": [
38
+ "Quai",
39
+ "quais"
40
+ ],
41
+ "license": "MIT",
42
+ "main": "./lib/index.js",
43
+ "module": "./lib.esm/index.js",
44
+ "name": "quais",
45
+ "repository": {
46
+ "directory": "packages/quais",
47
+ "type": "git",
48
+ "url": "git://github.com:dominant-strategies/quais.js.git"
49
+ },
50
+ "scripts": {
51
+ "test": "echo \"Error: no test specified\" && exit 1"
52
+ },
53
+ "sideEffects": false,
54
+ "tarballHash": "0x0787812d30a16e79d3a3da2017697837614f159ce6af12fa5704c9ee3a71995d",
55
+ "types": "./lib/index.d.ts",
56
+ "version": "0.1.0"
57
+ }
@@ -0,0 +1 @@
1
+ export const version = "quais/5.7.2";
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ // To modify this file, you must update ./misc/admin/lib/cmds/update-exports.js
4
+
5
+ import * as quais from "./quais";
6
+
7
+ try {
8
+ const anyGlobal = (window as any);
9
+
10
+ if (anyGlobal._quais == null) {
11
+ anyGlobal._quais = quais;
12
+ }
13
+ } catch (error) { }
14
+
15
+ export { quais };
16
+
17
+ export {
18
+ Signer,
19
+
20
+ Wallet,
21
+ VoidSigner,
22
+
23
+ getDefaultProvider,
24
+ providers,
25
+
26
+ BaseContract,
27
+ Contract,
28
+ ContractFactory,
29
+
30
+ BigNumber,
31
+ FixedNumber,
32
+
33
+ constants,
34
+ errors,
35
+
36
+ logger,
37
+
38
+ utils,
39
+
40
+ wordlists,
41
+
42
+
43
+ ////////////////////////
44
+ // Compile-Time Constants
45
+
46
+ version,
47
+
48
+
49
+ ////////////////////////
50
+ // Types
51
+
52
+ ContractFunction,
53
+ ContractReceipt,
54
+ ContractTransaction,
55
+ Event,
56
+ EventFilter,
57
+
58
+ Overrides,
59
+ PayableOverrides,
60
+ CallOverrides,
61
+
62
+ PopulatedTransaction,
63
+
64
+ ContractInterface,
65
+
66
+ TypedDataDomain,
67
+ TypedDataField,
68
+
69
+ BigNumberish,
70
+
71
+ Bytes,
72
+ BytesLike,
73
+
74
+ Signature,
75
+
76
+ Transaction,
77
+ UnsignedTransaction,
78
+
79
+ Wordlist
80
+ } from "./quais";
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ import { BaseContract, Contract, ContractFactory } from "@quais/contracts";
4
+
5
+ import { BigNumber, FixedNumber } from "@quais/bignumber";
6
+
7
+ import { Signer, VoidSigner } from "@quais/abstract-signer";
8
+ import { Wallet } from "@quais/wallet";
9
+
10
+ import * as constants from "@quais/constants";
11
+
12
+ import * as providers from "@quais/providers";
13
+ import { getDefaultProvider } from "@quais/providers";
14
+
15
+ import { Wordlist, wordlists} from "@quais/wordlists";
16
+
17
+ import * as utils from "./utils";
18
+
19
+ import { ErrorCode as errors, Logger } from "@quais/logger";
20
+
21
+ ////////////////////////
22
+ // Types
23
+
24
+ import type { TypedDataDomain, TypedDataField } from "@quais/abstract-signer";
25
+ import { BigNumberish } from "@quais/bignumber";
26
+ import { Bytes, BytesLike, Signature } from "@quais/bytes";
27
+ import { Transaction, UnsignedTransaction } from "@quais/transactions";
28
+
29
+
30
+ ////////////////////////
31
+ // Compile-Time Constants
32
+
33
+ // This is generated by "npm run dist"
34
+ import { version } from "./_version";
35
+
36
+ const logger = new Logger(version);
37
+
38
+ ////////////////////////
39
+ // Types
40
+
41
+ import {
42
+ ContractFunction,
43
+ ContractReceipt,
44
+ ContractTransaction,
45
+
46
+ Event,
47
+ EventFilter,
48
+
49
+ Overrides,
50
+ PayableOverrides,
51
+ CallOverrides,
52
+
53
+ PopulatedTransaction,
54
+
55
+ ContractInterface
56
+ } from "@quais/contracts";
57
+
58
+
59
+ ////////////////////////
60
+ // Exports
61
+
62
+ export {
63
+ Signer,
64
+
65
+ Wallet,
66
+ VoidSigner,
67
+
68
+ getDefaultProvider,
69
+ providers,
70
+
71
+ BaseContract,
72
+ Contract,
73
+ ContractFactory,
74
+
75
+ BigNumber,
76
+ FixedNumber,
77
+
78
+ constants,
79
+ errors,
80
+
81
+ logger,
82
+
83
+ utils,
84
+
85
+ wordlists,
86
+
87
+
88
+ ////////////////////////
89
+ // Compile-Time Constants
90
+
91
+ version,
92
+
93
+
94
+ ////////////////////////
95
+ // Types
96
+
97
+ ContractFunction,
98
+ ContractReceipt,
99
+ ContractTransaction,
100
+ Event,
101
+ EventFilter,
102
+
103
+ Overrides,
104
+ PayableOverrides,
105
+ CallOverrides,
106
+
107
+ PopulatedTransaction,
108
+
109
+ ContractInterface,
110
+
111
+ TypedDataDomain,
112
+ TypedDataField,
113
+
114
+ BigNumberish,
115
+
116
+ Bytes,
117
+ BytesLike,
118
+
119
+ Signature,
120
+
121
+ Transaction,
122
+ UnsignedTransaction,
123
+
124
+ Wordlist
125
+ };
126
+
@@ -0,0 +1,216 @@
1
+ "use strict";
2
+
3
+ import { AbiCoder, checkResultErrors, ConstructorFragment, defaultAbiCoder, ErrorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, ParamType, Result, TransactionDescription }from "@quais/abi";
4
+ import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@quais/address";
5
+ import * as base64 from "@quais/base64";
6
+ import { Base58 as base58 } from "@quais/basex";
7
+ import { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@quais/bytes";
8
+ import { _TypedDataEncoder, dnsEncode, hashMessage, id, isValidName, namehash } from "@quais/hash";
9
+ import { defaultPath, entropyToMnemonic, getAccountPath, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@quais/hdnode";
10
+ import { getJsonWalletAddress } from "@quais/json-wallets";
11
+ import { keccak256 } from "@quais/keccak256";
12
+ import { Logger } from "@quais/logger";
13
+ import { computeHmac, ripemd160, sha256, sha512 } from "@quais/sha2";
14
+ import { keccak256 as solidityKeccak256, pack as solidityPack, sha256 as soliditySha256 } from "@quais/solidity";
15
+ import { randomBytes, shuffled } from "@quais/random";
16
+ import { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from "@quais/properties";
17
+ import * as RLP from "@quais/rlp";
18
+ import { computePublicKey, recoverPublicKey, SigningKey } from "@quais/signing-key";
19
+ import { formatBytes32String, nameprep, parseBytes32String, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from "@quais/strings";
20
+ import { accessListify, computeAddress, parse as parseTransaction, recoverAddress, serialize as serializeTransaction, TransactionTypes } from "@quais/transactions";
21
+ import { commify, formatEther, parseEther, formatUnits, parseUnits } from "@quais/units";
22
+ import { verifyMessage, verifyTypedData } from "@quais/wallet";
23
+ import { _fetchData, fetchJson, poll } from "@quais/web";
24
+
25
+ ////////////////////////
26
+ // Enums
27
+
28
+ import { SupportedAlgorithm } from "@quais/sha2";
29
+ import { UnicodeNormalizationForm, Utf8ErrorReason } from "@quais/strings";
30
+ import { UnsignedTransaction } from "@quais/transactions";
31
+
32
+ ////////////////////////
33
+ // Types and Interfaces
34
+
35
+ import { CoerceFunc } from "@quais/abi";
36
+ import { Bytes, BytesLike, Hexable } from "@quais/bytes"
37
+ import { Mnemonic } from "@quais/hdnode";
38
+ import { EncryptOptions, ProgressCallback } from "@quais/json-wallets";
39
+ import { Deferrable } from "@quais/properties";
40
+ import { Utf8ErrorFunc } from "@quais/strings";
41
+ import { AccessList, AccessListish } from "@quais/transactions";
42
+ import { ConnectionInfo, FetchJsonResponse, OnceBlockable, OncePollable, PollOptions } from "@quais/web";
43
+
44
+ ////////////////////////
45
+ // Exports
46
+
47
+ export {
48
+ AbiCoder,
49
+ defaultAbiCoder,
50
+
51
+ Fragment,
52
+ ConstructorFragment,
53
+ ErrorFragment,
54
+ EventFragment,
55
+ FunctionFragment,
56
+ ParamType,
57
+ FormatTypes,
58
+
59
+ checkResultErrors,
60
+ Result,
61
+
62
+ Logger,
63
+
64
+ RLP,
65
+
66
+ _fetchData,
67
+ fetchJson,
68
+ poll,
69
+
70
+ checkProperties,
71
+ deepCopy,
72
+ defineReadOnly,
73
+ getStatic,
74
+ resolveProperties,
75
+ shallowCopy,
76
+
77
+ arrayify,
78
+
79
+ concat,
80
+ stripZeros,
81
+ zeroPad,
82
+
83
+ isBytes,
84
+ isBytesLike,
85
+
86
+ defaultPath,
87
+ HDNode,
88
+ SigningKey,
89
+
90
+ Interface,
91
+
92
+ LogDescription,
93
+ TransactionDescription,
94
+
95
+ base58,
96
+ base64,
97
+
98
+ hexlify,
99
+ isHexString,
100
+ hexConcat,
101
+ hexStripZeros,
102
+ hexValue,
103
+ hexZeroPad,
104
+ hexDataLength,
105
+ hexDataSlice,
106
+
107
+ nameprep,
108
+ _toEscapedUtf8String,
109
+ toUtf8Bytes,
110
+ toUtf8CodePoints,
111
+ toUtf8String,
112
+ Utf8ErrorFuncs,
113
+
114
+ formatBytes32String,
115
+ parseBytes32String,
116
+
117
+ dnsEncode,
118
+ hashMessage,
119
+ namehash,
120
+ isValidName,
121
+ id,
122
+
123
+ _TypedDataEncoder,
124
+
125
+ getAddress,
126
+ getIcapAddress,
127
+ getContractAddress,
128
+ getCreate2Address,
129
+ isAddress,
130
+
131
+ formatEther,
132
+ parseEther,
133
+
134
+ formatUnits,
135
+ parseUnits,
136
+
137
+ commify,
138
+
139
+ computeHmac,
140
+ keccak256,
141
+ ripemd160,
142
+ sha256,
143
+ sha512,
144
+
145
+ randomBytes,
146
+ shuffled,
147
+
148
+ solidityPack,
149
+ solidityKeccak256,
150
+ soliditySha256,
151
+
152
+ splitSignature,
153
+ joinSignature,
154
+
155
+ accessListify,
156
+ parseTransaction,
157
+ serializeTransaction,
158
+ TransactionTypes,
159
+
160
+ getJsonWalletAddress,
161
+
162
+ computeAddress,
163
+ recoverAddress,
164
+
165
+ computePublicKey,
166
+ recoverPublicKey,
167
+
168
+ verifyMessage,
169
+ verifyTypedData,
170
+
171
+ getAccountPath,
172
+ mnemonicToEntropy,
173
+ entropyToMnemonic,
174
+ isValidMnemonic,
175
+ mnemonicToSeed,
176
+
177
+
178
+ ////////////////////////
179
+ // Enums
180
+
181
+ SupportedAlgorithm,
182
+
183
+ UnicodeNormalizationForm,
184
+ Utf8ErrorReason,
185
+
186
+ ////////////////////////
187
+ // Types
188
+
189
+ Bytes,
190
+ BytesLike,
191
+ Hexable,
192
+
193
+ AccessList,
194
+ AccessListish,
195
+ UnsignedTransaction,
196
+
197
+ CoerceFunc,
198
+
199
+ Indexed,
200
+
201
+ Mnemonic,
202
+
203
+ Deferrable,
204
+
205
+ Utf8ErrorFunc,
206
+
207
+ ConnectionInfo,
208
+ OnceBlockable,
209
+ OncePollable,
210
+ PollOptions,
211
+ FetchJsonResponse,
212
+
213
+ EncryptOptions,
214
+ ProgressCallback
215
+ }
216
+