Skip to content

Commit

Permalink
refactor: use relative links between docs pages
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Apr 24, 2021
1 parent b949270 commit d34d818
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/guides/aens-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ await nameObject.revoke(options)

## Related links
- [AENS protocol](https://github.com/aeternity/protocol/blob/master/AENS.md)
- [AENS SDK API Docs](https://github.com/aeternity/aepp-sdk-js/blob/develop/docs/api/ae/aens.md)
- [AENS SDK API Docs](../api/ae/aens.md)
2 changes: 1 addition & 1 deletion docs/guides/how-to-build-aepp-using-new-wallet-api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## How to build an Aepp using new Wallet API

This guide describing the process of building Aepp using the new Wallet<->Aepp integration API
The full example of implementation you can find here: [AEPP example](https://github.com/aeternity/aepp-sdk-js/tree/develop/examples/browser/vuejs/connect-two-ae/aepp)
The full example of implementation you can find here: [AEPP example](../../examples/browser/vuejs/connect-two-ae/aepp)
### First we need to initialize our `Aepp` stamp

```js
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/how-to-build-an-wallet-app-or-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This guide describing the process of building Waellet using the new Wallet<->Aepp integration API
The full example of implementation you can find here:
- [Web Waellet](https://github.com/aeternity/aepp-sdk-js/tree/develop/examples/browser/vuejs/connect-two-ae/identity)
- [Extension Waellet](https://github.com/aeternity/aepp-sdk-js/tree/develop/examples/browser/extension)
- [Web Waellet](../../examples/browser/vuejs/connect-two-ae/identity)
- [Extension Waellet](../../examples/browser/extension)

### First we need to initialize our `Aepp` stamp

Expand Down
28 changes: 14 additions & 14 deletions docs/guides/oracle-usage.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Oracle Usage

This guide describes the basic operations on [Oracle](https://github.com/aeternity/protocol/blob/master/oracles/oracles.md) using [Aeternity JS SDK](https://github.com/aeternity/aepp-sdk-js)

## Main Flow

- `Register` an `oracle` (prepare and broadcast `oracle-register`)
```js
const sdkInstance = await Universal({ ... }) // Init Universal instance

// First argument is oracle query format and second oracle query response format
// queryFee is optional and default to 30000
// oracleTll is optional and default to { type: 'delta', value: 500 }
const oracle = await client.registerOracle("{'city': str}", "{'tmp': num}", { queryFee, oracleTtl })
```

- Extend oracle (prepare and broadcast `oracle-extend` transaction)
- Extend oracle (prepare and broadcast `oracle-extend` transaction)
```js
const ttlToExtend = { type: 'delta', value: 500 }
const oracle = await sdkInstance.getOracleObject(oracleId)
// extend oracle ttl to 500 blocks

// extend oracle ttl to 500 blocks
const oracleEntended = await oracle.extendOracle(ttlToExtend)
// or
const oracleEntended = await sdkInstance.extendOracleTtl(oracleId, ttlToExtend, options)
```

- Post query to oracle (prepare and broadcast `oracle-query` transaction)
```js
// queryFee is optional and default to 30000
Expand All @@ -33,13 +33,13 @@ This guide describes the basic operations on [Oracle](https://github.com/aeterni
const options = { fee, ttl, nonce, queryFee, queryTtl, responseTtl }
// Get oracle object
const oracle = await sdkInstance.getOracleObject(oracleId)
const query = await oracle.postQuery("{'city': 'Berlin'}", options)
// or
const query = await sdkInstance.postQueryToOracle(oracleId, "{'city': 'Berlin'}", options)
```
- Poll for queries

- Poll for queries
```js
const stopPolling = await oracle.pollQueries(
(queries) => {
Expand All @@ -57,19 +57,19 @@ This guide describes the basic operations on [Oracle](https://github.com/aeterni
// or
const response = await sdkInstance.pollForQueryResponse(oracleId, queryId, { attempts: 2, interval: 1000 })
// decode query response
console.log(query.decode())
console.log(query.decode())
```
- Respond to query (prepare and broadcast `oracle-responde` transaction)
```js
const options = { ttl, fee, nonce, onAccount }
const query = await sdkInstance.getQueryObject(oracleId, queryId)
await query.respond({ tmp: 10 }, options)
// or
await sdkInstance.respondToQuery(oracleId, queryId, { tmp: 10 }, options)
```

## Related links
- [Oracle protocol](https://github.com/aeternity/protocol/blob/master/oracles)
- [Oracle SDK API Docs](https://github.com/aeternity/aepp-sdk-js/blob/develop/docs/api/ae/oracle.md)
- [Oracle SDK API Docs](../api/ae/oracle.md)

2 changes: 1 addition & 1 deletion examples/browser/vuejs/connect-two-ae/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

This [connect-two-aepp](https://github.com/aeternity/aepp-sdk-js/tree/master/examples/connect-two-ae) example project has been created to **showcase the aeternity SDK implementation** for both Base/Wallet Aepps and "regular" Aepps "depending" on a base (Wallet/Identity/Base) Aepp.
This example project has been created to **showcase the aeternity SDK implementation** for both Base/Wallet Aepps and "regular" Aepps "depending" on a base (Wallet/Identity/Base) Aepp.

## 0. Setup info
If you are trying these examples after checking out the entire Aepp-SDK repo (this repo), you want to first run `npm install`, from the repo root, to get all the SDK dependecies installed, and only then, move to individual apps (point nr. 1 and point nr. 2) installations.
Expand Down
4 changes: 2 additions & 2 deletions examples/browser/vuejs/connect-two-ae/aepp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sample Aepp for Contracts

This is part of the [connect-two-aepp](https://github.com/aeternity/aepp-sdk-js/tree/master/examples/connect-two-ae) example project.
This is part of the [connect-two-aepp](..) example project.
Ths is an example Aepp (Distributed App) that lives inside an Aeternity Wallet Aepp.

## Overview
Expand All @@ -9,7 +9,7 @@ This is a sample Aepp that compiles contracts using the Aeternity JavaScript SDK

### How it works

1. Start the [identity/wallet Aepp](https://github.com/aeternity/aepp-sdk-js/tree/develop/examples/connect-two-ae/identity), which will start on port `9000`
1. Start the [identity/wallet Aepp](../identity), which will start on port `9000`
2. Start this Aepp, which will start on port `9001`
3. Visit `localhost:9000` to see this Aepp included into the Identity (Wallet) Aepp

Expand Down
6 changes: 3 additions & 3 deletions examples/browser/vuejs/connect-two-ae/identity/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Wallet/Identity Base Aepp

This is part of the [connect-two-aepp](https://github.com/aeternity/aepp-sdk-js/tree/master/examples/connect-two-ae) example project.
This is part of the [connect-two-aepp](..) example project.
Ths is an exmaple Aepp (Distributed App) that lives inside an Aeternity Wallet Aepp.

The [connect-two-aepp](https://github.com/aeternity/aepp-sdk-js/tree/master/examples/connect-two-ae) example project has been created to showcase the aeternity SDK implementation for both Base/Wallet Aepps and "regular" Aepps "depending" on a base (Wallet/Identity) Aepp.
The [connect-two-aepp](..) example project has been created to showcase the aeternity SDK implementation for both Base/Wallet Aepps and "regular" Aepps "depending" on a base (Wallet/Identity) Aepp.

## Overview

Expand All @@ -12,7 +12,7 @@ This is a sample Wallet/Identity Aepp that expects an Aepp to be loaded into an
### How it works

1. Start this base Aepp, which will start on port `9000`
2. Start the [sample Contract Aepp](https://github.com/aeternity/aepp-sdk-js/tree/develop/examples/connect-two-ae/aepp), which will start on port `9001`
2. Start the [sample Contract Aepp](../aepp), which will start on port `9001`
3. Visit `localhost:9000` to see this Aepp included into the Identity (Wallet) Aepp

## Installation
Expand Down

0 comments on commit d34d818

Please sign in to comment.