@cityofzion/bs-neo-legacy 0.3.1 → 0.4.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 (36) hide show
  1. package/.rush/temp/shrinkwrap-deps.json +2 -2
  2. package/bs-neo-legacy.build.error.log +82 -2
  3. package/bs-neo-legacy.build.log +84 -3
  4. package/dist/BSNeoLegacy.d.ts +13 -23
  5. package/dist/BSNeoLegacy.js +71 -98
  6. package/dist/constants.d.ts +2 -5
  7. package/docs/assets/search.js +1 -1
  8. package/docs/classes/BDSNeoLegacy.html +13 -13
  9. package/docs/classes/BSNeoLegacy.html +37 -81
  10. package/docs/interfaces/DoraNeoLegacyAsset.html +7 -7
  11. package/docs/interfaces/DoraNeoLegacyAssetResponse.html +9 -9
  12. package/docs/interfaces/DoraNeoLegacyBalance.html +5 -5
  13. package/docs/interfaces/DoraNeoLegacyConsensusNode.html +3 -3
  14. package/docs/interfaces/DoraNeoLegacyDetails.html +12 -12
  15. package/docs/interfaces/DoraNeoLegacyEntriesEntity.html +8 -8
  16. package/docs/interfaces/DoraNeoLegacyNameEntity.html +3 -3
  17. package/docs/interfaces/DoraNeoLegacyScriptsEntity.html +3 -3
  18. package/docs/interfaces/DoraNeoLegacyTransaction.html +14 -14
  19. package/docs/interfaces/DoraNeoLegacyTransactionsHistory.html +6 -6
  20. package/docs/interfaces/DoraNeoLegacyUnclaimed.html +4 -4
  21. package/docs/interfaces/DoraNeoLegacyVinEntity.html +3 -3
  22. package/docs/interfaces/DoraNeoLegacyVoutEntity.html +5 -5
  23. package/docs/variables/DORA_NEO_LEGACY_ASSET.html +1 -1
  24. package/docs/variables/DORA_NEO_LEGACY_BALANCE.html +1 -1
  25. package/docs/variables/DORA_NEO_LEGACY_CONTRACT.html +1 -1
  26. package/docs/variables/DORA_NEO_LEGACY_HISTORY_TRANSACTIONS.html +1 -1
  27. package/docs/variables/DORA_NEO_LEGACY_NODES.html +1 -1
  28. package/docs/variables/DORA_NEO_LEGACY_TRANSACTION.html +1 -1
  29. package/docs/variables/DORA_NEO_LEGACY_UNCLAIMED.html +1 -1
  30. package/docs/variables/explorerNeoLegacyOption.html +1 -1
  31. package/package.json +7 -7
  32. package/src/BDSNeoLegacy.ts +0 -1
  33. package/src/BSNeoLegacy.ts +73 -73
  34. package/src/constants.ts +3 -1
  35. package/tsconfig.json +6 -1
  36. package/neo-neo-logo.png +0 -0
@@ -20,7 +20,7 @@
20
20
  <ul class="tsd-hierarchy">
21
21
  <li><span class="target">DoraNeoLegacyVinEntity</span></li></ul></section><aside class="tsd-sources">
22
22
  <ul>
23
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L60">explorer/dora/DoraResponsesNeoLegacy.ts:60</a></li></ul></aside>
23
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L60">explorer/dora/DoraResponsesNeoLegacy.ts:60</a></li></ul></aside>
24
24
  <section class="tsd-panel-group tsd-index-group">
25
25
  <section class="tsd-panel tsd-index-panel">
26
26
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -37,12 +37,12 @@
37
37
  <h3 class="tsd-anchor-link"><span>txid</span><a href="#txid" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
38
38
  <div class="tsd-signature">txid<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
39
39
  <ul>
40
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L61">explorer/dora/DoraResponsesNeoLegacy.ts:61</a></li></ul></aside></section>
40
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L61">explorer/dora/DoraResponsesNeoLegacy.ts:61</a></li></ul></aside></section>
41
41
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="vout" class="tsd-anchor"></a>
42
42
  <h3 class="tsd-anchor-link"><span>vout</span><a href="#vout" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
43
43
  <div class="tsd-signature">vout<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
44
44
  <ul>
