@leocuvee/turtlecoin-utils 0.0.14

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 (132) hide show
  1. package/.github/workflows/ci.yml +27 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/inspectionProfiles/Project_Default.xml +7 -0
  4. package/.idea/misc.xml +6 -0
  5. package/.idea/modules.xml +8 -0
  6. package/.idea/turtlecoin-utils.iml +12 -0
  7. package/.idea/vcs.xml +6 -0
  8. package/.travis.yml +11 -0
  9. package/CONTRIBUTING.md +3 -0
  10. package/LICENSE +674 -0
  11. package/README.md +203 -0
  12. package/config.json +7 -0
  13. package/docs/.nojekyll +0 -0
  14. package/docs/CNAME +1 -0
  15. package/docs/assets/css/main.css +2321 -0
  16. package/docs/assets/images/icons.png +0 -0
  17. package/docs/assets/images/icons@2x.png +0 -0
  18. package/docs/assets/images/widgets.png +0 -0
  19. package/docs/assets/images/widgets@2x.png +0 -0
  20. package/docs/assets/js/main.js +1 -0
  21. package/docs/assets/js/search.js +3 -0
  22. package/docs/classes/address.html +964 -0
  23. package/docs/classes/addressprefix.html +431 -0
  24. package/docs/classes/block.html +965 -0
  25. package/docs/classes/blocktemplate.html +695 -0
  26. package/docs/classes/cryptonote.html +1137 -0
  27. package/docs/classes/ed25519.keypair.html +400 -0
  28. package/docs/classes/ed25519.keys.html +373 -0
  29. package/docs/classes/extranoncetag.extranoncedata.html +454 -0
  30. package/docs/classes/extranoncetag.extranoncepaymentid.html +453 -0
  31. package/docs/classes/extranoncetag.iextranonce.html +347 -0
  32. package/docs/classes/extratag.extramergedmining.html +494 -0
  33. package/docs/classes/extratag.extranonce.html +530 -0
  34. package/docs/classes/extratag.extrapadding.html +456 -0
  35. package/docs/classes/extratag.extrapublickey.html +460 -0
  36. package/docs/classes/extratag.iextratag.html +355 -0
  37. package/docs/classes/levinpacket.html +674 -0
  38. package/docs/classes/levinpayloads.handshake.html +731 -0
  39. package/docs/classes/levinpayloads.ilevinpayload.html +318 -0
  40. package/docs/classes/levinpayloads.liteblock.html +494 -0
  41. package/docs/classes/levinpayloads.missingtransactions.html +494 -0
  42. package/docs/classes/levinpayloads.newblock.html +540 -0
  43. package/docs/classes/levinpayloads.newtransactions.html +402 -0
  44. package/docs/classes/levinpayloads.peerentry.html +610 -0
  45. package/docs/classes/levinpayloads.ping.html +450 -0
  46. package/docs/classes/levinpayloads.rawblock.html +344 -0
  47. package/docs/classes/levinpayloads.requestchain.html +402 -0
  48. package/docs/classes/levinpayloads.requestgetobjects.html +448 -0
  49. package/docs/classes/levinpayloads.requesttxpool.html +402 -0
  50. package/docs/classes/levinpayloads.responsechain.html +494 -0
  51. package/docs/classes/levinpayloads.responsegetobjects.html +540 -0
  52. package/docs/classes/levinpayloads.timedsync.html +540 -0
  53. package/docs/classes/multisig.html +930 -0
  54. package/docs/classes/multisigmessage.html +694 -0
  55. package/docs/classes/parentblock.html +347 -0
  56. package/docs/classes/transaction.html +925 -0
  57. package/docs/classes/transactioninputs.coinbaseinput.html +390 -0
  58. package/docs/classes/transactioninputs.itransactioninput.html +321 -0
  59. package/docs/classes/transactioninputs.keyinput.html +459 -0
  60. package/docs/classes/transactionoutputs.itransactionoutput.html +317 -0
  61. package/docs/classes/transactionoutputs.keyoutput.html +422 -0
  62. package/docs/enums/extranoncetag.noncetagtype.html +246 -0
  63. package/docs/enums/extratag.extratagtype.html +280 -0
  64. package/docs/enums/levinprotocol.commandtype.html +391 -0
  65. package/docs/enums/transactioninputs.inputtype.html +246 -0
  66. package/docs/enums/transactionoutputs.outputtype.html +229 -0
  67. package/docs/globals.html +238 -0
  68. package/docs/index.html +271 -0
  69. package/docs/interfaces/interfaces.config.html +590 -0
  70. package/docs/interfaces/interfaces.daemonblocktemplateresponse.html +323 -0
  71. package/docs/interfaces/interfaces.generatedinput.html +304 -0
  72. package/docs/interfaces/interfaces.generatedoutput.html +285 -0
  73. package/docs/interfaces/interfaces.inputkeys.html +304 -0
  74. package/docs/interfaces/interfaces.ipreparedtransaction.html +268 -0
  75. package/docs/interfaces/interfaces.output.html +399 -0
  76. package/docs/interfaces/interfaces.preparedringsignature.html +377 -0
  77. package/docs/interfaces/interfaces.preparedtransaction.html +329 -0
  78. package/docs/interfaces/interfaces.randomoutput.html +285 -0
  79. package/docs/interfaces/interfaces.transactionrecipient.html +285 -0
  80. package/docs/interfaces/multisiginterfaces.partialkeyimage.html +277 -0
  81. package/docs/interfaces/multisiginterfaces.partialsigningkey.html +277 -0
  82. package/docs/modules/ed25519.html +195 -0
  83. package/docs/modules/extranoncetag.html +208 -0
  84. package/docs/modules/extratag.html +216 -0
  85. package/docs/modules/interfaces.html +231 -0
  86. package/docs/modules/levinpayloads.html +247 -0
  87. package/docs/modules/levinprotocol.html +191 -0
  88. package/docs/modules/multisiginterfaces.html +195 -0
  89. package/docs/modules/transactioninputs.html +208 -0
  90. package/docs/modules/transactionoutputs.html +204 -0
  91. package/index.d.ts +417 -0
  92. package/index.js +1508 -0
  93. package/lib/base58.js +220 -0
  94. package/lib/biginteger.js +1591 -0
  95. package/lib/blocktemplate.js +408 -0
  96. package/lib/crypto.js +19698 -0
  97. package/lib/mnemonic.js +1204 -0
  98. package/lib/nacl-fast-cn.js +608 -0
  99. package/lib/ringsigs.js +24262 -0
  100. package/lib/sha3.js +477 -0
  101. package/package.json +58 -0
  102. package/src/Address.ts +433 -0
  103. package/src/AddressPrefix.ts +117 -0
  104. package/src/Block.ts +556 -0
  105. package/src/BlockTemplate.ts +289 -0
  106. package/src/Common.ts +105 -0
  107. package/src/Config.ts +66 -0
  108. package/src/CryptoNote.ts +1072 -0
  109. package/src/LevinPacket.ts +366 -0
  110. package/src/Multisig.ts +600 -0
  111. package/src/MultisigMessage.ts +374 -0
  112. package/src/ParentBlock.ts +39 -0
  113. package/src/Transaction.ts +628 -0
  114. package/src/Types/ED25519.ts +187 -0
  115. package/src/Types/IExtraNonce.ts +225 -0
  116. package/src/Types/IExtraTag.ts +507 -0
  117. package/src/Types/ITransaction.ts +230 -0
  118. package/src/Types/ITransactionInput.ts +190 -0
  119. package/src/Types/ITransactionOutput.ts +108 -0
  120. package/src/Types/LevinPayloads.ts +1576 -0
  121. package/src/Types/MultisigInterfaces.ts +65 -0
  122. package/src/Types/PortableStorage.ts +289 -0
  123. package/src/Types.ts +36 -0
  124. package/src/index.ts +36 -0
  125. package/test/template.json +6 -0
  126. package/test/test.js +1457 -0
  127. package/tests/blocktemplate.json +6 -0
  128. package/tests/tests.js +215 -0
  129. package/tsconfig.json +15 -0
  130. package/tslint.json +36 -0
  131. package/typedoc.json +10 -0
  132. package/webpack.config.js +15 -0
