diff options
| author | Adam Soltys <[email protected]> | 2023-01-25 23:01:55 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-25 23:01:55 -0800 |
| commit | f1b3efe88204ba203667a8dd67ac8ab598af1959 (patch) | |
| tree | 071975ffa4c30f81a7a25b78b4cfd5f85fdf7ea5 /src/routes/(static) | |
| parent | 2a18749cb9b08726dedf0cfb63971305e50a910a (diff) | |
| download | coinos-ui-f1b3efe88204ba203667a8dd67ac8ab598af1959.tar.gz coinos-ui-f1b3efe88204ba203667a8dd67ac8ab598af1959.zip | |
sveltekit 1.0
Diffstat (limited to 'src/routes/(static)')
| -rw-r--r-- | src/routes/(static)/docs/+page.svelte | 153 | ||||
| -rw-r--r-- | src/routes/(static)/news/+page.svelte | 115 |
2 files changed, 77 insertions, 191 deletions
diff --git a/src/routes/(static)/docs/+page.svelte b/src/routes/(static)/docs/+page.svelte index 0e11decb..c634cd76 100644 --- a/src/routes/(static)/docs/+page.svelte +++ b/src/routes/(static)/docs/+page.svelte @@ -1,76 +1,77 @@ -<h1>API Examples</h1> -<pre><code class="whitespace-pre-wrap" - >{` -api="https://coinos.io/api" -json="Content-Type: application/json" - -username=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) -password="pw" - -echo Create user $username with password $password -curl -s "$api/register" -H "$json" -d '{"user": {"username": "'$username'", "password": "'$password'", "confirm": "'$password'"}}' > /dev/null -echo "" - -echo Login and get an API token -token=$(curl -s "$api/taboggan" -H "$json" -d '{"username": "'$username'", "password": "'$password'"}' | jq -r .token) -echo $token -echo "" - -username="apidemo" -token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFwaWRlbW8iLCJpYXQiOjE2NDAxMzIwNjd9.aBtcrnLjDS_Zixn5_X_N8sqX0KxTDrVySSqh1fa96rk" -auth="Authorization: Bearer $token" - -echo Get account balance in satoshis -curl -s "$api/me" -H "$json" -H "$auth" | jq '.account.balance' -echo "" - -echo Get the current price of bitcoin in USD -curl -s "$api/rates" -H "$json" | jq '.USD' -echo "" - -echo Create a legacy Bitcoin address -address=$(curl -s "$api/address?network=bitcoin&type=legacy" -H "$auth" -H "$json" | jq -r .address) -echo $address -echo "" - -echo Create an invoice to associate the address with the user -curl -s "$api/invoice" -H "$json" -d '{"invoice": {"address": "'$address'", "network": "bitcoin"}, "user": {"username": "'$username'"}}' > /dev/null -echo "" - -msg="testingtesting123" -echo Sign a message with the address: $msg $address -curl -s "$api/signMessage" -H "$json" -H "$auth" -d '{"address": "'$address'", "message": "'$msg'"}' -echo "" - -echo Create a bech32 Bitcoin address -address=$(curl -s "$api/address?network=bitcoin&type=bech32" -H "$auth" -H "$json" | jq -r .address) -echo $address -echo "" - -echo Create a lightning invoice -text=$(curl -s "$api/lightning/invoice" -H "$auth" -H "$json" -d '{"amount": 100}') -echo $text -echo "" - -echo Associate the lightning invoice with the user -curl -s "$api/invoice" -H "$json" -d '{"invoice": {"text": "'$text'", "network": "bitcoin"}, "user": {"username": "'$username'"}}' > /dev/null -echo "" - -echo Get an external invoice -payreq=$(curl -s https://legend.lnbits.com/api/v1/payments -H "$json" -H "x-api-key: 698e5b6744f8442880ba3ad630756c02" -d '{ "out": false, "amount": 50, "memo": "test", "unit": "sat", "lnurl_callback": null }' | jq -r .payment_request) -echo $payreq -echo "" - -echo Send a lightning payment -curl -s "$api/lightning/send" -H "$json" -H "$auth" -d '{"payreq": "'$payreq'"}' | jq -r '{ amount, fee, balance: (.account.balance)}' -echo "" - -echo Send a bitcoin payment -tx=$(curl -s "$api/bitcoin/fee" -H "$json" -H "$auth" -d '{"address": "bc1qqc9azhdjjpdxenrndt8cw4tw9del5pyrjn0wln", "amount": 1200, "feeRate": 1000 }') -hex=$(echo $tx | jq -r .tx.hex) -fee=$(echo $tx | jq -r .tx.fee) - -curl -s "$api/bitcoin/send" -H "$json" -H "$auth" -d '{"address": "bc1qqc9azhdjjpdxenrndt8cw4tw9del5pyrjn0wln", "tx": { "hex": "'$hex'", "fee": "'$fee'" }}' | jq -r '{ amount, fee, balance: (.account.balance)}' -echo "" -`}</code - ></pre> +Coming soon +<!-- <h1>API Examples</h1> --> +<!-- <pre><code class="whitespace-pre-wrap" --> +<!-- >{` --> +<!-- api="https://coinos.io/api" --> +<!-- json="Content-Type: application/json" --> +<!-- --> +<!-- username=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) --> +<!-- password="pw" --> +<!-- --> +<!-- echo Create user $username with password $password --> +<!-- curl -s "$api/register" -H "$json" -d '{"user": {"username": "'$username'", "password": "'$password'", "confirm": "'$password'"}}' > /dev/null --> +<!-- echo "" --> +<!-- --> +<!-- echo Login and get an API token --> +<!-- token=$(curl -s "$api/taboggan" -H "$json" -d '{"username": "'$username'", "password": "'$password'"}' | jq -r .token) --> +<!-- echo $token --> +<!-- echo "" --> +<!-- --> +<!-- username="apidemo" --> +<!-- token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFwaWRlbW8iLCJpYXQiOjE2NDAxMzIwNjd9.aBtcrnLjDS_Zixn5_X_N8sqX0KxTDrVySSqh1fa96rk" --> +<!-- auth="Authorization: Bearer $token" --> +<!-- --> +<!-- echo Get account balance in satoshis --> +<!-- curl -s "$api/me" -H "$json" -H "$auth" | jq '.account.balance' --> +<!-- echo "" --> +<!-- --> +<!-- echo Get the current price of bitcoin in USD --> +<!-- curl -s "$api/rates" -H "$json" | jq '.USD' --> +<!-- echo "" --> +<!-- --> +<!-- echo Create a legacy Bitcoin address --> +<!-- address=$(curl -s "$api/address?network=bitcoin&type=legacy" -H "$auth" -H "$json" | jq -r .address) --> +<!-- echo $address --> +<!-- echo "" --> +<!-- --> +<!-- echo Create an invoice to associate the address with the user --> +<!-- curl -s "$api/invoice" -H "$json" -d '{"invoice": {"address": "'$address'", "network": "bitcoin"}, "user": {"username": "'$username'"}}' > /dev/null --> +<!-- echo "" --> +<!-- --> +<!-- msg="testingtesting123" --> +<!-- echo Sign a message with the address: $msg $address --> +<!-- curl -s "$api/signMessage" -H "$json" -H "$auth" -d '{"address": "'$address'", "message": "'$msg'"}' --> +<!-- echo "" --> +<!-- --> +<!-- echo Create a bech32 Bitcoin address --> +<!-- address=$(curl -s "$api/address?network=bitcoin&type=bech32" -H "$auth" -H "$json" | jq -r .address) --> +<!-- echo $address --> +<!-- echo "" --> +<!-- --> +<!-- echo Create a lightning invoice --> +<!-- text=$(curl -s "$api/lightning/invoice" -H "$auth" -H "$json" -d '{"amount": 100}') --> +<!-- echo $text --> +<!-- echo "" --> +<!-- --> +<!-- echo Associate the lightning invoice with the user --> +<!-- curl -s "$api/invoice" -H "$json" -d '{"invoice": {"text": "'$text'", "network": "bitcoin"}, "user": {"username": "'$username'"}}' > /dev/null --> +<!-- echo "" --> +<!-- --> +<!-- echo Get an external invoice --> +<!-- payreq=$(curl -s https://legend.lnbits.com/api/v1/payments -H "$json" -H "x-api-key: 698e5b6744f8442880ba3ad630756c02" -d '{ "out": false, "amount": 50, "memo": "test", "unit": "sat", "lnurl_callback": null }' | jq -r .payment_request) --> +<!-- echo $payreq --> +<!-- echo "" --> +<!-- --> +<!-- echo Send a lightning payment --> +<!-- curl -s "$api/lightning/send" -H "$json" -H "$auth" -d '{"payreq": "'$payreq'"}' | jq -r '{ amount, fee, balance: (.account.balance)}' --> +<!-- echo "" --> +<!-- --> +<!-- echo Send a bitcoin payment --> +<!-- tx=$(curl -s "$api/bitcoin/fee" -H "$json" -H "$auth" -d '{"address": "bc1qqc9azhdjjpdxenrndt8cw4tw9del5pyrjn0wln", "amount": 1200, "feeRate": 1000 }') --> +<!-- hex=$(echo $tx | jq -r .tx.hex) --> +<!-- fee=$(echo $tx | jq -r .tx.fee) --> +<!-- --> +<!-- curl -s "$api/bitcoin/send" -H "$json" -H "$auth" -d '{"address": "bc1qqc9azhdjjpdxenrndt8cw4tw9del5pyrjn0wln", "tx": { "hex": "'$hex'", "fee": "'$fee'" }}' | jq -r '{ amount, fee, balance: (.account.balance)}' --> +<!-- echo "" --> +<!-- `}</code --> +<!-- ></pre> --> diff --git a/src/routes/(static)/news/+page.svelte b/src/routes/(static)/news/+page.svelte deleted file mode 100644 index 7eb1b7d9..00000000 --- a/src/routes/(static)/news/+page.svelte +++ /dev/null @@ -1,115 +0,0 @@ -<script> - import { Icon, Footer, Check, Quote } from '$comp'; - import { t } from '$lib/translations'; -</script> - -<a href="/"> - <Icon icon="logo" style="mx-auto mt-10" /> -</a> -<div class="w-11/12 md:w-3/4 lg:w-1/2 2xl:w-1/3 max-w-3xl mx-auto my-20 space-y-5"> - <h1 class="text-5xl font-medium">{$t('news.header')}</h1> - - <h2 class="text-2xl font-medium">{$t('news.subheader')}</h2> - - <p class="text-xl font-semibold">Press Release - coinos Redesign - September 23, 2022</p> - - <p class="text-xl text-secondary"> - Today coinos is launching a new and improved interface for their open source web wallet, - allowing businesses to accept bitcoin with no setup or merchant fees. - </p> - - <p class="text-xl text-secondary"> - coinos is a web-based bitcoin payment application that is mobile and tablet friendly with handy - currency conversion and reporting features. bitcoin is the world's leading crypto currency. It - offers a secure and inexpensive way for people all over the globe to make and accept payments. - </p> - - <blockquote - class="p-4 my-4 bg-gray-50 border-l-4 border-gray-300 dark:border-gray-500 dark:bg-gray-800 text-xl text-secondary" - > - <Quote /> coinos has enabled businesses to accept bitcoin since 2012, but now we have made it even - easier with a new simple, friendly and customizable interface for both businesses and customers to - use. - <figcaption class="flex justify-center items-center mt-6 space-x-3"> - <img class="w-6 h-6 rounded-full" src="/images/adam.webp" alt="Adam Soltys" /> - <div class="flex items-center divide-x-2 divide-gray-500 dark:divide-gray-700"> - <cite class="pr-3 font-medium text-gray-900 dark:text-white">Adam Soltys</cite> - <cite class="pl-3 text-sm font-light text-gray-500 dark:text-gray-400">Founder and CTO</cite - > - </div> - </figcaption> - </blockquote> - - <p class="text-xl text-secondary"> - coinos started as an indie bitcoin wallet created by Adam Soltys with the intention of providing - people with a fast, cheap, and easy way to get started with bitcoin. It's free to register an - account and you can sign up with just a username and password. - </p> - - <h3 class="text-xl font-semibold">Why accept bitcoin?</h3> - <blockquote - class="p-4 my-4 bg-gray-50 border-l-4 border-gray-300 dark:border-gray-500 dark:bg-gray-800 text-xl text-secondary" - > - <Quote /> - We have already brought on some local businesses, here in Vancouver, and the business owners are - excited about the opportunity coinos is giving them to attract new customers by being able to accept - bitcoin. With coinos there are no set up fees, no merchant fees and transactions are safe and secure - with payments going directly to the business owner's wallet. There is no middle person. - <figcaption class="flex justify-center items-center mt-6 space-x-3"> - <img class="w-6 h-6 rounded-full" src="/images/cole.webp" alt="Adam Soltys" /> - <div class="flex items-center divide-x-2 divide-gray-500 dark:divide-gray-700"> - <cite class="pr-3 font-medium text-gray-900 dark:text-white">Cole Goodwin</cite> - <cite class="pl-3 text-sm font-light text-gray-500 dark:text-gray-400" - >Bitcoin Professional</cite - > - </div> - </figcaption> - </blockquote> - - <h3 class="text-xl font-semibold">coinos Timeline</h3> - <ul class="text-xl text-secondary"> - <li class="flex items-center space-x-3"> - <Check /> - 2012 Coding started - </li> - <li class="flex items-center space-x-3"> - <Check /> - 2013 Used by merchants in Vancouver to accept on-chain bitcoin - </li> - <li class="flex items-center space-x-3"> - <Check /> - 2018 Lightning network supported - </li> - <li class="flex items-center space-x-3"> - <Check /> - 2020 Incorporated in BC and registered with Fintrac - </li> - <li class="flex items-center space-x-3"> - <Check /> - 2021 Liquid Network and asset issuance supported - </li> - <li class="flex items-center space-x-3"> - <Check /> - 2022 10 year anniversary and UI redesign - </li> - </ul> - - <h3 class="text-xl font-semibold">Contacts</h3> - - <p class="text-xl text-secondary"> - <b>Adam Soltys</b> - Founder & CTO<br /> - <a class="hover:opacity-80" href="mailto:[email protected] ">[email protected]</a> - </p> - - <p class="text-xl text-secondary"> - <b>Cole Goodwin</b> - Bitcoin Professional<br /> - <a class="hover:opacity-80" href="mailto:[email protected]">[email protected]</a> - </p> - - <p class="text-xl text-secondary"> - <b>Shauna Collister</b> - Operations & Marketing<br /> - <a class="hover:opacity-80" href="mailto:[email protected]">[email protected]</a> - </p> -</div> - -<Footer /> |
