Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Jul 31, 2024
2 parents e50eb7c + 221678e commit ed45ec1
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 48 deletions.
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ aelf is a high-performance, cloud-native, layer-1 blockchain with Mainnet nodes
- [Contract SDK](/tools/contract-sdk/) - C# SDKs
- [Smart Contract API](/tools/smart-contract-api/) - Access smart contract functionalities using API
- [Web API](/tools/web-api/) - Interact with the aelf blockchain through the web
- [Setup Local Environment](/tools/setup-local-environment/) - Node operator and developer setup guides

</article>

Expand Down
56 changes: 28 additions & 28 deletions docs/resources/browser-extension/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ image: /img/Logo.aelf.svg

**Purpose**: This guide provides instructions for both users and developers on the installation, usage, and implementation of the aelf Web Extension.

# aelf-web-extension
## aelf-web-extension

### Introduction

Expand Down Expand Up @@ -47,33 +47,33 @@ For those using QQ Browser and similar, you can add the extension manually.
To access the complete data structure, [click here](#data-format). For an extension demo, refer to the provided examples.

- [aelf-web-extension](#aelf-web-extension)
- [Introduction](#introduction)
- [For Users](#for-users)
- [Release Version](#release-version)
- [Development Version](#development-version)
- [Notice](#notice)
- [For DApp Developers](#for-dapp-developers)
- [Interaction Flow](#interaction-flow)
- [How to Use](#how-to-use)
- [Data Format](#data-format)
- [Demo of Checking the Extension](#demo-of-checking-the-extension)
- [GET\_CHAIN\_STATUS](#get_chain_status)
- [Token Transfer](#token-transfer)
- [Expected Result :](#expected-result-)
- [CALL\_AELF\_CHAIN](#call_aelf_chain)
- [Expected Result :](#expected-result--1)
- [LOGIN](#login)
- [INIT\_AELF\_CONTRACT](#init_aelf_contract)
- [Expected Result :](#expected-result--2)
- [CALL\_AELF\_CONTRACT / CALL\_AELF\_CONTRACT\_READONLY](#call_aelf_contract--call_aelf_contract_readonly)
- [CHECK\_PERMISSION](#check_permission)
- [Expected Result :](#expected-result--3)
- [SET\_CONTRACT\_PERMISSION](#set_contract_permission)
- [Expected Result](#expected-result)
- [REMOVE\_METHODS\_WHITELIST](#remove_methods_whitelist)
- [Expected Result](#expected-result-1)
- [For Extension Developers](#for-extension-developers)
- [Project Information](#project-information)
- [Introduction](#introduction)
- [For Users](#for-users)
- [Release Version](#release-version)
- [Development Version](#development-version)
- [Notice](#notice)
- [For DApp Developers](#for-dapp-developers)
- [Interaction Flow](#interaction-flow)
- [How to Use](#how-to-use)
- [Data Format](#data-format)
- [Demo of Checking the Extension](#demo-of-checking-the-extension)
- [GET\_CHAIN\_STATUS](#get_chain_status)
- [Token Transfer](#token-transfer)
- [Expected Result :](#expected-result-)
- [CALL\_AELF\_CHAIN](#call_aelf_chain)
- [Expected Result :](#expected-result--1)
- [LOGIN](#login)
- [INIT\_AELF\_CONTRACT](#init_aelf_contract)
- [Expected Result :](#expected-result--2)
- [CALL\_AELF\_CONTRACT / CALL\_AELF\_CONTRACT\_READONLY](#call_aelf_contract--call_aelf_contract_readonly)
- [CHECK\_PERMISSION](#check_permission)
- [Expected Result :](#expected-result--3)
- [SET\_CONTRACT\_PERMISSION](#set_contract_permission)
- [Expected Result](#expected-result)
- [REMOVE\_METHODS\_WHITELIST](#remove_methods_whitelist)
- [Expected Result](#expected-result-1)
- [For Extension Developers](#for-extension-developers)
- [Project Information](#project-information)


## Data Format
Expand Down
40 changes: 20 additions & 20 deletions docs/resources/integration-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ description: Learn how to integrate with other tools and DApps

**Purpose**: To provide installation and configuration instructions for integrating various aelf wallets into a React application using the aelf-web-login library.

# Introduction
## Introduction

**aelf-web-login**: Modular React wallet collection and components for aelf applications.

**website**: https://aelf-web-login.vercel.app/

# Install
## Install

```sh
yarn add @aelf-web-login/wallet-adapter-night-elf @aelf-web-login/wallet-adapter-portkey-aa @aelf-web-login/wallet-adapter-portkey-discover @aelf-web-login/wallet-adapter-react @aelf-web-login/wallet-adapter-base @aelf-web-login/wallet-adapter-bridge
Expand All @@ -33,7 +33,7 @@ Then the `package.json` will be like this
}
```

# Config
## Config

1. Import `PortkeyDiscoverWallet`, `PortkeyAAWallet` and `NightElfWallet` and generate instance
2. Create `didConfig` (internal invoke: `ConfigProvider.setGlobalConfig(didConfig)`)
Expand Down Expand Up @@ -127,7 +127,7 @@ const config: IConfigProps = {
};
```

# Usage
## Usage

1. Import `WebLoginProvider`, `init` and `useConnectWallet`
2. invoke `init` with upper config as params
Expand Down Expand Up @@ -164,9 +164,9 @@ const Demo = () => {
}
```

# API
## API

## connectWallet
### connectWallet

```ts
connectWallet: () => Promise<TWalletInfo>
Expand All @@ -192,7 +192,7 @@ const Demo = () => {
}
```

## disConnectWallet
### disConnectWallet

```ts
disConnectWallet: () => Promise<void>
Expand All @@ -214,7 +214,7 @@ const Demo = () => {
}
```

## lock
### lock

```ts
lock: () => void
Expand All @@ -233,7 +233,7 @@ const Demo = () => {
}
```

## getAccountByChainId
### getAccountByChainId

```ts
getAccountByChainId: (chainId: TChainId) => Promise<string>
Expand Down Expand Up @@ -262,7 +262,7 @@ const Demo = () => {
}
```

## getWalletSyncIsCompleted
### getWalletSyncIsCompleted

```ts
getWalletSyncIsCompleted: (chainId: TChainId) => Promise<string | boolean>
Expand Down Expand Up @@ -291,7 +291,7 @@ const Demo = () => {
}
```

## getSignature
### getSignature

```ts
const getSignature: (params: TSignatureParams) => Promise<{ `` error: number; `` errorMessage: string; `` signature: string; `` from: string; ``} | null>
Expand Down Expand Up @@ -337,7 +337,7 @@ const Demo = () => {
}
```

## callSendMethod
### callSendMethod

```ts
callSendMethod: <T, R>(props: ICallContractParams<T>) => Promise<R>
Expand Down Expand Up @@ -386,7 +386,7 @@ const Demo = () => {
}
```

## callViewMethod
### callViewMethod

```ts
callViewMethod: <T, R>(props: ICallContractParams<T>) => Promise<R>
Expand Down Expand Up @@ -434,7 +434,7 @@ const Demo = () => {
}
```

## walletInfo
### walletInfo

```ts
const walletInfo: TWalletInfo
Expand Down Expand Up @@ -504,7 +504,7 @@ const Demo = () => {
}
```

## walletType
### walletType

```ts
const walletType: WalletTypeEnum
Expand All @@ -527,7 +527,7 @@ const Demo = () => {
}
```

## isLocking
### isLocking

```ts
const isLocking: boolean
Expand All @@ -549,7 +549,7 @@ const Demo = () => {
}
```

## isConnected
### isConnected

```ts
const isConnected: boolean
Expand All @@ -572,7 +572,7 @@ const Demo = () => {
}
```

## loginError
### loginError

```ts
const loginError: TWalletError | null
Expand Down Expand Up @@ -602,7 +602,7 @@ const Demo = () => {
}
```

# Development
## Development

1. Install dependencies in the project root directory

Expand All @@ -617,7 +617,7 @@ cd packages/starter
pnpm dev
```

# Publish
## Publish

1. Upgrade the version numbers of each sub package
2. execute release command in the project root directory
Expand Down
8 changes: 8 additions & 0 deletions docs/resources/wallet-and-block-explorer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@ description: Manage your assets and explore aelf's blockchain data
---

# Wallet and Block Explorer

**Description**: A comprehensive blockchain explorer for viewing blocks and transactions, purchasing resources, voting, and more.

**Purpose**: To provide users with easy access to blockchain data and functionalities, enhancing their interaction with the network.

# iOS/Android Wallet

**Description**: A mobile wallet app for managing assets and trading across blockchains on iOS and Android.

**Purpose**: To offer users a convenient way to manage their digital assets and enable developers to integrate their applications with the wallet SDK.

# Web Wallet

**Description**: A web-based wallet for handling blockchain transactions directly from the browser.

**Purpose**: To facilitate easy and basic transaction management for users via a web interface.

# Explorer API

**Description**: An API for interacting with blockchain data, including blocks, transactions, and TPS records.

**Purpose**: To allow developers to retrieve detailed blockchain information programmatically, supporting various use cases such as monitoring and analysis.

# Wallet and Block Explorer
Expand Down

0 comments on commit ed45ec1

Please sign in to comment.