@cityofzion/bs-neo-legacy 0.3.2 → 0.4.1

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 (35) hide show
  1. package/bs-neo-legacy.build.error.log +82 -2
  2. package/bs-neo-legacy.build.log +84 -3
  3. package/dist/BSNeoLegacy.d.ts +13 -23
  4. package/dist/BSNeoLegacy.js +69 -98
  5. package/dist/constants.d.ts +2 -5
  6. package/docs/assets/search.js +1 -1
  7. package/docs/classes/BDSNeoLegacy.html +13 -13
  8. package/docs/classes/BSNeoLegacy.html +37 -81
  9. package/docs/interfaces/DoraNeoLegacyAsset.html +7 -7
  10. package/docs/interfaces/DoraNeoLegacyAssetResponse.html +9 -9
  11. package/docs/interfaces/DoraNeoLegacyBalance.html +5 -5
  12. package/docs/interfaces/DoraNeoLegacyConsensusNode.html +3 -3
  13. package/docs/interfaces/DoraNeoLegacyDetails.html +12 -12
  14. package/docs/interfaces/DoraNeoLegacyEntriesEntity.html +8 -8
  15. package/docs/interfaces/DoraNeoLegacyNameEntity.html +3 -3
  16. package/docs/interfaces/DoraNeoLegacyScriptsEntity.html +3 -3
  17. package/docs/interfaces/DoraNeoLegacyTransaction.html +14 -14
  18. package/docs/interfaces/DoraNeoLegacyTransactionsHistory.html +6 -6
  19. package/docs/interfaces/DoraNeoLegacyUnclaimed.html +4 -4
  20. package/docs/interfaces/DoraNeoLegacyVinEntity.html +3 -3
  21. package/docs/interfaces/DoraNeoLegacyVoutEntity.html +5 -5
  22. package/docs/variables/DORA_NEO_LEGACY_ASSET.html +1 -1
  23. package/docs/variables/DORA_NEO_LEGACY_BALANCE.html +1 -1
  24. package/docs/variables/DORA_NEO_LEGACY_CONTRACT.html +1 -1
  25. package/docs/variables/DORA_NEO_LEGACY_HISTORY_TRANSACTIONS.html +1 -1
  26. package/docs/variables/DORA_NEO_LEGACY_NODES.html +1 -1
  27. package/docs/variables/DORA_NEO_LEGACY_TRANSACTION.html +1 -1
  28. package/docs/variables/DORA_NEO_LEGACY_UNCLAIMED.html +1 -1
  29. package/docs/variables/explorerNeoLegacyOption.html +1 -1
  30. package/package.json +6 -7
  31. package/src/BDSNeoLegacy.ts +0 -1
  32. package/src/BSNeoLegacy.ts +70 -73
  33. package/src/constants.ts +3 -1
  34. package/tsconfig.json +6 -1
  35. 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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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/2405a87/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/3eb2742/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,22 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo-legacy",
3
- "version": "0.3.2",
3
+ "version": "0.4.1",
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.1",
13
+ "@cityofzion/dora-ts": "0.0.11",
12
14
  "@cityofzion/neon-js": "^4.8.3",
13
- "@cityofzion/blockchain-service": "0.3.2",
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
+ "axios": "1.3.2"
17
16
  },
18
17
  "devDependencies": {
19
18
  "ts-node": "10.9.1",
20
19
  "typescript": "4.9.5",
21
20
  "typedoc": "0.23.24"
22
21
  }
