Skip to content

Commit

Permalink
Merge branch 'main' into feat/visual-regression-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Electron committed Jan 7, 2024
2 parents a051e6a + b436b87 commit b9fd811
Show file tree
Hide file tree
Showing 25 changed files with 1,490 additions and 813 deletions.
15 changes: 15 additions & 0 deletions docs/build/getting-started/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ module.exports = {
type: 'link',
href: 'https://explorer.shimmer.network',
},
{
label: 'Shimmer EVM Explorer',
type: 'link',
href: 'https://explorer.evm.shimmer.network/',
},
{
label: 'Shimmer EVM Toolkit',
type: 'link',
href: 'https://evm-toolkit.evm.shimmer.network/',
},
{
label: 'Shimmer EVM Testnet Toolkit & Faucet',
type: 'link',
href: 'https://evm-toolkit.evm.testnet.shimmer.network/',
},
{
label: 'Testnet Faucet',
type: 'link',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ In the IOTA Identity Framework, you can create a Verifiable Credential with the
- [**Subject**](https://www.w3.org/TR/vc-data-model/#credential-subject): The issuer's claims; a set of objects that contain one or more properties that are each related to a subject.
- [**Issuer**](https://www.w3.org/TR/vc-data-model/#issuer): The identifier of the issuer, typically their [DID](../../explanations/decentralized-identifiers.mdx).
- [**ID**](https://www.w3.org/TR/vc-data-model/#identifiers): Optional URI identifier for the credential.
- [**Issuance Date**](https://www.w3.org/TR/vc-data-model/#issuance-date): Optional timestamp for expressing the date and time when a credential becomes valid.
- [**Issuance Date**](https://www.w3.org/TR/vc-data-model/#issuance-date): Timestamp for expressing the date and time when a credential becomes valid.
- [**Expiration Date**](https://www.w3.org/TR/vc-data-model/#expiration): Optional timestamp for expressing the date and time when a credential ceases to be valid.
- [**Status**](https://www.w3.org/TR/vc-data-model/#status): Optional information used to determine the current status of a credential, i.e. whether or not it has been [revoked](./revocation.mdx).
- [**Schema**](https://www.w3.org/TR/vc-data-model/#data-schemas): Optional list of objects specifying the schema that the data must conform to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ In the `State Metadata` of the Alias Output must be a byte packed payload with h
| Encoding | uint8 | Set to value to **0** to denote JSON encoding without compression. |
| Payload | (uint16)ByteArray | A DID Document and its metadata, where every occurrence of the DID in the document is replaced by `did:0:0`. It must be encoded according to `Encoding`. |

The types are defined in [TIP-21](#data-types--subschema-notation).
The types are defined in [TIP-21](/tips/tips/TIP-0021/#data-types).

#### Payload

Expand Down
96 changes: 62 additions & 34 deletions docs/build/iota-sdk/1.0/docs/getting-started/wasm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ Use the Node.js bindings if you can. The Wasm bindings are just more portable an

:::

### Requirements

- One of the following [Node.js](https://nodejs.org/) versions: '16.x', '18.x';
- [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen). You can install it by running:

```bash
cargo install wasm-bindgen-cli
```

### Install Using a Package Manager

To start using the IOTA SDK in your Wasm project, you can install the IOTA SDK from your package manager of choice:
Expand Down Expand Up @@ -147,51 +156,69 @@ A bundler such as [webpack](https://webpack.js.org/) or [rollup](https://rollupj

After you [installed the library](#install-the-iota-sdk), you can create a `Client` instance and interface with it.

The following example creates a [`Client`](https://wiki.iota.org/shimmer/iota-sdk/references/nodejs/classes/Client/)
instance connected to
the [Shimmer Testnet](https://api.testnet.shimmer.network), and retrieves the node's information by
calling [`Client.getInfo()`](https://wiki.iota.org/shimmer/iota-sdk/references/nodejs/classes/Client/#getinfo),
and then print the node's information.

<Tabs groupId="usage" queryString>
<TabItem value="Web" label="Web">
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/client/getting-started.ts#L4-L23
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/README.md#L151-L168
```

</div>
</TabItem>
<TabItem value="Node.js" label="Node.js">
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/README.md#L127-L145
```

</div>
</TabItem>
</Tabs>

### Wallet

After you [installed the library](#installing-the-iota-sdk), you can create a `Wallet` instance and interact with it.

The following example will create a
new [`Wallet`](https://wiki.iota.org/iota-sdk/references/nodejs/classes/Wallet/) [`Account`](https://wiki.iota.org/iota-sdk/references/nodejs/classes/Account/)
that connects to the [Shimmer Testnet](https://api.testnet.shimmer.network) using the
[`MnemonicSecretManager`](https://wiki.iota.org/iota-sdk/references/nodejs/interfaces/MnemonicSecretManager/)
by calling
the [`Wallet.createAccount(data)`](https://wiki.iota.org/iota-sdk/references/nodejs/classes/Wallet/#createaccount)
function.


<Tabs groupId="usage" queryString>
<TabItem value="Web" label="Web">
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/wallet/getting-started.ts#L4-L60
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/README.md#L214-L239
```

### Web Usage

```javascript
import init, {Wallet, CoinType} from "@iota/sdk-wasm/web";

init().then(() => {
const wallet = new Wallet({
storagePath: './my-database',
coinType: CoinType.Shimmer,
clientOptions: {
nodes: ['https://api.testnet.shimmer.network'],
},
secretManager: {
mnemonic: "my development mnemonic",
},
});

const account = await wallet.createAccount({
alias: 'Alice',
});

account.addresses().then((addresses) => {
console.log(addresses);
});
}).catch(console.error);

// Default path to load is "iota_sdk_wasm_bg.wasm",
// but you can override it by passing a path explicitly.
//
// init("./static/iota_sdk_wasm_bg.wasm").then(...)
</div>
</TabItem>
<TabItem value="Node.js" label="Node.js">
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/README.md#L184-L208
```

## What's next?

</div>
</TabItem>
</Tabs>

## What's Next?

### How-To Guides

Expand All @@ -218,4 +245,5 @@ yarn run-example examples/client/00_get_info.ts

## API Reference

The IOTA SDK Rust API Reference is in the [crate documentation](https://docs.rs/iota-sdk/latest/iota_sdk/).
If you are using the Wasm binding, you use the Node.js API reference in the
[IOTA Wiki](https://wiki.iota.org/shimmer/iota-sdk/references/nodejs/api_ref/).
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ A, and the owner of the foundry wishes to register the ERC20 contract on chain
B. In that case, the owner must call this endpoint on chain A with `target =
chain B`. The request to chain B is then sent as an on-ledger request.
After a few minutes, call
[`getERC20ExternalNativeTokensAddress`](#geterc20externalnativetokensaddress)
[`getERC20ExternalNativeTokenAddress`](#geterc20externalnativetokenaddress)
on chain B to find out the address of the ERC20 contract.

#### Parameters
Expand Down Expand Up @@ -138,7 +138,7 @@ The call will fail if the address is taken by another collection with the same p

## Views

### `getERC20ExternalNativeTokensAddress`
### `getERC20ExternalNativeTokenAddress`

Returns the address of an ERC20 contract registered with
[`registerERC20NativeTokenOnRemoteChain`](#registererc20nativetokenonchain).
Expand Down
24 changes: 11 additions & 13 deletions docs/get-started/introduction/iota/staking.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Staking IOTA
description: Everything you need to know about all the different upcoming staking opportunities in the IOTA, and Shimmer network.
description: Everything you need to know about the different staking opportunities in the IOTA and Shimmer networks.
keywords:
- staking IOTA
- Shimmer network
Expand All @@ -9,8 +9,8 @@ keywords:

# Staking in the IOTA Network Ecosystem

IOTA introduced a new network that will exist next to the main network: the Shimmer staging network. This marks a historical event and a vast increase of utility for the IOTA token.
Shimmer will launch with its own native tokens: SMR. With the new _tokenomics_ and incentive structure around this network, it is now possible to stake tokens.
In 2022, IOTA introduced a new staging network and battlefield for IOTA's core technological innovations: Shimmer. This marked a vast increase in the utility of the IOTA token.
Shimmer launched with its native tokens: SMR. With the _tokenomics_ and incentive structure around this network, it is possible to stake tokens.

:::info

Expand All @@ -21,26 +21,24 @@ Find the announcement of the start of IOTA staking [here](https://blog.iota.org/

There are several ways to stake your tokens and earn staking rewards:

- Shimmer pre-launch staking to create the initial token supply for SMR and distribute it to those who stake their IOTA tokens.
- SMR token staking to help testing on the Shimmer network and to support the network.
- Shimmer pre-launch staking created the initial token supply for SMR and distributed it to those who stake their IOTA tokens.
- SMR token staking helps testing on the Shimmer network and supports the network.

## Shimmer Pre-launch Staking

This staking period aims to reward IOTA token holders for their participation and distribute tokens of the two new networks to them. In the case of Shimmer, it also creates the total initial supply of the network.
The Pre-launch staking period rewarded IOTA token holders for their participation and distributed SMR tokens to them. In the case of Shimmer, it also created the total initial supply of the network.

Starting from 28th December 2021, 3 p.m. CET, IOTA holders that possess IOTA tokens in the Firefly wallet and have chosen to participate in the staking period generated Shimmer tokens for 90 days.
Starting from 28th December 2021, IOTA holders who possess IOTA tokens in the Firefly wallet and who had chosen to participate in the staking period generated Shimmer tokens for 90 days.

The Shimmer staking period was limited to these initial 90 days.

### IOTA Staking for SMR Rewards

Shimmer, the staging network and battlefield for IOTA's core technology innovations, will be bootstrapped purely from IOTA token stakers. The initial token supply of the Shimmer network will only rely on the amount of IOTA tokens staked for Shimmer in the 90-day staking period, and 80% of the initial supply will be distributed to IOTA token holders, while the remaining 20% will be distributed equally between the Community DAO and the Tangle Ecosystem.
The Shimmer network was bootstrapped purely from IOTA token stakers. The initial token supply of the Shimmer network only relied on the amount of IOTA tokens staked for Shimmer in the 90-day staking period, and 80% of the initial supply was distributed to IOTA token holders, while the remaining 20% was distributed equally between the Community DAO and the Tangle Ecosystem.

- The staking functionality in the Firefly Wallet will be used for Shimmer.
- Shimmer tokens will be distributed at a fixed rate of `1 SMR per 1 MIOTA per milestone`.
- The staking functionality in the Firefly Wallet was used for Shimmer.
- Shimmer tokens were distributed at a fixed rate of `1 SMR per 1 MIOTA per milestone`.

![shimmer staking](/img/learn/iota-token/shimmer-staking.png)

You can read how to stake and calculate the possible rewards [here](https://shimmer.network/claim).

- With the launch of the Shimmer network, these generated Shimmer tokens will be distributed to the IOTA stakers. This distribution will be implemented as a functionality within the Firefly wallet. As long as the Shimmer network is not yet launched, Firefly will hold the record of rewards for the IOTA token holder.
- With the launch of the Shimmer network, the generated Shimmer tokens were distributed to the IOTA stakers. This distribution was implemented as a functionality within the Firefly wallet.
15 changes: 15 additions & 0 deletions docs/get-started/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ module.exports = {
label: 'Shimmer Explorer',
href: 'https://explorer.shimmer.network/',
},
{
type: 'link',
label: 'Shimmer EVM Explorer',
href: 'https://explorer.evm.shimmer.network/',
},
{
type: 'link',
label: 'Shimmer EVM Toolkit',
href: 'https://evm-toolkit.evm.shimmer.network/',
},
{
type: 'doc',
label: 'Shimmer Bridge',
id: 'tools/shimmer-bridge',
},
],
},
'research-papers',
Expand Down
Loading

0 comments on commit b9fd811

Please sign in to comment.