Skip to content

Commit

Permalink
chore: init repository
Browse files Browse the repository at this point in the history
  • Loading branch information
sigridjineth committed Jun 13, 2022
0 parents commit bf9ff35
Show file tree
Hide file tree
Showing 35 changed files with 22,308 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
8 changes: 8 additions & 0 deletions docs/EVMOS/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "EVMOS",
"position": 5,
"link": {
"type": "generated-index",
"description": "Welldone Studio to EVMOS API"
}
}
77 changes: 77 additions & 0 deletions docs/EVMOS/sending-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Sending a Transaction
* Once your dApp is connected to WELLDONE Wallet, the user can permit the webpage to send a transaction. A transaction can involve a simple sending token, creating a new smart contract, or changing a state on the blockchain.

## sendTransaction
```javascript
sendTransaction: (chain: string, data: string, to?: string, value?: string) => Promise<{ hash: string }>;
```
* When the `window.welldone.sendTransaction()` is called, a transaction will be created. After the transaction is created, the user is asked to sign and send the transaction.
* This promise-returning function resolves with a hash when the user has allowed the send transaction request. And it will reject with an error if the user denies the request or closes the popup.

## Transaction Parameters
```javascript
const response = await window.welldone.sendTransaction(
'evmos',
'0x6057361d000000000000000000000000000000000000000000000000000000000008a198',
'0x91ac88FF3d5583d887BFb5BCB599a3E4164b3786',
'0x00',
);

const txHash = response.hash;
```
## Chain
* Chain name. Required to identify on which chain to send a transaction. In the evmos case, It should be 'evmos'.
* Check other chain names that we support here.

## Data
* Required for smart contract creation.
* And this field is also used for specifying contract methods and their parameters.
* To [semi-optional]
* A hex-encoded Evmos address. Required for transactions with a recipient (all transactions except for contract creation).
* Contract creation occurs when there is no to value but there is a data value.
* Value [optional]
* Hex-encoded value of the network's native currency to send. On the Evmos network, this is photon, which is denominated in wei, which is 1e-18 photon.
* Only required to send photon to the recipient from the initiating external account.

## Example
```javascript
<button class="connectWalletButton">Connect Wallet</button>
<button class="getAccountButton">Get Account</button>
<button class="sendTxButton">Send Transaction</button>
const connectWalletButton = document.querySelector('.connectWalletButton');
const getAccountButton = document.querySelector('.getAccountButton');
const sendTxButton = document.querySelector('.sendTxButton');

let accounts = [];

sendTxButton.addEventListener('click', async () => {
try {
const response = await window.welldone.sendTransaction(
'evmos',
'0x6057361d000000000000000000000000000000000000000000000000000000000008a198',
'0x91ac88FF3d5583d887BFb5BCB599a3E4164b3786',
);
const txHash = response.hash;
} catch (error) {
// {message: 'User rejected sending transaction' || 'User closed the popup'}
}
});

getAccountButton.addEventListener('click', async () => {
try {
const accounts = await window.welldone.getAccount('evmos');
const account = accounts[0];
const selectedAddress = account.address
} catch (error) {
// {message: 'Didn't be connected to wallet yet'}
}
});

connectWalletButton.addEventListener('click', async () => {
try {
await window.welldone.connectWallet();
} catch (error) {
// {message: 'User rejected the connection' || 'User closed the popup'}
}
});
```
8 changes: 8 additions & 0 deletions docs/Ethereum/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Ethereum",
"position": 4,
"link": {
"type": "generated-index",
"description": "Welldone Studio to Ethereum API"
}
}
78 changes: 78 additions & 0 deletions docs/Ethereum/sending-transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Sending a Transaction
* Once your dApp is connected to WELLDONE Wallet, the user can permit the webpage to send a transaction. A transaction can involve a simple sending token, creating a new smart contract, or changing a state on the blockchain.

