Skip to content

gln-dev/documentasy_greenline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

documentasy_greenline

<!doctype html>

<title>Greenline Documentation</title> <style> .highlight table td { padding: 5px; } .highlight table pre { margin: 0; } .highlight, .highlight .w { color: #f8f8f2; background-color: #272822; } .highlight .err { color: #272822; background-color: #f92672; } .highlight .c, .highlight .cd, .highlight .cm, .highlight .c1, .highlight .cs { color: #75715e; } .highlight .cp { color: #f4bf75; } .highlight .nt { color: #f4bf75; } .highlight .o, .highlight .ow { color: #f8f8f2; } .highlight .p, .highlight .pi { color: #f8f8f2; } .highlight .gi { color: #a6e22e; } .highlight .gd { color: #f92672; } .highlight .gh { color: #66d9ef; background-color: #272822; font-weight: bold; } .highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv { color: #ae81ff; } .highlight .kc { color: #fd971f; } .highlight .kt { color: #fd971f; } .highlight .kd { color: #fd971f; } .highlight .s, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 { color: #a6e22e; } .highlight .sr { color: #a1efe4; } .highlight .si { color: #cc6633; } .highlight .se { color: #cc6633; } .highlight .nn { color: #f4bf75; } .highlight .nc { color: #f4bf75; } .highlight .no { color: #f4bf75; } .highlight .na { color: #66d9ef; } .highlight .m, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mb, .highlight .mx { color: #a6e22e; } .highlight .ss { color: #a6e22e; } #myBtn { display: none; position: fixed; bottom: 20px; right: 30px; z-index: 99; font-size: 18px; border: none; outline: none; background-color: #555; color: white; cursor: pointer; padding: 15px; border-radius: 4px; }

#myBtn:hover { background-color: #FF8C00; } </style>

</div>

<div id="column1" data-id="documentation" class="interior" >
  <header>
    <h1>Greenline Documentation</h1>
    
    <div id="gtoc">
      <ul>
      </ul>
    </div>
    <hr>
  </header>

  <div id="toc" >

  </div>
  <a href="javascript:"  onclick="topFunction()" id="myBtn" title="Go to top"><i class="fa fa-hand-o-up" aria-hidden="true"></i></a>

  <div id="Introduction">
    <h1>introduction<span><a class="mark" href="#documentation_about_this_documentation" id="documentation_about_this_documentation"></a></span></h1>

Welcome to Greenline. Greenline is a simple,accessed over HTTP or HTTPS from the dev.greenline.ai domain.

Integration

1. Develop (make) modul interface on your system (member) that contains of sender functions transaction request to environment development system greenline.ai based on spesification.

Development

We dedicate this environmental development to ease you doing integration modul your H2H system to greenline.ai.

In this phase, please make an interface modul on your system (member) who has to send the request to URL API in greenline.ai which appropriates with the spesification.

API Referention

Please use message format which is convenient for your (member), there is some format that is available, such as : JSON.

        <p>You can check your current limits and usage via a POST on the following endpoint, outside of our normal coin/chain pattern:</p>

        <p> Generally, in the option JSON format , every transaction request is sent through HTTPS protocol <code style="background-color: green" class="prettyprint">HTTPS</code> to target URL API greenline.ai with condition: </p>

        <ol>
        <li>header <code style="background-color: green">Content-Type: application/json</code>  to JSON format.</li>
        <li>contains to contents request according to API greenline.ai spesification.</li>
        <li>And set <code style="background-color: green">Authorization: Bearer $api_token</code>.</li>
        </ol>
        <h3 id="target-url-api-development">Target URL API Development</h3>

        <table><thead>
        <tr>
        <th>Format</th>
        <th>Target URL</th>
        </tr>
        </thead><tbody>
        <tr>
        <td>JSON</td>
        <td><code class="prettyprint">POST https://www.greenline.ai/api</code></td>
        </tr>
        </tbody></table>

Make Transaction

Making the latest transaction.
first you need to provide the input password, wallet, and amount.

Make Transaction Request

    curl https://www.greenline.ai/api/transac
    {
      "password": "YOUR_PASSWORD",
      "address": "MEMBER_ADDRESS",
      "amount": "MEMBER_AMOUNT",
    }
    

Request Parameters

          </tbody></table>

Make Transaction Response

{
  "success": "true",
  "data":{
  "message": "Your transaction has ben success",
  "balance": "0.000000000",
  "block":{
  "hash": "e1ec83047d0beb49ba9e2f480f206386869e81dbf461ee1c15bc7592e003453a",
  "sender_id": "5a16c59a402c5a04a84ea3be",
  "receiver_id": "5aa8b74e402c5a4ebf2cf2a2",
  "data": "5fd85baed63db0722d44d7063bbc154daedc38ee304e22cc23fe3bacffe9ca6a",
  "value": "1.0000000000",
  "created_at": "2018-05-01 11:20:17",
  "_id": "5ae83151402c5a17653f06e3"
}}
}


Create Wallet

Create Wallet Request

curl https://www.greenline.ai/api/new
{ "password": "YOUR_PASSWORD" }

Parameters Request

Parameters Value Description
password YOUR_PASSWORD your password
address MEMBER_ADDRESS member address.
amount MEMBER_AMOUNT amount member.
Parameters Value Description
password YOUR_PASSWORD your password

Create Wallet Response

curl https://www.greenline.ai/api/new
{
"success": "true",
"data":{
"message": "Account created", "detail":{
"wallet":"SYrOykTM6LEL3jhCxQEXrqXMO8lhVMicoYu9owGp46YLn8PaGVNOTB5ekz54pxPGk6VAgkX9cGiYR", "balance":"0", "secret_key":"645716fb88007616783d818c9b2a7d616fc97154932757357e3e79a70363c5ee673ffce2d4453fd3de8e817eb7aa86d9b79339e850aa35c26e387c427e183485", "id":"5ae825d8402c5a230812ea73", "token":"010fa85d20fa4e586254c9a386a57a9f2ce1937ae904d22f7865aa5f09aea7626de2b22897ada7f5e4843ecdee0135281733807686dd8b3bad7efeae4e3cabd3"} } }
      <h2 id="Check-Balance">Check Balance</h2>

Check Balance Request

curl https://www.greenline.ai/api/balance
{
  "password": "YOUR_PASSWORD",
  "key": "YOUR_SECRET_KEY"
}

Parameters Request

          </tbody></table>

Check Balance Response

curl https://www.greenline.ai/api/new
{
"success": "true",
"data":{
"message": "Account created", "detail":{
"wallet":"SYrOykTM6LEL3jhCxQEXrqXMO8lhVMicoYu9owGp46YLn8PaGVNOTB5ekz54pxPGk6VAgkX9cGiYR", "balance":"0", "secret_key":"645716fb88007616783d818c9b2a7d616fc97154932757357e3e79a70363c5ee673ffce2d4453fd3de8e817eb7aa86d9b79339e850aa35c26e387c427e183485", "id":"5ae825d8402c5a230812ea73", "token":"010fa85d20fa4e586254c9a386a57a9f2ce1937ae904d22f7865aa5f09aea7626de2b22897ada7f5e4843ecdee0135281733807686dd8b3bad7efeae4e3cabd3"} }

Response Code

Response Code is a respond code that is given by greenline.ai system as status from every transaction request which is sent by member system (CA).

Based on the outline, the following are response code less:

Parameters Value Description
password YOUR_PASSWORD your password
key SECRET_KEY your key
Status Code Description
200 Your transaction has been success
200 Account created
500 Unauthenticated
500 The given data was invalid.
200 Something wrong.
405 method not allowed.
404 page not found.
The list of code response can change along with the increase of product scope which is supported by greenline.ai.
  </div>
</div>
<script src="assets/sh_main.js"></script> <script src="assets/sh_javascript.min.js"></script> <script>highlight(undefined, undefined, 'pre');</script>
<script src="assets/dnt_helper.js"></script>
<script>
  if (!_dntEnabled()) {
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;
    i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},
    i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];
    a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,
    'script','//www.google-analytics.com/analytics.js','ga');
    ga('create', 'UA-67020396-1', 'auto');
    ga('send', 'pageview');
  }

</script>
<script>

// When the user scrolls down 20px from the top of the document, show the button window.onscroll = function() {scrollFunction()};

function scrollFunction() { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { document.getElementById("myBtn").style.display = "block"; } else { document.getElementById("myBtn").style.display = "none"; } }

// When the user clicks on the button, scroll to the top of the document function topFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; } </script>

<script> var slideIndex = 1; showSlides(slideIndex); function plusSlides(n) { showSlides(slideIndex += n); } function currentSlide(n) { showSlides(slideIndex = n); } function showSlides(n) { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("dot"); if (n > slides.length) {slideIndex = 1} if (n < 1) {slideIndex = slides.length} for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } slides[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " active"; } </script>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published