@@ -0,0 +1,6 @@
1
+ {
2
+ "blocktemplate": "0500b4318c1249164393f7b9d691e60aba81ca9bbffb9e0b23e6b01c93d9c621ab800000b5f9abe605000000000000000000000000000000000000000000000000000000000000000000000000010000000023032100000000000000000000000000000000000000000000000000000000000000000001b9fe5801ff91fe58070802959f9d01c4cbd664e7c937687e7ae847f75745614ba4a11a6f5c0b25a5ca42c314026840ba5dc6c84a533d005f0a6f9758c4eb4d19bffa3b4a73547596dac17b7d169003022f88b7b85f42c789721e7ee44bded4b6e1e48f7fb9bb73dc87cda264adf06a54f02e02175cea7cf09b914749c650b9321678d3f0e4390cad20ac6896be7ac14ba4f31ab0ea01021192fdc86fd815642850c0f50bc11df8ba1d39581d2c0642aa83f72f1c3fb22580ea3002c28a03fb9b3b7f6e4f9cdf2e74e93c8282580d8134722302b9978cdc3a35f39980897a02a4978ee1742da6f77791f065326922ff8c713687d2b52215ce7911b08922a7602901296929051bf0b258b717ffdca80c8b0822063c9d3f70f0dbed9b3f2e0aca2fa1020600000000000012f6b48f1800c368e046252e50165620fbb155176d17ddfdb98fd3227237760cf579af90593ec64a4a5549bd219969dc9aa1aac2dc3eab529c90b2f8c20221f99f02bdfb9a7efb5e5e85b710ef442b3cc82431173db142947a4f755a22f45915e5f2d53027a4aee505305c7cde822f960578417779ef71c1c8b611e95f1643fd125a39df66f40ce82794c9debc342381f26763c80968f8bf8e5378b433c583a6078348457ebe6ad61e5487ac3bebe22e03c46d9c894a511561ffbe9612809c17207493941d607b152f4ce193f828085ee8afcc0a351a9cecac0f01b2729df67af831637f76a8430848d86beb643df918af6cc554a8d0b42899671ee02cfbe64905b4458647a90a50aa307be48f3db57ff7f5446926ee70cee0c0cf7ad9021de727b2f97b5e2f0fd0103b24725d0c11ddd876de27a7b837bdd43eb4d9ca479883ad2dcd853ece92e6a7544b24e44051411e6b913760b9d997ca986985b92d51ccbc5708f0cd93c0ce2d1aea46a6744cc81a3df394cd099518cb3c3a5fa43e187c9d72bc3a245256fa60b450411b56d2258d4001b6133f58a5d48af0cc12af652c202b3c9de3f426026500c493c075340ca713a49843db16bda542fd76fb597914e1c975a70d12971baf70b8f7f6f452fd669f3cc00d0a0f36a3312f7c51cadf24cac9c24841eeaa742b5d1e74a750e5763afbd2a75e341edb4439801ac665dd0a3b16cc648a651546c7a3633f0a0274bb3815d6bda05e12fb7cbb908ceb582590a84a30ba6043178279343f5107713390b8e2ca2a8723ee7e5855c6af674bbd9b5a",
3
+ "difficulty": 9796275295,
4
+ "height": 1457937,
5
+ "reservedOffset": 411
6
+ }
package/tests/tests.js ADDED
@@ -0,0 +1,215 @@
1
+ // Copyright (c) 2018-2019, The TurtleCoin Developers
2
+ //
3
+ // Please see the included LICENSE file for more information.
4
+
5
+ 'use strict'
6
+
7
+ const assert = require('assert')
8
+ const BlockTemplateSample = require('./blocktemplate.json')
9
+ const TurtleCoinUtils = require('../').CryptoNote
10
+ const config = require('../config.json')
11
+ const cnUtil = new TurtleCoinUtils(config)
12
+
13
+ const rawSeed = 'dd0c02d3202634821b4d9d91b63d919725f5c3e97e803f3512e52fb0dc2aab0c'
14
+ const rawMnemonic = 'teeming taken piano ramped vegan jazz earth enjoy suture quick lied awkward ferry python often exotic cube hexagon ionic joyous cage abnormal hull jigsaw lied'
15
+
16
+ console.log('')
17
+ console.log('In Seed: ', rawSeed)
18
+ console.log('In Mnemonic: ', rawMnemonic)
19
+
20
+ const outputMnemonic = cnUtil.createAddressFromSeed(rawSeed)
21
+ const outputSeed = cnUtil.createAddressFromMnemonic(rawMnemonic)
22
+
23
+ console.log('')
24
+ console.log('Out Seed: ', outputSeed.seed)
25
+ console.log('Out Mnemonic: ', outputMnemonic.mnemonic)
26
+
27
+ assert(rawSeed === outputSeed.seed)
28
+ assert(rawMnemonic === outputMnemonic.mnemonic)
29
+
30
+ const testAddress = 'TRTLv3nzumGSpRsZWxkcbDhiVEfy9rAgX3X9b7z8XQAy9gwjB6cwr6BJ3P52a6TQUSfA4eXf3Avwz7W89J4doLuigLjUzQjvRqX'
31
+ const testAddressRaw = '9df6ee01f71e440f9a5aab08dbdab0f4f36bba813660a0600f109b1371dc53be33f23c99f0ba225065e1b9c2e43165b3e41f10fcb768853126dfa7e612a3df2deb332492cc073a66'
32
+
33
+ console.log('')
34
+ console.log('In Test Address: ', testAddress)
35
+ console.log('In Raw Address: ', testAddressRaw)
36
+
37
+ const outputAddress = cnUtil.encodeRawAddress(testAddressRaw)
38
+ const outputRaw = cnUtil.decodeAddress(testAddress)
39
+
40
+ console.log('')
41
+ console.log('Out Test Address: ', outputAddress)
42
+ console.log('Out Raw Address: ', outputRaw.rawAddress)
43
+
44
+ assert(testAddressRaw === outputRaw.rawAddress)
45
+ assert(testAddress === outputAddress)
46
+
47
+ const newAddress = cnUtil.createNewAddress(testAddress, 'english')
48
+ const newAddressByKey = cnUtil.createAddressFromKeys(newAddress.spend.privateKey, newAddress.view.privateKey)
49
+
50
+ console.log('')
51
+ console.log('New Address: ', newAddress.address)
52
+ console.log('New Address Keys: ', newAddress.spend.privateKey, newAddress.view.privateKey)
53
+ console.log('New Address By Keys: ', newAddressByKey.address)
54
+
55
+ assert(newAddress.address === newAddressByKey.address)
56
+
57
+ const testPrivateKey = '4a078e76cd41a3d3b534b83dc6f2ea2de500b653ca82273b7bfad8045d85a400'
58
+ const testPublicKey = '7849297236cd7c0d6c69a3c8c179c038d3c1c434735741bb3c8995c3c9d6f2ac'
59
+
60
+ const derivedPublicKey = cnUtil.privateKeyToPublicKey(testPrivateKey)
61
+
62
+ console.log('')
63
+ console.log('In Test Private Key: ', testPrivateKey)
64
+ console.log('In Test Public Key: ', testPublicKey)
65
+ console.log('Out Derived Public Key: ', derivedPublicKey)
66
+
67
+ assert(derivedPublicKey === testPublicKey)
68
+
69
+ const mnemonicAddressByKey = cnUtil.createAddressFromKeys(outputSeed.spend.privateKey, outputSeed.view.privateKey)
70
+
71
+ console.log('')
72
+ console.log('In Mnemonic Private Spend Key: ', outputSeed.spend.privateKey)
73
+ console.log('In Mnemonic Private View Key: ', outputSeed.view.privateKey)
74
+ console.log('In Mnemonic Seed: ', mnemonicAddressByKey.mnemonic)
75
+
76
+ assert(mnemonicAddressByKey.mnemonic === outputSeed.mnemonic)
77
+
78
+ const nonMnemonicPrivateSpendKey = '7a4a9a5b174e5713433fb5735a35b8fe8ce5bf411d5f6a587002e455a2b33703'
79
+ const nonMnemonicPrivateViewKey = '3c986487d9b85e979e4f30eca56558874d2792ec73326d7aa0b2cf24c099ad0f'
80
+ const nonMnemonicAddressByKey = cnUtil.createAddressFromKeys(nonMnemonicPrivateSpendKey, nonMnemonicPrivateViewKey)
81
+
82
+ console.log('')
83
+ console.log('In Non Mnemonic Private Spend Key: ', nonMnemonicPrivateSpendKey)
84
+ console.log('In Non Mnemonic Private View Key: ', nonMnemonicPrivateViewKey)
85
+ console.log('In Non Mnemonic Seed: ', nonMnemonicAddressByKey.mnemonic)
86
+
87
+ assert(nonMnemonicAddressByKey.mnemonic === null)
88
+
89
+ var amount = 1234567
90
+ console.log('')
91
+ console.log('Creating outputs for amount %s to %s', amount, newAddress.address)
92
+ var transfers = cnUtil.createTransactionOutputs(newAddress.address, amount)
93
+ var amounts = []
94
+ transfers.forEach((elem) => {
95
+ amounts.push(elem.amount)
96
+ })
97
+ console.log('Created %s outputs [%s]', transfers.length, amounts.join(','))
98
+
99
+ assert(transfers.length === 7)
100
+
101
+ amount = 101010
102
+ console.log('')
103
+ console.log('Creating outputs for amount %s to %s', amount, newAddress.address)
104
+ transfers = cnUtil.createTransactionOutputs(newAddress.address, amount)
105
+ amounts = []
106
+ transfers.forEach((elem) => {
107
+ amounts.push(elem.amount)
108
+ })
109
+ console.log('Created %s outputs [%s]', transfers.length, amounts.join(','))
110
+
111
+ assert(transfers.length === 3)
112
+
113
+ console.log('')
114
+ console.log('Validating prefix detection for alternate chain...')
115
+ console.log('')
116
+
117
+ const athenaAddress = 'athena28QHa49cTHWjRLYN1XW46Xj8D2mPiu7bovQ67V4z1C84R16VSJvbHmD2Yfq5Yvw5GKVTnfuS5pX3LXH3LNPezfLhhe5Lc27'
118
+ const athenaPrefix = { prefix: 'ca9f97c218',
119
+ base58: 'athena',
120
+ decimal: 6581243850,
121
+ hexadecimal: '18845cfca' }
122
+
123
+ const calculatedPrefix = cnUtil.decodeAddressPrefix(athenaAddress)
124
+
125
+ console.log('Athena Address: ', athenaAddress)
126
+ console.log('Athena Calculated Prefix: ', calculatedPrefix.base58)
127
+ assert(athenaPrefix.base58 === calculatedPrefix.base58)
128
+
129
+ console.log('Athena Calculated Raw Prefix: ', calculatedPrefix.decimal)
130
+ assert(athenaPrefix.decimal === calculatedPrefix.decimal)
131
+
132
+ const newAthenaAddress = cnUtil.encodeAddress(newAddress.view.publicKey, newAddress.spend.publicKey, false, athenaPrefix.decimal)
133
+ const newAthenaAddressByKey = cnUtil.createAddressFromKeys(newAddress.spend.privateKey, newAddress.view.privateKey, athenaPrefix.decimal)
134
+
135
+ console.log('New Athena Address: ', newAthenaAddress)
136
+ console.log('New Athena Address By Keys: ', newAthenaAddressByKey.address)
137
+
138
+ assert(newAthenaAddress === newAthenaAddressByKey.address)
139
+
140
+ console.log('')
141
+ console.log('Verifying output discovery...')
142
+ console.log('')
143
+
144
+ /* For reference, this is transaction fd9b0767c18752610833a8138e4bbb31d02b29bf50aa3af1557e2974a45c629c */
145
+ const txPublicKey = '3b0cc2b066812e6b9fcc42a797dc3c723a7344b604fd4be0b22e06254ff57f94'
146
+
147
+ const walletPrivateViewKey = '6968a0b8f744ec4b8cea5ec124a1b4bd1626a2e6f31e999f8adbab52c4dfa909'
148
+
149
+ /* Not using this right now, but will probably need this later to test something else */
150
+ const walletPrivateSpendKey = 'd9d555a892a85f64916cae1a168bd3f7f400b6471c7b12b438b599601298210b'
151
+
152
+ const walletPublicSpendKey = '854a637b2863af9e8e8216eb2382f3d16616b3ac3e53d0976fbd6f8da6c56418'
153
+
154
+ const derivation = cnUtil.generateKeyDerivation(txPublicKey, walletPrivateViewKey)
155
+
156
+ const ourOutputIndex = 2
157
+
158
+ /* (First output) This is not our output. */
159
+ const publicSpendKey1 = cnUtil.underivePublicKey(derivation, 0, 'aae1b90b4d0a7debb417d91b7f7aa8fdfd80c42ebc6757e1449fd1618a5a3ff1')
160
+
161
+ console.log('Derived public spend key: ', publicSpendKey1)
162
+ console.log('Our public spend key: ', walletPublicSpendKey)
163
+
164
+ assert(publicSpendKey1 !== walletPublicSpendKey)
165
+
166
+ /* (Third output) This is our output. */
167
+ const publicSpendKey2 = cnUtil.underivePublicKey(derivation, ourOutputIndex, 'bb55bef919d1c9f74b5b52a8a6995a1dc4af4c0bb8824f5dc889012bc748173d')
168
+
169
+ console.log('Derived public spend key: ', publicSpendKey2)
170
+ console.log('Our public spend key: ', walletPublicSpendKey)
171
+
172
+ assert(publicSpendKey2 === walletPublicSpendKey)
173
+
174
+ console.log('')
175
+ console.log('Verifying key images are correctly created...')
176
+ console.log('')
177
+
178
+ const [keyImage] = cnUtil.generateKeyImage(txPublicKey, walletPrivateViewKey, walletPublicSpendKey, walletPrivateSpendKey, ourOutputIndex)
179
+ const [keyImagePrimitive] = cnUtil.generateKeyImagePrimitive(walletPublicSpendKey, walletPrivateSpendKey, ourOutputIndex, derivation)
180
+
181
+ console.log('Generated key image: ', keyImage)
182
+ console.log('Generated key image (primitive): ', keyImagePrimitive)
183
+
184
+ assert(keyImage === keyImagePrimitive)
185
+
186
+ const expectedKeyImage = '5997cf23543ce2e05c327297a47f26e710af868344859a6f8d65683d8a2498b0'
187
+
188
+ console.log('Expected key image: ', expectedKeyImage)
189
+
190
+ assert(keyImage === expectedKeyImage)
191
+
192
+ const inputData = '0100fb8e8ac805899323371bb790db19218afd8db8e3755d8b90f39b3d5506a9abce4fa912244500000000ee8146d49fa93ee724deb57d12cbc6c6f3b924d946127c7a97418f9348828f0f02'
193
+ const expectedHash = 'b542df5b6e7f5f05275c98e7345884e2ac726aeeb07e03e44e0389eb86cd05f0'
194
+ const calculatedHash = cnUtil.cnFastHash(inputData)
195
+
196
+ console.log('')
197
+ console.log('Hashing Tests...')
198
+ console.log('')
199
+ console.log('CN Fast Hash')
200
+ console.log('Expected Hash: %s', expectedHash)
201
+ console.log('Calculated Hash: %s', calculatedHash)
202
+
203
+ assert(expectedHash === calculatedHash)
204
+
205
+ const BlockTemplate = cnUtil.blockTemplate(BlockTemplateSample)
206
+
207
+ console.log('')
208
+ console.log('Block Template: %s', BlockTemplate.blockTemplate)
209
+ console.log('')
210
+ console.log('Block Version: %s.%s', BlockTemplate.block.majorVersion, BlockTemplate.block.minorVersion)
211
+ console.log('Transaction Count: %s', BlockTemplate.block.transactions.length)
212
+ console.log('')
213
+ console.log('Re-serialized Block Template: %s', BlockTemplate.blob)
214
+
215
+ assert(BlockTemplate.blockTemplate === BlockTemplate.blob)
package/tsconfig.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es6",
4
+ "lib": [
5
+ "es2017",
6
+ "dom",
7
+ "scripthost"
8
+ ],
9
+ "module": "commonjs",
10
+ "declaration": true,
11
+ "outDir": "./dist",
12
+ "strict": true,
13
+ "downlevelIteration": true
14
+ }
15
+ }
package/tslint.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "defaultSeverity": "error",
3
+ "extends": [
4
+ "tslint:latest"
5
+ ],
6
+ "jsRules": {},
7
+ "rules": {
8
+ "quotemark": [
9
+ true,
10
+ "single"
11
+ ],
12
+ "max-classes-per-file": false,
13
+ "interface-name": false,
14
+ "no-console": true,
15
+ "no-implicit-dependencies": [
16
+ true,
17
+ "dev"
18
+ ],
19
+ "no-namespace": false,
20
+ "no-var-requires": false,
21
+ "prefer-object-spread": false,
22
+ "unified-signatures": false,
23
+ "object-literal-shorthand": false,
24
+ "ordered-imports": false,
25
+ "object-literal-sort-keys": false,
26
+ "no-bitwise": false,
27
+ "variable-name": {
28
+ "options": [
29
+ "check-format",
30
+ "allow-pascal-case",
31
+ "allow-snake-case"
32
+ ]
33
+ }
34
+ },
35
+ "rulesDirectory": []
36
+ }
package/typedoc.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "TurtleCoin-Utils",
3
+ "out": "./docs",
4
+ "excludeExternals": true,
5
+ "excludeNotExported": true,
6
+ "excludePrivate": true,
7
+ "excludeProtected": true,
8
+ "listInvalidSymbolLinks": true,
9
+ "mode": "file"
10
+ }
@@ -0,0 +1,15 @@
1
+ 'use strict'
2
+
3
+ module.exports = {
4
+ mode: 'production',
5
+ entry: './dist/index.js',
6
+ output: {
7
+ filename: 'TurtleCoinUtils.js',
8
+ library: 'TurtleCoinUtils',
9
+ libraryTarget: 'umd'
10
+ },
11
+ node: {
12
+ fs: 'empty'
13
+ },
14
+ target: 'web'
15
+ }