Skip to content

Commit

Permalink
docs: update links to github
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Oct 20, 2024
1 parent f6cff60 commit 23e526d
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ root variable, to don't make it reactive in deep. You can find it implementation
[based on]: https://vuejs.org/guide/extras/reactivity-in-depth.html#how-reactivity-works-in-vue
[not compatible]: https://github.com/tc39/proposal-class-fields/issues/106
[shallowRef]: https://vuejs.org/api/reactivity-advanced.html#shallowref
[æpp example]: https://github.com/aeternity/aepp-sdk-js/tree/71da12b5df56b41f7317d1fb064e44e8ea118d6c/examples/browser/aepp
[æpp example]: https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/aepp

## Command Line Interface (CLI)

Expand Down
2 changes: 1 addition & 1 deletion docs/contrib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ aepp-sdk is transpiled to EcmaScript 5 through [WebPack](https://webpack.js.org/

## Documenting

Apart from documenting features and code, there is also documentation automatically generated using [**TypeDoc**](https://typedoc.org/) for documenting TS files and [a script](https://github.com/aeternity/aepp-sdk-js/blob/master/tooling/docs/examples-to-md.js) for documenting examples and code partials.
Apart from documenting features and code, there is also documentation automatically generated using [**TypeDoc**](https://typedoc.org/) for documenting TS files and [a script](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/tooling/docs/examples-to-md.js) for documenting examples and code partials.

```bash
#generate examples and api documentation
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/build-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This guide shows how to build either an **WebExtension Wallet** or a **iFrame-ba

The full implementation of this example can be found here:

- [WebExtension Wallet Example](https://github.com/aeternity/aepp-sdk-js/tree/master/examples/browser/wallet-web-extension)
- [WebExtension Wallet Example](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/wallet-web-extension)

Note:

Expand All @@ -16,19 +16,19 @@ Note:

First you need to create a bridge between your extension and the page. This can be done as follows:

https://github.com/aeternity/aepp-sdk-js/blob/f60d1b8a1124b32781769342e4941c8dacf6ad53/examples/browser/wallet-web-extension/src/content-script.js#L1-L27
https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/wallet-web-extension/src/content-script.js#L1-L30

### 2. Initialize `AeSdkWallet` class

Then you need to initialize `AeSdkWallet` class in your extension and subscribe for new `runtime` connections.
After the connection is established you can share the wallet details with the application.

https://github.com/aeternity/aepp-sdk-js/blob/f60d1b8a1124b32781769342e4941c8dacf6ad53/examples/browser/wallet-web-extension/src/background.js#L1-L75
https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/wallet-web-extension/src/background.js#L1-L163

## iFrame-based Wallet

The **iFrame-based** approach works similar to the **WebExtension** approach except that the `connectionProxy` in between isn't needed.

You can take a look into the implementation of the following example to see how it works:

- [iFrame-based Wallet Example](https://github.com/aeternity/aepp-sdk-js/tree/master/examples/browser/wallet-iframe)
- [iFrame-based Wallet Example](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/wallet-iframe)
2 changes: 1 addition & 1 deletion docs/guides/connect-aepp-to-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ It can be used to
Note:

- The steps above are snippets taken from the full implementation of
the [Simple æpp](https://github.com/aeternity/aepp-sdk-js/tree/master/examples/browser/aepp)
the [Simple æpp](https://github.com/aeternity/aepp-sdk-js/blob/f60d1b8a1124b32781769342e4941c8dacf6ad53/examples/browser/aepp)
2 changes: 1 addition & 1 deletion docs/guides/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CompilerCli is available only in Node.js and requires Erlang installed (`escript
const compiler = new CompilerCli();
```

CompilerHttp requires a hosted compiler service. Preferable to host your own compiler service since [compiler.aepps.com](https://v8.compiler.aepps.com/api) is planned to be decommissioned. An example of how to run it using [docker-compose](https://github.com/aeternity/aepp-sdk-js/blob/cd8dd7f76a6323383349b48400af0d69c2cfd88e/docker-compose.yml#L11-L14).
CompilerHttp requires a hosted compiler service. Preferable to host your own compiler service since [compiler.aepps.com](https://v8.compiler.aepps.com/api) is planned to be decommissioned. An example of how to run it using [docker-compose](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/docker-compose.yml#L20-L25).

```js
const compiler = new CompilerHttp('https://v8.compiler.aepps.com'); // host your own compiler
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/error-handling.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Error Handling

This guide shows you how to handle errors originating from the SDK. SDK by default exports the following error classes from file [errors.ts](https://github.com/aeternity/aepp-sdk-js/blob/develop/src/utils/errors.ts)
This guide shows you how to handle errors originating from the SDK. SDK by default exports the following error classes from file [errors.ts](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/utils/errors.ts)

## Error Hierarchy

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/ledger-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ console.log(await account.signTransaction('tx_...')); // 'tx_...' (with signatur

The private key for the account would be derived on the Ledger device using the provided index and the mnemonic phrase it was initialized with. The private key won't leave the device.

The complete examples of how to use it in nodejs and browser can be found [here](https://github.com/aeternity/aepp-sdk-js/tree/71da12b5df56b41f7317d1fb064e44e8ea118d6c/test/environment/ledger).
The complete examples of how to use it in nodejs and browser can be found [here](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/test/environment/ledger).

## Account verification

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/metamask-snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ console.log(await account.signTransaction('tx_...')); // 'tx_...' (with signatur

The private key for the account would be derived in the MetaMask browser extension using the provided index and the mnemonic phrase it was initialized with. The private key won't leave the extension.

The complete examples of how to use it in browser can be found [here](https://github.com/aeternity/aepp-sdk-js/tree/develop/examples/browser/aepp/src/components/ConnectMetamask.vue).
The complete examples of how to use it in browser can be found [here](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/aepp/src/components/ConnectMetamask.vue).

## Account persistence

Expand Down
14 changes: 7 additions & 7 deletions docs/guides/typed-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ corresponds to the data

## Implementation

- [AccountBase:signTypedData](https://github.com/aeternity/aepp-sdk-js/blob/0b9ecee8/src/account/Base.ts#L66-L77) — calculates signature, supported in MemoryAccount and in aepp-wallet connection;
- [hashTypedData](https://github.com/aeternity/aepp-sdk-js/blob/0b9ecee8/src/utils/typed-data.ts#L61-L69) — calculates the overall hash of typed data to sign;
- [hashJson](https://github.com/aeternity/aepp-sdk-js/blob/0b9ecee8/src/utils/typed-data.ts#L10-L12) — deterministic hashing of an arbitrary JS value, used to calculate `hash(aci)`;
- [hashDomain](https://github.com/aeternity/aepp-sdk-js/blob/0b9ecee8/src/utils/typed-data.ts#L40-L59) — use for debugging or to prepare the hash value for smart contract.
- [AccountBase:signTypedData](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/account/Base.ts#L63-L70) — calculates signature, supported in MemoryAccount and in aepp-wallet connection;
- [hashTypedData](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/utils/typed-data.ts#L82-L96) — calculates the overall hash of typed data to sign;
- [hashJson](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/utils/typed-data.ts#L10-L12) — deterministic hashing of an arbitrary JS value, used to calculate `hash(aci)`;
- [hashDomain](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/src/utils/typed-data.ts#L56-L80) — use for debugging or to prepare the hash value for smart contract.

## Examples

- [signing and verifying on aepp side](https://github.com/aeternity/aepp-sdk-js/blob/0b9ecee8/examples/browser/aepp/src/TypedData.vue)
- [signing confirmation on wallet side](https://github.com/aeternity/aepp-sdk-js/blob/0b9ecee8/examples/browser/wallet-iframe/src/App.vue#L177-L185)
- [verifying a signature on contract side](https://github.com/aeternity/aepp-sdk-js/blob/0b9ecee8/test/integration/typed-data.ts#L75-L105)
- [signing and verifying on aepp side](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/aepp/src/TypedData.vue)
- [signing confirmation on wallet side](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/wallet-iframe/src/App.vue#L169-L177)
- [verifying a signature on contract side](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/test/integration/typed-data.ts#L76-L106)
2 changes: 1 addition & 1 deletion examples/browser/aepp/src/Contracts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default {
computed: mapState(['aeSdk']),
methods: {
async create() {
// Contract instance can't be in deep reactive https://github.com/aeternity/aepp-sdk-js/blob/develop/docs/README.md#vue3
// Contract instance can't be in deep reactive https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/docs/README.md#vue3
this.contract = shallowRef(
await Contract.initialize({
...this.aeSdk.getContext(),
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/aepp/src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const store = createStore({
state: {
address: undefined,
networkId: undefined,
// AeSdk instance can't be in deep reactive https://github.com/aeternity/aepp-sdk-js/blob/develop/docs/README.md#vue3
// AeSdk instance can't be in deep reactive https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/docs/README.md#vue3
aeSdk: shallowRef(
new AeSdk({
nodes: [
Expand Down
2 changes: 1 addition & 1 deletion examples/node/account-generalized.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// # Create and use Generalized Accounts
//
// ## Introduction
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/master/examples/node/account-generalized.js)
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/node/account-generalized.js)
// and this page explains in detail how to:
//
// - initialize an instance of the SDK with a random account,
Expand Down
2 changes: 1 addition & 1 deletion examples/node/contract-interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// # Compile & Deploy a Sophia Smart Contract
//
// ## Introduction
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/master/examples/node/contract-interaction.js) and this page explains in detail how to:
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/node/contract-interaction.js) and this page explains in detail how to:
//
// - deal with the different phases of compiling Sophia contracts to bytecode
// - deploy the bytecode to get a callable contract address
Expand Down
2 changes: 1 addition & 1 deletion examples/node/paying-for-contract-call-tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// # InnerTx: ContractCallTx
//
// ## Introduction
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/master/examples/node/paying-for-contract-call-tx.js)
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/node/paying-for-contract-call-tx.js)
// and this page explains in detail how to:
//
// - Create and sign a `ContractCallTx` with the `innerTx` option for an account that has no
Expand Down
2 changes: 1 addition & 1 deletion examples/node/paying-for-spend-tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// # InnerTx: SpendTx
//
// ## Introduction
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/master/examples/node/paying-for-spend-tx.js)
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/node/paying-for-spend-tx.js)
// and this page explains in detail how to:
//
// - Create and sign a `SpendTx` for an account with the `innerTx` option.
Expand Down
2 changes: 1 addition & 1 deletion examples/node/transfer-ae.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// # Transfer AE
//
// ## Introduction
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/master/examples/node/transfer-ae.js)
// The whole script is [located in the repository](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/node/transfer-ae.js)
// and this page explains in detail how to:
//
// - initialize an instance of the SDK with a pre-funded account
Expand Down

0 comments on commit 23e526d

Please sign in to comment.