45
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L62">explorer/dora/DoraResponsesNeoLegacy.ts:62</a></li></ul></aside></section></section></div>
45
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L62">explorer/dora/DoraResponsesNeoLegacy.ts:62</a></li></ul></aside></section></section></div>
46
46
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
47
47
  <div class="tsd-navigation settings">
48
48
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -20,7 +20,7 @@
20
20
  <ul class="tsd-hierarchy">
21
21
  <li><span class="target">DoraNeoLegacyVoutEntity</span></li></ul></section><aside class="tsd-sources">
22
22
  <ul>
23
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L64">explorer/dora/DoraResponsesNeoLegacy.ts:64</a></li></ul></aside>
23
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L64">explorer/dora/DoraResponsesNeoLegacy.ts:64</a></li></ul></aside>
24
24
  <section class="tsd-panel-group tsd-index-group">
25
25
  <section class="tsd-panel tsd-index-panel">
26
26
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -39,22 +39,22 @@
39
39
  <h3 class="tsd-anchor-link"><span>address</span><a href="#address" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
40
40
  <div class="tsd-signature">address<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
41
41
  <ul>
42
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L68">explorer/dora/DoraResponsesNeoLegacy.ts:68</a></li></ul></aside></section>
42
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L68">explorer/dora/DoraResponsesNeoLegacy.ts:68</a></li></ul></aside></section>
43
43
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="asset" class="tsd-anchor"></a>
44
44
  <h3 class="tsd-anchor-link"><span>asset</span><a href="#asset" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
45
45
  <div class="tsd-signature">asset<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
46
46
  <ul>
47
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L66">explorer/dora/DoraResponsesNeoLegacy.ts:66</a></li></ul></aside></section>
47
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L66">explorer/dora/DoraResponsesNeoLegacy.ts:66</a></li></ul></aside></section>
48
48
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="n" class="tsd-anchor"></a>
49
49
  <h3 class="tsd-anchor-link"><span>n</span><a href="#n" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
50
50
  <div class="tsd-signature">n<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
51
51
  <ul>
52
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L65">explorer/dora/DoraResponsesNeoLegacy.ts:65</a></li></ul></aside></section>
52
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L65">explorer/dora/DoraResponsesNeoLegacy.ts:65</a></li></ul></aside></section>
53
53
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="value" class="tsd-anchor"></a>
54
54
  <h3 class="tsd-anchor-link"><span>value</span><a href="#value" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
55
55
  <div class="tsd-signature">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
56
56
  <ul>
57
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L67">explorer/dora/DoraResponsesNeoLegacy.ts:67</a></li></ul></aside></section></section></div>
57
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraResponsesNeoLegacy.ts#L67">explorer/dora/DoraResponsesNeoLegacy.ts:67</a></li></ul></aside></section></section></div>
58
58
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
59
59
  <div class="tsd-navigation settings">
60
60
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -17,7 +17,7 @@
17
17
  <h1>Variable DORA_NEO_LEGACY_ASSET<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
18
18
  <div class="tsd-signature">DORA_<wbr/>NEO_<wbr/>LEGACY_<wbr/>ASSET<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;asset&quot;</span><span class="tsd-signature-symbol"> = &#39;asset&#39;</span></div><aside class="tsd-sources">
19
19
  <ul>
20
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L6">explorer/dora/DoraRoutesNeoLegacy.ts:6</a></li></ul></aside></div>
20
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L6">explorer/dora/DoraRoutesNeoLegacy.ts:6</a></li></ul></aside></div>
21
21
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
22
22
  <div class="tsd-navigation settings">
23
23
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -17,7 +17,7 @@
17
17
  <h1>Variable DORA_NEO_LEGACY_BALANCE<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
18
18
  <div class="tsd-signature">DORA_<wbr/>NEO_<wbr/>LEGACY_<wbr/>BALANCE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;balance&quot;</span><span class="tsd-signature-symbol"> = &#39;balance&#39;</span></div><aside class="tsd-sources">
19
19
  <ul>
20
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L3">explorer/dora/DoraRoutesNeoLegacy.ts:3</a></li></ul></aside></div>
20
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L3">explorer/dora/DoraRoutesNeoLegacy.ts:3</a></li></ul></aside></div>
21
21
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
22
22
  <div class="tsd-navigation settings">
23
23
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -17,7 +17,7 @@
17
17
  <h1>Variable DORA_NEO_LEGACY_CONTRACT<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