## sendTransaction
```javascript
sendTransaction: (chain: string, data: string, to?: string, value?: string) => Promise<{ hash: string }>;
```
* When the `window.welldone.sendTransaction()` is called, a transaction will be created. After the transaction is created, the user is asked to sign and send the transaction.
* This promise-returning function resolves with a hash when the user has allowed the send transaction request. And it will reject with an error if the user denies the request or closes the popup.

## Transaction Parameters
```javascript
const response = await window.welldone.sendTransaction(
'ethereum',
'0x6057361d000000000000000000000000000000000000000000000000000000000008a198',
'0x6d6b337a53B6787A480E96B07B1Fe2DDaBEAB504',
'0x00',
);


const txHash = response.hash;
```

## Chain
* Chain name. Required to identify on which chain to send a transaction. In the ethereum case, It should be 'ethereum'. Check other chain names that we support here.

## Data
* Required for smart contract creation. And this field is also used for specifying contract methods and their parameters.
* To [semi-optional]
* A hex-encoded Ethereum address. Required for transactions with a recipient (all transactions except for contract creation).
* Contract creation occurs when there is no to value but there is a data value.
* Value [optional]
* Hex-encoded value of the network's native currency to send. On the Main Ethereum network, this is ether, which is denominated in wei, which is 1e-18 ether.
* Only required to send ether to the recipient from the initiating external account.

## Example

```javascript
<button class="connectWalletButton">Connect Wallet</button>
<button class="getAccountButton">Get Account</button>
<button class="sendTxButton">Send Transaction</button>
const connectWalletButton = document.querySelector('.connectWalletButton');
const getAccountButton = document.querySelector('.getAccountButton');
const sendTxButton = document.querySelector('.sendTxButton');

let accounts = [];

sendTxButton.addEventListener('click', async () => {
try {
const response = await window.welldone.sendTransaction(
'ethereum',
'0x6057361d000000000000000000000000000000000000000000000000000000000008a198',
'0x6d6b337a53B6787A480E96B07B1Fe2DDaBEAB504',
);
const txHash = response.hash;
} catch (error) {
// {message: 'User rejected sending transaction' || 'User closed the popup'}
}
});

getAccountButton.addEventListener('click', async () => {
try {
const accounts = await window.welldone.getAccount('ethereum');
const account = accounts[0];
const selectedAddress = account.address
} catch (error) {
// {message: 'Didn't be connected to wallet yet'}
}
});

connectWalletButton.addEventListener('click', async () => {
try {
await window.welldone.connectWallet();
} catch (error) {
// {message: 'User rejected the connection' || 'User closed the popup'}
}
});
```
8 changes: 8 additions & 0 deletions docs/getting-started/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Getting Started",
"position": 2,
"link": {
"type": "generated-index",
"description": "Your First Journey to Welldone Studio Ecosystem"
}
}
30 changes: 30 additions & 0 deletions docs/getting-started/deploy-your-site.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
sidebar_position: 2
---

# Connecting to Wallet
## Specification
* In order to use WELLDONE Wallet in your dApp, you must first request a connection to the wallet extension.
* **Connecting to Wallet** means that **a user permits a webpage to access their account**.
```javascript
connectWallet(): Promise<void>
```
* The `window.welldone.connectWallet()` method requests a connection to the extension if the webpage is not connected to it. The connectWallet method requests permission for all chains at once.
* This promise-returning function resolves when the user has allowed the connection request. And it will reject with an error if the user denies the request or closes the popup.
* If the webpage already has established a connection, it will be whitelisted for the connection request.

## Example
* Provide a button for the user to connect wallet. Clicking this button should call the `connectWallet` method.

