Skip to content

Commit

Permalink
chore: reorganize the sidebar and landing (#18)
Browse files Browse the repository at this point in the history
* chore: clean getBalance
* chore: improve wording for email log in
* chore: reorganize the sidebar and landing
  • Loading branch information
openoms authored Oct 25, 2023
1 parent 48a969f commit 3a3d69b
Show file tree
Hide file tree
Showing 9 changed files with 153 additions and 70 deletions.
4 changes: 2 additions & 2 deletions docs/api/a-auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Make sure you have [registered your email address](/api/start#set-up-the-email-l
</AuthProvider>

:::caution
The authentication token provides access to your wallet balance.
Save it securely as a password and use it to make authenticated requests on the next pages.
The authentication token provides access to your wallet balance, save it securely as a password.
Use it to make authenticated requests on the next pages or set it in the header as `Authorization` `Bearer <ory_token>`.
:::

## Copy the token from the Blink app
Expand Down
6 changes: 6 additions & 0 deletions docs/api/README.md → docs/api/overview.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
id: overview
title: Blink API Overview
slug: /api/overview
---

# Blink API Overview

### [Start with Blink](/api/start) to register an account
Expand Down
74 changes: 74 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
id: intro
title: Intro
slug: /
hide_table_of_contents: false
---
# Welcome to the Blink API Documentation

A powerful, cost-effective, and reliable solution for easily integrating simple, reliable Bitcoin & Lightning payments into your projects, regardless of your experience level.

Enable onchain and Layer two Lightning payments denominated in bitcoin or USD in just minutes!

## Feature overview
⚡ Unleash the benefits of Bitcoin & Lightning

Lightning payments give the power of low-cost instant settlement to every business in the world.<br />
With the Blink API you can quickly enable Lightning and onchain payments for your business to unlock:

* **Instant transactions** – no waiting for funds to arrive
* **Final settlement** – no more chargebacks
* **Low cost** – save 2-5% compared to credit cards
* **Micropayments** – no minimum payment amount
* **Interoperability** – permissionless payment network

## Pricing
💲 Zero fee for Blink-to-Blink transactions!

Robust infrastructure (built on [Galoy](https://dev.galoy.io)) and well-managed Lightning channels allow us to provide the lowest possible fees, whether for Lightning (LN) payments, on-chain bitcoin transactions, or BTC to Stablesats conversions.

* Intraledger (between Blink users) – no fee!
* Outgoing Lightning – only pay routing fees (~0.02%)
* Onchain deposit – 0% for payments over 1M sats
* Stablesats conversion – 0.2% spread, no fees

A detailed FAQ entry on [pricing](https://faq.blink.sv/transaction-fees/what-are-the-transaction-fees-for-using-blink-wallet)

## Why choose the [Blink API](/api)
📖 Blink makes receiving bitcoin simple whether you sell products in person, receive remittances or donations from abroad, or simply send sats between friends.

* **Bitcoin-only** - Built by Bitcoiners for everyone, Proudly based in El Salvador
* **Reliable** - Uptime & 24/7 team, check the [Blink Status Page](https://blink.statuspage.io/)
* **Low fees** – Lightning-first, competitive pricing
* **Simple to use**: Avoid the cost and the complexities of channel management. The Galoy backend handles it all, saving you valuable time and resources.
* **Open source** – Transition to self-hosted
* **USD-enabled** – Synthetic USD via Stablesats. Dive deeper on [stablesats.com](https://stablesats.com/)

## Get started: [Register in 2 minutes](/api/start)
➡️ Registering and logging into the Blink API is simple and can be done in under a minute.

* Register account with phone number (note: unavailable in the US and some other countries)
* Add email for 2FA
* Start building!

## Interactive tutorials: [Try it out](/api#-tutorials)
🧪 API integration made easy

Sending and receiving Bitcoin and Stablesats via API is simple, and available using both Lightning and onchain. Check out these simple interactive tutorials:
* **Receive Stablesats USD** ([Lightning](/api/usd-ln-receive) | [Onchain](/api/usd-onchain-receive))
* **Send Stablesats USD** ([Lightning](/api/usd-ln-send) | [Onchain](/api/usd-onchain-send))
* **Receive BTC** ([Lightning](/api/btc-ln-receive) | [Onchain](/api/btc-onchain-receive))
* **Send BTC** ([Lightning](/api/btc-ln-send) | [Onchain](/api/btc-onchain-send))

## Host it yourself – [build with Galoy](https://dev.galoy.io)
🏠 Become a sovereign organization

Blink is built on the Galoy open source bitcoin banking stack.<br />
When you're ready, you can host the API on your own terms and seamlessly transition everything to your own infrastructure.<br />
Visit [dev.galoy.io](https://dev.galoy.io) for more information on our open-source offerings.

[Join our Mattermost](https://chat.galoy.io/)

[Start with the API](https://dev.blink.sv/api/start)

Join us in enabling a Bitcoin-powered future with the Blink API powered by Galoy!
76 changes: 39 additions & 37 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,12 @@ const config = {
// Replace with your project's social card
image: 'img/blink-logo.jpg',
navbar: {
title: 'Developer Documentation',
title: 'API Documentation',
logo: {
alt: 'Blink logo',
src: 'img/blink-logo-orange.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'apiSidebar',
position: 'left',
label: 'Hosted API',
},
{
href: 'https://chat.galoy.io',
label: 'Join the Community',
Expand All @@ -94,33 +88,33 @@ const config = {
style: 'dark',
links: [
{
title: 'Docs',
title: 'Follow us',
items: [
{
label: 'Hosted API',
to: '/api',
label: 'GitHub',
href: 'https://github.com/GaloyMoney',
},
],
},
{
title: 'Community',
items: [
{
label: 'Twitter',
label: 'X/Twitter',
href: 'https://twitter.com/blinkbtc',
},
{
label: 'Telegram',
href: 'https://t.me/blinkbtc',
},
{
label: 'Nostr',
href: 'https://snort.social/p/[email protected]',
},
],
},
{
title: 'Community',
items: [
{
label: 'Galoy Mattermost',
href: 'https://chat.galoy.io',
},
{
label: 'Telegram',
href: 'https://t.me/blinkbtc',
},
],
},
{
Expand All @@ -131,8 +125,12 @@ const config = {
href: 'https://www.blink.sv',
},
{
label: 'GitHub',
href: 'https://github.com/GaloyMoney',
label: 'Status page',
href: 'https://blink.statuspage.io',
},
{
label: 'About Galoy',
href: 'https://galoy.io',
},
],
},
Expand All @@ -149,21 +147,25 @@ const config = {
darkTheme: darkCodeTheme,
},
}),
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
/*
{
to: '/api/start',
from: ['/api'],
}
*/
],
},
],
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/api/start',
from: ['/api'],
},
/*
{
to: '/api/start',
from: ['/api'],
}
*/
],
},
],
};
],
};

module.exports = config;
27 changes: 14 additions & 13 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const sidebars = {
],
*/
apiSidebar: [
'intro',
'api/start',
'api/auth',
{
Expand All @@ -43,20 +44,20 @@ const sidebars = {
items: [
{
type: 'category',
label: 'USD',
label: 'BTC',
collapsed: true,
items: [
'api/usd-ln-receive',
'api/usd-ln-send',
'api/btc-ln-receive',
'api/btc-ln-send',
],
},
{
type: 'category',
label: 'BTC',
label: 'USD',
collapsed: true,
items: [
'api/btc-ln-receive',
'api/btc-ln-send',
'api/usd-ln-receive',
'api/usd-ln-send',
],
},
],
Expand All @@ -68,27 +69,27 @@ const sidebars = {
items: [
{
type: 'category',
label: 'USD',
label: 'BTC',
collapsed: true,
items: [
'api/usd-onchain-receive',
'api/usd-onchain-send',
'api/btc-onchain-receive',
'api/btc-onchain-send',
],
},
{
type: 'category',
label: 'BTC',
label: 'USD',
collapsed: true,
items: [
'api/btc-onchain-receive',
'api/btc-onchain-send',
'api/usd-onchain-receive',
'api/usd-onchain-send',
],
},
],
},
'api/errors',
],
},
'api/errors',
'api/postman',
'api/learn-more'
],
Expand Down
11 changes: 4 additions & 7 deletions src/components/apiTutorial/GetBalance.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import { generateCurlCommand } from './curlCommandGenerators';
export function GetBalance() {
const { authToken, apiEndpoint } = useAuth();

const [curlCommandWallet, setCurlCommandWallet] = useState('');
const [curlCommand, setCurlCommand] = useState('');
const [response, setResponse] = useState(null);
const [errorMessage, setErrorMessage] = useState(null);

const walletCurrency = 'BTC';

const operation = `\
query Me {
me {
Expand All @@ -34,8 +32,7 @@ export function GetBalance() {

generateCurlCommand({
operation: operation,
type: 'wallet',
setCurlCommand: setCurlCommandWallet,
setCurlCommand: setCurlCommand,
authToken: authToken,
apiEndpoint: apiEndpoint,
});
Expand All @@ -47,7 +44,7 @@ export function GetBalance() {
useEffect(() => {
generateCurlCommand({
operation: operation,
setCurlCommand: setCurlCommandWallet,
setCurlCommand: setCurlCommand,
authToken: authToken,
apiEndpoint: apiEndpoint,
});
Expand All @@ -70,7 +67,7 @@ export function GetBalance() {
overflowX: 'auto',
whiteSpace: 'pre-wrap'
}}>
{curlCommandWallet}
{curlCommand}
</pre>
</div>
</div>
Expand Down
11 changes: 4 additions & 7 deletions src/components/apiTutorial/GetBalanceWithPending.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import { generateCurlCommand } from './curlCommandGenerators';
export function GetBalanceWithPending() {
const { authToken, apiEndpoint } = useAuth();

const [curlCommandWallet, setCurlCommandWallet] = useState('');
const [curlCommand, setCurlCommand] = useState('');
const [response, setResponse] = useState(null);
const [errorMessage, setErrorMessage] = useState(null);

const walletCurrency = 'BTC';

const operation = `\
query Me {
me {
Expand All @@ -35,8 +33,7 @@ export function GetBalanceWithPending() {

generateCurlCommand({
operation: operation,
type: 'wallet',
setCurlCommand: setCurlCommandWallet,
setCurlCommand: setCurlCommand,
authToken: authToken,
apiEndpoint: apiEndpoint,
});
Expand All @@ -48,7 +45,7 @@ export function GetBalanceWithPending() {
useEffect(() => {
generateCurlCommand({
operation: operation,
setCurlCommand: setCurlCommandWallet,
setCurlCommand: setCurlCommand,
authToken: authToken,
apiEndpoint: apiEndpoint,
});
Expand All @@ -71,7 +68,7 @@ export function GetBalanceWithPending() {
overflowX: 'auto',
whiteSpace: 'pre-wrap'
}}>
{curlCommandWallet}
{curlCommand}
</pre>
</div>
</div>
Expand Down
Loading

0 comments on commit 3a3d69b

Please sign in to comment.