18
18
  <div class="tsd-signature">DORA_<wbr/>NEO_<wbr/>LEGACY_<wbr/>CONTRACT<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;contract&quot;</span><span class="tsd-signature-symbol"> = &#39;contract&#39;</span></div><aside class="tsd-sources">
19
19
  <ul>
20
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L4">explorer/dora/DoraRoutesNeoLegacy.ts:4</a></li></ul></aside></div>
20
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L4">explorer/dora/DoraRoutesNeoLegacy.ts:4</a></li></ul></aside></div>
21
21
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
22
22
  <div class="tsd-navigation settings">
23
23
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -17,7 +17,7 @@
17
17
  <h1>Variable DORA_NEO_LEGACY_HISTORY_TRANSACTIONS<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
18
18
  <div class="tsd-signature">DORA_<wbr/>NEO_<wbr/>LEGACY_<wbr/>HISTORY_<wbr/>TRANSACTIONS<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;get_address_abstracts&quot;</span><span class="tsd-signature-symbol"> = &#39;get_address_abstracts&#39;</span></div><aside class="tsd-sources">
19
19
  <ul>
20
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L2">explorer/dora/DoraRoutesNeoLegacy.ts:2</a></li></ul></aside></div>
20
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L2">explorer/dora/DoraRoutesNeoLegacy.ts:2</a></li></ul></aside></div>
21
21
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
22
22
  <div class="tsd-navigation settings">
23
23
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -17,7 +17,7 @@
17
17
  <h1>Variable DORA_NEO_LEGACY_NODES<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
18
18
  <div class="tsd-signature">DORA_<wbr/>NEO_<wbr/>LEGACY_<wbr/>NODES<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;get_all_nodes&quot;</span><span class="tsd-signature-symbol"> = &#39;get_all_nodes&#39;</span></div><aside class="tsd-sources">
19
19
  <ul>
20
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L1">explorer/dora/DoraRoutesNeoLegacy.ts:1</a></li></ul></aside></div>
20
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L1">explorer/dora/DoraRoutesNeoLegacy.ts:1</a></li></ul></aside></div>
21
21
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
22
22
  <div class="tsd-navigation settings">
23
23
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -17,7 +17,7 @@
17
17
  <h1>Variable DORA_NEO_LEGACY_TRANSACTION<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
18
18
  <div class="tsd-signature">DORA_<wbr/>NEO_<wbr/>LEGACY_<wbr/>TRANSACTION<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;transaction&quot;</span><span class="tsd-signature-symbol"> = &#39;transaction&#39;</span></div><aside class="tsd-sources">
19
19
  <ul>
20
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L5">explorer/dora/DoraRoutesNeoLegacy.ts:5</a></li></ul></aside></div>
20
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L5">explorer/dora/DoraRoutesNeoLegacy.ts:5</a></li></ul></aside></div>
21
21
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
22
22
  <div class="tsd-navigation settings">
23
23
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -17,7 +17,7 @@
17
17
  <h1>Variable DORA_NEO_LEGACY_UNCLAIMED<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
18
18
  <div class="tsd-signature">DORA_<wbr/>NEO_<wbr/>LEGACY_<wbr/>UNCLAIMED<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;get_unclaimed&quot;</span><span class="tsd-signature-symbol"> = &#39;get_unclaimed&#39;</span></div><aside class="tsd-sources">
19
19
  <ul>
20
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L7">explorer/dora/DoraRoutesNeoLegacy.ts:7</a></li></ul></aside></div>
20
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/dora/DoraRoutesNeoLegacy.ts#L7">explorer/dora/DoraRoutesNeoLegacy.ts:7</a></li></ul></aside></div>
21
21
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
22
22
  <div class="tsd-navigation settings">
23
23
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -22,7 +22,7 @@
22
22
  <li class="tsd-parameter">
23
23
  <h5>dora<span class="tsd-signature-symbol">: </span><a href="../classes/BDSNeoLegacy.html" class="tsd-signature-type" data-tsd-kind="Class">BDSNeoLegacy</a></h5></li></ul></div><aside class="tsd-sources">
24
24
  <ul>