```javascript
<button class="connectWalletButton">Connect Wallet</button>
const connectWalletButton = document.querySelector('.connectWalletButton');

connectWalletButton.addEventListener('click', async () => {
try {
await window.welldone.connectWallet();
} catch (error) {
// {message: 'User rejected the connection' || 'User closed the popup'}
}
});
```
17 changes: 17 additions & 0 deletions docs/getting-started/detecting-provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar_position: 1
---
# Detecting the Provider
* You can know if WELLDONE Wallet is installed on the user device by checking `window.welldone`. If `window.welldone` returns undefined, the wallet is not installed. However, `window.welldone` will definitely return Welldone.
* There is a way to use the wallet. Refer to the example below.

```javascript
const getProvider = () => {
if (!window.welldone) {
alert("Please install WELLDONE Wallet extension");
} else {
const provider = window.welldone;
return provider;
}
};
```
37 changes: 37 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 1
---

# Introduction
Welcome to WELLDONE Wallet. Over the past month, we have developed a multi-purpose blockchain infrastructure wallet with a user-friendly interface. The result is an app that supports Cosmos, Ethereum, and EVMOS. You can access the WELLDONE project through the official landing page. And you can download and use our Multi-chain Wallet through the Chrome web store.

## What is the WELLDONE Wallet
* WELLDONE Wallet is a one-of-a-kind wallet for multi-chain assets. It is a multi-chain wallet that gives you control over all your coins from a single platform and your assets use just as you wish across different networks without restraints.
* Its two main functions are called
* Universal Provider
* KMS

### Universal Provider
* Universal Provider is our key mechanism that integrates Web 3.0 providers into a single standardized API. Our wallet facilitates injection across multiple networks through the Universal Provider, acting as a multi-chain integration tool for developers. This means our users can access and develop services for different protocols through a single provider which can save some valuable time.

### KMS
* KMS is our key function in a non-custodial wallet that does not require your private key. Only you (not even us) have access to all your assets which makes our wallet even more secure and safe for all our users. Safe yet extensive, our wallet is a one-of-a-kind crypto wallet that manages multi-chain assets with a single UX.

## What problem is WELLDONE Wallet trying to solve?
* While the Blockchain interchain ecosystem is growing rapidly, we felt there was still a notable lack of user-oriented infrastructure– this was our main motive for building our own wallet.
* As wallet compatibility varies by blockchain, users have to create numerous wallets to access different networks. Consequently, users can end up having to juggle a host of addresses and private keys. Developers also have to download, develop and test all the wallets they use.

## What's next for WELLDONE Wallet
* We created WELLDONE Wallet with three core objectives in mind. Creating a one-of-a-kind wallet for multi-chain assets, providing better infrastructure to lower barriers for developers, and developing a cross-chain bridge.
* By developing a one-of-a-kind wallet for multi-chain assets (KMS), we optimize your user experience.
* By building solid infrastructure (Universal Provider), we lower the barriers to entry for developers, so that more players can contribute to the ecosystem.
* Finally, by developing a cross-chain bridge, we can enable users to easily switch chains via their WELLDONE wallets. Rather than simply providing access to all assets in one wallet, we want to enable users to go seamlessly between various chains. So next up is our bridge! Join us, and together let’s bring your finest ideas to life.

## WELLDONE Links
* Landing page: https://welldonestake.io/
* WELLDONE Wallet: https://chrome.google.com/webstore/detail/welldonestake-wallet/bmkakpenjmcpfhhjadflneinmhboecjf
* WELLDONE Bridge: https://bridge.welldonestake.io/
* Universal Develop: https://dev.welldonestake.io/

## WELLDONE Channels
Coming soon!
7 changes: 7 additions & 0 deletions docs/provider-api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Provider API",
"position": 3,
"link": {
"type": "generated-index"
}
}
12 changes: 12 additions & 0 deletions docs/provider-api/chain-names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
sidebar_position: 1
---

# Chain Names
* Here are the chain names that we support. This is the value that fills the 'chain' parameter of our provider method.

| Chain Name | (string) | Chain |
|------------|----------|----------|
| cosmos | | Cosmos |
| ethereum | | Ethereum |
| evmos | | Evmos |
Loading

0 comments on commit bf9ff35

Please sign in to comment.