23
- }
22
+ }
@@ -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,58 @@
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, keychain, BDSClaimable, BlockchainDataService, BlockchainService, 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
+
8
8
  export class BSNeoLegacy<BSCustomName extends string = string> implements BlockchainService, Claimable {
9
9
  dataService: BlockchainDataService & BDSClaimable = explorerNeoLegacyOption.dora
10
10
  blockchainName: BSCustomName;
11
- derivationPath: string = "m/44'/888'/0'/0/?"
12
- feeToken: { hash: string; symbol: string; decimals: number; };
11
+ feeToken: TokenInfo;
13
12
  exchange: Exchange;
14
- tokenClaim: { hash: string; symbol: string; decimals: number } = neoToken
13
+ tokenClaim: TokenInfo = neoToken
15
14
  tokens: Token[] = tokens
16
- private keychain = new AsteroidSDK.Keychain()
17
- private nativeAssets: { symbol: string; hash: string; decimals: number }[] = nativeAssetsNeoLegacy
15
+
16
+ private nativeAssets: TokenInfo[] = nativeAssetsNeoLegacy
17
+ private derivationPath: string = "m/44'/888'/0'/0/?"
18
+
18
19
  constructor(blockchainName: BSCustomName) {
19
20
  this.blockchainName = blockchainName
20
21
  }
22
+ validateAddress(address: string): boolean {
23
+ return wallet.isAddress(address)
24
+ }
25
+ validateEncryptedKey(encryptedKey: string): boolean {
26
+ return wallet.isNEP2(encryptedKey)
27
+ }
28
+ validateWif(wif: string): boolean {
29
+ return wallet.isWIF(wif)
30
+ }
31
+ generateMnemonic(): string[] {
32
+ keychain.generateMnemonic(128)
33
+ if (!keychain.mnemonic) throw new Error("Failed to generate mnemonic")
34
+ return keychain.mnemonic.toString().split(' ')
35
+ }
36
+ generateAccount(mnemonic: string[], index: number): Account {
37
+ keychain.importMnemonic(mnemonic.join(' '))
38
+ const childKey = keychain.generateChildKey("neo", this.derivationPath.replace('?', index.toString()))
39
+ const wif = childKey.getWIF()
40
+ const { address } = new wallet.Account(wif)
41
+ return { address, wif }
42
+ }
43
+ generateAccountFromWif(wif: string): Account {
44
+ const { address } = new wallet.Account(wif)
45
+ return { address, wif }
46
+ }
47
+ async decryptKey(encryptedKey: string, password: string): Promise<Account> {
48
+ const wif = await wallet.decrypt(encryptedKey, password)
49
+ const { address } = new wallet.Account(wif)
50
+ const result: { wif: string; address: string; } = { address, wif }
51
+ return result
52
+ }
53
+ calculateTransferFee(): Promise<CalculateTransferFeeResponse> {
54
+ throw new Error(`Doesn't have fee to make a transaction on ${this.blockchainName}`);
55
+ }
21
56
  async sendTransaction(param: SendTransactionParam): Promise<string> {
22
57
  const url = (await this.dataService.getHigherNode()).url
23
58
  const apiProvider = new api.neoscan.instance("MainNet")
@@ -57,6 +92,33 @@ export class BSNeoLegacy<BSCustomName extends string = string> implements Blockc
57
92
  if (!result.tx) throw new Error("Failed to send transaction");
58
93
  return result.tx.hash
59
94
  }
95
+ //Implementation Claim interface
96
+ async claim(account: Account): Promise<ClaimResponse> {
97
+ const neoAccount = new wallet.Account(account.wif)
98
+ const balances = await this.dataService.getBalance(account.address)
99
+ const neoBalance = balances.find(balance => balance.symbol === 'NEO')
100
+ const apiProvider = new api.neoscan.instance("MainNet")
101
+ const neoNativeAsset = this.nativeAssets.find(nativeAsset => nativeAsset.symbol === neoBalance?.symbol)
102
+ if (!neoNativeAsset || !neoBalance) throw new Error("Neo it's necessary to do a claim");
103
+ const hasClaim = await this.dataService.getUnclaimed(account.address)
104
+ if (hasClaim.unclaimed <= 0) throw new Error(`Doesn't have gas to claim`);
105
+ const url = (await this.dataService.getHigherNode()).url
106
+ const claims = await api.neoCli.getClaims(url, account.address)
107
+ const claimGasResponse = await api.claimGas({
108
+ claims,
109
+ api: apiProvider,
110
+ account: neoAccount,
111
+ url
112
+ })
113
+
114
+ const result: { txid: string; symbol: string; hash: string } = {
115
+ txid: claimGasResponse.response.txid,
116
+ hash: unclaimedTokenNeoLegacy.hash,
117
+ symbol: unclaimedTokenNeoLegacy.symbol
118
+ }
119
+
120
+ return result
121
+ }
60
122
  private buildNativeTransaction(transactionIntents: IntentTransactionParam[]) {
61
123
  let intents: ReturnType<typeof api.makeIntent> = []
62
124
  transactionIntents.forEach(transaction => {
@@ -94,69 +156,4 @@ export class BSNeoLegacy<BSCustomName extends string = string> implements Blockc
94
156
  private isNativeTransaction(transactionParam: IntentTransactionParam) {
95
157
  return this.nativeAssets.some(asset => asset.hash === transactionParam.tokenHash)
96
158
  }
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
159
  }
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