25
- <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/ebc112d/packages/bs-neo-legacy/src/explorer/index.ts#L6">explorer/index.ts:6</a></li></ul></aside></div>
25
+ <li>Defined in <a href="https://github.com/CityOfZion/blockchain-services/blob/e0129c6/packages/bs-neo-legacy/src/explorer/index.ts#L6">explorer/index.ts:6</a></li></ul></aside></div>
26
26
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
27
27
  <div class="tsd-navigation settings">
28
28
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo-legacy",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Coz",
7
7
  "license": "MIT",
8
8
  "scripts": {
9
- "build": "tsc && typedoc src/index.ts"
9
+ "build": "tsc && typedoc"
10
10
  },
11
11
  "dependencies": {
12
+ "@cityofzion/blockchain-service": "0.4.0",
13
+ "@cityofzion/dora-ts": "0.0.11",
12
14
  "@cityofzion/neon-js": "^4.8.3",
13
- "@cityofzion/blockchain-service": "0.3.1",
14
- "@moonlight-io/asteroid-sdk-js": "git+https://github.com/Moonlight-io/asteroid-sdk-js",
15
- "axios": "1.3.2",
16
- "@cityofzion/dora-ts": "0.0.11"
15
+ "@cityofzion/wallet-sdk": "0.1.0",
16
+ "axios": "1.3.2"
17
17
  },
18
18
  "devDependencies": {
19
19
  "ts-node": "10.9.1",
20
20
  "typescript": "4.9.5",
21
21
  "typedoc": "0.23.24"
22
22
  }
23
- }
23
+ }
@@ -1,5 +1,4 @@
1
1
  import { BalanceResponse, BlockchainNetwork, BlockchainDataService, ConsensusNodeResponse, ContractResponse, TokenInfoResponse, TransactionHistoryResponse, TransactionResponse, TransactionTransfer, BDSClaimable, UnclaimedResponse } from '@cityofzion/blockchain-service'
2
- import { rpc } from '@cityofzion/neon-js';
3
2
  import axios from 'axios'
4
3
  import { DoraNeoLegacyEntriesEntity, DoraNeoLegacyTransaction } from './explorer/dora/DoraResponsesNeoLegacy';
5
4
  import { DORA_NEO_LEGACY_TRANSACTION } from './explorer/dora/DoraRoutesNeoLegacy';
@@ -1,23 +1,61 @@
1
- import { Account, BDSClaimable, BlockchainDataService, BlockchainService, CalculateTransferFeeDetails, CalculateTransferFeeResponse, ClaimResponse, Claimable, Exchange, IntentTransactionParam, SendTransactionParam, Token } from '@cityofzion/blockchain-service'
2
- import * as AsteroidSDK from '@moonlight-io/asteroid-sdk-js'
1
+ import { Account, BDSClaimable, BlockchainDataService, BlockchainService, CalculateTransferFeeDetails, CalculateTransferFeeResponse, ClaimResponse, Claimable, Exchange, IntentTransactionParam, SendTransactionParam, Token, TokenInfo } from '@cityofzion/blockchain-service'
3
2
  import { api, sc, u, wallet } from '@cityofzion/neon-js'
4
3
  import { explorerNeoLegacyOption } from './explorer'
5
4
  import { nativeAssetsNeoLegacy, unclaimedTokenNeoLegacy } from './constants'
6
- const [gasToken, neoToken] = nativeAssetsNeoLegacy
5
+ const [, neoToken] = nativeAssetsNeoLegacy
7
6
  import tokens from './asset/tokens.json'
7
+ import { BIP39Encoded } from '@cityofzion/wallet-sdk'
8
+
8
9
  export class BSNeoLegacy<BSCustomName extends string = string> implements BlockchainService, Claimable {
9
10
  dataService: BlockchainDataService & BDSClaimable = explorerNeoLegacyOption.dora
10
11
  blockchainName: BSCustomName;
11
- derivationPath: string = "m/44'/888'/0'/0/?"
12
- feeToken: { hash: string; symbol: string; decimals: number; };
12
+ feeToken: TokenInfo;
13
13
  exchange: Exchange;
14
- tokenClaim: { hash: string; symbol: string; decimals: number } = neoToken
14
+ tokenClaim: TokenInfo = neoToken
15
15
  tokens: Token[] = tokens
16
- private keychain = new AsteroidSDK.Keychain()
17
- private nativeAssets: { symbol: string; hash: string; decimals: number }[] = nativeAssetsNeoLegacy
16
+
17
+ private nativeAssets: TokenInfo[] = nativeAssetsNeoLegacy
18
+ private derivationPath: string = "m/44'/888'/0'/0/?"
19
+
18
20
  constructor(blockchainName: BSCustomName) {
19
21
  this.blockchainName = blockchainName
20
22
  }
23
+ validateAddress(address: string): boolean {
24
+ return wallet.isAddress(address)
25
+ }
26
+ validateEncryptedKey(encryptedKey: string): boolean {
27
+ return wallet.isNEP2(encryptedKey)
28
+ }
29
+ validateWif(wif: string): boolean {
30
+ return wallet.isWIF(wif)
31
+ }
32
+ generateMnemonic(): string[] {
33
+ const bip39 = new BIP39Encoded()
34
+ const {phonetic} = bip39.generateMnemonic({length: 12})
35
+ if (!phonetic) throw new Error("Failed to generate mnemonic");
36
+ return phonetic
37
+ }
38
+ generateAccount(mnemonic: string[], index: number): Account {
39
+ const bip39 = new BIP39Encoded({ mnemonic })
40
+ const keychain = bip39.getKeychain('neo')
41
+ const childKey = keychain.generateChildKey(this.derivationPath.replace('?', index.toString()))
42
+ const wif = childKey.getWIF()
43
+ const { address } = new wallet.Account(wif)
44
+ return { address, wif }
45
+ }
46
+ generateAccountFromWif(wif: string): Account {
47
+ const { address } = new wallet.Account(wif)
48
+ return { address, wif }
49
+ }
50
+ async decryptKey(encryptedKey: string, password: string): Promise<Account> {
51
+ const wif = await wallet.decrypt(encryptedKey, password)
52
+ const { address } = new wallet.Account(wif)
53
+ const result: { wif: string; address: string; } = { address, wif }
54
+ return result
55
+ }
56
+ calculateTransferFee(): Promise<CalculateTransferFeeResponse> {
57
+ throw new Error(`Doesn't have fee to make a transaction on ${this.blockchainName}`);
58
+ }
21
59
  async sendTransaction(param: SendTransactionParam): Promise<string> {
22
60
  const url = (await this.dataService.getHigherNode()).url
23
61
  const apiProvider = new api.neoscan.instance("MainNet")
@@ -57,6 +95,33 @@ export class BSNeoLegacy<BSCustomName extends string = string> implements Blockc
57
95
  if (!result.tx) throw new Error("Failed to send transaction");
58
96
  return result.tx.hash
59
97
  }
98
+ //Implementation Claim interface
99
+ async claim(account: Account): Promise<ClaimResponse> {
100
+ const neoAccount = new wallet.Account(account.wif)
101
+ const balances = await this.dataService.getBalance(account.address)
102
+ const neoBalance = balances.find(balance => balance.symbol === 'NEO')
103
+ const apiProvider = new api.neoscan.instance("MainNet")
104
+ const neoNativeAsset = this.nativeAssets.find(nativeAsset => nativeAsset.symbol === neoBalance?.symbol)
105
+ if (!neoNativeAsset || !neoBalance) throw new Error("Neo it's necessary to do a claim");
106
+ const hasClaim = await this.dataService.getUnclaimed(account.address)
107
+ if (hasClaim.unclaimed <= 0) throw new Error(`Doesn't have gas to claim`);
108
+ const url = (await this.dataService.getHigherNode()).url
109
+ const claims = await api.neoCli.getClaims(url, account.address)
110
+ const claimGasResponse = await api.claimGas({
111
+ claims,
112
+ api: apiProvider,
113
+ account: neoAccount,
114
+ url
115
+ })
116
+
117
+ const result: { txid: string; symbol: string; hash: string } = {
118
+ txid: claimGasResponse.response.txid,
119
+ hash: unclaimedTokenNeoLegacy.hash,
120
+ symbol: unclaimedTokenNeoLegacy.symbol
121
+ }
122
+
123
+ return result
124
+ }
60
125
  private buildNativeTransaction(transactionIntents: IntentTransactionParam[]) {
61
126
  let intents: ReturnType<typeof api.makeIntent> = []
62
127
  transactionIntents.forEach(transaction => {
@@ -94,69 +159,4 @@ export class BSNeoLegacy<BSCustomName extends string = string> implements Blockc
94
159
  private isNativeTransaction(transactionParam: IntentTransactionParam) {
95
160
  return this.nativeAssets.some(asset => asset.hash === transactionParam.tokenHash)
96
161
  }
97
- generateMnemonic(): string {
98
- this.keychain.generateMnemonic(128)
99
- const list = this.keychain.mnemonic?.toString()
100
- if (!list) throw new Error("Failed to generate mnemonic");
101
- return list
102
- }
103
- generateWif(mnemonic: string, index: number): string {
104
- this.keychain.importMnemonic(mnemonic)
105
- const childKey = this.keychain.generateChildKey('neo', this.derivationPath.replace('?', index.toString()))
106
- return childKey.getWIF()
107
- }
108
- generateAccount(mnemonic: string, index: number): Account {
109
- const wif = this.generateWif(mnemonic, index)
110
- const { address } = new wallet.Account(wif)
111
- const result: { wif: string; address: string; } = { address, wif }
112
- return result
113
- }
114
- generateAccountFromWif(wif: string): string {
115
- return new wallet.Account(wif).address
116
- }
117
- async decryptKey(encryptedKey: string, password: string): Promise<Account> {
118
- const wif = await wallet.decrypt(encryptedKey, password)
119
- const { address } = new wallet.Account(wif)
120
- const result: { wif: string; address: string; } = { address, wif }
121
- return result
122
- }
123
- validateAddress(address: string): boolean {
124
- return wallet.isAddress(address)
125
- }
126
- validateEncryptedKey(encryptedKey: string): boolean {
127
- return wallet.isNEP2(encryptedKey)
128
- }
129
- validateWif(wif: string): boolean {
130
- return wallet.isWIF(wif)
131
- }
132
- calculateTransferFee(): Promise<CalculateTransferFeeResponse> {
133
- throw new Error(`Doesn't have fee to make a transaction on ${this.blockchainName}`);
134
- }
135
- //Implementation Claim interface
136
- async claim(account: Account): Promise<ClaimResponse> {
137
- const neoAccount = new wallet.Account(account.wif)
138
- const balances = await this.dataService.getBalance(account.address)
139
- const neoBalance = balances.find(balance => balance.symbol === 'NEO')
140
- const apiProvider = new api.neoscan.instance("MainNet")
141
- const neoNativeAsset = this.nativeAssets.find(nativeAsset => nativeAsset.symbol === neoBalance?.symbol)
142
- if (!neoNativeAsset || !neoBalance) throw new Error("Neo it's necessary to do a claim");
143
- const hasClaim = await this.dataService.getUnclaimed(account.address)
144
- if (hasClaim.unclaimed <= 0) throw new Error(`Doesn't have gas to claim`);
145
- const url = (await this.dataService.getHigherNode()).url
146
- const claims = await api.neoCli.getClaims(url, account.address)
147
- const claimGasResponse = await api.claimGas({
148
- claims,
149
- api: apiProvider,
150
- account: neoAccount,
151
- url
152
- })
153
-
154
- const result: { txid: string; symbol: string; hash: string } = {
155
- txid: claimGasResponse.response.txid,
156
- hash: unclaimedTokenNeoLegacy.hash,
157
- symbol: unclaimedTokenNeoLegacy.symbol
158
- }
159
-
160
- return result
161
- }
162
162
  }
package/src/constants.ts CHANGED
@@ -1,10 +1,12 @@
1
+ import { TokenInfo } from "@cityofzion/blockchain-service"
2
+
1
3
  export const unclaimedTokenNeoLegacy = {
2
4
  symbol: 'GAS',
3
5
  name: 'GAS',
4
6
  hash: '0x602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7'
5
7
  }
6
8
 
7
- export const nativeAssetsNeoLegacy: { symbol: string; hash: string; decimals: number }[] = [
9
+ export const nativeAssetsNeoLegacy: TokenInfo[] = [
8
10
  {
9
11
  decimals: 8,
10
12
  symbol: 'GAS',
package/tsconfig.json CHANGED
@@ -9,5 +9,10 @@
9
9
  ],
10
10
  "exclude": [
11
11
  "node_modules"
12
- ]
12
+ ],
13
+ "typedocOptions": {
14
+ "entryPoints": ["./src/index.ts"],
15
+ "out": "docs",
16
+ "exclude": "**/node_modules/**"
17
+ }
13
18
  }
package/neo-neo-logo.png DELETED
Binary file