diff --git a/404.html b/404.html index 8c0e185ef..042d4db5e 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Archethic - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/FAQ/aeweb/index.html b/FAQ/aeweb/index.html index 55ea55765..0a5dea0d5 100644 --- a/FAQ/aeweb/index.html +++ b/FAQ/aeweb/index.html @@ -4,13 +4,13 @@ AEWeb | Archethic - - + +
-
Skip to main content

AEWeb

General

How do I redirect my domain names to my websites deployed on the Archethic Blockchain?

All the information regarding DNS configuration is available in the dedicated section.

You will also find examples for Gandi, Cloudflare, and OVH services.

What is the purpose of a .gitignore file?

The .gitignore file serves to exclude specific files and directories from version control with Git. In the context of AEWeb, it's used to prevent the upload and synchronization of configuration and development files that are specific to the Git repository. This ensures that only the essential files of the website are transferred during the upload process.

Currently, the AEWeb CLI is not directly connected to the wallet. Therefore, it is necessary to provision the chain that will host the files in order to pay the transaction fees. However, you can still use the wallet's keychain by retrieving the passphrase and utilizing the wallet's service to send funds to the service hosting the image, just as if you were performing the action directly from the wallet.

Here's an example using the Testnet:

aeweb deploy --seed myseedphrase --endpoint https://testnet.archethic.net --path ./website --keychain-funding-service "archethic-wallet-ALICE" --keychain-website-service myImageAEWeb
- - +
Skip to main content

AEWeb

General

How do I redirect my domain names to my websites deployed on the Archethic Blockchain?

All the information regarding DNS configuration is available in the dedicated section.

You will also find examples for Gandi, Cloudflare, and OVH services.

What is the purpose of a .gitignore file?

The .gitignore file serves to exclude specific files and directories from version control with Git. In the context of AEWeb, it's used to prevent the upload and synchronization of configuration and development files that are specific to the Git repository. This ensures that only the essential files of the website are transferred during the upload process.

Currently, the AEWeb CLI is not directly connected to the wallet. Therefore, it is necessary to provision the chain that will host the files in order to pay the transaction fees. However, you can still use the wallet's keychain by retrieving the passphrase and utilizing the wallet's service to send funds to the service hosting the image, just as if you were performing the action directly from the wallet.

Here's an example using the Testnet:

aeweb deploy --seed myseedphrase --endpoint https://testnet.archethic.net --path ./website --keychain-funding-service "archethic-wallet-ALICE" --keychain-website-service myImageAEWeb
+ + \ No newline at end of file diff --git a/FAQ/bridge-2-ways/index.html b/FAQ/bridge-2-ways/index.html index 198eb7ded..f02a59184 100644 --- a/FAQ/bridge-2-ways/index.html +++ b/FAQ/bridge-2-ways/index.html @@ -4,12 +4,12 @@ Archethic Bridge 2-ways | Archethic - - + +
-
Skip to main content

Archethic Bridge 2-ways

General

What is Archethic Bridge two-ways?

The Archethic Bridge two-ways is a decentralized, peer-to-peer bridge that enables the seamless exchange of UCO ERC20 tokens and other major cryptocurrencies like ETH, MATIC, and BNB between the Archethic blockchain and various other blockchains, including Ethereum, Polygon, and BSC. This functionality allows for the transfer of these assets into their equivalent forms on Archethic, such as aeETH, aeMATIC, and aeBNB, providing a secure and straightforward method for exchanging assets. The bridge utilizes atomic swap technology, specifically Hash Time Lock Contracts (HTLC), to facilitate secure and intermediary-free transactions. Moreover, it incorporates Archethic's unique cross-chain verification technique, enhancing the security and decentralization of these exchanges. This two-way bridge significantly expands the interoperability between Archethic and other blockchain networks, allowing for greater flexibility and integration within the broader blockchain ecosystem.

How to access the Archethic Bridge ?

You can access the bridge at : https://bridge.testnet.archethic.net

Which blockchain is better to bridge my UCOs?

Using the 3 blockchains, the result will be the same, but fees are not the same between ETH/MATIC/BSC. +

Archethic Bridge 2-ways

General

What is Archethic Bridge two-ways?

The Archethic Bridge two-ways is a decentralized, peer-to-peer bridge that enables the seamless exchange of UCO ERC20 tokens and other major cryptocurrencies like ETH, MATIC, and BNB between the Archethic blockchain and various other blockchains, including Ethereum, Polygon, and BSC. This functionality allows for the transfer of these assets into their equivalent forms on Archethic, such as aeETH, aeMATIC, and aeBNB, providing a secure and straightforward method for exchanging assets. The bridge utilizes atomic swap technology, specifically Hash Time Lock Contracts (HTLC), to facilitate secure and intermediary-free transactions. Moreover, it incorporates Archethic's unique cross-chain verification technique, enhancing the security and decentralization of these exchanges. This two-way bridge significantly expands the interoperability between Archethic and other blockchain networks, allowing for greater flexibility and integration within the broader blockchain ecosystem.

How to access the Archethic Bridge ?

You can access the bridge at : https://bridge.testnet.archethic.net

Which blockchain is better to bridge my UCOs?

Using the 3 blockchains, the result will be the same, but fees are not the same between ETH/MATIC/BSC. MATIC has the lowest fees.

bridge-blockchains

What blockchains does the Archethic Bridge support?

The Archethic Bridge currently supports bridging between the Archethic blockchain and various EVM (Ethereum Virtual Machine) compatible blockchains.

Is the Archethic Bridge available on mobile devices?

No, the Archethic Bridge application is designed exclusively for desktop use and is compatible with macOS, Linux, and Windows operating systems.

What is an EVM wallet?

An EVM (Ethereum Virtual Machine) wallet is a digital wallet designed to interact with blockchains that are compatible with the Ethereum Virtual Machine. EVM wallets can store, send, and receive Ether (ETH) and other EVM-compatible tokens, execute smart contracts, and interact with decentralized applications (dApps) on EVM-compatible networks.

How is the price of $UCO estimated?

The price of $UCO is determined using an Archethic Oracle that consolidates information from various sources, including Coingecko and CoinMarketCap.

How long is the predetermined time?

The timelock lasts 2 hours.

Key Concepts

What is an HTLC (Hash Time Lock Contract) in the context of Archethic's bridge?

HTLC stands for Hash Time Lock Contract. In Archethic's bridge, it is a type of contract used in atomic swaps to securely exchange assets in a peer-to-peer manner without intermediaries. These contracts lock funds until a secret is revealed or a specified time period elapses, ensuring a secure and reversible asset exchange.

How does Archethic's cross-chain verification work?

Archethic's cross-chain verification enhances atomic swaps by allowing data retrieval outside of the blockchain. This makes the process fully decentralized and strengthens the security model. Archethic's nodes can verify transaction status on other chains, like EVM blockchains, establishing a strong consensus on the status of a swap.

What is the Safety Module in Archethic's bridge?

The Safety Module in Archethic's bridge is a reserve of tokens designed to mitigate risks associated with asset bridging. It addresses potential deficiencies and disruptions in bridge operations by providing a token reserve that matches the amount in each pool at launch. This module is funded by fees from transfers and is managed by a multisignature wallet governed by the bridge's governance.

Specifics of Bridging

How does the process of bridging from EVM to Archethic work?

To bridge from EVM to Archethic, a user deploys an HTLC smart contract on both blockchains. The process involves locking funds using a secret and its hash, verifying the transaction across chains, minting new tokens on Archethic, and transferring funds to respective recipient wallets. The entire process is secured by atomic swaps and Archethic's cross-chain verification.

What is the process for bridging from Archethic to EVM?

Bridging from Archethic to EVM follows a similar pattern but in reverse. It introduces an additional step where EVM cannot directly request information from the blockchain. Instead, cryptography is used to assert actions through signatures, ensuring non-repudiation. This involves creating and funding HTLC contracts on both blockchains, revealing secrets, and transferring funds securely.

Wallet

I’m using the Mainnet network in the Wallet, how can I switch on the Testnet?

The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don’t forget the 24 words) and create/import a wallet on the Testnet network.

Why can't I connect to the Archethic wallet with my Brave browser?

Brave includes a shield feature that might block certain local connections. To successfully connect to the Archethic wallet, you'll need to modify the Brave browser’s shield settings as per its documentation

Testnet

How do I set up Ethereum Sepolia, Binance Testnet and Polygon Mumbai in my EVM Wallet?

To configure these networks in your EVM Wallet, you'll need to go to the wallet's settings and manually add each network using the Chain ID and Explorer URL provided above.

Ethereum Sepolia Testnet:
URL RPC: Choose a RPC server address: https://chainlist.org/chain/11155111
@@ -29,8 +29,8 @@ $UCO contract address: 0x8a3d77e9d6968b780564936d15B09805827C21fa

Polygon: https://app.uniswap.org/
$UCO contract address: 0x3c720206bfacb2d16fa3ac0ed87d2048dbc401fc

BSC: https://pancakeswap.finance/liquidity?chain=bscTestnet
$UCO contract address: 0xb001f1e7c8bda414ac7cf7ecba5469fe8d24b6de

Ensure that you connect your wallet to the respective DEX platform and follow the instructions to make the swap.

Issues management

What happens if a problem occurs, or I refuse a transaction during the transfer?

During the delay of the acknowledgment, you should wait for the end of the duration, and you can tell the refund of your ERC20 Wallet with the "Refund" button available on your Archethic Bridge application.

If I sent the tokens to a wrong Mainnet address, what to do?

You lose the tokens if the Mainnet address is not your address. Same thing if you do an error in the address (for example a 0 instead of 1).

Can I help the developers analyze the problems?

You can help developers improve the application by submitting information that describes the state of the application. -To do this, you can copy/paste your transaction from your local history in the application.


- - +To do this, you can copy/paste your transaction from your local history in the application.


+ + \ No newline at end of file diff --git a/FAQ/bridge/index.html b/FAQ/bridge/index.html index 2b4d687ba..b06d0128b 100644 --- a/FAQ/bridge/index.html +++ b/FAQ/bridge/index.html @@ -4,19 +4,19 @@ Archethic Bridge $UCO one-way | Archethic - - + +
-
Skip to main content

Archethic Bridge $UCO one-way

General

What is Archethic Bridge $UCO one-way?

Archethic's bridge relies on atomic swap technology to have a transactional agreement used in the cryptocurrency to transfer funds after acknowledgment of a cryptographic proof of payment. +

Archethic Bridge $UCO one-way

General

What is Archethic Bridge $UCO one-way?

Archethic's bridge relies on atomic swap technology to have a transactional agreement used in the cryptocurrency to transfer funds after acknowledgment of a cryptographic proof of payment. This acknowledgment must be done in a predetermined time (known as timelock). After this time, you can claim your funds, so your UCO will be refunded into your ERC20 wallet.

how to access the Archethic Bridge $UCO one-way?

You can access the bridge at : https://bridge.archethic.net

How long is the predetermined time?

The timelock lasts 2 hours.

Which blockchain is better to bridge my UCOs?

Using the 3 blockchains, the result will be the same, but fees are not the same between ETH/MATIC/BSC. MATIC has the lowest fees.

bridge-blockchains

Can you explain the process of moving assets across the crypto bridge on the Archethic blockchain?

Archethic’s bridge leverages Atomic Swap, which is a way to bring safely assets between chains.

By using the bridge, you will create contract on ETH/BSC/MATIC and transfer your UCO in there. This contract is called “Hashed Time-locked contract” where the funds will be locked until the reveal of a secret or after lock time.

Once done, the same will be done on Archethic side. The two chains are now ready to transfer assets. The transfer itself consists of revealing the private part of the secret encoded in the contracts, to allow the exchange.

Once the secret is revealed in one chain, the second can proceed to the reveal, as the secret is now public. Atomic swap provides secure transfers between chains as there is no pool holding all the assets but hard-coding of recipients and rules in a one-time contract.

What types of assets can be moved across the crypto bridge on the Archethic blockchain?

Only UCOs can be “bridged”.

What are the fees associated with using the crypto bridge on the Archethic blockchain?

You would have to pay the fees on ETH/BSC/MATIC to transfers your UCO and proceed to the transfer. -However, you won’t have to pay the fees on Archethic, which is the purpose of the bridge: to get funds on the Archethic’s network.

I want to get the Archethic address from the Wallet app, how can I know it is the Testnet or the Mainnet address?

On the wallet app, from the version 2.0.8, the network is displayed in the main menu (click on the burger icon to access to the main menu).

Metamask

Will the Archethic Network be available on Metamask?

No, Archethic blockchain is not Ethereum Virtual Machine (EVM) compatible.

How can I add a network on Metamask?

Here is a link giving a tutorial to add a custom network RPC on Metamask : https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC

How to install Metamask?

Here is a link giving a tutorial to install Metamask : https://www.coindesk.com/learn/how-to-set-up-a-metamask-wallet

Issues management

What happens if a problem occurs, or I refuse a transaction during the transfer?

During the delay of the acknowledgment, you should wait for the end of the duration, and you can tell the refund of your ERC20 Wallet with the "REFUND" button available on your Archethic Bridge application.

If I sent the tokens to a wrong Mainnet address, what to do?

You lose the tokens if the Mainnet address is not your address. Same thing if you do an error in the address (for example a 0 instead of 1).

What if I want to reset the process?

The bridge will only allow one transfer at a time. If you have started a transfer, you must complete it before you can start a new one.

In some cases, a transfer in progress can be resumed at a later stage, for example if you have declined a transaction in your wallet or closed your browser.

If you don't want to continue the current transfer, you can use the 'clear local storage' option to reset the transfer tool and start a new transfer.

Warning: If you clear your local memory, the funds associated with the unfinished transfer will be lost.

Can I help the developers analyze the problems?

You can help developers improve the application by submitting information that describes the state of the application.

To do this, you can export your local storage with the option available on the interface.

Dev

How can developers use Archethic bridge to create new decentralized applications?

Developers can use blockchain bridges to create new decentralized applications by connecting different blockchain networks to enable the movement of assets, data, and information across them.

This allows for the creation of interoperable DApps that can utilize the features and capabilities of multiple blockchain networks.

Developers can use smart contract or atomic swap technology to facilitate the transfer of assets across different networks, and can also use cross-chain data oracles to access off-chain data on different networks.

I’m using the Mainnet network in the Wallet, how can I switch on the Testnet?

The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don’t forget the 24 words) and create/import a wallet on the Testnet network.

- - +However, you won’t have to pay the fees on Archethic, which is the purpose of the bridge: to get funds on the Archethic’s network.

I want to get the Archethic address from the Wallet app, how can I know it is the Testnet or the Mainnet address?

On the wallet app, from the version 2.0.8, the network is displayed in the main menu (click on the burger icon to access to the main menu).

Metamask

Will the Archethic Network be available on Metamask?

No, Archethic blockchain is not Ethereum Virtual Machine (EVM) compatible.

How can I add a network on Metamask?

Here is a link giving a tutorial to add a custom network RPC on Metamask : https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC

How to install Metamask?

Here is a link giving a tutorial to install Metamask : https://www.coindesk.com/learn/how-to-set-up-a-metamask-wallet

Issues management

What happens if a problem occurs, or I refuse a transaction during the transfer?

During the delay of the acknowledgment, you should wait for the end of the duration, and you can tell the refund of your ERC20 Wallet with the "REFUND" button available on your Archethic Bridge application.

If I sent the tokens to a wrong Mainnet address, what to do?

You lose the tokens if the Mainnet address is not your address. Same thing if you do an error in the address (for example a 0 instead of 1).

What if I want to reset the process?

The bridge will only allow one transfer at a time. If you have started a transfer, you must complete it before you can start a new one.

In some cases, a transfer in progress can be resumed at a later stage, for example if you have declined a transaction in your wallet or closed your browser.

If you don't want to continue the current transfer, you can use the 'clear local storage' option to reset the transfer tool and start a new transfer.

Warning: If you clear your local memory, the funds associated with the unfinished transfer will be lost.

Can I help the developers analyze the problems?

You can help developers improve the application by submitting information that describes the state of the application.

To do this, you can export your local storage with the option available on the interface.

Dev

How can developers use Archethic bridge to create new decentralized applications?

Developers can use blockchain bridges to create new decentralized applications by connecting different blockchain networks to enable the movement of assets, data, and information across them.

This allows for the creation of interoperable DApps that can utilize the features and capabilities of multiple blockchain networks.

Developers can use smart contract or atomic swap technology to facilitate the transfer of assets across different networks, and can also use cross-chain data oracles to access off-chain data on different networks.

I’m using the Mainnet network in the Wallet, how can I switch on the Testnet?

The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don’t forget the 24 words) and create/import a wallet on the Testnet network.

+ + \ No newline at end of file diff --git a/FAQ/dex/index.html b/FAQ/dex/index.html new file mode 100644 index 000000000..5b35a35fc --- /dev/null +++ b/FAQ/dex/index.html @@ -0,0 +1,17 @@ + + + + + +Archethic aeSwap | Archethic + + + + +
+
Skip to main content

Archethic aeSwap

General

How to access the Archethic DEX named aeSwap ?

You can access the DEX in testnet at : https://dex.testnet.archethic.net

Is the Archethic DEX available on mobile devices?

No, the Archethic DEX application is designed exclusively for the moment for desktop use and is compatible with macOS, Linux, and Windows operating systems.

How is the price of $UCO estimated?

The price of $UCO is determined using an Archethic Oracle that consolidates information from various sources, including Coingecko and CoinMarketCap.

Wallet

I’m using the Mainnet network in the Wallet, how can I switch on the Testnet?

The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don’t forget the 24 words) and create/import a wallet on the Testnet network.

Why can't I connect to the Archethic wallet with my Brave browser?

Brave includes a shield feature that might block certain local connections. +To successfully connect to the Archethic wallet, you'll need to modify the Brave browser’s shield settings as per its documentation


+ + + + \ No newline at end of file diff --git a/FAQ/wallet/index.html b/FAQ/wallet/index.html index bd5d352e5..77c10fb5a 100644 --- a/FAQ/wallet/index.html +++ b/FAQ/wallet/index.html @@ -4,12 +4,12 @@ Wallet | Archethic - - + +
-
Skip to main content

Wallet

General

How to retrieve the address of my Archethic wallet?

Firstly, you should be aware that your address changes with each transaction.

But don't worry. If you provide an old address to receive funds or tokens, it will still work, and you will receive what you are expecting.

tip

If you do not have an Archethic wallet or address yet, we invite you to refer to the section
"How to create a wallet on the Archethic blockchain?"

Once your wallet is created,
+

Wallet

General

How to retrieve the address of my Archethic wallet?

Firstly, you should be aware that your address changes with each transaction.

But don't worry. If you provide an old address to receive funds or tokens, it will still work, and you will receive what you are expecting.

tip

If you do not have an Archethic wallet or address yet, we invite you to refer to the section
"How to create a wallet on the Archethic blockchain?"

Once your wallet is created,
1) select the account you wish to receive your funds or tokens on via the "Keychain" tab, which lists your accounts and services contained in your decentralized keychain.
2) Once selected, the application will display the "Main" tab, where a "Receive" button is shown.
3) Click on it, and you will get your address, either in the form of a QR Code or in text form by clicking on the icon corresponding to the copy action.

wallet-address

How to create a wallet on the Archethic blockchain?

Firstly, download the wallet version that corresponds to the platform you want to use it on from the Archethic website or the app stores. @@ -21,8 +21,8 @@ 6) After reading the information, click on "I understand".
7) The 24 words of your secret phrase will be displayed.

caution

Do not share them with anyone and write them down so you can confirm them on the following screen.

8) Confirmation requires that the words be put back in order.
9) Once the process of confirming the order of the words in the secret phrase is done, you can select the means to protect your application (PIN code, password, biometrics, YubiKey).
-10) After a few seconds of waiting, your keychain is created with your first account.

You can now enjoy the Archethic ecosystem. Enjoy!

How to create a fungible token on the Archethic Wallet?

1) Open your Archethic Wallet and click on tokens in the main tab.

2) Click on create token.

3) Insert all the information:

  • Name: Name of the token, e.g., "Archethic"
  • Symbol: Symbol of the token, e.g., "UCO"
  • Initial Supply: The maximum supply of your token.

And click on "Create Token".

4) Confirm the transaction.

You have successfully created your Token!

How to create a NFT on the Archethic Wallet?

1) Click on 'NFT' at the bottom right of the application.

2) Choose a category

3) Click on create a NFT

4) Insert all the information:

  • Name: Name of the NFT such as "Archers"
  • Symbol: Symbol such as "UCO"
  • Description: Describe your NFT

5) Import your NFT

6) Go to summary and click on "Create the NFT", confirm the mint

You have successfully created an NFT and can locate it in the category you selected during step 2.

- - +10) After a few seconds of waiting, your keychain is created with your first account.

You can now enjoy the Archethic ecosystem. Enjoy!

How to create a fungible token on the Archethic Wallet?

1) Open your Archethic Wallet and click on tokens in the main tab.

2) Click on create token.

3) Insert all the information:

  • Name: Name of the token, e.g., "Archethic"
  • Symbol: Symbol of the token, e.g., "UCO"
  • Initial Supply: The maximum supply of your token.

And click on "Create Token".

4) Confirm the transaction.

You have successfully created your Token!

How to create a NFT on the Archethic Wallet?

1) Click on 'NFT' at the bottom right of the application.

2) Choose a category

3) Click on create a NFT

4) Insert all the information:

  • Name: Name of the NFT such as "Archers"
  • Symbol: Symbol such as "UCO"
  • Description: Describe your NFT

5) Import your NFT

6) Go to summary and click on "Create the NFT", confirm the mint

You have successfully created an NFT and can locate it in the category you selected during step 2.

+ + \ No newline at end of file diff --git a/assets/js/009f927a.720573e0.js b/assets/js/009f927a.720573e0.js new file mode 100644 index 000000000..93ab37a7e --- /dev/null +++ b/assets/js/009f927a.720573e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7265],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var i=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),c=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},h=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),h=a,f=p["".concat(l,".").concat(h)]||p[h]||u[h]||o;return n?i.createElement(f,r(r({ref:t},d),{},{components:n})):i.createElement(f,r({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,r=new Array(o);r[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,r[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var i=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"replication-attestation",title:"Replication attestation"},r=void 0,s={unversionedId:"learn/sharding/replication-attestation",id:"learn/sharding/replication-attestation",title:"Replication attestation",description:"How to ensure a minimum of confirmation from the storage nodes to ensure the data availability of a given transaction.",source:"@site/docs/learn/sharding/replication-attestation.md",sourceDirName:"learn/sharding",slug:"/learn/sharding/replication-attestation",permalink:"/learn/sharding/replication-attestation",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"replication-attestation",title:"Replication attestation"},sidebar:"docs",previous:{title:"Beacon Explorer",permalink:"/learn/sharding/beacon-chain/explorer"},next:{title:"Tokens",permalink:"/learn/token"}},l={},c=[{value:"Heuristic solution",id:"heuristic-solution",level:2},{value:"Nested replications",id:"nested-replications",level:3},{value:"Client notifications",id:"client-notifications",level:3},{value:"Further improvements",id:"further-improvements",level:2}],d={toc:c},p="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,i.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"How to ensure a minimum of confirmation from the storage nodes to ensure the data availability of a given transaction.\nIf we are not providing this kind of mechanism, we can end up into a network split / mismatch where shards and beacon aren't cross linked.\nAlso we do not want to overload the beacon chain by broadcasting it with hundred of messages for a single transaction summary."),(0,a.kt)("h2",{id:"heuristic-solution"},"Heuristic solution"),(0,a.kt)("p",null,"Each validation node will notify the replications nodes in charge, and wait their confirmations to attest the validity\nand the availability of the transaction in the shard before notifying the beacon chain and the welcome node."),(0,a.kt)("p",null,"In 1st approx, a single notification from the validation nodes is sufficient to ensure the availability. This attestation will contain a list of signatures,\nfrom the replication nodes, to status about their commitment to store the transaction.\nHowever, further attestations and confirmations can be checked later during the time, to provide more security."),(0,a.kt)("p",null,"For example, a beacon chain receiving 1 attestation from a validation node including X storage confirmations\nwill be valid as 3 attestations with their respective confirmations."),(0,a.kt)("h3",{id:"nested-replications"},"Nested replications"),(0,a.kt)("p",null,"Moreover, when we are dealing with recipients for transfer or smart contract calls, we want to support the recipients shards will be notified\nonly when the main transaction is validated and stored.\nSo for example, the replication can be splitted by levels: ","[ Main Chain ]"," -> ","[ Recipient Chains]"),(0,a.kt)("p",null,"Then the welcome node will be notified by a validation node with a given number of replica confirmations."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," V1\n / | \\\nChain: S1 S2 S3\n / | \\\n Recipient Shards\n")),(0,a.kt)("h3",{id:"client-notifications"},"Client notifications"),(0,a.kt)("p",null,"When a transaction is submitted, the welcome node will transfer this transaction to the validation nodes and return a pending status to the client.\nThe client would have to subscribe to notifications about the completion of the transaction.\nOnce the transaction will be validated and the validation nodes by notifing the welcome will notify the clients asynchronously."),(0,a.kt)("h2",{id:"further-improvements"},"Further improvements"),(0,a.kt)("p",null,"To reduce the overall size of the attestations and confirmations we can support signature aggregation or cosigning to embed a single transaction with a bitfield\nto indicate which nodes signed the transaction replication, which will be signed over by a validation node."))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/009f927a.804ed09a.js b/assets/js/009f927a.804ed09a.js deleted file mode 100644 index f40d1f1ed..000000000 --- a/assets/js/009f927a.804ed09a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7265],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var i=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),c=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},h=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),h=a,f=p["".concat(l,".").concat(h)]||p[h]||u[h]||o;return n?i.createElement(f,r(r({ref:t},d),{},{components:n})):i.createElement(f,r({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,r=new Array(o);r[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,r[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var i=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"replication-attestation",title:"Replication attestation"},r=void 0,s={unversionedId:"learn/sharding/replication-attestation",id:"learn/sharding/replication-attestation",title:"Replication attestation",description:"How to ensure a minimum of confirmation from the storage nodes to ensure the data availability of a given transaction.",source:"@site/docs/learn/sharding/replication-attestation.md",sourceDirName:"learn/sharding",slug:"/learn/sharding/replication-attestation",permalink:"/learn/sharding/replication-attestation",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"replication-attestation",title:"Replication attestation"},sidebar:"docs",previous:{title:"Beacon Explorer",permalink:"/learn/sharding/beacon-chain/explorer"},next:{title:"Tokens",permalink:"/learn/token"}},l={},c=[{value:"Heuristic solution",id:"heuristic-solution",level:2},{value:"Nested replications",id:"nested-replications",level:3},{value:"Client notifications",id:"client-notifications",level:3},{value:"Further improvements",id:"further-improvements",level:2}],d={toc:c},p="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,i.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"How to ensure a minimum of confirmation from the storage nodes to ensure the data availability of a given transaction.\nIf we are not providing this kind of mechanism, we can end up into a network split / mismatch where shards and beacon aren't cross linked.\nAlso we do not want to overload the beacon chain by broadcasting it with hundred of messages for a single transaction summary."),(0,a.kt)("h2",{id:"heuristic-solution"},"Heuristic solution"),(0,a.kt)("p",null,"Each validation node will notify the replications nodes in charge, and wait their confirmations to attest the validity\nand the availability of the transaction in the shard before notifying the beacon chain and the welcome node."),(0,a.kt)("p",null,"In 1st approx, a single notification from the validation nodes is sufficient to ensure the availability. This attestation will contain a list of signatures,\nfrom the replication nodes, to status about their commitment to store the transaction.\nHowever, further attestations and confirmations can be checked later during the time, to provide more security."),(0,a.kt)("p",null,"For example, a beacon chain receiving 1 attestation from a validation node including X storage confirmations\nwill be valid as 3 attestations with their respective confirmations."),(0,a.kt)("h3",{id:"nested-replications"},"Nested replications"),(0,a.kt)("p",null,"Moreover, when we are dealing with recipients for transfer or smart contract calls, we want to support the recipients shards will be notified\nonly when the main transaction is validated and stored.\nSo for example, the replication can be splitted by levels: ","[ Main Chain ]"," -> ","[ Recipient Chains]"),(0,a.kt)("p",null,"Then the welcome node will be notified by a validation node with a given number of replica confirmations."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," V1\n / | \\\nChain: S1 S2 S3\n / | \\\n Recipient Shards\n")),(0,a.kt)("h3",{id:"client-notifications"},"Client notifications"),(0,a.kt)("p",null,"When a transaction is submitted, the welcome node will transfer this transaction to the validation nodes and return a pending status to the client.\nThe client would have to subscribe to notifications about the completion of the transaction.\nOnce the transaction will be validated and the validation nodes by notifing the welcome will notify the clients asynchronously."),(0,a.kt)("h2",{id:"further-improvements"},"Further improvements"),(0,a.kt)("p",null,"To reduce the overall size of the attestations and confirmations we can support signature aggregation or cosigning to embed a single transaction with a bitfield\nto indicate which nodes signed the transaction replication, which will be signed over by a validation node."))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0126df03.16c8564d.js b/assets/js/0126df03.16c8564d.js new file mode 100644 index 000000000..0d57cd061 --- /dev/null +++ b/assets/js/0126df03.16c8564d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5295],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),s=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},d=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=s(a),u=n,b=p["".concat(i,".").concat(u)]||p[u]||m[u]||l;return a?r.createElement(b,c(c({ref:t},d),{},{components:a})):r.createElement(b,c({ref:t},d))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,c=new Array(l);c[0]=u;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o[p]="string"==typeof e?e:n,c[1]=o;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>s,contentTitle:()=>o,default:()=>y,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var r=a(87462),n=a(67294),l=a(3905);a(8209);const c={id:"oracle-data",title:"OracleData",hide_table_of_contents:!1},o=void 0,i={unversionedId:"build/api/schema/objects/oracle-data",id:"build/api/schema/objects/oracle-data",title:"OracleData",description:"[OracleData] represents an oracle data.",source:"@site/docs/build/api/schema/objects/oracle-data.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/oracle-data",permalink:"/build/api/schema/objects/oracle-data",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"oracle-data",title:"OracleData",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Node",permalink:"/build/api/schema/objects/node"},next:{title:"OracleServices",permalink:"/build/api/schema/objects/oracle-services"}},s={},d=[{value:"Fields",id:"fields",level:3},{value:'OracleData.servicesOracleServices ',id:"code-style-fontweight-normal-oracledatabservicesbcodeoracleservices-",level:4},{value:'OracleData.timestampTimestamp ',id:"code-style-fontweight-normal-oracledatabtimestampbcodetimestamp-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,l.kt)(n.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:m,Badge:u},f="wrapper";function y(e){let{components:t,...a}=e;return(0,l.kt)(f,(0,r.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"[OracleData]"," represents an oracle data."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"type OracleData {\n services: OracleServices\n timestamp: Timestamp\n}\n")),(0,l.kt)("h3",{id:"fields"},"Fields"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-oracledatabservicesbcodeoracleservices-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"OracleData.",(0,l.kt)("b",null,"services"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/oracle-services"},(0,l.kt)("inlineCode",{parentName:"a"},"OracleServices"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-oracledatabtimestampbcodetimestamp-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"OracleData.",(0,l.kt)("b",null,"timestamp"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,l.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,l.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"returned-by"},"Returned by"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/queries/oracle-data"},(0,l.kt)("inlineCode",{parentName:"a"},"oracleData"))," ",(0,l.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/oracle-update"},(0,l.kt)("inlineCode",{parentName:"a"},"oracleUpdate"))," ",(0,l.kt)(u,{class:"secondary",text:"subscription",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/0126df03.f39ea95c.js b/assets/js/0126df03.f39ea95c.js deleted file mode 100644 index 3ec292371..000000000 --- a/assets/js/0126df03.f39ea95c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5295],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),s=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},d=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=s(a),u=n,b=p["".concat(i,".").concat(u)]||p[u]||m[u]||l;return a?r.createElement(b,c(c({ref:t},d),{},{components:a})):r.createElement(b,c({ref:t},d))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,c=new Array(l);c[0]=u;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o[p]="string"==typeof e?e:n,c[1]=o;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>s,contentTitle:()=>o,default:()=>y,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var r=a(87462),n=a(67294),l=a(3905);a(8209);const c={id:"oracle-data",title:"OracleData",hide_table_of_contents:!1},o=void 0,i={unversionedId:"build/api/schema/objects/oracle-data",id:"build/api/schema/objects/oracle-data",title:"OracleData",description:"[OracleData] represents an oracle data.",source:"@site/docs/build/api/schema/objects/oracle-data.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/oracle-data",permalink:"/build/api/schema/objects/oracle-data",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"oracle-data",title:"OracleData",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Node",permalink:"/build/api/schema/objects/node"},next:{title:"OracleServices",permalink:"/build/api/schema/objects/oracle-services"}},s={},d=[{value:"Fields",id:"fields",level:3},{value:'OracleData.servicesOracleServices ',id:"code-style-fontweight-normal-oracledatabservicesbcodeoracleservices-",level:4},{value:'OracleData.timestampTimestamp ',id:"code-style-fontweight-normal-oracledatabtimestampbcodetimestamp-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,l.kt)(n.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:m,Badge:u},f="wrapper";function y(e){let{components:t,...a}=e;return(0,l.kt)(f,(0,r.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"[OracleData]"," represents an oracle data."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"type OracleData {\n services: OracleServices\n timestamp: Timestamp\n}\n")),(0,l.kt)("h3",{id:"fields"},"Fields"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-oracledatabservicesbcodeoracleservices-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"OracleData.",(0,l.kt)("b",null,"services"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/oracle-services"},(0,l.kt)("inlineCode",{parentName:"a"},"OracleServices"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-oracledatabtimestampbcodetimestamp-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"OracleData.",(0,l.kt)("b",null,"timestamp"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,l.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,l.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"returned-by"},"Returned by"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/queries/oracle-data"},(0,l.kt)("inlineCode",{parentName:"a"},"oracleData"))," ",(0,l.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/oracle-update"},(0,l.kt)("inlineCode",{parentName:"a"},"oracleUpdate"))," ",(0,l.kt)(u,{class:"secondary",text:"subscription",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/02486155.d15ad1d2.js b/assets/js/02486155.3f70acdb.js similarity index 52% rename from assets/js/02486155.d15ad1d2.js rename to assets/js/02486155.3f70acdb.js index 64640a1de..cf6d8a0a8 100644 --- a/assets/js/02486155.d15ad1d2.js +++ b/assets/js/02486155.3f70acdb.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6716],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>y});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=n.createContext({}),s=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},m=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,m=c(e,["components","mdxType","originalType","parentName"]),u=s(a),d=r,y=u["".concat(l,".").concat(d)]||u[d]||p[d]||i;return a?n.createElement(y,o(o({ref:t},m),{},{components:a})):n.createElement(y,o({ref:t},m))}));function y(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:r,o[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>d,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>s,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=a(87462),r=a(67294),i=a(3905);a(8209);const o={id:"beacon-chain-summary",title:"beaconChainSummary",hide_table_of_contents:!1},c=void 0,l={unversionedId:"build/api/schema/queries/beacon-chain-summary",id:"build/api/schema/queries/beacon-chain-summary",title:"beaconChainSummary",description:"Query the network to get the value of the summary of beacon chain at a specific time or the last value",source:"@site/docs/build/api/schema/queries/beacon-chain-summary.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/beacon-chain-summary",permalink:"/build/api/schema/queries/beacon-chain-summary",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"beacon-chain-summary",title:"beaconChainSummary",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"balance",permalink:"/build/api/schema/queries/balance"},next:{title:"genesisAddress",permalink:"/build/api/schema/queries/genesis-address"}},s={},m=[{value:"Arguments",id:"arguments",level:3},{value:'beaconChainSummary.timestampTimestamp ',id:"code-style-fontweight-normal-beaconchainsummarybtimestampbcodetimestamp-",level:4},{value:"Type",id:"type",level:3},{value:'BeaconChainSummary ',id:"beaconchainsummary-",level:4}],u=()=>(0,i.kt)(r.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,i.kt)(r.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),d=e=>(0,i.kt)(r.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:m,Bullet:u,SpecifiedBy:p,Badge:d},b="wrapper";function h(e){let{components:t,...a}=e;return(0,i.kt)(b,(0,n.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Query the network to get the value of the summary of beacon chain at a specific time or the last value"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"beaconChainSummary(\n timestamp: Timestamp\n): BeaconChainSummary\n")),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybtimestampbcodetimestamp-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"beaconChainSummary.",(0,i.kt)("b",null,"timestamp"))),(0,i.kt)(u,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,i.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,i.kt)(d,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h3",{id:"type"},"Type"),(0,i.kt)("h4",{id:"beaconchainsummary-"},(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,i.kt)(d,{class:"secondary",text:"object",mdxType:"Badge"})),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"[Beacon Chain Summary]"," represents the beacon chain aggregate for a certain date")))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6716],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>y});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=n.createContext({}),s=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},m=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,m=c(e,["components","mdxType","originalType","parentName"]),u=s(a),d=r,y=u["".concat(l,".").concat(d)]||u[d]||p[d]||i;return a?n.createElement(y,o(o({ref:t},m),{},{components:a})):n.createElement(y,o({ref:t},m))}));function y(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:r,o[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>d,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>s,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=a(87462),r=a(67294),i=a(3905);a(8209);const o={id:"beacon-chain-summary",title:"beaconChainSummary",hide_table_of_contents:!1},c=void 0,l={unversionedId:"build/api/schema/queries/beacon-chain-summary",id:"build/api/schema/queries/beacon-chain-summary",title:"beaconChainSummary",description:"Query the network to get the value of the summary of beacon chain at a specific time or the last value",source:"@site/docs/build/api/schema/queries/beacon-chain-summary.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/beacon-chain-summary",permalink:"/build/api/schema/queries/beacon-chain-summary",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"beacon-chain-summary",title:"beaconChainSummary",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"balance",permalink:"/build/api/schema/queries/balance"},next:{title:"genesisAddress",permalink:"/build/api/schema/queries/genesis-address"}},s={},m=[{value:"Arguments",id:"arguments",level:3},{value:'beaconChainSummary.timestampTimestamp ',id:"code-style-fontweight-normal-beaconchainsummarybtimestampbcodetimestamp-",level:4},{value:"Type",id:"type",level:3},{value:'BeaconChainSummary ',id:"beaconchainsummary-",level:4}],u=()=>(0,i.kt)(r.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,i.kt)(r.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),d=e=>(0,i.kt)(r.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:m,Bullet:u,SpecifiedBy:p,Badge:d},b="wrapper";function h(e){let{components:t,...a}=e;return(0,i.kt)(b,(0,n.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Query the network to get the value of the summary of beacon chain at a specific time or the last value"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"beaconChainSummary(\n timestamp: Timestamp\n): BeaconChainSummary\n")),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybtimestampbcodetimestamp-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"beaconChainSummary.",(0,i.kt)("b",null,"timestamp"))),(0,i.kt)(u,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,i.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,i.kt)(d,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h3",{id:"type"},"Type"),(0,i.kt)("h4",{id:"beaconchainsummary-"},(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,i.kt)(d,{class:"secondary",text:"object",mdxType:"Badge"})),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"[Beacon Chain Summary]"," represents the beacon chain aggregate for a certain date")))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/05fd4dd8.2f36699f.js b/assets/js/05fd4dd8.2f36699f.js new file mode 100644 index 000000000..ebb99133b --- /dev/null +++ b/assets/js/05fd4dd8.2f36699f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9174],{3905:(t,e,n)=>{n.d(e,{Zo:()=>p,kt:()=>f});var o=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function a(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var l=o.createContext({}),c=function(t){var e=o.useContext(l),n=e;return t&&(n="function"==typeof t?t(e):a(a({},e),t)),n},p=function(t){var e=c(t.components);return o.createElement(l.Provider,{value:e},t.children)},d="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,l=t.parentName,p=s(t,["components","mdxType","originalType","parentName"]),d=c(n),b=r,f=d["".concat(l,".").concat(b)]||d[b]||u[b]||i;return n?o.createElement(f,a(a({ref:e},p),{},{components:n})):o.createElement(f,a({ref:e},p))}));function f(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,a=new Array(i);a[0]=b;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[d]="string"==typeof t?t:r,a[1]=s;for(var c=2;c{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var o=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"bootstrap",title:"Bootstrap"},a=void 0,s={unversionedId:"build/core/bootstrap",id:"build/core/bootstrap",title:"Bootstrap",description:"When the Archethic node, a task is launched to perform the node bootstrapping to join the network.",source:"@site/docs/build/core/bootstrap.md",sourceDirName:"build/core",slug:"/build/core/bootstrap",permalink:"/build/core/bootstrap",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"bootstrap",title:"Bootstrap"},sidebar:"docs",previous:{title:"P2P availability sampling",permalink:"/build/core/beacon-chain/p2p-sampling"},next:{title:"Cryptography",permalink:"/build/core/cryptography/"}},l={},c=[{value:"Network initizialiation",id:"network-initizialiation",level:2},{value:"First node bootstrapping",id:"first-node-bootstrapping",level:2},{value:"Next time bootstraps",id:"next-time-bootstraps",level:2}],p={toc:c},d="wrapper";function u(t){let{components:e,...n}=t;return(0,r.kt)(d,(0,o.Z)({},p,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"When the Archethic node, a task is launched to perform the node bootstrapping to join the network."),(0,r.kt)("p",null,"To be able to bootstrap a node, we gather connectivity information (IP, Port, Transport, Reward address, Bootstrapping seeds) and also last synchronization date."),(0,r.kt)("p",null,"But a flow is determine to define what is the state of the bootstrap: network initialization, first bootstrap, next bootstrap"),(0,r.kt)("mermaid",{value:"graph TD\n A[Start] --\x3e B{Need to bootstrap ?}\n B --\x3e|Yes| Bootstrap \n B --\x3e|No| End\n Bootstrap --\x3e C{Need to initialize network?}\n C --\x3e|Yes| D(Initialize network)\n C --\x3e|No| E{New node public key ?}\n E --\x3e|Yes| F(New node transaction update)\n E --\x3e|Yes| G(First node transaction)"}),(0,r.kt)("h2",{id:"network-initizialiation"},"Network initizialiation"),(0,r.kt)("p",null,"The first node joining the network will be in charge to initialize the network by defining few transaction chains:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Create first node shared secrets transaction chain with initial dailly nonce"),(0,r.kt)("li",{parentName:"ul"},"Create genesis wallets according to the allocation from the UCO token distribution ")),(0,r.kt)("h2",{id:"first-node-bootstrapping"},"First node bootstrapping"),(0,r.kt)("p",null,"During the first initialization, a node will contact P2P bootstrapping seeds (anchor nodes) to be able to fetch existing nodes."),(0,r.kt)("p",null,"Next a node will create transaction to publish its connectivity and crypto information which will authorize or not new joining node."),(0,r.kt)("p",null,"Once a node is authorized, after the success of this transaction, it can decrypt/load the storage nonce (will be used for self-repair) and start the self-repair initial cycle to sync transactions."),(0,r.kt)("h2",{id:"next-time-bootstraps"},"Next time bootstraps"),(0,r.kt)("p",null,"For further bootstraps, the bootstrap tasks determine if an update is required based on connectivity/crypto information changes, then a transaction is emitted to the node chain."),(0,r.kt)("p",null,"Once validated, the self-repair is also triggered to resync missed transactions."))}u.isMDXComponent=!0},8209:(t,e,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/05fd4dd8.c9d89441.js b/assets/js/05fd4dd8.c9d89441.js deleted file mode 100644 index d3a10db69..000000000 --- a/assets/js/05fd4dd8.c9d89441.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9174],{3905:(t,e,n)=>{n.d(e,{Zo:()=>p,kt:()=>f});var o=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function a(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var l=o.createContext({}),c=function(t){var e=o.useContext(l),n=e;return t&&(n="function"==typeof t?t(e):a(a({},e),t)),n},p=function(t){var e=c(t.components);return o.createElement(l.Provider,{value:e},t.children)},d="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,l=t.parentName,p=s(t,["components","mdxType","originalType","parentName"]),d=c(n),b=r,f=d["".concat(l,".").concat(b)]||d[b]||u[b]||i;return n?o.createElement(f,a(a({ref:e},p),{},{components:n})):o.createElement(f,a({ref:e},p))}));function f(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,a=new Array(i);a[0]=b;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[d]="string"==typeof t?t:r,a[1]=s;for(var c=2;c{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var o=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"bootstrap",title:"Bootstrap"},a=void 0,s={unversionedId:"build/core/bootstrap",id:"build/core/bootstrap",title:"Bootstrap",description:"When the Archethic node, a task is launched to perform the node bootstrapping to join the network.",source:"@site/docs/build/core/bootstrap.md",sourceDirName:"build/core",slug:"/build/core/bootstrap",permalink:"/build/core/bootstrap",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"bootstrap",title:"Bootstrap"},sidebar:"docs",previous:{title:"P2P availability sampling",permalink:"/build/core/beacon-chain/p2p-sampling"},next:{title:"Cryptography",permalink:"/build/core/cryptography/"}},l={},c=[{value:"Network initizialiation",id:"network-initizialiation",level:2},{value:"First node bootstrapping",id:"first-node-bootstrapping",level:2},{value:"Next time bootstraps",id:"next-time-bootstraps",level:2}],p={toc:c},d="wrapper";function u(t){let{components:e,...n}=t;return(0,r.kt)(d,(0,o.Z)({},p,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"When the Archethic node, a task is launched to perform the node bootstrapping to join the network."),(0,r.kt)("p",null,"To be able to bootstrap a node, we gather connectivity information (IP, Port, Transport, Reward address, Bootstrapping seeds) and also last synchronization date."),(0,r.kt)("p",null,"But a flow is determine to define what is the state of the bootstrap: network initialization, first bootstrap, next bootstrap"),(0,r.kt)("mermaid",{value:"graph TD\n A[Start] --\x3e B{Need to bootstrap ?}\n B --\x3e|Yes| Bootstrap \n B --\x3e|No| End\n Bootstrap --\x3e C{Need to initialize network?}\n C --\x3e|Yes| D(Initialize network)\n C --\x3e|No| E{New node public key ?}\n E --\x3e|Yes| F(New node transaction update)\n E --\x3e|Yes| G(First node transaction)"}),(0,r.kt)("h2",{id:"network-initizialiation"},"Network initizialiation"),(0,r.kt)("p",null,"The first node joining the network will be in charge to initialize the network by defining few transaction chains:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Create first node shared secrets transaction chain with initial dailly nonce"),(0,r.kt)("li",{parentName:"ul"},"Create genesis wallets according to the allocation from the UCO token distribution ")),(0,r.kt)("h2",{id:"first-node-bootstrapping"},"First node bootstrapping"),(0,r.kt)("p",null,"During the first initialization, a node will contact P2P bootstrapping seeds (anchor nodes) to be able to fetch existing nodes."),(0,r.kt)("p",null,"Next a node will create transaction to publish its connectivity and crypto information which will authorize or not new joining node."),(0,r.kt)("p",null,"Once a node is authorized, after the success of this transaction, it can decrypt/load the storage nonce (will be used for self-repair) and start the self-repair initial cycle to sync transactions."),(0,r.kt)("h2",{id:"next-time-bootstraps"},"Next time bootstraps"),(0,r.kt)("p",null,"For further bootstraps, the bootstrap tasks determine if an update is required based on connectivity/crypto information changes, then a transaction is emitted to the node chain."),(0,r.kt)("p",null,"Once validated, the self-repair is also triggered to resync missed transactions."))}u.isMDXComponent=!0},8209:(t,e,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0607e0c5.3ad38ed4.js b/assets/js/0607e0c5.3ad38ed4.js deleted file mode 100644 index 377aae73f..000000000 --- a/assets/js/0607e0c5.3ad38ed4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6894],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>b});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,b=p["".concat(s,".").concat(m)]||p[m]||u[m]||o;return n?r.createElement(b,l(l({ref:t},d),{},{components:n})):r.createElement(b,l({ref:t},d))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"version",title:"Version",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/objects/version",id:"build/api/schema/objects/version",title:"Version",description:"[Version] represents code, transaction and protocol version",source:"@site/docs/build/api/schema/objects/version.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/version",permalink:"/build/api/schema/objects/version",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"version",title:"Version",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"ValidationStamp",permalink:"/build/api/schema/objects/validation-stamp"},next:{title:"balance",permalink:"/build/api/schema/queries/balance"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'Version.codeString ',id:"code-style-fontweight-normal-versionbcodebcodestring-",level:4},{value:'Version.protocolString ',id:"code-style-fontweight-normal-versionbprotocolbcodestring-",level:4},{value:'Version.transactionString ',id:"code-style-fontweight-normal-versionbtransactionbcodestring-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(f,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[Version]"," represents code, transaction and protocol version"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type Version {\n code: String\n protocol: String\n transaction: String\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-versionbcodebcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Version.",(0,o.kt)("b",null,"code"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-versionbprotocolbcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Version.",(0,o.kt)("b",null,"protocol"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-versionbtransactionbcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Version.",(0,o.kt)("b",null,"transaction"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/queries/version"},(0,o.kt)("inlineCode",{parentName:"a"},"version"))," ",(0,o.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0607e0c5.b2b7a445.js b/assets/js/0607e0c5.b2b7a445.js new file mode 100644 index 000000000..f11ef1efe --- /dev/null +++ b/assets/js/0607e0c5.b2b7a445.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6894],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>b});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,b=p["".concat(s,".").concat(m)]||p[m]||u[m]||o;return n?r.createElement(b,l(l({ref:t},d),{},{components:n})):r.createElement(b,l({ref:t},d))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"version",title:"Version",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/objects/version",id:"build/api/schema/objects/version",title:"Version",description:"[Version] represents code, transaction and protocol version",source:"@site/docs/build/api/schema/objects/version.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/version",permalink:"/build/api/schema/objects/version",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"version",title:"Version",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"ValidationStamp",permalink:"/build/api/schema/objects/validation-stamp"},next:{title:"balance",permalink:"/build/api/schema/queries/balance"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'Version.codeString ',id:"code-style-fontweight-normal-versionbcodebcodestring-",level:4},{value:'Version.protocolString ',id:"code-style-fontweight-normal-versionbprotocolbcodestring-",level:4},{value:'Version.transactionString ',id:"code-style-fontweight-normal-versionbtransactionbcodestring-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(f,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[Version]"," represents code, transaction and protocol version"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type Version {\n code: String\n protocol: String\n transaction: String\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-versionbcodebcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Version.",(0,o.kt)("b",null,"code"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-versionbprotocolbcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Version.",(0,o.kt)("b",null,"protocol"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-versionbtransactionbcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Version.",(0,o.kt)("b",null,"transaction"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/queries/version"},(0,o.kt)("inlineCode",{parentName:"a"},"version"))," ",(0,o.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0666b85a.1802ae08.js b/assets/js/0666b85a.1802ae08.js deleted file mode 100644 index 24d4dcda7..000000000 --- a/assets/js/0666b85a.1802ae08.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3633],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(n),m=a,f=u["".concat(s,".").concat(m)]||u[m]||d[m]||l;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));n(8209);const l={id:"testnet",title:"Testnet"},o=void 0,i={unversionedId:"build/testnet",id:"build/testnet",title:"Testnet",description:"Local",source:"@site/docs/build/testnet.md",sourceDirName:"build",slug:"/build/testnet",permalink:"/build/testnet",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"testnet",title:"Testnet"},sidebar:"docs",previous:{title:"Fees",permalink:"/build/smart-contracts/fees"},next:{title:"FAQ",permalink:"/category/faq"}},s={},p=[{value:"Local",id:"local",level:2},{value:"Installation",id:"installation",level:3},{value:"Get some funds",id:"get-some-funds",level:3},{value:"Public",id:"public",level:2},{value:"Get some funds",id:"get-some-funds-1",level:3}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"local"},"Local"),(0,a.kt)("p",null,"To test and build on top of Archethic network, we encourage people to test with a local instance."),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Clone the repository: ")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"git clone https://github.com/archethic-foundation/archethic-node.git\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Setup the dev environment:"),(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://elixir-lang.org/install.html"},"Install Elixir")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://nodejs.org/en/download/"},"Install NodeJS")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gmplib.org"},"Install GMP")))),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Fetch the dependencies"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"mix deps.get\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Build web assets")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cd assets ; npm install; cd -\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Start instance")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"iex -S mix\n")),(0,a.kt)("h3",{id:"get-some-funds"},"Get some funds"),(0,a.kt)("p",null,"To be able to fund some addresses, the development mode of the running enable the testnet faucet."),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("p",{parentName:"li"},"Funding"),(0,a.kt)("p",{parentName:"li"},"Browse to the http://localhost:4000/faucet and enter any address to send funds to. "),(0,a.kt)("p",{parentName:"li"},"It should transfer 100 UCO to the given address.")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("p",{parentName:"li"},"Check the balance"),(0,a.kt)("p",{parentName:"li"},"Go to http://localhost:4000/explorer/transaction/{TYPE_YOUR_ADDRESS_IN_HEXADECIMAL}"),(0,a.kt)("p",{parentName:"li"},'It should display 100 unspent outputs (in the "Ledger inputs" section)'))),(0,a.kt)("h2",{id:"public"},"Public"),(0,a.kt)("p",null,"Public testnet is available at ",(0,a.kt)("a",{parentName:"p",href:"https://testnet.archethic.net"},"https://testnet.archethic.net")),(0,a.kt)("h3",{id:"get-some-funds-1"},"Get some funds"),(0,a.kt)("p",null,"You can then go the ",(0,a.kt)("a",{parentName:"p",href:"https://testnet.archethic.net/faucet"},"faucet")," to get free UCOs to experiment the Archethic network"))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0666b85a.dc5ccc49.js b/assets/js/0666b85a.dc5ccc49.js new file mode 100644 index 000000000..522ac3390 --- /dev/null +++ b/assets/js/0666b85a.dc5ccc49.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3633],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(n),m=a,f=u["".concat(s,".").concat(m)]||u[m]||d[m]||l;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));n(8209);const l={id:"testnet",title:"Testnet"},o=void 0,i={unversionedId:"build/testnet",id:"build/testnet",title:"Testnet",description:"Local",source:"@site/docs/build/testnet.md",sourceDirName:"build",slug:"/build/testnet",permalink:"/build/testnet",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"testnet",title:"Testnet"},sidebar:"docs",previous:{title:"Fees",permalink:"/build/smart-contracts/fees"},next:{title:"FAQ",permalink:"/category/faq"}},s={},p=[{value:"Local",id:"local",level:2},{value:"Installation",id:"installation",level:3},{value:"Get some funds",id:"get-some-funds",level:3},{value:"Public",id:"public",level:2},{value:"Get some funds",id:"get-some-funds-1",level:3}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"local"},"Local"),(0,a.kt)("p",null,"To test and build on top of Archethic network, we encourage people to test with a local instance."),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Clone the repository: ")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"git clone https://github.com/archethic-foundation/archethic-node.git\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Setup the dev environment:"),(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://elixir-lang.org/install.html"},"Install Elixir")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://nodejs.org/en/download/"},"Install NodeJS")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gmplib.org"},"Install GMP")))),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Fetch the dependencies"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"mix deps.get\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Build web assets")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cd assets ; npm install; cd -\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Start instance")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"iex -S mix\n")),(0,a.kt)("h3",{id:"get-some-funds"},"Get some funds"),(0,a.kt)("p",null,"To be able to fund some addresses, the development mode of the running enable the testnet faucet."),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("p",{parentName:"li"},"Funding"),(0,a.kt)("p",{parentName:"li"},"Browse to the http://localhost:4000/faucet and enter any address to send funds to. "),(0,a.kt)("p",{parentName:"li"},"It should transfer 100 UCO to the given address.")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("p",{parentName:"li"},"Check the balance"),(0,a.kt)("p",{parentName:"li"},"Go to http://localhost:4000/explorer/transaction/{TYPE_YOUR_ADDRESS_IN_HEXADECIMAL}"),(0,a.kt)("p",{parentName:"li"},'It should display 100 unspent outputs (in the "Ledger inputs" section)'))),(0,a.kt)("h2",{id:"public"},"Public"),(0,a.kt)("p",null,"Public testnet is available at ",(0,a.kt)("a",{parentName:"p",href:"https://testnet.archethic.net"},"https://testnet.archethic.net")),(0,a.kt)("h3",{id:"get-some-funds-1"},"Get some funds"),(0,a.kt)("p",null,"You can then go the ",(0,a.kt)("a",{parentName:"p",href:"https://testnet.archethic.net/faucet"},"faucet")," to get free UCOs to experiment the Archethic network"))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/07620fdf.4845965f.js b/assets/js/07620fdf.4845965f.js new file mode 100644 index 000000000..d89ce068b --- /dev/null +++ b/assets/js/07620fdf.4845965f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3812],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(n),u=r,m=d["".concat(c,".").concat(u)]||d[u]||h[u]||i;return n?a.createElement(m,o(o({ref:t},p),{},{components:n})):a.createElement(m,o({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"cli",title:"AEWeb - CLI",sidebar_label:"CLI",sidebar_position:3},o="AEWeb CLI (Command-Line Interface)",s={unversionedId:"participate/aeweb/usage/cli",id:"participate/aeweb/usage/cli",title:"AEWeb - CLI",description:"Repository//github.com/archethic-foundation/aeweb-cli",source:"@site/docs/participate/aeweb/usage/cli.md",sourceDirName:"participate/aeweb/usage",slug:"/participate/aeweb/usage/cli",permalink:"/participate/aeweb/usage/cli",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:3,frontMatter:{id:"cli",title:"AEWeb - CLI",sidebar_label:"CLI",sidebar_position:3},sidebar:"docs",previous:{title:"Usage",permalink:"/category/usage"},next:{title:"AEWeb Front End",permalink:"/participate/aeweb/usage/aeweb-front"}},c={},l=[{value:"aeweb generate-address",id:"aeweb-generate-address",level:2},{value:"aeweb deploy",id:"aeweb-deploy",level:2}],p={toc:l},d="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"aeweb-cli-command-line-interface"},"AEWeb CLI (Command-Line Interface)"),(0,r.kt)("p",null,"Repository: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb-cli"},"https://github.com/archethic-foundation/aeweb-cli")),(0,r.kt)("p",null,"This tool, built with NodeJS, can be used to deploy files and websites to the Archethic blockchain.\nOnce installed, as instructed in the README, the ",(0,r.kt)("inlineCode",{parentName:"p"},"aeweb")," command is available."),(0,r.kt)("h2",{id:"aeweb-generate-address"},"aeweb generate-address"),(0,r.kt)("p",null,"This command is used to generate an address from a seed. "),(0,r.kt)("admonition",{title:"Use case",type:"info"},(0,r.kt)("p",{parentName:"admonition"},"You might use this on TestNet for example, to determine an address to use the ",(0,r.kt)("a",{parentName:"p",href:"https://testnet.archethic.net/faucet"},"faucet")," on.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"$ aeweb generate-address --seed myseedphrase --index 0\n00005da88a4adaf5b40c958a20db981bd168008e03efbb7fc9d35e11be182a0d3065\n")),(0,r.kt)("h2",{id:"aeweb-deploy"},"aeweb deploy"),(0,r.kt)("p",null,"This command is used to deploy the content of a folder or a single file. It will create the ",(0,r.kt)("a",{parentName:"p",href:"/participate/aeweb/how-it-works"},"transactions"),", estimate the fees and, after confirmation, will write the transactions on the network."),(0,r.kt)("p",null,"Parameters: "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"seed")," The keychain seed, used to prove you are the owner of the transaction chain used to pay the fees"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint")," ",(0,r.kt)("a",{parentName:"li",href:"https://testnet.archethic.net"},"https://testnet.archethic.net")," | ",(0,r.kt)("a",{parentName:"li",href:"https://mainnet.archethic.net"},"https://mainnet.archethic.net")," | ",(0,r.kt)("a",{parentName:"li",href:"http://127.0.0.1:4000"},"http://127.0.0.1:4000")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"path")," The path of the folder/file to upload ")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"$ aeweb deploy --seed myseedphrase --endpoint https://testnet.archethic.net --path ./website\nConnecting to https://testnet.archethic.net \nCreating file structure and compress content...\nCreating transactions ...\nEstimating fees ...\nTotal Fee Requirement would be : 2.58933391 UCO ( $ 0.23 | \u20ac 0.22), for 3 transactions.\nDo you want to continue. (yes/no) yes\nSending 3 transactions...\nTransaction 1...\nWaiting transaction validation...\nTransaction confirmed !\nSee transaction in explorer: https://testnet.archethic.net/explorer/transaction/000013c531...\n-----------\nTransaction 2...\nWaiting transaction validation...\nTransaction confirmed !\nSee transaction in explorer: https://testnet.archethic.net/explorer/transaction/0000a78a35...\n-----------\nTransaction 3...\nWaiting transaction validation...\nTransaction confirmed !\nSee transaction in explorer: https://testnet.archethic.net/explorer/transaction/0000f1126e...\n-----------\nWebsite is deployed at: https://testnet.archethic.net/api/web_hosting/00007d9167...\n")),(0,r.kt)("admonition",{title:"There Can Be Only One",type:"info"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("strong",{parentName:"p"},"There can only be a single deployment per seed.")," Which makes it possible to update it by running the exact same command. The endpoint of your deployment will not change. "),(0,r.kt)("p",{parentName:"admonition"},"If you need to deploy another website, use another seed (and transfer funds to it via the Wallet app).")))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/07620fdf.9bc325e2.js b/assets/js/07620fdf.9bc325e2.js deleted file mode 100644 index a29a3f1ef..000000000 --- a/assets/js/07620fdf.9bc325e2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3812],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(n),u=r,m=d["".concat(c,".").concat(u)]||d[u]||h[u]||i;return n?a.createElement(m,o(o({ref:t},p),{},{components:n})):a.createElement(m,o({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"cli",title:"AEWeb - CLI",sidebar_label:"CLI",sidebar_position:3},o="AEWeb CLI (Command-Line Interface)",s={unversionedId:"participate/aeweb/usage/cli",id:"participate/aeweb/usage/cli",title:"AEWeb - CLI",description:"Repository//github.com/archethic-foundation/aeweb-cli",source:"@site/docs/participate/aeweb/usage/cli.md",sourceDirName:"participate/aeweb/usage",slug:"/participate/aeweb/usage/cli",permalink:"/participate/aeweb/usage/cli",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:3,frontMatter:{id:"cli",title:"AEWeb - CLI",sidebar_label:"CLI",sidebar_position:3},sidebar:"docs",previous:{title:"Usage",permalink:"/category/usage"},next:{title:"AEWeb Front End",permalink:"/participate/aeweb/usage/aeweb-front"}},c={},l=[{value:"aeweb generate-address",id:"aeweb-generate-address",level:2},{value:"aeweb deploy",id:"aeweb-deploy",level:2}],p={toc:l},d="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"aeweb-cli-command-line-interface"},"AEWeb CLI (Command-Line Interface)"),(0,r.kt)("p",null,"Repository: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb-cli"},"https://github.com/archethic-foundation/aeweb-cli")),(0,r.kt)("p",null,"This tool, built with NodeJS, can be used to deploy files and websites to the Archethic blockchain.\nOnce installed, as instructed in the README, the ",(0,r.kt)("inlineCode",{parentName:"p"},"aeweb")," command is available."),(0,r.kt)("h2",{id:"aeweb-generate-address"},"aeweb generate-address"),(0,r.kt)("p",null,"This command is used to generate an address from a seed. "),(0,r.kt)("admonition",{title:"Use case",type:"info"},(0,r.kt)("p",{parentName:"admonition"},"You might use this on TestNet for example, to determine an address to use the ",(0,r.kt)("a",{parentName:"p",href:"https://testnet.archethic.net/faucet"},"faucet")," on.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"$ aeweb generate-address --seed myseedphrase --index 0\n00005da88a4adaf5b40c958a20db981bd168008e03efbb7fc9d35e11be182a0d3065\n")),(0,r.kt)("h2",{id:"aeweb-deploy"},"aeweb deploy"),(0,r.kt)("p",null,"This command is used to deploy the content of a folder or a single file. It will create the ",(0,r.kt)("a",{parentName:"p",href:"/participate/aeweb/how-it-works"},"transactions"),", estimate the fees and, after confirmation, will write the transactions on the network."),(0,r.kt)("p",null,"Parameters: "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"seed")," The keychain seed, used to prove you are the owner of the transaction chain used to pay the fees"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"endpoint")," ",(0,r.kt)("a",{parentName:"li",href:"https://testnet.archethic.net"},"https://testnet.archethic.net")," | ",(0,r.kt)("a",{parentName:"li",href:"https://mainnet.archethic.net"},"https://mainnet.archethic.net")," | ",(0,r.kt)("a",{parentName:"li",href:"http://127.0.0.1:4000"},"http://127.0.0.1:4000")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"path")," The path of the folder/file to upload ")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"$ aeweb deploy --seed myseedphrase --endpoint https://testnet.archethic.net --path ./website\nConnecting to https://testnet.archethic.net \nCreating file structure and compress content...\nCreating transactions ...\nEstimating fees ...\nTotal Fee Requirement would be : 2.58933391 UCO ( $ 0.23 | \u20ac 0.22), for 3 transactions.\nDo you want to continue. (yes/no) yes\nSending 3 transactions...\nTransaction 1...\nWaiting transaction validation...\nTransaction confirmed !\nSee transaction in explorer: https://testnet.archethic.net/explorer/transaction/000013c531...\n-----------\nTransaction 2...\nWaiting transaction validation...\nTransaction confirmed !\nSee transaction in explorer: https://testnet.archethic.net/explorer/transaction/0000a78a35...\n-----------\nTransaction 3...\nWaiting transaction validation...\nTransaction confirmed !\nSee transaction in explorer: https://testnet.archethic.net/explorer/transaction/0000f1126e...\n-----------\nWebsite is deployed at: https://testnet.archethic.net/api/web_hosting/00007d9167...\n")),(0,r.kt)("admonition",{title:"There Can Be Only One",type:"info"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("strong",{parentName:"p"},"There can only be a single deployment per seed.")," Which makes it possible to update it by running the exact same command. The endpoint of your deployment will not change. "),(0,r.kt)("p",{parentName:"admonition"},"If you need to deploy another website, use another seed (and transfer funds to it via the Wallet app).")))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/07f0fc78.694c7008.js b/assets/js/07f0fc78.694c7008.js new file mode 100644 index 000000000..8dcf76b23 --- /dev/null +++ b/assets/js/07f0fc78.694c7008.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2491],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var o=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=o.createContext({}),d=function(e){var t=o.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=d(e.components);return o.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=d(a),u=n,f=p["".concat(s,".").concat(u)]||p[u]||m[u]||r;return a?o.createElement(f,l(l({ref:t},c),{},{components:a})):o.createElement(f,l({ref:t},c))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,l=new Array(r);l[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var d=2;d{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var o=a(87462),n=a(67294),r=a(3905);a(8209);const l={id:"validation-stamp",title:"ValidationStamp",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/objects/validation-stamp",id:"build/api/schema/objects/validation-stamp",title:"ValidationStamp",description:"[ValidationStamp] represents the validation performs by the coordinator",source:"@site/docs/build/api/schema/objects/validation-stamp.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/validation-stamp",permalink:"/build/api/schema/objects/validation-stamp",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"validation-stamp",title:"ValidationStamp",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"UnspentOutput",permalink:"/build/api/schema/objects/unspent-output"},next:{title:"Version",permalink:"/build/api/schema/objects/version"}},d={},c=[{value:"Fields",id:"fields",level:3},{value:'ValidationStamp.ledgerOperationsLedgerOperations ',id:"code-style-fontweight-normal-validationstampbledgeroperationsbcodeledgeroperations-",level:4},{value:'ValidationStamp.proofOfIntegrityHash ',id:"code-style-fontweight-normal-validationstampbproofofintegritybcodehash-",level:4},{value:'ValidationStamp.proofOfWorkPublicKey ',id:"code-style-fontweight-normal-validationstampbproofofworkbcodepublickey-",level:4},{value:'ValidationStamp.protocolVersionInt ',id:"code-style-fontweight-normal-validationstampbprotocolversionbcodeint-",level:4},{value:'ValidationStamp.signatureHex ',id:"code-style-fontweight-normal-validationstampbsignaturebcodehex-",level:4},{value:'ValidationStamp.timestampTimestamp ',id:"code-style-fontweight-normal-validationstampbtimestampbcodetimestamp-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,r.kt)(n.Fragment,null,(0,r.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,r.kt)(n.Fragment,null,"Specification",(0,r.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,r.kt)(n.Fragment,null,(0,r.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:c,Bullet:p,SpecifiedBy:m,Badge:u},b="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(b,(0,o.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"[ValidationStamp]"," represents the validation performs by the coordinator\nIt includes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Proof of work: Public key matching the origin signature"),(0,r.kt)("li",{parentName:"ul"},"Proof of integrity: Hash of the previous proof of integrity and the transaction"),(0,r.kt)("li",{parentName:"ul"},"Ledger operations: All the operations performed by the transaction"),(0,r.kt)("li",{parentName:"ul"},"Signature: Coordinator signature of the stamp"),(0,r.kt)("li",{parentName:"ul"},"Protocol version: Version of the transaction validation protocol")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-graphql"},"type ValidationStamp {\n ledgerOperations: LedgerOperations\n proofOfIntegrity: Hash\n proofOfWork: PublicKey\n protocolVersion: Int\n signature: Hex\n timestamp: Timestamp\n}\n")),(0,r.kt)("h3",{id:"fields"},"Fields"),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbledgeroperationsbcodeledgeroperations-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"ledgerOperations"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/ledger-operations"},(0,r.kt)("inlineCode",{parentName:"a"},"LedgerOperations"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbproofofintegritybcodehash-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"proofOfIntegrity"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hash"},(0,r.kt)("inlineCode",{parentName:"a"},"Hash"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbproofofworkbcodepublickey-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"proofOfWork"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,r.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbprotocolversionbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"protocolVersion"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbsignaturebcodehex-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"signature"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,r.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbtimestampbcodetimestamp-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"timestamp"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,r.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h3",{id:"member-of"},"Member of"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,r.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/07f0fc78.9afc24da.js b/assets/js/07f0fc78.9afc24da.js deleted file mode 100644 index 8e934a9df..000000000 --- a/assets/js/07f0fc78.9afc24da.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2491],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var o=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=o.createContext({}),d=function(e){var t=o.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=d(e.components);return o.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=d(a),u=n,f=p["".concat(s,".").concat(u)]||p[u]||m[u]||r;return a?o.createElement(f,l(l({ref:t},c),{},{components:a})):o.createElement(f,l({ref:t},c))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,l=new Array(r);l[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var d=2;d{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var o=a(87462),n=a(67294),r=a(3905);a(8209);const l={id:"validation-stamp",title:"ValidationStamp",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/objects/validation-stamp",id:"build/api/schema/objects/validation-stamp",title:"ValidationStamp",description:"[ValidationStamp] represents the validation performs by the coordinator",source:"@site/docs/build/api/schema/objects/validation-stamp.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/validation-stamp",permalink:"/build/api/schema/objects/validation-stamp",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"validation-stamp",title:"ValidationStamp",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"UnspentOutput",permalink:"/build/api/schema/objects/unspent-output"},next:{title:"Version",permalink:"/build/api/schema/objects/version"}},d={},c=[{value:"Fields",id:"fields",level:3},{value:'ValidationStamp.ledgerOperationsLedgerOperations ',id:"code-style-fontweight-normal-validationstampbledgeroperationsbcodeledgeroperations-",level:4},{value:'ValidationStamp.proofOfIntegrityHash ',id:"code-style-fontweight-normal-validationstampbproofofintegritybcodehash-",level:4},{value:'ValidationStamp.proofOfWorkPublicKey ',id:"code-style-fontweight-normal-validationstampbproofofworkbcodepublickey-",level:4},{value:'ValidationStamp.protocolVersionInt ',id:"code-style-fontweight-normal-validationstampbprotocolversionbcodeint-",level:4},{value:'ValidationStamp.signatureHex ',id:"code-style-fontweight-normal-validationstampbsignaturebcodehex-",level:4},{value:'ValidationStamp.timestampTimestamp ',id:"code-style-fontweight-normal-validationstampbtimestampbcodetimestamp-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,r.kt)(n.Fragment,null,(0,r.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,r.kt)(n.Fragment,null,"Specification",(0,r.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,r.kt)(n.Fragment,null,(0,r.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:c,Bullet:p,SpecifiedBy:m,Badge:u},b="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(b,(0,o.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"[ValidationStamp]"," represents the validation performs by the coordinator\nIt includes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Proof of work: Public key matching the origin signature"),(0,r.kt)("li",{parentName:"ul"},"Proof of integrity: Hash of the previous proof of integrity and the transaction"),(0,r.kt)("li",{parentName:"ul"},"Ledger operations: All the operations performed by the transaction"),(0,r.kt)("li",{parentName:"ul"},"Signature: Coordinator signature of the stamp"),(0,r.kt)("li",{parentName:"ul"},"Protocol version: Version of the transaction validation protocol")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-graphql"},"type ValidationStamp {\n ledgerOperations: LedgerOperations\n proofOfIntegrity: Hash\n proofOfWork: PublicKey\n protocolVersion: Int\n signature: Hex\n timestamp: Timestamp\n}\n")),(0,r.kt)("h3",{id:"fields"},"Fields"),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbledgeroperationsbcodeledgeroperations-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"ledgerOperations"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/ledger-operations"},(0,r.kt)("inlineCode",{parentName:"a"},"LedgerOperations"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbproofofintegritybcodehash-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"proofOfIntegrity"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hash"},(0,r.kt)("inlineCode",{parentName:"a"},"Hash"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbproofofworkbcodepublickey-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"proofOfWork"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,r.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbprotocolversionbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"protocolVersion"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbsignaturebcodehex-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"signature"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,r.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-validationstampbtimestampbcodetimestamp-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"ValidationStamp.",(0,r.kt)("b",null,"timestamp"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,r.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h3",{id:"member-of"},"Member of"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,r.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/08912224.697625eb.js b/assets/js/08912224.aebf769b.js similarity index 67% rename from assets/js/08912224.697625eb.js rename to assets/js/08912224.aebf769b.js index ef4138405..7e6148a20 100644 --- a/assets/js/08912224.697625eb.js +++ b/assets/js/08912224.aebf769b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8610],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(r),m=a,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||o;return r?n.createElement(f,i(i({ref:t},c),{},{components:r})):n.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var p=2;p{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>p,contentTitle:()=>s,default:()=>y,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var n=r(87462),a=r(67294),o=r(3905);r(8209);const i={id:"token-properties",title:"TokenProperties",hide_table_of_contents:!1},s=void 0,l={unversionedId:"build/api/schema/scalars/token-properties",id:"build/api/schema/scalars/token-properties",title:"TokenProperties",description:"[tokenProperties] represents a token's properties",source:"@site/docs/build/api/schema/scalars/token-properties.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/token-properties",permalink:"/build/api/schema/scalars/token-properties",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"token-properties",title:"TokenProperties",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Timestamp",permalink:"/build/api/schema/scalars/timestamp"},next:{title:"TransactionType",permalink:"/build/api/schema/scalars/transaction-type"}},p={},c=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:c,Bullet:u,SpecifiedBy:d,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[tokenProperties]"," represents a token's properties"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar TokenProperties\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,o.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8610],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(r),m=a,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||o;return r?n.createElement(f,i(i({ref:t},c),{},{components:r})):n.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var p=2;p{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>p,contentTitle:()=>s,default:()=>y,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var n=r(87462),a=r(67294),o=r(3905);r(8209);const i={id:"token-properties",title:"TokenProperties",hide_table_of_contents:!1},s=void 0,l={unversionedId:"build/api/schema/scalars/token-properties",id:"build/api/schema/scalars/token-properties",title:"TokenProperties",description:"[tokenProperties] represents a token's properties",source:"@site/docs/build/api/schema/scalars/token-properties.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/token-properties",permalink:"/build/api/schema/scalars/token-properties",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"token-properties",title:"TokenProperties",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Timestamp",permalink:"/build/api/schema/scalars/timestamp"},next:{title:"TransactionType",permalink:"/build/api/schema/scalars/transaction-type"}},p={},c=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:c,Bullet:u,SpecifiedBy:d,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[tokenProperties]"," represents a token's properties"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar TokenProperties\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,o.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/0945e04b.4d6230f1.js b/assets/js/0945e04b.4d6230f1.js deleted file mode 100644 index 224e7c80d..000000000 --- a/assets/js/0945e04b.4d6230f1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7611],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),u=s(n),h=i,m=u["".concat(p,".").concat(h)]||u[h]||c[h]||r;return n?a.createElement(m,l(l({ref:t},d),{},{components:n})):a.createElement(m,l({ref:t},d))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=h;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:i,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>c,frontMatter:()=>r,metadata:()=>o,toc:()=>s});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"api",title:"Ledger Application API"},l=void 0,o={unversionedId:"build/clients/ledger-wallet/api",id:"build/clients/ledger-wallet/api",title:"Ledger Application API",description:"Reference Repository:",source:"@site/docs/build/clients/ledger-wallet/api.md",sourceDirName:"build/clients/ledger-wallet",slug:"/build/clients/ledger-wallet/api",permalink:"/build/clients/ledger-wallet/api",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"api",title:"Ledger Application API"},sidebar:"docs",previous:{title:"Ledger wallet",permalink:"/build/clients/ledger-wallet/"},next:{title:"ADPU commands",permalink:"/build/clients/ledger-wallet/commands"}},p={},s=[{value:"GET VERSION",id:"get-version",level:2},{value:"GET DEVICE ORIGIN PUBLIC KEY",id:"get-device-origin-public-key",level:2},{value:"GET ARCHETHIC ADDRESS",id:"get-archethic-address",level:2},{value:"SIGN TRANSACTION",id:"sign-transaction",level:2}],d={toc:s},u="wrapper";function c(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("admonition",{type:"success"},(0,i.kt)("p",{parentName:"admonition"},"Reference Repository:\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/tree/master/src"},"Archethic BOLOS App"))),(0,i.kt)("p",null,"[TOC]"),(0,i.kt)("h2",{id:"get-version"},"GET VERSION"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/blob/master/src/getVersion.c"},"Source File: getVersion.c")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Get version returns the version of Device Application on Ledger")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Function Signature\n",(0,i.kt)("strong",{parentName:"p"},"handleGetVersion(uint8_t p1, uint8_t p2, uint8_t ","*","dataBuffer, uint16_t dataLength, volatile unsigned int ","*","flags)")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"p1")," -> APDU Parameter (Not Concerned in our context)")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"p2")," -> APDU Parameter (Not Concerned in our context)")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"*","dataBuffer")," -> NULL (Not required for getting version)")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"dataLength")," -> Length of the dataBuffer")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"*","flags")," -> ",(0,i.kt)("strong",{parentName:"p"},"Modes (respond immediately(sync), process and respond(async))")),(0,i.kt)("p",{parentName:"li"},"There is a general buffer ",(0,i.kt)("strong",{parentName:"p"},"G_io_apdu_buffer")," (already in ledger SDK) for both input and output, we copy version to this buffer from ",(0,i.kt)("strong",{parentName:"p"},"APPVERSION")," which is defined in Makefile. As we only need integer, so we subtract '0' from the APPVERSION","[0 | 2 | 4]",".\nAPPVERSION and APPNAME are defined in the makefile of the project."),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"io_exchange_with_code(SW_OK, 3)")),(0,i.kt)("pre",{parentName:"li"},(0,i.kt)("code",{parentName:"pre"},"- It adds status at the end of the Buffer (G_io_apdu_buffer).\n- **SW_OK** (0x9000) adds status code at the end of the buffer.\n- 3 is the length of the data in the buffer. \n")))))),(0,i.kt)("h2",{id:"get-device-origin-public-key"},"GET DEVICE ORIGIN PUBLIC KEY"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/blob/master/src/getPublicKey.c"},"Source File: getPublicKey.c")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Gets the hardware(device origin) public key from ledger device.")),(0,i.kt)("p",null,"It returns the public key derived from the hardware ledger device seed (",(0,i.kt)("strong",{parentName:"p"},"HARDWARE SEED"),")."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Function Signature\n",(0,i.kt)("strong",{parentName:"li"},"handleGetPublicKey(uint8_t p1, uint8_t p2, uint8_t ","*","dataBuffer, uint16_t dataLength, volatile unsigned int ","*","flags)"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"*","flags |= IO_ASYNCH_REPLY;"),"\nThis is added to get response from the user of HID. So needed to be set to the ASYNC."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"getOriginPublicKey(cx_ecfp_public_key_t ","*","publicKey)"),"\nThis calls ",(0,i.kt)("strong",null,"deriveArchethicKeyPair")," and return it.\n",(0,i.kt)("inlineCode",{parentName:"li"},"deriveArchethicKeyPair(CX_CURVE_SECP256K1, 650, 0xffff, 0, NULL, 0, NULL, publicKey);"))))),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre"},"- First Param** is the curve type which is fixed in our case.\n- Second Param** is the coin type which is defined for the [UCO Token]()\n- 3rd Param** is for the account which account to get, which is defined as: \n - $account =$ Depends on the intended use of the key.\n - Currently fixed values: 0xFFFF for $o_{key}$, 0x0000 for a simple $w_{key}$\n- 4th Param** is address index \n- 5th Param** is masterSeed which is set to NULL because we need the device origin master seed.\n- 6th Param** is the master seed Length\n- 7th param** is the structure to store public key\n"))),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Function Signature\n",(0,i.kt)("strong",{parentName:"p"},"deriveArchethicKeyPair(cx_curve_t curve, uint32_t coin_type, uint32_t account, uint32_t address_index, uint8_t ","*","masterSeed, uint8_t masterSeedLen, cx_ecfp_private_key_t ","*","privateKey, cx_ecfp_public_key_t ","*","publicKey)")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"This function first checks the curve type of the ",(0,i.kt)("inlineCode",{parentName:"p"},"cx_curve_t"),", which sets the mode for the which it needs to perform operation.")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Next depending upon the account type as defined in the specification (0xffff | 0x0000) it derives the private key from the masterseed."),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"When the account type is ",(0,i.kt)("inlineCode",{parentName:"li"},"0xffff")," then ",(0,i.kt)("strong",{parentName:"li"},"os_perso_derive_node_with_seed()")," function is called which derives the key from the ledger hardware origin key."),(0,i.kt)("li",{parentName:"ul"},"When account type is ",(0,i.kt)("inlineCode",{parentName:"li"},"0x0000")," then it derives the rawPrivateKey from the from ",(0,i.kt)("strong",{parentName:"li"},"archethic_derive_with_seed_key()")," function which derives the key as per provided params."))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Next it checks if there is a ",(0,i.kt)("strong",{parentName:"p"},"publicKey")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"If that is the case then it derives the corresponding public key and generates from the walletPrivateKey"))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"If there is ",(0,i.kt)("strong",{parentName:"p"},"privateKey")," the it simple returns the ",(0,i.kt)("strong",{parentName:"p"},"privateKey"),".\n"))))),(0,i.kt)("admonition",{type:"success"},(0,i.kt)("p",{parentName:"admonition"},"As Public Key is in format: ",(0,i.kt)("strong",{parentName:"p"},"[curve_type, device_origin, 04xy]")),(0,i.kt)("p",{parentName:"admonition"},"02 -> Curve Type 04 -> Device Origin 04 -> uncompressed "),(0,i.kt)("p",{parentName:"admonition"},"X -> 52e77c79bea0f84e2d9c40356932fb0dd31688c23d6b6e9ac99d2869dc407692"),(0,i.kt)("p",{parentName:"admonition"},"Y -> 1e731fb84d0a094c6273fffed68147c381a273c83868cdeb9b81c7ec790c6d38")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Since raw private key is in ",(0,i.kt)("strong",{parentName:"p"},"bytes")," it needs to be converted which is done by the function cx_ecfp_init_private_key(curve, rawPrivateKey, 32, &walletPrivateKey).")),(0,i.kt)("h2",{id:"get-archethic-address"},"GET ARCHETHIC ADDRESS"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/blob/master/src/getAddress.c"},"Source File: getAddress.c")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Return the Archethic address from the ledger including curve type in the start")),(0,i.kt)("p",null,"INS = 04\nLc = Data Length\naddress_index = 4 bytes (bip44)\newk",(0,i.kt)("sub",null,"aes")," = encrypted wallet key"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Function Signature\n",(0,i.kt)("strong",{parentName:"li"},"handleGetAddress(uint8_t p1, uint8_t p2, uint8_t ","*","dataBuffer, uint16_t dataLength, volatile unsigned int ","*","flags)"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"First 4 bytes are address index hence we store then in ",(0,i.kt)("inlineCode",{parentName:"li"},"address_index")," from the data buffer (Converting them according to thier byte ordering.)"),(0,i.kt)("li",{parentName:"ul"},"We performECDH to get the secret pointX on the curve,",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"performECDH(uint8_t ","*","ephPublicKey, uint8_t ephPublicKeySize, uint8_t ","*","ecdhPointX)")),(0,i.kt)("li",{parentName:"ul"},"This derives an Archethic keypair first with function ",(0,i.kt)("inlineCode",{parentName:"li"},"deriveArchethicKeyPair")," and gets originPrivateKey"),(0,i.kt)("li",{parentName:"ul"},"The performs ecdh with function ",(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecdh")," with the originPrivateKey and takes publickey and finds the ecdhPointX "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecdh(&originPrivateKey, CX_ECDH_X, ephPublicKey, ephPublicKeySize, ecdhPointX, 32);")),(0,i.kt)("li",{parentName:"ul"},"publicKey is taken from the ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")))),(0,i.kt)("li",{parentName:"ul"},"Now we decrypt the wallet with the ecdhPointX ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"decryptWallet(ecdhPointX, sizeof(ecdhPointX), dataBuffer, dataLength, g_wallet.encodedWallet, &g_wallet.walletLen);")),(0,i.kt)("li",{parentName:"ul"},"Since we have moved pointer we now only have ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_tag")," 16 bytes and enc($wk_{aes}$) 32bytes",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Inside Decrypt wallet we first calculate the ",(0,i.kt)("inlineCode",{parentName:"li"},"aes_key_iv_tag")," from the ecdhPointX by double hashing it from the sha512 function $sha512(sha512(ecdh","_","secret\\ or\\ PointX))$. "),(0,i.kt)("li",{parentName:"ul"},"we get 3 parts from above double hashing in 64 bytes which are",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"aes_key")," ","[32bytes]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"iv")," ","[16bytes]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"auth_seed")," ","[16bytes]"))),(0,i.kt)("li",{parentName:"ul"},"Now we get sha256 has of auth_seed in ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_key")),(0,i.kt)("li",{parentName:"ul"},"And now we do hmac(auth",(0,i.kt)("em",{parentName:"li"},"key , enc($wk"),"{aes}$)) and get ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_tag")," which are first 16 bytes from hmac result. $Rest\\ 16\\ bytes\\ are\\ reserved$"),(0,i.kt)("li",{parentName:"ul"},"Now we compare if auth_tag equals to auth_tag supplied in the ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")," ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"If if doesn't return ",(0,i.kt)("inlineCode",{parentName:"li"},"0xBADDECODE")),(0,i.kt)("li",{parentName:"ul"},"If it does",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Decrypt the wallet and return the ",(0,i.kt)("strong",{parentName:"li"},"encoded wallet")))))))),(0,i.kt)("li",{parentName:"ul"},"Now get the BIP44Paths from the encoded wallet according to specificaton",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"getBIP44Path(address_index, g_wallet.encodedWallet, g_wallet.walletLen, 0, g_bip44_path, &bip44pathlen);")),(0,i.kt)("li",{parentName:"ul"},"This does according to address index which were first 4 bytes of ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")),(0,i.kt)("li",{parentName:"ul"},"This returns the bip44Path in ",(0,i.kt)("inlineCode",{parentName:"li"},"char* string_bip_44")))),(0,i.kt)("li",{parentName:"ul"},"Now Generate Archethic Address from the Encoded Wallet and set as required. ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"generateArchethicAddress(uint8_t hash_type, uint32_t address_index, uint8_t ","*","encoded_wallet, uint8_t ","*","wallet_len, uint32_t sequence_no, uint8_t ","*","address, uint8_t ","*","address_len)")),(0,i.kt)("li",{parentName:"ul"},"For now only support hash_type ",(0,i.kt)("inlineCode",{parentName:"li"},"sha256")),(0,i.kt)("li",{parentName:"ul"},"Returns address in ",(0,i.kt)("inlineCode",{parentName:"li"},"uint8_t *address"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"It generates key from the encoded wallet and storesit in ",(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecfp_public_key_t")," structure"),(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"generateKeyFromWallet(address_index, encoded_wallet, wallet_len, sequence_no, &curve_type, NULL, &publicKey)")," ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Derives Archethic Keypair depending on the supplied params:",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"coin_type")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"account")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"curve")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"address_index")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"publicKey")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"privateKey"))))))))))))))),(0,i.kt)("h2",{id:"sign-transaction"},"SIGN TRANSACTION"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/blob/master/src/signHash.c"},"Source File: signHash.c")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Returns APDU response as ",(0,i.kt)("inlineCode",{parentName:"p"},"Transaction Hash | Public Key | ASN_DER_SIGN")," in success")),(0,i.kt)("p",null,"INS = 08\naddress_index = 4 bytes (bip44)"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Funcion Signature:\n",(0,i.kt)("strong",{parentName:"li"},"handleSignHash(uint8_t p1, uint8_t p2, uint8_t *dataBuffer, uint16_t dataLength, volatile unsigned int ","*","flags)"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"First 4 bytes are address index hence we store then in ",(0,i.kt)("inlineCode",{parentName:"li"},"address_index")," from the data buffer (Converting them according to thier byte ordering.)"),(0,i.kt)("li",{parentName:"ul"},"Then we check for addresslength ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"if %2 == 0 then SHA256 or SHA3_256 and length = 34"),(0,i.kt)("li",{parentName:"ul"},"if %2 == 1 then SHA512 or SHA3_512 and length = 66"))),(0,i.kt)("li",{parentName:"ul"},"We copy the recieverAddress upto the addressLength in previous step to ",(0,i.kt)("inlineCode",{parentName:"li"},"g_tx.recieverAddr")),(0,i.kt)("li",{parentName:"ul"},"Then get next 8 bytes as amount and convert it to big endian",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Then for display convert it to float and set in ",(0,i.kt)("inlineCode",{parentName:"li"},"g_amount")," for display"))),(0,i.kt)("li",{parentName:"ul"},"performECDH to get ecdhPointX ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"We performECDH to get the secret pointX on the curve,",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"performECDH(uint8_t ","*","ephPublicKey, uint8_t ephPublicKeySize, uint8_t ","*","ecdhPointX)")),(0,i.kt)("li",{parentName:"ul"},"This derives an Archethic keypair first with function ",(0,i.kt)("inlineCode",{parentName:"li"},"deriveArchethicKeyPair")," and gets originPrivateKey"),(0,i.kt)("li",{parentName:"ul"},"The performs ecdh with function ",(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecdh")," with the originPrivateKey and takes publickey and finds the ecdhPointX "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecdh(&originPrivateKey, CX_ECDH_X, ephPublicKey, ephPublicKeySize, ecdhPointX, 32);")))))),(0,i.kt)("li",{parentName:"ul"},"Now we decrypt the wallet with the ecdhPointX ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"decryptWallet(ecdhPointX, sizeof(ecdhPointX), dataBuffer, dataLength, g_wallet.encodedWallet, &g_wallet.walletLen);")),(0,i.kt)("li",{parentName:"ul"},"Since we have moved pointer we now only have ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_tag")," 16 bytes and enc($wk_{aes}$) 32bytes",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Inside Decrypt wallet we first calculate the ",(0,i.kt)("inlineCode",{parentName:"li"},"aes_key_iv_tag")," from the ecdhPointX by double hashing it from the sha512 function $sha512(sha512(ecdh","_","secret\\ or\\ PointX))$. "),(0,i.kt)("li",{parentName:"ul"},"we get 3 parts from above double hashing in 64 bytes which are",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"aes_key")," ","[32bytes]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"iv")," ","[16bytes]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"auth_seed")," ","[16bytes]"))),(0,i.kt)("li",{parentName:"ul"},"Now we get sha256 has of auth_seed in ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_key")),(0,i.kt)("li",{parentName:"ul"},"And now we do hmac(auth",(0,i.kt)("em",{parentName:"li"},"key , enc($wk"),"{aes}$)) and get ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_tag")," which are first 16 bytes from hmac result. $Rest\\ 16\\ bytes\\ are\\ reserved$"),(0,i.kt)("li",{parentName:"ul"},"Now we compare if auth_tag equals to auth_tag supplied in the ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")," ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"If if doesn't return ",(0,i.kt)("inlineCode",{parentName:"li"},"0xBADDECODE")),(0,i.kt)("li",{parentName:"ul"},"If it does",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Decrypt the wallet and return the ",(0,i.kt)("strong",{parentName:"li"},"encoded wallet")))))))))),(0,i.kt)("li",{parentName:"ul"},"Now Generate Archethic Address from the Encoded Wallet and set as required. ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"generateArchethicAddress(uint8_t hash_type, uint32_t address_index, uint8_t ","*","encoded_wallet, uint8_t ","*","wallet_len, uint32_t sequence_no, uint8_t ","*","address, uint8_t ","*","address_len)")),(0,i.kt)("li",{parentName:"ul"},"For now only support hash_type ",(0,i.kt)("inlineCode",{parentName:"li"},"sha256")),(0,i.kt)("li",{parentName:"ul"},"Returns address in ",(0,i.kt)("inlineCode",{parentName:"li"},"uint8_t *address")))),(0,i.kt)("li",{parentName:"ul"},"Now get the BIP44Paths from the encoded wallet according to specificaton",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"getBIP44Path(address_index, g_wallet.encodedWallet, g_wallet.walletLen, 0, g_bip44_path, &bip44pathlen);")),(0,i.kt)("li",{parentName:"ul"},"This does according to address index which were first 4 bytes of ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")),(0,i.kt)("li",{parentName:"ul"},"This returns the bip44Path in ",(0,i.kt)("inlineCode",{parentName:"li"},"char* string_bip_44")))),(0,i.kt)("li",{parentName:"ul"},"Next we calulate the transactionHash",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Function Signature\n",(0,i.kt)("strong",{parentName:"li"},"getTransactionHash(uint8_t ","*","senderAddr, uint8_t senderAddrLen,\nuint8_t ","*","receiveAddr, uint8_t receiveAddrLen,\nuint8_t ","*","amount, uint8_t ","*","txHash, uint8_t ","*","txHashLen)")),(0,i.kt)("li",{parentName:"ul"},"Format for Transaction Hash Generation",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"tx_version | senderAddr | tx_type | code_size | content_size | ownership_length | total_uco_transfers | recieverAddr | amount | total_token_transfers | recipients"))),(0,i.kt)("li",{parentName:"ul"},"We apply ",(0,i.kt)("inlineCode",{parentName:"li"},"cx_hash_sha256()")," and return the hash in ",(0,i.kt)("inlineCode",{parentName:"li"},"txHash")))),(0,i.kt)("li",{parentName:"ul"},"We prompt user in GUI to approve the transaction"),(0,i.kt)("li",{parentName:"ul"},"Once approve we performECDSA on the transactionHash",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Function Signature\n",(0,i.kt)("strong",{parentName:"li"},"performECDSA(uint8_t ","*","txHash, uint8_t txHashLen, uint32_t address_index, uint8_t ","*","encoded_wallet, uint8_t ","*","wallet_len, uint8_t sequence_no, uint8_t ","*","asn_sign, uint8_t ","*","sign_len)")),(0,i.kt)("li",{parentName:"ul"},"We generateKey from Wallet Similar to when getting address and give back ",(0,i.kt)("inlineCode",{parentName:"li"},"publicKey")," and ",(0,i.kt)("inlineCode",{parentName:"li"},"privateKey")),(0,i.kt)("li",{parentName:"ul"},"We copy curve_type on asn_sign buffer"),(0,i.kt)("li",{parentName:"ul"},"We set 0 to signify onchain wallet"),(0,i.kt)("li",{parentName:"ul"},"We copy the publicKey on asn_sign buffer"),(0,i.kt)("li",{parentName:"ul"},"We sign the txnHash with the privateKet and append signature to asn_sign buffer "),(0,i.kt)("li",{parentName:"ul"},"We increase sign_len by publicKey length + 2 bytes"))),(0,i.kt)("li",{parentName:"ul"},"Once signature is performed we copy the txnHash to the ",(0,i.kt)("inlineCode",{parentName:"li"},"G_io_apdu_buffer")),(0,i.kt)("li",{parentName:"ul"},"Then, we copy the contents of encodedWallet on which we have overwritten the signature to the ",(0,i.kt)("inlineCode",{parentName:"li"},"G_io_apdu_buffer")),(0,i.kt)("li",{parentName:"ul"},"And we return the APDU with SW_OK and total length as ",(0,i.kt)("inlineCode",{parentName:"li"},"txnhash length + walletLen"))))))}c.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0945e04b.d7ff0fc6.js b/assets/js/0945e04b.d7ff0fc6.js new file mode 100644 index 000000000..5a33214df --- /dev/null +++ b/assets/js/0945e04b.d7ff0fc6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7611],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),u=s(n),h=i,m=u["".concat(p,".").concat(h)]||u[h]||c[h]||r;return n?a.createElement(m,l(l({ref:t},d),{},{components:n})):a.createElement(m,l({ref:t},d))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=h;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:i,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>c,frontMatter:()=>r,metadata:()=>o,toc:()=>s});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"api",title:"Ledger Application API"},l=void 0,o={unversionedId:"build/clients/ledger-wallet/api",id:"build/clients/ledger-wallet/api",title:"Ledger Application API",description:"Reference Repository:",source:"@site/docs/build/clients/ledger-wallet/api.md",sourceDirName:"build/clients/ledger-wallet",slug:"/build/clients/ledger-wallet/api",permalink:"/build/clients/ledger-wallet/api",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"api",title:"Ledger Application API"},sidebar:"docs",previous:{title:"Ledger wallet",permalink:"/build/clients/ledger-wallet/"},next:{title:"ADPU commands",permalink:"/build/clients/ledger-wallet/commands"}},p={},s=[{value:"GET VERSION",id:"get-version",level:2},{value:"GET DEVICE ORIGIN PUBLIC KEY",id:"get-device-origin-public-key",level:2},{value:"GET ARCHETHIC ADDRESS",id:"get-archethic-address",level:2},{value:"SIGN TRANSACTION",id:"sign-transaction",level:2}],d={toc:s},u="wrapper";function c(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("admonition",{type:"success"},(0,i.kt)("p",{parentName:"admonition"},"Reference Repository:\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/tree/master/src"},"Archethic BOLOS App"))),(0,i.kt)("p",null,"[TOC]"),(0,i.kt)("h2",{id:"get-version"},"GET VERSION"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/blob/master/src/getVersion.c"},"Source File: getVersion.c")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Get version returns the version of Device Application on Ledger")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Function Signature\n",(0,i.kt)("strong",{parentName:"p"},"handleGetVersion(uint8_t p1, uint8_t p2, uint8_t ","*","dataBuffer, uint16_t dataLength, volatile unsigned int ","*","flags)")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"p1")," -> APDU Parameter (Not Concerned in our context)")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"p2")," -> APDU Parameter (Not Concerned in our context)")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"*","dataBuffer")," -> NULL (Not required for getting version)")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"dataLength")," -> Length of the dataBuffer")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"*","flags")," -> ",(0,i.kt)("strong",{parentName:"p"},"Modes (respond immediately(sync), process and respond(async))")),(0,i.kt)("p",{parentName:"li"},"There is a general buffer ",(0,i.kt)("strong",{parentName:"p"},"G_io_apdu_buffer")," (already in ledger SDK) for both input and output, we copy version to this buffer from ",(0,i.kt)("strong",{parentName:"p"},"APPVERSION")," which is defined in Makefile. As we only need integer, so we subtract '0' from the APPVERSION","[0 | 2 | 4]",".\nAPPVERSION and APPNAME are defined in the makefile of the project."),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"io_exchange_with_code(SW_OK, 3)")),(0,i.kt)("pre",{parentName:"li"},(0,i.kt)("code",{parentName:"pre"},"- It adds status at the end of the Buffer (G_io_apdu_buffer).\n- **SW_OK** (0x9000) adds status code at the end of the buffer.\n- 3 is the length of the data in the buffer. \n")))))),(0,i.kt)("h2",{id:"get-device-origin-public-key"},"GET DEVICE ORIGIN PUBLIC KEY"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/blob/master/src/getPublicKey.c"},"Source File: getPublicKey.c")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Gets the hardware(device origin) public key from ledger device.")),(0,i.kt)("p",null,"It returns the public key derived from the hardware ledger device seed (",(0,i.kt)("strong",{parentName:"p"},"HARDWARE SEED"),")."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Function Signature\n",(0,i.kt)("strong",{parentName:"li"},"handleGetPublicKey(uint8_t p1, uint8_t p2, uint8_t ","*","dataBuffer, uint16_t dataLength, volatile unsigned int ","*","flags)"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"*","flags |= IO_ASYNCH_REPLY;"),"\nThis is added to get response from the user of HID. So needed to be set to the ASYNC."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"getOriginPublicKey(cx_ecfp_public_key_t ","*","publicKey)"),"\nThis calls ",(0,i.kt)("strong",null,"deriveArchethicKeyPair")," and return it.\n",(0,i.kt)("inlineCode",{parentName:"li"},"deriveArchethicKeyPair(CX_CURVE_SECP256K1, 650, 0xffff, 0, NULL, 0, NULL, publicKey);"))))),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre"},"- First Param** is the curve type which is fixed in our case.\n- Second Param** is the coin type which is defined for the [UCO Token]()\n- 3rd Param** is for the account which account to get, which is defined as: \n - $account =$ Depends on the intended use of the key.\n - Currently fixed values: 0xFFFF for $o_{key}$, 0x0000 for a simple $w_{key}$\n- 4th Param** is address index \n- 5th Param** is masterSeed which is set to NULL because we need the device origin master seed.\n- 6th Param** is the master seed Length\n- 7th param** is the structure to store public key\n"))),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Function Signature\n",(0,i.kt)("strong",{parentName:"p"},"deriveArchethicKeyPair(cx_curve_t curve, uint32_t coin_type, uint32_t account, uint32_t address_index, uint8_t ","*","masterSeed, uint8_t masterSeedLen, cx_ecfp_private_key_t ","*","privateKey, cx_ecfp_public_key_t ","*","publicKey)")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"This function first checks the curve type of the ",(0,i.kt)("inlineCode",{parentName:"p"},"cx_curve_t"),", which sets the mode for the which it needs to perform operation.")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Next depending upon the account type as defined in the specification (0xffff | 0x0000) it derives the private key from the masterseed."),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"When the account type is ",(0,i.kt)("inlineCode",{parentName:"li"},"0xffff")," then ",(0,i.kt)("strong",{parentName:"li"},"os_perso_derive_node_with_seed()")," function is called which derives the key from the ledger hardware origin key."),(0,i.kt)("li",{parentName:"ul"},"When account type is ",(0,i.kt)("inlineCode",{parentName:"li"},"0x0000")," then it derives the rawPrivateKey from the from ",(0,i.kt)("strong",{parentName:"li"},"archethic_derive_with_seed_key()")," function which derives the key as per provided params."))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Next it checks if there is a ",(0,i.kt)("strong",{parentName:"p"},"publicKey")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"If that is the case then it derives the corresponding public key and generates from the walletPrivateKey"))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"If there is ",(0,i.kt)("strong",{parentName:"p"},"privateKey")," the it simple returns the ",(0,i.kt)("strong",{parentName:"p"},"privateKey"),".\n"))))),(0,i.kt)("admonition",{type:"success"},(0,i.kt)("p",{parentName:"admonition"},"As Public Key is in format: ",(0,i.kt)("strong",{parentName:"p"},"[curve_type, device_origin, 04xy]")),(0,i.kt)("p",{parentName:"admonition"},"02 -> Curve Type 04 -> Device Origin 04 -> uncompressed "),(0,i.kt)("p",{parentName:"admonition"},"X -> 52e77c79bea0f84e2d9c40356932fb0dd31688c23d6b6e9ac99d2869dc407692"),(0,i.kt)("p",{parentName:"admonition"},"Y -> 1e731fb84d0a094c6273fffed68147c381a273c83868cdeb9b81c7ec790c6d38")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Since raw private key is in ",(0,i.kt)("strong",{parentName:"p"},"bytes")," it needs to be converted which is done by the function cx_ecfp_init_private_key(curve, rawPrivateKey, 32, &walletPrivateKey).")),(0,i.kt)("h2",{id:"get-archethic-address"},"GET ARCHETHIC ADDRESS"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/blob/master/src/getAddress.c"},"Source File: getAddress.c")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Return the Archethic address from the ledger including curve type in the start")),(0,i.kt)("p",null,"INS = 04\nLc = Data Length\naddress_index = 4 bytes (bip44)\newk",(0,i.kt)("sub",null,"aes")," = encrypted wallet key"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Function Signature\n",(0,i.kt)("strong",{parentName:"li"},"handleGetAddress(uint8_t p1, uint8_t p2, uint8_t ","*","dataBuffer, uint16_t dataLength, volatile unsigned int ","*","flags)"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"First 4 bytes are address index hence we store then in ",(0,i.kt)("inlineCode",{parentName:"li"},"address_index")," from the data buffer (Converting them according to thier byte ordering.)"),(0,i.kt)("li",{parentName:"ul"},"We performECDH to get the secret pointX on the curve,",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"performECDH(uint8_t ","*","ephPublicKey, uint8_t ephPublicKeySize, uint8_t ","*","ecdhPointX)")),(0,i.kt)("li",{parentName:"ul"},"This derives an Archethic keypair first with function ",(0,i.kt)("inlineCode",{parentName:"li"},"deriveArchethicKeyPair")," and gets originPrivateKey"),(0,i.kt)("li",{parentName:"ul"},"The performs ecdh with function ",(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecdh")," with the originPrivateKey and takes publickey and finds the ecdhPointX "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecdh(&originPrivateKey, CX_ECDH_X, ephPublicKey, ephPublicKeySize, ecdhPointX, 32);")),(0,i.kt)("li",{parentName:"ul"},"publicKey is taken from the ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")))),(0,i.kt)("li",{parentName:"ul"},"Now we decrypt the wallet with the ecdhPointX ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"decryptWallet(ecdhPointX, sizeof(ecdhPointX), dataBuffer, dataLength, g_wallet.encodedWallet, &g_wallet.walletLen);")),(0,i.kt)("li",{parentName:"ul"},"Since we have moved pointer we now only have ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_tag")," 16 bytes and enc($wk_{aes}$) 32bytes",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Inside Decrypt wallet we first calculate the ",(0,i.kt)("inlineCode",{parentName:"li"},"aes_key_iv_tag")," from the ecdhPointX by double hashing it from the sha512 function $sha512(sha512(ecdh","_","secret\\ or\\ PointX))$. "),(0,i.kt)("li",{parentName:"ul"},"we get 3 parts from above double hashing in 64 bytes which are",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"aes_key")," ","[32bytes]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"iv")," ","[16bytes]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"auth_seed")," ","[16bytes]"))),(0,i.kt)("li",{parentName:"ul"},"Now we get sha256 has of auth_seed in ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_key")),(0,i.kt)("li",{parentName:"ul"},"And now we do hmac(auth",(0,i.kt)("em",{parentName:"li"},"key , enc($wk"),"{aes}$)) and get ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_tag")," which are first 16 bytes from hmac result. $Rest\\ 16\\ bytes\\ are\\ reserved$"),(0,i.kt)("li",{parentName:"ul"},"Now we compare if auth_tag equals to auth_tag supplied in the ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")," ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"If if doesn't return ",(0,i.kt)("inlineCode",{parentName:"li"},"0xBADDECODE")),(0,i.kt)("li",{parentName:"ul"},"If it does",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Decrypt the wallet and return the ",(0,i.kt)("strong",{parentName:"li"},"encoded wallet")))))))),(0,i.kt)("li",{parentName:"ul"},"Now get the BIP44Paths from the encoded wallet according to specificaton",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"getBIP44Path(address_index, g_wallet.encodedWallet, g_wallet.walletLen, 0, g_bip44_path, &bip44pathlen);")),(0,i.kt)("li",{parentName:"ul"},"This does according to address index which were first 4 bytes of ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")),(0,i.kt)("li",{parentName:"ul"},"This returns the bip44Path in ",(0,i.kt)("inlineCode",{parentName:"li"},"char* string_bip_44")))),(0,i.kt)("li",{parentName:"ul"},"Now Generate Archethic Address from the Encoded Wallet and set as required. ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"generateArchethicAddress(uint8_t hash_type, uint32_t address_index, uint8_t ","*","encoded_wallet, uint8_t ","*","wallet_len, uint32_t sequence_no, uint8_t ","*","address, uint8_t ","*","address_len)")),(0,i.kt)("li",{parentName:"ul"},"For now only support hash_type ",(0,i.kt)("inlineCode",{parentName:"li"},"sha256")),(0,i.kt)("li",{parentName:"ul"},"Returns address in ",(0,i.kt)("inlineCode",{parentName:"li"},"uint8_t *address"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"It generates key from the encoded wallet and storesit in ",(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecfp_public_key_t")," structure"),(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"generateKeyFromWallet(address_index, encoded_wallet, wallet_len, sequence_no, &curve_type, NULL, &publicKey)")," ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Derives Archethic Keypair depending on the supplied params:",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"coin_type")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"account")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"curve")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"address_index")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"publicKey")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"privateKey"))))))))))))))),(0,i.kt)("h2",{id:"sign-transaction"},"SIGN TRANSACTION"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger/blob/master/src/signHash.c"},"Source File: signHash.c")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Returns APDU response as ",(0,i.kt)("inlineCode",{parentName:"p"},"Transaction Hash | Public Key | ASN_DER_SIGN")," in success")),(0,i.kt)("p",null,"INS = 08\naddress_index = 4 bytes (bip44)"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Funcion Signature:\n",(0,i.kt)("strong",{parentName:"li"},"handleSignHash(uint8_t p1, uint8_t p2, uint8_t *dataBuffer, uint16_t dataLength, volatile unsigned int ","*","flags)"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"First 4 bytes are address index hence we store then in ",(0,i.kt)("inlineCode",{parentName:"li"},"address_index")," from the data buffer (Converting them according to thier byte ordering.)"),(0,i.kt)("li",{parentName:"ul"},"Then we check for addresslength ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"if %2 == 0 then SHA256 or SHA3_256 and length = 34"),(0,i.kt)("li",{parentName:"ul"},"if %2 == 1 then SHA512 or SHA3_512 and length = 66"))),(0,i.kt)("li",{parentName:"ul"},"We copy the recieverAddress upto the addressLength in previous step to ",(0,i.kt)("inlineCode",{parentName:"li"},"g_tx.recieverAddr")),(0,i.kt)("li",{parentName:"ul"},"Then get next 8 bytes as amount and convert it to big endian",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Then for display convert it to float and set in ",(0,i.kt)("inlineCode",{parentName:"li"},"g_amount")," for display"))),(0,i.kt)("li",{parentName:"ul"},"performECDH to get ecdhPointX ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"We performECDH to get the secret pointX on the curve,",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"performECDH(uint8_t ","*","ephPublicKey, uint8_t ephPublicKeySize, uint8_t ","*","ecdhPointX)")),(0,i.kt)("li",{parentName:"ul"},"This derives an Archethic keypair first with function ",(0,i.kt)("inlineCode",{parentName:"li"},"deriveArchethicKeyPair")," and gets originPrivateKey"),(0,i.kt)("li",{parentName:"ul"},"The performs ecdh with function ",(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecdh")," with the originPrivateKey and takes publickey and finds the ecdhPointX "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cx_ecdh(&originPrivateKey, CX_ECDH_X, ephPublicKey, ephPublicKeySize, ecdhPointX, 32);")))))),(0,i.kt)("li",{parentName:"ul"},"Now we decrypt the wallet with the ecdhPointX ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"decryptWallet(ecdhPointX, sizeof(ecdhPointX), dataBuffer, dataLength, g_wallet.encodedWallet, &g_wallet.walletLen);")),(0,i.kt)("li",{parentName:"ul"},"Since we have moved pointer we now only have ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_tag")," 16 bytes and enc($wk_{aes}$) 32bytes",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Inside Decrypt wallet we first calculate the ",(0,i.kt)("inlineCode",{parentName:"li"},"aes_key_iv_tag")," from the ecdhPointX by double hashing it from the sha512 function $sha512(sha512(ecdh","_","secret\\ or\\ PointX))$. "),(0,i.kt)("li",{parentName:"ul"},"we get 3 parts from above double hashing in 64 bytes which are",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"aes_key")," ","[32bytes]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"iv")," ","[16bytes]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"auth_seed")," ","[16bytes]"))),(0,i.kt)("li",{parentName:"ul"},"Now we get sha256 has of auth_seed in ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_key")),(0,i.kt)("li",{parentName:"ul"},"And now we do hmac(auth",(0,i.kt)("em",{parentName:"li"},"key , enc($wk"),"{aes}$)) and get ",(0,i.kt)("inlineCode",{parentName:"li"},"auth_tag")," which are first 16 bytes from hmac result. $Rest\\ 16\\ bytes\\ are\\ reserved$"),(0,i.kt)("li",{parentName:"ul"},"Now we compare if auth_tag equals to auth_tag supplied in the ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")," ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"If if doesn't return ",(0,i.kt)("inlineCode",{parentName:"li"},"0xBADDECODE")),(0,i.kt)("li",{parentName:"ul"},"If it does",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Decrypt the wallet and return the ",(0,i.kt)("strong",{parentName:"li"},"encoded wallet")))))))))),(0,i.kt)("li",{parentName:"ul"},"Now Generate Archethic Address from the Encoded Wallet and set as required. ",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"generateArchethicAddress(uint8_t hash_type, uint32_t address_index, uint8_t ","*","encoded_wallet, uint8_t ","*","wallet_len, uint32_t sequence_no, uint8_t ","*","address, uint8_t ","*","address_len)")),(0,i.kt)("li",{parentName:"ul"},"For now only support hash_type ",(0,i.kt)("inlineCode",{parentName:"li"},"sha256")),(0,i.kt)("li",{parentName:"ul"},"Returns address in ",(0,i.kt)("inlineCode",{parentName:"li"},"uint8_t *address")))),(0,i.kt)("li",{parentName:"ul"},"Now get the BIP44Paths from the encoded wallet according to specificaton",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Fn Signature ",(0,i.kt)("strong",{parentName:"li"},"getBIP44Path(address_index, g_wallet.encodedWallet, g_wallet.walletLen, 0, g_bip44_path, &bip44pathlen);")),(0,i.kt)("li",{parentName:"ul"},"This does according to address index which were first 4 bytes of ",(0,i.kt)("inlineCode",{parentName:"li"},"dataBuffer")),(0,i.kt)("li",{parentName:"ul"},"This returns the bip44Path in ",(0,i.kt)("inlineCode",{parentName:"li"},"char* string_bip_44")))),(0,i.kt)("li",{parentName:"ul"},"Next we calulate the transactionHash",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Function Signature\n",(0,i.kt)("strong",{parentName:"li"},"getTransactionHash(uint8_t ","*","senderAddr, uint8_t senderAddrLen,\nuint8_t ","*","receiveAddr, uint8_t receiveAddrLen,\nuint8_t ","*","amount, uint8_t ","*","txHash, uint8_t ","*","txHashLen)")),(0,i.kt)("li",{parentName:"ul"},"Format for Transaction Hash Generation",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"tx_version | senderAddr | tx_type | code_size | content_size | ownership_length | total_uco_transfers | recieverAddr | amount | total_token_transfers | recipients"))),(0,i.kt)("li",{parentName:"ul"},"We apply ",(0,i.kt)("inlineCode",{parentName:"li"},"cx_hash_sha256()")," and return the hash in ",(0,i.kt)("inlineCode",{parentName:"li"},"txHash")))),(0,i.kt)("li",{parentName:"ul"},"We prompt user in GUI to approve the transaction"),(0,i.kt)("li",{parentName:"ul"},"Once approve we performECDSA on the transactionHash",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Function Signature\n",(0,i.kt)("strong",{parentName:"li"},"performECDSA(uint8_t ","*","txHash, uint8_t txHashLen, uint32_t address_index, uint8_t ","*","encoded_wallet, uint8_t ","*","wallet_len, uint8_t sequence_no, uint8_t ","*","asn_sign, uint8_t ","*","sign_len)")),(0,i.kt)("li",{parentName:"ul"},"We generateKey from Wallet Similar to when getting address and give back ",(0,i.kt)("inlineCode",{parentName:"li"},"publicKey")," and ",(0,i.kt)("inlineCode",{parentName:"li"},"privateKey")),(0,i.kt)("li",{parentName:"ul"},"We copy curve_type on asn_sign buffer"),(0,i.kt)("li",{parentName:"ul"},"We set 0 to signify onchain wallet"),(0,i.kt)("li",{parentName:"ul"},"We copy the publicKey on asn_sign buffer"),(0,i.kt)("li",{parentName:"ul"},"We sign the txnHash with the privateKet and append signature to asn_sign buffer "),(0,i.kt)("li",{parentName:"ul"},"We increase sign_len by publicKey length + 2 bytes"))),(0,i.kt)("li",{parentName:"ul"},"Once signature is performed we copy the txnHash to the ",(0,i.kt)("inlineCode",{parentName:"li"},"G_io_apdu_buffer")),(0,i.kt)("li",{parentName:"ul"},"Then, we copy the contents of encodedWallet on which we have overwritten the signature to the ",(0,i.kt)("inlineCode",{parentName:"li"},"G_io_apdu_buffer")),(0,i.kt)("li",{parentName:"ul"},"And we return the APDU with SW_OK and total length as ",(0,i.kt)("inlineCode",{parentName:"li"},"txnhash length + walletLen"))))))}c.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0946372c.d9f22944.js b/assets/js/0946372c.d9f22944.js new file mode 100644 index 000000000..50b466069 --- /dev/null +++ b/assets/js/0946372c.d9f22944.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7790],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),u=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(d.Provider,{value:t},e.children)},p="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,h=p["".concat(d,".").concat(m)]||p[m]||s[m]||l;return n?a.createElement(h,i(i({ref:t},c),{},{components:n})):a.createElement(h,i({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>s,frontMatter:()=>l,metadata:()=>o,toc:()=>u});var a=n(87462),r=(n(67294),n(3905));n(8209);const l={id:"account",title:"Account"},i=void 0,o={unversionedId:"build/core/account",id:"build/core/account",title:"Account",description:"Archethic node provides a high level and fast access to an account assets using primarily memory tables with ETS.",source:"@site/docs/build/core/account.md",sourceDirName:"build/core",slug:"/build/core/account",permalink:"/build/core/account",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"account",title:"Account"},sidebar:"docs",previous:{title:"Core development",permalink:"/build/core/"},next:{title:"BeaconChain",permalink:"/build/core/beacon-chain/"}},d={},u=[{value:"UCO",id:"uco",level:2},{value:"Ledger",id:"ledger",level:3},{value:"Index",id:"index",level:3},{value:"Token",id:"token",level:2},{value:"Ledger",id:"ledger-1",level:3},{value:"Index",id:"index-1",level:3},{value:"Loading",id:"loading",level:2}],c={toc:u},p="wrapper";function s(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Archethic node provides a high level and fast access to an account assets using primarily memory tables with ETS."),(0,r.kt)("p",null,"This gives us faster computation and data retrieval to asserts balances and UTXO loading."),(0,r.kt)("h2",{id:"uco"},"UCO"),(0,r.kt)("p",null,"A memory table is defined to list of the UCO available for a given address"),(0,r.kt)("p",null,"Few functions are provided to be able to query this table in order to:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"get the UCO balance "),(0,r.kt)("li",{parentName:"ul"},"get the UTXOs"),(0,r.kt)("li",{parentName:"ul"},"get the total inputs (spent and unspent)"),(0,r.kt)("li",{parentName:"ul"},"spend all the UTXOs"),(0,r.kt)("li",{parentName:"ul"},"add new UCO UTXO")),(0,r.kt)("h3",{id:"ledger"},"Ledger"),(0,r.kt)("p",null,"Each entry is indexed by a tuple recipient/sender to identify uniquely an UTXO"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Recipient, Sender"),(0,r.kt)("th",{parentName:"tr",align:null},"Amount"),(0,r.kt)("th",{parentName:"tr",align:null},"Spent ?"),(0,r.kt)("th",{parentName:"tr",align:null},"Date")))),(0,r.kt)("h3",{id:"index"},"Index"),(0,r.kt)("p",null,"An index table is provided to be able to retrieve all the sender UTXOs for a given recipient"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Recipient"),(0,r.kt)("th",{parentName:"tr",align:null},"Sender")))),(0,r.kt)("h2",{id:"token"},"Token"),(0,r.kt)("p",null,"A memory table is defined to list al the token available for a given address"),(0,r.kt)("p",null,"Few functions are provided to be able to query this table in order to:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"get the token balance s"),(0,r.kt)("li",{parentName:"ul"},"get the UTXOs"),(0,r.kt)("li",{parentName:"ul"},"get the total inputs (spent and unspent)"),(0,r.kt)("li",{parentName:"ul"},"spend all the UTXOs"),(0,r.kt)("li",{parentName:"ul"},"add new token UTXO")),(0,r.kt)("h3",{id:"ledger-1"},"Ledger"),(0,r.kt)("p",null,"Each entry is indexed by a tuple recipient/sender/token address to identify uniquely an UTXO"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Recipient, Sender, Token"),(0,r.kt)("th",{parentName:"tr",align:null},"Amount"),(0,r.kt)("th",{parentName:"tr",align:null},"Spent ?"),(0,r.kt)("th",{parentName:"tr",align:null},"Date")))),(0,r.kt)("h3",{id:"index-1"},"Index"),(0,r.kt)("p",null,"An index table is provided to be able to retrieve all the sender UTXOs for a given recipient"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Recipient"),(0,r.kt)("th",{parentName:"tr",align:null},"Sender"),(0,r.kt)("th",{parentName:"tr",align:null},"Token address")))),(0,r.kt)("h2",{id:"loading"},"Loading"),(0,r.kt)("p",null,"When a transaction replicated, the storage nodes in charge of storing the new transaction (chain replicas or recipient replicas) will load the transaction in those tables to index the UTXO and build in memory view."),(0,r.kt)("p",null,"The same goes when a node is bootstraping, a process will load all the transactions from the database to load them into those tables."))}s.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0946372c.fdba5c9d.js b/assets/js/0946372c.fdba5c9d.js deleted file mode 100644 index 89b6031ff..000000000 --- a/assets/js/0946372c.fdba5c9d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7790],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),u=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(d.Provider,{value:t},e.children)},p="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,h=p["".concat(d,".").concat(m)]||p[m]||s[m]||l;return n?a.createElement(h,i(i({ref:t},c),{},{components:n})):a.createElement(h,i({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>s,frontMatter:()=>l,metadata:()=>o,toc:()=>u});var a=n(87462),r=(n(67294),n(3905));n(8209);const l={id:"account",title:"Account"},i=void 0,o={unversionedId:"build/core/account",id:"build/core/account",title:"Account",description:"Archethic node provides a high level and fast access to an account assets using primarily memory tables with ETS.",source:"@site/docs/build/core/account.md",sourceDirName:"build/core",slug:"/build/core/account",permalink:"/build/core/account",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"account",title:"Account"},sidebar:"docs",previous:{title:"Core development",permalink:"/build/core/"},next:{title:"BeaconChain",permalink:"/build/core/beacon-chain/"}},d={},u=[{value:"UCO",id:"uco",level:2},{value:"Ledger",id:"ledger",level:3},{value:"Index",id:"index",level:3},{value:"Token",id:"token",level:2},{value:"Ledger",id:"ledger-1",level:3},{value:"Index",id:"index-1",level:3},{value:"Loading",id:"loading",level:2}],c={toc:u},p="wrapper";function s(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Archethic node provides a high level and fast access to an account assets using primarily memory tables with ETS."),(0,r.kt)("p",null,"This gives us faster computation and data retrieval to asserts balances and UTXO loading."),(0,r.kt)("h2",{id:"uco"},"UCO"),(0,r.kt)("p",null,"A memory table is defined to list of the UCO available for a given address"),(0,r.kt)("p",null,"Few functions are provided to be able to query this table in order to:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"get the UCO balance "),(0,r.kt)("li",{parentName:"ul"},"get the UTXOs"),(0,r.kt)("li",{parentName:"ul"},"get the total inputs (spent and unspent)"),(0,r.kt)("li",{parentName:"ul"},"spend all the UTXOs"),(0,r.kt)("li",{parentName:"ul"},"add new UCO UTXO")),(0,r.kt)("h3",{id:"ledger"},"Ledger"),(0,r.kt)("p",null,"Each entry is indexed by a tuple recipient/sender to identify uniquely an UTXO"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Recipient, Sender"),(0,r.kt)("th",{parentName:"tr",align:null},"Amount"),(0,r.kt)("th",{parentName:"tr",align:null},"Spent ?"),(0,r.kt)("th",{parentName:"tr",align:null},"Date")))),(0,r.kt)("h3",{id:"index"},"Index"),(0,r.kt)("p",null,"An index table is provided to be able to retrieve all the sender UTXOs for a given recipient"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Recipient"),(0,r.kt)("th",{parentName:"tr",align:null},"Sender")))),(0,r.kt)("h2",{id:"token"},"Token"),(0,r.kt)("p",null,"A memory table is defined to list al the token available for a given address"),(0,r.kt)("p",null,"Few functions are provided to be able to query this table in order to:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"get the token balance s"),(0,r.kt)("li",{parentName:"ul"},"get the UTXOs"),(0,r.kt)("li",{parentName:"ul"},"get the total inputs (spent and unspent)"),(0,r.kt)("li",{parentName:"ul"},"spend all the UTXOs"),(0,r.kt)("li",{parentName:"ul"},"add new token UTXO")),(0,r.kt)("h3",{id:"ledger-1"},"Ledger"),(0,r.kt)("p",null,"Each entry is indexed by a tuple recipient/sender/token address to identify uniquely an UTXO"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Recipient, Sender, Token"),(0,r.kt)("th",{parentName:"tr",align:null},"Amount"),(0,r.kt)("th",{parentName:"tr",align:null},"Spent ?"),(0,r.kt)("th",{parentName:"tr",align:null},"Date")))),(0,r.kt)("h3",{id:"index-1"},"Index"),(0,r.kt)("p",null,"An index table is provided to be able to retrieve all the sender UTXOs for a given recipient"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Recipient"),(0,r.kt)("th",{parentName:"tr",align:null},"Sender"),(0,r.kt)("th",{parentName:"tr",align:null},"Token address")))),(0,r.kt)("h2",{id:"loading"},"Loading"),(0,r.kt)("p",null,"When a transaction replicated, the storage nodes in charge of storing the new transaction (chain replicas or recipient replicas) will load the transaction in those tables to index the UTXO and build in memory view."),(0,r.kt)("p",null,"The same goes when a node is bootstraping, a process will load all the transactions from the database to load them into those tables."))}s.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/0c928027.b57da27c.js b/assets/js/0c928027.b57da27c.js deleted file mode 100644 index eda830b21..000000000 --- a/assets/js/0c928027.b57da27c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7157],{3905:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>k});var a=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(t),m=o,k=u["".concat(s,".").concat(m)]||u[m]||d[m]||r;return t?a.createElement(k,i(i({ref:n},c),{},{components:t})):a.createElement(k,i({ref:n},c))}));function k(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var r=t.length,i=new Array(r);i[0]=m;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>p});var a=t(87462),o=(t(67294),t(3905));t(8209);const r={id:"token",title:"Tokens"},i=void 0,l={unversionedId:"learn/token",id:"learn/token",title:"Tokens",description:"Tokens is an important feature on Archethic.",source:"@site/docs/learn/token.md",sourceDirName:"learn",slug:"/learn/token",permalink:"/learn/token",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"token",title:"Tokens"},sidebar:"docs",previous:{title:"Replication attestation",permalink:"/learn/sharding/replication-attestation"},next:{title:"Participate",permalink:"/category/participate"}},s={},p=[{value:"Native",id:"native",level:2},{value:"Standardized",id:"standardized",level:2},{value:"Creation",id:"creation",level:2},{value:"Fungible",id:"fungible",level:3},{value:"Non-fungible",id:"non-fungible",level:3},{value:"Resupply fungible tokens (AEIP-18)",id:"resupply-fungible-tokens-aeip-18",level:2},{value:"Recipients (AEIP-19)",id:"recipients-aeip-19",level:2},{value:"Transfer",id:"transfer",level:2}],c={toc:p},u="wrapper";function d(e){let{components:n,...t}=e;return(0,o.kt)(u,(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Tokens is an important feature on Archethic.\nNowadays, our world is transforming towards digitalisation and tokenization with new use cases and trends (royalties, collection, proof of ownerships, etc.)"),(0,o.kt)("p",null,"Archethic allows users to create and transaction with an unlimited-defined (custom) token natively."),(0,o.kt)("h2",{id:"native"},"Native"),(0,o.kt)("p",null,"Archethic tokens are considered as native as for developers, there is no need to create smart contract to mint or transfer tokens."),(0,o.kt)("p",null,"The transaction's structure supports - by design, asn extension of the ledger model (more than UCO-only transaction)"),(0,o.kt)("p",null,"All the layer of complexity have been removed to make them efficient and performant."),(0,o.kt)("p",null,"Because of this, the transfer of tokens is as simple as a transfer of UCO (just UTXO), making it fast and cheap."),(0,o.kt)("h2",{id:"standardized"},"Standardized"),(0,o.kt)("p",null,"Archethic's tokens are also unified through specifications to help implementers, developers and users to have a clear understanding of their definition."),(0,o.kt)("p",null,"The complete specification is composed of many AEIPs:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-02.md"},"AEIP-02 - Tokens standard")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-18.md"},"AEIP-18 - Tokens resupply")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-19.md"},"AEIP-19 - Tokens minting's recipients"))),(0,o.kt)("h2",{id:"creation"},"Creation"),(0,o.kt)("p",null,"In order to create a token, you have to:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"set the transaction's type to: ",(0,o.kt)("inlineCode",{parentName:"li"},"token")),(0,o.kt)("li",{parentName:"ol"},"define in the transaction's content the token's json definition")),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/develop/priv/json-schemas/token-core.json"},"The JSON Schema is available on GitHub")),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"As everything on Archethic, it is a good practice to create a new transaction chain for this token only.")),(0,o.kt)("h3",{id:"fungible"},"Fungible"),(0,o.kt)("p",null,"Example of a token that doesn't allow minting (may never be resupplied):"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "supply": 100000000000, // 1000 tokens\n "decimals": 8, // 1 token == 10\u2078\n "type": "fungible",\n "symbol": "TOKEN_SYMBOL",\n "name": "TOKEN_NAME",\n "properties": {"PROPERTY_NAME": "PROPERTY_VALUE"}\n}\n')),(0,o.kt)("p",null,"Example of a token that allows minting (may be resupplied later):"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "allow_mint": true, // <------------\n "supply": 100000000000, // 100000 tokens\n "decimals": 6, // 1 token == 10\u2076\n "type": "fungible",\n "symbol": "TOKEN_SYMBOL",\n "name": "TOKEN_NAME",\n "properties": {"PROPERTY_NAME": "PROPERTY_VALUE"}\n}\n')),(0,o.kt)("h3",{id:"non-fungible"},"Non-fungible"),(0,o.kt)("p",null,"There are 2 definitions for the NFT:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"either for a single token"),(0,o.kt)("li",{parentName:"ol"},"either for a collection of tokens")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"NFTs always have 8 decimals.")),(0,o.kt)("p",null,"Example of a NFT:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "supply": 100000000, // 1 token\n "type": "non-fungible",\n "name": "My NFT",\n "symbol": "MNFT",\n "properties": {\n "image": "base64 of the image",\n "description": "This is a NFT with an image"\n }\n}\n')),(0,o.kt)("p",null,"Example of a NFT Collection:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "supply": 300000000, // 3 tokens\n "type": "non-fungible",\n "name": "COLLETION NAME",\n "symbol": "COLLETION_SYMBOL",\n "properties": {"globalProperty": "value"},\n "collection": [\n {"image": "link"},\n {"image": "link"},\n {"image": "link"}\n ]\n}\n')),(0,o.kt)("p",null,"During the transaction validation, the miners will understand how to interpret this transaction and create the relative assets and UTXOs to make transfers possible right away."),(0,o.kt)("h2",{id:"resupply-fungible-tokens-aeip-18"},"Resupply fungible tokens (AEIP-18)"),(0,o.kt)("p",null,"As mentioned above, fungible tokens may accept to be minted at any time. ",(0,o.kt)("strong",{parentName:"p"},"This transaction must be done in the same transaction chain of the referenced token")," (to prove ownership of the token) and it's type must be ",(0,o.kt)("inlineCode",{parentName:"p"},"token"),"."),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/develop/priv/json-schemas/token-resupply.json"},"The JSON Schema is available on GitHub")),(0,o.kt)("p",null,"Here's an example of the token resupply transaction's content:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aeip": [8, 18],\n "supply": 100000000000, // 1000 tokens if referenced token has decimals=8\n "token_reference": "0000C13373C96538B468CCDAB8F95FDC3744EBFA2CD36A81C3791B2A205705D9C3A2"\n}\n')),(0,o.kt)("h2",{id:"recipients-aeip-19"},"Recipients (AEIP-19)"),(0,o.kt)("p",null,"When creating a token transaction (creation or resupply), it is also possible to specify a list of recipients that will receive all or some of the minted tokens.\nIn order to do so, a ",(0,o.kt)("inlineCode",{parentName:"p"},"recipients")," field must specified in the transaction's content."),(0,o.kt)("p",null,"Here's an example for a fungible token resupply:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aeip": [8, 18, 19],\n "supply": 1000,\n "token_reference": "0000C13373C96538B468CCDAB8F95FDC3744EBFA2CD36A81C3791B2A205705D9C3A2",\n "recipients": [\n {\n "to": "0000f1fd....",\n "amount": 100000000 // 1 token\n }\n ]\n}\n')),(0,o.kt)("p",null,"Here's another example for a non-fungible token creation:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aeip": [2, 8, 19],\n "supply": 100000000, // 1 token\n "type": "non-fungible",\n "name": "My NFT",\n "symbol": "MNFT",\n "properties": {\n "image": "base64 of the image",\n "description": "This is a NFT with an image"\n },\n "recipients": [\n {\n "to": "0000f1fd....",\n "amount": 100000000 // 1 token\n }\n ]\n}\n')),(0,o.kt)("h2",{id:"transfer"},"Transfer"),(0,o.kt)("p",null,"Now that the tokens are created, there are few ways to move them around:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Via a wallet (such as the ",(0,o.kt)("a",{parentName:"li",href:"https://www.archethic.net/aewallet.html"},"Archethic Wallet"),")"),(0,o.kt)("li",{parentName:"ol"},"Via the ",(0,o.kt)("inlineCode",{parentName:"li"},"send-transaction")," API"),(0,o.kt)("li",{parentName:"ol"},"Via a Smart Contract")),(0,o.kt)("p",null,"Example of a NFT transfer via the API:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "method": "send_transaction",\n "jsonrpc": "2.0",\n "id": 1,\n "params": {\n "transaction": {\n "version": 2,\n "type": "transfer",\n // [...]\n "data": {\n "ledger": {\n "token": {\n "transfers": [\n {\n "to": "0000ABCD...EF", // recipient\'s address\n "amount": 100000000, // 1 token\n "tokenAddress": "00001AC8...4F", // token definition address\n "tokenId": 1 // 1st token of the collection\n }\n ]\n }\n }\n }\n }\n }\n}\n')),(0,o.kt)("p",null,"Example of a transfer via a Smart Contract:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-elixir"},"Contract.add_token_transfer(token_address: 0x00001AC8...4F, to: 0x0000ABCD...EF, amount: 100000000)\n")))}d.isMDXComponent=!0},8209:(e,n,t)=>{t(67294)}}]); \ No newline at end of file diff --git a/assets/js/0c928027.eb39beb9.js b/assets/js/0c928027.eb39beb9.js new file mode 100644 index 000000000..d2323b8db --- /dev/null +++ b/assets/js/0c928027.eb39beb9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7157],{3905:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>k});var a=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(t),m=o,k=u["".concat(s,".").concat(m)]||u[m]||d[m]||r;return t?a.createElement(k,i(i({ref:n},c),{},{components:t})):a.createElement(k,i({ref:n},c))}));function k(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var r=t.length,i=new Array(r);i[0]=m;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>p});var a=t(87462),o=(t(67294),t(3905));t(8209);const r={id:"token",title:"Tokens"},i=void 0,l={unversionedId:"learn/token",id:"learn/token",title:"Tokens",description:"Tokens is an important feature on Archethic.",source:"@site/docs/learn/token.md",sourceDirName:"learn",slug:"/learn/token",permalink:"/learn/token",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"token",title:"Tokens"},sidebar:"docs",previous:{title:"Replication attestation",permalink:"/learn/sharding/replication-attestation"},next:{title:"Participate",permalink:"/category/participate"}},s={},p=[{value:"Native",id:"native",level:2},{value:"Standardized",id:"standardized",level:2},{value:"Creation",id:"creation",level:2},{value:"Fungible",id:"fungible",level:3},{value:"Non-fungible",id:"non-fungible",level:3},{value:"Resupply fungible tokens (AEIP-18)",id:"resupply-fungible-tokens-aeip-18",level:2},{value:"Recipients (AEIP-19)",id:"recipients-aeip-19",level:2},{value:"Transfer",id:"transfer",level:2}],c={toc:p},u="wrapper";function d(e){let{components:n,...t}=e;return(0,o.kt)(u,(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Tokens is an important feature on Archethic.\nNowadays, our world is transforming towards digitalisation and tokenization with new use cases and trends (royalties, collection, proof of ownerships, etc.)"),(0,o.kt)("p",null,"Archethic allows users to create and transaction with an unlimited-defined (custom) token natively."),(0,o.kt)("h2",{id:"native"},"Native"),(0,o.kt)("p",null,"Archethic tokens are considered as native as for developers, there is no need to create smart contract to mint or transfer tokens."),(0,o.kt)("p",null,"The transaction's structure supports - by design, asn extension of the ledger model (more than UCO-only transaction)"),(0,o.kt)("p",null,"All the layer of complexity have been removed to make them efficient and performant."),(0,o.kt)("p",null,"Because of this, the transfer of tokens is as simple as a transfer of UCO (just UTXO), making it fast and cheap."),(0,o.kt)("h2",{id:"standardized"},"Standardized"),(0,o.kt)("p",null,"Archethic's tokens are also unified through specifications to help implementers, developers and users to have a clear understanding of their definition."),(0,o.kt)("p",null,"The complete specification is composed of many AEIPs:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-02.md"},"AEIP-02 - Tokens standard")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-18.md"},"AEIP-18 - Tokens resupply")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-19.md"},"AEIP-19 - Tokens minting's recipients"))),(0,o.kt)("h2",{id:"creation"},"Creation"),(0,o.kt)("p",null,"In order to create a token, you have to:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"set the transaction's type to: ",(0,o.kt)("inlineCode",{parentName:"li"},"token")),(0,o.kt)("li",{parentName:"ol"},"define in the transaction's content the token's json definition")),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/develop/priv/json-schemas/token-core.json"},"The JSON Schema is available on GitHub")),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"As everything on Archethic, it is a good practice to create a new transaction chain for this token only.")),(0,o.kt)("h3",{id:"fungible"},"Fungible"),(0,o.kt)("p",null,"Example of a token that doesn't allow minting (may never be resupplied):"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "supply": 100000000000, // 1000 tokens\n "decimals": 8, // 1 token == 10\u2078\n "type": "fungible",\n "symbol": "TOKEN_SYMBOL",\n "name": "TOKEN_NAME",\n "properties": {"PROPERTY_NAME": "PROPERTY_VALUE"}\n}\n')),(0,o.kt)("p",null,"Example of a token that allows minting (may be resupplied later):"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "allow_mint": true, // <------------\n "supply": 100000000000, // 100000 tokens\n "decimals": 6, // 1 token == 10\u2076\n "type": "fungible",\n "symbol": "TOKEN_SYMBOL",\n "name": "TOKEN_NAME",\n "properties": {"PROPERTY_NAME": "PROPERTY_VALUE"}\n}\n')),(0,o.kt)("h3",{id:"non-fungible"},"Non-fungible"),(0,o.kt)("p",null,"There are 2 definitions for the NFT:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"either for a single token"),(0,o.kt)("li",{parentName:"ol"},"either for a collection of tokens")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"NFTs always have 8 decimals.")),(0,o.kt)("p",null,"Example of a NFT:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "supply": 100000000, // 1 token\n "type": "non-fungible",\n "name": "My NFT",\n "symbol": "MNFT",\n "properties": {\n "image": "base64 of the image",\n "description": "This is a NFT with an image"\n }\n}\n')),(0,o.kt)("p",null,"Example of a NFT Collection:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "supply": 300000000, // 3 tokens\n "type": "non-fungible",\n "name": "COLLETION NAME",\n "symbol": "COLLETION_SYMBOL",\n "properties": {"globalProperty": "value"},\n "collection": [\n {"image": "link"},\n {"image": "link"},\n {"image": "link"}\n ]\n}\n')),(0,o.kt)("p",null,"During the transaction validation, the miners will understand how to interpret this transaction and create the relative assets and UTXOs to make transfers possible right away."),(0,o.kt)("h2",{id:"resupply-fungible-tokens-aeip-18"},"Resupply fungible tokens (AEIP-18)"),(0,o.kt)("p",null,"As mentioned above, fungible tokens may accept to be minted at any time. ",(0,o.kt)("strong",{parentName:"p"},"This transaction must be done in the same transaction chain of the referenced token")," (to prove ownership of the token) and it's type must be ",(0,o.kt)("inlineCode",{parentName:"p"},"token"),"."),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/develop/priv/json-schemas/token-resupply.json"},"The JSON Schema is available on GitHub")),(0,o.kt)("p",null,"Here's an example of the token resupply transaction's content:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aeip": [8, 18],\n "supply": 100000000000, // 1000 tokens if referenced token has decimals=8\n "token_reference": "0000C13373C96538B468CCDAB8F95FDC3744EBFA2CD36A81C3791B2A205705D9C3A2"\n}\n')),(0,o.kt)("h2",{id:"recipients-aeip-19"},"Recipients (AEIP-19)"),(0,o.kt)("p",null,"When creating a token transaction (creation or resupply), it is also possible to specify a list of recipients that will receive all or some of the minted tokens.\nIn order to do so, a ",(0,o.kt)("inlineCode",{parentName:"p"},"recipients")," field must specified in the transaction's content."),(0,o.kt)("p",null,"Here's an example for a fungible token resupply:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aeip": [8, 18, 19],\n "supply": 1000,\n "token_reference": "0000C13373C96538B468CCDAB8F95FDC3744EBFA2CD36A81C3791B2A205705D9C3A2",\n "recipients": [\n {\n "to": "0000f1fd....",\n "amount": 100000000 // 1 token\n }\n ]\n}\n')),(0,o.kt)("p",null,"Here's another example for a non-fungible token creation:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aeip": [2, 8, 19],\n "supply": 100000000, // 1 token\n "type": "non-fungible",\n "name": "My NFT",\n "symbol": "MNFT",\n "properties": {\n "image": "base64 of the image",\n "description": "This is a NFT with an image"\n },\n "recipients": [\n {\n "to": "0000f1fd....",\n "amount": 100000000 // 1 token\n }\n ]\n}\n')),(0,o.kt)("h2",{id:"transfer"},"Transfer"),(0,o.kt)("p",null,"Now that the tokens are created, there are few ways to move them around:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Via a wallet (such as the ",(0,o.kt)("a",{parentName:"li",href:"https://www.archethic.net/aewallet.html"},"Archethic Wallet"),")"),(0,o.kt)("li",{parentName:"ol"},"Via the ",(0,o.kt)("inlineCode",{parentName:"li"},"send-transaction")," API"),(0,o.kt)("li",{parentName:"ol"},"Via a Smart Contract")),(0,o.kt)("p",null,"Example of a NFT transfer via the API:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "method": "send_transaction",\n "jsonrpc": "2.0",\n "id": 1,\n "params": {\n "transaction": {\n "version": 2,\n "type": "transfer",\n // [...]\n "data": {\n "ledger": {\n "token": {\n "transfers": [\n {\n "to": "0000ABCD...EF", // recipient\'s address\n "amount": 100000000, // 1 token\n "tokenAddress": "00001AC8...4F", // token definition address\n "tokenId": 1 // 1st token of the collection\n }\n ]\n }\n }\n }\n }\n }\n}\n')),(0,o.kt)("p",null,"Example of a transfer via a Smart Contract:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-elixir"},"Contract.add_token_transfer(token_address: 0x00001AC8...4F, to: 0x0000ABCD...EF, amount: 100000000)\n")))}d.isMDXComponent=!0},8209:(e,n,t)=>{t(67294)}}]); \ No newline at end of file diff --git a/assets/js/11838df3.92304a1f.js b/assets/js/11838df3.92304a1f.js deleted file mode 100644 index 2c7193996..000000000 --- a/assets/js/11838df3.92304a1f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3042],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var r=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i=r.createContext({}),s=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,i=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=s(a),f=o,m=u["".concat(i,".").concat(f)]||u[f]||p[f]||n;return a?r.createElement(m,l(l({ref:t},d),{},{components:a})):r.createElement(m,l({ref:t},d))}));function m(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,l=new Array(n);l[0]=f;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[u]="string"==typeof e?e:o,l[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>f,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>s,contentTitle:()=>c,default:()=>y,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var r=a(87462),o=a(67294),n=a(3905);a(8209);const l={id:"uco-data",title:"UcoData",hide_table_of_contents:!1},c=void 0,i={unversionedId:"build/api/schema/objects/uco-data",id:"build/api/schema/objects/uco-data",title:"UcoData",description:"No description",source:"@site/docs/build/api/schema/objects/uco-data.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/uco-data",permalink:"/build/api/schema/objects/uco-data",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"uco-data",title:"UcoData",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Transaction",permalink:"/build/api/schema/objects/transaction"},next:{title:"UcoLedger",permalink:"/build/api/schema/objects/uco-ledger"}},s={},d=[{value:"Fields",id:"fields",level:3},{value:'UcoData.eurFloat ',id:"code-style-fontweight-normal-ucodatabeurbcodefloat-",level:4},{value:'UcoData.usdFloat ',id:"code-style-fontweight-normal-ucodatabusdbcodefloat-",level:4},{value:"Member of",id:"member-of",level:3}],u=()=>(0,n.kt)(o.Fragment,null,(0,n.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,n.kt)(o.Fragment,null,"Specification",(0,n.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,n.kt)(o.Fragment,null,(0,n.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:u,SpecifiedBy:p,Badge:f},b="wrapper";function y(e){let{components:t,...a}=e;return(0,n.kt)(b,(0,r.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"No description"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-graphql"},"type UcoData {\n eur: Float\n usd: Float\n}\n")),(0,n.kt)("h3",{id:"fields"},"Fields"),(0,n.kt)("h4",{id:"code-style-fontweight-normal-ucodatabeurbcodefloat-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"UcoData.",(0,n.kt)("b",null,"eur"))),(0,n.kt)(u,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/float"},(0,n.kt)("inlineCode",{parentName:"a"},"Float"))," ",(0,n.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-ucodatabusdbcodefloat-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"UcoData.",(0,n.kt)("b",null,"usd"))),(0,n.kt)(u,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/float"},(0,n.kt)("inlineCode",{parentName:"a"},"Float"))," ",(0,n.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h3",{id:"member-of"},"Member of"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/build/api/schema/objects/oracle-services"},(0,n.kt)("inlineCode",{parentName:"a"},"OracleServices"))," ",(0,n.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/11838df3.bb575f68.js b/assets/js/11838df3.bb575f68.js new file mode 100644 index 000000000..3d2e8dbcf --- /dev/null +++ b/assets/js/11838df3.bb575f68.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3042],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var r=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i=r.createContext({}),s=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,i=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=s(a),f=o,m=u["".concat(i,".").concat(f)]||u[f]||p[f]||n;return a?r.createElement(m,l(l({ref:t},d),{},{components:a})):r.createElement(m,l({ref:t},d))}));function m(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,l=new Array(n);l[0]=f;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[u]="string"==typeof e?e:o,l[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>f,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>s,contentTitle:()=>c,default:()=>y,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var r=a(87462),o=a(67294),n=a(3905);a(8209);const l={id:"uco-data",title:"UcoData",hide_table_of_contents:!1},c=void 0,i={unversionedId:"build/api/schema/objects/uco-data",id:"build/api/schema/objects/uco-data",title:"UcoData",description:"No description",source:"@site/docs/build/api/schema/objects/uco-data.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/uco-data",permalink:"/build/api/schema/objects/uco-data",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"uco-data",title:"UcoData",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Transaction",permalink:"/build/api/schema/objects/transaction"},next:{title:"UcoLedger",permalink:"/build/api/schema/objects/uco-ledger"}},s={},d=[{value:"Fields",id:"fields",level:3},{value:'UcoData.eurFloat ',id:"code-style-fontweight-normal-ucodatabeurbcodefloat-",level:4},{value:'UcoData.usdFloat ',id:"code-style-fontweight-normal-ucodatabusdbcodefloat-",level:4},{value:"Member of",id:"member-of",level:3}],u=()=>(0,n.kt)(o.Fragment,null,(0,n.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,n.kt)(o.Fragment,null,"Specification",(0,n.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,n.kt)(o.Fragment,null,(0,n.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:u,SpecifiedBy:p,Badge:f},b="wrapper";function y(e){let{components:t,...a}=e;return(0,n.kt)(b,(0,r.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"No description"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-graphql"},"type UcoData {\n eur: Float\n usd: Float\n}\n")),(0,n.kt)("h3",{id:"fields"},"Fields"),(0,n.kt)("h4",{id:"code-style-fontweight-normal-ucodatabeurbcodefloat-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"UcoData.",(0,n.kt)("b",null,"eur"))),(0,n.kt)(u,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/float"},(0,n.kt)("inlineCode",{parentName:"a"},"Float"))," ",(0,n.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-ucodatabusdbcodefloat-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"UcoData.",(0,n.kt)("b",null,"usd"))),(0,n.kt)(u,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/float"},(0,n.kt)("inlineCode",{parentName:"a"},"Float"))," ",(0,n.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h3",{id:"member-of"},"Member of"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/build/api/schema/objects/oracle-services"},(0,n.kt)("inlineCode",{parentName:"a"},"OracleServices"))," ",(0,n.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/12706266.2aaae211.js b/assets/js/12706266.2aaae211.js deleted file mode 100644 index 7df3d8fc2..000000000 --- a/assets/js/12706266.2aaae211.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1137],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),s=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=s(n),m=r,k=d["".concat(c,".").concat(m)]||d[m]||u[m]||i;return n?a.createElement(k,l(l({ref:t},p),{},{components:n})):a.createElement(k,l({ref:t},p))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[d]="string"==typeof e?e:r,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"language",title:"Smart Contract Language",sidebar_label:"Language"},l=void 0,o={unversionedId:"build/smart-contracts/language/legacy/language",id:"build/smart-contracts/language/legacy/language",title:"Smart Contract Language",description:"Archethic Blockchain defines a new smart contract language which was designed to resolve the issue of smart contracts:",source:"@site/docs/build/smart-contracts/language/legacy/language.md",sourceDirName:"build/smart-contracts/language/legacy",slug:"/build/smart-contracts/language/legacy/language",permalink:"/build/smart-contracts/language/legacy/language",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"language",title:"Smart Contract Language",sidebar_label:"Language"},sidebar:"docs",previous:{title:"Examples",permalink:"/build/smart-contracts/language/legacy/examples"},next:{title:"Playground",permalink:"/build/smart-contracts/playground/"}},c={},s=[{value:"Triggers/Actions",id:"triggersactions",level:2},{value:"Conditions",id:"conditions",level:2},{value:"Global variables",id:"global-variables",level:2},{value:"Functions",id:"functions",level:2},{value:"Utilities",id:"utilities",level:3},{value:"Statements",id:"statements",level:3}],p={toc:s},d="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Archethic Blockchain defines a new smart contract language which was designed to resolve the issue of smart contracts:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Expressiveness"),(0,r.kt)("li",{parentName:"ul"},"Simplify"),(0,r.kt)("li",{parentName:"ul"},"Security")),(0,r.kt)("p",null,"Along with the new features of Archethic Smart Contracts (triggers, conditions, actions), a new custom language is defined"),(0,r.kt)("h2",{id:"triggersactions"},"Triggers/Actions"),(0,r.kt)("p",null,"To define a trigger, we need to specify an action block with its trigger type and the following parameters (if presents)"),(0,r.kt)("p",null,"For example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"based on an incoming transaction")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"actions triggered_by: transaction do\n # do something when a receive transaction\nend\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"based on time interval")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: interval, at: "0 8 * * *" do\n # do something each day at 8AM\nend\n')),(0,r.kt)("h2",{id:"conditions"},"Conditions"),(0,r.kt)("p",null,"To define a condition, we need to specify a condition block with its subject and the list conditions by fields:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"type")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"content")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"code")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"authorized_keys")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secrets")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uco_transfers")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token_transfers")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"previous_public_key")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"origin_family"))),(0,r.kt)("p",null,"For example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},'expecting the incoming transaction contains the content "hello"')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'condition transaction: [\n content: "Hello"\n]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"expecting all the transaction in the chain should be generated from a biometric device")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"condition inherit: [\n origin_family: biometric\n]\n")),(0,r.kt)("h2",{id:"global-variables"},"Global variables"),(0,r.kt)("p",null,"Smart Contract can use global variable in the different blocks:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"contract"),": represent the actual contract"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"transaction"),": incoming transaction"),(0,r.kt)("li",{parentName:"ul"},"(inherit condition only) ",(0,r.kt)("inlineCode",{parentName:"li"},"next"),": next transaction on the chain"),(0,r.kt)("li",{parentName:"ul"},"(inherit condition only) ",(0,r.kt)("inlineCode",{parentName:"li"},"previous"),": previous transaction on the chain")),(0,r.kt)("p",null,"Each of this variables contains the following fields:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"address")," (hex)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"type")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"content")," (abitraty string)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"code")," (abritraty string)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"authorized_keys")," (map of public keys)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secrets")," (list of encrypted secrets in hex)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"previous_public_key")," (hex)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"recipients")," (list of smart contract recipients addresses in hex)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uco_transfers")," (map of the uco transfers: ",(0,r.kt)("inlineCode",{parentName:"li"},"%{ recipient_address => amount }")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token_transfers")," (map of the token transfers: ",(0,r.kt)("inlineCode",{parentName:"li"},"%{ recipient_address => list(%{ amount: amount, token_address: token_to_transfer, token_id: token_id}}) "))),(0,r.kt)("h2",{id:"functions"},"Functions"),(0,r.kt)("p",null,"Archethic Smart Contracts relies on function which can be used on condition or action blocks."),(0,r.kt)("p",null,"There are two categories of functions:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Utilities"),(0,r.kt)("li",{parentName:"ul"},"Statements (for transaction generation)")),(0,r.kt)("h3",{id:"utilities"},"Utilities"),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"In the ",(0,r.kt)("inlineCode",{parentName:"p"},"condition")," block, if no parameter is given, the transaction's field value will be the first one")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"hash(data)"),": Perform a cryptographic hash")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"condition transaction: [\n content: hash(contract.code)\n]\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"regex_match?(data, pattern)"),": Verify a regular expression")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'condition transaction: [\n content: regex_match?("hello")\n]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"regex_extract(data, pattern)"),": Extract data from a regular expression")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"json_match?: Verify the data matches a JSONPath expression"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'condition oracle: [\n content: json_match?("$.uco.usd")\n]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"json_extract(data, pattern)"),": Extract data from a JSONPath expression")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'condition oracle: [\n content: json_extract("$.uco.usd") > 0.2\n]\n')),(0,r.kt)("h3",{id:"statements"},"Statements"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"set_type"),": Set the transaction type")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"actions triggered_by: transaction do\n set_type transfer\nend\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"add_uco_transfer"),": Add a new UCO transfer")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n add_uco_transfer to: "F28C3D5B3828AD3F8682F1B1D14A8507B829F65F7BE6C50427A6019CCB6801C", amount: 1.0\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"add_token_transfer"),": Add a new token transfer")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n add_token_transfer: to: "AF28C3D5B3828AD3F8682F1B1D14A8507B829F65F7BE6C50427A6019CCB6801C", token_address: "0D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CC", amount: 1.0\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"set_content"),": Set the new content")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n set_content "hello"\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"set_code"),": Set the new code")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n set_code """\n actions triggered_by: transaction do\n add_uco_transfer to: "0D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CC", amount: 2.0\n end\n """\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"add_ownership"),": Add a new ownership with a secret and its authorized public keys")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n add_ownership secret: "...", secret_key: "...", authorized_public_key: ["0D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CC"]\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"add_recipient"),": Add a contract address to reach")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: datetime, at: 1391309040 do\n add_recipient "0D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CC"\nend\n\n')))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/12706266.f49e0860.js b/assets/js/12706266.f49e0860.js new file mode 100644 index 000000000..7e6af610b --- /dev/null +++ b/assets/js/12706266.f49e0860.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1137],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),s=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=s(n),m=r,k=d["".concat(c,".").concat(m)]||d[m]||u[m]||i;return n?a.createElement(k,l(l({ref:t},p),{},{components:n})):a.createElement(k,l({ref:t},p))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[d]="string"==typeof e?e:r,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"language",title:"Smart Contract Language",sidebar_label:"Language"},l=void 0,o={unversionedId:"build/smart-contracts/language/legacy/language",id:"build/smart-contracts/language/legacy/language",title:"Smart Contract Language",description:"Archethic Blockchain defines a new smart contract language which was designed to resolve the issue of smart contracts:",source:"@site/docs/build/smart-contracts/language/legacy/language.md",sourceDirName:"build/smart-contracts/language/legacy",slug:"/build/smart-contracts/language/legacy/language",permalink:"/build/smart-contracts/language/legacy/language",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"language",title:"Smart Contract Language",sidebar_label:"Language"},sidebar:"docs",previous:{title:"Examples",permalink:"/build/smart-contracts/language/legacy/examples"},next:{title:"Playground",permalink:"/build/smart-contracts/playground/"}},c={},s=[{value:"Triggers/Actions",id:"triggersactions",level:2},{value:"Conditions",id:"conditions",level:2},{value:"Global variables",id:"global-variables",level:2},{value:"Functions",id:"functions",level:2},{value:"Utilities",id:"utilities",level:3},{value:"Statements",id:"statements",level:3}],p={toc:s},d="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Archethic Blockchain defines a new smart contract language which was designed to resolve the issue of smart contracts:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Expressiveness"),(0,r.kt)("li",{parentName:"ul"},"Simplify"),(0,r.kt)("li",{parentName:"ul"},"Security")),(0,r.kt)("p",null,"Along with the new features of Archethic Smart Contracts (triggers, conditions, actions), a new custom language is defined"),(0,r.kt)("h2",{id:"triggersactions"},"Triggers/Actions"),(0,r.kt)("p",null,"To define a trigger, we need to specify an action block with its trigger type and the following parameters (if presents)"),(0,r.kt)("p",null,"For example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"based on an incoming transaction")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"actions triggered_by: transaction do\n # do something when a receive transaction\nend\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"based on time interval")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: interval, at: "0 8 * * *" do\n # do something each day at 8AM\nend\n')),(0,r.kt)("h2",{id:"conditions"},"Conditions"),(0,r.kt)("p",null,"To define a condition, we need to specify a condition block with its subject and the list conditions by fields:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"type")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"content")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"code")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"authorized_keys")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secrets")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uco_transfers")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token_transfers")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"previous_public_key")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"origin_family"))),(0,r.kt)("p",null,"For example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},'expecting the incoming transaction contains the content "hello"')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'condition transaction: [\n content: "Hello"\n]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"expecting all the transaction in the chain should be generated from a biometric device")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"condition inherit: [\n origin_family: biometric\n]\n")),(0,r.kt)("h2",{id:"global-variables"},"Global variables"),(0,r.kt)("p",null,"Smart Contract can use global variable in the different blocks:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"contract"),": represent the actual contract"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"transaction"),": incoming transaction"),(0,r.kt)("li",{parentName:"ul"},"(inherit condition only) ",(0,r.kt)("inlineCode",{parentName:"li"},"next"),": next transaction on the chain"),(0,r.kt)("li",{parentName:"ul"},"(inherit condition only) ",(0,r.kt)("inlineCode",{parentName:"li"},"previous"),": previous transaction on the chain")),(0,r.kt)("p",null,"Each of this variables contains the following fields:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"address")," (hex)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"type")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"content")," (abitraty string)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"code")," (abritraty string)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"authorized_keys")," (map of public keys)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"secrets")," (list of encrypted secrets in hex)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"previous_public_key")," (hex)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"recipients")," (list of smart contract recipients addresses in hex)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uco_transfers")," (map of the uco transfers: ",(0,r.kt)("inlineCode",{parentName:"li"},"%{ recipient_address => amount }")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token_transfers")," (map of the token transfers: ",(0,r.kt)("inlineCode",{parentName:"li"},"%{ recipient_address => list(%{ amount: amount, token_address: token_to_transfer, token_id: token_id}}) "))),(0,r.kt)("h2",{id:"functions"},"Functions"),(0,r.kt)("p",null,"Archethic Smart Contracts relies on function which can be used on condition or action blocks."),(0,r.kt)("p",null,"There are two categories of functions:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Utilities"),(0,r.kt)("li",{parentName:"ul"},"Statements (for transaction generation)")),(0,r.kt)("h3",{id:"utilities"},"Utilities"),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"In the ",(0,r.kt)("inlineCode",{parentName:"p"},"condition")," block, if no parameter is given, the transaction's field value will be the first one")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"hash(data)"),": Perform a cryptographic hash")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"condition transaction: [\n content: hash(contract.code)\n]\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"regex_match?(data, pattern)"),": Verify a regular expression")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'condition transaction: [\n content: regex_match?("hello")\n]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"regex_extract(data, pattern)"),": Extract data from a regular expression")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"json_match?: Verify the data matches a JSONPath expression"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'condition oracle: [\n content: json_match?("$.uco.usd")\n]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"json_extract(data, pattern)"),": Extract data from a JSONPath expression")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'condition oracle: [\n content: json_extract("$.uco.usd") > 0.2\n]\n')),(0,r.kt)("h3",{id:"statements"},"Statements"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"set_type"),": Set the transaction type")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"actions triggered_by: transaction do\n set_type transfer\nend\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"add_uco_transfer"),": Add a new UCO transfer")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n add_uco_transfer to: "F28C3D5B3828AD3F8682F1B1D14A8507B829F65F7BE6C50427A6019CCB6801C", amount: 1.0\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"add_token_transfer"),": Add a new token transfer")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n add_token_transfer: to: "AF28C3D5B3828AD3F8682F1B1D14A8507B829F65F7BE6C50427A6019CCB6801C", token_address: "0D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CC", amount: 1.0\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"set_content"),": Set the new content")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n set_content "hello"\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"set_code"),": Set the new code")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n set_code """\n actions triggered_by: transaction do\n add_uco_transfer to: "0D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CC", amount: 2.0\n end\n """\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"add_ownership"),": Add a new ownership with a secret and its authorized public keys")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: transaction do\n add_ownership secret: "...", secret_key: "...", authorized_public_key: ["0D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CC"]\nend\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"add_recipient"),": Add a contract address to reach")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'actions triggered_by: datetime, at: 1391309040 do\n add_recipient "0D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CC"\nend\n\n')))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/145f3c45.7a917254.js b/assets/js/145f3c45.7a917254.js deleted file mode 100644 index 8496d7fac..000000000 --- a/assets/js/145f3c45.7a917254.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8268],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>b});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),c=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,b=p["".concat(i,".").concat(m)]||p[m]||u[m]||o;return n?a.createElement(b,l(l({ref:t},d),{},{components:n})):a.createElement(b,l({ref:t},d))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:r,l[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>s,default:()=>f,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var a=n(87462),r=n(67294),o=n(3905);n(8209);const l={id:"transaction-input",title:"TransactionInput",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/objects/transaction-input",id:"build/api/schema/objects/transaction-input",title:"TransactionInput",description:"[TransactionInput] represents the inputs from the transaction",source:"@site/docs/build/api/schema/objects/transaction-input.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-input",permalink:"/build/api/schema/objects/transaction-input",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-input",title:"TransactionInput",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionError",permalink:"/build/api/schema/objects/transaction-error"},next:{title:"TransactionMovement",permalink:"/build/api/schema/objects/transaction-movement"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'TransactionInput.amountInt ',id:"code-style-fontweight-normal-transactioninputbamountbcodeint-",level:4},{value:'TransactionInput.fromAddress ',id:"code-style-fontweight-normal-transactioninputbfrombcodeaddress-",level:4},{value:'TransactionInput.spentBoolean ',id:"code-style-fontweight-normal-transactioninputbspentbcodeboolean-",level:4},{value:'TransactionInput.timestampTimestamp ',id:"code-style-fontweight-normal-transactioninputbtimestampbcodetimestamp-",level:4},{value:'TransactionInput.tokenAddressAddress ',id:"code-style-fontweight-normal-transactioninputbtokenaddressbcodeaddress-",level:4},{value:'TransactionInput.tokenIdInt ',id:"code-style-fontweight-normal-transactioninputbtokenidbcodeint-",level:4},{value:'TransactionInput.typeString ',id:"code-style-fontweight-normal-transactioninputbtypebcodestring-",level:4},{value:"Returned by",id:"returned-by",level:3},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},k="wrapper";function f(e){let{components:t,...n}=e;return(0,o.kt)(k,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TransactionInput]"," represents the inputs from the transaction\nIt includes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"From: transaction which send the amount of assets"),(0,o.kt)("li",{parentName:"ul"},"Amount: asset amount"),(0,o.kt)("li",{parentName:"ul"},"Type: UCO/token/Call"),(0,o.kt)("li",{parentName:"ul"},"token address: address of the token if the type is token"),(0,o.kt)("li",{parentName:"ul"},"Spent: determines if the input has been spent"),(0,o.kt)("li",{parentName:"ul"},"Timestamp: Date time when the inputs was generated"),(0,o.kt)("li",{parentName:"ul"},"token id: It is the id for a token which is allocated when the token is minted.")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionInput {\n amount: Int\n from: Address\n spent: Boolean\n timestamp: Timestamp\n tokenAddress: Address\n tokenId: Int\n type: String\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbamountbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"amount"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbfrombcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"from"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbspentbcodeboolean-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"spent"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,o.kt)("inlineCode",{parentName:"a"},"Boolean"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbtimestampbcodetimestamp-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"timestamp"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,o.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbtokenaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"tokenAddress"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbtokenidbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"tokenId"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbtypebcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"type"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-inputs"},(0,o.kt)("inlineCode",{parentName:"a"},"transactionInputs"))," ",(0,o.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/145f3c45.be0e5b16.js b/assets/js/145f3c45.be0e5b16.js new file mode 100644 index 000000000..0e01ca73d --- /dev/null +++ b/assets/js/145f3c45.be0e5b16.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8268],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>b});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),c=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,b=p["".concat(i,".").concat(m)]||p[m]||u[m]||o;return n?a.createElement(b,l(l({ref:t},d),{},{components:n})):a.createElement(b,l({ref:t},d))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:r,l[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>s,default:()=>f,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var a=n(87462),r=n(67294),o=n(3905);n(8209);const l={id:"transaction-input",title:"TransactionInput",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/objects/transaction-input",id:"build/api/schema/objects/transaction-input",title:"TransactionInput",description:"[TransactionInput] represents the inputs from the transaction",source:"@site/docs/build/api/schema/objects/transaction-input.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-input",permalink:"/build/api/schema/objects/transaction-input",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-input",title:"TransactionInput",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionError",permalink:"/build/api/schema/objects/transaction-error"},next:{title:"TransactionMovement",permalink:"/build/api/schema/objects/transaction-movement"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'TransactionInput.amountInt ',id:"code-style-fontweight-normal-transactioninputbamountbcodeint-",level:4},{value:'TransactionInput.fromAddress ',id:"code-style-fontweight-normal-transactioninputbfrombcodeaddress-",level:4},{value:'TransactionInput.spentBoolean ',id:"code-style-fontweight-normal-transactioninputbspentbcodeboolean-",level:4},{value:'TransactionInput.timestampTimestamp ',id:"code-style-fontweight-normal-transactioninputbtimestampbcodetimestamp-",level:4},{value:'TransactionInput.tokenAddressAddress ',id:"code-style-fontweight-normal-transactioninputbtokenaddressbcodeaddress-",level:4},{value:'TransactionInput.tokenIdInt ',id:"code-style-fontweight-normal-transactioninputbtokenidbcodeint-",level:4},{value:'TransactionInput.typeString ',id:"code-style-fontweight-normal-transactioninputbtypebcodestring-",level:4},{value:"Returned by",id:"returned-by",level:3},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},k="wrapper";function f(e){let{components:t,...n}=e;return(0,o.kt)(k,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TransactionInput]"," represents the inputs from the transaction\nIt includes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"From: transaction which send the amount of assets"),(0,o.kt)("li",{parentName:"ul"},"Amount: asset amount"),(0,o.kt)("li",{parentName:"ul"},"Type: UCO/token/Call"),(0,o.kt)("li",{parentName:"ul"},"token address: address of the token if the type is token"),(0,o.kt)("li",{parentName:"ul"},"Spent: determines if the input has been spent"),(0,o.kt)("li",{parentName:"ul"},"Timestamp: Date time when the inputs was generated"),(0,o.kt)("li",{parentName:"ul"},"token id: It is the id for a token which is allocated when the token is minted.")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionInput {\n amount: Int\n from: Address\n spent: Boolean\n timestamp: Timestamp\n tokenAddress: Address\n tokenId: Int\n type: String\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbamountbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"amount"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbfrombcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"from"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbspentbcodeboolean-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"spent"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,o.kt)("inlineCode",{parentName:"a"},"Boolean"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbtimestampbcodetimestamp-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"timestamp"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,o.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbtokenaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"tokenAddress"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbtokenidbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"tokenId"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactioninputbtypebcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionInput.",(0,o.kt)("b",null,"type"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-inputs"},(0,o.kt)("inlineCode",{parentName:"a"},"transactionInputs"))," ",(0,o.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/147d0e4e.24f431f4.js b/assets/js/147d0e4e.8713b214.js similarity index 53% rename from assets/js/147d0e4e.24f431f4.js rename to assets/js/147d0e4e.8713b214.js index e4b83788d..cb80d02b7 100644 --- a/assets/js/147d0e4e.24f431f4.js +++ b/assets/js/147d0e4e.8713b214.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1166],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=s(n),h=a,m=d["".concat(l,".").concat(h)]||d[h]||p[h]||i;return n?r.createElement(m,o(o({ref:t},u),{},{components:n})):r.createElement(m,o({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=h;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"oracle-chain",title:"OracleChain"},o=void 0,c={unversionedId:"learn/oracle-chain",id:"learn/oracle-chain",title:"OracleChain",description:"Archethic Blockchain supports Off-Chain communication through a dedicated transaction chain called OracleChain.",source:"@site/docs/learn/oracle-chain.md",sourceDirName:"learn",slug:"/learn/oracle-chain",permalink:"/learn/oracle-chain",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"oracle-chain",title:"OracleChain"},sidebar:"docs",previous:{title:"Governance",permalink:"/learn/governance/"},next:{title:"P2P",permalink:"/learn/p2p/"}},l={},s=[{value:"How is it work ?",id:"how-is-it-work-",level:2},{value:"Services",id:"services",level:2}],u={toc:s},d="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic Blockchain supports Off-Chain communication through a dedicated transaction chain called ",(0,a.kt)("inlineCode",{parentName:"p"},"OracleChain"),"."),(0,a.kt)("p",null,"It aims to gather external data to be used inside the network or the smart contract layer."),(0,a.kt)("h2",{id:"how-is-it-work-"},"How is it work ?"),(0,a.kt)("p",null,"OracleChain behaves a bit like the ",(0,a.kt)("a",{parentName:"p",href:"/learn/sharding/beacon-chain"},"BeaconChain")," except the transaction on the chain are generated every 10min but only when there is a new data updated."),(0,a.kt)("p",null,"It's using a long-polling mechanism to get data from external sources and submit a transaction through ARCH Consensus."),(0,a.kt)("p",null,"By using ARCH consensus, we ensure the atomic commitment of the data submitted and ensure validity of the information written into the transaction."),(0,a.kt)("p",null,"Each node receives the new transaction from the OracleChain and can apply behaviors from this new data and notify smart contracts which depends on oracle updates."),(0,a.kt)("mermaid",{value:"graph TD\n A[Node1] --\x3e|1. Fetch data| B\n B(External service: ie. UCO Price)\n A --\x3e | 2. Send transaction| C\n A --\x3e | 2. Send transaction| D\n C[Node2] --\x3e | 3. Check data | B \n D[Node3] --\x3e | 3. Check data |B\n C[Node2] --\x3e | 4. Validate transaction | D \n D[Node2] --\x3e C"}),(0,a.kt)("h2",{id:"services"},"Services"),(0,a.kt)("p",null,"The list of services supported by the OracleChain:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"UCO Price Feed: fetching UCO token price from Coingecko in USD/EUR currency and is used for the:",(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},"Transaction Fee algorithm"),(0,a.kt)("li",{parentName:"ul"},"Auto reward of nodes which didn't receive enough mining rewards")))))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1166],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=s(n),h=a,m=d["".concat(l,".").concat(h)]||d[h]||p[h]||i;return n?r.createElement(m,o(o({ref:t},u),{},{components:n})):r.createElement(m,o({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=h;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"oracle-chain",title:"OracleChain"},o=void 0,c={unversionedId:"learn/oracle-chain",id:"learn/oracle-chain",title:"OracleChain",description:"Archethic Blockchain supports Off-Chain communication through a dedicated transaction chain called OracleChain.",source:"@site/docs/learn/oracle-chain.md",sourceDirName:"learn",slug:"/learn/oracle-chain",permalink:"/learn/oracle-chain",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"oracle-chain",title:"OracleChain"},sidebar:"docs",previous:{title:"Governance",permalink:"/learn/governance/"},next:{title:"P2P",permalink:"/learn/p2p/"}},l={},s=[{value:"How is it work ?",id:"how-is-it-work-",level:2},{value:"Services",id:"services",level:2}],u={toc:s},d="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic Blockchain supports Off-Chain communication through a dedicated transaction chain called ",(0,a.kt)("inlineCode",{parentName:"p"},"OracleChain"),"."),(0,a.kt)("p",null,"It aims to gather external data to be used inside the network or the smart contract layer."),(0,a.kt)("h2",{id:"how-is-it-work-"},"How is it work ?"),(0,a.kt)("p",null,"OracleChain behaves a bit like the ",(0,a.kt)("a",{parentName:"p",href:"/learn/sharding/beacon-chain"},"BeaconChain")," except the transaction on the chain are generated every 10min but only when there is a new data updated."),(0,a.kt)("p",null,"It's using a long-polling mechanism to get data from external sources and submit a transaction through ARCH Consensus."),(0,a.kt)("p",null,"By using ARCH consensus, we ensure the atomic commitment of the data submitted and ensure validity of the information written into the transaction."),(0,a.kt)("p",null,"Each node receives the new transaction from the OracleChain and can apply behaviors from this new data and notify smart contracts which depends on oracle updates."),(0,a.kt)("mermaid",{value:"graph TD\n A[Node1] --\x3e|1. Fetch data| B\n B(External service: ie. UCO Price)\n A --\x3e | 2. Send transaction| C\n A --\x3e | 2. Send transaction| D\n C[Node2] --\x3e | 3. Check data | B \n D[Node3] --\x3e | 3. Check data |B\n C[Node2] --\x3e | 4. Validate transaction | D \n D[Node2] --\x3e C"}),(0,a.kt)("h2",{id:"services"},"Services"),(0,a.kt)("p",null,"The list of services supported by the OracleChain:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"UCO Price Feed: fetching UCO token price from Coingecko in USD/EUR currency and is used for the:",(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},"Transaction Fee algorithm"),(0,a.kt)("li",{parentName:"ul"},"Auto reward of nodes which didn't receive enough mining rewards")))))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/14d826f7.10872494.js b/assets/js/14d826f7.10872494.js deleted file mode 100644 index bb7cefaa5..000000000 --- a/assets/js/14d826f7.10872494.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7870],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>k});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},h=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,h=i(e,["components","mdxType","originalType","parentName"]),u=s(n),d=o,k=u["".concat(c,".").concat(d)]||u[d]||p[d]||a;return n?r.createElement(k,l(l({ref:t},h),{},{components:n})):r.createElement(k,l({ref:t},h))}));function k(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,l=new Array(a);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:o,l[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>s});var r=n(87462),o=(n(67294),n(3905));n(8209);const a={id:"wallet",title:"Wallet"},l=void 0,i={unversionedId:"FAQ/wallet",id:"FAQ/wallet",title:"Wallet",description:"General",source:"@site/docs/FAQ/wallet.md",sourceDirName:"FAQ",slug:"/FAQ/wallet",permalink:"/FAQ/wallet",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"wallet",title:"Wallet"},sidebar:"docs",previous:{title:"Archethic Bridge $UCO one-way",permalink:"/FAQ/bridge"},next:{title:"Contributing",permalink:"/contributing"}},c={},s=[{value:"General",id:"general",level:2},{value:" How to retrieve the address of my Archethic wallet?",id:"-how-to-retrieve-the-address-of-my-archethic-wallet",level:3},{value:" How to create a wallet on the Archethic blockchain?",id:"-how-to-create-a-wallet-on-the-archethic-blockchain",level:3},{value:" How to create a fungible token on the Archethic Wallet?",id:"-how-to-create-a-fungible-token-on-the-archethic-wallet",level:3},{value:" How to create a NFT on the Archethic Wallet?",id:"-how-to-create-a-nft-on-the-archethic-wallet",level:3}],h={toc:s},u="wrapper";function p(e){let{components:t,...a}=e;return(0,o.kt)(u,(0,r.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"general"},"General"),(0,o.kt)("h3",{id:"-how-to-retrieve-the-address-of-my-archethic-wallet"},(0,o.kt)("strong",{parentName:"h3"}," How to retrieve the address of my Archethic wallet?")),(0,o.kt)("p",null,"Firstly, you should be aware that your address changes with each transaction."),(0,o.kt)("p",null,"But don't worry. If you provide an old address to receive funds or tokens, it will still work, and you will receive what you are expecting."),(0,o.kt)("admonition",{type:"success"},(0,o.kt)("p",{parentName:"admonition"},"If you do not have an Archethic wallet or address yet, we invite you to refer to the section",(0,o.kt)("br",null),(0,o.kt)("a",{href:"/FAQ/wallet#-how-to-create-a-wallet-on-the-archethic-blockchain"},'"How to create a wallet on the Archethic blockchain?"'))),(0,o.kt)("p",null,"Once your wallet is created,",(0,o.kt)("br",null),'\n1) select the account you wish to receive your funds or tokens on via the "Keychain" tab, which lists your accounts and services contained in your decentralized keychain.',(0,o.kt)("br",null),'\n2) Once selected, the application will display the "Main" tab, where a "Receive" button is shown.',(0,o.kt)("br",null),"\n3) Click on it, and you will get your address, either in the form of a QR Code or in text form by clicking on the icon corresponding to the copy action.",(0,o.kt)("br",null)),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"wallet-address",src:n(71992).Z,width:"353",height:"411"})),(0,o.kt)("h3",{id:"-how-to-create-a-wallet-on-the-archethic-blockchain"},(0,o.kt)("strong",{parentName:"h3"}," How to create a wallet on the Archethic blockchain?")),(0,o.kt)("p",null,"Firstly, ",(0,o.kt)("a",{href:"https://www.archethic.net/wallet",target:"_blank"},"download the wallet")," version that corresponds to the platform you want to use it on from the Archethic website or the app stores.\nOnce installed, you can launch the application."),(0,o.kt)("p",null,"1) The first page invites you to read and accept ","[https://www.archethic.net/privacy-policy-wallet/]","(the privacy policy).",(0,o.kt)("br",null),'\n2) Once accepted, you can click on "Get started" to begin creating your wallet.',(0,o.kt)("br",null),"\n3) First, give a name to your first account within your future decentralized keychain.",(0,o.kt)("br",null),"\n4) A confirmation popup appears to verify that the account name is to your liking.",(0,o.kt)("br",null),"\n5) The application reminds you of important security information to protect your funds and your secret phrase.",(0,o.kt)("br",null),'\n6) After reading the information, click on "I understand".',(0,o.kt)("br",null),"\n7) The 24 words of your secret phrase will be displayed.",(0,o.kt)("br",null)),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Do not share them with anyone and write them down so you can confirm them on the following screen.")),(0,o.kt)("p",null,"8) Confirmation requires that the words be put back in order.",(0,o.kt)("br",null),"\n9) Once the process of confirming the order of the words in the secret phrase is done, you can select the means to protect your application (PIN code, password, biometrics, YubiKey).",(0,o.kt)("br",null),"\n10) After a few seconds of waiting, your keychain is created with your first account.",(0,o.kt)("br",null)),(0,o.kt)("p",null,"You can now enjoy the Archethic ecosystem. Enjoy!"),(0,o.kt)("h3",{id:"-how-to-create-a-fungible-token-on-the-archethic-wallet"},(0,o.kt)("strong",{parentName:"h3"}," How to create a fungible token on the Archethic Wallet?")),(0,o.kt)("p",null,"1) Open your Archethic Wallet and click on tokens in the main tab."),(0,o.kt)("img",{src:"/img/faq/wallet/tokens1.png",width:"400px"}),(0,o.kt)("p",null,"2) Click on create token. "),(0,o.kt)("img",{src:"/img/faq/wallet/tokens2.png",width:"400px"}),(0,o.kt)("p",null,"3) Insert all the information:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},'Name: Name of the token, e.g., "Archethic"'),(0,o.kt)("li",{parentName:"ul"},'Symbol: Symbol of the token, e.g., "UCO"'),(0,o.kt)("li",{parentName:"ul"},"Initial Supply: The maximum supply of your token.")),(0,o.kt)("p",null,'And click on "Create Token".'),(0,o.kt)("img",{src:"/img/faq/wallet/tokens3.png",width:"400px"}),(0,o.kt)("p",null,"4) Confirm the transaction."),(0,o.kt)("p",null,"You have successfully created your Token!"),(0,o.kt)("img",{src:"/img/faq/wallet/tokens4.png",width:"400px"}),(0,o.kt)("h3",{id:"-how-to-create-a-nft-on-the-archethic-wallet"},(0,o.kt)("strong",{parentName:"h3"}," How to create a NFT on the Archethic Wallet?")),(0,o.kt)("p",null,"1) Click on 'NFT' at the bottom right of the application."),(0,o.kt)("p",null,"2) Choose a category"),(0,o.kt)("p",null,"3) Click on create a NFT"),(0,o.kt)("img",{src:"/img/faq/wallet/NFT1.png",width:"400px"}),(0,o.kt)("p",null,"4) Insert all the information:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},'Name: Name of the NFT such as "Archers"'),(0,o.kt)("li",{parentName:"ul"},'Symbol: Symbol such as "UCO"'),(0,o.kt)("li",{parentName:"ul"},"Description: Describe your NFT ")),(0,o.kt)("img",{src:"/img/faq/wallet/NFT2.png",width:"400px"}),(0,o.kt)("p",null,"5) Import your NFT"),(0,o.kt)("img",{src:"/img/faq/wallet/NFT3.png",width:"400px"}),(0,o.kt)("p",null,'6) Go to summary and click on "Create the NFT", confirm the mint'),(0,o.kt)("img",{src:"/img/faq/wallet/NFT4.png",width:"400px"}),(0,o.kt)("p",null,"You have successfully created an NFT and can locate it in the category you selected during step 2."))}p.isMDXComponent=!0},71992:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/wallet-FAQ-display-address-a4c212b56b5f8a328385ac7c6e5c3e66.png"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/14d826f7.9fbcf555.js b/assets/js/14d826f7.9fbcf555.js new file mode 100644 index 000000000..de5cb5383 --- /dev/null +++ b/assets/js/14d826f7.9fbcf555.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7870],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>k});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},h=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,h=i(e,["components","mdxType","originalType","parentName"]),u=s(n),d=o,k=u["".concat(c,".").concat(d)]||u[d]||p[d]||a;return n?r.createElement(k,l(l({ref:t},h),{},{components:n})):r.createElement(k,l({ref:t},h))}));function k(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,l=new Array(a);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:o,l[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>s});var r=n(87462),o=(n(67294),n(3905));n(8209);const a={id:"wallet",title:"Wallet"},l=void 0,i={unversionedId:"FAQ/wallet",id:"FAQ/wallet",title:"Wallet",description:"General",source:"@site/docs/FAQ/wallet.md",sourceDirName:"FAQ",slug:"/FAQ/wallet",permalink:"/FAQ/wallet",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"wallet",title:"Wallet"},sidebar:"docs",previous:{title:"Archethic aeSwap",permalink:"/FAQ/dex"},next:{title:"Contributing",permalink:"/contributing"}},c={},s=[{value:"General",id:"general",level:2},{value:" How to retrieve the address of my Archethic wallet?",id:"-how-to-retrieve-the-address-of-my-archethic-wallet",level:3},{value:" How to create a wallet on the Archethic blockchain?",id:"-how-to-create-a-wallet-on-the-archethic-blockchain",level:3},{value:" How to create a fungible token on the Archethic Wallet?",id:"-how-to-create-a-fungible-token-on-the-archethic-wallet",level:3},{value:" How to create a NFT on the Archethic Wallet?",id:"-how-to-create-a-nft-on-the-archethic-wallet",level:3}],h={toc:s},u="wrapper";function p(e){let{components:t,...a}=e;return(0,o.kt)(u,(0,r.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"general"},"General"),(0,o.kt)("h3",{id:"-how-to-retrieve-the-address-of-my-archethic-wallet"},(0,o.kt)("strong",{parentName:"h3"}," How to retrieve the address of my Archethic wallet?")),(0,o.kt)("p",null,"Firstly, you should be aware that your address changes with each transaction."),(0,o.kt)("p",null,"But don't worry. If you provide an old address to receive funds or tokens, it will still work, and you will receive what you are expecting."),(0,o.kt)("admonition",{type:"success"},(0,o.kt)("p",{parentName:"admonition"},"If you do not have an Archethic wallet or address yet, we invite you to refer to the section",(0,o.kt)("br",null),(0,o.kt)("a",{href:"/FAQ/wallet#-how-to-create-a-wallet-on-the-archethic-blockchain"},'"How to create a wallet on the Archethic blockchain?"'))),(0,o.kt)("p",null,"Once your wallet is created,",(0,o.kt)("br",null),'\n1) select the account you wish to receive your funds or tokens on via the "Keychain" tab, which lists your accounts and services contained in your decentralized keychain.',(0,o.kt)("br",null),'\n2) Once selected, the application will display the "Main" tab, where a "Receive" button is shown.',(0,o.kt)("br",null),"\n3) Click on it, and you will get your address, either in the form of a QR Code or in text form by clicking on the icon corresponding to the copy action.",(0,o.kt)("br",null)),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"wallet-address",src:n(71992).Z,width:"353",height:"411"})),(0,o.kt)("h3",{id:"-how-to-create-a-wallet-on-the-archethic-blockchain"},(0,o.kt)("strong",{parentName:"h3"}," How to create a wallet on the Archethic blockchain?")),(0,o.kt)("p",null,"Firstly, ",(0,o.kt)("a",{href:"https://www.archethic.net/wallet",target:"_blank"},"download the wallet")," version that corresponds to the platform you want to use it on from the Archethic website or the app stores.\nOnce installed, you can launch the application."),(0,o.kt)("p",null,"1) The first page invites you to read and accept ","[https://www.archethic.net/privacy-policy-wallet/]","(the privacy policy).",(0,o.kt)("br",null),'\n2) Once accepted, you can click on "Get started" to begin creating your wallet.',(0,o.kt)("br",null),"\n3) First, give a name to your first account within your future decentralized keychain.",(0,o.kt)("br",null),"\n4) A confirmation popup appears to verify that the account name is to your liking.",(0,o.kt)("br",null),"\n5) The application reminds you of important security information to protect your funds and your secret phrase.",(0,o.kt)("br",null),'\n6) After reading the information, click on "I understand".',(0,o.kt)("br",null),"\n7) The 24 words of your secret phrase will be displayed.",(0,o.kt)("br",null)),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Do not share them with anyone and write them down so you can confirm them on the following screen.")),(0,o.kt)("p",null,"8) Confirmation requires that the words be put back in order.",(0,o.kt)("br",null),"\n9) Once the process of confirming the order of the words in the secret phrase is done, you can select the means to protect your application (PIN code, password, biometrics, YubiKey).",(0,o.kt)("br",null),"\n10) After a few seconds of waiting, your keychain is created with your first account.",(0,o.kt)("br",null)),(0,o.kt)("p",null,"You can now enjoy the Archethic ecosystem. Enjoy!"),(0,o.kt)("h3",{id:"-how-to-create-a-fungible-token-on-the-archethic-wallet"},(0,o.kt)("strong",{parentName:"h3"}," How to create a fungible token on the Archethic Wallet?")),(0,o.kt)("p",null,"1) Open your Archethic Wallet and click on tokens in the main tab."),(0,o.kt)("img",{src:"/img/faq/wallet/tokens1.png",width:"400px"}),(0,o.kt)("p",null,"2) Click on create token. "),(0,o.kt)("img",{src:"/img/faq/wallet/tokens2.png",width:"400px"}),(0,o.kt)("p",null,"3) Insert all the information:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},'Name: Name of the token, e.g., "Archethic"'),(0,o.kt)("li",{parentName:"ul"},'Symbol: Symbol of the token, e.g., "UCO"'),(0,o.kt)("li",{parentName:"ul"},"Initial Supply: The maximum supply of your token.")),(0,o.kt)("p",null,'And click on "Create Token".'),(0,o.kt)("img",{src:"/img/faq/wallet/tokens3.png",width:"400px"}),(0,o.kt)("p",null,"4) Confirm the transaction."),(0,o.kt)("p",null,"You have successfully created your Token!"),(0,o.kt)("img",{src:"/img/faq/wallet/tokens4.png",width:"400px"}),(0,o.kt)("h3",{id:"-how-to-create-a-nft-on-the-archethic-wallet"},(0,o.kt)("strong",{parentName:"h3"}," How to create a NFT on the Archethic Wallet?")),(0,o.kt)("p",null,"1) Click on 'NFT' at the bottom right of the application."),(0,o.kt)("p",null,"2) Choose a category"),(0,o.kt)("p",null,"3) Click on create a NFT"),(0,o.kt)("img",{src:"/img/faq/wallet/NFT1.png",width:"400px"}),(0,o.kt)("p",null,"4) Insert all the information:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},'Name: Name of the NFT such as "Archers"'),(0,o.kt)("li",{parentName:"ul"},'Symbol: Symbol such as "UCO"'),(0,o.kt)("li",{parentName:"ul"},"Description: Describe your NFT ")),(0,o.kt)("img",{src:"/img/faq/wallet/NFT2.png",width:"400px"}),(0,o.kt)("p",null,"5) Import your NFT"),(0,o.kt)("img",{src:"/img/faq/wallet/NFT3.png",width:"400px"}),(0,o.kt)("p",null,'6) Go to summary and click on "Create the NFT", confirm the mint'),(0,o.kt)("img",{src:"/img/faq/wallet/NFT4.png",width:"400px"}),(0,o.kt)("p",null,"You have successfully created an NFT and can locate it in the category you selected during step 2."))}p.isMDXComponent=!0},71992:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/wallet-FAQ-display-address-a4c212b56b5f8a328385ac7c6e5c3e66.png"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/16aa5868.efcf160e.js b/assets/js/16aa5868.aa7ffa77.js similarity index 53% rename from assets/js/16aa5868.efcf160e.js rename to assets/js/16aa5868.aa7ffa77.js index 96537257c..34804a493 100644 --- a/assets/js/16aa5868.efcf160e.js +++ b/assets/js/16aa5868.aa7ffa77.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3559],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>y});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,c=e.originalType,s=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=i(r),b=a,y=p["".concat(s,".").concat(b)]||p[b]||u[b]||c;return r?n.createElement(y,l(l({ref:t},d),{},{components:r})):n.createElement(y,l({ref:t},d))}));function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=r.length,l=new Array(c);l[0]=b;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:a,l[1]=o;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>b,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>o,default:()=>f,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var n=r(87462),a=r(67294),c=r(3905);r(8209);const l={id:"shared-secrets",title:"SharedSecrets",hide_table_of_contents:!1},o=void 0,s={unversionedId:"build/api/schema/objects/shared-secrets",id:"build/api/schema/objects/shared-secrets",title:"SharedSecrets",description:"[SharedSecrets] represents the public shared secret information",source:"@site/docs/build/api/schema/objects/shared-secrets.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/shared-secrets",permalink:"/build/api/schema/objects/shared-secrets",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"shared-secrets",title:"SharedSecrets",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Ownership",permalink:"/build/api/schema/objects/ownership"},next:{title:"TokenBalance",permalink:"/build/api/schema/objects/token-balance"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'SharedSecrets.storageNoncePublicKeyPublicKey ',id:"code-style-fontweight-normal-sharedsecretsbstoragenoncepublickeybcodepublickey-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,c.kt)(a.Fragment,null,(0,c.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,c.kt)(a.Fragment,null,"Specification",(0,c.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),b=e=>(0,c.kt)(a.Fragment,null,(0,c.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:d,Bullet:p,SpecifiedBy:u,Badge:b},m="wrapper";function f(e){let{components:t,...r}=e;return(0,c.kt)(m,(0,n.Z)({},y,r,{components:t,mdxType:"MDXLayout"}),(0,c.kt)("p",null,"[SharedSecrets]"," represents the public shared secret information\nIt includes:"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},"The storage nonce public key: Public Key to encrypt data for the node, so they will be able to decrypt it (mostly for smart contract authorized key)")),(0,c.kt)("pre",null,(0,c.kt)("code",{parentName:"pre",className:"language-graphql"},"type SharedSecrets {\n storageNoncePublicKey: PublicKey\n}\n")),(0,c.kt)("h3",{id:"fields"},"Fields"),(0,c.kt)("h4",{id:"code-style-fontweight-normal-sharedsecretsbstoragenoncepublickeybcodepublickey-"},(0,c.kt)("a",{parentName:"h4",href:"#"},(0,c.kt)("code",{style:{fontWeight:"normal"}},"SharedSecrets.",(0,c.kt)("b",null,"storageNoncePublicKey"))),(0,c.kt)(p,{mdxType:"Bullet"}),(0,c.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,c.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,c.kt)(b,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,c.kt)("blockquote",null),(0,c.kt)("h3",{id:"returned-by"},"Returned by"),(0,c.kt)("p",null,(0,c.kt)("a",{parentName:"p",href:"/build/api/schema/queries/shared-secrets"},(0,c.kt)("inlineCode",{parentName:"a"},"sharedSecrets"))," ",(0,c.kt)(b,{class:"secondary",text:"query",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3559],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>y});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,c=e.originalType,s=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=i(r),b=a,y=p["".concat(s,".").concat(b)]||p[b]||u[b]||c;return r?n.createElement(y,l(l({ref:t},d),{},{components:r})):n.createElement(y,l({ref:t},d))}));function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=r.length,l=new Array(c);l[0]=b;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:a,l[1]=o;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>b,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>o,default:()=>f,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var n=r(87462),a=r(67294),c=r(3905);r(8209);const l={id:"shared-secrets",title:"SharedSecrets",hide_table_of_contents:!1},o=void 0,s={unversionedId:"build/api/schema/objects/shared-secrets",id:"build/api/schema/objects/shared-secrets",title:"SharedSecrets",description:"[SharedSecrets] represents the public shared secret information",source:"@site/docs/build/api/schema/objects/shared-secrets.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/shared-secrets",permalink:"/build/api/schema/objects/shared-secrets",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"shared-secrets",title:"SharedSecrets",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Ownership",permalink:"/build/api/schema/objects/ownership"},next:{title:"TokenBalance",permalink:"/build/api/schema/objects/token-balance"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'SharedSecrets.storageNoncePublicKeyPublicKey ',id:"code-style-fontweight-normal-sharedsecretsbstoragenoncepublickeybcodepublickey-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,c.kt)(a.Fragment,null,(0,c.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,c.kt)(a.Fragment,null,"Specification",(0,c.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),b=e=>(0,c.kt)(a.Fragment,null,(0,c.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:d,Bullet:p,SpecifiedBy:u,Badge:b},m="wrapper";function f(e){let{components:t,...r}=e;return(0,c.kt)(m,(0,n.Z)({},y,r,{components:t,mdxType:"MDXLayout"}),(0,c.kt)("p",null,"[SharedSecrets]"," represents the public shared secret information\nIt includes:"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},"The storage nonce public key: Public Key to encrypt data for the node, so they will be able to decrypt it (mostly for smart contract authorized key)")),(0,c.kt)("pre",null,(0,c.kt)("code",{parentName:"pre",className:"language-graphql"},"type SharedSecrets {\n storageNoncePublicKey: PublicKey\n}\n")),(0,c.kt)("h3",{id:"fields"},"Fields"),(0,c.kt)("h4",{id:"code-style-fontweight-normal-sharedsecretsbstoragenoncepublickeybcodepublickey-"},(0,c.kt)("a",{parentName:"h4",href:"#"},(0,c.kt)("code",{style:{fontWeight:"normal"}},"SharedSecrets.",(0,c.kt)("b",null,"storageNoncePublicKey"))),(0,c.kt)(p,{mdxType:"Bullet"}),(0,c.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,c.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,c.kt)(b,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,c.kt)("blockquote",null),(0,c.kt)("h3",{id:"returned-by"},"Returned by"),(0,c.kt)("p",null,(0,c.kt)("a",{parentName:"p",href:"/build/api/schema/queries/shared-secrets"},(0,c.kt)("inlineCode",{parentName:"a"},"sharedSecrets"))," ",(0,c.kt)(b,{class:"secondary",text:"query",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/16c17b5d.033583bd.js b/assets/js/16c17b5d.033583bd.js new file mode 100644 index 000000000..02155e94e --- /dev/null +++ b/assets/js/16c17b5d.033583bd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7741],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),m=r,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||i;return n?a.createElement(h,o(o({ref:t},p),{},{components:n})):a.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"transaction-chain",title:"Transaction chains",sidebar_position:4},o=void 0,s={unversionedId:"learn/transaction-chain",id:"learn/transaction-chain",title:"Transaction chains",description:"In the Archethic network, there are no blocks but only transactions, as each block is reduced to its atomic form - transaction with its own validation evidences.",source:"@site/docs/learn/transaction-chain.md",sourceDirName:"learn",slug:"/learn/transaction-chain",permalink:"/learn/transaction-chain",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:4,frontMatter:{id:"transaction-chain",title:"Transaction chains",sidebar_position:4},sidebar:"docs",previous:{title:"Patents",permalink:"/learn/patents"},next:{title:"Transaction fees",permalink:"/learn/fee"}},l={},c=[{value:"Principles",id:"principles",level:2},{value:"Transaction structure",id:"transaction-structure",level:2}],p={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"In the Archethic network, there are no blocks but only transactions, as each block is reduced to its atomic form - ",(0,r.kt)("inlineCode",{parentName:"p"},"transaction")," with its own validation evidences."),(0,r.kt)("h2",{id:"principles"},"Principles"),(0,r.kt)("admonition",{title:"Liveness",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Each validated transaction is stored as a chain than can only be updated from the last validation transaction in the chain\nThe last transaction on a chain becomes the ",(0,r.kt)("em",{parentName:"p"},"authoritative")," transaction.")),(0,r.kt)("admonition",{title:"Quantum resistant",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"For security reason, once the public key is disclosed, it is considered as expired, only the hash of the public key of the next transaction(aka ",(0,r.kt)("inlineCode",{parentName:"p"},"address"),") is announced.\nThis allows the next public key to be kept until the next transaction on the chain.")),(0,r.kt)("admonition",{title:"Address resolution",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Any addresses of a transaction chain can be used as destination address.\nIt's not necessary to specify the last transaction address in the chain.")),(0,r.kt)("admonition",{title:"Stateless transactions",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Transaction are using an ",(0,r.kt)("em",{parentName:"p"},"UTXO")," (Unspent Transaction Output) model so, a transaction cannot change state.\nThere is no reality outside the validated transactions")),(0,r.kt)("admonition",{title:"UTXO mining",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"List of unspent outputs does not need to be specified by the sender of the transaction\nall unspent outputs will be reintegrated directly into the last transaction.")),(0,r.kt)("h2",{id:"transaction-structure"},"Transaction structure"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("h3",{parentName:"li",id:"pending-transaction"},"Pending transaction"))),(0,r.kt)("p",null,"A pending transaction is a transaction that does not have validation.\nIts structure is described as below:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"|-----------|------|------|---------------------|--------------------|------------------|\n| Address | Type | Data | Previous public key | Previous signature | Origin signature |\n| --------- | ------- | -------- | ------------------- | ------------------ | ---------------- |\n| |\n| |\n| --------- | ------ | -------- | ------------ | ------------ |\n| Content | Code | Ledger | Ownerships | Recipients |\n| --------- | ------ | -------- | ------------ | ------------ |\n| |\n| |\n| ----- | ------- | | ----------------- | -------- |\n| UCO | Token | | Authorized keys | Secret |\n| ----- | ------- | | ----------------- | -------- |\n\n\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Address: Corresponds to the hash of the public key of the transaction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Type: Defines the functional role of the transaction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Data: Contains all the operations to be performed (transfers, smart contracts, key authorizations, etc.)"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Content: Can contain any kind of data. It can be used to host some data (HTML page, text, image, code, etc.)"),(0,r.kt)("li",{parentName:"ul"},"Code: Defines the smart contract code to be interpreted by the node. More details on ",(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts"},"Smart-Contracts")," section."),(0,r.kt)("li",{parentName:"ul"},"Ledger: Defines several types of ledger operations",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"UCO: for the cryptocurrency transfers"),(0,r.kt)("li",{parentName:"ul"},"Token: for non-financial transactions (intended for P2P uses - as tokens, loyalties, etc.)"))),(0,r.kt)("li",{parentName:"ul"},"Ownerships: Define some cryptographic authorizations and delegations",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Authorized keys: list of authorized keys to be able to decrypt secrets"),(0,r.kt)("li",{parentName:"ul"},"Secrets: Encrypted contents which can be decrypted by the authorized keys"))),(0,r.kt)("li",{parentName:"ul"},"Recipients: Additional recipients to target smart contracts"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Previous public key: Corresponds to the public key associated to the previous transaction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Previous signature: Corresponds to the signature of the private key associated with the mentioned previous public key")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Origin signature: Corresponds to the signature of the device or software that generated the transaction. This is used on the ",(0,r.kt)("a",{parentName:"p",href:"/learn/arch-consensus/proof-of-work"},"Proof Of Work")," mechanism and is a necessary condition of its validation.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("h3",{parentName:"li",id:"validated-transaction"},"Validated transaction"))),(0,r.kt)("p",null,"A validated transaction is a pending transaction completed with the validation proofs required by the Heuristic Algorithms.\nThose are defined by the given structure:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"|------------------|-------------------------|\n| Validation Stamp | Cross Validation Stamps |\n| ---------------- | ----------------------- |\n| |\n| | ----------------- | ----------- |\n| | Node public key | Signature |\n| | ----------------- | ----------- |\n| |\n| ----------- | --------------- | -------------------- | ------------------- | ------------------- | ------------ | -------- | ----------- |\n| Timestamp | Proof of Work | Proof of Integrity | Proof of Election | Ledger Operations | Recipients | Errors | Signature |\n| ----------- | --------------- | -------------------- | ------------------- | ------------------- | ------------ | -------- | ----------- |\n| |\n| ----- | ----------------------- | ----------------- |\n| Fee | Transaction movements | Unspent outputs |\n| ----- | ----------------------- | ----------------- |\n\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Validation Stamp: Stamp generated by the coordinator node",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Proof of work: Corresponds to the public key matching the origin signature (More details on the ",(0,r.kt)("a",{parentName:"li",href:"/learn/arch-consensus/proof-of-work"},"Proof of Work")," section)."),(0,r.kt)("li",{parentName:"ul"},"Proof of integrity: Proves the linkage of the previous transactions"),(0,r.kt)("li",{parentName:"ul"},"Proof of election: Proves the validation node's rotating election and permit to reproduce it later (See ",(0,r.kt)("a",{parentName:"li",href:"/learn/arch-consensus#rotating-election"},"Rotating Election"),")"),(0,r.kt)("li",{parentName:"ul"},"Ledger operations: Contains all the ledger operations that will be taken into account by the network",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"fee: Transaction's fee"),(0,r.kt)("li",{parentName:"ul"},"transaction movements: Issuer and resolved transaction movements"),(0,r.kt)("li",{parentName:"ul"},"Unspent outputs: List of the remaining unspent outputs of the transaction chain after validation"))),(0,r.kt)("li",{parentName:"ul"},"Recipients: List of resolved addresses of the recipients"),(0,r.kt)("li",{parentName:"ul"},"Errors: Any errors found in the validation (i.e. pending transaction error)"),(0,r.kt)("li",{parentName:"ul"},"Signature: Cryptographic signature of the entire stamp by the coordinator's key"))),(0,r.kt)("li",{parentName:"ul"},"Cross validation stamps: To be considered as validated, the ",(0,r.kt)("inlineCode",{parentName:"li"},"Validation Stamp")," must be joined as many ",(0,r.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamp")," as required by the Heuristic Algorithms.\nThey are signatures of the given validation stamp.",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Node public key: Correspond to the node's public key which generate this ",(0,r.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamp"),"'s signature"),(0,r.kt)("li",{parentName:"ul"},"Signature: Correspond to the signature of the ",(0,r.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamp")," for the mentioned public key"),(0,r.kt)("li",{parentName:"ul"},"Inconsistencies: In case of inconsistencies or disagreement, it will contain a list of inconsistencies noted")))))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/16c17b5d.e63b86ae.js b/assets/js/16c17b5d.e63b86ae.js deleted file mode 100644 index c50789ec6..000000000 --- a/assets/js/16c17b5d.e63b86ae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7741],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),m=r,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||i;return n?a.createElement(h,o(o({ref:t},p),{},{components:n})):a.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"transaction-chain",title:"Transaction chains",sidebar_position:4},o=void 0,s={unversionedId:"learn/transaction-chain",id:"learn/transaction-chain",title:"Transaction chains",description:"In the Archethic network, there are no blocks but only transactions, as each block is reduced to its atomic form - transaction with its own validation evidences.",source:"@site/docs/learn/transaction-chain.md",sourceDirName:"learn",slug:"/learn/transaction-chain",permalink:"/learn/transaction-chain",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:4,frontMatter:{id:"transaction-chain",title:"Transaction chains",sidebar_position:4},sidebar:"docs",previous:{title:"Patents",permalink:"/learn/patents"},next:{title:"Transaction fees",permalink:"/learn/fee"}},l={},c=[{value:"Principles",id:"principles",level:2},{value:"Transaction structure",id:"transaction-structure",level:2}],p={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"In the Archethic network, there are no blocks but only transactions, as each block is reduced to its atomic form - ",(0,r.kt)("inlineCode",{parentName:"p"},"transaction")," with its own validation evidences."),(0,r.kt)("h2",{id:"principles"},"Principles"),(0,r.kt)("admonition",{title:"Liveness",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Each validated transaction is stored as a chain than can only be updated from the last validation transaction in the chain\nThe last transaction on a chain becomes the ",(0,r.kt)("em",{parentName:"p"},"authoritative")," transaction.")),(0,r.kt)("admonition",{title:"Quantum resistant",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"For security reason, once the public key is disclosed, it is considered as expired, only the hash of the public key of the next transaction(aka ",(0,r.kt)("inlineCode",{parentName:"p"},"address"),") is announced.\nThis allows the next public key to be kept until the next transaction on the chain.")),(0,r.kt)("admonition",{title:"Address resolution",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Any addresses of a transaction chain can be used as destination address.\nIt's not necessary to specify the last transaction address in the chain.")),(0,r.kt)("admonition",{title:"Stateless transactions",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Transaction are using an ",(0,r.kt)("em",{parentName:"p"},"UTXO")," (Unspent Transaction Output) model so, a transaction cannot change state.\nThere is no reality outside the validated transactions")),(0,r.kt)("admonition",{title:"UTXO mining",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"List of unspent outputs does not need to be specified by the sender of the transaction\nall unspent outputs will be reintegrated directly into the last transaction.")),(0,r.kt)("h2",{id:"transaction-structure"},"Transaction structure"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("h3",{parentName:"li",id:"pending-transaction"},"Pending transaction"))),(0,r.kt)("p",null,"A pending transaction is a transaction that does not have validation.\nIts structure is described as below:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"|-----------|------|------|---------------------|--------------------|------------------|\n| Address | Type | Data | Previous public key | Previous signature | Origin signature |\n| --------- | ------- | -------- | ------------------- | ------------------ | ---------------- |\n| |\n| |\n| --------- | ------ | -------- | ------------ | ------------ |\n| Content | Code | Ledger | Ownerships | Recipients |\n| --------- | ------ | -------- | ------------ | ------------ |\n| |\n| |\n| ----- | ------- | | ----------------- | -------- |\n| UCO | Token | | Authorized keys | Secret |\n| ----- | ------- | | ----------------- | -------- |\n\n\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Address: Corresponds to the hash of the public key of the transaction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Type: Defines the functional role of the transaction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Data: Contains all the operations to be performed (transfers, smart contracts, key authorizations, etc.)"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Content: Can contain any kind of data. It can be used to host some data (HTML page, text, image, code, etc.)"),(0,r.kt)("li",{parentName:"ul"},"Code: Defines the smart contract code to be interpreted by the node. More details on ",(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts"},"Smart-Contracts")," section."),(0,r.kt)("li",{parentName:"ul"},"Ledger: Defines several types of ledger operations",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"UCO: for the cryptocurrency transfers"),(0,r.kt)("li",{parentName:"ul"},"Token: for non-financial transactions (intended for P2P uses - as tokens, loyalties, etc.)"))),(0,r.kt)("li",{parentName:"ul"},"Ownerships: Define some cryptographic authorizations and delegations",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Authorized keys: list of authorized keys to be able to decrypt secrets"),(0,r.kt)("li",{parentName:"ul"},"Secrets: Encrypted contents which can be decrypted by the authorized keys"))),(0,r.kt)("li",{parentName:"ul"},"Recipients: Additional recipients to target smart contracts"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Previous public key: Corresponds to the public key associated to the previous transaction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Previous signature: Corresponds to the signature of the private key associated with the mentioned previous public key")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Origin signature: Corresponds to the signature of the device or software that generated the transaction. This is used on the ",(0,r.kt)("a",{parentName:"p",href:"/learn/arch-consensus/proof-of-work"},"Proof Of Work")," mechanism and is a necessary condition of its validation.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("h3",{parentName:"li",id:"validated-transaction"},"Validated transaction"))),(0,r.kt)("p",null,"A validated transaction is a pending transaction completed with the validation proofs required by the Heuristic Algorithms.\nThose are defined by the given structure:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"|------------------|-------------------------|\n| Validation Stamp | Cross Validation Stamps |\n| ---------------- | ----------------------- |\n| |\n| | ----------------- | ----------- |\n| | Node public key | Signature |\n| | ----------------- | ----------- |\n| |\n| ----------- | --------------- | -------------------- | ------------------- | ------------------- | ------------ | -------- | ----------- |\n| Timestamp | Proof of Work | Proof of Integrity | Proof of Election | Ledger Operations | Recipients | Errors | Signature |\n| ----------- | --------------- | -------------------- | ------------------- | ------------------- | ------------ | -------- | ----------- |\n| |\n| ----- | ----------------------- | ----------------- |\n| Fee | Transaction movements | Unspent outputs |\n| ----- | ----------------------- | ----------------- |\n\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Validation Stamp: Stamp generated by the coordinator node",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Proof of work: Corresponds to the public key matching the origin signature (More details on the ",(0,r.kt)("a",{parentName:"li",href:"/learn/arch-consensus/proof-of-work"},"Proof of Work")," section)."),(0,r.kt)("li",{parentName:"ul"},"Proof of integrity: Proves the linkage of the previous transactions"),(0,r.kt)("li",{parentName:"ul"},"Proof of election: Proves the validation node's rotating election and permit to reproduce it later (See ",(0,r.kt)("a",{parentName:"li",href:"/learn/arch-consensus#rotating-election"},"Rotating Election"),")"),(0,r.kt)("li",{parentName:"ul"},"Ledger operations: Contains all the ledger operations that will be taken into account by the network",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"fee: Transaction's fee"),(0,r.kt)("li",{parentName:"ul"},"transaction movements: Issuer and resolved transaction movements"),(0,r.kt)("li",{parentName:"ul"},"Unspent outputs: List of the remaining unspent outputs of the transaction chain after validation"))),(0,r.kt)("li",{parentName:"ul"},"Recipients: List of resolved addresses of the recipients"),(0,r.kt)("li",{parentName:"ul"},"Errors: Any errors found in the validation (i.e. pending transaction error)"),(0,r.kt)("li",{parentName:"ul"},"Signature: Cryptographic signature of the entire stamp by the coordinator's key"))),(0,r.kt)("li",{parentName:"ul"},"Cross validation stamps: To be considered as validated, the ",(0,r.kt)("inlineCode",{parentName:"li"},"Validation Stamp")," must be joined as many ",(0,r.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamp")," as required by the Heuristic Algorithms.\nThey are signatures of the given validation stamp.",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Node public key: Correspond to the node's public key which generate this ",(0,r.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamp"),"'s signature"),(0,r.kt)("li",{parentName:"ul"},"Signature: Correspond to the signature of the ",(0,r.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamp")," for the mentioned public key"),(0,r.kt)("li",{parentName:"ul"},"Inconsistencies: In case of inconsistencies or disagreement, it will contain a list of inconsistencies noted")))))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/16e43f8e.455955ae.js b/assets/js/16e43f8e.455955ae.js deleted file mode 100644 index 6144cb194..000000000 --- a/assets/js/16e43f8e.455955ae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2282],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,f=p["".concat(l,".").concat(m)]||p[m]||u[m]||s;return n?a.createElement(f,o(o({ref:t},d),{},{components:n})):a.createElement(f,o({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var a=n(87462),r=n(67294),s=n(3905);n(8209);const o={id:"transaction-inputs",title:"transactionInputs",hide_table_of_contents:!1},i=void 0,l={unversionedId:"build/api/schema/queries/transaction-inputs",id:"build/api/schema/queries/transaction-inputs",title:"transactionInputs",description:"Query the network to list the transaction inputs from an address",source:"@site/docs/build/api/schema/queries/transaction-inputs.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/transaction-inputs",permalink:"/build/api/schema/queries/transaction-inputs",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-inputs",title:"transactionInputs",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transactionChain",permalink:"/build/api/schema/queries/transaction-chain"},next:{title:"transaction",permalink:"/build/api/schema/queries/transaction"}},c={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transactionInputs.addressAddress! ',id:"code-style-fontweight-normal-transactioninputsbaddressbcodeaddress--",level:4},{value:'transactionInputs.limitPosInteger ',id:"code-style-fontweight-normal-transactioninputsblimitbcodeposinteger-",level:4},{value:'transactionInputs.pagingOffsetNonNegInteger ',id:"code-style-fontweight-normal-transactioninputsbpagingoffsetbcodenonneginteger-",level:4},{value:"Type",id:"type",level:3},{value:'TransactionInput ',id:"transactioninput-",level:4}],p=()=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,s.kt)(r.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},g="wrapper";function h(e){let{components:t,...n}=e;return(0,s.kt)(g,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Query the network to list the transaction inputs from an address"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"transactionInputs(\n address: Address!\n limit: PosInteger\n pagingOffset: NonNegInteger\n): [TransactionInput]\n")),(0,s.kt)("h3",{id:"arguments"},"Arguments"),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactioninputsbaddressbcodeaddress--"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"transactionInputs.",(0,s.kt)("b",null,"address"))),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,s.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,s.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,s.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactioninputsblimitbcodeposinteger-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"transactionInputs.",(0,s.kt)("b",null,"limit"))),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/pos-integer"},(0,s.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,s.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactioninputsbpagingoffsetbcodenonneginteger-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"transactionInputs.",(0,s.kt)("b",null,"pagingOffset"))),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/non-neg-integer"},(0,s.kt)("inlineCode",{parentName:"a"},"NonNegInteger"))," ",(0,s.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h3",{id:"type"},"Type"),(0,s.kt)("h4",{id:"transactioninput-"},(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-input"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,s.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,s.kt)("blockquote",null,(0,s.kt)("p",{parentName:"blockquote"},"[TransactionInput]"," represents the inputs from the transaction\nIt includes:"),(0,s.kt)("ul",{parentName:"blockquote"},(0,s.kt)("li",{parentName:"ul"},"From: transaction which send the amount of assets"),(0,s.kt)("li",{parentName:"ul"},"Amount: asset amount"),(0,s.kt)("li",{parentName:"ul"},"Type: UCO/token/Call"),(0,s.kt)("li",{parentName:"ul"},"token address: address of the token if the type is token"),(0,s.kt)("li",{parentName:"ul"},"Spent: determines if the input has been spent"),(0,s.kt)("li",{parentName:"ul"},"Timestamp: Date time when the inputs was generated"),(0,s.kt)("li",{parentName:"ul"},"token id: It is the id for a token which is allocated when the token is minted."))))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/16e43f8e.e7b033ad.js b/assets/js/16e43f8e.e7b033ad.js new file mode 100644 index 000000000..dc4a72d80 --- /dev/null +++ b/assets/js/16e43f8e.e7b033ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2282],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,f=p["".concat(l,".").concat(m)]||p[m]||u[m]||s;return n?a.createElement(f,o(o({ref:t},d),{},{components:n})):a.createElement(f,o({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[p]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var a=n(87462),r=n(67294),s=n(3905);n(8209);const o={id:"transaction-inputs",title:"transactionInputs",hide_table_of_contents:!1},i=void 0,l={unversionedId:"build/api/schema/queries/transaction-inputs",id:"build/api/schema/queries/transaction-inputs",title:"transactionInputs",description:"Query the network to list the transaction inputs from an address",source:"@site/docs/build/api/schema/queries/transaction-inputs.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/transaction-inputs",permalink:"/build/api/schema/queries/transaction-inputs",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-inputs",title:"transactionInputs",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transactionChain",permalink:"/build/api/schema/queries/transaction-chain"},next:{title:"transaction",permalink:"/build/api/schema/queries/transaction"}},c={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transactionInputs.addressAddress! ',id:"code-style-fontweight-normal-transactioninputsbaddressbcodeaddress--",level:4},{value:'transactionInputs.limitPosInteger ',id:"code-style-fontweight-normal-transactioninputsblimitbcodeposinteger-",level:4},{value:'transactionInputs.pagingOffsetNonNegInteger ',id:"code-style-fontweight-normal-transactioninputsbpagingoffsetbcodenonneginteger-",level:4},{value:"Type",id:"type",level:3},{value:'TransactionInput ',id:"transactioninput-",level:4}],p=()=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,s.kt)(r.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},g="wrapper";function h(e){let{components:t,...n}=e;return(0,s.kt)(g,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Query the network to list the transaction inputs from an address"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"transactionInputs(\n address: Address!\n limit: PosInteger\n pagingOffset: NonNegInteger\n): [TransactionInput]\n")),(0,s.kt)("h3",{id:"arguments"},"Arguments"),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactioninputsbaddressbcodeaddress--"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"transactionInputs.",(0,s.kt)("b",null,"address"))),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,s.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,s.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,s.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactioninputsblimitbcodeposinteger-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"transactionInputs.",(0,s.kt)("b",null,"limit"))),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/pos-integer"},(0,s.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,s.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactioninputsbpagingoffsetbcodenonneginteger-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"transactionInputs.",(0,s.kt)("b",null,"pagingOffset"))),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/non-neg-integer"},(0,s.kt)("inlineCode",{parentName:"a"},"NonNegInteger"))," ",(0,s.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h3",{id:"type"},"Type"),(0,s.kt)("h4",{id:"transactioninput-"},(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-input"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,s.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,s.kt)("blockquote",null,(0,s.kt)("p",{parentName:"blockquote"},"[TransactionInput]"," represents the inputs from the transaction\nIt includes:"),(0,s.kt)("ul",{parentName:"blockquote"},(0,s.kt)("li",{parentName:"ul"},"From: transaction which send the amount of assets"),(0,s.kt)("li",{parentName:"ul"},"Amount: asset amount"),(0,s.kt)("li",{parentName:"ul"},"Type: UCO/token/Call"),(0,s.kt)("li",{parentName:"ul"},"token address: address of the token if the type is token"),(0,s.kt)("li",{parentName:"ul"},"Spent: determines if the input has been spent"),(0,s.kt)("li",{parentName:"ul"},"Timestamp: Date time when the inputs was generated"),(0,s.kt)("li",{parentName:"ul"},"token id: It is the id for a token which is allocated when the token is minted."))))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/1735c347.d575e0d1.js b/assets/js/1735c347.d575e0d1.js new file mode 100644 index 000000000..1ae2bda1d --- /dev/null +++ b/assets/js/1735c347.d575e0d1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8087],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var i=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=i.createContext({}),c=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},p=i.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=c(n),p=o,m=d["".concat(l,".").concat(p)]||d[p]||h[p]||r;return n?i.createElement(m,a(a({ref:t},u),{},{components:n})):i.createElement(m,a({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,a=new Array(r);a[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:o,a[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var i=n(87462),o=(n(67294),n(3905));n(8209);const r={id:"archethic-intro",title:"Archethic introduction",sidebar_label:"Learn",sidebar_position:1},a=void 0,s={unversionedId:"learn/archethic-intro",id:"learn/archethic-intro",title:"Archethic introduction",description:"Archethic is the next generation of Blockchain which provides a truly decentralized limitless network, using TransactionChain and a new consensus named ARCH (Atomic Rotating Commitment Heuristic),",source:"@site/docs/learn/README.md",sourceDirName:"learn",slug:"/learn/",permalink:"/learn/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:1,frontMatter:{id:"archethic-intro",title:"Archethic introduction",sidebar_label:"Learn",sidebar_position:1},sidebar:"docs",next:{title:"UCO token",permalink:"/learn/uco"}},l={},c=[{value:"Motivations",id:"motivations",level:2},{value:"Innovations",id:"innovations",level:2}],u={toc:c},d="wrapper";function h(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,i.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic is the next generation of Blockchain which provides a truly decentralized limitless network, using TransactionChain and a new consensus named ARCH (Atomic Rotating Commitment Heuristic),\nto be the most secure and scalable decentralized network."),(0,o.kt)("hr",null),(0,o.kt)("p",null,"Archethic's network is built to overcome the issues faced by other blockchain solutions:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Support of billions of transactions"),(0,o.kt)("li",{parentName:"ul"},"Linear scalability"),(0,o.kt)("li",{parentName:"ul"},"Low-energy consumption"),(0,o.kt)("li",{parentName:"ul"},"Mass adoption"),(0,o.kt)("li",{parentName:"ul"},"Low transaction fees")),(0,o.kt)("p",null,"This document aims to provide information and resources about the technology and the usage to build new decentralized applications on top of Archethic."),(0,o.kt)("h2",{id:"motivations"},"Motivations"),(0,o.kt)("p",null,"Given the universal constraints both material and physical, billions of transactions cannot be integrated into a single branch of chained blocks."),(0,o.kt)("p",null,"Similarly, regardless of the consensus method, it is not possible to ensure universal consensus on billions of transactions by polling all nodes of the network."),(0,o.kt)("p",null,"Finally, the functioning of current distributed networks (P2P) is such that it is not possible to guarantee the freshness (consistency) of data on an asynchronous network,\nunless the network is slowed down excessively by the calculation of the nonce of the block (PoW), as is the case with other blockchain networks."),(0,o.kt)("h2",{id:"innovations"},"Innovations"),(0,o.kt)("p",null,"Archethic Blockchain solved this issues in the following way:"),(0,o.kt)("details",null,(0,o.kt)("summary",null,"TransactionChains"),"Instead of chained blocks of transactions, each block is reduced to its atomic form.",(0,o.kt)("br",null),"Therefore, each block contains only one transaction and each transaction will be chained in its own chain."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"Real Sharded Network"),"Archethic is using sharding technology to ensure distribution of transaction processing and storage to provide a very high scalability."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"Next-generation consensus"),"Archethic is using an universal consensus called ARCH based on Atomic Commitment using Heuristic Rotating election of a tiny set of validation nodes providing the highest level of security"),(0,o.kt)("details",null,(0,o.kt)("summary",null,"Optimized Replication and Self Repair"),"Every transaction will be stored in a deterministic way on a set of nodes using a sharded storage layer.",(0,o.kt)("br",null),"Thus, every node will autonomously know all the nodes for a given transaction and ease the network by only interrogating the closest elected nodes."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"Distributed network without bottleneck"),"Archethic rebuilds the entire P2P layer to provide an efficient messaging between peers based on the Supervised Multicast using self discovery mechanism from incoming connection and network transactions.",(0,o.kt)("br",null),"The system is able to maintain a qualified vision of the network while limiting the generation of requests."))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/1735c347.d907d6ec.js b/assets/js/1735c347.d907d6ec.js deleted file mode 100644 index cd42efa88..000000000 --- a/assets/js/1735c347.d907d6ec.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8087],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var i=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=i.createContext({}),c=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},p=i.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=c(n),p=o,m=d["".concat(l,".").concat(p)]||d[p]||h[p]||r;return n?i.createElement(m,a(a({ref:t},u),{},{components:n})):i.createElement(m,a({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,a=new Array(r);a[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:o,a[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var i=n(87462),o=(n(67294),n(3905));n(8209);const r={id:"archethic-intro",title:"Archethic introduction",sidebar_label:"Learn",sidebar_position:1},a=void 0,s={unversionedId:"learn/archethic-intro",id:"learn/archethic-intro",title:"Archethic introduction",description:"Archethic is the next generation of Blockchain which provides a truly decentralized limitless network, using TransactionChain and a new consensus named ARCH (Atomic Rotating Commitment Heuristic),",source:"@site/docs/learn/README.md",sourceDirName:"learn",slug:"/learn/",permalink:"/learn/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:1,frontMatter:{id:"archethic-intro",title:"Archethic introduction",sidebar_label:"Learn",sidebar_position:1},sidebar:"docs",next:{title:"UCO token",permalink:"/learn/uco"}},l={},c=[{value:"Motivations",id:"motivations",level:2},{value:"Innovations",id:"innovations",level:2}],u={toc:c},d="wrapper";function h(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,i.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic is the next generation of Blockchain which provides a truly decentralized limitless network, using TransactionChain and a new consensus named ARCH (Atomic Rotating Commitment Heuristic),\nto be the most secure and scalable decentralized network."),(0,o.kt)("hr",null),(0,o.kt)("p",null,"Archethic's network is built to overcome the issues faced by other blockchain solutions:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Support of billions of transactions"),(0,o.kt)("li",{parentName:"ul"},"Linear scalability"),(0,o.kt)("li",{parentName:"ul"},"Low-energy consumption"),(0,o.kt)("li",{parentName:"ul"},"Mass adoption"),(0,o.kt)("li",{parentName:"ul"},"Low transaction fees")),(0,o.kt)("p",null,"This document aims to provide information and resources about the technology and the usage to build new decentralized applications on top of Archethic."),(0,o.kt)("h2",{id:"motivations"},"Motivations"),(0,o.kt)("p",null,"Given the universal constraints both material and physical, billions of transactions cannot be integrated into a single branch of chained blocks."),(0,o.kt)("p",null,"Similarly, regardless of the consensus method, it is not possible to ensure universal consensus on billions of transactions by polling all nodes of the network."),(0,o.kt)("p",null,"Finally, the functioning of current distributed networks (P2P) is such that it is not possible to guarantee the freshness (consistency) of data on an asynchronous network,\nunless the network is slowed down excessively by the calculation of the nonce of the block (PoW), as is the case with other blockchain networks."),(0,o.kt)("h2",{id:"innovations"},"Innovations"),(0,o.kt)("p",null,"Archethic Blockchain solved this issues in the following way:"),(0,o.kt)("details",null,(0,o.kt)("summary",null,"TransactionChains"),"Instead of chained blocks of transactions, each block is reduced to its atomic form.",(0,o.kt)("br",null),"Therefore, each block contains only one transaction and each transaction will be chained in its own chain."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"Real Sharded Network"),"Archethic is using sharding technology to ensure distribution of transaction processing and storage to provide a very high scalability."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"Next-generation consensus"),"Archethic is using an universal consensus called ARCH based on Atomic Commitment using Heuristic Rotating election of a tiny set of validation nodes providing the highest level of security"),(0,o.kt)("details",null,(0,o.kt)("summary",null,"Optimized Replication and Self Repair"),"Every transaction will be stored in a deterministic way on a set of nodes using a sharded storage layer.",(0,o.kt)("br",null),"Thus, every node will autonomously know all the nodes for a given transaction and ease the network by only interrogating the closest elected nodes."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"Distributed network without bottleneck"),"Archethic rebuilds the entire P2P layer to provide an efficient messaging between peers based on the Supervised Multicast using self discovery mechanism from incoming connection and network transactions.",(0,o.kt)("br",null),"The system is able to maintain a qualified vision of the network while limiting the generation of requests."))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/17dede69.716f521a.js b/assets/js/17dede69.716f521a.js deleted file mode 100644 index 86067edcc..000000000 --- a/assets/js/17dede69.716f521a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9091],{3905:(e,t,n)=>{n.d(t,{Zo:()=>i,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},i=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),p=d(n),m=r,k=p["".concat(s,".").concat(m)]||p[m]||u[m]||l;return n?a.createElement(k,o(o({ref:t},i),{},{components:n})):a.createElement(k,o({ref:t},i))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[p]="string"==typeof e?e:r,o[1]=c;for(var d=2;d{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>d,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>i});var a=n(87462),r=n(67294),l=n(3905);n(8209);const o={id:"token-balance",title:"TokenBalance",hide_table_of_contents:!1},c=void 0,s={unversionedId:"build/api/schema/objects/token-balance",id:"build/api/schema/objects/token-balance",title:"TokenBalance",description:"[tokenBalance] represents a token ledger balance.",source:"@site/docs/build/api/schema/objects/token-balance.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/token-balance",permalink:"/build/api/schema/objects/token-balance",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"token-balance",title:"TokenBalance",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"SharedSecrets",permalink:"/build/api/schema/objects/shared-secrets"},next:{title:"TokenLedger",permalink:"/build/api/schema/objects/token-ledger"}},d={},i=[{value:"Fields",id:"fields",level:3},{value:'TokenBalance.addressAddress ',id:"code-style-fontweight-normal-tokenbalancebaddressbcodeaddress-",level:4},{value:'TokenBalance.amountInt ',id:"code-style-fontweight-normal-tokenbalancebamountbcodeint-",level:4},{value:'TokenBalance.tokenIdInt ',id:"code-style-fontweight-normal-tokenbalancebtokenidbcodeint-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,l.kt)(r.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),k={toc:i,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function f(e){let{components:t,...n}=e;return(0,l.kt)(b,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"[tokenBalance]"," represents a token ledger balance.\nIt includes:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Token: address of the token"),(0,l.kt)("li",{parentName:"ul"},"Amount: amount of token"),(0,l.kt)("li",{parentName:"ul"},"Token ID: ID of the token")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"type TokenBalance {\n address: Address\n amount: Int\n tokenId: Int\n}\n")),(0,l.kt)("h3",{id:"fields"},"Fields"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbalancebaddressbcodeaddress-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"TokenBalance.",(0,l.kt)("b",null,"address"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,l.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbalancebamountbcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"TokenBalance.",(0,l.kt)("b",null,"amount"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbalancebtokenidbcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"TokenBalance.",(0,l.kt)("b",null,"tokenId"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"member-of"},"Member of"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/balance"},(0,l.kt)("inlineCode",{parentName:"a"},"Balance"))," ",(0,l.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/17dede69.c1c5f40d.js b/assets/js/17dede69.c1c5f40d.js new file mode 100644 index 000000000..9c96bc3f4 --- /dev/null +++ b/assets/js/17dede69.c1c5f40d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9091],{3905:(e,t,n)=>{n.d(t,{Zo:()=>i,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},i=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),p=d(n),m=r,k=p["".concat(s,".").concat(m)]||p[m]||u[m]||l;return n?a.createElement(k,o(o({ref:t},i),{},{components:n})):a.createElement(k,o({ref:t},i))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[p]="string"==typeof e?e:r,o[1]=c;for(var d=2;d{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>d,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>i});var a=n(87462),r=n(67294),l=n(3905);n(8209);const o={id:"token-balance",title:"TokenBalance",hide_table_of_contents:!1},c=void 0,s={unversionedId:"build/api/schema/objects/token-balance",id:"build/api/schema/objects/token-balance",title:"TokenBalance",description:"[tokenBalance] represents a token ledger balance.",source:"@site/docs/build/api/schema/objects/token-balance.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/token-balance",permalink:"/build/api/schema/objects/token-balance",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"token-balance",title:"TokenBalance",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"SharedSecrets",permalink:"/build/api/schema/objects/shared-secrets"},next:{title:"TokenLedger",permalink:"/build/api/schema/objects/token-ledger"}},d={},i=[{value:"Fields",id:"fields",level:3},{value:'TokenBalance.addressAddress ',id:"code-style-fontweight-normal-tokenbalancebaddressbcodeaddress-",level:4},{value:'TokenBalance.amountInt ',id:"code-style-fontweight-normal-tokenbalancebamountbcodeint-",level:4},{value:'TokenBalance.tokenIdInt ',id:"code-style-fontweight-normal-tokenbalancebtokenidbcodeint-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,l.kt)(r.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),k={toc:i,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function f(e){let{components:t,...n}=e;return(0,l.kt)(b,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"[tokenBalance]"," represents a token ledger balance.\nIt includes:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Token: address of the token"),(0,l.kt)("li",{parentName:"ul"},"Amount: amount of token"),(0,l.kt)("li",{parentName:"ul"},"Token ID: ID of the token")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"type TokenBalance {\n address: Address\n amount: Int\n tokenId: Int\n}\n")),(0,l.kt)("h3",{id:"fields"},"Fields"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbalancebaddressbcodeaddress-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"TokenBalance.",(0,l.kt)("b",null,"address"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,l.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbalancebamountbcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"TokenBalance.",(0,l.kt)("b",null,"amount"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbalancebtokenidbcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"TokenBalance.",(0,l.kt)("b",null,"tokenId"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"member-of"},"Member of"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/balance"},(0,l.kt)("inlineCode",{parentName:"a"},"Balance"))," ",(0,l.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/1872c6b8.45be4429.js b/assets/js/1872c6b8.45be4429.js deleted file mode 100644 index ffdc5db6b..000000000 --- a/assets/js/1872c6b8.45be4429.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3747],{3905:(e,t,i)=>{i.d(t,{Zo:()=>l,kt:()=>f});var r=i(67294);function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function o(e){for(var t=1;t=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var c=r.createContext({}),h=function(e){var t=r.useContext(c),i=t;return e&&(i="function"==typeof e?e(t):o(o({},t),e)),i},l=function(e){var t=h(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var i=e.components,n=e.mdxType,a=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=h(i),u=n,f=d["".concat(c,".").concat(u)]||d[u]||p[u]||a;return i?r.createElement(f,o(o({ref:t},l),{},{components:i})):r.createElement(f,o({ref:t},l))}));function f(e,t){var i=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=i.length,o=new Array(a);o[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:n,o[1]=s;for(var h=2;h{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>h});var r=i(87462),n=(i(67294),i(3905));i(8209);const a={id:"bridge",title:"Archethic's bridge"},o=void 0,s={unversionedId:"participate/bridge/bridge",id:"participate/bridge/bridge",title:"Archethic's bridge",description:"Archethic has developed a decentralized and P2P bridge to facilitate the exchange of your UCO ERC20 tokens with other blockchains (e.g., Ethereum, Polygon, BSC) and to allow for a simple and secure exchange of assets in the most atomic way.",source:"@site/docs/participate/bridge/README.md",sourceDirName:"participate/bridge",slug:"/participate/bridge/",permalink:"/participate/bridge/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"bridge",title:"Archethic's bridge"},sidebar:"docs",previous:{title:"Automate deployments",permalink:"/participate/aeweb/automation"},next:{title:"Usage",permalink:"/category/usage-1"}},c={},h=[{value:"Key concepts",id:"key-concepts",level:2},{value:"HTLC (Hash Time Lock Contract)",id:"htlc-hash-time-lock-contract",level:3},{value:"Archethic's cross-chain verification",id:"archethics-cross-chain-verification",level:3},{value:"Safety Module",id:"safety-module",level:3},{value:"Usage",id:"usage",level:2},{value:"Specifics",id:"specifics",level:2},{value:"EVM to Archethic",id:"evm-to-archethic",level:3},{value:"Archethic to EVM",id:"archethic-to-evm",level:3}],l={toc:h},d="wrapper";function p(e){let{components:t,...i}=e;return(0,n.kt)(d,(0,r.Z)({},l,i,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Archethic has developed a decentralized and P2P bridge to facilitate the exchange of your UCO ERC20 tokens with other blockchains (e.g., Ethereum, Polygon, BSC) and to allow for a simple and secure exchange of assets in the most atomic way."),(0,n.kt)("admonition",{title:"Testnet's only",type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"The current version of Archethic's bridge is only available on the testnet.\nYou can experiment and start bridging your assets by visiting ",(0,n.kt)("a",{parentName:"p",href:"https://bridge.testnet.archethic.net/"},"bridge.testnet.archethic.net/"))),(0,n.kt)("h2",{id:"key-concepts"},"Key concepts"),(0,n.kt)("h3",{id:"htlc-hash-time-lock-contract"},"HTLC (Hash Time Lock Contract)"),(0,n.kt)("p",null,"Archethic's bridge relies on atomic swap technology to securely exchange assets in a peer-to-peer and cryptographic manner without intermediaries. It also allows for the reversal and refund of assets after a specified lock time period."),(0,n.kt)("p",null,"This involves the use of specific contracts known as ",(0,n.kt)("strong",{parentName:"p"},"Hash Time Lock Contracts (HTLC)"),", which lock your funds until a secret is revealed (similar to a secret box) or after a lock time period to provide refund capabilities. These contracts must be deployed on both chains involved in the swap."),(0,n.kt)("p",null,"Both chains must be ready to transfer assets by revealing the private part of the secret encoded in the contracts, which enables the exchange. Once the secret is revealed on one chain, the other can proceed as the secret is now public."),(0,n.kt)("p",null,"This atomic swap method ensures secure transfers between chains without a central pool holding all the assets. Instead, it relies on hard-coded recipients and rules within a one-time contract."),(0,n.kt)("h3",{id:"archethics-cross-chain-verification"},"Archethic's cross-chain verification"),(0,n.kt)("p",null,"While conventional atomic swaps rely on HTLC techniques for security through peer-to-peer and cryptographic approaches, Archethic enhances its atomic swap protocol by enabling data retrieval outside of the blockchain. This enhancement makes the process completely decentralized and strengthens the security model."),(0,n.kt)("p",null,"Archethic's nodes can fetch transaction status on other chains, such as EVM blockchains, to establish the status of a swap with a strong consensus.\nCombining HTLC and Archethic's specific capabilities provides a high level of trust in the origin and reveal capabilities of any swap, relying on cryptography and cross-chain data retrieval."),(0,n.kt)("h3",{id:"safety-module"},"Safety Module"),(0,n.kt)("p",null,"To mitigate the risks associated with bridging assets, Archethic introduces a ",(0,n.kt)("strong",{parentName:"p"},"Safety Module"),", designed to address deficiencies that may occur when unexpected events disrupt the bridge's operation."),(0,n.kt)("p",null,"The Safety Module serves as a reserve of tokens that can be used in case of token loss or variations in the locked amount between both chains. "),(0,n.kt)("p",null,"At the launch of any pool, the maximum amount of tokens held by the pool will match the amount in the Safety Module. Each pool has its dedicated Safety Module, which will grow over time, increasing liquidity in the bridge pool."),(0,n.kt)("p",null,"Funding the Safety Module involves deducting a fee from each transfer originating from EVM to Archethic. This fee is deposited directly into the Safety Module to strengthen the reserve. The more tokens held in the Safety Module, the lower the fee rate becomes. "),(0,n.kt)("p",null,"The Safety Module is represented by a multisignature wallet managed by the bridge's governance."),(0,n.kt)("h2",{id:"usage"},"Usage"),(0,n.kt)("p",null,"TODO"),(0,n.kt)("h2",{id:"specifics"},"Specifics"),(0,n.kt)("h3",{id:"evm-to-archethic"},"EVM to Archethic"),(0,n.kt)("p",null,"The process begins with a secret held by a client (in this case, the bridge's dApp) and its hash, which forms a lock upon revealing the secret. "),(0,n.kt)("p",null,"The user deploys an HTLC smart contract on the EVM blockchain through the bridge's EVM pool."),(0,n.kt)("p",null," This pool ensures the capacity of the swap's initiator, fee distribution (see ",(0,n.kt)("a",{parentName:"p",href:"#safety-module"},"see Safety Module"),"), lock time period, and the recipient's address for the assets to be bridged."),(0,n.kt)("p",null,"Similarly, the user must deploy a contract on Archethic under the same conditions while specifying the recipient wallet to receive the funds. "),(0,n.kt)("p",null,"Subsequently, a request is made to the Archethic's pool (which holds the wrapped tokens) to fill the HTLC."),(0,n.kt)("p",null,"Because the tokens are wrapped on Archethic, the pool will mint new tokens after cross-chain verification (",(0,n.kt)("a",{parentName:"p",href:"#archethics-cross-chain-verification"},"see Archethic's specific"),")."),(0,n.kt)("p",null,"The remaining step involves revealing the secret on EVM to transfer the funds to the bridge's recipient wallet (including the safety module), and replicating this process on Archethic, ensuring that the action is executed on EVM blockchains through off-chain requests."),(0,n.kt)("p",null,"This results in both counterparties receiving their funds, achieving parity in the bridged assets."),(0,n.kt)("h3",{id:"archethic-to-evm"},"Archethic to EVM"),(0,n.kt)("p",null,"To exchange assets from Archethic to EVM, the process follows a similar pattern but in reverse order.\nHowever, a new feature is introduced in the smart contracts. Since EVM cannot request information outside the blockchain, steps are taken to ensure that an action has been performed on Archethic's side. Cryptography is employed to assert the action through a signature and provide non-repudiation proof for the Archethic's pool."),(0,n.kt)("p",null,"In this scenario, the user creates an HTLC contract on Archethic and funds it with tokens (wrapped or native), specifying the recipient's wallet provided by Archethic's pool, without initially revealing the secret and its lock."),(0,n.kt)("p",null,"The user then requests the Archethic's pool to obtain a secret, its hash, and a signature confirming the action's completion on Archethic's side."),(0,n.kt)("p",null,"During this process, the Archethic's pool contacts the HTLC to update its conditions for the secret's reveal by inserting the generated secret's hash from the pool."),(0,n.kt)("p",null,"On the other side, the user can request the EVM pool to create and provision an HTLC contract based on the proof provided by Archethic's pool regarding an existing and funded HTLC."),(0,n.kt)("p",null,"The EVM pool can now create and transfer funds to this new contract."),(0,n.kt)("p",null,"The remaining step is to reveal the secret. The user asks the Archethic's pool to reveal the secret within the HTLC and provide a signature for this action. At this point, the locked tokens will be burnt. "),(0,n.kt)("p",null,"With the secret revealed, the user can also reveal the secret on the EVM HTLC and provide the signature from Archethic's pool, unlocking the assets to the user's wallet registered within the contract."),(0,n.kt)("p",null,"This process ensures that both counterparties receive their funds, achieving parity in the bridged assets."))}p.isMDXComponent=!0},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/1872c6b8.84daa6f2.js b/assets/js/1872c6b8.84daa6f2.js new file mode 100644 index 000000000..0b836e565 --- /dev/null +++ b/assets/js/1872c6b8.84daa6f2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3747],{3905:(e,t,i)=>{i.d(t,{Zo:()=>l,kt:()=>f});var r=i(67294);function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function o(e){for(var t=1;t=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var c=r.createContext({}),h=function(e){var t=r.useContext(c),i=t;return e&&(i="function"==typeof e?e(t):o(o({},t),e)),i},l=function(e){var t=h(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var i=e.components,n=e.mdxType,a=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=h(i),u=n,f=d["".concat(c,".").concat(u)]||d[u]||p[u]||a;return i?r.createElement(f,o(o({ref:t},l),{},{components:i})):r.createElement(f,o({ref:t},l))}));function f(e,t){var i=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=i.length,o=new Array(a);o[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:n,o[1]=s;for(var h=2;h{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>h});var r=i(87462),n=(i(67294),i(3905));i(8209);const a={id:"bridge",title:"Archethic's bridge"},o=void 0,s={unversionedId:"participate/bridge/bridge",id:"participate/bridge/bridge",title:"Archethic's bridge",description:"Archethic has developed a decentralized and P2P bridge to facilitate the exchange of your UCO ERC20 tokens with other blockchains (e.g., Ethereum, Polygon, BSC) and to allow for a simple and secure exchange of assets in the most atomic way.",source:"@site/docs/participate/bridge/README.md",sourceDirName:"participate/bridge",slug:"/participate/bridge/",permalink:"/participate/bridge/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"bridge",title:"Archethic's bridge"},sidebar:"docs",previous:{title:"Automate deployments",permalink:"/participate/aeweb/automation"},next:{title:"Usage",permalink:"/category/usage-1"}},c={},h=[{value:"Key concepts",id:"key-concepts",level:2},{value:"HTLC (Hash Time Lock Contract)",id:"htlc-hash-time-lock-contract",level:3},{value:"Archethic's cross-chain verification",id:"archethics-cross-chain-verification",level:3},{value:"Safety Module",id:"safety-module",level:3},{value:"Usage",id:"usage",level:2},{value:"Specifics",id:"specifics",level:2},{value:"EVM to Archethic",id:"evm-to-archethic",level:3},{value:"Archethic to EVM",id:"archethic-to-evm",level:3}],l={toc:h},d="wrapper";function p(e){let{components:t,...i}=e;return(0,n.kt)(d,(0,r.Z)({},l,i,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Archethic has developed a decentralized and P2P bridge to facilitate the exchange of your UCO ERC20 tokens with other blockchains (e.g., Ethereum, Polygon, BSC) and to allow for a simple and secure exchange of assets in the most atomic way."),(0,n.kt)("admonition",{title:"Testnet's only",type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"The current version of Archethic's bridge is only available on the testnet.\nYou can experiment and start bridging your assets by visiting ",(0,n.kt)("a",{parentName:"p",href:"https://bridge.testnet.archethic.net/"},"bridge.testnet.archethic.net/"))),(0,n.kt)("h2",{id:"key-concepts"},"Key concepts"),(0,n.kt)("h3",{id:"htlc-hash-time-lock-contract"},"HTLC (Hash Time Lock Contract)"),(0,n.kt)("p",null,"Archethic's bridge relies on atomic swap technology to securely exchange assets in a peer-to-peer and cryptographic manner without intermediaries. It also allows for the reversal and refund of assets after a specified lock time period."),(0,n.kt)("p",null,"This involves the use of specific contracts known as ",(0,n.kt)("strong",{parentName:"p"},"Hash Time Lock Contracts (HTLC)"),", which lock your funds until a secret is revealed (similar to a secret box) or after a lock time period to provide refund capabilities. These contracts must be deployed on both chains involved in the swap."),(0,n.kt)("p",null,"Both chains must be ready to transfer assets by revealing the private part of the secret encoded in the contracts, which enables the exchange. Once the secret is revealed on one chain, the other can proceed as the secret is now public."),(0,n.kt)("p",null,"This atomic swap method ensures secure transfers between chains without a central pool holding all the assets. Instead, it relies on hard-coded recipients and rules within a one-time contract."),(0,n.kt)("h3",{id:"archethics-cross-chain-verification"},"Archethic's cross-chain verification"),(0,n.kt)("p",null,"While conventional atomic swaps rely on HTLC techniques for security through peer-to-peer and cryptographic approaches, Archethic enhances its atomic swap protocol by enabling data retrieval outside of the blockchain. This enhancement makes the process completely decentralized and strengthens the security model."),(0,n.kt)("p",null,"Archethic's nodes can fetch transaction status on other chains, such as EVM blockchains, to establish the status of a swap with a strong consensus.\nCombining HTLC and Archethic's specific capabilities provides a high level of trust in the origin and reveal capabilities of any swap, relying on cryptography and cross-chain data retrieval."),(0,n.kt)("h3",{id:"safety-module"},"Safety Module"),(0,n.kt)("p",null,"To mitigate the risks associated with bridging assets, Archethic introduces a ",(0,n.kt)("strong",{parentName:"p"},"Safety Module"),", designed to address deficiencies that may occur when unexpected events disrupt the bridge's operation."),(0,n.kt)("p",null,"The Safety Module serves as a reserve of tokens that can be used in case of token loss or variations in the locked amount between both chains. "),(0,n.kt)("p",null,"At the launch of any pool, the maximum amount of tokens held by the pool will match the amount in the Safety Module. Each pool has its dedicated Safety Module, which will grow over time, increasing liquidity in the bridge pool."),(0,n.kt)("p",null,"Funding the Safety Module involves deducting a fee from each transfer originating from EVM to Archethic. This fee is deposited directly into the Safety Module to strengthen the reserve. The more tokens held in the Safety Module, the lower the fee rate becomes. "),(0,n.kt)("p",null,"The Safety Module is represented by a multisignature wallet managed by the bridge's governance."),(0,n.kt)("h2",{id:"usage"},"Usage"),(0,n.kt)("p",null,"TODO"),(0,n.kt)("h2",{id:"specifics"},"Specifics"),(0,n.kt)("h3",{id:"evm-to-archethic"},"EVM to Archethic"),(0,n.kt)("p",null,"The process begins with a secret held by a client (in this case, the bridge's dApp) and its hash, which forms a lock upon revealing the secret. "),(0,n.kt)("p",null,"The user deploys an HTLC smart contract on the EVM blockchain through the bridge's EVM pool."),(0,n.kt)("p",null," This pool ensures the capacity of the swap's initiator, fee distribution (see ",(0,n.kt)("a",{parentName:"p",href:"#safety-module"},"see Safety Module"),"), lock time period, and the recipient's address for the assets to be bridged."),(0,n.kt)("p",null,"Similarly, the user must deploy a contract on Archethic under the same conditions while specifying the recipient wallet to receive the funds. "),(0,n.kt)("p",null,"Subsequently, a request is made to the Archethic's pool (which holds the wrapped tokens) to fill the HTLC."),(0,n.kt)("p",null,"Because the tokens are wrapped on Archethic, the pool will mint new tokens after cross-chain verification (",(0,n.kt)("a",{parentName:"p",href:"#archethics-cross-chain-verification"},"see Archethic's specific"),")."),(0,n.kt)("p",null,"The remaining step involves revealing the secret on EVM to transfer the funds to the bridge's recipient wallet (including the safety module), and replicating this process on Archethic, ensuring that the action is executed on EVM blockchains through off-chain requests."),(0,n.kt)("p",null,"This results in both counterparties receiving their funds, achieving parity in the bridged assets."),(0,n.kt)("h3",{id:"archethic-to-evm"},"Archethic to EVM"),(0,n.kt)("p",null,"To exchange assets from Archethic to EVM, the process follows a similar pattern but in reverse order.\nHowever, a new feature is introduced in the smart contracts. Since EVM cannot request information outside the blockchain, steps are taken to ensure that an action has been performed on Archethic's side. Cryptography is employed to assert the action through a signature and provide non-repudiation proof for the Archethic's pool."),(0,n.kt)("p",null,"In this scenario, the user creates an HTLC contract on Archethic and funds it with tokens (wrapped or native), specifying the recipient's wallet provided by Archethic's pool, without initially revealing the secret and its lock."),(0,n.kt)("p",null,"The user then requests the Archethic's pool to obtain a secret, its hash, and a signature confirming the action's completion on Archethic's side."),(0,n.kt)("p",null,"During this process, the Archethic's pool contacts the HTLC to update its conditions for the secret's reveal by inserting the generated secret's hash from the pool."),(0,n.kt)("p",null,"On the other side, the user can request the EVM pool to create and provision an HTLC contract based on the proof provided by Archethic's pool regarding an existing and funded HTLC."),(0,n.kt)("p",null,"The EVM pool can now create and transfer funds to this new contract."),(0,n.kt)("p",null,"The remaining step is to reveal the secret. The user asks the Archethic's pool to reveal the secret within the HTLC and provide a signature for this action. At this point, the locked tokens will be burnt. "),(0,n.kt)("p",null,"With the secret revealed, the user can also reveal the secret on the EVM HTLC and provide the signature from Archethic's pool, unlocking the assets to the user's wallet registered within the contract."),(0,n.kt)("p",null,"This process ensures that both counterparties receive their funds, achieving parity in the bridged assets."))}p.isMDXComponent=!0},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/193cb586.33355d98.js b/assets/js/193cb586.33355d98.js deleted file mode 100644 index fe8e3e507..000000000 --- a/assets/js/193cb586.33355d98.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6289],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),g=s(n),u=r,m=g["".concat(l,".").concat(u)]||g[u]||p[u]||i;return n?a.createElement(m,o(o({ref:t},d),{},{components:n})):a.createElement(m,o({ref:t},d))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[g]="string"==typeof e?e:r,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"triggers",title:"Smart Contracts - Triggers",sidebar_label:"Triggers",sidebar_position:1},o=void 0,c={unversionedId:"build/smart-contracts/language/triggers",id:"build/smart-contracts/language/triggers",title:"Smart Contracts - Triggers",description:"Contract triggered by a transaction",source:"@site/docs/build/smart-contracts/language/triggers.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/triggers",permalink:"/build/smart-contracts/language/triggers",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:1,frontMatter:{id:"triggers",title:"Smart Contracts - Triggers",sidebar_label:"Triggers",sidebar_position:1},sidebar:"docs",previous:{title:"Language",permalink:"/build/smart-contracts/language/"},next:{title:"Condition",permalink:"/build/smart-contracts/language/condition"}},l={},s=[{value:"Contract triggered by a transaction",id:"contract-triggered-by-a-transaction",level:3},{value:"Contract triggered by a transaction with a named action",id:"contract-triggered-by-a-transaction-with-a-named-action",level:3},{value:"Contract triggered at a specific date and time",id:"contract-triggered-at-a-specific-date-and-time",level:3},{value:"Contract triggered at a specific interval",id:"contract-triggered-at-a-specific-interval",level:3},{value:"Contract triggered on every Oracle transaction",id:"contract-triggered-on-every-oracle-transaction",level:3},{value:"Multiple triggers",id:"multiple-triggers",level:3}],d={toc:s},g="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(g,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h3",{id:"contract-triggered-by-a-transaction"},"Contract triggered by a transaction"),(0,r.kt)("p",null,"To trigger a SC execution, the incoming transaction must add the SC address in the ",(0,r.kt)("inlineCode",{parentName:"p"},"recipients")," part of the transaction."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"This allows to activate a SC without sending funds to it, or to send funds to it without activating the code execution. "),(0,r.kt)("p",{parentName:"admonition"},"Because the ",(0,r.kt)("inlineCode",{parentName:"p"},"recipients")," field is a list, you can trigger multiple contracts in the same transaction \ud83d\ude09")),(0,r.kt)("p",null,"In this scenario:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"condition transaction")," may be used to check the incoming transaction (before executing the trigger)."),(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"transaction")," variable is available in the blocks.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\ncondition triggered_by: transaction, as: [\n ...\n]\n\nactions triggered_by: transaction do\n ...\nend\n")),(0,r.kt)("h3",{id:"contract-triggered-by-a-transaction-with-a-named-action"},"Contract triggered by a transaction with a named action"),(0,r.kt)("p",null,'The SC caller may be able to execute a specific "named" action with specified arguments on the Smart Contract.'),(0,r.kt)("p",null,"In this scenario:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"condition transaction")," may be used to check the incoming transaction (before executing the trigger)."),(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"transaction")," variable is available in the blocks."),(0,r.kt)("li",{parentName:"ul"},"every ",(0,r.kt)("inlineCode",{parentName:"li"},"argument")," defined is available in the blocks.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\ncondition triggered_by: transaction, on: vote_for_class_president(firstname, lastname), as: [\n ...\n]\n\nactions triggered_by: transaction, on: vote_for_class_president(firstname, lastname) do\n ...\nend\n")),(0,r.kt)("h3",{id:"contract-triggered-at-a-specific-date-and-time"},"Contract triggered at a specific date and time"),(0,r.kt)("p",null,"You may trigger a contract at a specific date and time. You need to specify a ",(0,r.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Unix_time"},"Unix time")," (seconds since epoch)."),(0,r.kt)("admonition",{title:"The datetime must be rounded to the minute",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"A contract will not parse if the datetime isn't rounded.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\nactions triggered_by: datetime, at: 1676332800 do\n ...\nend\n")),(0,r.kt)("h3",{id:"contract-triggered-at-a-specific-interval"},"Contract triggered at a specific interval"),(0,r.kt)("p",null,"You may trigger a contract at a specific interval. You need to specify a ",(0,r.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Cron"},"CRON Format String"),"."),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"The minimum granularity is the minute. Except in local development where the minimum granularity is the second.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\n# \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 minute (0 - 59)\n# \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 hour (0 - 23)\n# \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of the month (1 - 31)\n# \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 month (1 - 12)\n# \u2502 \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of the week (0 - 6) (Sunday to Saturday)\n# \u2502 \u2502 \u2502 \u2502 \u2502\n# \u2502 \u2502 \u2502 \u2502 \u2502\n# \u2502 \u2502 \u2502 \u2502 \u2502\n# * * * * *\nactions triggered_by: interval, at: "0 8 * * *" do\n # do something each day at 8AM UTC\nend\n')),(0,r.kt)("h3",{id:"contract-triggered-on-every-oracle-transaction"},"Contract triggered on every Oracle transaction"),(0,r.kt)("p",null,"You may trigger a contract on every Oracle transaction."),(0,r.kt)("p",null,"In this scenario:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"condition oracle")," must be used to check the oracle transaction (to avoid running a contract if the oracle does not contain what you require)"),(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"transaction")," variable is available in the blocks.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\ncondition triggered_by: oracle, as: [\n # use transaction.content to make sure the oracle has the data you require\n]\nactions triggered_by: oracle do\n # do something with transaction.content\nend\n")),(0,r.kt)("h3",{id:"multiple-triggers"},"Multiple triggers"),(0,r.kt)("p",null,"Only named action triggers may have multiple triggers. ",(0,r.kt)("strong",{parentName:"p"},"Other triggers are limited to 1 per type"),"."),(0,r.kt)("p",null,"DO:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: transaction do\n ...\nend\n\nactions triggered_by: transaction, on: upgrade() do\n ...\nend\n\nactions triggered_by: transaction, on: calculate(x, y) do\n ...\nend\n\nactions triggered_by: interval, at: "0 8 * * *" do\n ...\nend\n')),(0,r.kt)("p",null,"DON'T:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: interval, at: "0 9 * * *" do\n ...\nend\n\nactions triggered_by: interval, at: "0 8 * * *" do\n ...\nend\n')),(0,r.kt)("p",null,"DON'T:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\n\nactions triggered_by: transaction do\n ...\nend\n\nactions triggered_by: transaction do\n ...\nend\n")),(0,r.kt)("p",null,"DON'T:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\n\nactions triggered_by: datetime, at: 1693519200 do\n ...\nend\n\nactions triggered_by: datetime, at: 1693605600 do\n ...\nend\n")))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/193cb586.b6753ac5.js b/assets/js/193cb586.b6753ac5.js new file mode 100644 index 000000000..b8e95cf67 --- /dev/null +++ b/assets/js/193cb586.b6753ac5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6289],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),g=s(n),u=r,m=g["".concat(l,".").concat(u)]||g[u]||p[u]||i;return n?a.createElement(m,o(o({ref:t},d),{},{components:n})):a.createElement(m,o({ref:t},d))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[g]="string"==typeof e?e:r,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"triggers",title:"Smart Contracts - Triggers",sidebar_label:"Triggers",sidebar_position:1},o=void 0,c={unversionedId:"build/smart-contracts/language/triggers",id:"build/smart-contracts/language/triggers",title:"Smart Contracts - Triggers",description:"Contract triggered by a transaction",source:"@site/docs/build/smart-contracts/language/triggers.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/triggers",permalink:"/build/smart-contracts/language/triggers",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:1,frontMatter:{id:"triggers",title:"Smart Contracts - Triggers",sidebar_label:"Triggers",sidebar_position:1},sidebar:"docs",previous:{title:"Language",permalink:"/build/smart-contracts/language/"},next:{title:"Condition",permalink:"/build/smart-contracts/language/condition"}},l={},s=[{value:"Contract triggered by a transaction",id:"contract-triggered-by-a-transaction",level:3},{value:"Contract triggered by a transaction with a named action",id:"contract-triggered-by-a-transaction-with-a-named-action",level:3},{value:"Contract triggered at a specific date and time",id:"contract-triggered-at-a-specific-date-and-time",level:3},{value:"Contract triggered at a specific interval",id:"contract-triggered-at-a-specific-interval",level:3},{value:"Contract triggered on every Oracle transaction",id:"contract-triggered-on-every-oracle-transaction",level:3},{value:"Multiple triggers",id:"multiple-triggers",level:3}],d={toc:s},g="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(g,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h3",{id:"contract-triggered-by-a-transaction"},"Contract triggered by a transaction"),(0,r.kt)("p",null,"To trigger a SC execution, the incoming transaction must add the SC address in the ",(0,r.kt)("inlineCode",{parentName:"p"},"recipients")," part of the transaction."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"This allows to activate a SC without sending funds to it, or to send funds to it without activating the code execution. "),(0,r.kt)("p",{parentName:"admonition"},"Because the ",(0,r.kt)("inlineCode",{parentName:"p"},"recipients")," field is a list, you can trigger multiple contracts in the same transaction \ud83d\ude09")),(0,r.kt)("p",null,"In this scenario:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"condition transaction")," may be used to check the incoming transaction (before executing the trigger)."),(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"transaction")," variable is available in the blocks.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\ncondition triggered_by: transaction, as: [\n ...\n]\n\nactions triggered_by: transaction do\n ...\nend\n")),(0,r.kt)("h3",{id:"contract-triggered-by-a-transaction-with-a-named-action"},"Contract triggered by a transaction with a named action"),(0,r.kt)("p",null,'The SC caller may be able to execute a specific "named" action with specified arguments on the Smart Contract.'),(0,r.kt)("p",null,"In this scenario:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"condition transaction")," may be used to check the incoming transaction (before executing the trigger)."),(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"transaction")," variable is available in the blocks."),(0,r.kt)("li",{parentName:"ul"},"every ",(0,r.kt)("inlineCode",{parentName:"li"},"argument")," defined is available in the blocks.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\ncondition triggered_by: transaction, on: vote_for_class_president(firstname, lastname), as: [\n ...\n]\n\nactions triggered_by: transaction, on: vote_for_class_president(firstname, lastname) do\n ...\nend\n")),(0,r.kt)("h3",{id:"contract-triggered-at-a-specific-date-and-time"},"Contract triggered at a specific date and time"),(0,r.kt)("p",null,"You may trigger a contract at a specific date and time. You need to specify a ",(0,r.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Unix_time"},"Unix time")," (seconds since epoch)."),(0,r.kt)("admonition",{title:"The datetime must be rounded to the minute",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"A contract will not parse if the datetime isn't rounded.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\nactions triggered_by: datetime, at: 1676332800 do\n ...\nend\n")),(0,r.kt)("h3",{id:"contract-triggered-at-a-specific-interval"},"Contract triggered at a specific interval"),(0,r.kt)("p",null,"You may trigger a contract at a specific interval. You need to specify a ",(0,r.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Cron"},"CRON Format String"),"."),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"The minimum granularity is the minute. Except in local development where the minimum granularity is the second.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\n# \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 minute (0 - 59)\n# \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 hour (0 - 23)\n# \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of the month (1 - 31)\n# \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 month (1 - 12)\n# \u2502 \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of the week (0 - 6) (Sunday to Saturday)\n# \u2502 \u2502 \u2502 \u2502 \u2502\n# \u2502 \u2502 \u2502 \u2502 \u2502\n# \u2502 \u2502 \u2502 \u2502 \u2502\n# * * * * *\nactions triggered_by: interval, at: "0 8 * * *" do\n # do something each day at 8AM UTC\nend\n')),(0,r.kt)("h3",{id:"contract-triggered-on-every-oracle-transaction"},"Contract triggered on every Oracle transaction"),(0,r.kt)("p",null,"You may trigger a contract on every Oracle transaction."),(0,r.kt)("p",null,"In this scenario:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"condition oracle")," must be used to check the oracle transaction (to avoid running a contract if the oracle does not contain what you require)"),(0,r.kt)("li",{parentName:"ul"},"a ",(0,r.kt)("inlineCode",{parentName:"li"},"transaction")," variable is available in the blocks.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\ncondition triggered_by: oracle, as: [\n # use transaction.content to make sure the oracle has the data you require\n]\nactions triggered_by: oracle do\n # do something with transaction.content\nend\n")),(0,r.kt)("h3",{id:"multiple-triggers"},"Multiple triggers"),(0,r.kt)("p",null,"Only named action triggers may have multiple triggers. ",(0,r.kt)("strong",{parentName:"p"},"Other triggers are limited to 1 per type"),"."),(0,r.kt)("p",null,"DO:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: transaction do\n ...\nend\n\nactions triggered_by: transaction, on: upgrade() do\n ...\nend\n\nactions triggered_by: transaction, on: calculate(x, y) do\n ...\nend\n\nactions triggered_by: interval, at: "0 8 * * *" do\n ...\nend\n')),(0,r.kt)("p",null,"DON'T:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: interval, at: "0 9 * * *" do\n ...\nend\n\nactions triggered_by: interval, at: "0 8 * * *" do\n ...\nend\n')),(0,r.kt)("p",null,"DON'T:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\n\nactions triggered_by: transaction do\n ...\nend\n\nactions triggered_by: transaction do\n ...\nend\n")),(0,r.kt)("p",null,"DON'T:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\n\nactions triggered_by: datetime, at: 1693519200 do\n ...\nend\n\nactions triggered_by: datetime, at: 1693605600 do\n ...\nend\n")))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/199f22fd.39f2b6b2.js b/assets/js/199f22fd.683c809e.js similarity index 63% rename from assets/js/199f22fd.39f2b6b2.js rename to assets/js/199f22fd.683c809e.js index ed1fc9ba0..0b97fef06 100644 --- a/assets/js/199f22fd.39f2b6b2.js +++ b/assets/js/199f22fd.683c809e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1263],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),f=a,m=d["".concat(l,".").concat(f)]||d[f]||u[f]||o;return n?r.createElement(m,i(i({ref:t},p),{},{components:n})):r.createElement(m,i({ref:t},p))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>s,default:()=>b,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var r=n(87462),a=n(67294),o=n(3905);n(8209);const i={id:"nearest-endpoints",title:"nearestEndpoints",hide_table_of_contents:!1},s=void 0,l={unversionedId:"build/api/schema/queries/nearest-endpoints",id:"build/api/schema/queries/nearest-endpoints",title:"nearestEndpoints",description:"List the nearest endpoints nodes from the client's IP",source:"@site/docs/build/api/schema/queries/nearest-endpoints.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/nearest-endpoints",permalink:"/build/api/schema/queries/nearest-endpoints",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"nearest-endpoints",title:"nearestEndpoints",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"lastTransaction",permalink:"/build/api/schema/queries/last-transaction"},next:{title:"networkTransactions",permalink:"/build/api/schema/queries/network-transactions"}},c={},p=[{value:"Type",id:"type",level:3},{value:'Endpoint ',id:"endpoint-",level:4}],d=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},y="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(y,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"List the nearest endpoints nodes from the client's IP"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"nearestEndpoints: [Endpoint]\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"endpoint-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/endpoint"},(0,o.kt)("inlineCode",{parentName:"a"},"Endpoint"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Endpoint]"," represents a network node's endpoint")))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1263],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),f=a,m=d["".concat(l,".").concat(f)]||d[f]||u[f]||o;return n?r.createElement(m,i(i({ref:t},p),{},{components:n})):r.createElement(m,i({ref:t},p))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>s,default:()=>y,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var r=n(87462),a=n(67294),o=n(3905);n(8209);const i={id:"nearest-endpoints",title:"nearestEndpoints",hide_table_of_contents:!1},s=void 0,l={unversionedId:"build/api/schema/queries/nearest-endpoints",id:"build/api/schema/queries/nearest-endpoints",title:"nearestEndpoints",description:"List the nearest endpoints nodes from the client's IP",source:"@site/docs/build/api/schema/queries/nearest-endpoints.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/nearest-endpoints",permalink:"/build/api/schema/queries/nearest-endpoints",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"nearest-endpoints",title:"nearestEndpoints",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"lastTransaction",permalink:"/build/api/schema/queries/last-transaction"},next:{title:"networkTransactions",permalink:"/build/api/schema/queries/network-transactions"}},c={},p=[{value:"Type",id:"type",level:3},{value:'Endpoint ',id:"endpoint-",level:4}],d=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},b="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"List the nearest endpoints nodes from the client's IP"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"nearestEndpoints: [Endpoint]\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"endpoint-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/endpoint"},(0,o.kt)("inlineCode",{parentName:"a"},"Endpoint"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Endpoint]"," represents a network node's endpoint")))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/1b311f41.2c486698.js b/assets/js/1b311f41.2c486698.js new file mode 100644 index 000000000..390da5667 --- /dev/null +++ b/assets/js/1b311f41.2c486698.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3355],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>h});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),l=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},d=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),u=l(a),m=r,h=u["".concat(c,".").concat(m)]||u[m]||p[m]||o;return a?n.createElement(h,s(s({ref:t},d),{},{components:a})):n.createElement(h,s({ref:t},d))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:r,s[1]=i;for(var l=2;l{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>l,contentTitle:()=>i,default:()=>y,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=a(87462),r=a(67294),o=a(3905);a(8209);const s={id:"transaction-chain",title:"transactionChain",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/queries/transaction-chain",id:"build/api/schema/queries/transaction-chain",title:"transactionChain",description:"Query the network to find a transaction chain",source:"@site/docs/build/api/schema/queries/transaction-chain.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/transaction-chain",permalink:"/build/api/schema/queries/transaction-chain",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-chain",title:"transactionChain",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"token",permalink:"/build/api/schema/queries/token"},next:{title:"transactionInputs",permalink:"/build/api/schema/queries/transaction-inputs"}},l={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transactionChain.addressAddress! ',id:"code-style-fontweight-normal-transactionchainbaddressbcodeaddress--",level:4},{value:'transactionChain.orderSortOrder ',id:"code-style-fontweight-normal-transactionchainborderbcodesortorder-",level:4},{value:'transactionChain.pagingAddressAddress ',id:"code-style-fontweight-normal-transactionchainbpagingaddressbcodeaddress-",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],u=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),h={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},f="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(f,(0,n.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to find a transaction chain"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transactionChain(\n address: Address!\n order: SortOrder\n pagingAddress: Address\n): [Transaction]\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionchainbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionChain.",(0,o.kt)("b",null,"address"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionchainborderbcodesortorder-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionChain.",(0,o.kt)("b",null,"order"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/enums/sort-order"},(0,o.kt)("inlineCode",{parentName:"a"},"SortOrder"))," ",(0,o.kt)(m,{class:"secondary",text:"enum",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionchainbpagingaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionChain.",(0,o.kt)("b",null,"pagingAddress"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transaction-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/1b311f41.55c13839.js b/assets/js/1b311f41.55c13839.js deleted file mode 100644 index 354f3cdb8..000000000 --- a/assets/js/1b311f41.55c13839.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3355],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>h});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),l=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},d=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),u=l(a),m=r,h=u["".concat(c,".").concat(m)]||u[m]||p[m]||o;return a?n.createElement(h,s(s({ref:t},d),{},{components:a})):n.createElement(h,s({ref:t},d))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:r,s[1]=i;for(var l=2;l{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>l,contentTitle:()=>i,default:()=>y,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=a(87462),r=a(67294),o=a(3905);a(8209);const s={id:"transaction-chain",title:"transactionChain",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/queries/transaction-chain",id:"build/api/schema/queries/transaction-chain",title:"transactionChain",description:"Query the network to find a transaction chain",source:"@site/docs/build/api/schema/queries/transaction-chain.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/transaction-chain",permalink:"/build/api/schema/queries/transaction-chain",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-chain",title:"transactionChain",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"token",permalink:"/build/api/schema/queries/token"},next:{title:"transactionInputs",permalink:"/build/api/schema/queries/transaction-inputs"}},l={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transactionChain.addressAddress! ',id:"code-style-fontweight-normal-transactionchainbaddressbcodeaddress--",level:4},{value:'transactionChain.orderSortOrder ',id:"code-style-fontweight-normal-transactionchainborderbcodesortorder-",level:4},{value:'transactionChain.pagingAddressAddress ',id:"code-style-fontweight-normal-transactionchainbpagingaddressbcodeaddress-",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],u=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),h={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},f="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(f,(0,n.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to find a transaction chain"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transactionChain(\n address: Address!\n order: SortOrder\n pagingAddress: Address\n): [Transaction]\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionchainbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionChain.",(0,o.kt)("b",null,"address"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionchainborderbcodesortorder-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionChain.",(0,o.kt)("b",null,"order"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/enums/sort-order"},(0,o.kt)("inlineCode",{parentName:"a"},"SortOrder"))," ",(0,o.kt)(m,{class:"secondary",text:"enum",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionchainbpagingaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionChain.",(0,o.kt)("b",null,"pagingAddress"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transaction-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/2159a0a5.01096cc1.js b/assets/js/2159a0a5.01096cc1.js deleted file mode 100644 index a632be303..000000000 --- a/assets/js/2159a0a5.01096cc1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7766],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),d=i,f=u["".concat(s,".").concat(d)]||u[d]||m[d]||r;return n?a.createElement(f,o(o({ref:t},p),{},{components:n})):a.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"fee",title:"Transaction fees",sidebar_position:4},o=void 0,l={unversionedId:"learn/fee",id:"learn/fee",title:"Transaction fees",description:"Archethic Blockchain is using specific heuristic algorithms to ensure the best transaction's distribution.",source:"@site/docs/learn/transaction-fees.md",sourceDirName:"learn",slug:"/learn/fee",permalink:"/learn/fee",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:4,frontMatter:{id:"fee",title:"Transaction fees",sidebar_position:4},sidebar:"docs",previous:{title:"Transaction chains",permalink:"/learn/transaction-chain"},next:{title:"Transaction types",permalink:"/learn/transaction-types"}},s={},c=[{value:"Calculation",id:"calculation",level:2},{value:"Transaction's type particularities",id:"transactions-type-particularities",level:2},{value:"Network",id:"network",level:3},{value:"Keychain",id:"keychain",level:3},{value:"Token",id:"token",level:3}],p={toc:c},u="wrapper";function m(e){let{components:t,...r}=e;return(0,i.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Blockchain is using specific heuristic algorithms to ensure the best transaction's distribution."),(0,i.kt)("p",null,"The fees are calculated according to the real costs of the network (size, complexity) and is based on a minimal fee ($0.01) indexed to the real UCO's price (using ",(0,i.kt)("a",{parentName:"p",href:"/learn/oracle-chain"},"Oracle Chain"),")"),(0,i.kt)("p",null,"During the transaction validation, the entire fee is burned to make the UCO more rare.\nThis programmable destruction of the UCO ensures a deflation and increases the value of each token."),(0,i.kt)("p",null,"This way a fair reward mechanism is put in place for nodes regarding their work and their availability."),(0,i.kt)("h2",{id:"calculation"},"Calculation"),(0,i.kt)("p",null,"The transaction's fee computation is based on some properties:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Minimum fee: ",(0,i.kt)("em",{parentName:"p"},"$0.01 of the current UCO price"))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Number of recipient (for transfers or smart contract calls)"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"1: no more additional fee ")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},">"," 1: each additional recipient will have an additional cost logarithmically. However we want to ensure for a simple transaction, the price doesn't go beyond $0.01. "),(0,i.kt)("admonition",{parentName:"li",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"We take the assumption than a recipient replication cost is something around 1/3 of the load for a given transaction.\nIndeed, sending transaction to multiple leverages more resources in terms of network load and storage capability as the transaction must be replicated in all the chains.\nTo make it more fare, we apply a logarithmic progression, as the cost of replication might be reduced by the overlap of storage node election"))))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Size of the transaction: each stored byte will cost 10",(0,i.kt)("sup",null,"-8")," of the current UCO's price")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Number of replicas")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Smart contract execution fee:"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Cost of resulting transaction: During transaction's validation, we simulate the output's transaction from a smart contract execution and apply a transaction fee calculation."),(0,i.kt)("li",{parentName:"ul"},"Complexity of the smart contract execution (Coming soon)")))),(0,i.kt)("p",null,"Overall formula:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"Transaction Fee = minimum fee (UCO's price)\n + fee for storage (size * nb of replicas)\n + fee for cost per recipients\n + fee for smart contract\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Regular transfer of UCO to single person would cost around ~$0.01 (+/- additional information + nb of replicas)")),(0,i.kt)("admonition",{title:"Important",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"The $0.01 cost is static only as minimum fee for any transaction.\nDepending on the number of recipients, size, etc. the fee will increase, as it requires more work for the network")),(0,i.kt)("h2",{id:"transactions-type-particularities"},"Transaction's type particularities"),(0,i.kt)("h3",{id:"network"},"Network"),(0,i.kt)("p",null,"All the transactions with a transaction's type such as ",(0,i.kt)("inlineCode",{parentName:"p"},"node"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"node shared secrets"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"oracle"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"beacon chain"),", etc. don't cost fee, as their intent is only for network management."),(0,i.kt)("h3",{id:"keychain"},"Keychain"),(0,i.kt)("p",null,"Transactions to manage keychain for creation, updates or add new access don't cost fee, as this will be blockage to the adoption and there are just meant to ease the wallet management."),(0,i.kt)("h3",{id:"token"},"Token"),(0,i.kt)("p",null,"Archethic supports a token mining through a given type of transaction ",(0,i.kt)("inlineCode",{parentName:"p"},"token"),".\nBecause during this step validation nodes have to perform some additional work to create new unspent transaction outputs (UTXOs) and deliver them (if multiple - for example in a collection creation)."),(0,i.kt)("p",null,"Hence an additional fee is computed based on the number of UTXO to create."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Fungible tokens: there will only cost the minimum fee: $0.01 - as it's like doing some UCO transfer")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Non fungible tokens: These are tokens which each collection item have some unique properties and well identified. So a list of UTXO is created for each unique collection items. This creation will consume resources of computation, networking and storage."))),(0,i.kt)("p",null,"An additional fee is determined in that case through the following formula: "),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"(log10(number of utxos) + 1) * number of utxos * minimum fee")),(0,i.kt)("p",null,"So the transaction fee will gradually increase according of the number of unique token to create (= new UTXO)"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(57626).Z,width:"811",height:"502"})),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Token definition allows to send at the time of minting to list of first recipients.\nHence, the rules to multiple transfers is applied to logarithmically increases the transaction's fee")))}m.isMDXComponent=!0},57626:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/nft_additional_fee-8c6d24177afeea4eba9d662d63304901.svg"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/2159a0a5.0a9cb723.js b/assets/js/2159a0a5.0a9cb723.js new file mode 100644 index 000000000..669a947db --- /dev/null +++ b/assets/js/2159a0a5.0a9cb723.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7766],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),d=i,f=u["".concat(s,".").concat(d)]||u[d]||m[d]||r;return n?a.createElement(f,o(o({ref:t},p),{},{components:n})):a.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"fee",title:"Transaction fees",sidebar_position:4},o=void 0,l={unversionedId:"learn/fee",id:"learn/fee",title:"Transaction fees",description:"Archethic Blockchain is using specific heuristic algorithms to ensure the best transaction's distribution.",source:"@site/docs/learn/transaction-fees.md",sourceDirName:"learn",slug:"/learn/fee",permalink:"/learn/fee",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:4,frontMatter:{id:"fee",title:"Transaction fees",sidebar_position:4},sidebar:"docs",previous:{title:"Transaction chains",permalink:"/learn/transaction-chain"},next:{title:"Transaction types",permalink:"/learn/transaction-types"}},s={},c=[{value:"Calculation",id:"calculation",level:2},{value:"Transaction's type particularities",id:"transactions-type-particularities",level:2},{value:"Network",id:"network",level:3},{value:"Keychain",id:"keychain",level:3},{value:"Token",id:"token",level:3}],p={toc:c},u="wrapper";function m(e){let{components:t,...r}=e;return(0,i.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Blockchain is using specific heuristic algorithms to ensure the best transaction's distribution."),(0,i.kt)("p",null,"The fees are calculated according to the real costs of the network (size, complexity) and is based on a minimal fee ($0.01) indexed to the real UCO's price (using ",(0,i.kt)("a",{parentName:"p",href:"/learn/oracle-chain"},"Oracle Chain"),")"),(0,i.kt)("p",null,"During the transaction validation, the entire fee is burned to make the UCO more rare.\nThis programmable destruction of the UCO ensures a deflation and increases the value of each token."),(0,i.kt)("p",null,"This way a fair reward mechanism is put in place for nodes regarding their work and their availability."),(0,i.kt)("h2",{id:"calculation"},"Calculation"),(0,i.kt)("p",null,"The transaction's fee computation is based on some properties:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Minimum fee: ",(0,i.kt)("em",{parentName:"p"},"$0.01 of the current UCO price"))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Number of recipient (for transfers or smart contract calls)"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"1: no more additional fee ")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},">"," 1: each additional recipient will have an additional cost logarithmically. However we want to ensure for a simple transaction, the price doesn't go beyond $0.01. "),(0,i.kt)("admonition",{parentName:"li",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"We take the assumption than a recipient replication cost is something around 1/3 of the load for a given transaction.\nIndeed, sending transaction to multiple leverages more resources in terms of network load and storage capability as the transaction must be replicated in all the chains.\nTo make it more fare, we apply a logarithmic progression, as the cost of replication might be reduced by the overlap of storage node election"))))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Size of the transaction: each stored byte will cost 10",(0,i.kt)("sup",null,"-8")," of the current UCO's price")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Number of replicas")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Smart contract execution fee:"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Cost of resulting transaction: During transaction's validation, we simulate the output's transaction from a smart contract execution and apply a transaction fee calculation."),(0,i.kt)("li",{parentName:"ul"},"Complexity of the smart contract execution (Coming soon)")))),(0,i.kt)("p",null,"Overall formula:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"Transaction Fee = minimum fee (UCO's price)\n + fee for storage (size * nb of replicas)\n + fee for cost per recipients\n + fee for smart contract\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Regular transfer of UCO to single person would cost around ~$0.01 (+/- additional information + nb of replicas)")),(0,i.kt)("admonition",{title:"Important",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"The $0.01 cost is static only as minimum fee for any transaction.\nDepending on the number of recipients, size, etc. the fee will increase, as it requires more work for the network")),(0,i.kt)("h2",{id:"transactions-type-particularities"},"Transaction's type particularities"),(0,i.kt)("h3",{id:"network"},"Network"),(0,i.kt)("p",null,"All the transactions with a transaction's type such as ",(0,i.kt)("inlineCode",{parentName:"p"},"node"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"node shared secrets"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"oracle"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"beacon chain"),", etc. don't cost fee, as their intent is only for network management."),(0,i.kt)("h3",{id:"keychain"},"Keychain"),(0,i.kt)("p",null,"Transactions to manage keychain for creation, updates or add new access don't cost fee, as this will be blockage to the adoption and there are just meant to ease the wallet management."),(0,i.kt)("h3",{id:"token"},"Token"),(0,i.kt)("p",null,"Archethic supports a token mining through a given type of transaction ",(0,i.kt)("inlineCode",{parentName:"p"},"token"),".\nBecause during this step validation nodes have to perform some additional work to create new unspent transaction outputs (UTXOs) and deliver them (if multiple - for example in a collection creation)."),(0,i.kt)("p",null,"Hence an additional fee is computed based on the number of UTXO to create."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Fungible tokens: there will only cost the minimum fee: $0.01 - as it's like doing some UCO transfer")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},"Non fungible tokens: These are tokens which each collection item have some unique properties and well identified. So a list of UTXO is created for each unique collection items. This creation will consume resources of computation, networking and storage."))),(0,i.kt)("p",null,"An additional fee is determined in that case through the following formula: "),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"(log10(number of utxos) + 1) * number of utxos * minimum fee")),(0,i.kt)("p",null,"So the transaction fee will gradually increase according of the number of unique token to create (= new UTXO)"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(57626).Z,width:"811",height:"502"})),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Token definition allows to send at the time of minting to list of first recipients.\nHence, the rules to multiple transfers is applied to logarithmically increases the transaction's fee")))}m.isMDXComponent=!0},57626:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/nft_additional_fee-8c6d24177afeea4eba9d662d63304901.svg"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/21e44e7e.c5487cb8.js b/assets/js/21e44e7e.c5487cb8.js deleted file mode 100644 index 4481bf2d0..000000000 --- a/assets/js/21e44e7e.c5487cb8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6605],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),i=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=i(r),m=a,b=p["".concat(l,".").concat(m)]||p[m]||u[m]||o;return r?n.createElement(b,s(s({ref:t},d),{},{components:r})):n.createElement(b,s({ref:t},d))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:a,s[1]=c;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>c,default:()=>y,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const s={id:"transaction-error",title:"TransactionError",hide_table_of_contents:!1},c=void 0,l={unversionedId:"build/api/schema/objects/transaction-error",id:"build/api/schema/objects/transaction-error",title:"TransactionError",description:"[TransactionError] represents an error.",source:"@site/docs/build/api/schema/objects/transaction-error.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-error",permalink:"/build/api/schema/objects/transaction-error",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-error",title:"TransactionError",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionAttestation",permalink:"/build/api/schema/objects/transaction-attestation"},next:{title:"TransactionInput",permalink:"/build/api/schema/objects/transaction-input"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'TransactionError.addressAddress ',id:"code-style-fontweight-normal-transactionerrorbaddressbcodeaddress-",level:4},{value:'TransactionError.contextErrorContext ',id:"code-style-fontweight-normal-transactionerrorbcontextbcodeerrorcontext-",level:4},{value:'TransactionError.reasonString ',id:"code-style-fontweight-normal-transactionerrorbreasonbcodestring-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TransactionError]"," represents an error."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionError {\n address: Address\n context: ErrorContext\n reason: String\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionerrorbaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionError.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionerrorbcontextbcodeerrorcontext-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionError.",(0,o.kt)("b",null,"context"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/enums/error-context"},(0,o.kt)("inlineCode",{parentName:"a"},"ErrorContext"))," ",(0,o.kt)(m,{class:"secondary",text:"enum",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionerrorbreasonbcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionError.",(0,o.kt)("b",null,"reason"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/transaction-error"},(0,o.kt)("inlineCode",{parentName:"a"},"transactionError"))," ",(0,o.kt)(m,{class:"secondary",text:"subscription",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/21e44e7e.d009624a.js b/assets/js/21e44e7e.d009624a.js new file mode 100644 index 000000000..0b3f55d41 --- /dev/null +++ b/assets/js/21e44e7e.d009624a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6605],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),i=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=i(r),m=a,b=p["".concat(l,".").concat(m)]||p[m]||u[m]||o;return r?n.createElement(b,s(s({ref:t},d),{},{components:r})):n.createElement(b,s({ref:t},d))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:a,s[1]=c;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>c,default:()=>y,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const s={id:"transaction-error",title:"TransactionError",hide_table_of_contents:!1},c=void 0,l={unversionedId:"build/api/schema/objects/transaction-error",id:"build/api/schema/objects/transaction-error",title:"TransactionError",description:"[TransactionError] represents an error.",source:"@site/docs/build/api/schema/objects/transaction-error.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-error",permalink:"/build/api/schema/objects/transaction-error",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-error",title:"TransactionError",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionAttestation",permalink:"/build/api/schema/objects/transaction-attestation"},next:{title:"TransactionInput",permalink:"/build/api/schema/objects/transaction-input"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'TransactionError.addressAddress ',id:"code-style-fontweight-normal-transactionerrorbaddressbcodeaddress-",level:4},{value:'TransactionError.contextErrorContext ',id:"code-style-fontweight-normal-transactionerrorbcontextbcodeerrorcontext-",level:4},{value:'TransactionError.reasonString ',id:"code-style-fontweight-normal-transactionerrorbreasonbcodestring-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TransactionError]"," represents an error."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionError {\n address: Address\n context: ErrorContext\n reason: String\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionerrorbaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionError.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionerrorbcontextbcodeerrorcontext-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionError.",(0,o.kt)("b",null,"context"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/enums/error-context"},(0,o.kt)("inlineCode",{parentName:"a"},"ErrorContext"))," ",(0,o.kt)(m,{class:"secondary",text:"enum",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionerrorbreasonbcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionError.",(0,o.kt)("b",null,"reason"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/transaction-error"},(0,o.kt)("inlineCode",{parentName:"a"},"transactionError"))," ",(0,o.kt)(m,{class:"secondary",text:"subscription",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/244870c6.8215d8bf.js b/assets/js/244870c6.8215d8bf.js new file mode 100644 index 000000000..3518b4e42 --- /dev/null +++ b/assets/js/244870c6.8215d8bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6484],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),y=o,h=d["".concat(s,".").concat(y)]||d[y]||u[y]||r;return n?a.createElement(h,i(i({ref:t},p),{},{components:n})):a.createElement(h,i({ref:t},p))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=y;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var a=n(87462),o=(n(67294),n(3905));n(8209);const r={id:"deploy",title:"Smart Contracts Playground - Deploy",sidebar_label:"Deploy",sidebar_position:2},i=void 0,l={unversionedId:"build/smart-contracts/playground/deploy",id:"build/smart-contracts/playground/deploy",title:"Smart Contracts Playground - Deploy",description:"The communication via the archethic wallet has not been done yet. For this reason we disabled the deployment to the mainnet because it doesn't meet the security standard we expect.",source:"@site/docs/build/smart-contracts/playground/deploy.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/deploy",permalink:"/build/smart-contracts/playground/deploy",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:2,frontMatter:{id:"deploy",title:"Smart Contracts Playground - Deploy",sidebar_label:"Deploy",sidebar_position:2},sidebar:"docs",previous:{title:"Build",permalink:"/build/smart-contracts/playground/build"},next:{title:"Function calls",permalink:"/build/smart-contracts/playground/functions"}},s={},c=[],p={toc:c},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("admonition",{title:"Not mainnet-ready",type:"warning"},(0,o.kt)("p",{parentName:"admonition"},"The communication via the archethic wallet has not been done yet. For this reason we disabled the deployment to the mainnet because it doesn't meet the security standard we expect.")),(0,o.kt)("p",null,"Once the code is written and the triggers are tested, the next step is to deploy the Smart Contract. Please open the deploy panel by clicking on the deploy button:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"the deploy button",src:n(44396).Z,width:"90",height:"67"})),(0,o.kt)("p",null,"The deploy panel opens on the left hand side: "),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"the deploy panel",src:n(43801).Z,width:"3600",height:"2390"})),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},'Choose the network where you want to deploy the Smart Contract. This will always be "',(0,o.kt)("a",{parentName:"li",href:"https://testnet.archethic.net%22"},'https://testnet.archethic.net"')," for now."),(0,o.kt)("li",{parentName:"ol"},"You'll see that we automatically retrieve the ",(0,o.kt)("inlineCode",{parentName:"li"},"storage nonce public key")," that is used to give ownership of the contract to the authorized nodes (miners)."),(0,o.kt)("li",{parentName:"ol"},"Then specify a seed of a transaction chain that will host the contract. ")),(0,o.kt)("p",null,"While modifying the seed, you can see that the future contract's address is displayed. The contract's genesis address is also displayed. "),(0,o.kt)("admonition",{title:"Genesis address",type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The genesis address is the one you'll use in the ",(0,o.kt)("a",{parentName:"p",href:"https://testnet.archethic.net/faucet"},"faucet")," to transfer funds.")),(0,o.kt)("p",null,"Now you may click on ",(0,o.kt)("inlineCode",{parentName:"p"},"estimate fees")," and then ",(0,o.kt)("inlineCode",{parentName:"p"},"deploy"),". Hopefully you'll see a success message!\nYou may follow the link to view the transaction on the explorer."),(0,o.kt)("admonition",{title:"That's it!",type:"success"},(0,o.kt)("p",{parentName:"admonition"},"Congratulations on your contract's deployment.")))}u.isMDXComponent=!0},44396:(e,t,n)=>{n.d(t,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABDCAYAAAAccRJRAAAEQklEQVR4Xu2au09TURzHf0yUCaZeXFoXSxyISymLj8GKQ4VFYyKvBBAjIonPvwIVE1+JvBIeNTG6gB3EOgg6iCyGSVwsDFIW6UTroud3yS29t7ftKW1/5wZ+J2HhnnN+t5/zvd/feVV5jzf/Ay4VJ1DFoCvOWA/AoGk4M2gizgyaQVMRIIrDHs2giQgQhWFFM2giAkRhWNEMmogAURhWNIMmIkAUhhXNoLMJaJobutvb9QdT4TDE41tEmEoP40hFu6qrQXO7IbaxYfqFXR1X4KjXq//vVywG07OvTM+9Ho+AH4dkKlU6mTL34DjQCHnoxgC4alzwezMOM7NhHRxC7O7cVbNRpmbCEFtfB2zT2dEOR+o1SO4k4cnzF46D7TjQDb5jcPnSxTRMBLe5FU8r2So0VHa9W9MHxiiv37yFH2s/y6zJ0rpzHGg75Rb7E1+OTzjOvx0HGhPetb5eW7ab6L/JZPqZpmlQ49pTsvGAQdvgQ3/1CP9NCYDJvyloDYV0rzXKdmIbFhe/CCtYy/JdbNvg80Eg4Id6Ad0o6O3zkYjwbhdUizrrwsdVJ0ilis5MfLns4evyCixEowXd4/Spk3BG/NkVJyRIpaDz+fGnpc8QaPLr1iCb3E40NkJba8gWtjFDKThiFaqgFDT+pv6+HtNnj/97/yEKy99WhC3szkBQkaMTk7CdSBTEgINz/lzQVA+9fXR8smDbSlZQDhrt4+bgQDqpWaG0BIPQLDwYfXdMwJYpQ4PXoa62Tq+6I7z/6TP182rloBFG5orPziYM1cv6daaF2K0gZQar3HWUg7b69PDDkawZQl1tLVwVFiPr1/iV3L97O81KtT/jiygDjfPlluBZ04ovn/qK9Wur92PfC9GPyhYyykDfu3Mra7FR6DM3/Hq/nzUm1eGRx/ttXlK7QwUaE+ODR4cM9H6tA2GNialaoakeW4flA5RNhv29PfoOnczihZNhDpfLnN7NzUfg++qqqSZP70pKD7uNrfsd1oWJkQCLWd1lLlicsM+hdHpnjJHMElzWl7FPuyV4MavKMmjHtgtlsw58m0KbSs1+v7QvY3+8qZRDJtZ9DrtqssvufNukuKc9OjapdE9aqaINj/Z6PenpWtuFkGk37892AhaXlmBNnAFaN+9xoHxihy/Q1GQ6LEA/n3sX0ccNl++x2CHf+LdTcL6jLPTaVGrvKMu4emDth4+yJDINH85KQCpHFet1A5xx4KWYXOrF/RHrIa3MoqYc71pMH8o92vqymQkSvXZaXJKRuUDTJS7X4AGtExKf3QA4DrSRIFGleAsps/CVsGK+oRLqYqLsEle/sEyLq2J8ybEEmAe1qSOt4yDCZtBEo8qgGTQRAaIwrGgGTUSAKAwrmkETESAKw4pm0EQEiMKwohk0EQGiMKxoBk1EgCgMK5pBExEgCsOKZtBEBIjCsKIZNBEBojCsaCLQ/wEUs1lc4dJ83gAAAABJRU5ErkJggg=="},43801:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_panel_deploy-c50b458baed8c3bf36b5c1a17d2f9566.png"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/244870c6.b78457ec.js b/assets/js/244870c6.b78457ec.js deleted file mode 100644 index 239291452..000000000 --- a/assets/js/244870c6.b78457ec.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6484],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),y=o,h=d["".concat(s,".").concat(y)]||d[y]||u[y]||r;return n?a.createElement(h,i(i({ref:t},p),{},{components:n})):a.createElement(h,i({ref:t},p))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=y;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var a=n(87462),o=(n(67294),n(3905));n(8209);const r={id:"deploy",title:"Smart Contracts Playground - Deploy",sidebar_label:"Deploy",sidebar_position:2},i=void 0,l={unversionedId:"build/smart-contracts/playground/deploy",id:"build/smart-contracts/playground/deploy",title:"Smart Contracts Playground - Deploy",description:"The communication via the archethic wallet has not been done yet. For this reason we disabled the deployment to the mainnet because it doesn't meet the security standard we expect.",source:"@site/docs/build/smart-contracts/playground/deploy.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/deploy",permalink:"/build/smart-contracts/playground/deploy",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:2,frontMatter:{id:"deploy",title:"Smart Contracts Playground - Deploy",sidebar_label:"Deploy",sidebar_position:2},sidebar:"docs",previous:{title:"Build",permalink:"/build/smart-contracts/playground/build"},next:{title:"Function calls",permalink:"/build/smart-contracts/playground/functions"}},s={},c=[],p={toc:c},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("admonition",{title:"Not mainnet-ready",type:"warning"},(0,o.kt)("p",{parentName:"admonition"},"The communication via the archethic wallet has not been done yet. For this reason we disabled the deployment to the mainnet because it doesn't meet the security standard we expect.")),(0,o.kt)("p",null,"Once the code is written and the triggers are tested, the next step is to deploy the Smart Contract. Please open the deploy panel by clicking on the deploy button:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"the deploy button",src:n(44396).Z,width:"90",height:"67"})),(0,o.kt)("p",null,"The deploy panel opens on the left hand side: "),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"the deploy panel",src:n(43801).Z,width:"3600",height:"2390"})),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},'Choose the network where you want to deploy the Smart Contract. This will always be "',(0,o.kt)("a",{parentName:"li",href:"https://testnet.archethic.net%22"},'https://testnet.archethic.net"')," for now."),(0,o.kt)("li",{parentName:"ol"},"You'll see that we automatically retrieve the ",(0,o.kt)("inlineCode",{parentName:"li"},"storage nonce public key")," that is used to give ownership of the contract to the authorized nodes (miners)."),(0,o.kt)("li",{parentName:"ol"},"Then specify a seed of a transaction chain that will host the contract. ")),(0,o.kt)("p",null,"While modifying the seed, you can see that the future contract's address is displayed. The contract's genesis address is also displayed. "),(0,o.kt)("admonition",{title:"Genesis address",type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The genesis address is the one you'll use in the ",(0,o.kt)("a",{parentName:"p",href:"https://testnet.archethic.net/faucet"},"faucet")," to transfer funds.")),(0,o.kt)("p",null,"Now you may click on ",(0,o.kt)("inlineCode",{parentName:"p"},"estimate fees")," and then ",(0,o.kt)("inlineCode",{parentName:"p"},"deploy"),". Hopefully you'll see a success message!\nYou may follow the link to view the transaction on the explorer."),(0,o.kt)("admonition",{title:"That's it!",type:"success"},(0,o.kt)("p",{parentName:"admonition"},"Congratulations on your contract's deployment.")))}u.isMDXComponent=!0},44396:(e,t,n)=>{n.d(t,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABDCAYAAAAccRJRAAAEQklEQVR4Xu2au09TURzHf0yUCaZeXFoXSxyISymLj8GKQ4VFYyKvBBAjIonPvwIVE1+JvBIeNTG6gB3EOgg6iCyGSVwsDFIW6UTroud3yS29t7ftKW1/5wZ+J2HhnnN+t5/zvd/feVV5jzf/Ay4VJ1DFoCvOWA/AoGk4M2gizgyaQVMRIIrDHs2giQgQhWFFM2giAkRhWNEMmogAURhWNIMmIkAUhhXNoLMJaJobutvb9QdT4TDE41tEmEoP40hFu6qrQXO7IbaxYfqFXR1X4KjXq//vVywG07OvTM+9Ho+AH4dkKlU6mTL34DjQCHnoxgC4alzwezMOM7NhHRxC7O7cVbNRpmbCEFtfB2zT2dEOR+o1SO4k4cnzF46D7TjQDb5jcPnSxTRMBLe5FU8r2So0VHa9W9MHxiiv37yFH2s/y6zJ0rpzHGg75Rb7E1+OTzjOvx0HGhPetb5eW7ab6L/JZPqZpmlQ49pTsvGAQdvgQ3/1CP9NCYDJvyloDYV0rzXKdmIbFhe/CCtYy/JdbNvg80Eg4Id6Ad0o6O3zkYjwbhdUizrrwsdVJ0ilis5MfLns4evyCixEowXd4/Spk3BG/NkVJyRIpaDz+fGnpc8QaPLr1iCb3E40NkJba8gWtjFDKThiFaqgFDT+pv6+HtNnj/97/yEKy99WhC3szkBQkaMTk7CdSBTEgINz/lzQVA+9fXR8smDbSlZQDhrt4+bgQDqpWaG0BIPQLDwYfXdMwJYpQ4PXoa62Tq+6I7z/6TP182rloBFG5orPziYM1cv6daaF2K0gZQar3HWUg7b69PDDkawZQl1tLVwVFiPr1/iV3L97O81KtT/jiygDjfPlluBZ04ovn/qK9Wur92PfC9GPyhYyykDfu3Mra7FR6DM3/Hq/nzUm1eGRx/ttXlK7QwUaE+ODR4cM9H6tA2GNialaoakeW4flA5RNhv29PfoOnczihZNhDpfLnN7NzUfg++qqqSZP70pKD7uNrfsd1oWJkQCLWd1lLlicsM+hdHpnjJHMElzWl7FPuyV4MavKMmjHtgtlsw58m0KbSs1+v7QvY3+8qZRDJtZ9DrtqssvufNukuKc9OjapdE9aqaINj/Z6PenpWtuFkGk37892AhaXlmBNnAFaN+9xoHxihy/Q1GQ6LEA/n3sX0ccNl++x2CHf+LdTcL6jLPTaVGrvKMu4emDth4+yJDINH85KQCpHFet1A5xx4KWYXOrF/RHrIa3MoqYc71pMH8o92vqymQkSvXZaXJKRuUDTJS7X4AGtExKf3QA4DrSRIFGleAsps/CVsGK+oRLqYqLsEle/sEyLq2J8ybEEmAe1qSOt4yDCZtBEo8qgGTQRAaIwrGgGTUSAKAwrmkETESAKw4pm0EQEiMKwohk0EQGiMKxoBk1EgCgMK5pBExEgCsOKZtBEBIjCsKIZNBEBojCsaCLQ/wEUs1lc4dJ83gAAAABJRU5ErkJggg=="},43801:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_panel_deploy-c50b458baed8c3bf36b5c1a17d2f9566.png"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/24510ea8.4116ada8.js b/assets/js/24510ea8.679b995e.js similarity index 50% rename from assets/js/24510ea8.4116ada8.js rename to assets/js/24510ea8.679b995e.js index b15293364..eda11ad3c 100644 --- a/assets/js/24510ea8.4116ada8.js +++ b/assets/js/24510ea8.679b995e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1340],{3905:(e,t,r)=>{r.d(t,{Zo:()=>h,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},h=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,h=o(e,["components","mdxType","originalType","parentName"]),d=s(r),p=a,f=d["".concat(l,".").concat(p)]||d[p]||u[p]||i;return r?n.createElement(f,c(c({ref:t},h),{},{components:r})):n.createElement(f,c({ref:t},h))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,c=new Array(i);c[0]=p;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:a,c[1]=o;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));r(8209);const i={id:"service",title:"Oracle Chain Service",sidebar_label:"Service"},c=void 0,o={unversionedId:"build/core/oracle-chain/service",id:"build/core/oracle-chain/service",title:"Oracle Chain Service",description:"OracleChain provides a way to extend it and to add more services to the scheduler.",source:"@site/docs/build/core/oracle-chain/service.md",sourceDirName:"build/core/oracle-chain",slug:"/build/core/oracle-chain/service",permalink:"/build/core/oracle-chain/service",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"service",title:"Oracle Chain Service",sidebar_label:"Service"},sidebar:"docs",previous:{title:"Scheduler",permalink:"/build/core/oracle-chain/scheduler"},next:{title:"P2P",permalink:"/build/core/p2p/"}},l={},s=[{value:"Behavior",id:"behavior",level:2},{value:"Example",id:"example",level:3},{value:"Configuration",id:"configuration",level:2}],h={toc:s},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},h,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"OracleChain provides a way to extend it and to add more services to the scheduler."),(0,a.kt)("h2",{id:"behavior"},"Behavior"),(0,a.kt)("p",null,"The ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/oracle_chain/services/impl.ex"},"behavior")," defines functions to extend to support new services"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Fetch: This will perform the data fetching and will return a map of the data to be serialized by the transaction"),(0,a.kt)("li",{parentName:"ul"},"Verify: This will let validation nodes asserts the information provided in the new oracle transaction"),(0,a.kt)("li",{parentName:"ul"},"Parse data: This will parse the incoming data from the oracle transaction and checks its validatity")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/oracle_chain/services/uco_price.ex"},"UCO service behavior")," is implemented in such way:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Fetch: it request Coingecko to fetch the USD/EUR pair of the Archethic token"),(0,a.kt)("li",{parentName:"ul"},"Verify: fetch Coingecko again to gather the token price and compare price using a standard deviation function with a threshold of 0.01"),(0,a.kt)("li",{parentName:"ul"},"Parse data: Ensure the data is map with the USD/EUR pair and an amount encoded as float")),(0,a.kt)("h2",{id:"configuration"},"Configuration"),(0,a.kt)("p",null,"Along with the definition of the new service, we need to inform how to add this service to the ",(0,a.kt)("a",{parentName:"p",href:"/build/core/oracle-chain/scheduler"},"scheduler"),".\nFor this we need to add the service in the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/config/config.exs"},"configuration (config.exs)")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},"config :archethic, Archethic.OracleChain,\n services: [\n uco: Archethic.OracleChain.Services.UCOPrice,\n mynewservice: Archethic.OracleChain.Service.MyNewService # Added line\n ]\n")))}u.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1340],{3905:(e,t,r)=>{r.d(t,{Zo:()=>h,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},h=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,h=o(e,["components","mdxType","originalType","parentName"]),d=s(r),p=a,f=d["".concat(l,".").concat(p)]||d[p]||u[p]||i;return r?n.createElement(f,c(c({ref:t},h),{},{components:r})):n.createElement(f,c({ref:t},h))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,c=new Array(i);c[0]=p;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:a,c[1]=o;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));r(8209);const i={id:"service",title:"Oracle Chain Service",sidebar_label:"Service"},c=void 0,o={unversionedId:"build/core/oracle-chain/service",id:"build/core/oracle-chain/service",title:"Oracle Chain Service",description:"OracleChain provides a way to extend it and to add more services to the scheduler.",source:"@site/docs/build/core/oracle-chain/service.md",sourceDirName:"build/core/oracle-chain",slug:"/build/core/oracle-chain/service",permalink:"/build/core/oracle-chain/service",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"service",title:"Oracle Chain Service",sidebar_label:"Service"},sidebar:"docs",previous:{title:"Scheduler",permalink:"/build/core/oracle-chain/scheduler"},next:{title:"P2P",permalink:"/build/core/p2p/"}},l={},s=[{value:"Behavior",id:"behavior",level:2},{value:"Example",id:"example",level:3},{value:"Configuration",id:"configuration",level:2}],h={toc:s},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},h,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"OracleChain provides a way to extend it and to add more services to the scheduler."),(0,a.kt)("h2",{id:"behavior"},"Behavior"),(0,a.kt)("p",null,"The ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/oracle_chain/services/impl.ex"},"behavior")," defines functions to extend to support new services"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Fetch: This will perform the data fetching and will return a map of the data to be serialized by the transaction"),(0,a.kt)("li",{parentName:"ul"},"Verify: This will let validation nodes asserts the information provided in the new oracle transaction"),(0,a.kt)("li",{parentName:"ul"},"Parse data: This will parse the incoming data from the oracle transaction and checks its validatity")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/oracle_chain/services/uco_price.ex"},"UCO service behavior")," is implemented in such way:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Fetch: it request Coingecko to fetch the USD/EUR pair of the Archethic token"),(0,a.kt)("li",{parentName:"ul"},"Verify: fetch Coingecko again to gather the token price and compare price using a standard deviation function with a threshold of 0.01"),(0,a.kt)("li",{parentName:"ul"},"Parse data: Ensure the data is map with the USD/EUR pair and an amount encoded as float")),(0,a.kt)("h2",{id:"configuration"},"Configuration"),(0,a.kt)("p",null,"Along with the definition of the new service, we need to inform how to add this service to the ",(0,a.kt)("a",{parentName:"p",href:"/build/core/oracle-chain/scheduler"},"scheduler"),".\nFor this we need to add the service in the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/config/config.exs"},"configuration (config.exs)")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},"config :archethic, Archethic.OracleChain,\n services: [\n uco: Archethic.OracleChain.Services.UCOPrice,\n mynewservice: Archethic.OracleChain.Service.MyNewService # Added line\n ]\n")))}u.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/27ab3fd0.6c5d8282.js b/assets/js/27ab3fd0.91e0303c.js similarity index 60% rename from assets/js/27ab3fd0.6c5d8282.js rename to assets/js/27ab3fd0.91e0303c.js index 22d2973fe..a55af376c 100644 --- a/assets/js/27ab3fd0.6c5d8282.js +++ b/assets/js/27ab3fd0.91e0303c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3382],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),l=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return a.createElement(i.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(r),m=n,f=d["".concat(i,".").concat(m)]||d[m]||u[m]||o;return r?a.createElement(f,c(c({ref:t},p),{},{components:r})):a.createElement(f,c({ref:t},p))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:n,c[1]=s;for(var l=2;l{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var a=r(87462),n=r(67294),o=r(3905);r(8209);const c={id:"shared-secrets",title:"sharedSecrets",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/queries/shared-secrets",id:"build/api/schema/queries/shared-secrets",title:"sharedSecrets",description:"Query the network to get the storage nonce public key",source:"@site/docs/build/api/schema/queries/shared-secrets.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/shared-secrets",permalink:"/build/api/schema/queries/shared-secrets",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"shared-secrets",title:"sharedSecrets",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"oracleData",permalink:"/build/api/schema/queries/oracle-data"},next:{title:"token",permalink:"/build/api/schema/queries/token"}},l={},p=[{value:"Type",id:"type",level:3},{value:'SharedSecrets ',id:"sharedsecrets-",level:4}],d=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},y="wrapper";function h(e){let{components:t,...r}=e;return(0,o.kt)(y,(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to get the storage nonce public key"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"sharedSecrets: SharedSecrets\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"sharedsecrets-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/shared-secrets"},(0,o.kt)("inlineCode",{parentName:"a"},"SharedSecrets"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[SharedSecrets]"," represents the public shared secret information\nIt includes:"),(0,o.kt)("ul",{parentName:"blockquote"},(0,o.kt)("li",{parentName:"ul"},"The storage nonce public key: Public Key to encrypt data for the node, so they will be able to decrypt it (mostly for smart contract authorized key)"))))}h.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3382],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),l=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return a.createElement(i.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(r),m=n,f=d["".concat(i,".").concat(m)]||d[m]||u[m]||o;return r?a.createElement(f,c(c({ref:t},p),{},{components:r})):a.createElement(f,c({ref:t},p))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:n,c[1]=s;for(var l=2;l{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var a=r(87462),n=r(67294),o=r(3905);r(8209);const c={id:"shared-secrets",title:"sharedSecrets",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/queries/shared-secrets",id:"build/api/schema/queries/shared-secrets",title:"sharedSecrets",description:"Query the network to get the storage nonce public key",source:"@site/docs/build/api/schema/queries/shared-secrets.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/shared-secrets",permalink:"/build/api/schema/queries/shared-secrets",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"shared-secrets",title:"sharedSecrets",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"oracleData",permalink:"/build/api/schema/queries/oracle-data"},next:{title:"token",permalink:"/build/api/schema/queries/token"}},l={},p=[{value:"Type",id:"type",level:3},{value:'SharedSecrets ',id:"sharedsecrets-",level:4}],d=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},y="wrapper";function h(e){let{components:t,...r}=e;return(0,o.kt)(y,(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to get the storage nonce public key"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"sharedSecrets: SharedSecrets\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"sharedsecrets-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/shared-secrets"},(0,o.kt)("inlineCode",{parentName:"a"},"SharedSecrets"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[SharedSecrets]"," represents the public shared secret information\nIt includes:"),(0,o.kt)("ul",{parentName:"blockquote"},(0,o.kt)("li",{parentName:"ul"},"The storage nonce public key: Public Key to encrypt data for the node, so they will be able to decrypt it (mostly for smart contract authorized key)"))))}h.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/2ab0cde1.954cbabb.js b/assets/js/2ab0cde1.954cbabb.js deleted file mode 100644 index f5337e48c..000000000 --- a/assets/js/2ab0cde1.954cbabb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5400],{3905:(e,t,i)=>{i.d(t,{Zo:()=>u,kt:()=>f});var n=i(67294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),i=t;return e&&(i="function"==typeof e?e(t):r(r({},t),e)),i},u=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},h="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),h=s(i),d=a,f=h["".concat(l,".").concat(d)]||h[d]||p[d]||o;return i?n.createElement(f,r(r({ref:t},u),{},{components:i})):n.createElement(f,r({ref:t},u))}));function f(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=i.length,r=new Array(o);r[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[h]="string"==typeof e?e:a,r[1]=c;for(var s=2;s{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var n=i(87462),a=(i(67294),i(3905));i(8209);const o={id:"aeweb-front",title:"AEWeb - Application Front End",sidebar_label:"AEWeb Front End",sidebar_position:4},r="AEWeb Front end",c={unversionedId:"participate/aeweb/usage/aeweb-front",id:"participate/aeweb/usage/aeweb-front",title:"AEWeb - Application Front End",description:"Access//aeweb.archethic.net",source:"@site/docs/participate/aeweb/usage/aeweb-front.md",sourceDirName:"participate/aeweb/usage",slug:"/participate/aeweb/usage/aeweb-front",permalink:"/participate/aeweb/usage/aeweb-front",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:4,frontMatter:{id:"aeweb-front",title:"AEWeb - Application Front End",sidebar_label:"AEWeb Front End",sidebar_position:4},sidebar:"docs",previous:{title:"CLI",permalink:"/participate/aeweb/usage/cli"},next:{title:"Automate deployments",permalink:"/participate/aeweb/automation"}},l={},s=[{value:"Tutorials",id:"tutorials",level:2},{value:"Deploy for the first time my static site",id:"deploy-for-the-first-time-my-static-site",level:3},{value:"Update my static site",id:"update-my-static-site",level:3},{value:"Update the SSL certificate",id:"update-the-ssl-certificate",level:3},{value:"Unpublish my static site",id:"unpublish-my-static-site",level:3},{value:"See my static site's informations",id:"see-my-static-sites-informations",level:3},{value:"Disconnect AEWeb",id:"disconnect-aeweb",level:3},{value:"Roadmap",id:"roadmap",level:2}],u={toc:s},h="wrapper";function p(e){let{components:t,...i}=e;return(0,a.kt)(h,(0,n.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"aeweb-front-end"},"AEWeb Front end"),(0,a.kt)("p",null,"Access: ",(0,a.kt)("a",{parentName:"p",href:"https://aeweb.archethic.net"},"https://aeweb.archethic.net"),(0,a.kt)("br",null),"\nSource code: ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb"},"https://github.com/archethic-foundation/aeweb")),(0,a.kt)("p",null,"This web application, built with Flutter, can be used to deploy and manage static sites to the Archethic Blockchain."),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Before reading the following tutorials, understand ",(0,a.kt)("a",{href:"/participate/aeweb/how-it-works",target:"_blank"},"how AEWeb works"),". ")),(0,a.kt)("h2",{id:"tutorials"},"Tutorials"),(0,a.kt)("h3",{id:"deploy-for-the-first-time-my-static-site"},"Deploy for the first time my static site"),(0,a.kt)("p",null,'When you want to deploy a new static website on the Archethic blockchain, simply click on "New static site" in the main menu or the "+" icon in the section reserved for the list of your already deployed sites.'),(0,a.kt)("p",null,"A form will then appear, providing you with the necessary information for deploying your site:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"The name of the website. This name will be used to declare the site in your ",(0,a.kt)("a",{href:"/learn/decentralized-id/keychain",target:"_blank"},"decentralized keychain"),". (mandatory)"),(0,a.kt)("li",{parentName:"ul"},"The archive file (with .zip, .7z, or .rar extension) containing the content of your website. (mandatory)"),(0,a.kt)("li",{parentName:"ul"},"You can specify whether you want to include or exclude files listed in a ",(0,a.kt)("a",{href:"/FAQ/aeweb#what-is-the-purpose-of-a-gitignore-file",target:"_blank"},".gitignore file"),". (optional)"),(0,a.kt)("li",{parentName:"ul"},"The ",(0,a.kt)("a",{href:"/participate/aeweb/dns#1-get-the-certificate",target:"_blank"},"public certificate")," for your domain and the private key associated with the certificate. (optional)")),(0,a.kt)("p",null,"Once the required information is provided and the publication rules are accepted, you can initiate the deployment of your site."),(0,a.kt)("p",null,"AEWeb will then prompt you, via your Archethic wallet, to:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Confirm the creation of the site in your keychain."),(0,a.kt)("li",{parentName:"ul"},"Sign the transaction(s) that contain the content of your site."),(0,a.kt)("li",{parentName:"ul"},"Sign the reference transaction of your site in the blockchain."),(0,a.kt)("li",{parentName:"ul"},"Then sign the transaction that allows transferring funds from your current account to the transaction chains that enable your site to function.")),(0,a.kt)("p",null,"The associated fees for the creation will be provided, and once accepted, your site will be permanently published on the blockchain."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"In the beta version currently being deployed, a limit of 3 MB for a site has been set.")),(0,a.kt)("br",null),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Create static site.mp4"})),(0,a.kt)("h3",{id:"update-my-static-site"},"Update my static site"),(0,a.kt)("p",null,'You can update your site by comparing the latest version hosted on the blockchain with a new archive containing your modifications.\nTo do this, go to the context menu of the currently deployed version (the first row in the site versions table) and click on "Sync from local folder".'),(0,a.kt)("p",null,"After selecting the archive, the application will present you with information about the differences between the blockchain data and your archive. If you are satisfied with the information and agree to the publication rules, you can proceed with the update."),(0,a.kt)("p",null,"The application will then prompt you to:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Sign, using your Archethic Wallet, the transaction(s) that contain the content of your new site version."),(0,a.kt)("li",{parentName:"ul"},"Sign the transaction to update the reference transaction of your site in the blockchain."),(0,a.kt)("li",{parentName:"ul"},"Then sign the transaction that allows transferring funds from your current account to the transaction chains that power your site.")),(0,a.kt)("p",null,"The associated fees for the update will be provided, and once accepted, a new version of your site will be published on the blockchain."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Update static site.mp4"})),(0,a.kt)("h3",{id:"update-the-ssl-certificate"},"Update the SSL certificate"),(0,a.kt)("p",null,'You can add and update the SSL certificate associated with your site.\nTo do this, go to the context menu of the currently deployed version (the first row in the site versions table) and click on "Update the certificate".'),(0,a.kt)("p",null,"After selecting the public certificate for your domain and the private key associated with the certificate, the application will prompt you to:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Sign, using your Archethic Wallet, the transaction that will update the reference transaction of your site in the blockchain to include the certificate."),(0,a.kt)("li",{parentName:"ul"},"Then sign the transaction that allows transferring funds from your current account to the transaction chain of your site to update the reference transaction.")),(0,a.kt)("p",null,"The associated fees for the update will be provided, and once accepted, the certificate will be published in the content of the reference transaction, and the private key will be stored in a transaction secret."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Update certificate.mp4"})),(0,a.kt)("h3",{id:"unpublish-my-static-site"},"Unpublish my static site"),(0,a.kt)("p",null,'You can unpublish your static site to make it no longer accessible.\nTo do this, go to the context menu of the currently deployed version (the first row in the site versions table) and click on "Unpublish static site".'),(0,a.kt)("p",null,"After confirming your intention to unpublish your site, the application will prompt you to:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Sign, using your Archethic Wallet, the transaction that will update the reference transaction of your site in the blockchain to declare the unpublishing."),(0,a.kt)("li",{parentName:"ul"},"Then sign the transaction that allows transferring funds from your current account to the transaction chain of your site to update the reference transaction.")),(0,a.kt)("p",null,"The associated fees for unpublishing will be provided, and once accepted, the site will be unpublished."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Unpublished site.mp4"})),(0,a.kt)("h3",{id:"see-my-static-sites-informations"},"See my static site's informations"),(0,a.kt)("p",null,"For each online version and for each previous version of your website, you can access the following information by clicking on the three dots at the end of each line:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"The file structure of your website that has been deployed on the blockchain."),(0,a.kt)("li",{parentName:"ul"},"The transactions containing the content of your files.")),(0,a.kt)("p",null,"Regarding the SSL certificate content, you can view it by clicking on the shield icon if you have deployed one. If the icon is red, it means that no certificate is available."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Infos site.mp4"})),(0,a.kt)("h3",{id:"disconnect-aeweb"},"Disconnect AEWeb"),(0,a.kt)("p",null,"When you want to disconnect the AEWeb application from your Archethic Wallet, simply click on the red disconnect button in the section describing the connected account and environment, and then confirm to return to the home screen."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Disconnect.mp4"})),(0,a.kt)("h2",{id:"roadmap"},"Roadmap"),(0,a.kt)("ul",{className:"contains-task-list"},(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","Add session management to the wallet to avoid entering the user's authentication for each transaction signature."),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","Enable direct management of the site's content from AEWeb instead of uploading an archive with all the contents.")))}p.isMDXComponent=!0},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/2ab0cde1.d4392b3f.js b/assets/js/2ab0cde1.d4392b3f.js new file mode 100644 index 000000000..63759395a --- /dev/null +++ b/assets/js/2ab0cde1.d4392b3f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5400],{3905:(e,t,i)=>{i.d(t,{Zo:()=>u,kt:()=>f});var n=i(67294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),i=t;return e&&(i="function"==typeof e?e(t):r(r({},t),e)),i},u=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},h="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),h=s(i),d=a,f=h["".concat(l,".").concat(d)]||h[d]||p[d]||o;return i?n.createElement(f,r(r({ref:t},u),{},{components:i})):n.createElement(f,r({ref:t},u))}));function f(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=i.length,r=new Array(o);r[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[h]="string"==typeof e?e:a,r[1]=c;for(var s=2;s{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var n=i(87462),a=(i(67294),i(3905));i(8209);const o={id:"aeweb-front",title:"AEWeb - Application Front End",sidebar_label:"AEWeb Front End",sidebar_position:4},r="AEWeb Front end",c={unversionedId:"participate/aeweb/usage/aeweb-front",id:"participate/aeweb/usage/aeweb-front",title:"AEWeb - Application Front End",description:"Access//aeweb.archethic.net",source:"@site/docs/participate/aeweb/usage/aeweb-front.md",sourceDirName:"participate/aeweb/usage",slug:"/participate/aeweb/usage/aeweb-front",permalink:"/participate/aeweb/usage/aeweb-front",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:4,frontMatter:{id:"aeweb-front",title:"AEWeb - Application Front End",sidebar_label:"AEWeb Front End",sidebar_position:4},sidebar:"docs",previous:{title:"CLI",permalink:"/participate/aeweb/usage/cli"},next:{title:"Automate deployments",permalink:"/participate/aeweb/automation"}},l={},s=[{value:"Tutorials",id:"tutorials",level:2},{value:"Deploy for the first time my static site",id:"deploy-for-the-first-time-my-static-site",level:3},{value:"Update my static site",id:"update-my-static-site",level:3},{value:"Update the SSL certificate",id:"update-the-ssl-certificate",level:3},{value:"Unpublish my static site",id:"unpublish-my-static-site",level:3},{value:"See my static site's informations",id:"see-my-static-sites-informations",level:3},{value:"Disconnect AEWeb",id:"disconnect-aeweb",level:3},{value:"Roadmap",id:"roadmap",level:2}],u={toc:s},h="wrapper";function p(e){let{components:t,...i}=e;return(0,a.kt)(h,(0,n.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"aeweb-front-end"},"AEWeb Front end"),(0,a.kt)("p",null,"Access: ",(0,a.kt)("a",{parentName:"p",href:"https://aeweb.archethic.net"},"https://aeweb.archethic.net"),(0,a.kt)("br",null),"\nSource code: ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb"},"https://github.com/archethic-foundation/aeweb")),(0,a.kt)("p",null,"This web application, built with Flutter, can be used to deploy and manage static sites to the Archethic Blockchain."),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Before reading the following tutorials, understand ",(0,a.kt)("a",{href:"/participate/aeweb/how-it-works",target:"_blank"},"how AEWeb works"),". ")),(0,a.kt)("h2",{id:"tutorials"},"Tutorials"),(0,a.kt)("h3",{id:"deploy-for-the-first-time-my-static-site"},"Deploy for the first time my static site"),(0,a.kt)("p",null,'When you want to deploy a new static website on the Archethic blockchain, simply click on "New static site" in the main menu or the "+" icon in the section reserved for the list of your already deployed sites.'),(0,a.kt)("p",null,"A form will then appear, providing you with the necessary information for deploying your site:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"The name of the website. This name will be used to declare the site in your ",(0,a.kt)("a",{href:"/learn/decentralized-id/keychain",target:"_blank"},"decentralized keychain"),". (mandatory)"),(0,a.kt)("li",{parentName:"ul"},"The archive file (with .zip, .7z, or .rar extension) containing the content of your website. (mandatory)"),(0,a.kt)("li",{parentName:"ul"},"You can specify whether you want to include or exclude files listed in a ",(0,a.kt)("a",{href:"/FAQ/aeweb#what-is-the-purpose-of-a-gitignore-file",target:"_blank"},".gitignore file"),". (optional)"),(0,a.kt)("li",{parentName:"ul"},"The ",(0,a.kt)("a",{href:"/participate/aeweb/dns#1-get-the-certificate",target:"_blank"},"public certificate")," for your domain and the private key associated with the certificate. (optional)")),(0,a.kt)("p",null,"Once the required information is provided and the publication rules are accepted, you can initiate the deployment of your site."),(0,a.kt)("p",null,"AEWeb will then prompt you, via your Archethic wallet, to:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Confirm the creation of the site in your keychain."),(0,a.kt)("li",{parentName:"ul"},"Sign the transaction(s) that contain the content of your site."),(0,a.kt)("li",{parentName:"ul"},"Sign the reference transaction of your site in the blockchain."),(0,a.kt)("li",{parentName:"ul"},"Then sign the transaction that allows transferring funds from your current account to the transaction chains that enable your site to function.")),(0,a.kt)("p",null,"The associated fees for the creation will be provided, and once accepted, your site will be permanently published on the blockchain."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"In the beta version currently being deployed, a limit of 3 MB for a site has been set.")),(0,a.kt)("br",null),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Create static site.mp4"})),(0,a.kt)("h3",{id:"update-my-static-site"},"Update my static site"),(0,a.kt)("p",null,'You can update your site by comparing the latest version hosted on the blockchain with a new archive containing your modifications.\nTo do this, go to the context menu of the currently deployed version (the first row in the site versions table) and click on "Sync from local folder".'),(0,a.kt)("p",null,"After selecting the archive, the application will present you with information about the differences between the blockchain data and your archive. If you are satisfied with the information and agree to the publication rules, you can proceed with the update."),(0,a.kt)("p",null,"The application will then prompt you to:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Sign, using your Archethic Wallet, the transaction(s) that contain the content of your new site version."),(0,a.kt)("li",{parentName:"ul"},"Sign the transaction to update the reference transaction of your site in the blockchain."),(0,a.kt)("li",{parentName:"ul"},"Then sign the transaction that allows transferring funds from your current account to the transaction chains that power your site.")),(0,a.kt)("p",null,"The associated fees for the update will be provided, and once accepted, a new version of your site will be published on the blockchain."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Update static site.mp4"})),(0,a.kt)("h3",{id:"update-the-ssl-certificate"},"Update the SSL certificate"),(0,a.kt)("p",null,'You can add and update the SSL certificate associated with your site.\nTo do this, go to the context menu of the currently deployed version (the first row in the site versions table) and click on "Update the certificate".'),(0,a.kt)("p",null,"After selecting the public certificate for your domain and the private key associated with the certificate, the application will prompt you to:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Sign, using your Archethic Wallet, the transaction that will update the reference transaction of your site in the blockchain to include the certificate."),(0,a.kt)("li",{parentName:"ul"},"Then sign the transaction that allows transferring funds from your current account to the transaction chain of your site to update the reference transaction.")),(0,a.kt)("p",null,"The associated fees for the update will be provided, and once accepted, the certificate will be published in the content of the reference transaction, and the private key will be stored in a transaction secret."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Update certificate.mp4"})),(0,a.kt)("h3",{id:"unpublish-my-static-site"},"Unpublish my static site"),(0,a.kt)("p",null,'You can unpublish your static site to make it no longer accessible.\nTo do this, go to the context menu of the currently deployed version (the first row in the site versions table) and click on "Unpublish static site".'),(0,a.kt)("p",null,"After confirming your intention to unpublish your site, the application will prompt you to:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Sign, using your Archethic Wallet, the transaction that will update the reference transaction of your site in the blockchain to declare the unpublishing."),(0,a.kt)("li",{parentName:"ul"},"Then sign the transaction that allows transferring funds from your current account to the transaction chain of your site to update the reference transaction.")),(0,a.kt)("p",null,"The associated fees for unpublishing will be provided, and once accepted, the site will be unpublished."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Unpublished site.mp4"})),(0,a.kt)("h3",{id:"see-my-static-sites-informations"},"See my static site's informations"),(0,a.kt)("p",null,"For each online version and for each previous version of your website, you can access the following information by clicking on the three dots at the end of each line:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"The file structure of your website that has been deployed on the blockchain."),(0,a.kt)("li",{parentName:"ul"},"The transactions containing the content of your files.")),(0,a.kt)("p",null,"Regarding the SSL certificate content, you can view it by clicking on the shield icon if you have deployed one. If the icon is red, it means that no certificate is available."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Infos site.mp4"})),(0,a.kt)("h3",{id:"disconnect-aeweb"},"Disconnect AEWeb"),(0,a.kt)("p",null,"When you want to disconnect the AEWeb application from your Archethic Wallet, simply click on the red disconnect button in the section describing the connected account and environment, and then confirm to return to the home screen."),(0,a.kt)("video",{controls:!0,width:"90%"},(0,a.kt)("source",{src:"/video/AEWeb-howto-Disconnect.mp4"})),(0,a.kt)("h2",{id:"roadmap"},"Roadmap"),(0,a.kt)("ul",{className:"contains-task-list"},(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","Add session management to the wallet to avoid entering the user's authentication for each transaction signature."),(0,a.kt)("li",{parentName:"ul",className:"task-list-item"},(0,a.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","Enable direct management of the site's content from AEWeb instead of uploading an archive with all the contents.")))}p.isMDXComponent=!0},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/2bbc5cd2.f69c7d97.js b/assets/js/2bbc5cd2.a4671a34.js similarity index 75% rename from assets/js/2bbc5cd2.f69c7d97.js rename to assets/js/2bbc5cd2.a4671a34.js index c2aaa98f6..f82b332d0 100644 --- a/assets/js/2bbc5cd2.f69c7d97.js +++ b/assets/js/2bbc5cd2.a4671a34.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1710],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),s=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=s(r),m=n,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||o;return r?a.createElement(f,c(c({ref:t},p),{},{components:r})):a.createElement(f,c({ref:t},p))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:n,c[1]=i;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var a=r(87462),n=(r(67294),r(3905));r(8209);const o={id:"smart-contracts",title:"Smart Contracts (Legacy)",sidebar_label:"Legacy",sidebar_position:999},c=void 0,i={unversionedId:"build/smart-contracts/language/legacy/smart-contracts",id:"build/smart-contracts/language/legacy/smart-contracts",title:"Smart Contracts (Legacy)",description:"This specification is deprecated and will be still be valid for SC before 1.1.0. The new version is available here",source:"@site/docs/build/smart-contracts/language/legacy/README.md",sourceDirName:"build/smart-contracts/language/legacy",slug:"/build/smart-contracts/language/legacy/",permalink:"/build/smart-contracts/language/legacy/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:999,frontMatter:{id:"smart-contracts",title:"Smart Contracts (Legacy)",sidebar_label:"Legacy",sidebar_position:999},sidebar:"docs",previous:{title:"Examples",permalink:"/build/smart-contracts/language/examples"},next:{title:"Examples",permalink:"/build/smart-contracts/language/legacy/examples"}},l={},s=[],p={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("admonition",{title:"Disclaimer",type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"This specification is deprecated and will be still be valid for SC before ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/releases/tag/v1.1.0"},"1.1.0"),". The new version is available ",(0,n.kt)("a",{parentName:"p",href:"/build/smart-contracts/language"},"here"))))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1710],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),s=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=s(r),m=n,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||o;return r?a.createElement(f,c(c({ref:t},p),{},{components:r})):a.createElement(f,c({ref:t},p))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:n,c[1]=i;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var a=r(87462),n=(r(67294),r(3905));r(8209);const o={id:"smart-contracts",title:"Smart Contracts (Legacy)",sidebar_label:"Legacy",sidebar_position:999},c=void 0,i={unversionedId:"build/smart-contracts/language/legacy/smart-contracts",id:"build/smart-contracts/language/legacy/smart-contracts",title:"Smart Contracts (Legacy)",description:"This specification is deprecated and will be still be valid for SC before 1.1.0. The new version is available here",source:"@site/docs/build/smart-contracts/language/legacy/README.md",sourceDirName:"build/smart-contracts/language/legacy",slug:"/build/smart-contracts/language/legacy/",permalink:"/build/smart-contracts/language/legacy/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:999,frontMatter:{id:"smart-contracts",title:"Smart Contracts (Legacy)",sidebar_label:"Legacy",sidebar_position:999},sidebar:"docs",previous:{title:"Examples",permalink:"/build/smart-contracts/language/examples"},next:{title:"Examples",permalink:"/build/smart-contracts/language/legacy/examples"}},l={},s=[],p={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("admonition",{title:"Disclaimer",type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"This specification is deprecated and will be still be valid for SC before ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/releases/tag/v1.1.0"},"1.1.0"),". The new version is available ",(0,n.kt)("a",{parentName:"p",href:"/build/smart-contracts/language"},"here"))))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/2bc40b18.c2215238.js b/assets/js/2bc40b18.c2215238.js deleted file mode 100644 index 1a8683c97..000000000 --- a/assets/js/2bc40b18.c2215238.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6631],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=a.createContext({}),s=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,c=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=s(n),u=o,f=p["".concat(c,".").concat(u)]||p[u]||h[u]||r;return n?a.createElement(f,i(i({ref:t},d),{},{components:n})):a.createElement(f,i({ref:t},d))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=u;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:o,i[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>s});var a=n(87462),o=(n(67294),n(3905));n(8209);const r={id:"governance",title:"Governance"},i=void 0,l={unversionedId:"learn/governance/governance",id:"learn/governance/governance",title:"Governance",description:"A DAO (Decentralized Autonomous Organization) is a decentralized organization whose governance rules are automated,",source:"@site/docs/learn/governance/governance.md",sourceDirName:"learn/governance",slug:"/learn/governance/",permalink:"/learn/governance/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"governance",title:"Governance"},sidebar:"docs",previous:{title:"Keychain",permalink:"/learn/decentralized-id/keychain"},next:{title:"OracleChain",permalink:"/learn/oracle-chain"}},c={},s=[{value:"Decentralized Identity & Proof of Identity",id:"decentralized-identity--proof-of-identity",level:2},{value:"Code \xabOn-Chain\xbb",id:"code-on-chain",level:2},{value:"Introduction",id:"introduction",level:3},{value:"Details",id:"details",level:3},{value:"Incentives",id:"incentives",level:2}],d={toc:s},p="wrapper";function h(e){let{components:t,...n}=e;return(0,o.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"A DAO (Decentralized Autonomous Organization) is a decentralized organization whose governance rules are automated,\nimmutable, and transparently embedded in a blockchain."),(0,o.kt)("p",null,"It's one of the biggest challenge in the Blockchain's industry. Often relayed as \"code is law\", those governance model is\nonly applied to a single actor which the miner's owner."),(0,o.kt)("p",null,"While those model are decentralized, they are ignoring huge part of the ecosystem being the users themselves, the\napplication providers, the technical contributors, and even the Blockchain itself constrained by the code installed on the\nhighest computing power."),(0,o.kt)("p",null,"The governance of the Archethic Blockchain is based on several technical and functional fundamentals:"),(0,o.kt)("h2",{id:"decentralized-identity--proof-of-identity"},"Decentralized Identity & Proof of Identity"),(0,o.kt)("p",null,"An essential prerequisite for a human-inclusive governance:\nthe ability of the ecosystem to uniquely identify a person and\nto integrate that person into a relevant group of actors"),(0,o.kt)("h2",{id:"code-on-chain"},"Code \xabOn-Chain\xbb"),(0,o.kt)("h3",{id:"introduction"},"Introduction"),(0,o.kt)("p",null,'The code used by the nodes is hosted by the Blockchain itself, so the network is certain that all the nodes will\nimmediately apply the decided updates (via Elixir hot-reload modules and from the information stored in the "transaction content" area). '),(0,o.kt)("p",null,"The Archethic Blockchain is also equipped with the ability to test the impact of a new feature in real-time."),(0,o.kt)("p",null,"Each update is stored in the form of a specific transaction chain allowing the network to version (git...) all updates, but also to force each update according to a specific governance (voting quorum, veto right...)."),(0,o.kt)("h3",{id:"details"},"Details"),(0,o.kt)("p",null,"Archethic Blockchain is using code proposals to have a way to upgrade current blockchain code in a automated and tested way. "),(0,o.kt)("p",null,"The idea behind the governance on Archethic blockchain is to be able to audit, test and apply code proposals in a automatic, indepedent and secure way across the deployed network."),(0,o.kt)("mermaid",{value:"flowchart LR\n Dev[Developer] --\x3e|Create proposal| CodeProposal(Transaction)\n CodeProposal --\x3e SemanticValidation(Semantic Validation)\n SemanticValidation --\x3e CI(Continuous Integration)\n CI --\x3e CD(Continuous Deployment)\n CD --\x3e Up(Upgrade)\n Up --\x3e Reward(Reward)\n Reward --\x3e Dev"}),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"The process begins when a contributor creates a code proposal within a transaction. This code proposal will be checked to ensure that it follows the proper form (contains the correct fields for example)."),(0,o.kt)("li",{parentName:"ol"},"After the code proposal is verified, we start going over the details of the proposal and verifying that it contains correct version, valid upgrade terms and valid changes for example."),(0,o.kt)("li",{parentName:"ol"},"When the code proposal is considered valid, and after gathering enough approvals from members of the technical council, we start the Continuous Integration phase.\nThe role of this part is to check that the proposal passes the tests, security checks and code style."),(0,o.kt)("li",{parentName:"ol"},"If the phase returns a success then we start the Continuous Deployment phase.\nThe aim of this part is to test the proposal in a real world settings by deploying it into a testnet with various nodes performing multiple distinct functions."),(0,o.kt)("li",{parentName:"ol"},"After the last phase succeeded, we launch the next phase which consists of upgrading the actual nodes to the new versions and finally rewarding all the actors that participated in the global process.")),(0,o.kt)("h2",{id:"incentives"},"Incentives"),(0,o.kt)("p",null,"Financing of the work associated with updates, new features, and contributions is an essential element.\nThe network has a reserve of one-third of the tokens (with progressive distribution constraints) for this purpose."))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/2bc40b18.cdc901e6.js b/assets/js/2bc40b18.cdc901e6.js new file mode 100644 index 000000000..c7c44a318 --- /dev/null +++ b/assets/js/2bc40b18.cdc901e6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6631],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=a.createContext({}),s=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,c=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=s(n),u=o,f=p["".concat(c,".").concat(u)]||p[u]||h[u]||r;return n?a.createElement(f,i(i({ref:t},d),{},{components:n})):a.createElement(f,i({ref:t},d))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=u;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:o,i[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>s});var a=n(87462),o=(n(67294),n(3905));n(8209);const r={id:"governance",title:"Governance"},i=void 0,l={unversionedId:"learn/governance/governance",id:"learn/governance/governance",title:"Governance",description:"A DAO (Decentralized Autonomous Organization) is a decentralized organization whose governance rules are automated,",source:"@site/docs/learn/governance/governance.md",sourceDirName:"learn/governance",slug:"/learn/governance/",permalink:"/learn/governance/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"governance",title:"Governance"},sidebar:"docs",previous:{title:"Keychain",permalink:"/learn/decentralized-id/keychain"},next:{title:"OracleChain",permalink:"/learn/oracle-chain"}},c={},s=[{value:"Decentralized Identity & Proof of Identity",id:"decentralized-identity--proof-of-identity",level:2},{value:"Code \xabOn-Chain\xbb",id:"code-on-chain",level:2},{value:"Introduction",id:"introduction",level:3},{value:"Details",id:"details",level:3},{value:"Incentives",id:"incentives",level:2}],d={toc:s},p="wrapper";function h(e){let{components:t,...n}=e;return(0,o.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"A DAO (Decentralized Autonomous Organization) is a decentralized organization whose governance rules are automated,\nimmutable, and transparently embedded in a blockchain."),(0,o.kt)("p",null,"It's one of the biggest challenge in the Blockchain's industry. Often relayed as \"code is law\", those governance model is\nonly applied to a single actor which the miner's owner."),(0,o.kt)("p",null,"While those model are decentralized, they are ignoring huge part of the ecosystem being the users themselves, the\napplication providers, the technical contributors, and even the Blockchain itself constrained by the code installed on the\nhighest computing power."),(0,o.kt)("p",null,"The governance of the Archethic Blockchain is based on several technical and functional fundamentals:"),(0,o.kt)("h2",{id:"decentralized-identity--proof-of-identity"},"Decentralized Identity & Proof of Identity"),(0,o.kt)("p",null,"An essential prerequisite for a human-inclusive governance:\nthe ability of the ecosystem to uniquely identify a person and\nto integrate that person into a relevant group of actors"),(0,o.kt)("h2",{id:"code-on-chain"},"Code \xabOn-Chain\xbb"),(0,o.kt)("h3",{id:"introduction"},"Introduction"),(0,o.kt)("p",null,'The code used by the nodes is hosted by the Blockchain itself, so the network is certain that all the nodes will\nimmediately apply the decided updates (via Elixir hot-reload modules and from the information stored in the "transaction content" area). '),(0,o.kt)("p",null,"The Archethic Blockchain is also equipped with the ability to test the impact of a new feature in real-time."),(0,o.kt)("p",null,"Each update is stored in the form of a specific transaction chain allowing the network to version (git...) all updates, but also to force each update according to a specific governance (voting quorum, veto right...)."),(0,o.kt)("h3",{id:"details"},"Details"),(0,o.kt)("p",null,"Archethic Blockchain is using code proposals to have a way to upgrade current blockchain code in a automated and tested way. "),(0,o.kt)("p",null,"The idea behind the governance on Archethic blockchain is to be able to audit, test and apply code proposals in a automatic, indepedent and secure way across the deployed network."),(0,o.kt)("mermaid",{value:"flowchart LR\n Dev[Developer] --\x3e|Create proposal| CodeProposal(Transaction)\n CodeProposal --\x3e SemanticValidation(Semantic Validation)\n SemanticValidation --\x3e CI(Continuous Integration)\n CI --\x3e CD(Continuous Deployment)\n CD --\x3e Up(Upgrade)\n Up --\x3e Reward(Reward)\n Reward --\x3e Dev"}),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"The process begins when a contributor creates a code proposal within a transaction. This code proposal will be checked to ensure that it follows the proper form (contains the correct fields for example)."),(0,o.kt)("li",{parentName:"ol"},"After the code proposal is verified, we start going over the details of the proposal and verifying that it contains correct version, valid upgrade terms and valid changes for example."),(0,o.kt)("li",{parentName:"ol"},"When the code proposal is considered valid, and after gathering enough approvals from members of the technical council, we start the Continuous Integration phase.\nThe role of this part is to check that the proposal passes the tests, security checks and code style."),(0,o.kt)("li",{parentName:"ol"},"If the phase returns a success then we start the Continuous Deployment phase.\nThe aim of this part is to test the proposal in a real world settings by deploying it into a testnet with various nodes performing multiple distinct functions."),(0,o.kt)("li",{parentName:"ol"},"After the last phase succeeded, we launch the next phase which consists of upgrading the actual nodes to the new versions and finally rewarding all the actors that participated in the global process.")),(0,o.kt)("h2",{id:"incentives"},"Incentives"),(0,o.kt)("p",null,"Financing of the work associated with updates, new features, and contributions is an essential element.\nThe network has a reserve of one-third of the tokens (with progressive distribution constraints) for this purpose."))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/2c3d8110.0a5961a3.js b/assets/js/2c3d8110.0a5961a3.js deleted file mode 100644 index a4a3e0d80..000000000 --- a/assets/js/2c3d8110.0a5961a3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4732],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),d=c(n),p=r,h=d["".concat(l,".").concat(p)]||d[p]||u[p]||i;return n?a.createElement(h,o(o({ref:t},m),{},{components:n})):a.createElement(h,o({ref:t},m))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"scheduler",title:"OracleChain Scheduler",sidebar_label:"Scheduler"},o=void 0,s={unversionedId:"build/core/oracle-chain/scheduler",id:"build/core/oracle-chain/scheduler",title:"OracleChain Scheduler",description:"The OracleChain module contains a process in charge of scheduling the data fetching and transaction submitting.",source:"@site/docs/build/core/oracle-chain/scheduler.md",sourceDirName:"build/core/oracle-chain",slug:"/build/core/oracle-chain/scheduler",permalink:"/build/core/oracle-chain/scheduler",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"scheduler",title:"OracleChain Scheduler",sidebar_label:"Scheduler"},sidebar:"docs",previous:{title:"Memory database",permalink:"/build/core/oracle-chain/memory-table"},next:{title:"Service",permalink:"/build/core/oracle-chain/service"}},l={},c=[],m={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The OracleChain module contains a process in charge of scheduling the data fetching and transaction submitting."),(0,r.kt)("p",null,"It's modeled as finite state machine."),(0,r.kt)("p",null,"Three main state are represented:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"IDLE"),": When the process is waiting a new tick to be triggered based on some interval"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"Polling"),": When the process must fetch data from external sources"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"Summary"),": When the process must aggregate the entire polling transactions for a given interval")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Mainnet and Testnet can have different values based on environment variables."),(0,r.kt)("p",{parentName:"admonition"},"This is due to simulate quicker events and summary."),(0,r.kt)("p",{parentName:"admonition"},"For example,"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"on Mainnet: each polling is triggered each minute and the summary each day at 00:00 UTC."),(0,r.kt)("li",{parentName:"ul"},"on Testnet: each polling is triggered each 10s and the summary each minute.\n:::")),(0,r.kt)("p",{parentName:"admonition"},"For each actionable state, the process determines if the current running node is in charge to fetch or emit the transaction, based on the election algorithm."),(0,r.kt)("p",{parentName:"admonition"},"Also to avoid any useless transactions, the process identifies if a new transaction must be emitted regarding the freshness of the information retrieved from the Oracle services."),(0,r.kt)("p",{parentName:"admonition"},"You can find below a schema representing this finite state machine and its related events.")),(0,r.kt)("mermaid",{value:'stateDiagram-v2\n [*] --\x3e Idle\n Idle --\x3e Idle: "tick\n\n state "Is summary time ?" as Is_Summary_Time\n\n state if_state <>\n Idle --\x3e Is_Summary_Time\n Is_Summary_Time --\x3e if_state\n if_state --\x3e Summary: "Yes"\n if_state --\x3e Polling: "No"\n\n\n state Polling {\n state if_state_polling <>\n state "Is polling trigger node ?" as IsPollingTriggerNode\n state "Fetching data" as FetchData\n state if_state_polling_new_data <>\n state "Is new data ?" as IsNewData\n state "Send oracle transaction" as SendOracleTransaction\n\n [*] --\x3e IsPollingTriggerNode\n IsPollingTriggerNode --\x3e if_state_polling\n if_state_polling --\x3e [*]: "No"\n if_state_polling --\x3e FetchData: "Yes"\n FetchData --\x3e IsNewData\n\n IsNewData --\x3e if_state_polling_new_data\n if_state_polling_new_data --\x3e [*]: "No"\n if_state_polling_new_data --\x3e SendOracleTransaction: "Yes"\n SendOracleTransaction --\x3e [*]\n }\n\n Polling --\x3e Idle\n\n\n state Summary {\n state if_state_summary <>\n state "Is summary trigger node ?" as IsSummaryTriggerNode\n state "Send summary transaction" as SendSummaryTransaction\n\n [*] --\x3e IsSummaryTriggerNode\n IsSummaryTriggerNode --\x3e if_state_summary\n if_state_summary --\x3e [*]: "No"\n if_state_summary --\x3e SendSummaryTransaction: "Yes"\n SendSummaryTransaction --\x3e [*]\n }\n\n Summary --\x3e Idle'}),(0,r.kt)("p",null,":::note"))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/2c3d8110.4950971b.js b/assets/js/2c3d8110.4950971b.js new file mode 100644 index 000000000..029b2bf32 --- /dev/null +++ b/assets/js/2c3d8110.4950971b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4732],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),d=c(n),p=r,h=d["".concat(l,".").concat(p)]||d[p]||u[p]||i;return n?a.createElement(h,o(o({ref:t},m),{},{components:n})):a.createElement(h,o({ref:t},m))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"scheduler",title:"OracleChain Scheduler",sidebar_label:"Scheduler"},o=void 0,s={unversionedId:"build/core/oracle-chain/scheduler",id:"build/core/oracle-chain/scheduler",title:"OracleChain Scheduler",description:"The OracleChain module contains a process in charge of scheduling the data fetching and transaction submitting.",source:"@site/docs/build/core/oracle-chain/scheduler.md",sourceDirName:"build/core/oracle-chain",slug:"/build/core/oracle-chain/scheduler",permalink:"/build/core/oracle-chain/scheduler",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"scheduler",title:"OracleChain Scheduler",sidebar_label:"Scheduler"},sidebar:"docs",previous:{title:"Memory database",permalink:"/build/core/oracle-chain/memory-table"},next:{title:"Service",permalink:"/build/core/oracle-chain/service"}},l={},c=[],m={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The OracleChain module contains a process in charge of scheduling the data fetching and transaction submitting."),(0,r.kt)("p",null,"It's modeled as finite state machine."),(0,r.kt)("p",null,"Three main state are represented:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"IDLE"),": When the process is waiting a new tick to be triggered based on some interval"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"Polling"),": When the process must fetch data from external sources"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"Summary"),": When the process must aggregate the entire polling transactions for a given interval")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Mainnet and Testnet can have different values based on environment variables."),(0,r.kt)("p",{parentName:"admonition"},"This is due to simulate quicker events and summary."),(0,r.kt)("p",{parentName:"admonition"},"For example,"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"on Mainnet: each polling is triggered each minute and the summary each day at 00:00 UTC."),(0,r.kt)("li",{parentName:"ul"},"on Testnet: each polling is triggered each 10s and the summary each minute.\n:::")),(0,r.kt)("p",{parentName:"admonition"},"For each actionable state, the process determines if the current running node is in charge to fetch or emit the transaction, based on the election algorithm."),(0,r.kt)("p",{parentName:"admonition"},"Also to avoid any useless transactions, the process identifies if a new transaction must be emitted regarding the freshness of the information retrieved from the Oracle services."),(0,r.kt)("p",{parentName:"admonition"},"You can find below a schema representing this finite state machine and its related events.")),(0,r.kt)("mermaid",{value:'stateDiagram-v2\n [*] --\x3e Idle\n Idle --\x3e Idle: "tick\n\n state "Is summary time ?" as Is_Summary_Time\n\n state if_state <>\n Idle --\x3e Is_Summary_Time\n Is_Summary_Time --\x3e if_state\n if_state --\x3e Summary: "Yes"\n if_state --\x3e Polling: "No"\n\n\n state Polling {\n state if_state_polling <>\n state "Is polling trigger node ?" as IsPollingTriggerNode\n state "Fetching data" as FetchData\n state if_state_polling_new_data <>\n state "Is new data ?" as IsNewData\n state "Send oracle transaction" as SendOracleTransaction\n\n [*] --\x3e IsPollingTriggerNode\n IsPollingTriggerNode --\x3e if_state_polling\n if_state_polling --\x3e [*]: "No"\n if_state_polling --\x3e FetchData: "Yes"\n FetchData --\x3e IsNewData\n\n IsNewData --\x3e if_state_polling_new_data\n if_state_polling_new_data --\x3e [*]: "No"\n if_state_polling_new_data --\x3e SendOracleTransaction: "Yes"\n SendOracleTransaction --\x3e [*]\n }\n\n Polling --\x3e Idle\n\n\n state Summary {\n state if_state_summary <>\n state "Is summary trigger node ?" as IsSummaryTriggerNode\n state "Send summary transaction" as SendSummaryTransaction\n\n [*] --\x3e IsSummaryTriggerNode\n IsSummaryTriggerNode --\x3e if_state_summary\n if_state_summary --\x3e [*]: "No"\n if_state_summary --\x3e SendSummaryTransaction: "Yes"\n SendSummaryTransaction --\x3e [*]\n }\n\n Summary --\x3e Idle'}),(0,r.kt)("p",null,":::note"))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/2d63ea61.1fa20627.js b/assets/js/2d63ea61.1fa20627.js new file mode 100644 index 000000000..ab5caeaeb --- /dev/null +++ b/assets/js/2d63ea61.1fa20627.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2971],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>b});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var c=a.createContext({}),d=function(e){var t=a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},s=function(e){var t=d(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),u=d(r),y=n,b=u["".concat(c,".").concat(y)]||u[y]||p[y]||o;return r?a.createElement(b,l(l({ref:t},s),{},{components:r})):a.createElement(b,l({ref:t},s))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=y;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:n,l[1]=i;for(var d=2;d{r.r(t),r.d(t,{Badge:()=>y,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>s});var a=r(87462),n=r(67294),o=r(3905);r(8209);const l={id:"authorized-key",title:"AuthorizedKey",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/objects/authorized-key",id:"build/api/schema/objects/authorized-key",title:"AuthorizedKey",description:"[AuthorizedKey] represents a authorized public key with the encrypted secret key for this given key.",source:"@site/docs/build/api/schema/objects/authorized-key.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/authorized-key",permalink:"/build/api/schema/objects/authorized-key",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"authorized-key",title:"AuthorizedKey",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"SortOrder",permalink:"/build/api/schema/enums/sort-order"},next:{title:"Balance",permalink:"/build/api/schema/objects/balance"}},d={},s=[{value:"Fields",id:"fields",level:3},{value:'AuthorizedKey.encryptedSecretKeyHex ',id:"code-style-fontweight-normal-authorizedkeybencryptedsecretkeybcodehex-",level:4},{value:'AuthorizedKey.publicKeyPublicKey ',id:"code-style-fontweight-normal-authorizedkeybpublickeybcodepublickey-",level:4},{value:"Member of",id:"member-of",level:3}],u=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),y=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:s,Bullet:u,SpecifiedBy:p,Badge:y},h="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(h,(0,a.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[AuthorizedKey]"," represents a authorized public key with the encrypted secret key for this given key.\nBy decrypting this secret key, the authorized public key will be able to decrypt its related secret"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type AuthorizedKey {\n encryptedSecretKey: Hex\n publicKey: PublicKey\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-authorizedkeybencryptedsecretkeybcodehex-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"AuthorizedKey.",(0,o.kt)("b",null,"encryptedSecretKey"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,o.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,o.kt)(y,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-authorizedkeybpublickeybcodepublickey-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"AuthorizedKey.",(0,o.kt)("b",null,"publicKey"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,o.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,o.kt)(y,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ownership"},(0,o.kt)("inlineCode",{parentName:"a"},"Ownership"))," ",(0,o.kt)(y,{class:"secondary",text:"object",mdxType:"Badge"})))}m.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/2d63ea61.af30867f.js b/assets/js/2d63ea61.af30867f.js deleted file mode 100644 index 5a370c4a4..000000000 --- a/assets/js/2d63ea61.af30867f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2971],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>b});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var c=a.createContext({}),d=function(e){var t=a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},s=function(e){var t=d(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),u=d(r),y=n,b=u["".concat(c,".").concat(y)]||u[y]||p[y]||o;return r?a.createElement(b,l(l({ref:t},s),{},{components:r})):a.createElement(b,l({ref:t},s))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=y;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:n,l[1]=i;for(var d=2;d{r.r(t),r.d(t,{Badge:()=>y,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>s});var a=r(87462),n=r(67294),o=r(3905);r(8209);const l={id:"authorized-key",title:"AuthorizedKey",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/objects/authorized-key",id:"build/api/schema/objects/authorized-key",title:"AuthorizedKey",description:"[AuthorizedKey] represents a authorized public key with the encrypted secret key for this given key.",source:"@site/docs/build/api/schema/objects/authorized-key.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/authorized-key",permalink:"/build/api/schema/objects/authorized-key",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"authorized-key",title:"AuthorizedKey",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"SortOrder",permalink:"/build/api/schema/enums/sort-order"},next:{title:"Balance",permalink:"/build/api/schema/objects/balance"}},d={},s=[{value:"Fields",id:"fields",level:3},{value:'AuthorizedKey.encryptedSecretKeyHex ',id:"code-style-fontweight-normal-authorizedkeybencryptedsecretkeybcodehex-",level:4},{value:'AuthorizedKey.publicKeyPublicKey ',id:"code-style-fontweight-normal-authorizedkeybpublickeybcodepublickey-",level:4},{value:"Member of",id:"member-of",level:3}],u=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),y=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:s,Bullet:u,SpecifiedBy:p,Badge:y},h="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(h,(0,a.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[AuthorizedKey]"," represents a authorized public key with the encrypted secret key for this given key.\nBy decrypting this secret key, the authorized public key will be able to decrypt its related secret"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type AuthorizedKey {\n encryptedSecretKey: Hex\n publicKey: PublicKey\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-authorizedkeybencryptedsecretkeybcodehex-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"AuthorizedKey.",(0,o.kt)("b",null,"encryptedSecretKey"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,o.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,o.kt)(y,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-authorizedkeybpublickeybcodepublickey-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"AuthorizedKey.",(0,o.kt)("b",null,"publicKey"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,o.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,o.kt)(y,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ownership"},(0,o.kt)("inlineCode",{parentName:"a"},"Ownership"))," ",(0,o.kt)(y,{class:"secondary",text:"object",mdxType:"Badge"})))}m.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/2f55ba46.d1cb32e3.js b/assets/js/2f55ba46.73ce4d0b.js similarity index 62% rename from assets/js/2f55ba46.d1cb32e3.js rename to assets/js/2f55ba46.73ce4d0b.js index 165a1e2d2..4d0fdf12b 100644 --- a/assets/js/2f55ba46.d1cb32e3.js +++ b/assets/js/2f55ba46.73ce4d0b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6898],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(r),f=a,m=u["".concat(c,".").concat(f)]||u[f]||d[f]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>l,contentTitle:()=>s,default:()=>b,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(87462),a=r(67294),o=r(3905);r(8209);const i={id:"version",title:"version",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/queries/version",id:"build/api/schema/queries/version",title:"version",description:"List protocol, transaction and code versions",source:"@site/docs/build/api/schema/queries/version.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/version",permalink:"/build/api/schema/queries/version",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"version",title:"version",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transactions",permalink:"/build/api/schema/queries/transactions"},next:{title:"Address",permalink:"/build/api/schema/scalars/address"}},l={},p=[{value:"Type",id:"type",level:3},{value:'Version ',id:"version-",level:4}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:u,SpecifiedBy:d,Badge:f},y="wrapper";function b(e){let{components:t,...r}=e;return(0,o.kt)(y,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"List protocol, transaction and code versions"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"version: Version\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"version-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/version"},(0,o.kt)("inlineCode",{parentName:"a"},"Version"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Version]"," represents code, transaction and protocol version")))}b.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6898],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(r),f=a,m=u["".concat(c,".").concat(f)]||u[f]||d[f]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>l,contentTitle:()=>s,default:()=>y,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(87462),a=r(67294),o=r(3905);r(8209);const i={id:"version",title:"version",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/queries/version",id:"build/api/schema/queries/version",title:"version",description:"List protocol, transaction and code versions",source:"@site/docs/build/api/schema/queries/version.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/version",permalink:"/build/api/schema/queries/version",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"version",title:"version",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transactions",permalink:"/build/api/schema/queries/transactions"},next:{title:"Address",permalink:"/build/api/schema/scalars/address"}},l={},p=[{value:"Type",id:"type",level:3},{value:'Version ',id:"version-",level:4}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:u,SpecifiedBy:d,Badge:f},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"List protocol, transaction and code versions"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"version: Version\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"version-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/version"},(0,o.kt)("inlineCode",{parentName:"a"},"Version"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Version]"," represents code, transaction and protocol version")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/2fdf8aec.29cc6dc1.js b/assets/js/2fdf8aec.76b6781c.js similarity index 71% rename from assets/js/2fdf8aec.29cc6dc1.js rename to assets/js/2fdf8aec.76b6781c.js index cadf82a5b..849e0d375 100644 --- a/assets/js/2fdf8aec.29cc6dc1.js +++ b/assets/js/2fdf8aec.76b6781c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1328],{3905:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>f});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=n.createContext({}),u=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},p=function(e){var r=u(e.components);return n.createElement(l.Provider,{value:r},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},m=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),s=u(t),m=a,f=s["".concat(l,".").concat(m)]||s[m]||d[m]||i;return t?n.createElement(f,o(o({ref:r},p),{},{components:t})):n.createElement(f,o({ref:r},p))}));function f(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=m;var c={};for(var l in r)hasOwnProperty.call(r,l)&&(c[l]=r[l]);c.originalType=e,c[s]="string"==typeof e?e:a,o[1]=c;for(var u=2;u{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var n=t(87462),a=(t(67294),t(3905));t(8209);const i={id:"oracle-chain",title:"OracleChain"},o=void 0,c={unversionedId:"build/core/oracle-chain/oracle-chain",id:"build/core/oracle-chain/oracle-chain",title:"OracleChain",description:"OracleChain is an internal mechanism inside Archethic Node Software making external data fetching embedded into a transaction chain.",source:"@site/docs/build/core/oracle-chain/README.md",sourceDirName:"build/core/oracle-chain",slug:"/build/core/oracle-chain/",permalink:"/build/core/oracle-chain/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"oracle-chain",title:"OracleChain"},sidebar:"docs",previous:{title:"Transaction context retrieval",permalink:"/build/core/mining/transaction-context"},next:{title:"Memory database",permalink:"/build/core/oracle-chain/memory-table"}},l={},u=[],p={toc:u},s="wrapper";function d(e){let{components:r,...t}=e;return(0,a.kt)(s,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"OracleChain is an internal mechanism inside Archethic Node Software making external data fetching embedded into a transaction chain."),(0,a.kt)("p",null,"It's built around three main components:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"List of ",(0,a.kt)("a",{parentName:"li",href:"/build/core/oracle-chain/service"},"services")," or provider"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/build/core/oracle-chain/scheduler"},"Scheduler")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/build/core/oracle-chain/memory-table"},"InMemory database"))))}d.isMDXComponent=!0},8209:(e,r,t)=>{t(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1328],{3905:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>f});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=n.createContext({}),u=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},p=function(e){var r=u(e.components);return n.createElement(l.Provider,{value:r},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},m=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),s=u(t),m=a,f=s["".concat(l,".").concat(m)]||s[m]||d[m]||i;return t?n.createElement(f,o(o({ref:r},p),{},{components:t})):n.createElement(f,o({ref:r},p))}));function f(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=m;var c={};for(var l in r)hasOwnProperty.call(r,l)&&(c[l]=r[l]);c.originalType=e,c[s]="string"==typeof e?e:a,o[1]=c;for(var u=2;u{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var n=t(87462),a=(t(67294),t(3905));t(8209);const i={id:"oracle-chain",title:"OracleChain"},o=void 0,c={unversionedId:"build/core/oracle-chain/oracle-chain",id:"build/core/oracle-chain/oracle-chain",title:"OracleChain",description:"OracleChain is an internal mechanism inside Archethic Node Software making external data fetching embedded into a transaction chain.",source:"@site/docs/build/core/oracle-chain/README.md",sourceDirName:"build/core/oracle-chain",slug:"/build/core/oracle-chain/",permalink:"/build/core/oracle-chain/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"oracle-chain",title:"OracleChain"},sidebar:"docs",previous:{title:"Transaction context retrieval",permalink:"/build/core/mining/transaction-context"},next:{title:"Memory database",permalink:"/build/core/oracle-chain/memory-table"}},l={},u=[],p={toc:u},s="wrapper";function d(e){let{components:r,...t}=e;return(0,a.kt)(s,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"OracleChain is an internal mechanism inside Archethic Node Software making external data fetching embedded into a transaction chain."),(0,a.kt)("p",null,"It's built around three main components:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"List of ",(0,a.kt)("a",{parentName:"li",href:"/build/core/oracle-chain/service"},"services")," or provider"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/build/core/oracle-chain/scheduler"},"Scheduler")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/build/core/oracle-chain/memory-table"},"InMemory database"))))}d.isMDXComponent=!0},8209:(e,r,t)=>{t(67294)}}]); \ No newline at end of file diff --git a/assets/js/300a963c.1ba0a4a1.js b/assets/js/300a963c.1ba0a4a1.js new file mode 100644 index 000000000..2cd03dff9 --- /dev/null +++ b/assets/js/300a963c.1ba0a4a1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5254],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=i(r),f=a,m=u["".concat(s,".").concat(f)]||u[f]||p[f]||o;return r?n.createElement(m,l(l({ref:t},d),{},{components:r})):n.createElement(m,l({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[u]="string"==typeof e?e:a,l[1]=c;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>i,contentTitle:()=>c,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const l={id:"uco-transfer",title:"UcoTransfer",hide_table_of_contents:!1},c=void 0,s={unversionedId:"build/api/schema/objects/uco-transfer",id:"build/api/schema/objects/uco-transfer",title:"UcoTransfer",description:"[UCOTransfer] represents the an asset transfer",source:"@site/docs/build/api/schema/objects/uco-transfer.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/uco-transfer",permalink:"/build/api/schema/objects/uco-transfer",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"uco-transfer",title:"UcoTransfer",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"UcoLedger",permalink:"/build/api/schema/objects/uco-ledger"},next:{title:"UnspentOutput",permalink:"/build/api/schema/objects/unspent-output"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'UcoTransfer.amountInt ',id:"code-style-fontweight-normal-ucotransferbamountbcodeint-",level:4},{value:'UcoTransfer.toAddress ',id:"code-style-fontweight-normal-ucotransferbtobcodeaddress-",level:4},{value:"Member of",id:"member-of",level:3}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:u,SpecifiedBy:p,Badge:f},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[UCOTransfer]"," represents the an asset transfer"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type UcoTransfer {\n amount: Int\n to: Address\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ucotransferbamountbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"UcoTransfer.",(0,o.kt)("b",null,"amount"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ucotransferbtobcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"UcoTransfer.",(0,o.kt)("b",null,"to"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/uco-ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"UcoLedger"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/300a963c.76c825bd.js b/assets/js/300a963c.76c825bd.js deleted file mode 100644 index e46ced82d..000000000 --- a/assets/js/300a963c.76c825bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5254],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=i(r),f=a,m=u["".concat(s,".").concat(f)]||u[f]||p[f]||o;return r?n.createElement(m,l(l({ref:t},d),{},{components:r})):n.createElement(m,l({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[u]="string"==typeof e?e:a,l[1]=c;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>i,contentTitle:()=>c,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const l={id:"uco-transfer",title:"UcoTransfer",hide_table_of_contents:!1},c=void 0,s={unversionedId:"build/api/schema/objects/uco-transfer",id:"build/api/schema/objects/uco-transfer",title:"UcoTransfer",description:"[UCOTransfer] represents the an asset transfer",source:"@site/docs/build/api/schema/objects/uco-transfer.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/uco-transfer",permalink:"/build/api/schema/objects/uco-transfer",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"uco-transfer",title:"UcoTransfer",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"UcoLedger",permalink:"/build/api/schema/objects/uco-ledger"},next:{title:"UnspentOutput",permalink:"/build/api/schema/objects/unspent-output"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'UcoTransfer.amountInt ',id:"code-style-fontweight-normal-ucotransferbamountbcodeint-",level:4},{value:'UcoTransfer.toAddress ',id:"code-style-fontweight-normal-ucotransferbtobcodeaddress-",level:4},{value:"Member of",id:"member-of",level:3}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:u,SpecifiedBy:p,Badge:f},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[UCOTransfer]"," represents the an asset transfer"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type UcoTransfer {\n amount: Int\n to: Address\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ucotransferbamountbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"UcoTransfer.",(0,o.kt)("b",null,"amount"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ucotransferbtobcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"UcoTransfer.",(0,o.kt)("b",null,"to"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/uco-ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"UcoLedger"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/310207c7.eee0867d.js b/assets/js/310207c7.8eae2a1a.js similarity index 82% rename from assets/js/310207c7.eee0867d.js rename to assets/js/310207c7.8eae2a1a.js index f8fb63c45..d17a3724b 100644 --- a/assets/js/310207c7.eee0867d.js +++ b/assets/js/310207c7.8eae2a1a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5986],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=l(r),f=o,m=u["".concat(s,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"fees",title:"Smart Contracts - Fees",sidebar_label:"Fees",sidebar_position:4},c=void 0,i={unversionedId:"build/smart-contracts/fees",id:"build/smart-contracts/fees",title:"Smart Contracts - Fees",description:"",source:"@site/docs/build/smart-contracts/fees.md",sourceDirName:"build/smart-contracts",slug:"/build/smart-contracts/fees",permalink:"/build/smart-contracts/fees",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:4,frontMatter:{id:"fees",title:"Smart Contracts - Fees",sidebar_label:"Fees",sidebar_position:4},sidebar:"docs",previous:{title:"Mock form",permalink:"/build/smart-contracts/playground/mock-form"},next:{title:"Testnet",permalink:"/build/testnet"}},s={},l=[],p={toc:l},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("admonition",{title:"todo",type:"danger"}))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5986],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=l(r),f=o,m=u["".concat(s,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"fees",title:"Smart Contracts - Fees",sidebar_label:"Fees",sidebar_position:4},c=void 0,i={unversionedId:"build/smart-contracts/fees",id:"build/smart-contracts/fees",title:"Smart Contracts - Fees",description:"",source:"@site/docs/build/smart-contracts/fees.md",sourceDirName:"build/smart-contracts",slug:"/build/smart-contracts/fees",permalink:"/build/smart-contracts/fees",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:4,frontMatter:{id:"fees",title:"Smart Contracts - Fees",sidebar_label:"Fees",sidebar_position:4},sidebar:"docs",previous:{title:"Mock form",permalink:"/build/smart-contracts/playground/mock-form"},next:{title:"Testnet",permalink:"/build/testnet"}},s={},l=[],p={toc:l},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("admonition",{title:"todo",type:"danger"}))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/3247e900.0ff228c2.js b/assets/js/3247e900.0ff228c2.js new file mode 100644 index 000000000..ffe1e3279 --- /dev/null +++ b/assets/js/3247e900.0ff228c2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8992],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>b});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=a.createContext({}),i=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=i(e.components);return a.createElement(c.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),m=i(n),u=o,b=m["".concat(c,".").concat(u)]||m[u]||p[u]||r;return n?a.createElement(b,l(l({ref:t},d),{},{components:n})):a.createElement(b,l({ref:t},d))}));function b(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[m]="string"==typeof e?e:o,l[1]=s;for(var i=2;i{n.r(t),n.d(t,{Badge:()=>u,Bullet:()=>m,SpecifiedBy:()=>p,assets:()=>i,contentTitle:()=>s,default:()=>f,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var a=n(87462),o=n(67294),r=n(3905);n(8209);const l={id:"transaction-movement",title:"TransactionMovement",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/objects/transaction-movement",id:"build/api/schema/objects/transaction-movement",title:"TransactionMovement",description:"[TransactionMovement] represents ledger transaction movement",source:"@site/docs/build/api/schema/objects/transaction-movement.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-movement",permalink:"/build/api/schema/objects/transaction-movement",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-movement",title:"TransactionMovement",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionInput",permalink:"/build/api/schema/objects/transaction-input"},next:{title:"TransactionSummary",permalink:"/build/api/schema/objects/transaction-summary"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'TransactionMovement.amountInt ',id:"code-style-fontweight-normal-transactionmovementbamountbcodeint-",level:4},{value:'TransactionMovement.toAddress ',id:"code-style-fontweight-normal-transactionmovementbtobcodeaddress-",level:4},{value:'TransactionMovement.tokenAddressAddress ',id:"code-style-fontweight-normal-transactionmovementbtokenaddressbcodeaddress-",level:4},{value:'TransactionMovement.tokenIdInt ',id:"code-style-fontweight-normal-transactionmovementbtokenidbcodeint-",level:4},{value:'TransactionMovement.typeString ',id:"code-style-fontweight-normal-transactionmovementbtypebcodestring-",level:4},{value:"Member of",id:"member-of",level:3}],m=()=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,r.kt)(o.Fragment,null,"Specification",(0,r.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:m,SpecifiedBy:p,Badge:u},k="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"[TransactionMovement]"," represents ledger transaction movement\nIt includes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"TO: asset transfer recipient"),(0,r.kt)("li",{parentName:"ul"},"Amount: asset amount"),(0,r.kt)("li",{parentName:"ul"},"Type: UCO/token"),(0,r.kt)("li",{parentName:"ul"},"token address: address of the token if the type is token"),(0,r.kt)("li",{parentName:"ul"},"token id: It is the id for a token which is allocated when the token is minted.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionMovement {\n amount: Int\n to: Address\n tokenAddress: Address\n tokenId: Int\n type: String\n}\n")),(0,r.kt)("h3",{id:"fields"},"Fields"),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbamountbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"amount"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbtobcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"to"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbtokenaddressbcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"tokenAddress"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbtokenidbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"tokenId"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbtypebcodestring-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"type"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,r.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h3",{id:"member-of"},"Member of"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger-operations"},(0,r.kt)("inlineCode",{parentName:"a"},"LedgerOperations"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/3247e900.b3dbe22c.js b/assets/js/3247e900.b3dbe22c.js deleted file mode 100644 index 8115314f1..000000000 --- a/assets/js/3247e900.b3dbe22c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8992],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>b});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=a.createContext({}),i=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=i(e.components);return a.createElement(c.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),m=i(n),u=o,b=m["".concat(c,".").concat(u)]||m[u]||p[u]||r;return n?a.createElement(b,l(l({ref:t},d),{},{components:n})):a.createElement(b,l({ref:t},d))}));function b(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[m]="string"==typeof e?e:o,l[1]=s;for(var i=2;i{n.r(t),n.d(t,{Badge:()=>u,Bullet:()=>m,SpecifiedBy:()=>p,assets:()=>i,contentTitle:()=>s,default:()=>f,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var a=n(87462),o=n(67294),r=n(3905);n(8209);const l={id:"transaction-movement",title:"TransactionMovement",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/objects/transaction-movement",id:"build/api/schema/objects/transaction-movement",title:"TransactionMovement",description:"[TransactionMovement] represents ledger transaction movement",source:"@site/docs/build/api/schema/objects/transaction-movement.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-movement",permalink:"/build/api/schema/objects/transaction-movement",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-movement",title:"TransactionMovement",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionInput",permalink:"/build/api/schema/objects/transaction-input"},next:{title:"TransactionSummary",permalink:"/build/api/schema/objects/transaction-summary"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'TransactionMovement.amountInt ',id:"code-style-fontweight-normal-transactionmovementbamountbcodeint-",level:4},{value:'TransactionMovement.toAddress ',id:"code-style-fontweight-normal-transactionmovementbtobcodeaddress-",level:4},{value:'TransactionMovement.tokenAddressAddress ',id:"code-style-fontweight-normal-transactionmovementbtokenaddressbcodeaddress-",level:4},{value:'TransactionMovement.tokenIdInt ',id:"code-style-fontweight-normal-transactionmovementbtokenidbcodeint-",level:4},{value:'TransactionMovement.typeString ',id:"code-style-fontweight-normal-transactionmovementbtypebcodestring-",level:4},{value:"Member of",id:"member-of",level:3}],m=()=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,r.kt)(o.Fragment,null,"Specification",(0,r.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:m,SpecifiedBy:p,Badge:u},k="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"[TransactionMovement]"," represents ledger transaction movement\nIt includes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"TO: asset transfer recipient"),(0,r.kt)("li",{parentName:"ul"},"Amount: asset amount"),(0,r.kt)("li",{parentName:"ul"},"Type: UCO/token"),(0,r.kt)("li",{parentName:"ul"},"token address: address of the token if the type is token"),(0,r.kt)("li",{parentName:"ul"},"token id: It is the id for a token which is allocated when the token is minted.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionMovement {\n amount: Int\n to: Address\n tokenAddress: Address\n tokenId: Int\n type: String\n}\n")),(0,r.kt)("h3",{id:"fields"},"Fields"),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbamountbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"amount"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbtobcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"to"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbtokenaddressbcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"tokenAddress"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbtokenidbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"tokenId"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionmovementbtypebcodestring-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"TransactionMovement.",(0,r.kt)("b",null,"type"))),(0,r.kt)(m,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,r.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h3",{id:"member-of"},"Member of"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger-operations"},(0,r.kt)("inlineCode",{parentName:"a"},"LedgerOperations"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/32bd85cf.5d97788a.js b/assets/js/32bd85cf.1a185316.js similarity index 56% rename from assets/js/32bd85cf.5d97788a.js rename to assets/js/32bd85cf.1a185316.js index f6097737d..2ec11ff43 100644 --- a/assets/js/32bd85cf.5d97788a.js +++ b/assets/js/32bd85cf.1a185316.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8227],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(a),m=n,f=d["".concat(c,".").concat(m)]||d[m]||u[m]||o;return a?r.createElement(f,l(l({ref:t},p),{},{components:a})):r.createElement(f,l({ref:t},p))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:n,l[1]=i;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),o=a(3905);a(8209);const l={id:"boolean",title:"Boolean",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/scalars/boolean",id:"build/api/schema/scalars/boolean",title:"Boolean",description:"The Boolean scalar type represents true or false.",source:"@site/docs/build/api/schema/scalars/boolean.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/boolean",permalink:"/build/api/schema/scalars/boolean",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"boolean",title:"Boolean",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Address",permalink:"/build/api/schema/scalars/address"},next:{title:"Content",permalink:"/build/api/schema/scalars/content"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(b,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"Boolean")," scalar type represents ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Boolean\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/directives/include"},(0,o.kt)("inlineCode",{parentName:"a"},"include"))," ",(0,o.kt)(m,{class:"secondary",text:"directive",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,o.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/directives/skip"},(0,o.kt)("inlineCode",{parentName:"a"},"skip"))," ",(0,o.kt)(m,{class:"secondary",text:"directive",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8227],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(a),m=n,f=d["".concat(c,".").concat(m)]||d[m]||u[m]||o;return a?r.createElement(f,l(l({ref:t},p),{},{components:a})):r.createElement(f,l({ref:t},p))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:n,l[1]=i;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),o=a(3905);a(8209);const l={id:"boolean",title:"Boolean",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/scalars/boolean",id:"build/api/schema/scalars/boolean",title:"Boolean",description:"The Boolean scalar type represents true or false.",source:"@site/docs/build/api/schema/scalars/boolean.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/boolean",permalink:"/build/api/schema/scalars/boolean",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"boolean",title:"Boolean",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Address",permalink:"/build/api/schema/scalars/address"},next:{title:"Content",permalink:"/build/api/schema/scalars/content"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(b,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"Boolean")," scalar type represents ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Boolean\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/directives/include"},(0,o.kt)("inlineCode",{parentName:"a"},"include"))," ",(0,o.kt)(m,{class:"secondary",text:"directive",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,o.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/directives/skip"},(0,o.kt)("inlineCode",{parentName:"a"},"skip"))," ",(0,o.kt)(m,{class:"secondary",text:"directive",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/36739131.3bc6fa95.js b/assets/js/36739131.3bc6fa95.js deleted file mode 100644 index ff3c6d613..000000000 --- a/assets/js/36739131.3bc6fa95.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5888],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var i=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function r(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=i.createContext({}),l=function(e){var t=i.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},d=function(e){var t=l(e.components);return i.createElement(s.Provider,{value:t},e.children)},h="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},p=i.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),h=l(a),p=n,m=h["".concat(s,".").concat(p)]||h[p]||u[p]||o;return a?i.createElement(m,r(r({ref:t},d),{},{components:a})):i.createElement(m,r({ref:t},d))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,r=new Array(o);r[0]=p;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[h]="string"==typeof e?e:n,r[1]=c;for(var l=2;l{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var i=a(87462),n=(a(67294),a(3905));a(8209);const o={id:"patents",title:"Patents",sidebar_position:3},r=void 0,c={unversionedId:"learn/patents",id:"learn/patents",title:"Patents",description:"12 patents to build a new ecosystem",source:"@site/docs/learn/patents.md",sourceDirName:"learn",slug:"/learn/patents",permalink:"/learn/patents",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:3,frontMatter:{id:"patents",title:"Patents",sidebar_position:3},sidebar:"docs",previous:{title:"Ecosystem",permalink:"/learn/ecosystem"},next:{title:"Transaction chains",permalink:"/learn/transaction-chain"}},s={},l=[{value:"12 patents to build a new ecosystem",id:"12-patents-to-build-a-new-ecosystem",level:2},{value:"Archethic, a Humanitarian and Community Project",id:"archethic-a-humanitarian-and-community-project",level:2},{value:"List of patents",id:"list-of-patents",level:2},{value:"Blockchain",id:"blockchain",level:3},{value:"Method of transaction validation relating to Transactions Chains through a decentralized network.",id:"method-of-transaction-validation-relating-to-transactions-chains-through-a-decentralized-network",level:4},{value:"Process management of smart-contracts through transactions chains",id:"process-management-of-smart-contracts-through-transactions-chains",level:4},{value:"Atomic validation of transaction chains through a decentralized network",id:"atomic-validation-of-transaction-chains-through-a-decentralized-network",level:4},{value:"Method associated with the Digital identity management of an individual, a connected object, an organization, a service through a decentralized network",id:"method-associated-with-the-digital-identity-management-of-an-individual-a-connected-object-an-organization-a-service-through-a-decentralized-network",level:4},{value:"Method of securing transactions through knowledge and through cross-capabilities across a decentralized network",id:"method-of-securing-transactions-through-knowledge-and-through-cross-capabilities-across-a-decentralized-network",level:4},{value:"Biometrics",id:"biometrics",level:3},{value:"Method of Biometric Authentication without disclosure through a decentralized network",id:"method-of-biometric-authentication-without-disclosure-through-a-decentralized-network",level:4},{value:"Biometric adaptive authentication device using ultrasound, photographs in visible light of contrast and infrared, without disclosure through a decentralized network",id:"biometric-adaptive-authentication-device-using-ultrasound-photographs-in-visible-light-of-contrast-and-infrared-without-disclosure-through-a-decentralized-network",level:4},{value:"Device for the reproducible positioning of at least one finger of an individual while taking the biometric measurements.",id:"device-for-the-reproducible-positioning-of-at-least-one-finger-of-an-individual-while-taking-the-biometric-measurements",level:4},{value:"Device for Biometric ultrasonic testing and vital signs verification.",id:"device-for-biometric-ultrasonic-testing-and-vital-signs-verification",level:4},{value:"Device for biometric authentication and reliability of measurements by visible and infrared light photography, spectrometry, and differential analysis.",id:"device-for-biometric-authentication-and-reliability-of-measurements-by-visible-and-infrared-light-photography-spectrometry-and-differential-analysis",level:4},{value:"Hardware",id:"hardware",level:3},{value:"Communication device for communicating with other devices and enabling nearby transactions and creating a mesh network.",id:"communication-device-for-communicating-with-other-devices-and-enabling-nearby-transactions-and-creating-a-mesh-network",level:4},{value:"Mechanical and electrical coupling device to connect to a computer periphery without damaging the host system.",id:"mechanical-and-electrical-coupling-device-to-connect-to-a-computer-periphery-without-damaging-the-host-system",level:4}],d={toc:l},h="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(h,(0,i.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"12-patents-to-build-a-new-ecosystem"},"12 patents to build a new ecosystem"),(0,n.kt)("p",null,"Archethic is based on more than 4 years of research and 12 international patents.\n5 patents aim at removing all logins, passwords and identification cards that pollute and weaken our environment by replacing them with a universal biometric identification, unfalsifiable and guaranteeing the privacy of users."),(0,n.kt)("p",null,"5 other patents, concern the implementation of a real decentralized network, governed by mathematics, resilient to cyber-attacks and allowing to reduce the consumption of the current Internet."),(0,n.kt)("p",null,"Finally, two patents aim to allow current applications to migrate or interface effortlessly to this new network. Each application will no longer need to master all the technologies to launch its service (identity management, inventory management, payments, interface with external suppliers, etc.) but will be able to rely on a universal exchange platform capable, through smart-contracts, of instantly matching all offers to each request. "),(0,n.kt)("h2",{id:"archethic-a-humanitarian-and-community-project"},"Archethic, a Humanitarian and Community Project"),(0,n.kt)("p",null,"Once the risk of a fork is removed, all the patents will be transferred to the heritage of the open source technologies, this heritage should likely be transferred to the OIN (Open Invention Network) or equivalent. The entire source code will be AGPL licensed."),(0,n.kt)("h2",{id:"list-of-patents"},"List of patents"),(0,n.kt)("h3",{id:"blockchain"},"Blockchain"),(0,n.kt)("h4",{id:"method-of-transaction-validation-relating-to-transactions-chains-through-a-decentralized-network"},"Method of transaction validation relating to Transactions Chains through a decentralized network."),(0,n.kt)("p",null,"Transaction validation relating to one or more transactions chains in a unitary and asynchronous way by the elimination of all the limitations of Blockchain technology. The process allows enhanced security and confidentiality, in particular by integrating the constraints in terms of geolocation and number of the messages validation.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/7a/b1/b1/191f1d76b07922/FR3049089B1.pdf"},"FR3049089 (A1); US2019044735; WO2017162931")),(0,n.kt)("h4",{id:"process-management-of-smart-contracts-through-transactions-chains"},"Process management of smart-contracts through transactions chains"),(0,n.kt)("p",null,"Digital identities - exchange of value - delegations management, authorizations and revocations - electronic votes management - delivery of goods/supply chain - organizations - health data management - reputation management and certification.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/a6/d6/f3/5210d526791d88/FR3049101A1.pdf"},"FR3049101 (A1)")),(0,n.kt)("h4",{id:"atomic-validation-of-transaction-chains-through-a-decentralized-network"},"Atomic validation of transaction chains through a decentralized network"),(0,n.kt)("p",null,"Consensus ARCH (Atomic Rotating Commitment Heuristic Election), optimized and geo-secure replication process - self-repair network and data - Prediction Module and Supervised Multicast Network Layer (P2P Protocol).",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/cf/e1/14/f4943679e7ecb9/FR3098972A1.pdf"},"FR3098972 (A1)")),(0,n.kt)("h4",{id:"method-associated-with-the-digital-identity-management-of-an-individual-a-connected-object-an-organization-a-service-through-a-decentralized-network"},"Method associated with the Digital identity management of an individual, a connected object, an organization, a service through a decentralized network"),(0,n.kt)("p",null,"Identification-authentication-registration of unique or multiple digital identities for an individual or an object on an external device - exchange of values without disclosure - condition management - management of members, owners, multi-signatures, reputation, certification and recertification of a digital identity - management of mutable external identifiers through digital identity.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/3f/64/99/5d6d7f66e5c6a9/FR3049088A1.pdf"},"FR3049088 (A1)")),(0,n.kt)("h4",{id:"method-of-securing-transactions-through-knowledge-and-through-cross-capabilities-across-a-decentralized-network"},"Method of securing transactions through knowledge and through cross-capabilities across a decentralized network"),(0,n.kt)("p",null,"Cryptographic process to cross-reference the knowledge and capabilities of the devices so as to prohibit any unauthorized operation, renew and permanently forfeit all cryptographic keys of all devices, remove correlation elements of time, value, and actors involved (privacy wheel), initialize cryptographic keys for a decentralized network without using an external device to the system, minimize the exposure of public keys related to private keys of the device, to reset a device and revoke a user.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/86/18/ee/c63fde292d1186/FR3049087A1.pdf"},"FR3049087 (A1)")),(0,n.kt)("h3",{id:"biometrics"},"Biometrics"),(0,n.kt)("h4",{id:"method-of-biometric-authentication-without-disclosure-through-a-decentralized-network"},"Method of Biometric Authentication without disclosure through a decentralized network"),(0,n.kt)("p",null,"A method of not having to reveal all or part of the biometric measurements of an individual - integrating the compensations of the biometric measurements and lifelong morphological adaptability of an individual - never having to store any biometric data or any biometric measurement or a cryptographic key relating to an individual - making it possible to record several fingers of the same individual without disclosure and allowing operations without a network and without an individual having never used any device before.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/ca/b7/36/99a19c0295592c/FR3049086A1.pdf"},"FR3049086 (A1)")),(0,n.kt)("h4",{id:"biometric-adaptive-authentication-device-using-ultrasound-photographs-in-visible-light-of-contrast-and-infrared-without-disclosure-through-a-decentralized-network"},"Biometric adaptive authentication device using ultrasound, photographs in visible light of contrast and infrared, without disclosure through a decentralized network"),(0,n.kt)("p",null,"A Biometric authentication device without any disclosure obtained from ultrasounds and photograph of the venous network of the finger, of the lateral fingerprint of the finger and configured to take a photograph of the infrared intrinsic emission of the finger, to check the heart rate and perform an analysis, Multireferential spectrometry of the finger.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/95/a6/f7/7ada4308bbc1cb/FR3049090A1.pdf"},"FR3049090 (A1); CN108780501; CN109074478; US2019089539; WO2017162930")),(0,n.kt)("h4",{id:"device-for-the-reproducible-positioning-of-at-least-one-finger-of-an-individual-while-taking-the-biometric-measurements"},"Device for the reproducible positioning of at least one finger of an individual while taking the biometric measurements."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/f9/37/a9/d1afa7dacdfc54/FR3049093A1.pdf"},"FR3049093 (A1)")),(0,n.kt)("h4",{id:"device-for-biometric-ultrasonic-testing-and-vital-signs-verification"},"Device for Biometric ultrasonic testing and vital signs verification."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/15/01/34/51b6fe0fa7d90e/FR3049091A1.pdf"},"FR3049091 (A1)")),(0,n.kt)("h4",{id:"device-for-biometric-authentication-and-reliability-of-measurements-by-visible-and-infrared-light-photography-spectrometry-and-differential-analysis"},"Device for biometric authentication and reliability of measurements by visible and infrared light photography, spectrometry, and differential analysis."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/26/f8/c9/9174c1c37723bf/FR3049092A1.pdf"},"FR3049092 (A1)")),(0,n.kt)("h3",{id:"hardware"},"Hardware"),(0,n.kt)("h4",{id:"communication-device-for-communicating-with-other-devices-and-enabling-nearby-transactions-and-creating-a-mesh-network"},"Communication device for communicating with other devices and enabling nearby transactions and creating a mesh network."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/95/c5/fd/7ecba7b274353a/FR3049085A1.pdf"},"FR3049085 (A1)")),(0,n.kt)("h4",{id:"mechanical-and-electrical-coupling-device-to-connect-to-a-computer-periphery-without-damaging-the-host-system"},"Mechanical and electrical coupling device to connect to a computer periphery without damaging the host system."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/19/62/34/66e7c6051da9c8/FR3049121A1.pdf"},"FR3049121 (A1)")))}u.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/36739131.c1f869cd.js b/assets/js/36739131.c1f869cd.js new file mode 100644 index 000000000..95fc4cda3 --- /dev/null +++ b/assets/js/36739131.c1f869cd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5888],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var i=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function r(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=i.createContext({}),l=function(e){var t=i.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},d=function(e){var t=l(e.components);return i.createElement(s.Provider,{value:t},e.children)},h="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},p=i.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),h=l(a),p=n,m=h["".concat(s,".").concat(p)]||h[p]||u[p]||o;return a?i.createElement(m,r(r({ref:t},d),{},{components:a})):i.createElement(m,r({ref:t},d))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,r=new Array(o);r[0]=p;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[h]="string"==typeof e?e:n,r[1]=c;for(var l=2;l{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var i=a(87462),n=(a(67294),a(3905));a(8209);const o={id:"patents",title:"Patents",sidebar_position:3},r=void 0,c={unversionedId:"learn/patents",id:"learn/patents",title:"Patents",description:"12 patents to build a new ecosystem",source:"@site/docs/learn/patents.md",sourceDirName:"learn",slug:"/learn/patents",permalink:"/learn/patents",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:3,frontMatter:{id:"patents",title:"Patents",sidebar_position:3},sidebar:"docs",previous:{title:"Ecosystem",permalink:"/learn/ecosystem"},next:{title:"Transaction chains",permalink:"/learn/transaction-chain"}},s={},l=[{value:"12 patents to build a new ecosystem",id:"12-patents-to-build-a-new-ecosystem",level:2},{value:"Archethic, a Humanitarian and Community Project",id:"archethic-a-humanitarian-and-community-project",level:2},{value:"List of patents",id:"list-of-patents",level:2},{value:"Blockchain",id:"blockchain",level:3},{value:"Method of transaction validation relating to Transactions Chains through a decentralized network.",id:"method-of-transaction-validation-relating-to-transactions-chains-through-a-decentralized-network",level:4},{value:"Process management of smart-contracts through transactions chains",id:"process-management-of-smart-contracts-through-transactions-chains",level:4},{value:"Atomic validation of transaction chains through a decentralized network",id:"atomic-validation-of-transaction-chains-through-a-decentralized-network",level:4},{value:"Method associated with the Digital identity management of an individual, a connected object, an organization, a service through a decentralized network",id:"method-associated-with-the-digital-identity-management-of-an-individual-a-connected-object-an-organization-a-service-through-a-decentralized-network",level:4},{value:"Method of securing transactions through knowledge and through cross-capabilities across a decentralized network",id:"method-of-securing-transactions-through-knowledge-and-through-cross-capabilities-across-a-decentralized-network",level:4},{value:"Biometrics",id:"biometrics",level:3},{value:"Method of Biometric Authentication without disclosure through a decentralized network",id:"method-of-biometric-authentication-without-disclosure-through-a-decentralized-network",level:4},{value:"Biometric adaptive authentication device using ultrasound, photographs in visible light of contrast and infrared, without disclosure through a decentralized network",id:"biometric-adaptive-authentication-device-using-ultrasound-photographs-in-visible-light-of-contrast-and-infrared-without-disclosure-through-a-decentralized-network",level:4},{value:"Device for the reproducible positioning of at least one finger of an individual while taking the biometric measurements.",id:"device-for-the-reproducible-positioning-of-at-least-one-finger-of-an-individual-while-taking-the-biometric-measurements",level:4},{value:"Device for Biometric ultrasonic testing and vital signs verification.",id:"device-for-biometric-ultrasonic-testing-and-vital-signs-verification",level:4},{value:"Device for biometric authentication and reliability of measurements by visible and infrared light photography, spectrometry, and differential analysis.",id:"device-for-biometric-authentication-and-reliability-of-measurements-by-visible-and-infrared-light-photography-spectrometry-and-differential-analysis",level:4},{value:"Hardware",id:"hardware",level:3},{value:"Communication device for communicating with other devices and enabling nearby transactions and creating a mesh network.",id:"communication-device-for-communicating-with-other-devices-and-enabling-nearby-transactions-and-creating-a-mesh-network",level:4},{value:"Mechanical and electrical coupling device to connect to a computer periphery without damaging the host system.",id:"mechanical-and-electrical-coupling-device-to-connect-to-a-computer-periphery-without-damaging-the-host-system",level:4}],d={toc:l},h="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(h,(0,i.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"12-patents-to-build-a-new-ecosystem"},"12 patents to build a new ecosystem"),(0,n.kt)("p",null,"Archethic is based on more than 4 years of research and 12 international patents.\n5 patents aim at removing all logins, passwords and identification cards that pollute and weaken our environment by replacing them with a universal biometric identification, unfalsifiable and guaranteeing the privacy of users."),(0,n.kt)("p",null,"5 other patents, concern the implementation of a real decentralized network, governed by mathematics, resilient to cyber-attacks and allowing to reduce the consumption of the current Internet."),(0,n.kt)("p",null,"Finally, two patents aim to allow current applications to migrate or interface effortlessly to this new network. Each application will no longer need to master all the technologies to launch its service (identity management, inventory management, payments, interface with external suppliers, etc.) but will be able to rely on a universal exchange platform capable, through smart-contracts, of instantly matching all offers to each request. "),(0,n.kt)("h2",{id:"archethic-a-humanitarian-and-community-project"},"Archethic, a Humanitarian and Community Project"),(0,n.kt)("p",null,"Once the risk of a fork is removed, all the patents will be transferred to the heritage of the open source technologies, this heritage should likely be transferred to the OIN (Open Invention Network) or equivalent. The entire source code will be AGPL licensed."),(0,n.kt)("h2",{id:"list-of-patents"},"List of patents"),(0,n.kt)("h3",{id:"blockchain"},"Blockchain"),(0,n.kt)("h4",{id:"method-of-transaction-validation-relating-to-transactions-chains-through-a-decentralized-network"},"Method of transaction validation relating to Transactions Chains through a decentralized network."),(0,n.kt)("p",null,"Transaction validation relating to one or more transactions chains in a unitary and asynchronous way by the elimination of all the limitations of Blockchain technology. The process allows enhanced security and confidentiality, in particular by integrating the constraints in terms of geolocation and number of the messages validation.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/7a/b1/b1/191f1d76b07922/FR3049089B1.pdf"},"FR3049089 (A1); US2019044735; WO2017162931")),(0,n.kt)("h4",{id:"process-management-of-smart-contracts-through-transactions-chains"},"Process management of smart-contracts through transactions chains"),(0,n.kt)("p",null,"Digital identities - exchange of value - delegations management, authorizations and revocations - electronic votes management - delivery of goods/supply chain - organizations - health data management - reputation management and certification.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/a6/d6/f3/5210d526791d88/FR3049101A1.pdf"},"FR3049101 (A1)")),(0,n.kt)("h4",{id:"atomic-validation-of-transaction-chains-through-a-decentralized-network"},"Atomic validation of transaction chains through a decentralized network"),(0,n.kt)("p",null,"Consensus ARCH (Atomic Rotating Commitment Heuristic Election), optimized and geo-secure replication process - self-repair network and data - Prediction Module and Supervised Multicast Network Layer (P2P Protocol).",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/cf/e1/14/f4943679e7ecb9/FR3098972A1.pdf"},"FR3098972 (A1)")),(0,n.kt)("h4",{id:"method-associated-with-the-digital-identity-management-of-an-individual-a-connected-object-an-organization-a-service-through-a-decentralized-network"},"Method associated with the Digital identity management of an individual, a connected object, an organization, a service through a decentralized network"),(0,n.kt)("p",null,"Identification-authentication-registration of unique or multiple digital identities for an individual or an object on an external device - exchange of values without disclosure - condition management - management of members, owners, multi-signatures, reputation, certification and recertification of a digital identity - management of mutable external identifiers through digital identity.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/3f/64/99/5d6d7f66e5c6a9/FR3049088A1.pdf"},"FR3049088 (A1)")),(0,n.kt)("h4",{id:"method-of-securing-transactions-through-knowledge-and-through-cross-capabilities-across-a-decentralized-network"},"Method of securing transactions through knowledge and through cross-capabilities across a decentralized network"),(0,n.kt)("p",null,"Cryptographic process to cross-reference the knowledge and capabilities of the devices so as to prohibit any unauthorized operation, renew and permanently forfeit all cryptographic keys of all devices, remove correlation elements of time, value, and actors involved (privacy wheel), initialize cryptographic keys for a decentralized network without using an external device to the system, minimize the exposure of public keys related to private keys of the device, to reset a device and revoke a user.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/86/18/ee/c63fde292d1186/FR3049087A1.pdf"},"FR3049087 (A1)")),(0,n.kt)("h3",{id:"biometrics"},"Biometrics"),(0,n.kt)("h4",{id:"method-of-biometric-authentication-without-disclosure-through-a-decentralized-network"},"Method of Biometric Authentication without disclosure through a decentralized network"),(0,n.kt)("p",null,"A method of not having to reveal all or part of the biometric measurements of an individual - integrating the compensations of the biometric measurements and lifelong morphological adaptability of an individual - never having to store any biometric data or any biometric measurement or a cryptographic key relating to an individual - making it possible to record several fingers of the same individual without disclosure and allowing operations without a network and without an individual having never used any device before.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/ca/b7/36/99a19c0295592c/FR3049086A1.pdf"},"FR3049086 (A1)")),(0,n.kt)("h4",{id:"biometric-adaptive-authentication-device-using-ultrasound-photographs-in-visible-light-of-contrast-and-infrared-without-disclosure-through-a-decentralized-network"},"Biometric adaptive authentication device using ultrasound, photographs in visible light of contrast and infrared, without disclosure through a decentralized network"),(0,n.kt)("p",null,"A Biometric authentication device without any disclosure obtained from ultrasounds and photograph of the venous network of the finger, of the lateral fingerprint of the finger and configured to take a photograph of the infrared intrinsic emission of the finger, to check the heart rate and perform an analysis, Multireferential spectrometry of the finger.",(0,n.kt)("br",null),"\nRef: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/95/a6/f7/7ada4308bbc1cb/FR3049090A1.pdf"},"FR3049090 (A1); CN108780501; CN109074478; US2019089539; WO2017162930")),(0,n.kt)("h4",{id:"device-for-the-reproducible-positioning-of-at-least-one-finger-of-an-individual-while-taking-the-biometric-measurements"},"Device for the reproducible positioning of at least one finger of an individual while taking the biometric measurements."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/f9/37/a9/d1afa7dacdfc54/FR3049093A1.pdf"},"FR3049093 (A1)")),(0,n.kt)("h4",{id:"device-for-biometric-ultrasonic-testing-and-vital-signs-verification"},"Device for Biometric ultrasonic testing and vital signs verification."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/15/01/34/51b6fe0fa7d90e/FR3049091A1.pdf"},"FR3049091 (A1)")),(0,n.kt)("h4",{id:"device-for-biometric-authentication-and-reliability-of-measurements-by-visible-and-infrared-light-photography-spectrometry-and-differential-analysis"},"Device for biometric authentication and reliability of measurements by visible and infrared light photography, spectrometry, and differential analysis."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/26/f8/c9/9174c1c37723bf/FR3049092A1.pdf"},"FR3049092 (A1)")),(0,n.kt)("h3",{id:"hardware"},"Hardware"),(0,n.kt)("h4",{id:"communication-device-for-communicating-with-other-devices-and-enabling-nearby-transactions-and-creating-a-mesh-network"},"Communication device for communicating with other devices and enabling nearby transactions and creating a mesh network."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/95/c5/fd/7ecba7b274353a/FR3049085A1.pdf"},"FR3049085 (A1)")),(0,n.kt)("h4",{id:"mechanical-and-electrical-coupling-device-to-connect-to-a-computer-periphery-without-damaging-the-host-system"},"Mechanical and electrical coupling device to connect to a computer periphery without damaging the host system."),(0,n.kt)("p",null,"Ref: ",(0,n.kt)("a",{parentName:"p",href:"https://patentimages.storage.googleapis.com/19/62/34/66e7c6051da9c8/FR3049121A1.pdf"},"FR3049121 (A1)")))}u.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/368a7f2c.156fd5ee.js b/assets/js/368a7f2c.156fd5ee.js new file mode 100644 index 000000000..619cb2aab --- /dev/null +++ b/assets/js/368a7f2c.156fd5ee.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[48],{3905:(t,e,i)=>{i.d(e,{Zo:()=>c,kt:()=>m});var a=i(67294);function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function r(t){for(var e=1;e=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var s=a.createContext({}),d=function(t){var e=a.useContext(s),i=e;return t&&(i="function"==typeof t?t(e):r(r({},e),t)),i},c=function(t){var e=d(t.components);return a.createElement(s.Provider,{value:e},t.children)},p="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},h=a.forwardRef((function(t,e){var i=t.components,n=t.mdxType,o=t.originalType,s=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),p=d(i),h=n,m=p["".concat(s,".").concat(h)]||p[h]||u[h]||o;return i?a.createElement(m,r(r({ref:e},c),{},{components:i})):a.createElement(m,r({ref:e},c))}));function m(t,e){var i=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var o=i.length,r=new Array(o);r[0]=h;var l={};for(var s in e)hasOwnProperty.call(e,s)&&(l[s]=e[s]);l.originalType=t,l[p]="string"==typeof t?t:n,r[1]=l;for(var d=2;d{i.r(e),i.d(e,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var a=i(87462),n=(i(67294),i(3905));i(8209);const o={id:"aeSwap",title:"DEX - Application Front End",sidebar_label:"aeSwap",sidebar_position:1},r="aeSwap - Tutorial",l={unversionedId:"participate/dex/usage/aeSwap",id:"participate/dex/usage/aeSwap",title:"DEX - Application Front End",description:"Please note that aeSwap is currently available exclusively on the testnet.",source:"@site/docs/participate/dex/usage/aeSwap.md",sourceDirName:"participate/dex/usage",slug:"/participate/dex/usage/aeSwap",permalink:"/participate/dex/usage/aeSwap",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:1,frontMatter:{id:"aeSwap",title:"DEX - Application Front End",sidebar_label:"aeSwap",sidebar_position:1},sidebar:"docs",previous:{title:"Usage",permalink:"/category/usage-2"},next:{title:"Archethic Wallet",permalink:"/participate/wallet/"}},s={},d=[{value:"Welcome Screen",id:"welcome-screen",level:2},{value:"Application Menu",id:"application-menu",level:3},{value:"Feature Access",id:"feature-access",level:3},{value:"Swapping Your Tokens",id:"swapping-your-tokens",level:2},{value:"Step 1: Swap - Essential Information",id:"step-1-swap---essential-information",level:3},{value:"Pre-transaction Validations",id:"pre-transaction-validations",level:4},{value:"Step 2: Finalizing swap: Confirmation and Validation Steps",id:"step-2-finalizing-swap-confirmation-and-validation-steps",level:3},{value:"Wallet Validations for Swap Transaction",id:"wallet-validations-for-swap-transaction",level:4},{value:"Create a pool and add liquidity",id:"create-a-pool-and-add-liquidity",level:2},{value:"Step 1: Creating a Liquidity Pool: Essential Information",id:"step-1-creating-a-liquidity-pool-essential-information",level:3},{value:"Pre-creation Validations",id:"pre-creation-validations",level:4},{value:"Step 2: Finalizing Pool Creation: Confirmation and Validation Steps",id:"step-2-finalizing-pool-creation-confirmation-and-validation-steps",level:3},{value:"Wallet Validations for Liquidity Transactions",id:"wallet-validations-for-liquidity-transactions",level:4},{value:"Navigating Pool Information",id:"navigating-pool-information",level:2},{value:"Front View: Essential Pool Details",id:"front-view-essential-pool-details",level:3},{value:"Back View: Exploring Pool Details",id:"back-view-exploring-pool-details",level:3},{value:"Interacting with Pools: Available Actions",id:"interacting-with-pools-available-actions",level:3},{value:"Add Liquidity",id:"add-liquidity",level:2},{value:"Step 1: Adding Liquidity: Essential Information",id:"step-1-adding-liquidity-essential-information",level:3},{value:"Pre-transaction Validations",id:"pre-transaction-validations-1",level:4},{value:"Step 2: Finalizing Liquidity Addition: Confirmation and Validation Steps",id:"step-2-finalizing-liquidity-addition-confirmation-and-validation-steps",level:3},{value:"Wallet Validations for Liquidity Transactions",id:"wallet-validations-for-liquidity-transactions-1",level:4},{value:"Remove Liquidity",id:"remove-liquidity",level:2},{value:"Step 1: Removing Liquidity: Essential Information",id:"step-1-removing-liquidity-essential-information",level:3},{value:"Pre-transaction Validations",id:"pre-transaction-validations-2",level:4},{value:"Step 2: Finalizing Liquidity Removal: Confirmation and Validation Steps",id:"step-2-finalizing-liquidity-removal-confirmation-and-validation-steps",level:3},{value:"Wallet Validations for Liquidity Transactions",id:"wallet-validations-for-liquidity-transactions-2",level:4}],c={toc:d},p="wrapper";function u(t){let{components:e,...o}=t;return(0,n.kt)(p,(0,a.Z)({},c,o,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"aeswap---tutorial"},"aeSwap - Tutorial"),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Please note that aeSwap is currently available exclusively on the testnet.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"aeSwap is a web application accessible through internet browsers and is compatible only with desktop versions of the Archethic wallet, which include macOS, Linux, and Windows platforms.")),(0,n.kt)("admonition",{type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"Ensure you have the appropriate desktop version of the Archethic wallet installed on your system to interact with the application effectively. You can download the wallet from ",(0,n.kt)("a",{parentName:"p",href:"https://www.archethic.net/wallet/"},"here"),".")),(0,n.kt)("admonition",{type:"tip"},(0,n.kt)("p",{parentName:"admonition"},"For optimal performance, use the latest version of your internet browser and keep your desktop wallet updated.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Access:")," ",(0,n.kt)("a",{parentName:"p",href:"https://dex.testnet.archethic.net"},"https://dex.testnet.archethic.net"),(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Source code:")," ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/dex"},"https://github.com/archethic-foundation/dex")),(0,n.kt)("p",null,"This Flutter-built web application enables swapping assets on-chain, adding liquidity, and accessing yield farming."),(0,n.kt)("admonition",{type:"success"},(0,n.kt)("p",{parentName:"admonition"},"Before proceeding, familiarize yourself with ",(0,n.kt)("a",{parentName:"p",href:"/participate/dex/"},"Archethic's DEX Key Concepts"),".")),(0,n.kt)("h2",{id:"welcome-screen"},"Welcome Screen"),(0,n.kt)("p",null,"Upon accessing aeSwap, you are greeted with a welcome screen. To begin, click on the 'Go!' button."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Welcome Screen",src:i(66578).Z,width:"1427",height:"911"}),(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("img",{alt:"aeSwap Main Screen",src:i(9288).Z,width:"2878",height:"1444"})),(0,n.kt)("h3",{id:"application-menu"},"Application Menu"),(0,n.kt)("p",null,"A right-hand header menu provides links to essential information and application documentation. It includes an option to send logs to Archethic for troubleshooting purposes."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Menu",src:i(42735).Z,width:"300",height:"351"})),(0,n.kt)("h3",{id:"feature-access"},"Feature Access"),(0,n.kt)("p",null,"The top menu grants access to various DEX functionalities:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Swapping assets"),(0,n.kt)("li",{parentName:"ul"},"Listing Pools / Adding or removing Liquidity"),(0,n.kt)("li",{parentName:"ul"},"Farming")),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Menu Features",src:i(91449).Z,width:"1368",height:"150"})),(0,n.kt)("h2",{id:"swapping-your-tokens"},"Swapping Your Tokens"),(0,n.kt)("p",null,"The DEX process involves multiple steps:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Inputting information to initiate the swap"),(0,n.kt)("li",{parentName:"ol"},"Confirming the entered details"),(0,n.kt)("li",{parentName:"ol"},"Executing the swap, with progress tracking and transaction signing in the Archethic wallet")),(0,n.kt)("h3",{id:"step-1-swap---essential-information"},"Step 1: Swap - Essential Information"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Swap form",src:i(29595).Z,width:"683",height:"468"})),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Select tokens to swap"),': Click on "Select a token" to access a popup with token info'),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Token Selection",src:i(79460).Z,width:"400",height:"338"})),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Entering Token Amount to swap"),": Begin by inputting the amount of one of the two tokens in the pool's pair. The system will automatically calculate the necessary amount of the second token based on the current pool ratio."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Slippage Tolerance Configuration"),': To manage the impact of price fluctuations during your transaction, click on the wheel icon next to "slippage tolerance." Slippage occurs when the price at which your transaction is executed differs from the price when you submitted it. Adjusting your slippage tolerance allows you to control the maximum price variation you\'re willing to accept.'),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Details"),": Once you've set the amounts, the system will display information about your transaction:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Fees"),": Displayed prominently, this includes the fees charged by liquidity providers for facilitating the swap, as well as any operating costs associated with using the Archethic blockchain. These fees are integral to the transaction cost and contribute to the rewards for liquidity providers."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Price Impact"),": The system calculates and shows the price impact of your transaction, which is the effect your trade will have on the pool's price for the token pair. The price impact is a crucial metric for understanding how the size of your transaction relative to the pool's liquidity can alter the price of the tokens you are trading. A significant transaction in a pool with limited liquidity can lead to a higher price impact.",(0,n.kt)("admonition",{parentName:"li",type:"info"},(0,n.kt)("p",{parentName:"admonition"},"If the price impact exceeds certain thresholds (greater than 1% or 5%), the system issues a warning. This is to alert you that your transaction could significantly alter market prices, potentially leading to less favorable trade conditions."))),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Minimum received"),": This figure represents the least amount you can expect to receive as a result of your transaction, taking into account slippage and fees. It ensures that you are aware of the worst-case scenario based on the current market conditions and your specified slippage tolerance."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current TVL of the Pool"),": The Total Value Locked (TVL) in the pool is provided, giving you an idea of the pool's size and liquidity. A larger TVL indicates a more significant pool, which generally leads to lower price impact from individual transactions."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Token Ratio"),": Lastly, you will see the current ratio of tokens in the pool. This ratio is vital for understanding the liquidity dynamics and potential price movements within the pool.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Swap"),': Click the "Swap" button to finalize your swap. This action initiates the transaction and swaps your tokens.'),(0,n.kt)("h4",{id:"pre-transaction-validations"},"Pre-transaction Validations"),(0,n.kt)("p",null,"Before swapping, the system performs a vital check to ensure:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Availability"),": Verifies that the necessary token to swap is available in your wallet.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"When swapping involving UCO (the native token of the Archethic blockchain), the system automatically calculates and reserves the necessary amount for transaction fees associated with liquidity addition. As a result, the maximum amount of UCO that can be allocated is less than your total UCO balance to accommodate these costs.")),(0,n.kt)("h3",{id:"step-2-finalizing-swap-confirmation-and-validation-steps"},"Step 2: Finalizing swap: Confirmation and Validation Steps"),(0,n.kt)("p",null,'After you submit the swap form by clicking the "Swap" button, you will be directed to a confirmation screen. This screen serves a critical role in the swap process, enabling you to:'),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Minimum received")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Balances Verification"),": Check your account balances before and after the swap to understand the impact of your transaction."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Fees")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Price impact"),'\nIf the details align with your intentions and you are content with the proposed setup, proceed by clicking on the "Confirm swap" button to move forward in the process.')),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Swap confirm",src:i(10950).Z,width:"672",height:"535"})),(0,n.kt)("h4",{id:"wallet-validations-for-swap-transaction"},"Wallet Validations for Swap Transaction"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Confirmation"),": You will need to approve 1 transaction."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Address"),": Upon successful completion of this transaction, you will be provided with the address and the amount swapped. This address allows you to verify the transaction on the blockchain, ensuring transparency and security in your operation."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Swap end",src:i(47135).Z,width:"635",height:"451"})),(0,n.kt)("h2",{id:"create-a-pool-and-add-liquidity"},"Create a pool and add liquidity"),(0,n.kt)("p",null,'You can create a liquidity pool from the liquidity menu via the "Create a pool" button.'),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add pool button",src:i(72047).Z,width:"828",height:"129"})),(0,n.kt)("h3",{id:"step-1-creating-a-liquidity-pool-essential-information"},"Step 1: Creating a Liquidity Pool: Essential Information"),(0,n.kt)("p",null,"To establish a liquidity pool on the DEX, the following information is necessary:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Pair"),": Identify the two tokens that will constitute the pair within the pool."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Initial Investment"),": Specify the amount of each token you intend to contribute. This initial contribution determines the pool's initial price ratio.")),(0,n.kt)("h4",{id:"pre-creation-validations"},"Pre-creation Validations"),(0,n.kt)("p",null,"Before creating a liquidity pool, the system conducts several checks to ensure compliance and feasibility:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Unique Pair Check"),": Ensures that a pool with the selected token pair does not already exist."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Liquidity Requirements"),": Confirms that your Archethic wallet holds a sufficient quantity of the tokens intended for liquidity provision.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"When creating a pool involving UCO (the native token of the Archethic blockchain), the system automatically calculates and reserves the necessary amount for transaction fees associated with pool creation and liquidity addition. As a result, the maximum amount of UCO that can be allocated is less than your total UCO balance to accommodate these costs.")),(0,n.kt)("hr",null),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add pool form",src:i(27766).Z,width:"692",height:"414"})),(0,n.kt)("h3",{id:"step-2-finalizing-pool-creation-confirmation-and-validation-steps"},"Step 2: Finalizing Pool Creation: Confirmation and Validation Steps"),(0,n.kt)("p",null,'After you submit the pool creation form by clicking the "Create a new pool" button, you will be directed to a confirmation screen. This screen serves a critical role in the pool creation process, enabling you to:'),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Review Token Ratio"),": Examine the initial ratio between the two tokens in your new pool to ensure it aligns with your expectations."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Balance Verification"),': Check your account balances before and after liquidity is added to understand the impact of your transaction.\nIf the details align with your intentions and you are content with the proposed setup, proceed by clicking on the "Confirm the creation" button to move forward in the process.')),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add pool confirm",src:i(12827).Z,width:"686",height:"547"})),(0,n.kt)("h4",{id:"wallet-validations-for-liquidity-transactions"},"Wallet Validations for Liquidity Transactions"),(0,n.kt)("p",null,"The creation of the pool and addition of liquidity to the pool necessitate two separate validations within your Archethic wallet:"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Confirmation"),": You will need to approve two transactions \u2013 one for creating the pool and another for adding liquidity to it."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Addresses"),": Upon successful completion of these transactions, you will be provided with their addresses. These addresses allow you to verify the transactions on the blockchain, ensuring transparency and security in your operations."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add pool end",src:i(53854).Z,width:"662",height:"458"})),(0,n.kt)("h2",{id:"navigating-pool-information"},"Navigating Pool Information"),(0,n.kt)("p",null,'Our DEX offers a unique and engaging way to access detailed information about each liquidity pool through an interactive card. You can easily explore this card by clicking on the exclamation mark (!) icon or the house icon to "rotate" the view, revealing comprehensive details about the pools in a visually intuitive manner.'),(0,n.kt)("h3",{id:"front-view-essential-pool-details"},"Front View: Essential Pool Details"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Pool List Front",src:i(49123).Z,width:"511",height:"521"})),(0,n.kt)("p",null,"When viewing the front of the card, users are presented with a rich set of information designed to provide a quick and informative snapshot of each pool:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Pair and Logos"),": Each pool is represented by its pair of tokens, accompanied by their logos when available, for easy identification."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Verification Status"),": A green icon signifies that the pool has been officially verified by Archethic, indicating a layer of trust and security."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Personal Liquidity Contribution"),": If you have added liquidity to a pool, a yellow star icon will highlight your participation, making it easy to track your investments."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Total Value Locked (TVL)"),": The TVL is displayed in dollars, offering a clear view of the pool's size and the total capital invested."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Trading Dynamics"),": Detailed statistics on trading volume and fees collected over the last 24 hours and cumulatively are provided to give users insights into the pool's activity and profitability.")),(0,n.kt)("h3",{id:"back-view-exploring-pool-details"},"Back View: Exploring Pool Details"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Pool List Back",src:i(17675).Z,width:"514",height:"520"})),(0,n.kt)("p",null,"You can find in this side of the card:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Pool Address"),": Displayed prominently for easy reference. Accompanying the address, an icon for quick copying allows users to easily share or save the address. - Additionally, a separate icon links directly to the blockchain explorer, where users can delve into full details and analytics of the pool."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Holdings"),": This section lists the exact number of tokens currently deposited within the pool, providing a clear view of the pool's liquidity depth."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Swap Fee Percentage"),": The fee charged for swap transactions within this particular pool is displayed as a percentage. This fee contributes to the rewards earned by liquidity providers, representing an essential metric for potential and current investors.")),(0,n.kt)("h3",{id:"interacting-with-pools-available-actions"},"Interacting with Pools: Available Actions"),(0,n.kt)("p",null,"On our DEX, participants have the flexibility to engage with liquidity pools through a variety of actions, each designed to suit different strategies and needs. Here\u2019s a concise overview of the options available:"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Exchange Pool Tokens"),": Users can swap tokens within a pool, utilizing the liquidity available to exchange one token for another. This action is fundamental to the operation of a DEX, allowing users to seamlessly trade assets at current market rates determined by the pool's liquidity and token ratio."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Add Liquidity"),": If you're looking to contribute to a pool, this action enables you to deposit your tokens into the pool. Adding liquidity increases the pool's total value locked (TVL) and, in return, you receive liquidity provider (LP) tokens. These LP tokens represent your share of the pool and entitle you to a portion of the trading fees generated by the pool's activity."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remove Liquidity"),": When you wish to retrieve your deposited tokens from a pool, this action allows you to do so. By returning your LP tokens, you can claim back your share of the pool, along with any accrued fees, based on the current ratio of tokens within the pool. This action is essential for managing your investments and realizing potential gains from fee accumulation."),(0,n.kt)("h2",{id:"add-liquidity"},"Add Liquidity"),(0,n.kt)("p",null,"Enhancing your portfolio by adding liquidity to a pool is a straightforward process designed for ease of use and efficiency. Here's how you can contribute to the liquidity of your chosen pool:"),(0,n.kt)("h3",{id:"step-1-adding-liquidity-essential-information"},"Step 1: Adding Liquidity: Essential Information"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add liquidity form",src:i(17258).Z,width:"671",height:"562"})),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Entering Token Amounts"),": Begin by inputting the amount of one of the two tokens in the pool's pair. The system will automatically calculate the necessary amount of the second token based on the current pool ratio, ensuring your contribution maintains the pool's balance."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Slippage Tolerance Configuration"),': To manage the impact of price fluctuations during your transaction, click on the wheel icon next to "slippage tolerance." Slippage occurs when the price at which your transaction is executed differs from the price when you submitted it. Adjusting your slippage tolerance allows you to control the maximum price variation you\'re willing to accept.'),(0,n.kt)("p",null,"Transaction Details: Once you've set the amounts, the system will display information about your transaction:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Minimum Token Amounts"),": The least amount of each token that will be added to the pool, considering slippage and transaction timing."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Estimated LP Tokens"),": An estimation of how many liquidity provider (LP) tokens you'll receive in return. These tokens represent your share of the pool and your entitlement to a portion of the trading fees.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Add Liquidity"),': Click the "Add liquidity" button to finalize your contribution. This action initiates the transaction and adds your tokens to the pool.'),(0,n.kt)("h4",{id:"pre-transaction-validations-1"},"Pre-transaction Validations"),(0,n.kt)("p",null,"Before adding liquidity, the system performs a vital check to ensure:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Availability"),": Verifies that the necessary tokens are available in your wallet for the liquidity addition.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"When adding liquidity involving UCO (the native token of the Archethic blockchain), the system automatically calculates and reserves the necessary amount for transaction fees associated with liquidity addition. As a result, the maximum amount of UCO that can be allocated is less than your total UCO balance to accommodate these costs.")),(0,n.kt)("h3",{id:"step-2-finalizing-liquidity-addition-confirmation-and-validation-steps"},"Step 2: Finalizing Liquidity Addition: Confirmation and Validation Steps"),(0,n.kt)("p",null,'After you submit the liquidity addition form by clicking the "Add liquidity" button, you will be directed to a confirmation screen. This screen serves a critical role in the liquidity addition process, enabling you to:'),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Review Token Ratio"),": Examine the initial ratio between the two tokens in your new pool to ensure it aligns with your expectations."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Balance Verification"),': Check your account balances before and after liquidity is added to understand the impact of your transaction.\nIf the details align with your intentions and you are content with the proposed setup, proceed by clicking on the "Confirm the creation" button to move forward in the process.')),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add liquidity confirm",src:i(36223).Z,width:"676",height:"534"})),(0,n.kt)("h4",{id:"wallet-validations-for-liquidity-transactions-1"},"Wallet Validations for Liquidity Transactions"),(0,n.kt)("p",null,"The addition of liquidity to the pool necessitates two separate validations within your Archethic wallet:"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Confirmation"),": You will need to approve 1 transaction."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Address"),": Upon successful completion of this transaction, you will be provided with the address. This address allows you to verify the transaction on the blockchain, ensuring transparency and security in your operation."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add liquidity end",src:i(33522).Z,width:"638",height:"442"})),(0,n.kt)("h2",{id:"remove-liquidity"},"Remove Liquidity"),(0,n.kt)("p",null,"Withdrawing your liquidity from a pool is a flexible process that can be initiated at any time, allowing you to reclaim all or a portion of your deposited tokens."),(0,n.kt)("h3",{id:"step-1-removing-liquidity-essential-information"},"Step 1: Removing Liquidity: Essential Information"),(0,n.kt)("p",null,"The process begins with the user entering the amount of LP (Liquidity Provider) tokens they wish to redeem. This action is facilitated through a user-friendly form designed to make the withdrawal process as straightforward as possible."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Remove liquidity form",src:i(72640).Z,width:"671",height:"478"})),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Entering LP Token Amounts"),": The amount of LP tokens you wish to use for the withdrawal. LP tokens represent your share of the pool's total liquidity."),(0,n.kt)("p",null,"Transaction Details: Once you've set the amount, the system will display information about your transaction:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Amounts of token to get back"),": This crucial piece of information tells you exactly how many of each token in the pool you will receive in return for the specified amount of LP tokens. This is calculated based on the current ratio of tokens within the pool and the total amount of liquidity you're choosing to withdraw.\nBy presenting these details, the system aims to provide users with a clear understanding of the outcome of their liquidity removal transaction, allowing for precise and confident decision-making.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remove Liquidity"),': Click the "Remove liquidity" button to finalize your withdrawal. This action initiates the transaction, removes (or "burns") your LP tokens from circulation, and the corresponding amount of the original tokens you provided as liquidity will be returned to you. The exact amounts are calculated according to the current liquidity ratio within the pool and the total number of LP tokens you are redeeming.'),(0,n.kt)("h4",{id:"pre-transaction-validations-2"},"Pre-transaction Validations"),(0,n.kt)("p",null,"Before removing liquidity, the system performs a vital check to ensure:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Availability"),": Verifies that the necessary LP tokens are available in your wallet for the liquidity removal.")),(0,n.kt)("h3",{id:"step-2-finalizing-liquidity-removal-confirmation-and-validation-steps"},"Step 2: Finalizing Liquidity Removal: Confirmation and Validation Steps"),(0,n.kt)("p",null,'After you submit the liquidity removal form by clicking the "Remove liquidity" button, you will be directed to a confirmation screen. This screen serves a critical role in the liquidity removal process, enabling you to:'),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Balance Verification"),': Check your account balances before and after liquidity is removed to understand the impact of your transaction.\nIf the details align with your intentions and you are content with the proposed setup, proceed by clicking on the "Confirm" button to move forward in the process.')),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Remove liquidity confirm",src:i(89776).Z,width:"668",height:"455"})),(0,n.kt)("h4",{id:"wallet-validations-for-liquidity-transactions-2"},"Wallet Validations for Liquidity Transactions"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Confirmation"),": You will need to approve 1 transaction."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Address"),": Upon successful completion of this transaction, you will be provided with the address. This address allows you to verify the transaction on the blockchain, ensuring transparency and security in your operation."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Remove liquidity end",src:i(81835).Z,width:"628",height:"435"})))}u.isMDXComponent=!0},72047:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-AddPool-Btn-8802260f6a4e080e0e43693f05a89658.png"},12827:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-AddPool-Confirm-b9afbe37dd7e7b9a216b13e1b710d240.png"},53854:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-AddPool-End-fd672198a60fe97137f2428962c5d564.png"},27766:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-AddPool-Form-79fc1b4589509a59bb2f7c670a727bd7.png"},91449:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Features-8e39156c8d3964438052a0b22a5686f6.png"},36223:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityAdd-Confirm-2908cbdf739f6c484198d7be1d3be4ac.png"},33522:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityAdd-End-f7b1ce8d7213662b373840b0bdb1128d.png"},17258:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityAdd-Form-caf7d83d9ba6920f7e02b1fab8604c72.png"},89776:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityRemove-Confirm-cb4f4356d48b537fd10b6b25008138a0.png"},81835:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityRemove-End-c2cfa7377911ba1482bc24f72d932a2f.png"},72640:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityRemove-Form-608b6d62f58d3a660e577082654c4ae0.png"},9288:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Main-Screen-526c6a08f3ddce92a73e8cffff42ffcc.png"},42735:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Menu-379a4725836377cb14727c9bf8455aaa.png"},17675:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-PoolList-Back-aa6a77a85e865e5bd30e3307cbbb3804.png"},49123:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-PoolList-Front-d6661b10d4e0eccdf6aa93ef118d7b77.png"},79460:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Select-Token-7a26ec8ffda50e20832eae850ecc415e.png"},10950:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Swap-Confirm-7e4b278ac21c3d200eabf0be10055fef.png"},47135:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Swap-End-6a5dce178fe5fe2a1900444bb6593450.png"},29595:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Swap-Form-18e4ba627c4b85d93b9fecf93ece8d1f.png"},66578:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Welcome-dc49b570194e1362170a1c9e7f6342bf.png"},8209:(t,e,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/368a7f2c.64362890.js b/assets/js/368a7f2c.64362890.js deleted file mode 100644 index cfca2cdc7..000000000 --- a/assets/js/368a7f2c.64362890.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[48],{3905:(t,e,i)=>{i.d(e,{Zo:()=>c,kt:()=>m});var a=i(67294);function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function r(t){for(var e=1;e=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var s=a.createContext({}),d=function(t){var e=a.useContext(s),i=e;return t&&(i="function"==typeof t?t(e):r(r({},e),t)),i},c=function(t){var e=d(t.components);return a.createElement(s.Provider,{value:e},t.children)},p="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},h=a.forwardRef((function(t,e){var i=t.components,n=t.mdxType,o=t.originalType,s=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),p=d(i),h=n,m=p["".concat(s,".").concat(h)]||p[h]||u[h]||o;return i?a.createElement(m,r(r({ref:e},c),{},{components:i})):a.createElement(m,r({ref:e},c))}));function m(t,e){var i=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var o=i.length,r=new Array(o);r[0]=h;var l={};for(var s in e)hasOwnProperty.call(e,s)&&(l[s]=e[s]);l.originalType=t,l[p]="string"==typeof t?t:n,r[1]=l;for(var d=2;d{i.r(e),i.d(e,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var a=i(87462),n=(i(67294),i(3905));i(8209);const o={id:"aeSwap",title:"DEX - Application Front End",sidebar_label:"aeSwap",sidebar_position:1},r="aeSwap - Tutorial",l={unversionedId:"participate/dex/usage/aeSwap",id:"participate/dex/usage/aeSwap",title:"DEX - Application Front End",description:"Please note that aeSwap is currently available exclusively on the testnet.",source:"@site/docs/participate/dex/usage/aeSwap.md",sourceDirName:"participate/dex/usage",slug:"/participate/dex/usage/aeSwap",permalink:"/participate/dex/usage/aeSwap",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:1,frontMatter:{id:"aeSwap",title:"DEX - Application Front End",sidebar_label:"aeSwap",sidebar_position:1},sidebar:"docs",previous:{title:"Usage",permalink:"/category/usage-2"},next:{title:"Archethic Wallet",permalink:"/participate/wallet/"}},s={},d=[{value:"Welcome Screen",id:"welcome-screen",level:2},{value:"Application Menu",id:"application-menu",level:3},{value:"Feature Access",id:"feature-access",level:3},{value:"Swapping Your Tokens",id:"swapping-your-tokens",level:2},{value:"Step 1: Swap - Essential Information",id:"step-1-swap---essential-information",level:3},{value:"Pre-transaction Validations",id:"pre-transaction-validations",level:4},{value:"Step 2: Finalizing swap: Confirmation and Validation Steps",id:"step-2-finalizing-swap-confirmation-and-validation-steps",level:3},{value:"Wallet Validations for Swap Transaction",id:"wallet-validations-for-swap-transaction",level:4},{value:"Create a pool and add liquidity",id:"create-a-pool-and-add-liquidity",level:2},{value:"Step 1: Creating a Liquidity Pool: Essential Information",id:"step-1-creating-a-liquidity-pool-essential-information",level:3},{value:"Pre-creation Validations",id:"pre-creation-validations",level:4},{value:"Step 2: Finalizing Pool Creation: Confirmation and Validation Steps",id:"step-2-finalizing-pool-creation-confirmation-and-validation-steps",level:3},{value:"Wallet Validations for Liquidity Transactions",id:"wallet-validations-for-liquidity-transactions",level:4},{value:"Navigating Pool Information",id:"navigating-pool-information",level:2},{value:"Front View: Essential Pool Details",id:"front-view-essential-pool-details",level:3},{value:"Back View: Exploring Pool Details",id:"back-view-exploring-pool-details",level:3},{value:"Interacting with Pools: Available Actions",id:"interacting-with-pools-available-actions",level:3},{value:"Add Liquidity",id:"add-liquidity",level:2},{value:"Step 1: Adding Liquidity: Essential Information",id:"step-1-adding-liquidity-essential-information",level:3},{value:"Pre-transaction Validations",id:"pre-transaction-validations-1",level:4},{value:"Step 2: Finalizing Liquidity Addition: Confirmation and Validation Steps",id:"step-2-finalizing-liquidity-addition-confirmation-and-validation-steps",level:3},{value:"Wallet Validations for Liquidity Transactions",id:"wallet-validations-for-liquidity-transactions-1",level:4},{value:"Remove Liquidity",id:"remove-liquidity",level:2},{value:"Step 1: Removing Liquidity: Essential Information",id:"step-1-removing-liquidity-essential-information",level:3},{value:"Pre-transaction Validations",id:"pre-transaction-validations-2",level:4},{value:"Step 2: Finalizing Liquidity Removal: Confirmation and Validation Steps",id:"step-2-finalizing-liquidity-removal-confirmation-and-validation-steps",level:3},{value:"Wallet Validations for Liquidity Transactions",id:"wallet-validations-for-liquidity-transactions-2",level:4}],c={toc:d},p="wrapper";function u(t){let{components:e,...o}=t;return(0,n.kt)(p,(0,a.Z)({},c,o,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"aeswap---tutorial"},"aeSwap - Tutorial"),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Please note that aeSwap is currently available exclusively on the testnet.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"aeSwap is a web application accessible through internet browsers and is compatible only with desktop versions of the Archethic wallet, which include macOS, Linux, and Windows platforms.")),(0,n.kt)("admonition",{type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"Ensure you have the appropriate desktop version of the Archethic wallet installed on your system to interact with the application effectively. You can download the wallet from ",(0,n.kt)("a",{parentName:"p",href:"https://www.archethic.net/wallet/"},"here"),".")),(0,n.kt)("admonition",{type:"tip"},(0,n.kt)("p",{parentName:"admonition"},"For optimal performance, use the latest version of your internet browser and keep your desktop wallet updated.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Access:")," ",(0,n.kt)("a",{parentName:"p",href:"https://dex.testnet.archethic.net"},"https://dex.testnet.archethic.net"),(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Source code:")," ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/dex"},"https://github.com/archethic-foundation/dex")),(0,n.kt)("p",null,"This Flutter-built web application enables swapping assets on-chain, adding liquidity, and accessing yield farming."),(0,n.kt)("admonition",{type:"success"},(0,n.kt)("p",{parentName:"admonition"},"Before proceeding, familiarize yourself with ",(0,n.kt)("a",{parentName:"p",href:"/participate/dex/"},"Archethic's DEX Key Concepts"),".")),(0,n.kt)("h2",{id:"welcome-screen"},"Welcome Screen"),(0,n.kt)("p",null,"Upon accessing aeSwap, you are greeted with a welcome screen. To begin, click on the 'Go!' button."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Welcome Screen",src:i(66578).Z,width:"1427",height:"911"}),(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("img",{alt:"aeSwap Main Screen",src:i(9288).Z,width:"2878",height:"1444"})),(0,n.kt)("h3",{id:"application-menu"},"Application Menu"),(0,n.kt)("p",null,"A right-hand header menu provides links to essential information and application documentation. It includes an option to send logs to Archethic for troubleshooting purposes."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Menu",src:i(42735).Z,width:"300",height:"351"})),(0,n.kt)("h3",{id:"feature-access"},"Feature Access"),(0,n.kt)("p",null,"The top menu grants access to various DEX functionalities:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Swapping assets"),(0,n.kt)("li",{parentName:"ul"},"Listing Pools / Adding or removing Liquidity"),(0,n.kt)("li",{parentName:"ul"},"Farming")),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Menu Features",src:i(91449).Z,width:"1368",height:"150"})),(0,n.kt)("h2",{id:"swapping-your-tokens"},"Swapping Your Tokens"),(0,n.kt)("p",null,"The DEX process involves multiple steps:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Inputting information to initiate the swap"),(0,n.kt)("li",{parentName:"ol"},"Confirming the entered details"),(0,n.kt)("li",{parentName:"ol"},"Executing the swap, with progress tracking and transaction signing in the Archethic wallet")),(0,n.kt)("h3",{id:"step-1-swap---essential-information"},"Step 1: Swap - Essential Information"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Swap form",src:i(29595).Z,width:"683",height:"468"})),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Select tokens to swap"),': Click on "Select a token" to access a popup with token info'),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Token Selection",src:i(79460).Z,width:"400",height:"338"})),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Entering Token Amount to swap"),": Begin by inputting the amount of one of the two tokens in the pool's pair. The system will automatically calculate the necessary amount of the second token based on the current pool ratio."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Slippage Tolerance Configuration"),': To manage the impact of price fluctuations during your transaction, click on the wheel icon next to "slippage tolerance." Slippage occurs when the price at which your transaction is executed differs from the price when you submitted it. Adjusting your slippage tolerance allows you to control the maximum price variation you\'re willing to accept.'),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Details"),": Once you've set the amounts, the system will display information about your transaction:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Fees"),": Displayed prominently, this includes the fees charged by liquidity providers for facilitating the swap, as well as any operating costs associated with using the Archethic blockchain. These fees are integral to the transaction cost and contribute to the rewards for liquidity providers."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Price Impact"),": The system calculates and shows the price impact of your transaction, which is the effect your trade will have on the pool's price for the token pair. The price impact is a crucial metric for understanding how the size of your transaction relative to the pool's liquidity can alter the price of the tokens you are trading. A significant transaction in a pool with limited liquidity can lead to a higher price impact.",(0,n.kt)("admonition",{parentName:"li",type:"info"},(0,n.kt)("p",{parentName:"admonition"},"If the price impact exceeds certain thresholds (greater than 1% or 5%), the system issues a warning. This is to alert you that your transaction could significantly alter market prices, potentially leading to less favorable trade conditions."))),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Minimum received"),": This figure represents the least amount you can expect to receive as a result of your transaction, taking into account slippage and fees. It ensures that you are aware of the worst-case scenario based on the current market conditions and your specified slippage tolerance."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current TVL of the Pool"),": The Total Value Locked (TVL) in the pool is provided, giving you an idea of the pool's size and liquidity. A larger TVL indicates a more significant pool, which generally leads to lower price impact from individual transactions."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Token Ratio"),": Lastly, you will see the current ratio of tokens in the pool. This ratio is vital for understanding the liquidity dynamics and potential price movements within the pool.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Swap"),': Click the "Swap" button to finalize your swap. This action initiates the transaction and swaps your tokens.'),(0,n.kt)("h4",{id:"pre-transaction-validations"},"Pre-transaction Validations"),(0,n.kt)("p",null,"Before swapping, the system performs a vital check to ensure:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Availability"),": Verifies that the necessary token to swap is available in your wallet.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"When swapping involving UCO (the native token of the Archethic blockchain), the system automatically calculates and reserves the necessary amount for transaction fees associated with liquidity addition. As a result, the maximum amount of UCO that can be allocated is less than your total UCO balance to accommodate these costs.")),(0,n.kt)("h3",{id:"step-2-finalizing-swap-confirmation-and-validation-steps"},"Step 2: Finalizing swap: Confirmation and Validation Steps"),(0,n.kt)("p",null,'After you submit the swap form by clicking the "Swap" button, you will be directed to a confirmation screen. This screen serves a critical role in the swap process, enabling you to:'),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Minimum received")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Balances Verification"),": Check your account balances before and after the swap to understand the impact of your transaction."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Fees")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Price impact"),'\nIf the details align with your intentions and you are content with the proposed setup, proceed by clicking on the "Confirm swap" button to move forward in the process.')),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Swap confirm",src:i(10950).Z,width:"672",height:"535"})),(0,n.kt)("h4",{id:"wallet-validations-for-swap-transaction"},"Wallet Validations for Swap Transaction"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Confirmation"),": You will need to approve 1 transaction."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Address"),": Upon successful completion of this transaction, you will be provided with the address and the amount swapped. This address allows you to verify the transaction on the blockchain, ensuring transparency and security in your operation."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Swap end",src:i(47135).Z,width:"635",height:"451"})),(0,n.kt)("h2",{id:"create-a-pool-and-add-liquidity"},"Create a pool and add liquidity"),(0,n.kt)("p",null,'You can create a liquidity pool from the liquidity menu via the "Create a pool" button.'),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add pool button",src:i(72047).Z,width:"828",height:"129"})),(0,n.kt)("h3",{id:"step-1-creating-a-liquidity-pool-essential-information"},"Step 1: Creating a Liquidity Pool: Essential Information"),(0,n.kt)("p",null,"To establish a liquidity pool on the DEX, the following information is necessary:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Pair"),": Identify the two tokens that will constitute the pair within the pool."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Initial Investment"),": Specify the amount of each token you intend to contribute. This initial contribution determines the pool's initial price ratio.")),(0,n.kt)("h4",{id:"pre-creation-validations"},"Pre-creation Validations"),(0,n.kt)("p",null,"Before creating a liquidity pool, the system conducts several checks to ensure compliance and feasibility:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Unique Pair Check"),": Ensures that a pool with the selected token pair does not already exist."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Liquidity Requirements"),": Confirms that your Archethic wallet holds a sufficient quantity of the tokens intended for liquidity provision.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"When creating a pool involving UCO (the native token of the Archethic blockchain), the system automatically calculates and reserves the necessary amount for transaction fees associated with pool creation and liquidity addition. As a result, the maximum amount of UCO that can be allocated is less than your total UCO balance to accommodate these costs.")),(0,n.kt)("hr",null),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add pool form",src:i(27766).Z,width:"692",height:"414"})),(0,n.kt)("h3",{id:"step-2-finalizing-pool-creation-confirmation-and-validation-steps"},"Step 2: Finalizing Pool Creation: Confirmation and Validation Steps"),(0,n.kt)("p",null,'After you submit the pool creation form by clicking the "Create a new pool" button, you will be directed to a confirmation screen. This screen serves a critical role in the pool creation process, enabling you to:'),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Review Token Ratio"),": Examine the initial ratio between the two tokens in your new pool to ensure it aligns with your expectations."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Balance Verification"),': Check your account balances before and after liquidity is added to understand the impact of your transaction.\nIf the details align with your intentions and you are content with the proposed setup, proceed by clicking on the "Confirm the creation" button to move forward in the process.')),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add pool confirm",src:i(12827).Z,width:"686",height:"547"})),(0,n.kt)("h4",{id:"wallet-validations-for-liquidity-transactions"},"Wallet Validations for Liquidity Transactions"),(0,n.kt)("p",null,"The creation of the pool and addition of liquidity to the pool necessitate two separate validations within your Archethic wallet:"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Confirmation"),": You will need to approve two transactions \u2013 one for creating the pool and another for adding liquidity to it."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Addresses"),": Upon successful completion of these transactions, you will be provided with their addresses. These addresses allow you to verify the transactions on the blockchain, ensuring transparency and security in your operations."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add pool end",src:i(53854).Z,width:"662",height:"458"})),(0,n.kt)("h2",{id:"navigating-pool-information"},"Navigating Pool Information"),(0,n.kt)("p",null,'Our DEX offers a unique and engaging way to access detailed information about each liquidity pool through an interactive card. You can easily explore this card by clicking on the exclamation mark (!) icon or the house icon to "rotate" the view, revealing comprehensive details about the pools in a visually intuitive manner.'),(0,n.kt)("h3",{id:"front-view-essential-pool-details"},"Front View: Essential Pool Details"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Pool List Front",src:i(49123).Z,width:"511",height:"521"})),(0,n.kt)("p",null,"When viewing the front of the card, users are presented with a rich set of information designed to provide a quick and informative snapshot of each pool:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Pair and Logos"),": Each pool is represented by its pair of tokens, accompanied by their logos when available, for easy identification."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Verification Status"),": A green icon signifies that the pool has been officially verified by Archethic, indicating a layer of trust and security."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Personal Liquidity Contribution"),": If you have added liquidity to a pool, a yellow star icon will highlight your participation, making it easy to track your investments."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Total Value Locked (TVL)"),": The TVL is displayed in dollars, offering a clear view of the pool's size and the total capital invested."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Trading Dynamics"),": Detailed statistics on trading volume and fees collected over the last 24 hours and cumulatively are provided to give users insights into the pool's activity and profitability.")),(0,n.kt)("h3",{id:"back-view-exploring-pool-details"},"Back View: Exploring Pool Details"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Pool List Back",src:i(17675).Z,width:"514",height:"520"})),(0,n.kt)("p",null,"You can find in this side of the card:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Pool Address"),": Displayed prominently for easy reference. Accompanying the address, an icon for quick copying allows users to easily share or save the address. - Additionally, a separate icon links directly to the blockchain explorer, where users can delve into full details and analytics of the pool."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Holdings"),": This section lists the exact number of tokens currently deposited within the pool, providing a clear view of the pool's liquidity depth."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Swap Fee Percentage"),": The fee charged for swap transactions within this particular pool is displayed as a percentage. This fee contributes to the rewards earned by liquidity providers, representing an essential metric for potential and current investors.")),(0,n.kt)("h3",{id:"interacting-with-pools-available-actions"},"Interacting with Pools: Available Actions"),(0,n.kt)("p",null,"On our DEX, participants have the flexibility to engage with liquidity pools through a variety of actions, each designed to suit different strategies and needs. Here\u2019s a concise overview of the options available:"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Exchange Pool Tokens"),": Users can swap tokens within a pool, utilizing the liquidity available to exchange one token for another. This action is fundamental to the operation of a DEX, allowing users to seamlessly trade assets at current market rates determined by the pool's liquidity and token ratio."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Add Liquidity"),": If you're looking to contribute to a pool, this action enables you to deposit your tokens into the pool. Adding liquidity increases the pool's total value locked (TVL) and, in return, you receive liquidity provider (LP) tokens. These LP tokens represent your share of the pool and entitle you to a portion of the trading fees generated by the pool's activity."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remove Liquidity"),": When you wish to retrieve your deposited tokens from a pool, this action allows you to do so. By returning your LP tokens, you can claim back your share of the pool, along with any accrued fees, based on the current ratio of tokens within the pool. This action is essential for managing your investments and realizing potential gains from fee accumulation."),(0,n.kt)("h2",{id:"add-liquidity"},"Add Liquidity"),(0,n.kt)("p",null,"Enhancing your portfolio by adding liquidity to a pool is a straightforward process designed for ease of use and efficiency. Here's how you can contribute to the liquidity of your chosen pool:"),(0,n.kt)("h3",{id:"step-1-adding-liquidity-essential-information"},"Step 1: Adding Liquidity: Essential Information"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add liquidity form",src:i(17258).Z,width:"671",height:"562"})),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Entering Token Amounts"),": Begin by inputting the amount of one of the two tokens in the pool's pair. The system will automatically calculate the necessary amount of the second token based on the current pool ratio, ensuring your contribution maintains the pool's balance."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Slippage Tolerance Configuration"),': To manage the impact of price fluctuations during your transaction, click on the wheel icon next to "slippage tolerance." Slippage occurs when the price at which your transaction is executed differs from the price when you submitted it. Adjusting your slippage tolerance allows you to control the maximum price variation you\'re willing to accept.'),(0,n.kt)("p",null,"Transaction Details: Once you've set the amounts, the system will display information about your transaction:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Minimum Token Amounts"),": The least amount of each token that will be added to the pool, considering slippage and transaction timing."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Estimated LP Tokens"),": An estimation of how many liquidity provider (LP) tokens you'll receive in return. These tokens represent your share of the pool and your entitlement to a portion of the trading fees.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Add Liquidity"),': Click the "Add liquidity" button to finalize your contribution. This action initiates the transaction and adds your tokens to the pool.'),(0,n.kt)("h4",{id:"pre-transaction-validations-1"},"Pre-transaction Validations"),(0,n.kt)("p",null,"Before adding liquidity, the system performs a vital check to ensure:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Availability"),": Verifies that the necessary tokens are available in your wallet for the liquidity addition.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"When adding liquidity involving UCO (the native token of the Archethic blockchain), the system automatically calculates and reserves the necessary amount for transaction fees associated with liquidity addition. As a result, the maximum amount of UCO that can be allocated is less than your total UCO balance to accommodate these costs.")),(0,n.kt)("h3",{id:"step-2-finalizing-liquidity-addition-confirmation-and-validation-steps"},"Step 2: Finalizing Liquidity Addition: Confirmation and Validation Steps"),(0,n.kt)("p",null,'After you submit the liquidity addition form by clicking the "Add liquidity" button, you will be directed to a confirmation screen. This screen serves a critical role in the liquidity addition process, enabling you to:'),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Review Token Ratio"),": Examine the initial ratio between the two tokens in your new pool to ensure it aligns with your expectations."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Balance Verification"),': Check your account balances before and after liquidity is added to understand the impact of your transaction.\nIf the details align with your intentions and you are content with the proposed setup, proceed by clicking on the "Confirm the creation" button to move forward in the process.')),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add liquidity confirm",src:i(36223).Z,width:"676",height:"534"})),(0,n.kt)("h4",{id:"wallet-validations-for-liquidity-transactions-1"},"Wallet Validations for Liquidity Transactions"),(0,n.kt)("p",null,"The addition of liquidity to the pool necessitates two separate validations within your Archethic wallet:"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Confirmation"),": You will need to approve 1 transaction."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Address"),": Upon successful completion of this transaction, you will be provided with the address. This address allows you to verify the transaction on the blockchain, ensuring transparency and security in your operation."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Add liquidity end",src:i(33522).Z,width:"638",height:"442"})),(0,n.kt)("h2",{id:"remove-liquidity"},"Remove Liquidity"),(0,n.kt)("p",null,"Withdrawing your liquidity from a pool is a flexible process that can be initiated at any time, allowing you to reclaim all or a portion of your deposited tokens."),(0,n.kt)("h3",{id:"step-1-removing-liquidity-essential-information"},"Step 1: Removing Liquidity: Essential Information"),(0,n.kt)("p",null,"The process begins with the user entering the amount of LP (Liquidity Provider) tokens they wish to redeem. This action is facilitated through a user-friendly form designed to make the withdrawal process as straightforward as possible."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Remove liquidity form",src:i(72640).Z,width:"671",height:"478"})),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Entering LP Token Amounts"),": The amount of LP tokens you wish to use for the withdrawal. LP tokens represent your share of the pool's total liquidity."),(0,n.kt)("p",null,"Transaction Details: Once you've set the amount, the system will display information about your transaction:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Amounts of token to get back"),": This crucial piece of information tells you exactly how many of each token in the pool you will receive in return for the specified amount of LP tokens. This is calculated based on the current ratio of tokens within the pool and the total amount of liquidity you're choosing to withdraw.\nBy presenting these details, the system aims to provide users with a clear understanding of the outcome of their liquidity removal transaction, allowing for precise and confident decision-making.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Remove Liquidity"),': Click the "Remove liquidity" button to finalize your withdrawal. This action initiates the transaction, removes (or "burns") your LP tokens from circulation, and the corresponding amount of the original tokens you provided as liquidity will be returned to you. The exact amounts are calculated according to the current liquidity ratio within the pool and the total number of LP tokens you are redeeming.'),(0,n.kt)("h4",{id:"pre-transaction-validations-2"},"Pre-transaction Validations"),(0,n.kt)("p",null,"Before removing liquidity, the system performs a vital check to ensure:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Token Availability"),": Verifies that the necessary LP tokens are available in your wallet for the liquidity removal.")),(0,n.kt)("h3",{id:"step-2-finalizing-liquidity-removal-confirmation-and-validation-steps"},"Step 2: Finalizing Liquidity Removal: Confirmation and Validation Steps"),(0,n.kt)("p",null,'After you submit the liquidity removal form by clicking the "Remove liquidity" button, you will be directed to a confirmation screen. This screen serves a critical role in the liquidity removal process, enabling you to:'),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Balance Verification"),': Check your account balances before and after liquidity is removed to understand the impact of your transaction.\nIf the details align with your intentions and you are content with the proposed setup, proceed by clicking on the "Confirm" button to move forward in the process.')),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Remove liquidity confirm",src:i(89776).Z,width:"668",height:"455"})),(0,n.kt)("h4",{id:"wallet-validations-for-liquidity-transactions-2"},"Wallet Validations for Liquidity Transactions"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Confirmation"),": You will need to approve 1 transaction."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Transaction Address"),": Upon successful completion of this transaction, you will be provided with the address. This address allows you to verify the transaction on the blockchain, ensuring transparency and security in your operation."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Remove liquidity end",src:i(81835).Z,width:"628",height:"435"})))}u.isMDXComponent=!0},72047:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-AddPool-Btn-8802260f6a4e080e0e43693f05a89658.png"},12827:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-AddPool-Confirm-b9afbe37dd7e7b9a216b13e1b710d240.png"},53854:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-AddPool-End-fd672198a60fe97137f2428962c5d564.png"},27766:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-AddPool-Form-79fc1b4589509a59bb2f7c670a727bd7.png"},91449:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Features-8e39156c8d3964438052a0b22a5686f6.png"},36223:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityAdd-Confirm-2908cbdf739f6c484198d7be1d3be4ac.png"},33522:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityAdd-End-f7b1ce8d7213662b373840b0bdb1128d.png"},17258:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityAdd-Form-caf7d83d9ba6920f7e02b1fab8604c72.png"},89776:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityRemove-Confirm-cb4f4356d48b537fd10b6b25008138a0.png"},81835:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityRemove-End-c2cfa7377911ba1482bc24f72d932a2f.png"},72640:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-LiquidityRemove-Form-608b6d62f58d3a660e577082654c4ae0.png"},9288:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Main-Screen-526c6a08f3ddce92a73e8cffff42ffcc.png"},42735:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Menu-379a4725836377cb14727c9bf8455aaa.png"},17675:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-PoolList-Back-aa6a77a85e865e5bd30e3307cbbb3804.png"},49123:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-PoolList-Front-d6661b10d4e0eccdf6aa93ef118d7b77.png"},79460:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Select-Token-7a26ec8ffda50e20832eae850ecc415e.png"},10950:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Swap-Confirm-7e4b278ac21c3d200eabf0be10055fef.png"},47135:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Swap-End-6a5dce178fe5fe2a1900444bb6593450.png"},29595:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Swap-Form-18e4ba627c4b85d93b9fecf93ece8d1f.png"},66578:(t,e,i)=>{i.d(e,{Z:()=>a});const a=i.p+"assets/images/aeSwap-Welcome-dc49b570194e1362170a1c9e7f6342bf.png"},8209:(t,e,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/378b5e98.4cad9d22.js b/assets/js/378b5e98.4cad9d22.js new file mode 100644 index 000000000..e18290086 --- /dev/null +++ b/assets/js/378b5e98.4cad9d22.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7482],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var n=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i=n.createContext({}),c=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(a),u=o,b=p["".concat(i,".").concat(u)]||p[u]||m[u]||r;return a?n.createElement(b,l(l({ref:t},d),{},{components:a})):n.createElement(b,l({ref:t},d))}));function b(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,l=new Array(r);l[0]=u;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:o,l[1]=s;for(var c=2;c{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>c,contentTitle:()=>s,default:()=>y,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var n=a(87462),o=a(67294),r=a(3905);a(8209);const l={id:"transaction",title:"Transaction",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/objects/transaction",id:"build/api/schema/objects/transaction",title:"Transaction",description:"[Transaction] represents a unitary transaction in the Archethic network.",source:"@site/docs/build/api/schema/objects/transaction.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction",permalink:"/build/api/schema/objects/transaction",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction",title:"Transaction",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionSummary",permalink:"/build/api/schema/objects/transaction-summary"},next:{title:"UcoData",permalink:"/build/api/schema/objects/uco-data"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'Transaction.addressAddress ',id:"code-style-fontweight-normal-transactionbaddressbcodeaddress-",level:4},{value:'Transaction.balanceBalance ',id:"code-style-fontweight-normal-transactionbbalancebcodebalance-",level:4},{value:'Transaction.chainLengthInt ',id:"code-style-fontweight-normal-transactionbchainlengthbcodeint-",level:4},{value:'Transaction.crossValidationStamps[CrossValidationStamp] ',id:"code-style-fontweight-normal-transactionbcrossvalidationstampsbcodecrossvalidationstamp--",level:4},{value:'Transaction.dataData ',id:"code-style-fontweight-normal-transactionbdatabcodedata-",level:4},{value:'Transaction.inputs[TransactionInput] ',id:"code-style-fontweight-normal-transactionbinputsbcodetransactioninput--",level:4},{value:'Transaction.inputs.pagingOffsetNonNegInteger ',id:"code-style-fontweight-normal-transactioninputsbpagingoffsetbcodenonneginteger-",level:5},{value:'Transaction.originSignatureHex ',id:"code-style-fontweight-normal-transactionboriginsignaturebcodehex-",level:4},{value:'Transaction.previousAddressAddress ',id:"code-style-fontweight-normal-transactionbpreviousaddressbcodeaddress-",level:4},{value:'Transaction.previousPublicKeyPublicKey ',id:"code-style-fontweight-normal-transactionbpreviouspublickeybcodepublickey-",level:4},{value:'Transaction.previousSignatureHex ',id:"code-style-fontweight-normal-transactionbprevioussignaturebcodehex-",level:4},{value:'Transaction.typeString ',id:"code-style-fontweight-normal-transactionbtypebcodestring-",level:4},{value:'Transaction.validationStampValidationStamp ',id:"code-style-fontweight-normal-transactionbvalidationstampbcodevalidationstamp-",level:4},{value:'Transaction.versionInt ',id:"code-style-fontweight-normal-transactionbversionbcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,r.kt)(o.Fragment,null,"Specification",(0,r.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:m,Badge:u},h="wrapper";function y(e){let{components:t,...a}=e;return(0,r.kt)(h,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"[Transaction]"," represents a unitary transaction in the Archethic network."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-graphql"},"type Transaction {\n address: Address\n balance: Balance\n chainLength: Int\n crossValidationStamps: [CrossValidationStamp]\n data: Data\n inputs(\n limit: PosInteger\n pagingOffset: NonNegInteger\n): [TransactionInput]\n originSignature: Hex\n previousAddress: Address\n previousPublicKey: PublicKey\n previousSignature: Hex\n type: String\n validationStamp: ValidationStamp\n version: Int\n}\n")),(0,r.kt)("h3",{id:"fields"},"Fields"),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbaddressbcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"address"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbbalancebcodebalance-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"balance"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/balance"},(0,r.kt)("inlineCode",{parentName:"a"},"Balance"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbchainlengthbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"chainLength"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbcrossvalidationstampsbcodecrossvalidationstamp--"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"crossValidationStamps"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/cross-validation-stamp"},(0,r.kt)("inlineCode",{parentName:"a"},"[CrossValidationStamp]"))," ",(0,r.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbdatabcodedata-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"data"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/data"},(0,r.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbinputsbcodetransactioninput--"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"inputs"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-input"},(0,r.kt)("inlineCode",{parentName:"a"},"[TransactionInput]"))," ",(0,r.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null,(0,r.kt)("h5",{parentName:"blockquote",id:"code-style-fontweight-normal-transactioninputsblimitbcodeposinteger-"},(0,r.kt)("a",{parentName:"h5",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.inputs.",(0,r.kt)("b",null,"limit"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h5",href:"/build/api/schema/scalars/pos-integer"},(0,r.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"}))),(0,r.kt)("h5",{id:"code-style-fontweight-normal-transactioninputsbpagingoffsetbcodenonneginteger-"},(0,r.kt)("a",{parentName:"h5",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.inputs.",(0,r.kt)("b",null,"pagingOffset"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h5",href:"/build/api/schema/scalars/non-neg-integer"},(0,r.kt)("inlineCode",{parentName:"a"},"NonNegInteger"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionboriginsignaturebcodehex-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"originSignature"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,r.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbpreviousaddressbcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"previousAddress"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbpreviouspublickeybcodepublickey-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"previousPublicKey"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,r.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbprevioussignaturebcodehex-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"previousSignature"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,r.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbtypebcodestring-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"type"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,r.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbvalidationstampbcodevalidationstamp-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"validationStamp"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/validation-stamp"},(0,r.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbversionbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"version"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h3",{id:"returned-by"},"Returned by"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/last-transaction"},(0,r.kt)("inlineCode",{parentName:"a"},"lastTransaction"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/network-transactions"},(0,r.kt)("inlineCode",{parentName:"a"},"networkTransactions"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction"},(0,r.kt)("inlineCode",{parentName:"a"},"transaction"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-chain"},(0,r.kt)("inlineCode",{parentName:"a"},"transactionChain"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transactions"},(0,r.kt)("inlineCode",{parentName:"a"},"transactions"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/378b5e98.8c7d00ad.js b/assets/js/378b5e98.8c7d00ad.js deleted file mode 100644 index b7f05f605..000000000 --- a/assets/js/378b5e98.8c7d00ad.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7482],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var n=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i=n.createContext({}),c=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(a),u=o,b=p["".concat(i,".").concat(u)]||p[u]||m[u]||r;return a?n.createElement(b,l(l({ref:t},d),{},{components:a})):n.createElement(b,l({ref:t},d))}));function b(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,l=new Array(r);l[0]=u;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:o,l[1]=s;for(var c=2;c{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>c,contentTitle:()=>s,default:()=>y,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var n=a(87462),o=a(67294),r=a(3905);a(8209);const l={id:"transaction",title:"Transaction",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/objects/transaction",id:"build/api/schema/objects/transaction",title:"Transaction",description:"[Transaction] represents a unitary transaction in the Archethic network.",source:"@site/docs/build/api/schema/objects/transaction.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction",permalink:"/build/api/schema/objects/transaction",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction",title:"Transaction",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionSummary",permalink:"/build/api/schema/objects/transaction-summary"},next:{title:"UcoData",permalink:"/build/api/schema/objects/uco-data"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'Transaction.addressAddress ',id:"code-style-fontweight-normal-transactionbaddressbcodeaddress-",level:4},{value:'Transaction.balanceBalance ',id:"code-style-fontweight-normal-transactionbbalancebcodebalance-",level:4},{value:'Transaction.chainLengthInt ',id:"code-style-fontweight-normal-transactionbchainlengthbcodeint-",level:4},{value:'Transaction.crossValidationStamps[CrossValidationStamp] ',id:"code-style-fontweight-normal-transactionbcrossvalidationstampsbcodecrossvalidationstamp--",level:4},{value:'Transaction.dataData ',id:"code-style-fontweight-normal-transactionbdatabcodedata-",level:4},{value:'Transaction.inputs[TransactionInput] ',id:"code-style-fontweight-normal-transactionbinputsbcodetransactioninput--",level:4},{value:'Transaction.inputs.pagingOffsetNonNegInteger ',id:"code-style-fontweight-normal-transactioninputsbpagingoffsetbcodenonneginteger-",level:5},{value:'Transaction.originSignatureHex ',id:"code-style-fontweight-normal-transactionboriginsignaturebcodehex-",level:4},{value:'Transaction.previousAddressAddress ',id:"code-style-fontweight-normal-transactionbpreviousaddressbcodeaddress-",level:4},{value:'Transaction.previousPublicKeyPublicKey ',id:"code-style-fontweight-normal-transactionbpreviouspublickeybcodepublickey-",level:4},{value:'Transaction.previousSignatureHex ',id:"code-style-fontweight-normal-transactionbprevioussignaturebcodehex-",level:4},{value:'Transaction.typeString ',id:"code-style-fontweight-normal-transactionbtypebcodestring-",level:4},{value:'Transaction.validationStampValidationStamp ',id:"code-style-fontweight-normal-transactionbvalidationstampbcodevalidationstamp-",level:4},{value:'Transaction.versionInt ',id:"code-style-fontweight-normal-transactionbversionbcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,r.kt)(o.Fragment,null,"Specification",(0,r.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:m,Badge:u},h="wrapper";function y(e){let{components:t,...a}=e;return(0,r.kt)(h,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"[Transaction]"," represents a unitary transaction in the Archethic network."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-graphql"},"type Transaction {\n address: Address\n balance: Balance\n chainLength: Int\n crossValidationStamps: [CrossValidationStamp]\n data: Data\n inputs(\n limit: PosInteger\n pagingOffset: NonNegInteger\n): [TransactionInput]\n originSignature: Hex\n previousAddress: Address\n previousPublicKey: PublicKey\n previousSignature: Hex\n type: String\n validationStamp: ValidationStamp\n version: Int\n}\n")),(0,r.kt)("h3",{id:"fields"},"Fields"),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbaddressbcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"address"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbbalancebcodebalance-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"balance"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/balance"},(0,r.kt)("inlineCode",{parentName:"a"},"Balance"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbchainlengthbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"chainLength"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbcrossvalidationstampsbcodecrossvalidationstamp--"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"crossValidationStamps"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/cross-validation-stamp"},(0,r.kt)("inlineCode",{parentName:"a"},"[CrossValidationStamp]"))," ",(0,r.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbdatabcodedata-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"data"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/data"},(0,r.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbinputsbcodetransactioninput--"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"inputs"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-input"},(0,r.kt)("inlineCode",{parentName:"a"},"[TransactionInput]"))," ",(0,r.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null,(0,r.kt)("h5",{parentName:"blockquote",id:"code-style-fontweight-normal-transactioninputsblimitbcodeposinteger-"},(0,r.kt)("a",{parentName:"h5",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.inputs.",(0,r.kt)("b",null,"limit"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h5",href:"/build/api/schema/scalars/pos-integer"},(0,r.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"}))),(0,r.kt)("h5",{id:"code-style-fontweight-normal-transactioninputsbpagingoffsetbcodenonneginteger-"},(0,r.kt)("a",{parentName:"h5",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.inputs.",(0,r.kt)("b",null,"pagingOffset"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h5",href:"/build/api/schema/scalars/non-neg-integer"},(0,r.kt)("inlineCode",{parentName:"a"},"NonNegInteger"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionboriginsignaturebcodehex-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"originSignature"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,r.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbpreviousaddressbcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"previousAddress"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbpreviouspublickeybcodepublickey-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"previousPublicKey"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,r.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbprevioussignaturebcodehex-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"previousSignature"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,r.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbtypebcodestring-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"type"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,r.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbvalidationstampbcodevalidationstamp-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"validationStamp"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/validation-stamp"},(0,r.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,r.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-transactionbversionbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"Transaction.",(0,r.kt)("b",null,"version"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h3",{id:"returned-by"},"Returned by"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/last-transaction"},(0,r.kt)("inlineCode",{parentName:"a"},"lastTransaction"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/network-transactions"},(0,r.kt)("inlineCode",{parentName:"a"},"networkTransactions"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction"},(0,r.kt)("inlineCode",{parentName:"a"},"transaction"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-chain"},(0,r.kt)("inlineCode",{parentName:"a"},"transactionChain"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transactions"},(0,r.kt)("inlineCode",{parentName:"a"},"transactions"))," ",(0,r.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/410469d2.87a91afd.js b/assets/js/410469d2.edfd8d61.js similarity index 58% rename from assets/js/410469d2.87a91afd.js rename to assets/js/410469d2.edfd8d61.js index c18f4b321..f0f29f1f2 100644 --- a/assets/js/410469d2.87a91afd.js +++ b/assets/js/410469d2.edfd8d61.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6328],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||i;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"p2p-sampling",title:"P2P availability sampling"},o=void 0,l={unversionedId:"build/core/beacon-chain/p2p-sampling",id:"build/core/beacon-chain/p2p-sampling",title:"P2P availability sampling",description:"Each beacon chain's subset is responsible to perform verification of the nodes is in charge to monitor.",source:"@site/docs/build/core/beacon-chain/p2p-sampling.md",sourceDirName:"build/core/beacon-chain",slug:"/build/core/beacon-chain/p2p-sampling",permalink:"/build/core/beacon-chain/p2p-sampling",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"p2p-sampling",title:"P2P availability sampling"},sidebar:"docs",previous:{title:"BeaconChain",permalink:"/build/core/beacon-chain/"},next:{title:"Bootstrap",permalink:"/build/core/bootstrap"}},c={},s=[{value:"Heartbeat",id:"heartbeat",level:2},{value:"Aggregation",id:"aggregation",level:2}],p={toc:s},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Each beacon chain's subset is responsible to perform verification of the nodes is in charge to monitor."),(0,a.kt)("h2",{id:"heartbeat"},"Heartbeat"),(0,a.kt)("p",null,"So periodically (when a transaction is confirmed or before a slot creation), the nodes of a given subset perform P2P availability sampling of the given peers. "),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"If multiple transactions arrive to a given subset quickly, a timespan of 3s from the previous sampling is used, to determine if we need to sample availability again ")),(0,a.kt)("mermaid",{value:"sequenceDiagram\n Subset node->>+Supervised node: Ping\n Supervised node->>+Subset node: Ok"}),(0,a.kt)("p",null,"A timeout of 1s is given in which a node should respond otherwise it will considered as locally offline by the beacon chain"),(0,a.kt)("h2",{id:"aggregation"},"Aggregation"),(0,a.kt)("p",null,"During the transaction generation of the BeaconChain summary, we aggregate multiple slots into a common structure."),(0,a.kt)("p",null,"All the aggregated P2P samples are accumulated to determine the frequencies of availability and determine the average."),(0,a.kt)("p",null,"So during the ",(0,a.kt)("a",{parentName:"p",href:"/learn/p2p/self-repair"},"Self-Repair"),", we are using those summary and aggregated data to determine if a node is considered as available for the next epoch/cycle."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6328],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||i;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"p2p-sampling",title:"P2P availability sampling"},o=void 0,l={unversionedId:"build/core/beacon-chain/p2p-sampling",id:"build/core/beacon-chain/p2p-sampling",title:"P2P availability sampling",description:"Each beacon chain's subset is responsible to perform verification of the nodes is in charge to monitor.",source:"@site/docs/build/core/beacon-chain/p2p-sampling.md",sourceDirName:"build/core/beacon-chain",slug:"/build/core/beacon-chain/p2p-sampling",permalink:"/build/core/beacon-chain/p2p-sampling",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"p2p-sampling",title:"P2P availability sampling"},sidebar:"docs",previous:{title:"BeaconChain",permalink:"/build/core/beacon-chain/"},next:{title:"Bootstrap",permalink:"/build/core/bootstrap"}},c={},s=[{value:"Heartbeat",id:"heartbeat",level:2},{value:"Aggregation",id:"aggregation",level:2}],p={toc:s},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Each beacon chain's subset is responsible to perform verification of the nodes is in charge to monitor."),(0,a.kt)("h2",{id:"heartbeat"},"Heartbeat"),(0,a.kt)("p",null,"So periodically (when a transaction is confirmed or before a slot creation), the nodes of a given subset perform P2P availability sampling of the given peers. "),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"If multiple transactions arrive to a given subset quickly, a timespan of 3s from the previous sampling is used, to determine if we need to sample availability again ")),(0,a.kt)("mermaid",{value:"sequenceDiagram\n Subset node->>+Supervised node: Ping\n Supervised node->>+Subset node: Ok"}),(0,a.kt)("p",null,"A timeout of 1s is given in which a node should respond otherwise it will considered as locally offline by the beacon chain"),(0,a.kt)("h2",{id:"aggregation"},"Aggregation"),(0,a.kt)("p",null,"During the transaction generation of the BeaconChain summary, we aggregate multiple slots into a common structure."),(0,a.kt)("p",null,"All the aggregated P2P samples are accumulated to determine the frequencies of availability and determine the average."),(0,a.kt)("p",null,"So during the ",(0,a.kt)("a",{parentName:"p",href:"/learn/p2p/self-repair"},"Self-Repair"),", we are using those summary and aggregated data to determine if a node is considered as available for the next epoch/cycle."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/41e024b6.bd8d43f1.js b/assets/js/41e024b6.78efd1cd.js similarity index 67% rename from assets/js/41e024b6.bd8d43f1.js rename to assets/js/41e024b6.78efd1cd.js index 0697e979c..1c60bbccc 100644 --- a/assets/js/41e024b6.bd8d43f1.js +++ b/assets/js/41e024b6.78efd1cd.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7793],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(r),m=o,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||a;return r?n.createElement(f,i(i({ref:t},s),{},{components:r})):n.createElement(f,i({ref:t},s))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"automation",title:"Automate deployments"},i=void 0,c={unversionedId:"participate/aeweb/automation",id:"participate/aeweb/automation",title:"Automate deployments",description:"AEWeb's CLI is really simple to deploy websites from the command line and is handy on low-frequent deployment usage.",source:"@site/docs/participate/aeweb/automation.md",sourceDirName:"participate/aeweb",slug:"/participate/aeweb/automation",permalink:"/participate/aeweb/automation",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"automation",title:"Automate deployments"},sidebar:"docs",previous:{title:"AEWeb Front End",permalink:"/participate/aeweb/usage/aeweb-front"},next:{title:"Archethic's bridge",permalink:"/participate/bridge/"}},l={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"AEWeb's CLI is really simple to deploy websites from the command line and is handy on low-frequent deployment usage.\nHowever, if you need to deploy often a website, the CLI might not be the great tool."),(0,o.kt)("p",null,"To resolve this issue, we have planed a way to automate the deployment of your websites using Github's Actions."),(0,o.kt)("p",null,"This is a simple automation that allow you to deploy to Archethic decentralized web hosting. Under the hood, it's running some part of the AEWeb CLI features."),(0,o.kt)("p",null,"You can decide when your codebase will be deployed on Archethic, for instance foreach push or validated pull-request, or after each release."),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/marketplace/actions/archethic-web"},"Check our Github Action")," to discover how to use it and leverage continuous deployment on Archethic."))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7793],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(r),m=o,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||a;return r?n.createElement(f,i(i({ref:t},s),{},{components:r})):n.createElement(f,i({ref:t},s))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"automation",title:"Automate deployments"},i=void 0,c={unversionedId:"participate/aeweb/automation",id:"participate/aeweb/automation",title:"Automate deployments",description:"AEWeb's CLI is really simple to deploy websites from the command line and is handy on low-frequent deployment usage.",source:"@site/docs/participate/aeweb/automation.md",sourceDirName:"participate/aeweb",slug:"/participate/aeweb/automation",permalink:"/participate/aeweb/automation",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"automation",title:"Automate deployments"},sidebar:"docs",previous:{title:"AEWeb Front End",permalink:"/participate/aeweb/usage/aeweb-front"},next:{title:"Archethic's bridge",permalink:"/participate/bridge/"}},l={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"AEWeb's CLI is really simple to deploy websites from the command line and is handy on low-frequent deployment usage.\nHowever, if you need to deploy often a website, the CLI might not be the great tool."),(0,o.kt)("p",null,"To resolve this issue, we have planed a way to automate the deployment of your websites using Github's Actions."),(0,o.kt)("p",null,"This is a simple automation that allow you to deploy to Archethic decentralized web hosting. Under the hood, it's running some part of the AEWeb CLI features."),(0,o.kt)("p",null,"You can decide when your codebase will be deployed on Archethic, for instance foreach push or validated pull-request, or after each release."),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/marketplace/actions/archethic-web"},"Check our Github Action")," to discover how to use it and leverage continuous deployment on Archethic."))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/441b3d3d.27fcb258.js b/assets/js/441b3d3d.27fcb258.js deleted file mode 100644 index df949f040..000000000 --- a/assets/js/441b3d3d.27fcb258.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2488],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(n),h=a,m=d["".concat(s,".").concat(h)]||d[h]||u[h]||i;return n?r.createElement(m,l(l({ref:t},p),{},{components:n})):r.createElement(m,l({ref:t},p))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=h;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:a,l[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"ledger-wallet",title:"Ledger wallet"},l="Introduction",o={unversionedId:"build/clients/ledger-wallet/ledger-wallet",id:"build/clients/ledger-wallet/ledger-wallet",title:"Ledger wallet",description:"A blockchain or crypto wallet is a way to manage, secure, and use cryptocurrencies such as UCO, Bitcoin, Ethereum and other digital assets based on a blockchain (for example, an NFT). There are two basic types of blockchain wallets: software wallets and hardware wallets.",source:"@site/docs/build/clients/ledger-wallet/README.md",sourceDirName:"build/clients/ledger-wallet",slug:"/build/clients/ledger-wallet/",permalink:"/build/clients/ledger-wallet/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"ledger-wallet",title:"Ledger wallet"},sidebar:"docs",previous:{title:"Clients",permalink:"/category/clients"},next:{title:"Ledger Application API",permalink:"/build/clients/ledger-wallet/api"}},s={},c=[{value:"Synopsis",id:"synopsis",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Installation Instructions",id:"installation-instructions",level:2},{value:"Testing",id:"testing",level:2},{value:"Demo",id:"demo",level:2}],p={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"introduction"},"Introduction"),(0,a.kt)("p",null,"A blockchain or crypto wallet is a way to manage, secure, and use cryptocurrencies such as UCO, Bitcoin, Ethereum and other digital assets based on a blockchain (for example, an NFT). There are two basic types of blockchain wallets: software wallets and hardware wallets."),(0,a.kt)("p",null,"Types of software wallets include web (or crypto exchange) wallets, mobile wallets, and desktop wallets. A hardware wallet is a physical device that secures access to your cryptos offline (",(0,a.kt)("a",{parentName:"p",href:"https://www.fool.com/investing/stock-market/market-sectors/financials/blockchain-stocks/blockchain-wallet/#:~:text=There%20are%20two%20basic%20types,access%20to%20your%20cryptos%20offline."},"source"),"). This guide explains interaction and testing of hardware wallet, specifically the Ledger Device (Nano S) with archethic testnet."),(0,a.kt)("p",null,"A Ledger Device is a hardware root of trust based wallet that is considered one of the most secure ways to store your digital assets. Ledger uses an offline, or cold storage, method of generating private keys, making it a preferred method for many crypto users. "),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://i.imgur.com/hlFqBsS.png",alt:null})),(0,a.kt)("p",null,"As given in the figure, there are 3 important components in order to support ledger device for a given blockchain."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Bolos Application\nThis application is written in C and resides on the physical Ledger device. For Archethic's blockchain, this can be found on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger"},"Archethic's github")," and the functional documentation for the app can be found on the official ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-docs/blob/docusaurus/development/wallets/hardware/ledger/archethic_bolos_app.md"},"docs repository"),".")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Companion App\nThis is the application which acts like a bridge of communication between user/blockchain and the Bolos application mentioned above. For Archethic's blockchain, this is ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/ledger-cli-app"},"ALCA (CLI)")," and Flutter based ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic_wallet"},"Wallet (GUI)"),".\n")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Remote backend\nThis is the node which accepts data (signed transactions) from the Companion app mentioned above in order to include it into the blockchain. For Archethic's blockchain, it is the testnet node. Once transaction is published, the data can be verified on ",(0,a.kt)("a",{parentName:"p",href:"https://testnet.archethic.net/explorer"},"archethic.net"),"."))),(0,a.kt)("h2",{id:"synopsis"},"Synopsis"),(0,a.kt)("p",null,"This guide will help you to connect your Ledger device to ALCA, dedicated Command Line Interface (CLI). ALCA (Archethic Ledger CLI App) enables you to Send and Receive UCOs on Archethic Testnet with the Ledger Device."),(0,a.kt)("p",null,"Soon, ALCA will be replaced by Archethic's Wallet, which is GUI-based, thus enabling non-tech users to experiment with Archethic's testnet."),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"This is a developer guide and not for general public. This guide assumes the reader has a prior knowledge of ArchEthic and Ledger Ecosystem.")),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"A more general public guide will soon be released once security audit for developer release is done and GUI support for Ledger Device is added to current Archethic's Wallet (Mobile + Desktop)")),(0,a.kt)("p",null,"Before You Start, Make Sure:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"You\u2019ve ",(0,a.kt)("a",{parentName:"li",href:"https://support.ledger.com/hc/en-us/articles/360000613793?docs=true"},"initialized")," your Ledger Device."),(0,a.kt)("li",{parentName:"ul"},"The latest firmware is ",(0,a.kt)("a",{parentName:"li",href:"https://support.ledger.com/hc/en-us/articles/360002731113?docs=true"},"installed")," (Ledger Nano S)."),(0,a.kt)("li",{parentName:"ul"},"Archethic Bolos App is ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/archethic-ledger"},"loaded")," on Ledger (Tested with Nano S only)."),(0,a.kt)("li",{parentName:"ul"},"Install the latest version of ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/ledger-cli-app"},"ALCA"),"."),(0,a.kt)("li",{parentName:"ul"},"Nodejs (v14.0+)")),(0,a.kt)("h2",{id:"installation-instructions"},"Installation Instructions"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Clone the repository from ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/ledger-cli-app.git"},"github")),(0,a.kt)("li",{parentName:"ul"},"Run ",(0,a.kt)("inlineCode",{parentName:"li"},"yarn")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"npm install")," from root folder of the project"),(0,a.kt)("li",{parentName:"ul"},"Run ",(0,a.kt)("inlineCode",{parentName:"li"},"npm link")),(0,a.kt)("li",{parentName:"ul"},"Use it as ledger_cli (commands)")),(0,a.kt)("h2",{id:"testing"},"Testing"),(0,a.kt)("p",null,"From Terminal use it as ",(0,a.kt)("inlineCode",{parentName:"p"},"ledger_cli (about | getAppVersion | getPublicKey | getArchAddress | sendTxn)")),(0,a.kt)("h2",{id:"demo"},"Demo"),(0,a.kt)("p",null,"The demo shows various screens a user will be shown for getting origin public key, onchain wallet address and performing signature on transaction involving single UCO transfer at a time between 2 parties."),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://i.imgur.com/gk8Q9Ku.gif",alt:null})))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/441b3d3d.7227d0f0.js b/assets/js/441b3d3d.7227d0f0.js new file mode 100644 index 000000000..c0862790d --- /dev/null +++ b/assets/js/441b3d3d.7227d0f0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2488],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(r),h=a,m=d["".concat(s,".").concat(h)]||d[h]||u[h]||i;return r?n.createElement(m,l(l({ref:t},p),{},{components:r})):n.createElement(m,l({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,l=new Array(i);l[0]=h;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:a,l[1]=o;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var n=r(87462),a=(r(67294),r(3905));r(8209);const i={id:"ledger-wallet",title:"Ledger wallet"},l="Introduction",o={unversionedId:"build/clients/ledger-wallet/ledger-wallet",id:"build/clients/ledger-wallet/ledger-wallet",title:"Ledger wallet",description:"A blockchain or crypto wallet is a way to manage, secure, and use cryptocurrencies such as UCO, Bitcoin, Ethereum and other digital assets based on a blockchain (for example, an NFT). There are two basic types of blockchain wallets: software wallets and hardware wallets.",source:"@site/docs/build/clients/ledger-wallet/README.md",sourceDirName:"build/clients/ledger-wallet",slug:"/build/clients/ledger-wallet/",permalink:"/build/clients/ledger-wallet/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"ledger-wallet",title:"Ledger wallet"},sidebar:"docs",previous:{title:"Clients",permalink:"/category/clients"},next:{title:"Ledger Application API",permalink:"/build/clients/ledger-wallet/api"}},s={},c=[{value:"Synopsis",id:"synopsis",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Installation Instructions",id:"installation-instructions",level:2},{value:"Testing",id:"testing",level:2},{value:"Demo",id:"demo",level:2}],p={toc:c},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"introduction"},"Introduction"),(0,a.kt)("p",null,"A blockchain or crypto wallet is a way to manage, secure, and use cryptocurrencies such as UCO, Bitcoin, Ethereum and other digital assets based on a blockchain (for example, an NFT). There are two basic types of blockchain wallets: software wallets and hardware wallets."),(0,a.kt)("p",null,"Types of software wallets include web (or crypto exchange) wallets, mobile wallets, and desktop wallets. A hardware wallet is a physical device that secures access to your cryptos offline (",(0,a.kt)("a",{parentName:"p",href:"https://www.fool.com/investing/stock-market/market-sectors/financials/blockchain-stocks/blockchain-wallet/#:~:text=There%20are%20two%20basic%20types,access%20to%20your%20cryptos%20offline."},"source"),"). This guide explains interaction and testing of hardware wallet, specifically the Ledger Device (Nano S) with archethic testnet."),(0,a.kt)("p",null,"A Ledger Device is a hardware root of trust based wallet that is considered one of the most secure ways to store your digital assets. Ledger uses an offline, or cold storage, method of generating private keys, making it a preferred method for many crypto users. "),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://i.imgur.com/hlFqBsS.png",alt:null})),(0,a.kt)("p",null,"As given in the figure, there are 3 important components in order to support ledger device for a given blockchain."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Bolos Application\nThis application is written in C and resides on the physical Ledger device. For Archethic's blockchain, this can be found on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-ledger"},"Archethic's github")," and the functional documentation for the app can be found on the official ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-docs/blob/docusaurus/development/wallets/hardware/ledger/archethic_bolos_app.md"},"docs repository"),".")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Companion App\nThis is the application which acts like a bridge of communication between user/blockchain and the Bolos application mentioned above. For Archethic's blockchain, this is ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/ledger-cli-app"},"ALCA (CLI)")," and Flutter based ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic_wallet"},"Wallet (GUI)"),".\n")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Remote backend\nThis is the node which accepts data (signed transactions) from the Companion app mentioned above in order to include it into the blockchain. For Archethic's blockchain, it is the testnet node. Once transaction is published, the data can be verified on ",(0,a.kt)("a",{parentName:"p",href:"https://testnet.archethic.net/explorer"},"archethic.net"),"."))),(0,a.kt)("h2",{id:"synopsis"},"Synopsis"),(0,a.kt)("p",null,"This guide will help you to connect your Ledger device to ALCA, dedicated Command Line Interface (CLI). ALCA (Archethic Ledger CLI App) enables you to Send and Receive UCOs on Archethic Testnet with the Ledger Device."),(0,a.kt)("p",null,"Soon, ALCA will be replaced by Archethic's Wallet, which is GUI-based, thus enabling non-tech users to experiment with Archethic's testnet."),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"This is a developer guide and not for general public. This guide assumes the reader has a prior knowledge of ArchEthic and Ledger Ecosystem.")),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"A more general public guide will soon be released once security audit for developer release is done and GUI support for Ledger Device is added to current Archethic's Wallet (Mobile + Desktop)")),(0,a.kt)("p",null,"Before You Start, Make Sure:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"You\u2019ve ",(0,a.kt)("a",{parentName:"li",href:"https://support.ledger.com/hc/en-us/articles/360000613793?docs=true"},"initialized")," your Ledger Device."),(0,a.kt)("li",{parentName:"ul"},"The latest firmware is ",(0,a.kt)("a",{parentName:"li",href:"https://support.ledger.com/hc/en-us/articles/360002731113?docs=true"},"installed")," (Ledger Nano S)."),(0,a.kt)("li",{parentName:"ul"},"Archethic Bolos App is ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/archethic-ledger"},"loaded")," on Ledger (Tested with Nano S only)."),(0,a.kt)("li",{parentName:"ul"},"Install the latest version of ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/ledger-cli-app"},"ALCA"),"."),(0,a.kt)("li",{parentName:"ul"},"Nodejs (v14.0+)")),(0,a.kt)("h2",{id:"installation-instructions"},"Installation Instructions"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Clone the repository from ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/ledger-cli-app.git"},"github")),(0,a.kt)("li",{parentName:"ul"},"Run ",(0,a.kt)("inlineCode",{parentName:"li"},"yarn")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"npm install")," from root folder of the project"),(0,a.kt)("li",{parentName:"ul"},"Run ",(0,a.kt)("inlineCode",{parentName:"li"},"npm link")),(0,a.kt)("li",{parentName:"ul"},"Use it as ledger_cli (commands)")),(0,a.kt)("h2",{id:"testing"},"Testing"),(0,a.kt)("p",null,"From Terminal use it as ",(0,a.kt)("inlineCode",{parentName:"p"},"ledger_cli (about | getAppVersion | getPublicKey | getArchAddress | sendTxn)")),(0,a.kt)("h2",{id:"demo"},"Demo"),(0,a.kt)("p",null,"The demo shows various screens a user will be shown for getting origin public key, onchain wallet address and performing signature on transaction involving single UCO transfer at a time between 2 parties."),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://i.imgur.com/gk8Q9Ku.gif",alt:null})))}u.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/44c96576.7e222a46.js b/assets/js/44c96576.7e222a46.js new file mode 100644 index 000000000..ff296e5d6 --- /dev/null +++ b/assets/js/44c96576.7e222a46.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5352],{3905:(t,e,n)=>{n.d(e,{Zo:()=>u,kt:()=>g});var A=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,A)}return n}function c(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(A=0;A=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var i=A.createContext({}),l=function(t){var e=A.useContext(i),n=e;return t&&(n="function"==typeof t?t(e):c(c({},e),t)),n},u=function(t){var e=l(t.components);return A.createElement(i.Provider,{value:e},t.children)},p="mdxType",s={inlineCode:"code",wrapper:function(t){var e=t.children;return A.createElement(A.Fragment,{},e)}},d=A.forwardRef((function(t,e){var n=t.components,r=t.mdxType,o=t.originalType,i=t.parentName,u=a(t,["components","mdxType","originalType","parentName"]),p=l(n),d=r,g=p["".concat(i,".").concat(d)]||p[d]||s[d]||o;return n?A.createElement(g,c(c({ref:e},u),{},{components:n})):A.createElement(g,c({ref:e},u))}));function g(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var o=n.length,c=new Array(o);c[0]=d;var a={};for(var i in e)hasOwnProperty.call(e,i)&&(a[i]=e[i]);a.originalType=t,a[p]="string"==typeof t?t:r,c[1]=a;for(var l=2;l{n.r(e),n.d(e,{assets:()=>i,contentTitle:()=>c,default:()=>s,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var A=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"functions",title:"Smart Contracts Playground - Functions",sidebar_label:"Function calls",sidebar_position:3},c=void 0,a={unversionedId:"build/smart-contracts/playground/functions",id:"build/smart-contracts/playground/functions",title:"Smart Contracts Playground - Functions",description:"Since 1.3, we introduced the capability to have some public functions in to smart contract code.",source:"@site/docs/build/smart-contracts/playground/function.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/functions",permalink:"/build/smart-contracts/playground/functions",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:3,frontMatter:{id:"functions",title:"Smart Contracts Playground - Functions",sidebar_label:"Function calls",sidebar_position:3},sidebar:"docs",previous:{title:"Deploy",permalink:"/build/smart-contracts/playground/deploy"},next:{title:"Transaction form",permalink:"/build/smart-contracts/playground/transaction-form"}},i={},l=[],u={toc:l},p="wrapper";function s(t){let{components:e,...o}=t;return(0,r.kt)(p,(0,A.Z)({},u,o,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Since 1.3, we introduced the capability to have some public functions in to smart contract code."),(0,r.kt)("p",null,"The playground have been updated to support this feature and be able to test it by calling those functions."),(0,r.kt)("p",null,"Let's create a small smart contract that use function to export some data to the user"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\ncondition triggered_by: transaction, on: increment(), as: []\n\nactions triggered_by: transaction, on: increment() do\n counter = String.to_number(contract.content) + 1\n Contract.set_content String.from_number(counter)\nend\n\nexport fun counter() do\n Json.to_string([counter: contract.content])\nend\n")),(0,r.kt)("p",null,"Firstly, we initiate a transaction to increment the counter and update the contract"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a contract that send a transaction to increment a counter",src:n(32008).Z,width:"3596",height:"2390"})),(0,r.kt)("p",null,"Now to test the function, we are going to open the function panel by clicking on the function button:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"the trigger button",src:n(21823).Z,width:"112",height:"94"})),(0,r.kt)("p",null,"We can see the function panel on the left with the list of function availables to be called"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a function panel opened",src:n(71205).Z,width:"3596",height:"2390"})),(0,r.kt)("p",null,'After clicking on "Execute", we can see in the console the return of the function'),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a function executed",src:n(79978).Z,width:"3596",height:"2390"})))}s.isMDXComponent=!0},21823:(t,e,n)=>{n.d(e,{Z:()=>A});const A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABeCAYAAAD7RpANAAAKpWlDQ1BJQ0MgUHJvZmlsZQAASImVlwdQk9kWx+/3pYcECAm9hRqKIJ0AUkIPRZAOohKSAKGEEBJU7MriCq4oIiKgLuiqgIIVkLViwcKiYK8bZBFR18WCDZX3BYbg7pv33rwzc3N+c3LvOefeuXfm/wFARnNEomxYFYAcoUQcFeRLT0hMouOGABZoAgqwBsocbr6IFRkZBhCb8n+397cBJPc3bOS5/v3//2oUHj+fCwAUiXAqL5+bg/BRZMi4IrEEAFQFEjdZKBHJuR1hmhhpEOFuOadPskzOqZP8bmJOTJQfAGg8AHgShyNOB4BEQ+L0Am46kofkhLCdkCcQIsxD2CsnJxfxpN0IWyBzRAjL8zNTv8uT/recqYqcHE66gif3MmF4f0G+KJuz+P88jv9tOdnSqRrmyCBliIOj5PWQM7ublRuqYGHq7IgpFvAme5JzhjQ4doq5+X5JU8zj+Icq1mbPDpviNEEgW5FHwo6ZYn5+QPQUi3OjFLXSxH6sKeaIp+tKs2IV8Qw+W5G/MCMmfooLBHGzpzg/Kzp0eo6fIi6WRin65wuDfKfrBir2npP/3X4FbMVaSUZMsGLvnOn++ULWdM78BEVvPL5/wPScWMV8kcRXUUuUHamYz88OUsTzC6IVayXIhZxeG6k4w0xOSOQUAwEIBxzAlfAXSeTN++WKFosF6RkSOgt5VXw6W8i1nUF3sHNwBED+RievwMi1ibcHaVOmY8XJyJV+MT4+3jodC74GwKFXABA/T8cYjQCoMAC4tIwrFRdMxtDyHwwgAhVAA9rAAJgAC2ADHIAL8AA+IACEgAgQAxLBfMAFGSAHiMFCsBSsAsWgFGwEW0A12Al2gX3gADgM2sAJcBZcBFfBdXALPAAyMAhegBHwHoxBEISDyBAV0oYMITPIGnKAmJAXFACFQVFQIpQCpUNCSAothdZApVA5VA3VQQ3QIeg4dBa6DPVC96B+aBh6A32GUTAJpsH6sDk8E2bCLDgUjoHnwelwHlwIF8Eb4Cq4Ht4Pt8Jn4avwLVgGv4BHUQClhNJAGaFsUEyUHyoClYRKQ4lRy1ElqEpUPaoZ1YHqQt1AyVAvUZ/QWDQVTUfboD3QwehYNBedh16OXo+uRu9Dt6LPo2+g+9Ej6G8YMkYPY41xx7AxCZh0zEJMMaYSswdzDHMBcwsziHmPxWI1sAysKzYYm4jNxC7Brsdux7Zgz2B7sQPYURwOp42zxnniInAcnARXjNuG2487jevDDeI+4pXwhngHfCA+CS/Er8ZX4hvxp/B9+CH8GEGVYEZwJ0QQeITFhDLCbkIH4RphkDBGpBAZRE9iDDGTuIpYRWwmXiA+JL5VUlIyVnJTmqMkUFqpVKV0UOmSUr/SJ5IayYrkR0omSUkbSHtJZ0j3SG/JZLI52YecRJaQN5AbyOfIj8kflanKtspsZZ7yCuUa5VblPuVXKgQVMxWWynyVQpVKlSMq11ReqhJUzVX9VDmqy1VrVI+r3lEdpVAp9pQISg5lPaWRcpnyTA2nZq4WoMZTK1LbpXZObYCKoppQ/ahc6hrqbuoF6iANS2PQ2LRMWintAK2HNqKupu6kHqe+SL1G/aS6TAOlYa7B1sjWKNM4rHFb47OmviZLk6+5TrNZs0/zg5aulo8WX6tEq0XrltZnbbp2gHaW9ibtNu1HOmgdK505Ogt1duhc0HmpS9P10OXqluge1r2vB+tZ6UXpLdHbpdetN6pvoB+kL9Lfpn9O/6WBhoGPQaZBhcEpg2FDqqGXocCwwvC04XO6Op1Fz6ZX0c/TR4z0jIKNpEZ1Rj1GY8YM41jj1cYtxo9MiCZMkzSTCpNOkxFTQ9Nw06WmTab3zQhmTLMMs61mXWYfzBnm8eZrzdvMnzG0GGxGIaOJ8dCCbOFtkWdRb3HTEmvJtMyy3G553Qq2crbKsKqxumYNW7tYC6y3W/fOwMxwmyGcUT/jjg3JhmVTYNNk02+rYRtmu9q2zfbVTNOZSTM3zeya+c3O2S7bbrfdA3s1+xD71fYd9m8crBy4DjUONx3JjoGOKxzbHV87WTvxnXY43XWmOoc7r3XudP7q4uoidml2GXY1dU1xrXW9w6QxI5nrmZfcMG6+bivcTrh9cndxl7gfdv/Lw8Yjy6PR49ksxiz+rN2zBjyNPTmedZ4yL7pXitfPXjJvI2+Od733Ex8TH57PHp8hliUrk7Wf9crXzlfse8z3g5+73zK/M/4o/yD/Ev+eALWA2IDqgMeBxoHpgU2BI0HOQUuCzgRjgkODNwXfYeuzuewG9kiIa8iykPOhpNDo0OrQJ2FWYeKwjnA4PCR8c/jD2WazhbPbIkAEO2JzxKNIRmRe5K9zsHMi59TMeRplH7U0qiuaGr0gujH6fYxvTFnMg1iLWGlsZ5xKXHJcQ9yHeP/48nhZwsyEZQlXE3USBYntSbikuKQ9SaNzA+ZumTuY7JxcnHx7HmPeonmX5+vMz55/coHKAs6CIymYlPiUxpQvnAhOPWc0lZ1amzrC9eNu5b7g+fAqeMN8T345fyjNM6087Vm6Z/rm9OEM74zKjJcCP0G14HVmcObOzA9ZEVl7s8az47NbcvA5KTnHhWrCLOH5XIPcRbm9ImtRsUiW5563JW9EHCrekw/lz8tvl9AQMdQttZD+IO0v8CqoKfi4MG7hkUWURcJF3YutFq9bPFQYWPjLEvQS7pLOpUZLVy3tX8ZaVrccWp66vHOFyYqiFYMrg1buW0VclbXqt9V2q8tXv1sTv6ajSL9oZdHAD0E/NBUrF4uL76z1WLvzR/SPgh971jmu27buWwmv5EqpXWll6Zf13PVXfrL/qeqn8Q1pG3rKXMp2bMRuFG68vcl7075ySnlh+cDm8M2tFfSKkop3WxZsuVzpVLlzK3GrdKusKqyqfZvpto3bvlRnVN+q8a1pqdWrXVf7YTtve98Onx3NO/V3lu78/LPg57t1QXWt9eb1lbuwuwp2Pd0dt7vrF+YvDXt09pTu+bpXuFe2L2rf+QbXhoZGvcayJrhJ2jS8P3n/9QP+B9qbbZrrWjRaSg+Cg9KDzw+lHLp9OPRw5xHmkeajZkdrj1GPlbRCrYtbR9oy2mTtie29x0OOd3Z4dBz71fbXvSeMTtScVD9Zdop4qujU+OnC06NnRGdenk0/O9C5oPPBuYRzN8/POd9zIfTCpYuBF891sbpOX/K8dOKy++XjV5hX2q66XG3tdu4+9pvzb8d6XHpar7lea7/udr2jd1bvqT7vvrM3/G9cvMm+efXW7Fu9t2Nv372TfEd2l3f32b3se6/vF9wfe7DyIeZhySPVR5WP9R7X/275e4vMRXay37+/+0n0kwcD3IEXf+T/8WWw6Cn5aeWQ4VDDM4dnJ4YDh68/n/t88IXoxdjL4j8pf9a+snh19C+fv7pHEkYGX4tfj79Z/1b77d53Tu86RyNHH7/PeT/2oeSj9sd9n5ifuj7Hfx4aW/gF96Xqq+XXjm+h3x6O54yPizhizoQUQCEDTksD4M1eAMiJAFCvI/ph7qSGnjBoUvdPEPhPPKmzJ8wFgGbEyaWQXAoekUtYHwCUER+B+BgfADs6KsaU3p3Q5nLDIl8pzdTjvLztfd8kdeAfNqnbv+v7nx7Is8ql/9/9vwC01QYO/dnrkQAAAIplWElmTU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAACQAAAAAQAAAJAAAAABAAOShgAHAAAAEgAAAHigAgAEAAAAAQAAAHCgAwAEAAAAAQAAAF4AAAAAQVNDSUkAAABTY3JlZW5zaG90ADOtIgAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAdVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+OTQ8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTEyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6VXNlckNvbW1lbnQ+U2NyZWVuc2hvdDwvZXhpZjpVc2VyQ29tbWVudD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CvHe0K8AAAAcaURPVAAAAAIAAAAAAAAALwAAACgAAAAvAAAALwAAAex9UtyPAAABuElEQVR4AeyYUUrDQBRFpxtJ8NMN+KUuRHEfIn5KcR+iC6nZSLIBdQXKC0x5DEYzSGXO6x0onaSTcuee3te8bE5Ozz6TBtKBj7f3tBFAJLtZtABy2QkgnJ0ACmAEB+B70H+gAMIdgMtXAgUQ7gBcvhIogHAH4PKVQAGEOwCXrwQKINwBuHwlUADhDsDlK4ECCHcALl8JFEC4A3D5SqAAwh2Ay1cCBRDuAFy+EiiAcAfg8pVAAWzfgcuL89R3Xer7Lo3jlMZpSrvXoX3hKxSGT+DN9dUMrvTCQO6GYQZafkY6Dg1wCZ4H9LB99Ie4eViAVi4NoB9WNnMpzeftHLmchgXo02fl8un5JTObwRpgG+Vn+0WQSUiAZfoMnoHKw25q7JUHuYyGBPhT+jK0+7vbeaoEZkcaes9wTNISIF9CG5JeLSVcAn8rn9UONX5BOIBrymfjTKrkCWCVXe0tDgXw2Mqn/ZywAPNNiM+ENem+PfC9n63zrYS/jjzHASx7uFrz6U9eyv3iAPoWodzMmmMBXOPSAdf8NYHlU5kDSv2Xr8YlcMmV8gaG/HhsaY/fnQ8D8Nj6vwzTAH4BAAD//7rSIMsAAAJWSURBVO2ZUU4CQRBEl4tI/PQCfiEH0XgPY/w0xnsYPQhyEbiAegJNuZnQdGZrhy+6druThWV6ZqmtR09DWFxeXf924nF/d9stlxf/d7Hb7bu39w/xO2qT//P13S3UAQIcAJYAPECcQ0wS4PPLa5VdqdLN57bD4WN9s+pwIFQ+BJMAWMDA+KHt08LBPA9xLI81EWM2AP02Cxi2yp4eH474eMBHyUAv5AF6MBaK99lXGfLYbm0FY0wFHrRODuBQ/8PNIjysfvTwqAQPquUBWiBD/e+Apz+za2yudb1dc+7zWQKE6b7nYWysejEnWkgDPKX/WeNrvRB5te0TmicFsKWChuDBDIQaRGmAtpe19C9fsQCGdRi3oQQxNMBiLEyuxakAfd8roGpVyX6O1LScaywsQGtqbWv01TRmuL0ezC7wivH2w4Cxlooua8/5HBagNdSbDcM8wBpka6y9HsZr8+2c2nva60U5DwvwlIppqRYAX170x2a7Hfy3Au+LeWxOFHjQERYgxPmeBVC7fd8PYXSJse2zzJvic2iAvgprAFqqr7ZuKmOhAcJkBnHu8OBPeIAQif61XvVbJs7LVoovGnMPCYBzh8TuPwEydwRyCVAAEpOYAJk7ArkEKACJSUyAzB2BXAIUgMQkJkDmjkAuAQpAYhITIHNHIJcABSAxiQmQuSOQS4ACkJjEBMjcEcglQAFITGICZO4I5BKgACQmMQEydwRyCVAAEpOYAJk7ArkEKACJSUyAzB2BXAIUgMQkJkDmjkAuAQpAYhITIHNHIJcABSAxiQD4B7G2G45A/ZFmAAAAAElFTkSuQmCC"},32008:(t,e,n)=>{n.d(e,{Z:()=>A});const A=n.p+"assets/images/playground_function_example1-8e7185753db9849b034705c5f540ae77.png"},71205:(t,e,n)=>{n.d(e,{Z:()=>A});const A=n.p+"assets/images/playground_function_panel-3d1f5c7d5ecc007093c9cd538e14ccad.png"},79978:(t,e,n)=>{n.d(e,{Z:()=>A});const A=n.p+"assets/images/playground_function_panel2-125e7cc112e2a73e0bf30f17ace555bd.png"},8209:(t,e,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/44c96576.bd8a1558.js b/assets/js/44c96576.bd8a1558.js deleted file mode 100644 index 247ae0b35..000000000 --- a/assets/js/44c96576.bd8a1558.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5352],{3905:(t,e,n)=>{n.d(e,{Zo:()=>u,kt:()=>g});var A=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,A)}return n}function c(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(A=0;A=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var i=A.createContext({}),l=function(t){var e=A.useContext(i),n=e;return t&&(n="function"==typeof t?t(e):c(c({},e),t)),n},u=function(t){var e=l(t.components);return A.createElement(i.Provider,{value:e},t.children)},p="mdxType",s={inlineCode:"code",wrapper:function(t){var e=t.children;return A.createElement(A.Fragment,{},e)}},d=A.forwardRef((function(t,e){var n=t.components,r=t.mdxType,o=t.originalType,i=t.parentName,u=a(t,["components","mdxType","originalType","parentName"]),p=l(n),d=r,g=p["".concat(i,".").concat(d)]||p[d]||s[d]||o;return n?A.createElement(g,c(c({ref:e},u),{},{components:n})):A.createElement(g,c({ref:e},u))}));function g(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var o=n.length,c=new Array(o);c[0]=d;var a={};for(var i in e)hasOwnProperty.call(e,i)&&(a[i]=e[i]);a.originalType=t,a[p]="string"==typeof t?t:r,c[1]=a;for(var l=2;l{n.r(e),n.d(e,{assets:()=>i,contentTitle:()=>c,default:()=>s,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var A=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"functions",title:"Smart Contracts Playground - Functions",sidebar_label:"Function calls",sidebar_position:3},c=void 0,a={unversionedId:"build/smart-contracts/playground/functions",id:"build/smart-contracts/playground/functions",title:"Smart Contracts Playground - Functions",description:"Since 1.3, we introduced the capability to have some public functions in to smart contract code.",source:"@site/docs/build/smart-contracts/playground/function.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/functions",permalink:"/build/smart-contracts/playground/functions",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:3,frontMatter:{id:"functions",title:"Smart Contracts Playground - Functions",sidebar_label:"Function calls",sidebar_position:3},sidebar:"docs",previous:{title:"Deploy",permalink:"/build/smart-contracts/playground/deploy"},next:{title:"Transaction form",permalink:"/build/smart-contracts/playground/transaction-form"}},i={},l=[],u={toc:l},p="wrapper";function s(t){let{components:e,...o}=t;return(0,r.kt)(p,(0,A.Z)({},u,o,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Since 1.3, we introduced the capability to have some public functions in to smart contract code."),(0,r.kt)("p",null,"The playground have been updated to support this feature and be able to test it by calling those functions."),(0,r.kt)("p",null,"Let's create a small smart contract that use function to export some data to the user"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\ncondition triggered_by: transaction, on: increment(), as: []\n\nactions triggered_by: transaction, on: increment() do\n counter = String.to_number(contract.content) + 1\n Contract.set_content String.from_number(counter)\nend\n\nexport fun counter() do\n Json.to_string([counter: contract.content])\nend\n")),(0,r.kt)("p",null,"Firstly, we initiate a transaction to increment the counter and update the contract"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a contract that send a transaction to increment a counter",src:n(32008).Z,width:"3596",height:"2390"})),(0,r.kt)("p",null,"Now to test the function, we are going to open the function panel by clicking on the function button:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"the trigger button",src:n(21823).Z,width:"112",height:"94"})),(0,r.kt)("p",null,"We can see the function panel on the left with the list of function availables to be called"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a function panel opened",src:n(71205).Z,width:"3596",height:"2390"})),(0,r.kt)("p",null,'After clicking on "Execute", we can see in the console the return of the function'),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a function executed",src:n(79978).Z,width:"3596",height:"2390"})))}s.isMDXComponent=!0},21823:(t,e,n)=>{n.d(e,{Z:()=>A});const A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABeCAYAAAD7RpANAAAKpWlDQ1BJQ0MgUHJvZmlsZQAASImVlwdQk9kWx+/3pYcECAm9hRqKIJ0AUkIPRZAOohKSAKGEEBJU7MriCq4oIiKgLuiqgIIVkLViwcKiYK8bZBFR18WCDZX3BYbg7pv33rwzc3N+c3LvOefeuXfm/wFARnNEomxYFYAcoUQcFeRLT0hMouOGABZoAgqwBsocbr6IFRkZBhCb8n+397cBJPc3bOS5/v3//2oUHj+fCwAUiXAqL5+bg/BRZMi4IrEEAFQFEjdZKBHJuR1hmhhpEOFuOadPskzOqZP8bmJOTJQfAGg8AHgShyNOB4BEQ+L0Am46kofkhLCdkCcQIsxD2CsnJxfxpN0IWyBzRAjL8zNTv8uT/recqYqcHE66gif3MmF4f0G+KJuz+P88jv9tOdnSqRrmyCBliIOj5PWQM7ublRuqYGHq7IgpFvAme5JzhjQ4doq5+X5JU8zj+Icq1mbPDpviNEEgW5FHwo6ZYn5+QPQUi3OjFLXSxH6sKeaIp+tKs2IV8Qw+W5G/MCMmfooLBHGzpzg/Kzp0eo6fIi6WRin65wuDfKfrBir2npP/3X4FbMVaSUZMsGLvnOn++ULWdM78BEVvPL5/wPScWMV8kcRXUUuUHamYz88OUsTzC6IVayXIhZxeG6k4w0xOSOQUAwEIBxzAlfAXSeTN++WKFosF6RkSOgt5VXw6W8i1nUF3sHNwBED+RievwMi1ibcHaVOmY8XJyJV+MT4+3jodC74GwKFXABA/T8cYjQCoMAC4tIwrFRdMxtDyHwwgAhVAA9rAAJgAC2ADHIAL8AA+IACEgAgQAxLBfMAFGSAHiMFCsBSsAsWgFGwEW0A12Al2gX3gADgM2sAJcBZcBFfBdXALPAAyMAhegBHwHoxBEISDyBAV0oYMITPIGnKAmJAXFACFQVFQIpQCpUNCSAothdZApVA5VA3VQQ3QIeg4dBa6DPVC96B+aBh6A32GUTAJpsH6sDk8E2bCLDgUjoHnwelwHlwIF8Eb4Cq4Ht4Pt8Jn4avwLVgGv4BHUQClhNJAGaFsUEyUHyoClYRKQ4lRy1ElqEpUPaoZ1YHqQt1AyVAvUZ/QWDQVTUfboD3QwehYNBedh16OXo+uRu9Dt6LPo2+g+9Ej6G8YMkYPY41xx7AxCZh0zEJMMaYSswdzDHMBcwsziHmPxWI1sAysKzYYm4jNxC7Brsdux7Zgz2B7sQPYURwOp42zxnniInAcnARXjNuG2487jevDDeI+4pXwhngHfCA+CS/Er8ZX4hvxp/B9+CH8GEGVYEZwJ0QQeITFhDLCbkIH4RphkDBGpBAZRE9iDDGTuIpYRWwmXiA+JL5VUlIyVnJTmqMkUFqpVKV0UOmSUr/SJ5IayYrkR0omSUkbSHtJZ0j3SG/JZLI52YecRJaQN5AbyOfIj8kflanKtspsZZ7yCuUa5VblPuVXKgQVMxWWynyVQpVKlSMq11ReqhJUzVX9VDmqy1VrVI+r3lEdpVAp9pQISg5lPaWRcpnyTA2nZq4WoMZTK1LbpXZObYCKoppQ/ahc6hrqbuoF6iANS2PQ2LRMWintAK2HNqKupu6kHqe+SL1G/aS6TAOlYa7B1sjWKNM4rHFb47OmviZLk6+5TrNZs0/zg5aulo8WX6tEq0XrltZnbbp2gHaW9ibtNu1HOmgdK505Ogt1duhc0HmpS9P10OXqluge1r2vB+tZ6UXpLdHbpdetN6pvoB+kL9Lfpn9O/6WBhoGPQaZBhcEpg2FDqqGXocCwwvC04XO6Op1Fz6ZX0c/TR4z0jIKNpEZ1Rj1GY8YM41jj1cYtxo9MiCZMkzSTCpNOkxFTQ9Nw06WmTab3zQhmTLMMs61mXWYfzBnm8eZrzdvMnzG0GGxGIaOJ8dCCbOFtkWdRb3HTEmvJtMyy3G553Qq2crbKsKqxumYNW7tYC6y3W/fOwMxwmyGcUT/jjg3JhmVTYNNk02+rYRtmu9q2zfbVTNOZSTM3zeya+c3O2S7bbrfdA3s1+xD71fYd9m8crBy4DjUONx3JjoGOKxzbHV87WTvxnXY43XWmOoc7r3XudP7q4uoidml2GXY1dU1xrXW9w6QxI5nrmZfcMG6+bivcTrh9cndxl7gfdv/Lw8Yjy6PR49ksxiz+rN2zBjyNPTmedZ4yL7pXitfPXjJvI2+Od733Ex8TH57PHp8hliUrk7Wf9crXzlfse8z3g5+73zK/M/4o/yD/Ev+eALWA2IDqgMeBxoHpgU2BI0HOQUuCzgRjgkODNwXfYeuzuewG9kiIa8iykPOhpNDo0OrQJ2FWYeKwjnA4PCR8c/jD2WazhbPbIkAEO2JzxKNIRmRe5K9zsHMi59TMeRplH7U0qiuaGr0gujH6fYxvTFnMg1iLWGlsZ5xKXHJcQ9yHeP/48nhZwsyEZQlXE3USBYntSbikuKQ9SaNzA+ZumTuY7JxcnHx7HmPeonmX5+vMz55/coHKAs6CIymYlPiUxpQvnAhOPWc0lZ1amzrC9eNu5b7g+fAqeMN8T345fyjNM6087Vm6Z/rm9OEM74zKjJcCP0G14HVmcObOzA9ZEVl7s8az47NbcvA5KTnHhWrCLOH5XIPcRbm9ImtRsUiW5563JW9EHCrekw/lz8tvl9AQMdQttZD+IO0v8CqoKfi4MG7hkUWURcJF3YutFq9bPFQYWPjLEvQS7pLOpUZLVy3tX8ZaVrccWp66vHOFyYqiFYMrg1buW0VclbXqt9V2q8tXv1sTv6ajSL9oZdHAD0E/NBUrF4uL76z1WLvzR/SPgh971jmu27buWwmv5EqpXWll6Zf13PVXfrL/qeqn8Q1pG3rKXMp2bMRuFG68vcl7075ySnlh+cDm8M2tFfSKkop3WxZsuVzpVLlzK3GrdKusKqyqfZvpto3bvlRnVN+q8a1pqdWrXVf7YTtve98Onx3NO/V3lu78/LPg57t1QXWt9eb1lbuwuwp2Pd0dt7vrF+YvDXt09pTu+bpXuFe2L2rf+QbXhoZGvcayJrhJ2jS8P3n/9QP+B9qbbZrrWjRaSg+Cg9KDzw+lHLp9OPRw5xHmkeajZkdrj1GPlbRCrYtbR9oy2mTtie29x0OOd3Z4dBz71fbXvSeMTtScVD9Zdop4qujU+OnC06NnRGdenk0/O9C5oPPBuYRzN8/POd9zIfTCpYuBF891sbpOX/K8dOKy++XjV5hX2q66XG3tdu4+9pvzb8d6XHpar7lea7/udr2jd1bvqT7vvrM3/G9cvMm+efXW7Fu9t2Nv372TfEd2l3f32b3se6/vF9wfe7DyIeZhySPVR5WP9R7X/275e4vMRXay37+/+0n0kwcD3IEXf+T/8WWw6Cn5aeWQ4VDDM4dnJ4YDh68/n/t88IXoxdjL4j8pf9a+snh19C+fv7pHEkYGX4tfj79Z/1b77d53Tu86RyNHH7/PeT/2oeSj9sd9n5ifuj7Hfx4aW/gF96Xqq+XXjm+h3x6O54yPizhizoQUQCEDTksD4M1eAMiJAFCvI/ph7qSGnjBoUvdPEPhPPKmzJ8wFgGbEyaWQXAoekUtYHwCUER+B+BgfADs6KsaU3p3Q5nLDIl8pzdTjvLztfd8kdeAfNqnbv+v7nx7Is8ql/9/9vwC01QYO/dnrkQAAAIplWElmTU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAACQAAAAAQAAAJAAAAABAAOShgAHAAAAEgAAAHigAgAEAAAAAQAAAHCgAwAEAAAAAQAAAF4AAAAAQVNDSUkAAABTY3JlZW5zaG90ADOtIgAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAdVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+OTQ8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTEyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6VXNlckNvbW1lbnQ+U2NyZWVuc2hvdDwvZXhpZjpVc2VyQ29tbWVudD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CvHe0K8AAAAcaURPVAAAAAIAAAAAAAAALwAAACgAAAAvAAAALwAAAex9UtyPAAABuElEQVR4AeyYUUrDQBRFpxtJ8NMN+KUuRHEfIn5KcR+iC6nZSLIBdQXKC0x5DEYzSGXO6x0onaSTcuee3te8bE5Ozz6TBtKBj7f3tBFAJLtZtABy2QkgnJ0ACmAEB+B70H+gAMIdgMtXAgUQ7gBcvhIogHAH4PKVQAGEOwCXrwQKINwBuHwlUADhDsDlK4ECCHcALl8JFEC4A3D5SqAAwh2Ay1cCBRDuAFy+EiiAcAfg8pVAAWzfgcuL89R3Xer7Lo3jlMZpSrvXoX3hKxSGT+DN9dUMrvTCQO6GYQZafkY6Dg1wCZ4H9LB99Ie4eViAVi4NoB9WNnMpzeftHLmchgXo02fl8un5JTObwRpgG+Vn+0WQSUiAZfoMnoHKw25q7JUHuYyGBPhT+jK0+7vbeaoEZkcaes9wTNISIF9CG5JeLSVcAn8rn9UONX5BOIBrymfjTKrkCWCVXe0tDgXw2Mqn/ZywAPNNiM+ENem+PfC9n63zrYS/jjzHASx7uFrz6U9eyv3iAPoWodzMmmMBXOPSAdf8NYHlU5kDSv2Xr8YlcMmV8gaG/HhsaY/fnQ8D8Nj6vwzTAH4BAAD//7rSIMsAAAJWSURBVO2ZUU4CQRBEl4tI/PQCfiEH0XgPY/w0xnsYPQhyEbiAegJNuZnQdGZrhy+6druThWV6ZqmtR09DWFxeXf924nF/d9stlxf/d7Hb7bu39w/xO2qT//P13S3UAQIcAJYAPECcQ0wS4PPLa5VdqdLN57bD4WN9s+pwIFQ+BJMAWMDA+KHt08LBPA9xLI81EWM2AP02Cxi2yp4eH474eMBHyUAv5AF6MBaK99lXGfLYbm0FY0wFHrRODuBQ/8PNIjysfvTwqAQPquUBWiBD/e+Apz+za2yudb1dc+7zWQKE6b7nYWysejEnWkgDPKX/WeNrvRB5te0TmicFsKWChuDBDIQaRGmAtpe19C9fsQCGdRi3oQQxNMBiLEyuxakAfd8roGpVyX6O1LScaywsQGtqbWv01TRmuL0ezC7wivH2w4Cxlooua8/5HBagNdSbDcM8wBpka6y9HsZr8+2c2nva60U5DwvwlIppqRYAX170x2a7Hfy3Au+LeWxOFHjQERYgxPmeBVC7fd8PYXSJse2zzJvic2iAvgprAFqqr7ZuKmOhAcJkBnHu8OBPeIAQif61XvVbJs7LVoovGnMPCYBzh8TuPwEydwRyCVAAEpOYAJk7ArkEKACJSUyAzB2BXAIUgMQkJkDmjkAuAQpAYhITIHNHIJcABSAxiQmQuSOQS4ACkJjEBMjcEcglQAFITGICZO4I5BKgACQmMQEydwRyCVAAEpOYAJk7ArkEKACJSUyAzB2BXAIUgMQkJkDmjkAuAQpAYhITIHNHIJcABSAxiQD4B7G2G45A/ZFmAAAAAElFTkSuQmCC"},32008:(t,e,n)=>{n.d(e,{Z:()=>A});const A=n.p+"assets/images/playground_function_example1-8e7185753db9849b034705c5f540ae77.png"},71205:(t,e,n)=>{n.d(e,{Z:()=>A});const A=n.p+"assets/images/playground_function_panel-3d1f5c7d5ecc007093c9cd538e14ccad.png"},79978:(t,e,n)=>{n.d(e,{Z:()=>A});const A=n.p+"assets/images/playground_function_panel2-125e7cc112e2a73e0bf30f17ace555bd.png"},8209:(t,e,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/45e94216.578710f1.js b/assets/js/45e94216.ec7348b2.js similarity index 66% rename from assets/js/45e94216.578710f1.js rename to assets/js/45e94216.ec7348b2.js index 83b9cfbe4..ae5d38e3b 100644 --- a/assets/js/45e94216.578710f1.js +++ b/assets/js/45e94216.ec7348b2.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4439],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||i;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>s,contentTitle:()=>l,default:()=>b,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var r=n(87462),a=n(67294),i=n(3905);n(8209);const o={id:"non-neg-integer",title:"NonNegInteger",hide_table_of_contents:!1},l=void 0,c={unversionedId:"build/api/schema/scalars/non-neg-integer",id:"build/api/schema/scalars/non-neg-integer",title:"NonNegInteger",description:"The [Non Negative Integer] scalar type represents a non negative number",source:"@site/docs/build/api/schema/scalars/non-neg-integer.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/non-neg-integer",permalink:"/build/api/schema/scalars/non-neg-integer",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"non-neg-integer",title:"NonNegInteger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Int",permalink:"/build/api/schema/scalars/int"},next:{title:"P2pAvailabilities",permalink:"/build/api/schema/scalars/p2-p-availabilities"}},s={},p=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,i.kt)(a.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:u,SpecifiedBy:d,Badge:m},g="wrapper";function b(e){let{components:t,...n}=e;return(0,i.kt)(g,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[Non Negative Integer]"," scalar type represents a non negative number"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar NonNegInteger\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-inputs"},(0,i.kt)("inlineCode",{parentName:"a"},"transactionInputs"))," ",(0,i.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4439],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||i;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>s,contentTitle:()=>l,default:()=>b,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var r=n(87462),a=n(67294),i=n(3905);n(8209);const o={id:"non-neg-integer",title:"NonNegInteger",hide_table_of_contents:!1},l=void 0,c={unversionedId:"build/api/schema/scalars/non-neg-integer",id:"build/api/schema/scalars/non-neg-integer",title:"NonNegInteger",description:"The [Non Negative Integer] scalar type represents a non negative number",source:"@site/docs/build/api/schema/scalars/non-neg-integer.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/non-neg-integer",permalink:"/build/api/schema/scalars/non-neg-integer",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"non-neg-integer",title:"NonNegInteger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Int",permalink:"/build/api/schema/scalars/int"},next:{title:"P2pAvailabilities",permalink:"/build/api/schema/scalars/p2-p-availabilities"}},s={},p=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,i.kt)(a.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:u,SpecifiedBy:d,Badge:m},g="wrapper";function b(e){let{components:t,...n}=e;return(0,i.kt)(g,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[Non Negative Integer]"," scalar type represents a non negative number"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar NonNegInteger\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-inputs"},(0,i.kt)("inlineCode",{parentName:"a"},"transactionInputs"))," ",(0,i.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/484af1f2.548f6faa.js b/assets/js/484af1f2.548f6faa.js new file mode 100644 index 000000000..6712c9f95 --- /dev/null +++ b/assets/js/484af1f2.548f6faa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3305],{3905:(e,t,a)=>{a.d(t,{Zo:()=>g,kt:()=>N});var n=a(67294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var M=n.createContext({}),c=function(e){var t=n.useContext(M),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},g=function(e){var t=c(e.components);return n.createElement(M.Provider,{value:t},e.children)},I="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},l=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,o=e.originalType,M=e.parentName,g=s(e,["components","mdxType","originalType","parentName"]),I=c(a),l=i,N=I["".concat(M,".").concat(l)]||I[l]||h[l]||o;return a?n.createElement(N,r(r({ref:t},g),{},{components:a})):n.createElement(N,r({ref:t},g))}));function N(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=a.length,r=new Array(o);r[0]=l;var s={};for(var M in t)hasOwnProperty.call(t,M)&&(s[M]=t[M]);s.originalType=e,s[I]="string"==typeof e?e:i,r[1]=s;for(var c=2;c{a.r(t),a.d(t,{assets:()=>M,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var n=a(87462),i=(a(67294),a(3905));a(8209);const o={id:"bridge",title:"Archethic Bridge $UCO one-way"},r=void 0,s={unversionedId:"FAQ/bridge",id:"FAQ/bridge",title:"Archethic Bridge $UCO one-way",description:"General",source:"@site/docs/FAQ/bridge.md",sourceDirName:"FAQ",slug:"/FAQ/bridge",permalink:"/FAQ/bridge",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"bridge",title:"Archethic Bridge $UCO one-way"},sidebar:"docs",previous:{title:"Archethic Bridge 2-ways",permalink:"/FAQ/bridge-2-ways"},next:{title:"Archethic aeSwap",permalink:"/FAQ/dex"}},M={},c=[{value:"General",id:"general",level:2},{value:"What is Archethic Bridge $UCO one-way?",id:"what-is-archethic-bridge-uco-one-way",level:3},{value:"how to access the Archethic Bridge $UCO one-way?",id:"how-to-access-the-archethic-bridge-uco-one-way",level:3},{value:"How long is the predetermined time?",id:"how-long-is-the-predetermined-time",level:3},{value:"Which blockchain is better to bridge my UCOs?",id:"which-blockchain-is-better-to-bridge-my-ucos",level:3},{value:"Can you explain the process of moving assets across the crypto bridge on the Archethic blockchain?",id:"can-you-explain-the-process-of-moving-assets-across-the-crypto-bridge-on-the-archethic-blockchain",level:3},{value:"What types of assets can be moved across the crypto bridge on the Archethic blockchain?",id:"what-types-of-assets-can-be-moved-across-the-crypto-bridge-on-the-archethic-blockchain",level:3},{value:"What are the fees associated with using the crypto bridge on the Archethic blockchain?",id:"what-are-the-fees-associated-with-using-the-crypto-bridge-on-the-archethic-blockchain",level:3},{value:"I want to get the Archethic address from the Wallet app, how can I know it is the Testnet or the Mainnet address?",id:"i-want-to-get-the-archethic-address-from-the-wallet-app-how-can-i-know-it-is-the-testnet-or-the-mainnet-address",level:3},{value:"Metamask",id:"metamask",level:2},{value:"Will the Archethic Network be available on Metamask?",id:"will-the-archethic-network-be-available-on-metamask",level:3},{value:"How can I add a network on Metamask?",id:"how-can-i-add-a-network-on-metamask",level:3},{value:"How to install Metamask?",id:"how-to-install-metamask",level:3},{value:"Issues management",id:"issues-management",level:2},{value:"What happens if a problem occurs, or I refuse a transaction during the transfer?",id:"what-happens-if-a-problem-occurs-or-i-refuse-a-transaction-during-the-transfer",level:3},{value:"If I sent the tokens to a wrong Mainnet address, what to do?",id:"if-i-sent-the-tokens-to-a-wrong-mainnet-address-what-to-do",level:3},{value:"What if I want to reset the process?",id:"what-if-i-want-to-reset-the-process",level:3},{value:"Can I help the developers analyze the problems?",id:"can-i-help-the-developers-analyze-the-problems",level:3},{value:"Dev",id:"dev",level:2},{value:"How can developers use Archethic bridge to create new decentralized applications?",id:"how-can-developers-use-archethic-bridge-to-create-new-decentralized-applications",level:3},{value:"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?",id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet",level:3}],g={toc:c},I="wrapper";function h(e){let{components:t,...o}=e;return(0,i.kt)(I,(0,n.Z)({},g,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"general"},"General"),(0,i.kt)("h3",{id:"what-is-archethic-bridge-uco-one-way"},(0,i.kt)("strong",{parentName:"h3"},"What is Archethic Bridge $UCO one-way?")),(0,i.kt)("p",null,"Archethic's bridge relies on atomic swap technology to have a transactional agreement used in the cryptocurrency to transfer funds after acknowledgment of a cryptographic proof of payment.\nThis acknowledgment must be done in a predetermined time (known as timelock).\nAfter this time, you can claim your funds, so your UCO will be refunded into your ERC20 wallet."),(0,i.kt)("h3",{id:"how-to-access-the-archethic-bridge-uco-one-way"},(0,i.kt)("strong",{parentName:"h3"},"how to access the Archethic Bridge $UCO one-way?")),(0,i.kt)("p",null,"You can access the bridge at : ",(0,i.kt)("a",{parentName:"p",href:"https://bridge.archethic.net"},"https://bridge.archethic.net")),(0,i.kt)("h3",{id:"how-long-is-the-predetermined-time"},(0,i.kt)("strong",{parentName:"h3"},"How long is the predetermined time?")),(0,i.kt)("p",null,"The timelock lasts 2 hours."),(0,i.kt)("h3",{id:"which-blockchain-is-better-to-bridge-my-ucos"},(0,i.kt)("strong",{parentName:"h3"},"Which blockchain is better to bridge my UCOs?")),(0,i.kt)("p",null,"Using the 3 blockchains, the result will be the same, but fees are not the same between ETH/MATIC/BSC.\nMATIC has the lowest fees."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"bridge-blockchains",src:a(32909).Z,width:"111",height:"102"})),(0,i.kt)("h3",{id:"can-you-explain-the-process-of-moving-assets-across-the-crypto-bridge-on-the-archethic-blockchain"},(0,i.kt)("strong",{parentName:"h3"},"Can you explain the process of moving assets across the crypto bridge on the Archethic blockchain?")),(0,i.kt)("p",null,"Archethic\u2019s bridge leverages Atomic Swap, which is a way to bring safely assets between chains."),(0,i.kt)("p",null,"By using the bridge, you will create contract on ETH/BSC/MATIC and transfer your UCO in there. This contract is called \u201cHashed Time-locked contract\u201d where the funds will be locked until the reveal of a secret or after lock time."),(0,i.kt)("p",null,"Once done, the same will be done on Archethic side. The two chains are now ready to transfer assets.\nThe transfer itself consists of revealing the private part of the secret encoded in the contracts, to allow the exchange."),(0,i.kt)("p",null,"Once the secret is revealed in one chain, the second can proceed to the reveal, as the secret is now public.\nAtomic swap provides secure transfers between chains as there is no pool holding all the assets but hard-coding of recipients and rules in a one-time contract."),(0,i.kt)("h3",{id:"what-types-of-assets-can-be-moved-across-the-crypto-bridge-on-the-archethic-blockchain"},(0,i.kt)("strong",{parentName:"h3"},"What types of assets can be moved across the crypto bridge on the Archethic blockchain?")),(0,i.kt)("p",null,"Only UCOs can be \u201cbridged\u201d."),(0,i.kt)("h3",{id:"what-are-the-fees-associated-with-using-the-crypto-bridge-on-the-archethic-blockchain"},(0,i.kt)("strong",{parentName:"h3"},"What are the fees associated with using the crypto bridge on the Archethic blockchain?")),(0,i.kt)("p",null,"You would have to pay the fees on ETH/BSC/MATIC to transfers your UCO and proceed to the transfer.\nHowever, you won\u2019t have to pay the fees on Archethic, which is the purpose of the bridge: to get funds on the Archethic\u2019s network."),(0,i.kt)("h3",{id:"i-want-to-get-the-archethic-address-from-the-wallet-app-how-can-i-know-it-is-the-testnet-or-the-mainnet-address"},(0,i.kt)("strong",{parentName:"h3"},"I want to get the Archethic address from the Wallet app, how can I know it is the Testnet or the Mainnet address?")),(0,i.kt)("p",null,"On the wallet app, from the version 2.0.8, the network is displayed in the main menu (click on the burger icon to access to the main menu)."),(0,i.kt)("h2",{id:"metamask"},"Metamask"),(0,i.kt)("h3",{id:"will-the-archethic-network-be-available-on-metamask"},(0,i.kt)("strong",{parentName:"h3"},"Will the Archethic Network be available on Metamask?")),(0,i.kt)("p",null,"No, Archethic blockchain is not Ethereum Virtual Machine (EVM) compatible."),(0,i.kt)("h3",{id:"how-can-i-add-a-network-on-metamask"},(0,i.kt)("strong",{parentName:"h3"},"How can I add a network on Metamask?")),(0,i.kt)("p",null,"Here is a link giving a tutorial to add a custom network RPC on Metamask : ",(0,i.kt)("a",{parentName:"p",href:"https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC"},"https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC")),(0,i.kt)("h3",{id:"how-to-install-metamask"},(0,i.kt)("strong",{parentName:"h3"},"How to install Metamask?")),(0,i.kt)("p",null,"Here is a link giving a tutorial to install Metamask : ",(0,i.kt)("a",{parentName:"p",href:"https://www.coindesk.com/learn/how-to-set-up-a-metamask-wallet"},"https://www.coindesk.com/learn/how-to-set-up-a-metamask-wallet")),(0,i.kt)("h2",{id:"issues-management"},"Issues management"),(0,i.kt)("h3",{id:"what-happens-if-a-problem-occurs-or-i-refuse-a-transaction-during-the-transfer"},(0,i.kt)("strong",{parentName:"h3"},"What happens if a problem occurs, or I refuse a transaction during the transfer?")),(0,i.kt)("p",null,'During the delay of the acknowledgment, you should wait for the end of the duration, and you can tell the refund of your ERC20 Wallet with the "REFUND" button available on your Archethic Bridge application.'),(0,i.kt)("h3",{id:"if-i-sent-the-tokens-to-a-wrong-mainnet-address-what-to-do"},(0,i.kt)("strong",{parentName:"h3"},"If I sent the tokens to a wrong Mainnet address, what to do?")),(0,i.kt)("p",null,"You lose the tokens if the Mainnet address is not your address. Same thing if you do an error in the address (for example a 0 instead of 1)."),(0,i.kt)("h3",{id:"what-if-i-want-to-reset-the-process"},(0,i.kt)("strong",{parentName:"h3"},"What if I want to reset the process?")),(0,i.kt)("p",null,"The bridge will only allow one transfer at a time. If you have started a transfer, you must complete it before you can start a new one."),(0,i.kt)("p",null,"In some cases, a transfer in progress can be resumed at a later stage, for example if you have declined a transaction in your wallet or closed your browser."),(0,i.kt)("p",null,"If you don't want to continue the current transfer, you can use the 'clear local storage' option to reset the transfer tool and start a new transfer."),(0,i.kt)("p",null,"Warning: If you clear your local memory, the funds associated with the unfinished transfer will be lost."),(0,i.kt)("h3",{id:"can-i-help-the-developers-analyze-the-problems"},(0,i.kt)("strong",{parentName:"h3"},"Can I help the developers analyze the problems?")),(0,i.kt)("p",null,"You can help developers improve the application by submitting information that describes the state of the application. "),(0,i.kt)("p",null,"To do this, you can export your local storage with the option available on the interface."),(0,i.kt)("h2",{id:"dev"},"Dev"),(0,i.kt)("h3",{id:"how-can-developers-use-archethic-bridge-to-create-new-decentralized-applications"},(0,i.kt)("strong",{parentName:"h3"},"How can developers use Archethic bridge to create new decentralized applications?")),(0,i.kt)("p",null,"Developers can use blockchain bridges to create new decentralized applications by connecting different blockchain networks to enable the movement of assets, data, and information across them. "),(0,i.kt)("p",null,"This allows for the creation of interoperable DApps that can utilize the features and capabilities of multiple blockchain networks. "),(0,i.kt)("p",null,"Developers can use smart contract or atomic swap technology to facilitate the transfer of assets across different networks, and can also use cross-chain data oracles to access off-chain data on different networks."),(0,i.kt)("h3",{id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet"},(0,i.kt)("strong",{parentName:"h3"},"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?")),(0,i.kt)("p",null,"The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don\u2019t forget the 24 words) and create/import a wallet on the Testnet network."))}h.isMDXComponent=!0},32909:(e,t,a)=>{a.d(t,{Z:()=>n});const n="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTExcHgiIGhlaWdodD0iMTAycHgiIHZpZXdCb3g9IjAgMCAxMTEgMTAyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPkJsb2NrY2hhbjwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8cmVjdCBpZD0icGF0aC0xIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzIiIGhlaWdodD0iMjgiPjwvcmVjdD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJCcmlkZ2UiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJCbG9ja2NoYW4iPgogICAgICAgICAgICA8ZyBpZD0iQlNDIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyOS4wMDAwMDAsIDAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsPSIjRjNCQTJGIiBjeD0iMjQiIGN5PSIyNCIgcj0iMjQiPjwvY2lyY2xlPgogICAgICAgICAgICAgICAgPGcgaWQ9Ikljb25zX3gyRl9pY29uLTI0X3gyRl9uZXR3b3Jrc194MkZfYmluYW5jZV94NUZfc21hcnRfeDVGX2NoYWluIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4LjAwMDAwMCwgOC4wMDAwMDApIiBmaWxsPSIjMTMxNDE1Ij4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjIuMjIxMDY2MywxOC41NTQ3OTY3IEwyNS44NDEzNTI0LDIyLjE2NTg1MzcgTDE2LDMyIEw2LjE2OTA1MDcyLDIyLjE2NTg1MzcgTDkuNzg5MzM2OCwxOC41NTQ3OTY3IEwxNiwyNC43Njc0Nzk3IEwyMi4yMjEwNjYzLDE4LjU1NDc5NjcgWiBNMTYsMTIuMzMxNzA3MyBMMTkuNjcyMzAxNywxNi4wMDUyMDMzIEwxOS42NzIzMDE3LDE2LjAwNTIwMzMgTDE5LjY3MjMwMTcsMTYuMDA1MjAzMyBMMTYsMTkuNjc4Njk5MiBMMTIuMzM4MTAxNCwxNi4wMTU2MDk4IEwxMi4zMzgxMDE0LDE2LjAwNTIwMzMgTDEyLjMzODEwMTQsMTYuMDA1MjAzMyBMMTIuOTgzMDk0OSwxNS4zNiBMMTMuMjk1MTg4NiwxNS4wNDc4MDQ5IEwxNiwxMi4zMzE3MDczIFogTTMuNjIwMjg2MDksMTIuMzgzNzM5OCBMNy4yNDA1NzIxNywxNi4wMDUyMDMzIEwzLjYyMDI4NjA5LDE5LjYxNjI2MDIgTDAsMTUuOTk0Nzk2NyBMMy42MjAyODYwOSwxMi4zODM3Mzk4IFogTTI4LjM3OTcxMzksMTIuMzgzNzM5OCBMMzIsMTYuMDA1MjAzMyBMMjguMzc5NzEzOSwxOS42MTYyNjAyIEwyNC43NTk0Mjc4LDE1Ljk5NDc5NjcgTDI4LjM3OTcxMzksMTIuMzgzNzM5OCBaIE0xNiwwIEwyNS44MzA5NDkzLDkuODM0MTQ2MzQgTDIyLjIxMDY2MzIsMTMuNDU1NjA5OCBMMTYsNy4yMzI1MjAzMyBMOS43ODkzMzY4LDEzLjQ0NTIwMzMgTDYuMTY5MDUwNzIsOS44MzQxNDYzNCBMMTYsMCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8ZyBpZD0iUG9seWdvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjMuMDAwMDAwLCA1NC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMy45OTA1NTgsMCBMMjMuOTkwNTU4LDAgQzM3LjI1MTQ3NzIsMCA0OCwxMC43NDY0MDk2IDQ4LDI0LjAwNDcyMTYgTDQ4LDI0LjAwNDcyMTYgQzQ4LDM3LjI2MzAzMzYgMzcuMjUxNDc3Miw0OCAyNCw0OCBMMjQsNDggQzEwLjczOTA4MzksNDggMCwzNy4yNTM1OTA0IDAsMjQuMDA0NzIxNiBMMCwyNC4wMDQ3MjE2IEMtMC4wMDk0Mzg4NzkxLDEwLjc0NjQwOTYgMTAuNzM5MDgzOSwwIDIzLjk5MDU1OCwwIFoiIGlkPSJQYXRoIiBmaWxsPSIjODI0N0U1IiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxnIGlkPSJDbGlwcGVkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4LjAwMDAwMCwgMTAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPG1hc2sgaWQ9Im1hc2stMiIgZmlsbD0id2hpdGUiPgogICAgICAgICAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICAgICAgICAgIDwvbWFzaz4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iU1ZHSURfMV8iPjwvZz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjQuMTcwNTE5NCw4LjUyNzU3Nzk0IEMyMy41ODQ1MDkyLDguMTkxODQ2NTIgMjIuODM1MTg0Niw4LjE5MTg0NjUyIDIyLjE3MjMyMDYsOC41Mjc1Nzc5NCBMMTcuNTAzNDUyNCwxMS4yOTAxNjc5IEwxNC4zMzMyMzMzLDEzLjA0NTU2MzUgTDkuNzUwODI1NTgsMTUuNzk4NTYxMiBDOS4xNjQ4MTUzNywxNi4xMzQyOTI2IDguNDE1NDkwODQsMTYuMTM0MjkyNiA3Ljc1MjYyNjg0LDE1Ljc5ODU2MTIgTDQuMTY5MzE4NTIsMTMuNjIxMTAzMSBDMy41ODMzMDgzMiwxMy4yODUzNzE3IDMuMTcwMjE5MTUsMTIuNjEzOTA4OSAzLjE3MDIxOTE1LDExLjg2NTcwNzQgTDMuMTcwMjE5MTUsNy42ODM0NTMyNCBDMy4xNzAyMTkxNSw3LjAxMTk5MDQxIDMuNTA2NDU0NTIsNi4zNTAxMTk5IDQuMTY5MzE4NTIsNS45MjgwNTc1NSBMNy43NTI2MjY4NCwzLjgzNjkzMDQ2IEM4LjMzODYzNzA1LDMuNTAxMTk5MDQgOS4wODc5NjE1NywzLjUwMTE5OTA0IDkuNzUwODI1NTgsMy44MzY5MzA0NiBMMTMuMzM0MTMzOSw2LjAxNDM4ODQ5IEMxMy45MjAxNDQxLDYuMzUwMTE5OSAxNC4zMzMyMzMzLDcuMDIxNTgyNzMgMTQuMzMzMjMzMyw3Ljc2OTc4NDE3IEwxNC4zMzMyMzMzLDEwLjUzMjM3NDEgTDE3LjUwMzQ1MjQsOC42OTA2NDc0OCBMMTcuNTAzNDUyNCw1Ljg1MTMxODk0IEMxNy41MDM0NTI0LDUuMTc5ODU2MTIgMTcuMTY3MjE3MSw0LjUxNzk4NTYxIDE2LjUwNDM1Myw0LjA5NTkyMzI2IEw5LjgzNzI4NjEsMC4xNjMwNjk1NDQgQzkuMjUxMjc1ODksLTAuMTcyNjYxODcxIDguNTAxOTUxMzcsLTAuMTcyNjYxODcxIDcuODM5MDg3MzYsMC4xNjMwNjk1NDQgTDEuMDA4NzA2MDksNC4xODIyNTQyIEMwLjM0NTg0MjA4OSw0LjUxNzk4NTYxIDAuMDA5NjA2NzI0NzEsNS4xODk0NDg0NCAwLjAwOTYwNjcyNDcxLDUuODUxMzE4OTQgTDAuMDA5NjA2NzI0NzEsMTMuNzA3NDM0MSBDMC4wMDk2MDY3MjQ3MSwxNC4zNzg4OTY5IDAuMzQ1ODQyMDg5LDE1LjA0MDc2NzQgMS4wMDg3MDYwOSwxNS40NjI4Mjk3IEw3Ljc2MjIzMzU2LDE5LjM5NTY4MzUgQzguMzQ4MjQzNzcsMTkuNzMxNDE0OSA5LjA5NzU2ODMsMTkuNzMxNDE0OSA5Ljc2MDQzMjMsMTkuMzk1NjgzNSBMMTQuMzQyODQsMTYuNzE5NDI0NSBMMTcuNTEzMDU5MSwxNC44Nzc2OTc4IEwyMi4wOTU0NjY4LDEyLjIwMTQzODggQzIyLjY4MTQ3NywxMS44NjU3MDc0IDIzLjQzMDgwMTYsMTEuODY1NzA3NCAyNC4wOTM2NjU2LDEyLjIwMTQzODggTDI3LjY3Njk3MzksMTQuMjkyNTY1OSBDMjguMjYyOTg0MSwxNC42MjgyOTc0IDI4LjY3NjA3MzMsMTUuMjk5NzYwMiAyOC42NzYwNzMzLDE2LjA0Nzk2MTYgTDI4LjY3NjA3MzMsMjAuMjMwMjE1OCBDMjguNjc2MDczMywyMC45MDE2Nzg3IDI4LjMzOTgzNzksMjEuNTYzNTQ5MiAyNy42NzY5NzM5LDIxLjk4NTYxMTUgTDI0LjE4MDEyNjEsMjQuMDc2NzM4NiBDMjMuNTk0MTE1OSwyNC40MTI0NyAyMi44NDQ3OTE0LDI0LjQxMjQ3IDIyLjE4MTkyNzMsMjQuMDc2NzM4NiBMMTguNTg5MDEyMywyMS45ODU2MTE1IEMxOC4wMDMwMDIxLDIxLjY0OTg4MDEgMTcuNTg5OTEyOSwyMC45Nzg0MTczIDE3LjU4OTkxMjksMjAuMjMwMjE1OCBMMTcuNTg5OTEyOSwxNy41NTM5NTY4IEwxNC40MTk2OTM4LDE5LjM5NTY4MzUgTDE0LjQxOTY5MzgsMjIuMTU4MjczNCBDMTQuNDE5NjkzOCwyMi44Mjk3MzYyIDE0Ljc1NTkyOTIsMjMuNDkxNjA2NyAxNS40MTg3OTMyLDIzLjkxMzY2OTEgTDIyLjE3MjMyMDYsMjcuODQ2NTIyOCBDMjIuNzU4MzMwOCwyOC4xODIyNTQyIDIzLjUwNzY1NTQsMjguMTgyMjU0MiAyNC4xNzA1MTk0LDI3Ljg0NjUyMjggTDMwLjkyNDA0NjgsMjMuOTEzNjY5MSBDMzEuNTEwMDU3LDIzLjU3NzkzNzYgMzEuOTIzMTQ2MiwyMi45MDY0NzQ4IDMxLjkyMzE0NjIsMjIuMTU4MjczNCBMMzEuOTIzMTQ2MiwxNC4yMTU4MjczIEMzMS45MjMxNDYyLDEzLjU0NDM2NDUgMzEuNTg2OTEwOCwxMi44ODI0OTQgMzAuOTI0MDQ2OCwxMi40NjA0MzE3IEwyNC4xNzA1MTk0LDguNTI3NTc3OTQgWiIgaWQ9IlBhdGgiIGZpbGw9IiNGRkZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNtYXNrLTIpIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPGcgaWQ9IkV0aGVyZXVtIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgNTQuMDAwMDAwKSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC00NSI+CiAgICAgICAgICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbCIgZmlsbD0iIzYyN0VFQSIgY3g9IjI0IiBjeT0iMjQiIHI9IjI0Ij48L2NpcmNsZT4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aCIgZmlsbC1vcGFjaXR5PSIwLjYwMiIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIyNC43NDc5NDk3IDUuOTk2NzE5NTIgMjQuNzQ3OTQ5NyAxOS4zMDIzNTEgMzUuOTkzNDM5IDI0LjMyODA0ODEiPjwvcG9seWdvbj4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF8xXyIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIyNC43NDc5NDk3IDUuOTk2NzE5NTIgMTMuNTAyNDYwNCAyNC4zMjgwNDgxIDI0Ljc0Nzk0OTcgMTkuMzAyMzUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGhfMl8iIGZpbGwtb3BhY2l0eT0iMC42MDIiIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyAzMi45NDkxNTI1IDI0Ljc0Nzk0OTcgNDEuOTkwMTU4NiAzNiAyNi40MjA5OTUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGhfM18iIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyA0MS45OTAxNTg2IDI0Ljc0Nzk0OTcgMzIuOTQ5MTUyNSAxMy41MDI0NjA0IDI2LjQyMDk5NTEiPjwvcG9seWdvbj4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF80XyIgZmlsbC1vcGFjaXR5PSIwLjIiIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyAzMC44NTYyMDU2IDM1Ljk5MzQzOSAyNC4zMjgwNDgxIDI0Ljc0Nzk0OTcgMTkuMzAyMzUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF81XyIgZmlsbC1vcGFjaXR5PSIwLjYwMiIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIxNCAyNC4yMTk3NjE1IDI1IDMxIDI1IDE5Ij48L3BvbHlnb24+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/484af1f2.d66fa035.js b/assets/js/484af1f2.d66fa035.js deleted file mode 100644 index eade3ce35..000000000 --- a/assets/js/484af1f2.d66fa035.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3305],{3905:(e,t,a)=>{a.d(t,{Zo:()=>g,kt:()=>N});var n=a(67294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var M=n.createContext({}),c=function(e){var t=n.useContext(M),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},g=function(e){var t=c(e.components);return n.createElement(M.Provider,{value:t},e.children)},I="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,o=e.originalType,M=e.parentName,g=s(e,["components","mdxType","originalType","parentName"]),I=c(a),h=i,N=I["".concat(M,".").concat(h)]||I[h]||l[h]||o;return a?n.createElement(N,r(r({ref:t},g),{},{components:a})):n.createElement(N,r({ref:t},g))}));function N(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=a.length,r=new Array(o);r[0]=h;var s={};for(var M in t)hasOwnProperty.call(t,M)&&(s[M]=t[M]);s.originalType=e,s[I]="string"==typeof e?e:i,r[1]=s;for(var c=2;c{a.r(t),a.d(t,{assets:()=>M,contentTitle:()=>r,default:()=>l,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var n=a(87462),i=(a(67294),a(3905));a(8209);const o={id:"bridge",title:"Archethic Bridge $UCO one-way"},r=void 0,s={unversionedId:"FAQ/bridge",id:"FAQ/bridge",title:"Archethic Bridge $UCO one-way",description:"General",source:"@site/docs/FAQ/bridge.md",sourceDirName:"FAQ",slug:"/FAQ/bridge",permalink:"/FAQ/bridge",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"bridge",title:"Archethic Bridge $UCO one-way"},sidebar:"docs",previous:{title:"Archethic Bridge 2-ways",permalink:"/FAQ/bridge-2-ways"},next:{title:"Wallet",permalink:"/FAQ/wallet"}},M={},c=[{value:"General",id:"general",level:2},{value:"What is Archethic Bridge $UCO one-way?",id:"what-is-archethic-bridge-uco-one-way",level:3},{value:"how to access the Archethic Bridge $UCO one-way?",id:"how-to-access-the-archethic-bridge-uco-one-way",level:3},{value:"How long is the predetermined time?",id:"how-long-is-the-predetermined-time",level:3},{value:"Which blockchain is better to bridge my UCOs?",id:"which-blockchain-is-better-to-bridge-my-ucos",level:3},{value:"Can you explain the process of moving assets across the crypto bridge on the Archethic blockchain?",id:"can-you-explain-the-process-of-moving-assets-across-the-crypto-bridge-on-the-archethic-blockchain",level:3},{value:"What types of assets can be moved across the crypto bridge on the Archethic blockchain?",id:"what-types-of-assets-can-be-moved-across-the-crypto-bridge-on-the-archethic-blockchain",level:3},{value:"What are the fees associated with using the crypto bridge on the Archethic blockchain?",id:"what-are-the-fees-associated-with-using-the-crypto-bridge-on-the-archethic-blockchain",level:3},{value:"I want to get the Archethic address from the Wallet app, how can I know it is the Testnet or the Mainnet address?",id:"i-want-to-get-the-archethic-address-from-the-wallet-app-how-can-i-know-it-is-the-testnet-or-the-mainnet-address",level:3},{value:"Metamask",id:"metamask",level:2},{value:"Will the Archethic Network be available on Metamask?",id:"will-the-archethic-network-be-available-on-metamask",level:3},{value:"How can I add a network on Metamask?",id:"how-can-i-add-a-network-on-metamask",level:3},{value:"How to install Metamask?",id:"how-to-install-metamask",level:3},{value:"Issues management",id:"issues-management",level:2},{value:"What happens if a problem occurs, or I refuse a transaction during the transfer?",id:"what-happens-if-a-problem-occurs-or-i-refuse-a-transaction-during-the-transfer",level:3},{value:"If I sent the tokens to a wrong Mainnet address, what to do?",id:"if-i-sent-the-tokens-to-a-wrong-mainnet-address-what-to-do",level:3},{value:"What if I want to reset the process?",id:"what-if-i-want-to-reset-the-process",level:3},{value:"Can I help the developers analyze the problems?",id:"can-i-help-the-developers-analyze-the-problems",level:3},{value:"Dev",id:"dev",level:2},{value:"How can developers use Archethic bridge to create new decentralized applications?",id:"how-can-developers-use-archethic-bridge-to-create-new-decentralized-applications",level:3},{value:"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?",id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet",level:3}],g={toc:c},I="wrapper";function l(e){let{components:t,...o}=e;return(0,i.kt)(I,(0,n.Z)({},g,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"general"},"General"),(0,i.kt)("h3",{id:"what-is-archethic-bridge-uco-one-way"},(0,i.kt)("strong",{parentName:"h3"},"What is Archethic Bridge $UCO one-way?")),(0,i.kt)("p",null,"Archethic's bridge relies on atomic swap technology to have a transactional agreement used in the cryptocurrency to transfer funds after acknowledgment of a cryptographic proof of payment.\nThis acknowledgment must be done in a predetermined time (known as timelock).\nAfter this time, you can claim your funds, so your UCO will be refunded into your ERC20 wallet."),(0,i.kt)("h3",{id:"how-to-access-the-archethic-bridge-uco-one-way"},(0,i.kt)("strong",{parentName:"h3"},"how to access the Archethic Bridge $UCO one-way?")),(0,i.kt)("p",null,"You can access the bridge at : ",(0,i.kt)("a",{parentName:"p",href:"https://bridge.archethic.net"},"https://bridge.archethic.net")),(0,i.kt)("h3",{id:"how-long-is-the-predetermined-time"},(0,i.kt)("strong",{parentName:"h3"},"How long is the predetermined time?")),(0,i.kt)("p",null,"The timelock lasts 2 hours."),(0,i.kt)("h3",{id:"which-blockchain-is-better-to-bridge-my-ucos"},(0,i.kt)("strong",{parentName:"h3"},"Which blockchain is better to bridge my UCOs?")),(0,i.kt)("p",null,"Using the 3 blockchains, the result will be the same, but fees are not the same between ETH/MATIC/BSC.\nMATIC has the lowest fees."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"bridge-blockchains",src:a(32909).Z,width:"111",height:"102"})),(0,i.kt)("h3",{id:"can-you-explain-the-process-of-moving-assets-across-the-crypto-bridge-on-the-archethic-blockchain"},(0,i.kt)("strong",{parentName:"h3"},"Can you explain the process of moving assets across the crypto bridge on the Archethic blockchain?")),(0,i.kt)("p",null,"Archethic\u2019s bridge leverages Atomic Swap, which is a way to bring safely assets between chains."),(0,i.kt)("p",null,"By using the bridge, you will create contract on ETH/BSC/MATIC and transfer your UCO in there. This contract is called \u201cHashed Time-locked contract\u201d where the funds will be locked until the reveal of a secret or after lock time."),(0,i.kt)("p",null,"Once done, the same will be done on Archethic side. The two chains are now ready to transfer assets.\nThe transfer itself consists of revealing the private part of the secret encoded in the contracts, to allow the exchange."),(0,i.kt)("p",null,"Once the secret is revealed in one chain, the second can proceed to the reveal, as the secret is now public.\nAtomic swap provides secure transfers between chains as there is no pool holding all the assets but hard-coding of recipients and rules in a one-time contract."),(0,i.kt)("h3",{id:"what-types-of-assets-can-be-moved-across-the-crypto-bridge-on-the-archethic-blockchain"},(0,i.kt)("strong",{parentName:"h3"},"What types of assets can be moved across the crypto bridge on the Archethic blockchain?")),(0,i.kt)("p",null,"Only UCOs can be \u201cbridged\u201d."),(0,i.kt)("h3",{id:"what-are-the-fees-associated-with-using-the-crypto-bridge-on-the-archethic-blockchain"},(0,i.kt)("strong",{parentName:"h3"},"What are the fees associated with using the crypto bridge on the Archethic blockchain?")),(0,i.kt)("p",null,"You would have to pay the fees on ETH/BSC/MATIC to transfers your UCO and proceed to the transfer.\nHowever, you won\u2019t have to pay the fees on Archethic, which is the purpose of the bridge: to get funds on the Archethic\u2019s network."),(0,i.kt)("h3",{id:"i-want-to-get-the-archethic-address-from-the-wallet-app-how-can-i-know-it-is-the-testnet-or-the-mainnet-address"},(0,i.kt)("strong",{parentName:"h3"},"I want to get the Archethic address from the Wallet app, how can I know it is the Testnet or the Mainnet address?")),(0,i.kt)("p",null,"On the wallet app, from the version 2.0.8, the network is displayed in the main menu (click on the burger icon to access to the main menu)."),(0,i.kt)("h2",{id:"metamask"},"Metamask"),(0,i.kt)("h3",{id:"will-the-archethic-network-be-available-on-metamask"},(0,i.kt)("strong",{parentName:"h3"},"Will the Archethic Network be available on Metamask?")),(0,i.kt)("p",null,"No, Archethic blockchain is not Ethereum Virtual Machine (EVM) compatible."),(0,i.kt)("h3",{id:"how-can-i-add-a-network-on-metamask"},(0,i.kt)("strong",{parentName:"h3"},"How can I add a network on Metamask?")),(0,i.kt)("p",null,"Here is a link giving a tutorial to add a custom network RPC on Metamask : ",(0,i.kt)("a",{parentName:"p",href:"https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC"},"https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC")),(0,i.kt)("h3",{id:"how-to-install-metamask"},(0,i.kt)("strong",{parentName:"h3"},"How to install Metamask?")),(0,i.kt)("p",null,"Here is a link giving a tutorial to install Metamask : ",(0,i.kt)("a",{parentName:"p",href:"https://www.coindesk.com/learn/how-to-set-up-a-metamask-wallet"},"https://www.coindesk.com/learn/how-to-set-up-a-metamask-wallet")),(0,i.kt)("h2",{id:"issues-management"},"Issues management"),(0,i.kt)("h3",{id:"what-happens-if-a-problem-occurs-or-i-refuse-a-transaction-during-the-transfer"},(0,i.kt)("strong",{parentName:"h3"},"What happens if a problem occurs, or I refuse a transaction during the transfer?")),(0,i.kt)("p",null,'During the delay of the acknowledgment, you should wait for the end of the duration, and you can tell the refund of your ERC20 Wallet with the "REFUND" button available on your Archethic Bridge application.'),(0,i.kt)("h3",{id:"if-i-sent-the-tokens-to-a-wrong-mainnet-address-what-to-do"},(0,i.kt)("strong",{parentName:"h3"},"If I sent the tokens to a wrong Mainnet address, what to do?")),(0,i.kt)("p",null,"You lose the tokens if the Mainnet address is not your address. Same thing if you do an error in the address (for example a 0 instead of 1)."),(0,i.kt)("h3",{id:"what-if-i-want-to-reset-the-process"},(0,i.kt)("strong",{parentName:"h3"},"What if I want to reset the process?")),(0,i.kt)("p",null,"The bridge will only allow one transfer at a time. If you have started a transfer, you must complete it before you can start a new one."),(0,i.kt)("p",null,"In some cases, a transfer in progress can be resumed at a later stage, for example if you have declined a transaction in your wallet or closed your browser."),(0,i.kt)("p",null,"If you don't want to continue the current transfer, you can use the 'clear local storage' option to reset the transfer tool and start a new transfer."),(0,i.kt)("p",null,"Warning: If you clear your local memory, the funds associated with the unfinished transfer will be lost."),(0,i.kt)("h3",{id:"can-i-help-the-developers-analyze-the-problems"},(0,i.kt)("strong",{parentName:"h3"},"Can I help the developers analyze the problems?")),(0,i.kt)("p",null,"You can help developers improve the application by submitting information that describes the state of the application. "),(0,i.kt)("p",null,"To do this, you can export your local storage with the option available on the interface."),(0,i.kt)("h2",{id:"dev"},"Dev"),(0,i.kt)("h3",{id:"how-can-developers-use-archethic-bridge-to-create-new-decentralized-applications"},(0,i.kt)("strong",{parentName:"h3"},"How can developers use Archethic bridge to create new decentralized applications?")),(0,i.kt)("p",null,"Developers can use blockchain bridges to create new decentralized applications by connecting different blockchain networks to enable the movement of assets, data, and information across them. "),(0,i.kt)("p",null,"This allows for the creation of interoperable DApps that can utilize the features and capabilities of multiple blockchain networks. "),(0,i.kt)("p",null,"Developers can use smart contract or atomic swap technology to facilitate the transfer of assets across different networks, and can also use cross-chain data oracles to access off-chain data on different networks."),(0,i.kt)("h3",{id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet"},(0,i.kt)("strong",{parentName:"h3"},"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?")),(0,i.kt)("p",null,"The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don\u2019t forget the 24 words) and create/import a wallet on the Testnet network."))}l.isMDXComponent=!0},32909:(e,t,a)=>{a.d(t,{Z:()=>n});const n="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTExcHgiIGhlaWdodD0iMTAycHgiIHZpZXdCb3g9IjAgMCAxMTEgMTAyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPkJsb2NrY2hhbjwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8cmVjdCBpZD0icGF0aC0xIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzIiIGhlaWdodD0iMjgiPjwvcmVjdD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJCcmlkZ2UiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJCbG9ja2NoYW4iPgogICAgICAgICAgICA8ZyBpZD0iQlNDIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyOS4wMDAwMDAsIDAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsPSIjRjNCQTJGIiBjeD0iMjQiIGN5PSIyNCIgcj0iMjQiPjwvY2lyY2xlPgogICAgICAgICAgICAgICAgPGcgaWQ9Ikljb25zX3gyRl9pY29uLTI0X3gyRl9uZXR3b3Jrc194MkZfYmluYW5jZV94NUZfc21hcnRfeDVGX2NoYWluIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4LjAwMDAwMCwgOC4wMDAwMDApIiBmaWxsPSIjMTMxNDE1Ij4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjIuMjIxMDY2MywxOC41NTQ3OTY3IEwyNS44NDEzNTI0LDIyLjE2NTg1MzcgTDE2LDMyIEw2LjE2OTA1MDcyLDIyLjE2NTg1MzcgTDkuNzg5MzM2OCwxOC41NTQ3OTY3IEwxNiwyNC43Njc0Nzk3IEwyMi4yMjEwNjYzLDE4LjU1NDc5NjcgWiBNMTYsMTIuMzMxNzA3MyBMMTkuNjcyMzAxNywxNi4wMDUyMDMzIEwxOS42NzIzMDE3LDE2LjAwNTIwMzMgTDE5LjY3MjMwMTcsMTYuMDA1MjAzMyBMMTYsMTkuNjc4Njk5MiBMMTIuMzM4MTAxNCwxNi4wMTU2MDk4IEwxMi4zMzgxMDE0LDE2LjAwNTIwMzMgTDEyLjMzODEwMTQsMTYuMDA1MjAzMyBMMTIuOTgzMDk0OSwxNS4zNiBMMTMuMjk1MTg4NiwxNS4wNDc4MDQ5IEwxNiwxMi4zMzE3MDczIFogTTMuNjIwMjg2MDksMTIuMzgzNzM5OCBMNy4yNDA1NzIxNywxNi4wMDUyMDMzIEwzLjYyMDI4NjA5LDE5LjYxNjI2MDIgTDAsMTUuOTk0Nzk2NyBMMy42MjAyODYwOSwxMi4zODM3Mzk4IFogTTI4LjM3OTcxMzksMTIuMzgzNzM5OCBMMzIsMTYuMDA1MjAzMyBMMjguMzc5NzEzOSwxOS42MTYyNjAyIEwyNC43NTk0Mjc4LDE1Ljk5NDc5NjcgTDI4LjM3OTcxMzksMTIuMzgzNzM5OCBaIE0xNiwwIEwyNS44MzA5NDkzLDkuODM0MTQ2MzQgTDIyLjIxMDY2MzIsMTMuNDU1NjA5OCBMMTYsNy4yMzI1MjAzMyBMOS43ODkzMzY4LDEzLjQ0NTIwMzMgTDYuMTY5MDUwNzIsOS44MzQxNDYzNCBMMTYsMCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8ZyBpZD0iUG9seWdvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjMuMDAwMDAwLCA1NC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMy45OTA1NTgsMCBMMjMuOTkwNTU4LDAgQzM3LjI1MTQ3NzIsMCA0OCwxMC43NDY0MDk2IDQ4LDI0LjAwNDcyMTYgTDQ4LDI0LjAwNDcyMTYgQzQ4LDM3LjI2MzAzMzYgMzcuMjUxNDc3Miw0OCAyNCw0OCBMMjQsNDggQzEwLjczOTA4MzksNDggMCwzNy4yNTM1OTA0IDAsMjQuMDA0NzIxNiBMMCwyNC4wMDQ3MjE2IEMtMC4wMDk0Mzg4NzkxLDEwLjc0NjQwOTYgMTAuNzM5MDgzOSwwIDIzLjk5MDU1OCwwIFoiIGlkPSJQYXRoIiBmaWxsPSIjODI0N0U1IiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxnIGlkPSJDbGlwcGVkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4LjAwMDAwMCwgMTAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPG1hc2sgaWQ9Im1hc2stMiIgZmlsbD0id2hpdGUiPgogICAgICAgICAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICAgICAgICAgIDwvbWFzaz4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iU1ZHSURfMV8iPjwvZz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjQuMTcwNTE5NCw4LjUyNzU3Nzk0IEMyMy41ODQ1MDkyLDguMTkxODQ2NTIgMjIuODM1MTg0Niw4LjE5MTg0NjUyIDIyLjE3MjMyMDYsOC41Mjc1Nzc5NCBMMTcuNTAzNDUyNCwxMS4yOTAxNjc5IEwxNC4zMzMyMzMzLDEzLjA0NTU2MzUgTDkuNzUwODI1NTgsMTUuNzk4NTYxMiBDOS4xNjQ4MTUzNywxNi4xMzQyOTI2IDguNDE1NDkwODQsMTYuMTM0MjkyNiA3Ljc1MjYyNjg0LDE1Ljc5ODU2MTIgTDQuMTY5MzE4NTIsMTMuNjIxMTAzMSBDMy41ODMzMDgzMiwxMy4yODUzNzE3IDMuMTcwMjE5MTUsMTIuNjEzOTA4OSAzLjE3MDIxOTE1LDExLjg2NTcwNzQgTDMuMTcwMjE5MTUsNy42ODM0NTMyNCBDMy4xNzAyMTkxNSw3LjAxMTk5MDQxIDMuNTA2NDU0NTIsNi4zNTAxMTk5IDQuMTY5MzE4NTIsNS45MjgwNTc1NSBMNy43NTI2MjY4NCwzLjgzNjkzMDQ2IEM4LjMzODYzNzA1LDMuNTAxMTk5MDQgOS4wODc5NjE1NywzLjUwMTE5OTA0IDkuNzUwODI1NTgsMy44MzY5MzA0NiBMMTMuMzM0MTMzOSw2LjAxNDM4ODQ5IEMxMy45MjAxNDQxLDYuMzUwMTE5OSAxNC4zMzMyMzMzLDcuMDIxNTgyNzMgMTQuMzMzMjMzMyw3Ljc2OTc4NDE3IEwxNC4zMzMyMzMzLDEwLjUzMjM3NDEgTDE3LjUwMzQ1MjQsOC42OTA2NDc0OCBMMTcuNTAzNDUyNCw1Ljg1MTMxODk0IEMxNy41MDM0NTI0LDUuMTc5ODU2MTIgMTcuMTY3MjE3MSw0LjUxNzk4NTYxIDE2LjUwNDM1Myw0LjA5NTkyMzI2IEw5LjgzNzI4NjEsMC4xNjMwNjk1NDQgQzkuMjUxMjc1ODksLTAuMTcyNjYxODcxIDguNTAxOTUxMzcsLTAuMTcyNjYxODcxIDcuODM5MDg3MzYsMC4xNjMwNjk1NDQgTDEuMDA4NzA2MDksNC4xODIyNTQyIEMwLjM0NTg0MjA4OSw0LjUxNzk4NTYxIDAuMDA5NjA2NzI0NzEsNS4xODk0NDg0NCAwLjAwOTYwNjcyNDcxLDUuODUxMzE4OTQgTDAuMDA5NjA2NzI0NzEsMTMuNzA3NDM0MSBDMC4wMDk2MDY3MjQ3MSwxNC4zNzg4OTY5IDAuMzQ1ODQyMDg5LDE1LjA0MDc2NzQgMS4wMDg3MDYwOSwxNS40NjI4Mjk3IEw3Ljc2MjIzMzU2LDE5LjM5NTY4MzUgQzguMzQ4MjQzNzcsMTkuNzMxNDE0OSA5LjA5NzU2ODMsMTkuNzMxNDE0OSA5Ljc2MDQzMjMsMTkuMzk1NjgzNSBMMTQuMzQyODQsMTYuNzE5NDI0NSBMMTcuNTEzMDU5MSwxNC44Nzc2OTc4IEwyMi4wOTU0NjY4LDEyLjIwMTQzODggQzIyLjY4MTQ3NywxMS44NjU3MDc0IDIzLjQzMDgwMTYsMTEuODY1NzA3NCAyNC4wOTM2NjU2LDEyLjIwMTQzODggTDI3LjY3Njk3MzksMTQuMjkyNTY1OSBDMjguMjYyOTg0MSwxNC42MjgyOTc0IDI4LjY3NjA3MzMsMTUuMjk5NzYwMiAyOC42NzYwNzMzLDE2LjA0Nzk2MTYgTDI4LjY3NjA3MzMsMjAuMjMwMjE1OCBDMjguNjc2MDczMywyMC45MDE2Nzg3IDI4LjMzOTgzNzksMjEuNTYzNTQ5MiAyNy42NzY5NzM5LDIxLjk4NTYxMTUgTDI0LjE4MDEyNjEsMjQuMDc2NzM4NiBDMjMuNTk0MTE1OSwyNC40MTI0NyAyMi44NDQ3OTE0LDI0LjQxMjQ3IDIyLjE4MTkyNzMsMjQuMDc2NzM4NiBMMTguNTg5MDEyMywyMS45ODU2MTE1IEMxOC4wMDMwMDIxLDIxLjY0OTg4MDEgMTcuNTg5OTEyOSwyMC45Nzg0MTczIDE3LjU4OTkxMjksMjAuMjMwMjE1OCBMMTcuNTg5OTEyOSwxNy41NTM5NTY4IEwxNC40MTk2OTM4LDE5LjM5NTY4MzUgTDE0LjQxOTY5MzgsMjIuMTU4MjczNCBDMTQuNDE5NjkzOCwyMi44Mjk3MzYyIDE0Ljc1NTkyOTIsMjMuNDkxNjA2NyAxNS40MTg3OTMyLDIzLjkxMzY2OTEgTDIyLjE3MjMyMDYsMjcuODQ2NTIyOCBDMjIuNzU4MzMwOCwyOC4xODIyNTQyIDIzLjUwNzY1NTQsMjguMTgyMjU0MiAyNC4xNzA1MTk0LDI3Ljg0NjUyMjggTDMwLjkyNDA0NjgsMjMuOTEzNjY5MSBDMzEuNTEwMDU3LDIzLjU3NzkzNzYgMzEuOTIzMTQ2MiwyMi45MDY0NzQ4IDMxLjkyMzE0NjIsMjIuMTU4MjczNCBMMzEuOTIzMTQ2MiwxNC4yMTU4MjczIEMzMS45MjMxNDYyLDEzLjU0NDM2NDUgMzEuNTg2OTEwOCwxMi44ODI0OTQgMzAuOTI0MDQ2OCwxMi40NjA0MzE3IEwyNC4xNzA1MTk0LDguNTI3NTc3OTQgWiIgaWQ9IlBhdGgiIGZpbGw9IiNGRkZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNtYXNrLTIpIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPGcgaWQ9IkV0aGVyZXVtIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgNTQuMDAwMDAwKSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC00NSI+CiAgICAgICAgICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbCIgZmlsbD0iIzYyN0VFQSIgY3g9IjI0IiBjeT0iMjQiIHI9IjI0Ij48L2NpcmNsZT4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aCIgZmlsbC1vcGFjaXR5PSIwLjYwMiIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIyNC43NDc5NDk3IDUuOTk2NzE5NTIgMjQuNzQ3OTQ5NyAxOS4zMDIzNTEgMzUuOTkzNDM5IDI0LjMyODA0ODEiPjwvcG9seWdvbj4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF8xXyIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIyNC43NDc5NDk3IDUuOTk2NzE5NTIgMTMuNTAyNDYwNCAyNC4zMjgwNDgxIDI0Ljc0Nzk0OTcgMTkuMzAyMzUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGhfMl8iIGZpbGwtb3BhY2l0eT0iMC42MDIiIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyAzMi45NDkxNTI1IDI0Ljc0Nzk0OTcgNDEuOTkwMTU4NiAzNiAyNi40MjA5OTUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGhfM18iIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyA0MS45OTAxNTg2IDI0Ljc0Nzk0OTcgMzIuOTQ5MTUyNSAxMy41MDI0NjA0IDI2LjQyMDk5NTEiPjwvcG9seWdvbj4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF80XyIgZmlsbC1vcGFjaXR5PSIwLjIiIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyAzMC44NTYyMDU2IDM1Ljk5MzQzOSAyNC4zMjgwNDgxIDI0Ljc0Nzk0OTcgMTkuMzAyMzUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF81XyIgZmlsbC1vcGFjaXR5PSIwLjYwMiIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIxNCAyNC4yMTk3NjE1IDI1IDMxIDI1IDE5Ij48L3BvbHlnb24+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/4ad6f564.5724c6f0.js b/assets/js/4ad6f564.02ac2f4d.js similarity index 56% rename from assets/js/4ad6f564.5724c6f0.js rename to assets/js/4ad6f564.02ac2f4d.js index dcdea1dcc..68f883714 100644 --- a/assets/js/4ad6f564.5724c6f0.js +++ b/assets/js/4ad6f564.02ac2f4d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[932],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),s=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},d=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=s(r),m=n,f=p["".concat(i,".").concat(m)]||p[m]||u[m]||o;return r?a.createElement(f,c(c({ref:t},d),{},{components:r})):a.createElement(f,c({ref:t},d))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=m;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[p]="string"==typeof e?e:n,c[1]=l;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>l,default:()=>y,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var a=r(87462),n=r(67294),o=r(3905);r(8209);const c={id:"oracle-services",title:"OracleServices",hide_table_of_contents:!1},l=void 0,i={unversionedId:"build/api/schema/objects/oracle-services",id:"build/api/schema/objects/oracle-services",title:"OracleServices",description:"No description",source:"@site/docs/build/api/schema/objects/oracle-services.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/oracle-services",permalink:"/build/api/schema/objects/oracle-services",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"oracle-services",title:"OracleServices",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"OracleData",permalink:"/build/api/schema/objects/oracle-data"},next:{title:"Ownership",permalink:"/build/api/schema/objects/ownership"}},s={},d=[{value:"Fields",id:"fields",level:3},{value:'OracleServices.ucoUcoData ',id:"code-style-fontweight-normal-oracleservicesbucobcodeucodata-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"No description"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type OracleServices {\n uco: UcoData\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-oracleservicesbucobcodeucodata-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"OracleServices.",(0,o.kt)("b",null,"uco"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/uco-data"},(0,o.kt)("inlineCode",{parentName:"a"},"UcoData"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/oracle-data"},(0,o.kt)("inlineCode",{parentName:"a"},"OracleData"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[932],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),s=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},d=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=s(r),m=n,f=p["".concat(i,".").concat(m)]||p[m]||u[m]||o;return r?a.createElement(f,c(c({ref:t},d),{},{components:r})):a.createElement(f,c({ref:t},d))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=m;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[p]="string"==typeof e?e:n,c[1]=l;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>l,default:()=>y,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var a=r(87462),n=r(67294),o=r(3905);r(8209);const c={id:"oracle-services",title:"OracleServices",hide_table_of_contents:!1},l=void 0,i={unversionedId:"build/api/schema/objects/oracle-services",id:"build/api/schema/objects/oracle-services",title:"OracleServices",description:"No description",source:"@site/docs/build/api/schema/objects/oracle-services.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/oracle-services",permalink:"/build/api/schema/objects/oracle-services",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"oracle-services",title:"OracleServices",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"OracleData",permalink:"/build/api/schema/objects/oracle-data"},next:{title:"Ownership",permalink:"/build/api/schema/objects/ownership"}},s={},d=[{value:"Fields",id:"fields",level:3},{value:'OracleServices.ucoUcoData ',id:"code-style-fontweight-normal-oracleservicesbucobcodeucodata-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"No description"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type OracleServices {\n uco: UcoData\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-oracleservicesbucobcodeucodata-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"OracleServices.",(0,o.kt)("b",null,"uco"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/uco-data"},(0,o.kt)("inlineCode",{parentName:"a"},"UcoData"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/oracle-data"},(0,o.kt)("inlineCode",{parentName:"a"},"OracleData"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/4bf323b4.22cfb18b.js b/assets/js/4bf323b4.22cfb18b.js deleted file mode 100644 index 48b4d68c0..000000000 --- a/assets/js/4bf323b4.22cfb18b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1601],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),m=i,k=u["".concat(s,".").concat(m)]||u[m]||d[m]||r;return n?a.createElement(k,l(l({ref:t},c),{},{components:n})):a.createElement(k,l({ref:t},c))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:i,l[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>p});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"language",title:"Smart Contracts - Language",sidebar_label:"Language",sidebar_position:2},l=void 0,o={unversionedId:"build/smart-contracts/language/language",id:"build/smart-contracts/language/language",title:"Smart Contracts - Language",description:"A Smart Contract is defined as followed:",source:"@site/docs/build/smart-contracts/language/README.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/",permalink:"/build/smart-contracts/language/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:2,frontMatter:{id:"language",title:"Smart Contracts - Language",sidebar_label:"Language",sidebar_position:2},sidebar:"docs",previous:{title:"Smart Contracts",permalink:"/build/smart-contracts/"},next:{title:"Triggers",permalink:"/build/smart-contracts/language/triggers"}},s={},p=[{value:"Version attribute",id:"version-attribute",level:2},{value:"Basic Types",id:"basic-types",level:2},{value:"Hexadecimals",id:"hexadecimals",level:2},{value:"ASCII character in string",id:"ascii-character-in-string",level:3},{value:"Comparaison",id:"comparaison",level:2},{value:"Arithmetic",id:"arithmetic",level:2},{value:"Ranges",id:"ranges",level:2},{value:"Loop",id:"loop",level:2},{value:"Variables & Scopes",id:"variables--scopes",level:2},{value:"Lists",id:"lists",level:2},{value:"Maps",id:"maps",level:2},{value:"Functions",id:"functions",level:2},{value:"Internal Functions",id:"internal-functions",level:3},{value:"Exported Functions",id:"exported-functions",level:3},{value:"Library",id:"library",level:2},{value:"Reserved keywords",id:"reserved-keywords",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"A Smart Contract is defined as followed:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"1 version attribute"),(0,i.kt)("li",{parentName:"ul"},"n ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/actions"},"actions")," block (maximum, one per ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/triggers"},"trigger"),")"),(0,i.kt)("li",{parentName:"ul"},"0 or 1 ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/condition#inherit"},"condition inherit")," block"),(0,i.kt)("li",{parentName:"ul"},"0 or 1 ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/condition#transaction"},"condition transaction")," block"),(0,i.kt)("li",{parentName:"ul"},"n ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/condition#transaction"},"condition transaction on")," block"),(0,i.kt)("li",{parentName:"ul"},"0 or 1 ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/condition#oracle"},"condition oracle")," block")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"actions")," blocks contain the code to execute when a specific event is triggered."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition inherit")," block is used to check the outgoing transaction (result) of the contract."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition transaction")," block is used to check the incoming transaction that triggered the contract."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition oracle")," block is used to check the incoming oracle transaction when there is an action triggered by oracle."),(0,i.kt)("h2",{id:"version-attribute"},"Version attribute"),(0,i.kt)("p",null,"A version attribute must be specified on the first line of the code. This version is used by the interpreter to have the right behavior in case of breaking changes."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\n# Rest of the code\n")),(0,i.kt)("h2",{id:"basic-types"},"Basic Types"),(0,i.kt)("p",null,"This language is based on a functional language (elixir), but we added some imperative twist to it, to make it friendlier!"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Comments are lines that start with a ",(0,i.kt)("inlineCode",{parentName:"li"},"#")),(0,i.kt)("li",{parentName:"ul"},"Strings are double quoted ",(0,i.kt)("inlineCode",{parentName:"li"},'"I am a string"')),(0,i.kt)("li",{parentName:"ul"},"String interpolation ",(0,i.kt)("inlineCode",{parentName:"li"},'"hello #{name}"')),(0,i.kt)("li",{parentName:"ul"},"Integers & Floats can use ",(0,i.kt)("inlineCode",{parentName:"li"},"_")," at your convenience ",(0,i.kt)("inlineCode",{parentName:"li"},"10_000")," ",(0,i.kt)("inlineCode",{parentName:"li"},"10_000.0")),(0,i.kt)("li",{parentName:"ul"},"Floats can use the scientific format: ",(0,i.kt)("inlineCode",{parentName:"li"},"1.0e2 == 100")),(0,i.kt)("li",{parentName:"ul"},"Booleans syntax: ",(0,i.kt)("inlineCode",{parentName:"li"},"true")," / ",(0,i.kt)("inlineCode",{parentName:"li"},"false")),(0,i.kt)("li",{parentName:"ul"},"The absence of value: ",(0,i.kt)("inlineCode",{parentName:"li"},"nil"))),(0,i.kt)("h2",{id:"hexadecimals"},"Hexadecimals"),(0,i.kt)("p",null,"In the Archethic blockchain, we extensively uses hexadecimals to convert all addresses, public keys or hashes on the user-facing interfaces. A Smart Contract is one of these interfaces."),(0,i.kt)("p",null,"To reduce the possibility of errors when comparing hexadecimals (",(0,i.kt)("inlineCode",{parentName:"p"},'"000ABCD" != "000abcd"')," even if it's actually the same value), we introduced a new syntax: ",(0,i.kt)("inlineCode",{parentName:"p"},"0x"),". The goal of this syntax is only to facilitate comparaison: ",(0,i.kt)("inlineCode",{parentName:"p"},"0x000ABCD == 0x000abcd"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'# don\'t\ntransaction.address == "000ABCD123"\n\n# do\ntransaction.address == 0x000ABCD123 # no quotes!\n')),(0,i.kt)("p",null,"So whenever you write a hexadecimal value by hand, prefix it with ",(0,i.kt)("inlineCode",{parentName:"p"},"0x"),"."),(0,i.kt)("h3",{id:"ascii-character-in-string"},"ASCII character in string"),(0,i.kt)("p",null,"If you need to use some specific character in a string, you can use their hexadecimal representation by prefixing the hexadecimal with ",(0,i.kt)("inlineCode",{parentName:"p"},"\\x")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'"hello" == "\\x68\\x65\\x6C\\x6C\\x6F"\n# true\n')),(0,i.kt)("h2",{id:"comparaison"},"Comparaison"),(0,i.kt)("p",null,"We compare by value, which means you can pretty much compare anything and it will work as you expect."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 == 1.0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"[1,2] == [1,2]")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},'[name: "John"] == [name: "John"]')),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"true != false")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"if do ... end")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"if do ... else ... end"))),(0,i.kt)("h2",{id:"arithmetic"},"Arithmetic"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 + 2 == 3")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"2.0 - 1.1 == 0.9")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 * 2.0 == 2")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 / 1 == 1.0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 / 0")," contract failure")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"The arithmetic is done with the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ericmj/decimal"},"Decimal library")," to ensure there is no floating point precision issue.\n",(0,i.kt)("strong",{parentName:"p"},"The only thing to keep in mind is that we truncate at decimal 8."))),(0,i.kt)("h2",{id:"ranges"},"Ranges"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1..5")," is equivalent to ",(0,i.kt)("inlineCode",{parentName:"li"},"[1,2,3,4,5]"))),(0,i.kt)("h2",{id:"loop"},"Loop"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"for name in names do ... end")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"for i in 1..10 do ... end"))),(0,i.kt)("h2",{id:"variables--scopes"},"Variables & Scopes"),(0,i.kt)("p",null,"Variables are not typed, you can assign any value to them."),(0,i.kt)("p",null,"Variables are mutable, if you update a variable declared in a parent scope, it will also update the value of this variable for the parent scope."),(0,i.kt)("p",null,"A new scope is created every time you enter a new block (",(0,i.kt)("inlineCode",{parentName:"p"},"do .. end"),"). A scope can access (read/write) the variables declared in its parent's scope, but not its child's scope."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'names = ["Tom", "Jerry", ""]\ntext = ""\nfor name in names do # ENTER SCOPE 1\n if name != "" do # ENTER SCOPE 1.1\n new_line = "\\n"\n text = "#{name}#{new_line}"\n end # EXIT SCOPE 1.1\n # new_line does not exists here\nend # EXIT SCOPE 1\n# test = "Tom\\nJerry\\n"\n# name and new_line does not exists here\n')),(0,i.kt)("p",null,"Here's the tree of scopes and variables for the above example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"[SCOPE 0]\n\u251c\u2500\u2500 names\n\u251c\u2500\u2500 text\n\u2514\u2500\u2500 [SCOPE 1]\n \u251c\u2500\u2500 name\n \u2514\u2500\u2500 [SCOPE 1.1]\n \u2514\u2500\u2500 new_line\n")),(0,i.kt)("h2",{id:"lists"},"Lists"),(0,i.kt)("p",null,"The list is the data structure to work with collections. The syntax is: ",(0,i.kt)("inlineCode",{parentName:"p"},"[1, 2]"),". An empty list is: ",(0,i.kt)("inlineCode",{parentName:"p"},"[]"),".\nThere is a ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library#list"},"List module")," in the library to manipulate lists."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Lists are actually ",(0,i.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Linked_list"},"Linked Lists"),".")),(0,i.kt)("h2",{id:"maps"},"Maps"),(0,i.kt)("p",null,"The map is the key-value data structure in the Smart Contract language. The syntax is: ",(0,i.kt)("inlineCode",{parentName:"p"},"[key1: 1, key2: 2]")," or if key starts with a number: ",(0,i.kt)("inlineCode",{parentName:"p"},'["00001abc...": 1]'),". The keys must be strings.\nThere is 3 ways to retrieve a value:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"map.property")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},'map["property"]')),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},'Map.get(map, "property")'))),(0,i.kt)("p",null,"We suggest to use the 1st syntax as often as possible. Use the 2nd or 3rd when dealing with dynamic properties."),(0,i.kt)("p",null,"There is a ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library#map"},"Map module")," module in the library to manipulate maps."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"Since the maps and the lists have a very close syntax, it is impossible to differentiate an empty map from an empty list. So, for semantic reasons, to create an empty map, use the ",(0,i.kt)("inlineCode",{parentName:"p"},"Map.new()")," function call.")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"The brackets are mostly optional! ",(0,i.kt)("inlineCode",{parentName:"p"},"key1: 1, key2: 2")," will work as well. But if you have a nested map, you cannot omit them!")),(0,i.kt)("h2",{id:"functions"},"Functions"),(0,i.kt)("p",null,"In the Archethic Smart Contract Language, you can declare 2 types of functions:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Internal Functions declared with the ",(0,i.kt)("inlineCode",{parentName:"li"},"fun")," keyword"),(0,i.kt)("li",{parentName:"ul"},"Exported Functions declared with the ",(0,i.kt)("inlineCode",{parentName:"li"},"export fun")," keyword")),(0,i.kt)("h3",{id:"internal-functions"},"Internal Functions"),(0,i.kt)("p",null,"Internal functions are functions that are only available in the Smart Contract. They are not callable from the outside."),(0,i.kt)("p",null,"They are declared with the ",(0,i.kt)("inlineCode",{parentName:"p"},"fun")," keyword and can be called from the ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions"},"Action")," or ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/condition"},"Condition")," blocks."),(0,i.kt)("p",null,"They can have 0 argument:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'fun hello() do\n "Hello World!"\nend\n')),(0,i.kt)("p",null,"Or more:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"fun sum(a, b) do\n a + b\nend\n")),(0,i.kt)("p",null,"You can also have the same function name with different signature:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"fun sum(a, b) do\n a + b\nend\n\nfun sum(list) do\n acc = 0\n for i in list do\n acc = acc + i\n end\n acc\nend\n")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"These functions aren't able to call another internal function")," but can call an Exported one."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Internal functions are able to use ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library"},"library module")," functions tagged as ",(0,i.kt)("inlineCode",{parentName:"p"},"I/O")," but not the functions tagged as ",(0,i.kt)("inlineCode",{parentName:"p"},"UPDATE_CONTRACT"),".")),(0,i.kt)("h3",{id:"exported-functions"},"Exported Functions"),(0,i.kt)("p",null,"Exported functions are callable from the Smart Contract but also through the outside via the JSON-RPC API.\nThey are declared like internal function but with the ",(0,i.kt)("inlineCode",{parentName:"p"},"export fun")," syntax."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"export fun get_current_count() do\n String.to_number contract.content\nend\n")),(0,i.kt)("p",null,"Unlike internal functions, they can be called from any block of code."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"External functions are not able to use ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library"},"library module")," functions tagged as ",(0,i.kt)("inlineCode",{parentName:"p"},"I/O")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"Transaction"),".")),(0,i.kt)("h2",{id:"library"},"Library"),(0,i.kt)("p",null,"You may use any functions from the library. The syntax is ",(0,i.kt)("inlineCode",{parentName:"p"},"Module.function(arg1, arg2)"),"."),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"The parenthesis are actually optional! ",(0,i.kt)("inlineCode",{parentName:"p"},"Module.function arg1, arg2")," will work as well.")),(0,i.kt)("p",null,"To see the list of functions available in the Smart Contract Language, check the ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library"},"Library page"),"."),(0,i.kt)("h2",{id:"reserved-keywords"},"Reserved keywords"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"for")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"do")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"end")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"if")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"else"))),(0,i.kt)("p",null,"... to be completed"))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/4bf323b4.8e1c3d63.js b/assets/js/4bf323b4.8e1c3d63.js new file mode 100644 index 000000000..e9588004c --- /dev/null +++ b/assets/js/4bf323b4.8e1c3d63.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1601],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),m=i,k=u["".concat(s,".").concat(m)]||u[m]||d[m]||r;return n?a.createElement(k,l(l({ref:t},c),{},{components:n})):a.createElement(k,l({ref:t},c))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:i,l[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>p});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"language",title:"Smart Contracts - Language",sidebar_label:"Language",sidebar_position:2},l=void 0,o={unversionedId:"build/smart-contracts/language/language",id:"build/smart-contracts/language/language",title:"Smart Contracts - Language",description:"A Smart Contract is defined as followed:",source:"@site/docs/build/smart-contracts/language/README.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/",permalink:"/build/smart-contracts/language/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:2,frontMatter:{id:"language",title:"Smart Contracts - Language",sidebar_label:"Language",sidebar_position:2},sidebar:"docs",previous:{title:"Smart Contracts",permalink:"/build/smart-contracts/"},next:{title:"Triggers",permalink:"/build/smart-contracts/language/triggers"}},s={},p=[{value:"Version attribute",id:"version-attribute",level:2},{value:"Basic Types",id:"basic-types",level:2},{value:"Hexadecimals",id:"hexadecimals",level:2},{value:"ASCII character in string",id:"ascii-character-in-string",level:3},{value:"Comparaison",id:"comparaison",level:2},{value:"Arithmetic",id:"arithmetic",level:2},{value:"Ranges",id:"ranges",level:2},{value:"Loop",id:"loop",level:2},{value:"Variables & Scopes",id:"variables--scopes",level:2},{value:"Lists",id:"lists",level:2},{value:"Maps",id:"maps",level:2},{value:"Functions",id:"functions",level:2},{value:"Internal Functions",id:"internal-functions",level:3},{value:"Exported Functions",id:"exported-functions",level:3},{value:"Library",id:"library",level:2},{value:"Reserved keywords",id:"reserved-keywords",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"A Smart Contract is defined as followed:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"1 version attribute"),(0,i.kt)("li",{parentName:"ul"},"n ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/actions"},"actions")," block (maximum, one per ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/triggers"},"trigger"),")"),(0,i.kt)("li",{parentName:"ul"},"0 or 1 ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/condition#inherit"},"condition inherit")," block"),(0,i.kt)("li",{parentName:"ul"},"0 or 1 ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/condition#transaction"},"condition transaction")," block"),(0,i.kt)("li",{parentName:"ul"},"n ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/condition#transaction"},"condition transaction on")," block"),(0,i.kt)("li",{parentName:"ul"},"0 or 1 ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/condition#oracle"},"condition oracle")," block")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"actions")," blocks contain the code to execute when a specific event is triggered."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition inherit")," block is used to check the outgoing transaction (result) of the contract."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition transaction")," block is used to check the incoming transaction that triggered the contract."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition oracle")," block is used to check the incoming oracle transaction when there is an action triggered by oracle."),(0,i.kt)("h2",{id:"version-attribute"},"Version attribute"),(0,i.kt)("p",null,"A version attribute must be specified on the first line of the code. This version is used by the interpreter to have the right behavior in case of breaking changes."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"@version 1\n# Rest of the code\n")),(0,i.kt)("h2",{id:"basic-types"},"Basic Types"),(0,i.kt)("p",null,"This language is based on a functional language (elixir), but we added some imperative twist to it, to make it friendlier!"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Comments are lines that start with a ",(0,i.kt)("inlineCode",{parentName:"li"},"#")),(0,i.kt)("li",{parentName:"ul"},"Strings are double quoted ",(0,i.kt)("inlineCode",{parentName:"li"},'"I am a string"')),(0,i.kt)("li",{parentName:"ul"},"String interpolation ",(0,i.kt)("inlineCode",{parentName:"li"},'"hello #{name}"')),(0,i.kt)("li",{parentName:"ul"},"Integers & Floats can use ",(0,i.kt)("inlineCode",{parentName:"li"},"_")," at your convenience ",(0,i.kt)("inlineCode",{parentName:"li"},"10_000")," ",(0,i.kt)("inlineCode",{parentName:"li"},"10_000.0")),(0,i.kt)("li",{parentName:"ul"},"Floats can use the scientific format: ",(0,i.kt)("inlineCode",{parentName:"li"},"1.0e2 == 100")),(0,i.kt)("li",{parentName:"ul"},"Booleans syntax: ",(0,i.kt)("inlineCode",{parentName:"li"},"true")," / ",(0,i.kt)("inlineCode",{parentName:"li"},"false")),(0,i.kt)("li",{parentName:"ul"},"The absence of value: ",(0,i.kt)("inlineCode",{parentName:"li"},"nil"))),(0,i.kt)("h2",{id:"hexadecimals"},"Hexadecimals"),(0,i.kt)("p",null,"In the Archethic blockchain, we extensively uses hexadecimals to convert all addresses, public keys or hashes on the user-facing interfaces. A Smart Contract is one of these interfaces."),(0,i.kt)("p",null,"To reduce the possibility of errors when comparing hexadecimals (",(0,i.kt)("inlineCode",{parentName:"p"},'"000ABCD" != "000abcd"')," even if it's actually the same value), we introduced a new syntax: ",(0,i.kt)("inlineCode",{parentName:"p"},"0x"),". The goal of this syntax is only to facilitate comparaison: ",(0,i.kt)("inlineCode",{parentName:"p"},"0x000ABCD == 0x000abcd"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'# don\'t\ntransaction.address == "000ABCD123"\n\n# do\ntransaction.address == 0x000ABCD123 # no quotes!\n')),(0,i.kt)("p",null,"So whenever you write a hexadecimal value by hand, prefix it with ",(0,i.kt)("inlineCode",{parentName:"p"},"0x"),"."),(0,i.kt)("h3",{id:"ascii-character-in-string"},"ASCII character in string"),(0,i.kt)("p",null,"If you need to use some specific character in a string, you can use their hexadecimal representation by prefixing the hexadecimal with ",(0,i.kt)("inlineCode",{parentName:"p"},"\\x")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'"hello" == "\\x68\\x65\\x6C\\x6C\\x6F"\n# true\n')),(0,i.kt)("h2",{id:"comparaison"},"Comparaison"),(0,i.kt)("p",null,"We compare by value, which means you can pretty much compare anything and it will work as you expect."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 == 1.0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"[1,2] == [1,2]")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},'[name: "John"] == [name: "John"]')),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"true != false")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"if do ... end")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"if do ... else ... end"))),(0,i.kt)("h2",{id:"arithmetic"},"Arithmetic"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 + 2 == 3")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"2.0 - 1.1 == 0.9")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 * 2.0 == 2")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 / 1 == 1.0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1 / 0")," contract failure")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"The arithmetic is done with the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ericmj/decimal"},"Decimal library")," to ensure there is no floating point precision issue.\n",(0,i.kt)("strong",{parentName:"p"},"The only thing to keep in mind is that we truncate at decimal 8."))),(0,i.kt)("h2",{id:"ranges"},"Ranges"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"1..5")," is equivalent to ",(0,i.kt)("inlineCode",{parentName:"li"},"[1,2,3,4,5]"))),(0,i.kt)("h2",{id:"loop"},"Loop"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"for name in names do ... end")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"for i in 1..10 do ... end"))),(0,i.kt)("h2",{id:"variables--scopes"},"Variables & Scopes"),(0,i.kt)("p",null,"Variables are not typed, you can assign any value to them."),(0,i.kt)("p",null,"Variables are mutable, if you update a variable declared in a parent scope, it will also update the value of this variable for the parent scope."),(0,i.kt)("p",null,"A new scope is created every time you enter a new block (",(0,i.kt)("inlineCode",{parentName:"p"},"do .. end"),"). A scope can access (read/write) the variables declared in its parent's scope, but not its child's scope."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'names = ["Tom", "Jerry", ""]\ntext = ""\nfor name in names do # ENTER SCOPE 1\n if name != "" do # ENTER SCOPE 1.1\n new_line = "\\n"\n text = "#{name}#{new_line}"\n end # EXIT SCOPE 1.1\n # new_line does not exists here\nend # EXIT SCOPE 1\n# test = "Tom\\nJerry\\n"\n# name and new_line does not exists here\n')),(0,i.kt)("p",null,"Here's the tree of scopes and variables for the above example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"[SCOPE 0]\n\u251c\u2500\u2500 names\n\u251c\u2500\u2500 text\n\u2514\u2500\u2500 [SCOPE 1]\n \u251c\u2500\u2500 name\n \u2514\u2500\u2500 [SCOPE 1.1]\n \u2514\u2500\u2500 new_line\n")),(0,i.kt)("h2",{id:"lists"},"Lists"),(0,i.kt)("p",null,"The list is the data structure to work with collections. The syntax is: ",(0,i.kt)("inlineCode",{parentName:"p"},"[1, 2]"),". An empty list is: ",(0,i.kt)("inlineCode",{parentName:"p"},"[]"),".\nThere is a ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library#list"},"List module")," in the library to manipulate lists."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Lists are actually ",(0,i.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Linked_list"},"Linked Lists"),".")),(0,i.kt)("h2",{id:"maps"},"Maps"),(0,i.kt)("p",null,"The map is the key-value data structure in the Smart Contract language. The syntax is: ",(0,i.kt)("inlineCode",{parentName:"p"},"[key1: 1, key2: 2]")," or if key starts with a number: ",(0,i.kt)("inlineCode",{parentName:"p"},'["00001abc...": 1]'),". The keys must be strings.\nThere is 3 ways to retrieve a value:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"map.property")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},'map["property"]')),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},'Map.get(map, "property")'))),(0,i.kt)("p",null,"We suggest to use the 1st syntax as often as possible. Use the 2nd or 3rd when dealing with dynamic properties."),(0,i.kt)("p",null,"There is a ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library#map"},"Map module")," module in the library to manipulate maps."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"Since the maps and the lists have a very close syntax, it is impossible to differentiate an empty map from an empty list. So, for semantic reasons, to create an empty map, use the ",(0,i.kt)("inlineCode",{parentName:"p"},"Map.new()")," function call.")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"The brackets are mostly optional! ",(0,i.kt)("inlineCode",{parentName:"p"},"key1: 1, key2: 2")," will work as well. But if you have a nested map, you cannot omit them!")),(0,i.kt)("h2",{id:"functions"},"Functions"),(0,i.kt)("p",null,"In the Archethic Smart Contract Language, you can declare 2 types of functions:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Internal Functions declared with the ",(0,i.kt)("inlineCode",{parentName:"li"},"fun")," keyword"),(0,i.kt)("li",{parentName:"ul"},"Exported Functions declared with the ",(0,i.kt)("inlineCode",{parentName:"li"},"export fun")," keyword")),(0,i.kt)("h3",{id:"internal-functions"},"Internal Functions"),(0,i.kt)("p",null,"Internal functions are functions that are only available in the Smart Contract. They are not callable from the outside."),(0,i.kt)("p",null,"They are declared with the ",(0,i.kt)("inlineCode",{parentName:"p"},"fun")," keyword and can be called from the ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions"},"Action")," or ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/condition"},"Condition")," blocks."),(0,i.kt)("p",null,"They can have 0 argument:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'fun hello() do\n "Hello World!"\nend\n')),(0,i.kt)("p",null,"Or more:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"fun sum(a, b) do\n a + b\nend\n")),(0,i.kt)("p",null,"You can also have the same function name with different signature:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"fun sum(a, b) do\n a + b\nend\n\nfun sum(list) do\n acc = 0\n for i in list do\n acc = acc + i\n end\n acc\nend\n")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"These functions aren't able to call another internal function")," but can call an Exported one."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Internal functions are able to use ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library"},"library module")," functions tagged as ",(0,i.kt)("inlineCode",{parentName:"p"},"I/O")," but not the functions tagged as ",(0,i.kt)("inlineCode",{parentName:"p"},"UPDATE_CONTRACT"),".")),(0,i.kt)("h3",{id:"exported-functions"},"Exported Functions"),(0,i.kt)("p",null,"Exported functions are callable from the Smart Contract but also through the outside via the JSON-RPC API.\nThey are declared like internal function but with the ",(0,i.kt)("inlineCode",{parentName:"p"},"export fun")," syntax."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"export fun get_current_count() do\n String.to_number contract.content\nend\n")),(0,i.kt)("p",null,"Unlike internal functions, they can be called from any block of code."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"External functions are not able to use ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library"},"library module")," functions tagged as ",(0,i.kt)("inlineCode",{parentName:"p"},"I/O")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"Transaction"),".")),(0,i.kt)("h2",{id:"library"},"Library"),(0,i.kt)("p",null,"You may use any functions from the library. The syntax is ",(0,i.kt)("inlineCode",{parentName:"p"},"Module.function(arg1, arg2)"),"."),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"The parenthesis are actually optional! ",(0,i.kt)("inlineCode",{parentName:"p"},"Module.function arg1, arg2")," will work as well.")),(0,i.kt)("p",null,"To see the list of functions available in the Smart Contract Language, check the ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library"},"Library page"),"."),(0,i.kt)("h2",{id:"reserved-keywords"},"Reserved keywords"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"for")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"do")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"end")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"if")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"else"))),(0,i.kt)("p",null,"... to be completed"))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/4c0f205c.2ca691f2.js b/assets/js/4c0f205c.2ca691f2.js new file mode 100644 index 000000000..8f36214b3 --- /dev/null +++ b/assets/js/4c0f205c.2ca691f2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2217],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,k=p["".concat(s,".").concat(m)]||p[m]||u[m]||o;return n?r.createElement(k,l(l({ref:t},d),{},{components:n})):r.createElement(k,l({ref:t},d))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"token",title:"token",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/queries/token",id:"build/api/schema/queries/token",title:"token",description:"Query the network to find a token's data",source:"@site/docs/build/api/schema/queries/token.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/token",permalink:"/build/api/schema/queries/token",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"token",title:"token",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"sharedSecrets",permalink:"/build/api/schema/queries/shared-secrets"},next:{title:"transactionChain",permalink:"/build/api/schema/queries/transaction-chain"}},c={},d=[{value:"Arguments",id:"arguments",level:3},{value:'token.addressAddress! ',id:"code-style-fontweight-normal-tokenbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Token ',id:"token-",level:4}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),k={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(f,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to find a token's data"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"token(\n address: Address!\n): Token\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokenbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"token.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"token-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/token"},(0,o.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[token]"," represents a token metadata.\nIt includes:"),(0,o.kt)("ul",{parentName:"blockquote"},(0,o.kt)("li",{parentName:"ul"},"genesis: Genesis address to the token"),(0,o.kt)("li",{parentName:"ul"},"name: Name of the token"),(0,o.kt)("li",{parentName:"ul"},"symbol: Symbol of the token"),(0,o.kt)("li",{parentName:"ul"},"supply: Supply of the token"),(0,o.kt)("li",{parentName:"ul"},"type: Type of the token"),(0,o.kt)("li",{parentName:"ul"},"decimals: Number of decimals of the token"),(0,o.kt)("li",{parentName:"ul"},"properties: Properties of the token (if any)"),(0,o.kt)("li",{parentName:"ul"},"collection: List of properties for a collection (if any)"),(0,o.kt)("li",{parentName:"ul"},"ownerships: authorization/delegations containing list of secrets and their authorized public keys to proof the ownership"),(0,o.kt)("li",{parentName:"ul"},"id: Unique identification of the token on the chain"))))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/4c0f205c.f84c61e8.js b/assets/js/4c0f205c.f84c61e8.js deleted file mode 100644 index efa89c60f..000000000 --- a/assets/js/4c0f205c.f84c61e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2217],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,k=p["".concat(s,".").concat(m)]||p[m]||u[m]||o;return n?r.createElement(k,l(l({ref:t},d),{},{components:n})):r.createElement(k,l({ref:t},d))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"token",title:"token",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/queries/token",id:"build/api/schema/queries/token",title:"token",description:"Query the network to find a token's data",source:"@site/docs/build/api/schema/queries/token.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/token",permalink:"/build/api/schema/queries/token",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"token",title:"token",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"sharedSecrets",permalink:"/build/api/schema/queries/shared-secrets"},next:{title:"transactionChain",permalink:"/build/api/schema/queries/transaction-chain"}},c={},d=[{value:"Arguments",id:"arguments",level:3},{value:'token.addressAddress! ',id:"code-style-fontweight-normal-tokenbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Token ',id:"token-",level:4}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),k={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(f,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to find a token's data"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"token(\n address: Address!\n): Token\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokenbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"token.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"token-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/token"},(0,o.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[token]"," represents a token metadata.\nIt includes:"),(0,o.kt)("ul",{parentName:"blockquote"},(0,o.kt)("li",{parentName:"ul"},"genesis: Genesis address to the token"),(0,o.kt)("li",{parentName:"ul"},"name: Name of the token"),(0,o.kt)("li",{parentName:"ul"},"symbol: Symbol of the token"),(0,o.kt)("li",{parentName:"ul"},"supply: Supply of the token"),(0,o.kt)("li",{parentName:"ul"},"type: Type of the token"),(0,o.kt)("li",{parentName:"ul"},"decimals: Number of decimals of the token"),(0,o.kt)("li",{parentName:"ul"},"properties: Properties of the token (if any)"),(0,o.kt)("li",{parentName:"ul"},"collection: List of properties for a collection (if any)"),(0,o.kt)("li",{parentName:"ul"},"ownerships: authorization/delegations containing list of secrets and their authorized public keys to proof the ownership"),(0,o.kt)("li",{parentName:"ul"},"id: Unique identification of the token on the chain"))))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/4d54d076.294b9d5f.js b/assets/js/4d54d076.294b9d5f.js deleted file mode 100644 index 42e270e4f..000000000 --- a/assets/js/4d54d076.294b9d5f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7080],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=u(n),m=o,h=d["".concat(s,".").concat(m)]||d[m]||p[m]||i;return n?r.createElement(h,a(a({ref:t},c),{},{components:n})):r.createElement(h,a({ref:t},c))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,a[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var r=n(87462),o=(n(67294),n(3905));n(8209);const i={id:"contributing",title:"Contributing"},a=void 0,l={unversionedId:"contributing",id:"contributing",title:"Contributing",description:"This documentation is maintained by the Archethic Foundation. It's an open source project and aims to be the most extensive",source:"@site/docs/contributing.md",sourceDirName:".",slug:"/contributing",permalink:"/contributing",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"contributing",title:"Contributing"},sidebar:"docs",previous:{title:"Wallet",permalink:"/FAQ/wallet"}},s={},u=[{value:"How to contribute",id:"how-to-contribute",level:2},{value:"Guidelines",id:"guidelines",level:3},{value:"Diagrams",id:"diagrams",level:3}],c={toc:u},d="wrapper";function p(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This documentation is maintained by the Archethic Foundation. It's an open source project and aims to be the most extensive\nresources of knowledge on Archethic and its ecosystem."),(0,o.kt)("p",null,"We welcome contributions from anyone and are grateful for even the smallest of improvement from typo issues, to proposals, to enhance explaination or create diagrams, etc.\nTherefore, pull requests, discussions, and contributions from the community are encouraged."),(0,o.kt)("h2",{id:"how-to-contribute"},"How to contribute"),(0,o.kt)("p",null,"You can contribute on the ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-docs"},"archethic-foundation/archethic-docs repository"),". The documentation is build with ",(0,o.kt)("a",{parentName:"p",href:"https://docusaurus.io"},"Docusaurus")," and each page is written in Markdown which is an easy to learn syntax extension to plain text that make creating links, rendering images and nice looking formatting example."),(0,o.kt)("h3",{id:"guidelines"},"Guidelines"),(0,o.kt)("p",null,"There are few basic ground-rules for contributing:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"No ",(0,o.kt)("inlineCode",{parentName:"li"},"--force")," pushes or modifying the Git history"),(0,o.kt)("li",{parentName:"ol"},"Pull requests are preferred to issues, especially for small changes such as typos. Issues should be used for generic or broad-based changes or missing content. Suggestions and requests are encouraged."),(0,o.kt)("li",{parentName:"ol"},"Please ",(0,o.kt)("inlineCode",{parentName:"li"},"fork")," or use ",(0,o.kt)("inlineCode",{parentName:"li"},"non-main branches"),"."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"Significant modifications"),", even by contributors, ought to be subject to a pull request to solicit feedback from other contributors."),(0,o.kt)("li",{parentName:"ol"},"Pull requests to solicit feedback are encouraged for any other non-trivial contribution but left to the discretion of the contributor."),(0,o.kt)("li",{parentName:"ol"},"Contributors should attempt to adhere to the prevailing MarkDown style, language, and layout."),(0,o.kt)("li",{parentName:"ol"},"Correct grammar should be used at all times. Pull requests with typos will not be merged until fixed."),(0,o.kt)("li",{parentName:"ol"},"Care should be taken to remain as objective and informative as possible. There should be no editorializing, and external bias should not be present.")),(0,o.kt)("h3",{id:"diagrams"},"Diagrams"),(0,o.kt)("p",null,"The documentation supports also diagram through the use or ",(0,o.kt)("a",{parentName:"p",href:"https://mermaid-js.github.io"},"Mermaid")," which permits to create diagram with markdown code:"),(0,o.kt)("p",null,"Inserting this code:"),(0,o.kt)("p",null,"```mermaid",(0,o.kt)("br",null),"sequenceDiagram",(0,o.kt)("br",null),"\xa0\xa0\xa0Alice->>John: Hello John, how are you? ",(0,o.kt)("br",null),"\xa0\xa0\xa0John--\x3e>Alice: Great!",(0,o.kt)("br",null),"\xa0\xa0\xa0Alice-)John: See you later!",(0,o.kt)("br",null),"```"),(0,o.kt)("p",null,"will output this diagram"),(0,o.kt)("mermaid",{value:"sequenceDiagram\n Alice->>John: Hello John, how are you?\n John--\x3e>Alice: Great!\n Alice-)John: See you later!"}),(0,o.kt)("p",null,"To help you design them you can leverage an ",(0,o.kt)("a",{parentName:"p",href:"https://mermaid.live/"},"editor")," to visualize the diagrams."))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/4d54d076.ac6ac088.js b/assets/js/4d54d076.ac6ac088.js new file mode 100644 index 000000000..94c015da3 --- /dev/null +++ b/assets/js/4d54d076.ac6ac088.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7080],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=u(n),m=o,h=d["".concat(s,".").concat(m)]||d[m]||p[m]||i;return n?r.createElement(h,a(a({ref:t},c),{},{components:n})):r.createElement(h,a({ref:t},c))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,a[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var r=n(87462),o=(n(67294),n(3905));n(8209);const i={id:"contributing",title:"Contributing"},a=void 0,l={unversionedId:"contributing",id:"contributing",title:"Contributing",description:"This documentation is maintained by the Archethic Foundation. It's an open source project and aims to be the most extensive",source:"@site/docs/contributing.md",sourceDirName:".",slug:"/contributing",permalink:"/contributing",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"contributing",title:"Contributing"},sidebar:"docs",previous:{title:"Wallet",permalink:"/FAQ/wallet"}},s={},u=[{value:"How to contribute",id:"how-to-contribute",level:2},{value:"Guidelines",id:"guidelines",level:3},{value:"Diagrams",id:"diagrams",level:3}],c={toc:u},d="wrapper";function p(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This documentation is maintained by the Archethic Foundation. It's an open source project and aims to be the most extensive\nresources of knowledge on Archethic and its ecosystem."),(0,o.kt)("p",null,"We welcome contributions from anyone and are grateful for even the smallest of improvement from typo issues, to proposals, to enhance explaination or create diagrams, etc.\nTherefore, pull requests, discussions, and contributions from the community are encouraged."),(0,o.kt)("h2",{id:"how-to-contribute"},"How to contribute"),(0,o.kt)("p",null,"You can contribute on the ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-docs"},"archethic-foundation/archethic-docs repository"),". The documentation is build with ",(0,o.kt)("a",{parentName:"p",href:"https://docusaurus.io"},"Docusaurus")," and each page is written in Markdown which is an easy to learn syntax extension to plain text that make creating links, rendering images and nice looking formatting example."),(0,o.kt)("h3",{id:"guidelines"},"Guidelines"),(0,o.kt)("p",null,"There are few basic ground-rules for contributing:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"No ",(0,o.kt)("inlineCode",{parentName:"li"},"--force")," pushes or modifying the Git history"),(0,o.kt)("li",{parentName:"ol"},"Pull requests are preferred to issues, especially for small changes such as typos. Issues should be used for generic or broad-based changes or missing content. Suggestions and requests are encouraged."),(0,o.kt)("li",{parentName:"ol"},"Please ",(0,o.kt)("inlineCode",{parentName:"li"},"fork")," or use ",(0,o.kt)("inlineCode",{parentName:"li"},"non-main branches"),"."),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"Significant modifications"),", even by contributors, ought to be subject to a pull request to solicit feedback from other contributors."),(0,o.kt)("li",{parentName:"ol"},"Pull requests to solicit feedback are encouraged for any other non-trivial contribution but left to the discretion of the contributor."),(0,o.kt)("li",{parentName:"ol"},"Contributors should attempt to adhere to the prevailing MarkDown style, language, and layout."),(0,o.kt)("li",{parentName:"ol"},"Correct grammar should be used at all times. Pull requests with typos will not be merged until fixed."),(0,o.kt)("li",{parentName:"ol"},"Care should be taken to remain as objective and informative as possible. There should be no editorializing, and external bias should not be present.")),(0,o.kt)("h3",{id:"diagrams"},"Diagrams"),(0,o.kt)("p",null,"The documentation supports also diagram through the use or ",(0,o.kt)("a",{parentName:"p",href:"https://mermaid-js.github.io"},"Mermaid")," which permits to create diagram with markdown code:"),(0,o.kt)("p",null,"Inserting this code:"),(0,o.kt)("p",null,"```mermaid",(0,o.kt)("br",null),"sequenceDiagram",(0,o.kt)("br",null),"\xa0\xa0\xa0Alice->>John: Hello John, how are you? ",(0,o.kt)("br",null),"\xa0\xa0\xa0John--\x3e>Alice: Great!",(0,o.kt)("br",null),"\xa0\xa0\xa0Alice-)John: See you later!",(0,o.kt)("br",null),"```"),(0,o.kt)("p",null,"will output this diagram"),(0,o.kt)("mermaid",{value:"sequenceDiagram\n Alice->>John: Hello John, how are you?\n John--\x3e>Alice: Great!\n Alice-)John: See you later!"}),(0,o.kt)("p",null,"To help you design them you can leverage an ",(0,o.kt)("a",{parentName:"p",href:"https://mermaid.live/"},"editor")," to visualize the diagrams."))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/5037eb2b.9ddeee34.js b/assets/js/5037eb2b.9ddeee34.js deleted file mode 100644 index 9c776e192..000000000 --- a/assets/js/5037eb2b.9ddeee34.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[246],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=i,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||o;return n?r.createElement(f,a(a({ref:t},u),{},{components:n})):r.createElement(f,a({ref:t},u))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:i,a[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>s});var r=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"election",title:"Election"},a=void 0,l={unversionedId:"build/core/election",id:"build/core/election",title:"Election",description:"Archethic provides rotating algorithm to elect validation and storage nodes.",source:"@site/docs/build/core/election.md",sourceDirName:"build/core",slug:"/build/core/election",permalink:"/build/core/election",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"election",title:"Election"},sidebar:"docs",previous:{title:"Archethic's database",permalink:"/build/core/database"},next:{title:"CD",permalink:"/build/core/governance/code-proposals-cd"}},c={},s=[{value:"Heuristic constraints",id:"heuristic-constraints",level:2},{value:"Low-Level integrations",id:"low-level-integrations",level:2},{value:"Hypergeomtric distribution",id:"hypergeomtric-distribution",level:3}],u={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic provides rotating algorithm to elect validation and storage nodes. "),(0,i.kt)("p",null,"Validation and Storage Election algorithm provides also list of heuristic constraints to fine grained elections. "),(0,i.kt)("h2",{id:"heuristic-constraints"},"Heuristic constraints"),(0,i.kt)("p",null,"An ETS table is used to store the last constraints values for a faster lookup."),(0,i.kt)("p",null,"Storage constraints are defined by:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"minimum storage geographical patches"),(0,i.kt)("li",{parentName:"ul"},"minimum storage average by geographical patch"),(0,i.kt)("li",{parentName:"ul"},"number of replicast")),(0,i.kt)("p",null,"Validation constraints are defined by:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"minimum validation geographical patch distribution"),(0,i.kt)("li",{parentName:"ul"},"minimum validation nodes"),(0,i.kt)("li",{parentName:"ul"},"validation number based on a given transaction")),(0,i.kt)("h2",{id:"low-level-integrations"},"Low-Level integrations"),(0,i.kt)("p",null,"Sometimes for performance issue, we are leveraging low-level programming in C, to perform fast computation."),(0,i.kt)("h3",{id:"hypergeomtric-distribution"},"Hypergeomtric distribution"),(0,i.kt)("p",null,"For example, the Hypergeometric Distribution simulation is computed in C and wrapped in an Erlang port communication.\nBut for better simulation lookup, a cache is provided as process to hold the last value for a given number of nodes.\nIf the number of nodes changes, the hypergeometric distribution will be trigger."),(0,i.kt)("p",null,"The C program is using ",(0,i.kt)("inlineCode",{parentName:"p"},"GMP")," for big float arithemetic operations and ",(0,i.kt)("inlineCode",{parentName:"p"},"OMP")," for parallel computations to make it efficient."),(0,i.kt)("mermaid",{value:"sequenceDiagram\n Election->>+Process: Run simulation for N nodes\n alt with cache value\n Process--\x3e>Election: Retrieve cached value\n else without cache value\n Process->>C: Run simultation\n end\n"}))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/5037eb2b.e02aa6b0.js b/assets/js/5037eb2b.e02aa6b0.js new file mode 100644 index 000000000..40dac641c --- /dev/null +++ b/assets/js/5037eb2b.e02aa6b0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[246],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(r),m=i,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||o;return r?n.createElement(f,a(a({ref:t},u),{},{components:r})):n.createElement(f,a({ref:t},u))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:i,a[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>s});var n=r(87462),i=(r(67294),r(3905));r(8209);const o={id:"election",title:"Election"},a=void 0,l={unversionedId:"build/core/election",id:"build/core/election",title:"Election",description:"Archethic provides rotating algorithm to elect validation and storage nodes.",source:"@site/docs/build/core/election.md",sourceDirName:"build/core",slug:"/build/core/election",permalink:"/build/core/election",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"election",title:"Election"},sidebar:"docs",previous:{title:"Archethic's database",permalink:"/build/core/database"},next:{title:"CD",permalink:"/build/core/governance/code-proposals-cd"}},c={},s=[{value:"Heuristic constraints",id:"heuristic-constraints",level:2},{value:"Low-Level integrations",id:"low-level-integrations",level:2},{value:"Hypergeomtric distribution",id:"hypergeomtric-distribution",level:3}],u={toc:s},p="wrapper";function d(e){let{components:t,...r}=e;return(0,i.kt)(p,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic provides rotating algorithm to elect validation and storage nodes. "),(0,i.kt)("p",null,"Validation and Storage Election algorithm provides also list of heuristic constraints to fine grained elections. "),(0,i.kt)("h2",{id:"heuristic-constraints"},"Heuristic constraints"),(0,i.kt)("p",null,"An ETS table is used to store the last constraints values for a faster lookup."),(0,i.kt)("p",null,"Storage constraints are defined by:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"minimum storage geographical patches"),(0,i.kt)("li",{parentName:"ul"},"minimum storage average by geographical patch"),(0,i.kt)("li",{parentName:"ul"},"number of replicast")),(0,i.kt)("p",null,"Validation constraints are defined by:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"minimum validation geographical patch distribution"),(0,i.kt)("li",{parentName:"ul"},"minimum validation nodes"),(0,i.kt)("li",{parentName:"ul"},"validation number based on a given transaction")),(0,i.kt)("h2",{id:"low-level-integrations"},"Low-Level integrations"),(0,i.kt)("p",null,"Sometimes for performance issue, we are leveraging low-level programming in C, to perform fast computation."),(0,i.kt)("h3",{id:"hypergeomtric-distribution"},"Hypergeomtric distribution"),(0,i.kt)("p",null,"For example, the Hypergeometric Distribution simulation is computed in C and wrapped in an Erlang port communication.\nBut for better simulation lookup, a cache is provided as process to hold the last value for a given number of nodes.\nIf the number of nodes changes, the hypergeometric distribution will be trigger."),(0,i.kt)("p",null,"The C program is using ",(0,i.kt)("inlineCode",{parentName:"p"},"GMP")," for big float arithemetic operations and ",(0,i.kt)("inlineCode",{parentName:"p"},"OMP")," for parallel computations to make it efficient."),(0,i.kt)("mermaid",{value:"sequenceDiagram\n Election->>+Process: Run simulation for N nodes\n alt with cache value\n Process--\x3e>Election: Retrieve cached value\n else without cache value\n Process->>C: Run simultation\n end\n"}))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/55620597.54f970da.js b/assets/js/55620597.6973b092.js similarity index 57% rename from assets/js/55620597.54f970da.js rename to assets/js/55620597.6973b092.js index 66ee409c2..bd436e019 100644 --- a/assets/js/55620597.54f970da.js +++ b/assets/js/55620597.6973b092.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8342],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),s=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(r),f=n,m=d["".concat(l,".").concat(f)]||d[f]||u[f]||o;return r?a.createElement(m,c(c({ref:t},p),{},{components:r})):a.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:n,c[1]=i;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>c,metadata:()=>l,toc:()=>p});var a=r(87462),n=r(67294),o=r(3905);r(8209);const c={id:"oracle-update",title:"oracleUpdate",hide_table_of_contents:!1},i=void 0,l={unversionedId:"build/api/schema/subscriptions/oracle-update",id:"build/api/schema/subscriptions/oracle-update",title:"oracleUpdate",description:"Subscribe to be notified when a new oracle data is stored",source:"@site/docs/build/api/schema/subscriptions/oracle-update.mdx",sourceDirName:"build/api/schema/subscriptions",slug:"/build/api/schema/subscriptions/oracle-update",permalink:"/build/api/schema/subscriptions/oracle-update",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"oracle-update",title:"oracleUpdate",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionType",permalink:"/build/api/schema/scalars/transaction-type"},next:{title:"transactionConfirmed",permalink:"/build/api/schema/subscriptions/transaction-confirmed"}},s={},p=[{value:"Type",id:"type",level:3},{value:'OracleData ',id:"oracledata-",level:4}],d=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Subscribe to be notified when a new oracle data is stored"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"oracleUpdate: OracleData\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"oracledata-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/oracle-data"},(0,o.kt)("inlineCode",{parentName:"a"},"OracleData"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[OracleData]"," represents an oracle data.")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8342],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>b});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),s=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(r),f=n,b=d["".concat(l,".").concat(f)]||d[f]||u[f]||o;return r?a.createElement(b,c(c({ref:t},p),{},{components:r})):a.createElement(b,c({ref:t},p))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:n,c[1]=i;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>c,metadata:()=>l,toc:()=>p});var a=r(87462),n=r(67294),o=r(3905);r(8209);const c={id:"oracle-update",title:"oracleUpdate",hide_table_of_contents:!1},i=void 0,l={unversionedId:"build/api/schema/subscriptions/oracle-update",id:"build/api/schema/subscriptions/oracle-update",title:"oracleUpdate",description:"Subscribe to be notified when a new oracle data is stored",source:"@site/docs/build/api/schema/subscriptions/oracle-update.mdx",sourceDirName:"build/api/schema/subscriptions",slug:"/build/api/schema/subscriptions/oracle-update",permalink:"/build/api/schema/subscriptions/oracle-update",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"oracle-update",title:"oracleUpdate",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionType",permalink:"/build/api/schema/scalars/transaction-type"},next:{title:"transactionConfirmed",permalink:"/build/api/schema/subscriptions/transaction-confirmed"}},s={},p=[{value:"Type",id:"type",level:3},{value:'OracleData ',id:"oracledata-",level:4}],d=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},m="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(m,(0,a.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Subscribe to be notified when a new oracle data is stored"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"oracleUpdate: OracleData\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"oracledata-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/oracle-data"},(0,o.kt)("inlineCode",{parentName:"a"},"OracleData"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[OracleData]"," represents an oracle data.")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/56f0859a.25484777.js b/assets/js/56f0859a.25484777.js new file mode 100644 index 000000000..7289c7dad --- /dev/null +++ b/assets/js/56f0859a.25484777.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5050],{3905:(t,e,a)=>{a.d(e,{Zo:()=>d,kt:()=>f});var n=a(67294);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function s(t){for(var e=1;e=0||(r[a]=t[a]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(r[a]=t[a])}return r}var c=n.createContext({}),l=function(t){var e=n.useContext(c),a=e;return t&&(a="function"==typeof t?t(e):s(s({},e),t)),a},d=function(t){var e=l(t.components);return n.createElement(c.Provider,{value:e},t.children)},p="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},m=n.forwardRef((function(t,e){var a=t.components,r=t.mdxType,o=t.originalType,c=t.parentName,d=i(t,["components","mdxType","originalType","parentName"]),p=l(a),m=r,f=p["".concat(c,".").concat(m)]||p[m]||u[m]||o;return a?n.createElement(f,s(s({ref:e},d),{},{components:a})):n.createElement(f,s({ref:e},d))}));function f(t,e){var a=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var o=a.length,s=new Array(o);s[0]=m;var i={};for(var c in e)hasOwnProperty.call(e,c)&&(i[c]=e[c]);i.originalType=t,i[p]="string"==typeof t?t:r,s[1]=i;for(var l=2;l{a.r(e),a.d(e,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>i,default:()=>y,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=a(87462),r=a(67294),o=a(3905);a(8209);const s={id:"transaction-attestation",title:"TransactionAttestation",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/objects/transaction-attestation",id:"build/api/schema/objects/transaction-attestation",title:"TransactionAttestation",description:"[TransactionAttestation] represents an attestation when a transaction is successfully validated and stored.",source:"@site/docs/build/api/schema/objects/transaction-attestation.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-attestation",permalink:"/build/api/schema/objects/transaction-attestation",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-attestation",title:"TransactionAttestation",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Token",permalink:"/build/api/schema/objects/token"},next:{title:"TransactionError",permalink:"/build/api/schema/objects/transaction-error"}},l={},d=[{value:"Fields",id:"fields",level:3},{value:'TransactionAttestation.addressAddress ',id:"code-style-fontweight-normal-transactionattestationbaddressbcodeaddress-",level:4},{value:'TransactionAttestation.maxConfirmationsInt ',id:"code-style-fontweight-normal-transactionattestationbmaxconfirmationsbcodeint-",level:4},{value:'TransactionAttestation.nbConfirmationsInt ',id:"code-style-fontweight-normal-transactionattestationbnbconfirmationsbcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=t=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:t.url,title:"Specified by "+t.url},"\u2398")),m=t=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+t.class},t.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function y(t){let{components:e,...a}=t;return(0,o.kt)(b,(0,n.Z)({},f,a,{components:e,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TransactionAttestation]"," represents an attestation when a transaction is successfully validated and stored.\nFew attestations can be received with differents confirmations to ensure a better security of the replication."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionAttestation {\n address: Address\n maxConfirmations: Int\n nbConfirmations: Int\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionattestationbaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionAttestation.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionattestationbmaxconfirmationsbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionAttestation.",(0,o.kt)("b",null,"maxConfirmations"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionattestationbnbconfirmationsbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionAttestation.",(0,o.kt)("b",null,"nbConfirmations"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/transaction-confirmed"},(0,o.kt)("inlineCode",{parentName:"a"},"transactionConfirmed"))," ",(0,o.kt)(m,{class:"secondary",text:"subscription",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(t,e,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/56f0859a.f082d303.js b/assets/js/56f0859a.f082d303.js deleted file mode 100644 index 6c4a7488f..000000000 --- a/assets/js/56f0859a.f082d303.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5050],{3905:(t,e,a)=>{a.d(e,{Zo:()=>d,kt:()=>f});var n=a(67294);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function s(t){for(var e=1;e=0||(r[a]=t[a]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(r[a]=t[a])}return r}var c=n.createContext({}),l=function(t){var e=n.useContext(c),a=e;return t&&(a="function"==typeof t?t(e):s(s({},e),t)),a},d=function(t){var e=l(t.components);return n.createElement(c.Provider,{value:e},t.children)},p="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},m=n.forwardRef((function(t,e){var a=t.components,r=t.mdxType,o=t.originalType,c=t.parentName,d=i(t,["components","mdxType","originalType","parentName"]),p=l(a),m=r,f=p["".concat(c,".").concat(m)]||p[m]||u[m]||o;return a?n.createElement(f,s(s({ref:e},d),{},{components:a})):n.createElement(f,s({ref:e},d))}));function f(t,e){var a=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var o=a.length,s=new Array(o);s[0]=m;var i={};for(var c in e)hasOwnProperty.call(e,c)&&(i[c]=e[c]);i.originalType=t,i[p]="string"==typeof t?t:r,s[1]=i;for(var l=2;l{a.r(e),a.d(e,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>i,default:()=>y,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=a(87462),r=a(67294),o=a(3905);a(8209);const s={id:"transaction-attestation",title:"TransactionAttestation",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/objects/transaction-attestation",id:"build/api/schema/objects/transaction-attestation",title:"TransactionAttestation",description:"[TransactionAttestation] represents an attestation when a transaction is successfully validated and stored.",source:"@site/docs/build/api/schema/objects/transaction-attestation.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-attestation",permalink:"/build/api/schema/objects/transaction-attestation",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-attestation",title:"TransactionAttestation",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Token",permalink:"/build/api/schema/objects/token"},next:{title:"TransactionError",permalink:"/build/api/schema/objects/transaction-error"}},l={},d=[{value:"Fields",id:"fields",level:3},{value:'TransactionAttestation.addressAddress ',id:"code-style-fontweight-normal-transactionattestationbaddressbcodeaddress-",level:4},{value:'TransactionAttestation.maxConfirmationsInt ',id:"code-style-fontweight-normal-transactionattestationbmaxconfirmationsbcodeint-",level:4},{value:'TransactionAttestation.nbConfirmationsInt ',id:"code-style-fontweight-normal-transactionattestationbnbconfirmationsbcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=t=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:t.url,title:"Specified by "+t.url},"\u2398")),m=t=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+t.class},t.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function y(t){let{components:e,...a}=t;return(0,o.kt)(b,(0,n.Z)({},f,a,{components:e,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TransactionAttestation]"," represents an attestation when a transaction is successfully validated and stored.\nFew attestations can be received with differents confirmations to ensure a better security of the replication."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionAttestation {\n address: Address\n maxConfirmations: Int\n nbConfirmations: Int\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionattestationbaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionAttestation.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionattestationbmaxconfirmationsbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionAttestation.",(0,o.kt)("b",null,"maxConfirmations"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionattestationbnbconfirmationsbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TransactionAttestation.",(0,o.kt)("b",null,"nbConfirmations"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/transaction-confirmed"},(0,o.kt)("inlineCode",{parentName:"a"},"transactionConfirmed"))," ",(0,o.kt)(m,{class:"secondary",text:"subscription",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(t,e,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/57fb9911.01f9182c.js b/assets/js/57fb9911.01f9182c.js deleted file mode 100644 index dca1ea21e..000000000 --- a/assets/js/57fb9911.01f9182c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4889],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),c=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,f=p["".concat(i,".").concat(m)]||p[m]||u[m]||o;return n?r.createElement(f,l(l({ref:t},d),{},{components:n})):r.createElement(f,l({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:a,l[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>s,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"ledger-operations",title:"LedgerOperations",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/objects/ledger-operations",id:"build/api/schema/objects/ledger-operations",title:"LedgerOperations",description:"[LedgerOperations] represents the ledger operations performed by the transaction",source:"@site/docs/build/api/schema/objects/ledger-operations.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/ledger-operations",permalink:"/build/api/schema/objects/ledger-operations",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"ledger-operations",title:"LedgerOperations",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Endpoint",permalink:"/build/api/schema/objects/endpoint"},next:{title:"Ledger",permalink:"/build/api/schema/objects/ledger"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'LedgerOperations.feeInt ',id:"code-style-fontweight-normal-ledgeroperationsbfeebcodeint-",level:4},{value:'LedgerOperations.transactionMovements[TransactionMovement] ',id:"code-style-fontweight-normal-ledgeroperationsbtransactionmovementsbcodetransactionmovement--",level:4},{value:'LedgerOperations.unspentOutputs[UnspentOutput] ',id:"code-style-fontweight-normal-ledgeroperationsbunspentoutputsbcodeunspentoutput--",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function g(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[LedgerOperations]"," represents the ledger operations performed by the transaction\nIt includes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Transaction movements: assets transfers"),(0,o.kt)("li",{parentName:"ul"},"Unspent outputs: remaining unspent outputs"),(0,o.kt)("li",{parentName:"ul"},"Fee: transaction fee")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type LedgerOperations {\n fee: Int\n transactionMovements: [TransactionMovement]\n unspentOutputs: [UnspentOutput]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ledgeroperationsbfeebcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"LedgerOperations.",(0,o.kt)("b",null,"fee"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ledgeroperationsbtransactionmovementsbcodetransactionmovement--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"LedgerOperations.",(0,o.kt)("b",null,"transactionMovements"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-movement"},(0,o.kt)("inlineCode",{parentName:"a"},"[TransactionMovement]"))," ",(0,o.kt)(m,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ledgeroperationsbunspentoutputsbcodeunspentoutput--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"LedgerOperations.",(0,o.kt)("b",null,"unspentOutputs"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/unspent-output"},(0,o.kt)("inlineCode",{parentName:"a"},"[UnspentOutput]"))," ",(0,o.kt)(m,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}g.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/57fb9911.5c9932c4.js b/assets/js/57fb9911.5c9932c4.js new file mode 100644 index 000000000..37baa22b5 --- /dev/null +++ b/assets/js/57fb9911.5c9932c4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4889],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),c=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,f=p["".concat(i,".").concat(m)]||p[m]||u[m]||o;return n?r.createElement(f,l(l({ref:t},d),{},{components:n})):r.createElement(f,l({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:a,l[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>s,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"ledger-operations",title:"LedgerOperations",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/objects/ledger-operations",id:"build/api/schema/objects/ledger-operations",title:"LedgerOperations",description:"[LedgerOperations] represents the ledger operations performed by the transaction",source:"@site/docs/build/api/schema/objects/ledger-operations.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/ledger-operations",permalink:"/build/api/schema/objects/ledger-operations",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"ledger-operations",title:"LedgerOperations",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Endpoint",permalink:"/build/api/schema/objects/endpoint"},next:{title:"Ledger",permalink:"/build/api/schema/objects/ledger"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'LedgerOperations.feeInt ',id:"code-style-fontweight-normal-ledgeroperationsbfeebcodeint-",level:4},{value:'LedgerOperations.transactionMovements[TransactionMovement] ',id:"code-style-fontweight-normal-ledgeroperationsbtransactionmovementsbcodetransactionmovement--",level:4},{value:'LedgerOperations.unspentOutputs[UnspentOutput] ',id:"code-style-fontweight-normal-ledgeroperationsbunspentoutputsbcodeunspentoutput--",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function g(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[LedgerOperations]"," represents the ledger operations performed by the transaction\nIt includes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Transaction movements: assets transfers"),(0,o.kt)("li",{parentName:"ul"},"Unspent outputs: remaining unspent outputs"),(0,o.kt)("li",{parentName:"ul"},"Fee: transaction fee")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type LedgerOperations {\n fee: Int\n transactionMovements: [TransactionMovement]\n unspentOutputs: [UnspentOutput]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ledgeroperationsbfeebcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"LedgerOperations.",(0,o.kt)("b",null,"fee"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ledgeroperationsbtransactionmovementsbcodetransactionmovement--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"LedgerOperations.",(0,o.kt)("b",null,"transactionMovements"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-movement"},(0,o.kt)("inlineCode",{parentName:"a"},"[TransactionMovement]"))," ",(0,o.kt)(m,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ledgeroperationsbunspentoutputsbcodeunspentoutput--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"LedgerOperations.",(0,o.kt)("b",null,"unspentOutputs"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/unspent-output"},(0,o.kt)("inlineCode",{parentName:"a"},"[UnspentOutput]"))," ",(0,o.kt)(m,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}g.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/59ac5e04.31113802.js b/assets/js/59ac5e04.31113802.js deleted file mode 100644 index 7a7474889..000000000 --- a/assets/js/59ac5e04.31113802.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9199],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),s=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,o=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,h=u["".concat(o,".").concat(m)]||u[m]||p[m]||l;return n?r.createElement(h,i(i({ref:t},d),{},{components:n})):r.createElement(h,i({ref:t},d))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=m;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const l={id:"commands",title:"ADPU commands"},i=void 0,c={unversionedId:"build/clients/ledger-wallet/commands",id:"build/clients/ledger-wallet/commands",title:"ADPU commands",description:"APDU commands",source:"@site/docs/build/clients/ledger-wallet/commands.md",sourceDirName:"build/clients/ledger-wallet",slug:"/build/clients/ledger-wallet/commands",permalink:"/build/clients/ledger-wallet/commands",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"commands",title:"ADPU commands"},sidebar:"docs",previous:{title:"Ledger Application API",permalink:"/build/clients/ledger-wallet/api"},next:{title:"Archethic's wallet access",permalink:"/build/clients/wallet-access"}},o={},s=[{value:"APDU commands",id:"apdu-commands",level:2},{value:"Get Origin Public Key",id:"get-origin-public-key",level:3},{value:"Get Archethic Account Address",id:"get-archethic-account-address",level:3},{value:"Get Signature",id:"get-signature",level:3}],d={toc:s},u="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"apdu-commands"},"APDU commands"),(0,a.kt)("h3",{id:"get-origin-public-key"},"Get Origin Public Key"),(0,a.kt)("p",null,"APDU Command ","[bytes]",":"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"CLA = E0"),(0,a.kt)("th",{parentName:"tr",align:null},"INS = 02"),(0,a.kt)("th",{parentName:"tr",align:null},"P1 = 00"),(0,a.kt)("th",{parentName:"tr",align:null},"P2 = 00"),(0,a.kt)("th",{parentName:"tr",align:null},"Lc = 00")))),(0,a.kt)("p",null,"APDU Response = Encoded Origin Public Key i.e., encode(o_{pub}) "),(0,a.kt)("h3",{id:"get-archethic-account-address"},"Get Archethic Account Address"),(0,a.kt)("p",null,"APDU Command ","[bytes]"," = "),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"CLA = E0"),(0,a.kt)("th",{parentName:"tr",align:null},"INS = 04"),(0,a.kt)("th",{parentName:"tr",align:null},"P1 = hash_type (for addr) ","[1 byte]"),(0,a.kt)("th",{parentName:"tr",align:null},"P2 = address_index (for bip44) ","[4 bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"Lc = len(ewk",(0,a.kt)("em",{parentName:"th"},"{aes}+ew"),"{aes}) ","[1 byte]"),(0,a.kt)("th",{parentName:"tr",align:null},"ewk_{aes} ","[bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"ew_{aes} ","[bytes]")))),(0,a.kt)("p",null,"APDU Response = Encoded Archethic Account Address i.e., arch_address "),(0,a.kt)("h3",{id:"get-signature"},"Get Signature"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"CLA = E0"),(0,a.kt)("th",{parentName:"tr",align:null},"INS = 08"),(0,a.kt)("th",{parentName:"tr",align:null},"P1 = hash_type (of tx_hash) ","[1 byte]"),(0,a.kt)("th",{parentName:"tr",align:null},"P2 = address_index (for bip44) ","[4 bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"Lc = len(tx",(0,a.kt)("em",{parentName:"th"},"hash+ewk"),"{aes}+ew_{aes}) ","[1 byte]"),(0,a.kt)("th",{parentName:"tr",align:null},"tx_hash ","[bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"ewk_{aes} ","[bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"ew_{aes} ","[bytes]")))),(0,a.kt)("p",null,"APDU Response = ASN DER Signature || Corresponding public key from whose private key the signature was made, i.e., encode(pub_key)"))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/59ac5e04.a9705ded.js b/assets/js/59ac5e04.a9705ded.js new file mode 100644 index 000000000..cd3ed30a6 --- /dev/null +++ b/assets/js/59ac5e04.a9705ded.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9199],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),s=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,o=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,h=u["".concat(o,".").concat(m)]||u[m]||p[m]||l;return n?r.createElement(h,i(i({ref:t},d),{},{components:n})):r.createElement(h,i({ref:t},d))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=m;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const l={id:"commands",title:"ADPU commands"},i=void 0,c={unversionedId:"build/clients/ledger-wallet/commands",id:"build/clients/ledger-wallet/commands",title:"ADPU commands",description:"APDU commands",source:"@site/docs/build/clients/ledger-wallet/commands.md",sourceDirName:"build/clients/ledger-wallet",slug:"/build/clients/ledger-wallet/commands",permalink:"/build/clients/ledger-wallet/commands",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"commands",title:"ADPU commands"},sidebar:"docs",previous:{title:"Ledger Application API",permalink:"/build/clients/ledger-wallet/api"},next:{title:"Archethic's wallet access",permalink:"/build/clients/wallet-access"}},o={},s=[{value:"APDU commands",id:"apdu-commands",level:2},{value:"Get Origin Public Key",id:"get-origin-public-key",level:3},{value:"Get Archethic Account Address",id:"get-archethic-account-address",level:3},{value:"Get Signature",id:"get-signature",level:3}],d={toc:s},u="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"apdu-commands"},"APDU commands"),(0,a.kt)("h3",{id:"get-origin-public-key"},"Get Origin Public Key"),(0,a.kt)("p",null,"APDU Command ","[bytes]",":"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"CLA = E0"),(0,a.kt)("th",{parentName:"tr",align:null},"INS = 02"),(0,a.kt)("th",{parentName:"tr",align:null},"P1 = 00"),(0,a.kt)("th",{parentName:"tr",align:null},"P2 = 00"),(0,a.kt)("th",{parentName:"tr",align:null},"Lc = 00")))),(0,a.kt)("p",null,"APDU Response = Encoded Origin Public Key i.e., encode(o_{pub}) "),(0,a.kt)("h3",{id:"get-archethic-account-address"},"Get Archethic Account Address"),(0,a.kt)("p",null,"APDU Command ","[bytes]"," = "),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"CLA = E0"),(0,a.kt)("th",{parentName:"tr",align:null},"INS = 04"),(0,a.kt)("th",{parentName:"tr",align:null},"P1 = hash_type (for addr) ","[1 byte]"),(0,a.kt)("th",{parentName:"tr",align:null},"P2 = address_index (for bip44) ","[4 bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"Lc = len(ewk",(0,a.kt)("em",{parentName:"th"},"{aes}+ew"),"{aes}) ","[1 byte]"),(0,a.kt)("th",{parentName:"tr",align:null},"ewk_{aes} ","[bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"ew_{aes} ","[bytes]")))),(0,a.kt)("p",null,"APDU Response = Encoded Archethic Account Address i.e., arch_address "),(0,a.kt)("h3",{id:"get-signature"},"Get Signature"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"CLA = E0"),(0,a.kt)("th",{parentName:"tr",align:null},"INS = 08"),(0,a.kt)("th",{parentName:"tr",align:null},"P1 = hash_type (of tx_hash) ","[1 byte]"),(0,a.kt)("th",{parentName:"tr",align:null},"P2 = address_index (for bip44) ","[4 bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"Lc = len(tx",(0,a.kt)("em",{parentName:"th"},"hash+ewk"),"{aes}+ew_{aes}) ","[1 byte]"),(0,a.kt)("th",{parentName:"tr",align:null},"tx_hash ","[bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"ewk_{aes} ","[bytes]"),(0,a.kt)("th",{parentName:"tr",align:null},"ew_{aes} ","[bytes]")))),(0,a.kt)("p",null,"APDU Response = ASN DER Signature || Corresponding public key from whose private key the signature was made, i.e., encode(pub_key)"))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/5eea7269.84422fdc.js b/assets/js/5eea7269.84422fdc.js deleted file mode 100644 index bc8d5c01c..000000000 --- a/assets/js/5eea7269.84422fdc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6748],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=a.createContext({}),i=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=i(e.components);return a.createElement(d.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,d=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=i(n),m=o,k=p["".concat(d,".").concat(m)]||p[m]||c[m]||r;return n?a.createElement(k,l(l({ref:t},u),{},{components:n})):a.createElement(k,l({ref:t},u))}));function k(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=m;var s={};for(var d in t)hasOwnProperty.call(t,d)&&(s[d]=t[d]);s.originalType=e,s[p]="string"==typeof e?e:o,l[1]=s;for(var i=2;i{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>c,assets:()=>i,contentTitle:()=>s,default:()=>b,frontMatter:()=>l,metadata:()=>d,toc:()=>u});var a=n(87462),o=n(67294),r=n(3905);n(8209);const l={id:"unspent-output",title:"UnspentOutput",hide_table_of_contents:!1},s=void 0,d={unversionedId:"build/api/schema/objects/unspent-output",id:"build/api/schema/objects/unspent-output",title:"UnspentOutput",description:"[UnspentOutput] represents the remaining unspent output of the transaction.",source:"@site/docs/build/api/schema/objects/unspent-output.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/unspent-output",permalink:"/build/api/schema/objects/unspent-output",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"unspent-output",title:"UnspentOutput",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"UcoTransfer",permalink:"/build/api/schema/objects/uco-transfer"},next:{title:"ValidationStamp",permalink:"/build/api/schema/objects/validation-stamp"}},i={},u=[{value:"Fields",id:"fields",level:3},{value:'UnspentOutput.amountInt ',id:"code-style-fontweight-normal-unspentoutputbamountbcodeint-",level:4},{value:'UnspentOutput.fromAddress ',id:"code-style-fontweight-normal-unspentoutputbfrombcodeaddress-",level:4},{value:'UnspentOutput.timestampTimestamp ',id:"code-style-fontweight-normal-unspentoutputbtimestampbcodetimestamp-",level:4},{value:'UnspentOutput.tokenAddressAddress ',id:"code-style-fontweight-normal-unspentoutputbtokenaddressbcodeaddress-",level:4},{value:'UnspentOutput.tokenIdInt ',id:"code-style-fontweight-normal-unspentoutputbtokenidbcodeint-",level:4},{value:'UnspentOutput.typeString ',id:"code-style-fontweight-normal-unspentoutputbtypebcodestring-",level:4},{value:'UnspentOutput.versionInt ',id:"code-style-fontweight-normal-unspentoutputbversionbcodeint-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),c=e=>(0,r.kt)(o.Fragment,null,"Specification",(0,r.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{class:"badge badge--"+e.class},e.text)),k={toc:u,Bullet:p,SpecifiedBy:c,Badge:m},f="wrapper";function b(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"[UnspentOutput]"," represents the remaining unspent output of the transaction.\nIt includes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"From: transaction which send the amount of assets"),(0,r.kt)("li",{parentName:"ul"},"Amount: asset amount"),(0,r.kt)("li",{parentName:"ul"},"Type: UCO/token"),(0,r.kt)("li",{parentName:"ul"},"token address: address of the token if the type is token"),(0,r.kt)("li",{parentName:"ul"},"token id: It is the id for a token which is allocated when the token is minted."),(0,r.kt)("li",{parentName:"ul"},"Timestamp: Date time when the UTXO created/manipulated"),(0,r.kt)("li",{parentName:"ul"},"Version: Version of the UTXO data structure")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-graphql"},"type UnspentOutput {\n amount: Int\n from: Address\n timestamp: Timestamp\n tokenAddress: Address\n tokenId: Int\n type: String\n version: Int\n}\n")),(0,r.kt)("h3",{id:"fields"},"Fields"),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbamountbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"amount"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbfrombcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"from"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbtimestampbcodetimestamp-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"timestamp"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,r.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbtokenaddressbcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"tokenAddress"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbtokenidbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"tokenId"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbtypebcodestring-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"type"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,r.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbversionbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"version"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h3",{id:"member-of"},"Member of"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger-operations"},(0,r.kt)("inlineCode",{parentName:"a"},"LedgerOperations"))," ",(0,r.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/5eea7269.d10503e0.js b/assets/js/5eea7269.d10503e0.js new file mode 100644 index 000000000..6c5df1ae3 --- /dev/null +++ b/assets/js/5eea7269.d10503e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6748],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=a.createContext({}),i=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=i(e.components);return a.createElement(d.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,d=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=i(n),m=o,k=p["".concat(d,".").concat(m)]||p[m]||c[m]||r;return n?a.createElement(k,l(l({ref:t},u),{},{components:n})):a.createElement(k,l({ref:t},u))}));function k(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=m;var s={};for(var d in t)hasOwnProperty.call(t,d)&&(s[d]=t[d]);s.originalType=e,s[p]="string"==typeof e?e:o,l[1]=s;for(var i=2;i{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>c,assets:()=>i,contentTitle:()=>s,default:()=>b,frontMatter:()=>l,metadata:()=>d,toc:()=>u});var a=n(87462),o=n(67294),r=n(3905);n(8209);const l={id:"unspent-output",title:"UnspentOutput",hide_table_of_contents:!1},s=void 0,d={unversionedId:"build/api/schema/objects/unspent-output",id:"build/api/schema/objects/unspent-output",title:"UnspentOutput",description:"[UnspentOutput] represents the remaining unspent output of the transaction.",source:"@site/docs/build/api/schema/objects/unspent-output.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/unspent-output",permalink:"/build/api/schema/objects/unspent-output",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"unspent-output",title:"UnspentOutput",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"UcoTransfer",permalink:"/build/api/schema/objects/uco-transfer"},next:{title:"ValidationStamp",permalink:"/build/api/schema/objects/validation-stamp"}},i={},u=[{value:"Fields",id:"fields",level:3},{value:'UnspentOutput.amountInt ',id:"code-style-fontweight-normal-unspentoutputbamountbcodeint-",level:4},{value:'UnspentOutput.fromAddress ',id:"code-style-fontweight-normal-unspentoutputbfrombcodeaddress-",level:4},{value:'UnspentOutput.timestampTimestamp ',id:"code-style-fontweight-normal-unspentoutputbtimestampbcodetimestamp-",level:4},{value:'UnspentOutput.tokenAddressAddress ',id:"code-style-fontweight-normal-unspentoutputbtokenaddressbcodeaddress-",level:4},{value:'UnspentOutput.tokenIdInt ',id:"code-style-fontweight-normal-unspentoutputbtokenidbcodeint-",level:4},{value:'UnspentOutput.typeString ',id:"code-style-fontweight-normal-unspentoutputbtypebcodestring-",level:4},{value:'UnspentOutput.versionInt ',id:"code-style-fontweight-normal-unspentoutputbversionbcodeint-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),c=e=>(0,r.kt)(o.Fragment,null,"Specification",(0,r.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,r.kt)(o.Fragment,null,(0,r.kt)("span",{class:"badge badge--"+e.class},e.text)),k={toc:u,Bullet:p,SpecifiedBy:c,Badge:m},f="wrapper";function b(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"[UnspentOutput]"," represents the remaining unspent output of the transaction.\nIt includes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"From: transaction which send the amount of assets"),(0,r.kt)("li",{parentName:"ul"},"Amount: asset amount"),(0,r.kt)("li",{parentName:"ul"},"Type: UCO/token"),(0,r.kt)("li",{parentName:"ul"},"token address: address of the token if the type is token"),(0,r.kt)("li",{parentName:"ul"},"token id: It is the id for a token which is allocated when the token is minted."),(0,r.kt)("li",{parentName:"ul"},"Timestamp: Date time when the UTXO created/manipulated"),(0,r.kt)("li",{parentName:"ul"},"Version: Version of the UTXO data structure")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-graphql"},"type UnspentOutput {\n amount: Int\n from: Address\n timestamp: Timestamp\n tokenAddress: Address\n tokenId: Int\n type: String\n version: Int\n}\n")),(0,r.kt)("h3",{id:"fields"},"Fields"),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbamountbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"amount"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbfrombcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"from"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbtimestampbcodetimestamp-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"timestamp"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,r.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbtokenaddressbcodeaddress-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"tokenAddress"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,r.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbtokenidbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"tokenId"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbtypebcodestring-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"type"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,r.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h4",{id:"code-style-fontweight-normal-unspentoutputbversionbcodeint-"},(0,r.kt)("a",{parentName:"h4",href:"#"},(0,r.kt)("code",{style:{fontWeight:"normal"}},"UnspentOutput.",(0,r.kt)("b",null,"version"))),(0,r.kt)(p,{mdxType:"Bullet"}),(0,r.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,r.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,r.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,r.kt)("blockquote",null),(0,r.kt)("h3",{id:"member-of"},"Member of"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger-operations"},(0,r.kt)("inlineCode",{parentName:"a"},"LedgerOperations"))," ",(0,r.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/5fe1ab02.63913a50.js b/assets/js/5fe1ab02.63913a50.js new file mode 100644 index 000000000..120a74c5b --- /dev/null +++ b/assets/js/5fe1ab02.63913a50.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2926],{3905:(t,n,e)=>{e.d(n,{Zo:()=>c,kt:()=>u});var a=e(67294);function i(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function o(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,a)}return e}function r(t){for(var n=1;n=0||(i[e]=t[e]);return i}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(i[e]=t[e])}return i}var d=a.createContext({}),l=function(t){var n=a.useContext(d),e=n;return t&&(e="function"==typeof t?t(n):r(r({},n),t)),e},c=function(t){var n=l(t.components);return a.createElement(d.Provider,{value:n},t.children)},m="mdxType",p={inlineCode:"code",wrapper:function(t){var n=t.children;return a.createElement(a.Fragment,{},n)}},f=a.forwardRef((function(t,n){var e=t.components,i=t.mdxType,o=t.originalType,d=t.parentName,c=s(t,["components","mdxType","originalType","parentName"]),m=l(e),f=i,u=m["".concat(d,".").concat(f)]||m[f]||p[f]||o;return e?a.createElement(u,r(r({ref:n},c),{},{components:e})):a.createElement(u,r({ref:n},c))}));function u(t,n){var e=arguments,i=n&&n.mdxType;if("string"==typeof t||i){var o=e.length,r=new Array(o);r[0]=f;var s={};for(var d in n)hasOwnProperty.call(n,d)&&(s[d]=n[d]);s.originalType=t,s[m]="string"==typeof t?t:i,r[1]=s;for(var l=2;l{e.r(n),e.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var a=e(87462),i=(e(67294),e(3905));e(8209);const o={id:"mining",title:"Mining"},r=void 0,s={unversionedId:"build/core/mining/mining",id:"build/core/mining/mining",title:"Mining",description:"Transaction validation (aka Mining) defines processes and validations algorithms.",source:"@site/docs/build/core/mining/README.md",sourceDirName:"build/core/mining",slug:"/build/core/mining/",permalink:"/build/core/mining/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"mining",title:"Mining"},sidebar:"docs",previous:{title:"Code Proposals",permalink:"/build/core/governance/code-proposals"},next:{title:"Pending transaction validation",permalink:"/build/core/mining/transaction-validation"}},d={},l=[{value:"Standalone validation workflow",id:"standalone-validation-workflow",level:2},{value:"Distributed validation",id:"distributed-validation",level:2},{value:"Worflow",id:"worflow",level:3},{value:"FSM",id:"fsm",level:3}],c={toc:l},m="wrapper";function p(t){let{components:n,...e}=t;return(0,i.kt)(m,(0,a.Z)({},c,e,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Transaction validation (aka Mining) defines processes and validations algorithms."),(0,i.kt)("p",null,"Once a transaction is under validation a given process is dedicated to this transaction.\nDepending of the number of validation nodes several validation implementation are defined."),(0,i.kt)("p",null,"Along with validation workflow and processes, this context defines high levels functions to get the validation nodes and to assert their election."),(0,i.kt)("h2",{id:"standalone-validation-workflow"},"Standalone validation workflow"),(0,i.kt)("p",null,"When there is not only a single validation nodes (during the network initialization), a process is spawn to manage the transaction validation as a Task to run it (fire-off)"),(0,i.kt)("mermaid",{value:"stateDiagram-v2\n direction LR\n [*] --\x3e Idle\n Idle --\x3e ValidateTransaction\n ValidateTransaction: Validate transaction\n ValidateTransaction --\x3e Replicate\n Replicate --\x3e Replicate: Wait confirmations\n Replicate --\x3e NotifyAttestation\n NotifyAttestation: Notify transaction attestation\n NotifyAttestation --\x3e [*]\n"}),(0,i.kt)("h2",{id:"distributed-validation"},"Distributed validation"),(0,i.kt)("h3",{id:"worflow"},"Worflow"),(0,i.kt)("mermaid",{value:"sequenceDiagram\n Client->>+WelcomeNode: Submit new transaction\n par send transaction\n WelcomeNode->>+Coordinator: \n and \n WelcomeNode->>+CrossValidationNode: \n end\n WelcomeNode ->>-Client: Transaction submited\n\n par build context \n Coordinator ->>+PreviousStorageNode: Fetch previous transaction\n Coordinator ->>+PreviousStorageNode: Fetch unspent outputs\n and\n CrossValidationNode ->>+PreviousStorageNode: Fetch previous transaction\n CrossValidationNode ->>+PreviousStorageNode: Fetch unspent outputs\n CrossValidationNode ->>+Coordinator: Notify context and availability\n end\n \n \n Coordinator ->>+Coordinator: Build validation stamp\n Coordinator ->>+CrossValidationNode: Send validation stamp\n\n par wait validation stamp\n CrossValidationNode ->>+CrossValidationNode: Cross validate the stamp\n CrossValidationNode ->>+CrossValidationNode: Notify cross validation stamp\n CrossValidationNode ->>+Coordinator: Notify cross validation stamp\n end\n\n par chain replication \n Coordinator ->>+ChainStorageNode: Replicate transaction\n CrossValidationNode ->>+ChainStorageNode: Replicate transaction\n end\n\n ChainStorageNode ->>+ChainStorageNode: Validate transaction and store transaction\n alt transaction valid \n ChainStorageNode ->>+ CrossValidationNode: Replication confirmation\n ChainStorageNode ->>+ Coordinator: Replication confirmation\n end\n\n par notify replication\n CrossValidationNode--\x3e+WelcomeNode: Confirm replication\n Coordinator--\x3e+WelcomeNode: Confirm replication\n CrossValidationNode--\x3e+PreviousStorageNode: Confirm replication\n Coordinator--\x3e+PreviousStorageNode: Confirm replication\n CrossValidationNode--\x3e+BeaconChain: Confirm replication\n Coordinator--\x3e+BeaconChain: Confirm replication\n end\n\n WelcomeNode--\x3eClient: Notify replication confirmations"}),(0,i.kt)("h3",{id:"fsm"},"FSM"),(0,i.kt)("p",null,"When there are multiple validation nodes, a distributed workflow process is spawn as FSM to define the states and evolution of the ARCH consensus algorithm."),(0,i.kt)("p",null,"This FSM process is ran by all the validation nodes."),(0,i.kt)("p",null,"Therefore each validation maintains a ",(0,i.kt)("inlineCode",{parentName:"p"},"Registry")," of all the pending transaction validation processes, to be able to redirect P2P messages to the right process."),(0,i.kt)("mermaid",{value:"stateDiagram-v2\n state role_state <>\n state join_state <>\n\n [*] --\x3e Idle\n\n Idle --\x3e Idle: Prevalidate transaction & Build context\n Idle --\x3e role_state\n\n role_state --\x3e Coordinator: first of elected validation nodes\n role_state --\x3e CrossValidationNode: other node\n\n state Coordinator {\n state if_state_enough_context <>\n [*] --\x3e WaitContext\n\n WaitContext: Waiting context and confirmations\n WaitContext --\x3e WaitContext: Add context and node confirmation\n\n EnoughContextAndConfirmations: Enough context and confirmations ?\n\n WaitContext --\x3e EnoughContextAndConfirmations\n EnoughContextAndConfirmations --\x3e if_state_enough_context\n\n if_state_enough_context --\x3e CreateValidationStamp: yes\n if_state_enough_context --\x3e WaitContext: no\n\n CreateValidationStamp: Create validation stamp\n CreateValidationStamp --\x3e NotifyValidationStamp\n NotifyValidationStamp: Notify validation stamp \n NotifyValidationStamp --\x3e [*]\n }\n\n CrossValidationNode: Cross Validation Node\n state CrossValidationNode {\n [*] --\x3e NotifyContext\n NotifyContext: Notify transaction context\n\n NotifyContext --\x3e WaitValidationStamp\n WaitValidationStamp: Wait validation stamp to validate\n\n WaitValidationStamp --\x3e ValidateValidationStamp\n ValidateValidationStamp: Verify validations tamp\n\n ValidateValidationStamp --\x3e ValidateValidationStamp: create cross validation stamp\n ValidateValidationStamp --\x3e SendCrossValidationStamp\n SendCrossValidationStamp: Send the cross validation stamp to all\n SendCrossValidationStamp --\x3e [*]\n }\n\n Coordinator --\x3e join_state\n CrossValidationNode --\x3e join_state\n\n\n join_state --\x3e WaitCrossValidationStamps\n\n WaitCrossValidationStamps: Wait cross validation stamps\n state WaitCrossValidationStamps {\n state if_state_enough <>\n state if_state_atomic_commitment <>\n \n [*] --\x3e WaitingStamps\n WaitingStamps: Wait\n\n WaitingStamps --\x3e WaitingStamps: Add cross validation stamp\n WaitingStamps --\x3e EnoughStamps\n\n EnoughStamps: Enough cross validation stamps ?\n\n EnoughStamps --\x3e if_state_enough\n\n if_state_enough --\x3e AtomicCommitmentReached: yes \n if_state_enough --\x3e WaitingStamps: no \n \n AtomicCommitmentReached: Atomic commitment reached ? \n \n AtomicCommitmentReached --\x3e if_state_atomic_commitment \n \n if_state_atomic_commitment --\x3e [*]: yes \n if_state_atomic_commitment --\x3e [*]: no\n }\n\n WaitCrossValidationStamps --\x3e Replication\n\n state Replication {\n [*] --\x3e NotifyTransaction\n NotifyTransaction: Notify transaction\n WaitAck: Waiting replicas confirmations\n WaitAck --\x3e WaitAck: Add ack\n\n NotifyTransaction --\x3e WaitAck\n\n state if_state_enough_replicas <>\n EnoughConfirmations: Enough confirmations ?\n WaitAck --\x3e EnoughConfirmations\n\n EnoughConfirmations --\x3e if_state_enough_replicas\n NotifyAttestation: Notify replication attestation\n if_state_enough_replicas --\x3e NotifyAttestation: yes\n if_state_enough_replicas --\x3e WaitAck: no\n NotifyAttestation --\x3e [*]\n }\n"}))}p.isMDXComponent=!0},8209:(t,n,e)=>{e(67294)}}]); \ No newline at end of file diff --git a/assets/js/5fe1ab02.900afcde.js b/assets/js/5fe1ab02.900afcde.js deleted file mode 100644 index 0b568ed09..000000000 --- a/assets/js/5fe1ab02.900afcde.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2926],{3905:(t,n,e)=>{e.d(n,{Zo:()=>c,kt:()=>u});var a=e(67294);function i(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function o(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,a)}return e}function r(t){for(var n=1;n=0||(i[e]=t[e]);return i}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(i[e]=t[e])}return i}var d=a.createContext({}),l=function(t){var n=a.useContext(d),e=n;return t&&(e="function"==typeof t?t(n):r(r({},n),t)),e},c=function(t){var n=l(t.components);return a.createElement(d.Provider,{value:n},t.children)},m="mdxType",p={inlineCode:"code",wrapper:function(t){var n=t.children;return a.createElement(a.Fragment,{},n)}},f=a.forwardRef((function(t,n){var e=t.components,i=t.mdxType,o=t.originalType,d=t.parentName,c=s(t,["components","mdxType","originalType","parentName"]),m=l(e),f=i,u=m["".concat(d,".").concat(f)]||m[f]||p[f]||o;return e?a.createElement(u,r(r({ref:n},c),{},{components:e})):a.createElement(u,r({ref:n},c))}));function u(t,n){var e=arguments,i=n&&n.mdxType;if("string"==typeof t||i){var o=e.length,r=new Array(o);r[0]=f;var s={};for(var d in n)hasOwnProperty.call(n,d)&&(s[d]=n[d]);s.originalType=t,s[m]="string"==typeof t?t:i,r[1]=s;for(var l=2;l{e.r(n),e.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var a=e(87462),i=(e(67294),e(3905));e(8209);const o={id:"mining",title:"Mining"},r=void 0,s={unversionedId:"build/core/mining/mining",id:"build/core/mining/mining",title:"Mining",description:"Transaction validation (aka Mining) defines processes and validations algorithms.",source:"@site/docs/build/core/mining/README.md",sourceDirName:"build/core/mining",slug:"/build/core/mining/",permalink:"/build/core/mining/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"mining",title:"Mining"},sidebar:"docs",previous:{title:"Code Proposals",permalink:"/build/core/governance/code-proposals"},next:{title:"Pending transaction validation",permalink:"/build/core/mining/transaction-validation"}},d={},l=[{value:"Standalone validation workflow",id:"standalone-validation-workflow",level:2},{value:"Distributed validation",id:"distributed-validation",level:2},{value:"Worflow",id:"worflow",level:3},{value:"FSM",id:"fsm",level:3}],c={toc:l},m="wrapper";function p(t){let{components:n,...e}=t;return(0,i.kt)(m,(0,a.Z)({},c,e,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Transaction validation (aka Mining) defines processes and validations algorithms."),(0,i.kt)("p",null,"Once a transaction is under validation a given process is dedicated to this transaction.\nDepending of the number of validation nodes several validation implementation are defined."),(0,i.kt)("p",null,"Along with validation workflow and processes, this context defines high levels functions to get the validation nodes and to assert their election."),(0,i.kt)("h2",{id:"standalone-validation-workflow"},"Standalone validation workflow"),(0,i.kt)("p",null,"When there is not only a single validation nodes (during the network initialization), a process is spawn to manage the transaction validation as a Task to run it (fire-off)"),(0,i.kt)("mermaid",{value:"stateDiagram-v2\n direction LR\n [*] --\x3e Idle\n Idle --\x3e ValidateTransaction\n ValidateTransaction: Validate transaction\n ValidateTransaction --\x3e Replicate\n Replicate --\x3e Replicate: Wait confirmations\n Replicate --\x3e NotifyAttestation\n NotifyAttestation: Notify transaction attestation\n NotifyAttestation --\x3e [*]\n"}),(0,i.kt)("h2",{id:"distributed-validation"},"Distributed validation"),(0,i.kt)("h3",{id:"worflow"},"Worflow"),(0,i.kt)("mermaid",{value:"sequenceDiagram\n Client->>+WelcomeNode: Submit new transaction\n par send transaction\n WelcomeNode->>+Coordinator: \n and \n WelcomeNode->>+CrossValidationNode: \n end\n WelcomeNode ->>-Client: Transaction submited\n\n par build context \n Coordinator ->>+PreviousStorageNode: Fetch previous transaction\n Coordinator ->>+PreviousStorageNode: Fetch unspent outputs\n and\n CrossValidationNode ->>+PreviousStorageNode: Fetch previous transaction\n CrossValidationNode ->>+PreviousStorageNode: Fetch unspent outputs\n CrossValidationNode ->>+Coordinator: Notify context and availability\n end\n \n \n Coordinator ->>+Coordinator: Build validation stamp\n Coordinator ->>+CrossValidationNode: Send validation stamp\n\n par wait validation stamp\n CrossValidationNode ->>+CrossValidationNode: Cross validate the stamp\n CrossValidationNode ->>+CrossValidationNode: Notify cross validation stamp\n CrossValidationNode ->>+Coordinator: Notify cross validation stamp\n end\n\n par chain replication \n Coordinator ->>+ChainStorageNode: Replicate transaction\n CrossValidationNode ->>+ChainStorageNode: Replicate transaction\n end\n\n ChainStorageNode ->>+ChainStorageNode: Validate transaction and store transaction\n alt transaction valid \n ChainStorageNode ->>+ CrossValidationNode: Replication confirmation\n ChainStorageNode ->>+ Coordinator: Replication confirmation\n end\n\n par notify replication\n CrossValidationNode--\x3e+WelcomeNode: Confirm replication\n Coordinator--\x3e+WelcomeNode: Confirm replication\n CrossValidationNode--\x3e+PreviousStorageNode: Confirm replication\n Coordinator--\x3e+PreviousStorageNode: Confirm replication\n CrossValidationNode--\x3e+BeaconChain: Confirm replication\n Coordinator--\x3e+BeaconChain: Confirm replication\n end\n\n WelcomeNode--\x3eClient: Notify replication confirmations"}),(0,i.kt)("h3",{id:"fsm"},"FSM"),(0,i.kt)("p",null,"When there are multiple validation nodes, a distributed workflow process is spawn as FSM to define the states and evolution of the ARCH consensus algorithm."),(0,i.kt)("p",null,"This FSM process is ran by all the validation nodes."),(0,i.kt)("p",null,"Therefore each validation maintains a ",(0,i.kt)("inlineCode",{parentName:"p"},"Registry")," of all the pending transaction validation processes, to be able to redirect P2P messages to the right process."),(0,i.kt)("mermaid",{value:"stateDiagram-v2\n state role_state <>\n state join_state <>\n\n [*] --\x3e Idle\n\n Idle --\x3e Idle: Prevalidate transaction & Build context\n Idle --\x3e role_state\n\n role_state --\x3e Coordinator: first of elected validation nodes\n role_state --\x3e CrossValidationNode: other node\n\n state Coordinator {\n state if_state_enough_context <>\n [*] --\x3e WaitContext\n\n WaitContext: Waiting context and confirmations\n WaitContext --\x3e WaitContext: Add context and node confirmation\n\n EnoughContextAndConfirmations: Enough context and confirmations ?\n\n WaitContext --\x3e EnoughContextAndConfirmations\n EnoughContextAndConfirmations --\x3e if_state_enough_context\n\n if_state_enough_context --\x3e CreateValidationStamp: yes\n if_state_enough_context --\x3e WaitContext: no\n\n CreateValidationStamp: Create validation stamp\n CreateValidationStamp --\x3e NotifyValidationStamp\n NotifyValidationStamp: Notify validation stamp \n NotifyValidationStamp --\x3e [*]\n }\n\n CrossValidationNode: Cross Validation Node\n state CrossValidationNode {\n [*] --\x3e NotifyContext\n NotifyContext: Notify transaction context\n\n NotifyContext --\x3e WaitValidationStamp\n WaitValidationStamp: Wait validation stamp to validate\n\n WaitValidationStamp --\x3e ValidateValidationStamp\n ValidateValidationStamp: Verify validations tamp\n\n ValidateValidationStamp --\x3e ValidateValidationStamp: create cross validation stamp\n ValidateValidationStamp --\x3e SendCrossValidationStamp\n SendCrossValidationStamp: Send the cross validation stamp to all\n SendCrossValidationStamp --\x3e [*]\n }\n\n Coordinator --\x3e join_state\n CrossValidationNode --\x3e join_state\n\n\n join_state --\x3e WaitCrossValidationStamps\n\n WaitCrossValidationStamps: Wait cross validation stamps\n state WaitCrossValidationStamps {\n state if_state_enough <>\n state if_state_atomic_commitment <>\n \n [*] --\x3e WaitingStamps\n WaitingStamps: Wait\n\n WaitingStamps --\x3e WaitingStamps: Add cross validation stamp\n WaitingStamps --\x3e EnoughStamps\n\n EnoughStamps: Enough cross validation stamps ?\n\n EnoughStamps --\x3e if_state_enough\n\n if_state_enough --\x3e AtomicCommitmentReached: yes \n if_state_enough --\x3e WaitingStamps: no \n \n AtomicCommitmentReached: Atomic commitment reached ? \n \n AtomicCommitmentReached --\x3e if_state_atomic_commitment \n \n if_state_atomic_commitment --\x3e [*]: yes \n if_state_atomic_commitment --\x3e [*]: no\n }\n\n WaitCrossValidationStamps --\x3e Replication\n\n state Replication {\n [*] --\x3e NotifyTransaction\n NotifyTransaction: Notify transaction\n WaitAck: Waiting replicas confirmations\n WaitAck --\x3e WaitAck: Add ack\n\n NotifyTransaction --\x3e WaitAck\n\n state if_state_enough_replicas <>\n EnoughConfirmations: Enough confirmations ?\n WaitAck --\x3e EnoughConfirmations\n\n EnoughConfirmations --\x3e if_state_enough_replicas\n NotifyAttestation: Notify replication attestation\n if_state_enough_replicas --\x3e NotifyAttestation: yes\n if_state_enough_replicas --\x3e WaitAck: no\n NotifyAttestation --\x3e [*]\n }\n"}))}p.isMDXComponent=!0},8209:(t,n,e)=>{e(67294)}}]); \ No newline at end of file diff --git a/assets/js/61e43ac9.ff168dfe.js b/assets/js/61e43ac9.c0aa0362.js similarity index 61% rename from assets/js/61e43ac9.ff168dfe.js rename to assets/js/61e43ac9.c0aa0362.js index 9d2609506..f3ac81ec5 100644 --- a/assets/js/61e43ac9.ff168dfe.js +++ b/assets/js/61e43ac9.c0aa0362.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[81],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>m});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(a),f=n,m=d["".concat(c,".").concat(f)]||d[f]||u[f]||o;return a?r.createElement(m,l(l({ref:t},p),{},{components:a})):r.createElement(m,l({ref:t},p))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=f;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:n,l[1]=i;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),o=a(3905);a(8209);const l={id:"float",title:"Float",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/scalars/float",id:"build/api/schema/scalars/float",title:"Float",description:"The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.",source:"@site/docs/build/api/schema/scalars/float.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/float",permalink:"/build/api/schema/scalars/float",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"float",title:"Float",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Content",permalink:"/build/api/schema/scalars/content"},next:{title:"Hash",permalink:"/build/api/schema/scalars/hash"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},b="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(b,(0,r.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"Float")," scalar type represents signed double-precision fractional values as specified by ",(0,o.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/IEEE_floating_point"},"IEEE 754"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Float\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,o.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/uco-data"},(0,o.kt)("inlineCode",{parentName:"a"},"UcoData"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[81],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>m});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(a),f=n,m=d["".concat(c,".").concat(f)]||d[f]||u[f]||o;return a?r.createElement(m,l(l({ref:t},p),{},{components:a})):r.createElement(m,l({ref:t},p))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=f;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:n,l[1]=i;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),o=a(3905);a(8209);const l={id:"float",title:"Float",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/scalars/float",id:"build/api/schema/scalars/float",title:"Float",description:"The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.",source:"@site/docs/build/api/schema/scalars/float.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/float",permalink:"/build/api/schema/scalars/float",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"float",title:"Float",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Content",permalink:"/build/api/schema/scalars/content"},next:{title:"Hash",permalink:"/build/api/schema/scalars/hash"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},b="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(b,(0,r.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"Float")," scalar type represents signed double-precision fractional values as specified by ",(0,o.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/IEEE_floating_point"},"IEEE 754"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Float\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,o.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/uco-data"},(0,o.kt)("inlineCode",{parentName:"a"},"UcoData"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/65c808a4.90f6fcc6.js b/assets/js/65c808a4.1f79fa4d.js similarity index 52% rename from assets/js/65c808a4.90f6fcc6.js rename to assets/js/65c808a4.1f79fa4d.js index 7272c5514..ab481836d 100644 --- a/assets/js/65c808a4.90f6fcc6.js +++ b/assets/js/65c808a4.1f79fa4d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5630],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>l,contentTitle:()=>s,default:()=>b,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var r=n(87462),a=n(67294),o=n(3905);n(8209);const i={id:"transactions",title:"transactions",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/queries/transactions",id:"build/api/schema/queries/transactions",title:"transactions",description:"Query the network to find all the transactions locally stored",source:"@site/docs/build/api/schema/queries/transactions.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/transactions",permalink:"/build/api/schema/queries/transactions",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transactions",title:"transactions",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transaction",permalink:"/build/api/schema/queries/transaction"},next:{title:"version",permalink:"/build/api/schema/queries/version"}},l={},p=[{value:"Arguments",id:"arguments",level:3},{value:'transactions.pagePosInteger ',id:"code-style-fontweight-normal-transactionsbpagebcodeposinteger-",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:u,SpecifiedBy:d,Badge:m},y="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(y,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to find all the transactions locally stored"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transactions(\n page: PosInteger\n): [Transaction]\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionsbpagebcodeposinteger-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactions.",(0,o.kt)("b",null,"page"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/pos-integer"},(0,o.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transaction-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5630],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>l,contentTitle:()=>s,default:()=>b,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var r=n(87462),a=n(67294),o=n(3905);n(8209);const i={id:"transactions",title:"transactions",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/queries/transactions",id:"build/api/schema/queries/transactions",title:"transactions",description:"Query the network to find all the transactions locally stored",source:"@site/docs/build/api/schema/queries/transactions.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/transactions",permalink:"/build/api/schema/queries/transactions",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transactions",title:"transactions",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transaction",permalink:"/build/api/schema/queries/transaction"},next:{title:"version",permalink:"/build/api/schema/queries/version"}},l={},p=[{value:"Arguments",id:"arguments",level:3},{value:'transactions.pagePosInteger ',id:"code-style-fontweight-normal-transactionsbpagebcodeposinteger-",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:u,SpecifiedBy:d,Badge:m},y="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(y,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to find all the transactions locally stored"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transactions(\n page: PosInteger\n): [Transaction]\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionsbpagebcodeposinteger-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactions.",(0,o.kt)("b",null,"page"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/pos-integer"},(0,o.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transaction-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/66076425.7c3a5094.js b/assets/js/66076425.7c3a5094.js new file mode 100644 index 000000000..8ad66abc6 --- /dev/null +++ b/assets/js/66076425.7c3a5094.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3168],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),p=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(o.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=p(a),u=n,y=m["".concat(o,".").concat(u)]||m[u]||d[u]||i;return a?r.createElement(y,s(s({ref:t},c),{},{components:a})):r.createElement(y,s({ref:t},c))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=u;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[m]="string"==typeof e?e:n,s[1]=l;for(var p=2;p{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>m,SpecifiedBy:()=>d,assets:()=>p,contentTitle:()=>l,default:()=>f,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var r=a(87462),n=a(67294),i=a(3905);a(8209);const s={id:"timestamp",title:"Timestamp",hide_table_of_contents:!1},l=void 0,o={unversionedId:"build/api/schema/scalars/timestamp",id:"build/api/schema/scalars/timestamp",title:"Timestamp",description:"The [Timestamp] scalar type represents a UNIX timestamp in seconds",source:"@site/docs/build/api/schema/scalars/timestamp.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/timestamp",permalink:"/build/api/schema/scalars/timestamp",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"timestamp",title:"Timestamp",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"String",permalink:"/build/api/schema/scalars/string"},next:{title:"TokenProperties",permalink:"/build/api/schema/scalars/token-properties"}},p={},c=[{value:"Member of",id:"member-of",level:3}],m=()=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,i.kt)(n.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:c,Bullet:m,SpecifiedBy:d,Badge:u},b="wrapper";function f(e){let{components:t,...a}=e;return(0,i.kt)(b,(0,r.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[Timestamp]"," scalar type represents a UNIX timestamp in seconds"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Timestamp\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"beaconChainSummary"))," ",(0,i.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,i.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/oracle-data"},(0,i.kt)("inlineCode",{parentName:"a"},"OracleData"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/oracle-data"},(0,i.kt)("inlineCode",{parentName:"a"},"oracleData"))," ",(0,i.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,i.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/unspent-output"},(0,i.kt)("inlineCode",{parentName:"a"},"UnspentOutput"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/66076425.f22d6c4d.js b/assets/js/66076425.f22d6c4d.js deleted file mode 100644 index e184a3dd4..000000000 --- a/assets/js/66076425.f22d6c4d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3168],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),p=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(o.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=p(a),u=n,y=m["".concat(o,".").concat(u)]||m[u]||d[u]||i;return a?r.createElement(y,s(s({ref:t},c),{},{components:a})):r.createElement(y,s({ref:t},c))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=u;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[m]="string"==typeof e?e:n,s[1]=l;for(var p=2;p{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>m,SpecifiedBy:()=>d,assets:()=>p,contentTitle:()=>l,default:()=>b,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var r=a(87462),n=a(67294),i=a(3905);a(8209);const s={id:"timestamp",title:"Timestamp",hide_table_of_contents:!1},l=void 0,o={unversionedId:"build/api/schema/scalars/timestamp",id:"build/api/schema/scalars/timestamp",title:"Timestamp",description:"The [Timestamp] scalar type represents a UNIX timestamp in seconds",source:"@site/docs/build/api/schema/scalars/timestamp.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/timestamp",permalink:"/build/api/schema/scalars/timestamp",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"timestamp",title:"Timestamp",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"String",permalink:"/build/api/schema/scalars/string"},next:{title:"TokenProperties",permalink:"/build/api/schema/scalars/token-properties"}},p={},c=[{value:"Member of",id:"member-of",level:3}],m=()=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,i.kt)(n.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:c,Bullet:m,SpecifiedBy:d,Badge:u},f="wrapper";function b(e){let{components:t,...a}=e;return(0,i.kt)(f,(0,r.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[Timestamp]"," scalar type represents a UNIX timestamp in seconds"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Timestamp\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"beaconChainSummary"))," ",(0,i.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,i.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/oracle-data"},(0,i.kt)("inlineCode",{parentName:"a"},"OracleData"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/oracle-data"},(0,i.kt)("inlineCode",{parentName:"a"},"oracleData"))," ",(0,i.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,i.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/unspent-output"},(0,i.kt)("inlineCode",{parentName:"a"},"UnspentOutput"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(m,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,i.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/6638f55a.8a32c57d.js b/assets/js/6638f55a.d291bb60.js similarity index 55% rename from assets/js/6638f55a.8a32c57d.js rename to assets/js/6638f55a.d291bb60.js index bd342326d..cd3bb5823 100644 --- a/assets/js/6638f55a.8a32c57d.js +++ b/assets/js/6638f55a.d291bb60.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7486],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),d=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),u=d(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||p[m]||i;return n?r.createElement(f,l(l({ref:t},s),{},{components:n})):r.createElement(f,l({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[u]="string"==typeof e?e:a,l[1]=o;for(var d=2;d{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>d,contentTitle:()=>o,default:()=>b,frontMatter:()=>l,metadata:()=>c,toc:()=>s});var r=n(87462),a=n(67294),i=n(3905);n(8209);const l={id:"include",title:"include",hide_table_of_contents:!1},o=void 0,c={unversionedId:"build/api/schema/directives/include",id:"build/api/schema/directives/include",title:"include",description:"Directs the executor to include this field or fragment only when the if argument is true.",source:"@site/docs/build/api/schema/directives/include.mdx",sourceDirName:"build/api/schema/directives",slug:"/build/api/schema/directives/include",permalink:"/build/api/schema/directives/include",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"include",title:"include",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Schema Documentation",permalink:"/schema"},next:{title:"skip",permalink:"/build/api/schema/directives/skip"}},d={},s=[{value:"Arguments",id:"arguments",level:3},{value:'include.ifBoolean! ',id:"code-style-fontweight-normal-includebifbcodeboolean--",level:4}],u=()=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,i.kt)(a.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:s,Bullet:u,SpecifiedBy:p,Badge:m},y="wrapper";function b(e){let{components:t,...n}=e;return(0,i.kt)(y,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Directs the executor to include this field or fragment only when the ",(0,i.kt)("inlineCode",{parentName:"p"},"if")," argument is true."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"directive @include(\n if: Boolean!\n)\n")),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("h4",{id:"code-style-fontweight-normal-includebifbcodeboolean--"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"include.",(0,i.kt)("b",null,"if"))),(0,i.kt)(u,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,i.kt)("inlineCode",{parentName:"a"},"Boolean!"))," ",(0,i.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,i.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Included when true.")))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7486],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),d=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),u=d(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||p[m]||i;return n?r.createElement(f,l(l({ref:t},s),{},{components:n})):r.createElement(f,l({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[u]="string"==typeof e?e:a,l[1]=o;for(var d=2;d{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>d,contentTitle:()=>o,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>s});var r=n(87462),a=n(67294),i=n(3905);n(8209);const l={id:"include",title:"include",hide_table_of_contents:!1},o=void 0,c={unversionedId:"build/api/schema/directives/include",id:"build/api/schema/directives/include",title:"include",description:"Directs the executor to include this field or fragment only when the if argument is true.",source:"@site/docs/build/api/schema/directives/include.mdx",sourceDirName:"build/api/schema/directives",slug:"/build/api/schema/directives/include",permalink:"/build/api/schema/directives/include",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"include",title:"include",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Schema Documentation",permalink:"/schema"},next:{title:"skip",permalink:"/build/api/schema/directives/skip"}},d={},s=[{value:"Arguments",id:"arguments",level:3},{value:'include.ifBoolean! ',id:"code-style-fontweight-normal-includebifbcodeboolean--",level:4}],u=()=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,i.kt)(a.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:s,Bullet:u,SpecifiedBy:p,Badge:m},b="wrapper";function y(e){let{components:t,...n}=e;return(0,i.kt)(b,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Directs the executor to include this field or fragment only when the ",(0,i.kt)("inlineCode",{parentName:"p"},"if")," argument is true."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"directive @include(\n if: Boolean!\n)\n")),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("h4",{id:"code-style-fontweight-normal-includebifbcodeboolean--"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"include.",(0,i.kt)("b",null,"if"))),(0,i.kt)(u,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,i.kt)("inlineCode",{parentName:"a"},"Boolean!"))," ",(0,i.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,i.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Included when true.")))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/66545c3d.289f85f4.js b/assets/js/66545c3d.289f85f4.js new file mode 100644 index 000000000..5e966c1bc --- /dev/null +++ b/assets/js/66545c3d.289f85f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7045],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>u});var o=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=o.createContext({}),c=function(e){var t=o.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},p="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,u=p["".concat(i,".").concat(m)]||p[m]||k[m]||l;return n?o.createElement(u,r(r({ref:t},d),{},{components:n})):o.createElement(u,r({ref:t},d))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,r=new Array(l);r[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:a,r[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>k,assets:()=>c,contentTitle:()=>s,default:()=>b,frontMatter:()=>r,metadata:()=>i,toc:()=>d});var o=n(87462),a=n(67294),l=n(3905);n(8209);const r={id:"token",title:"Token",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/objects/token",id:"build/api/schema/objects/token",title:"Token",description:"[token] represents a token metadata.",source:"@site/docs/build/api/schema/objects/token.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/token",permalink:"/build/api/schema/objects/token",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"token",title:"Token",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TokenTransfer",permalink:"/build/api/schema/objects/token-transfer"},next:{title:"TransactionAttestation",permalink:"/build/api/schema/objects/transaction-attestation"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'Token.collection[TokenProperties] ',id:"code-style-fontweight-normal-tokenbcollectionbcodetokenproperties--",level:4},{value:'Token.decimalsInt ',id:"code-style-fontweight-normal-tokenbdecimalsbcodeint-",level:4},{value:'Token.genesisAddress ',id:"code-style-fontweight-normal-tokenbgenesisbcodeaddress-",level:4},{value:'Token.idString ',id:"code-style-fontweight-normal-tokenbidbcodestring-",level:4},{value:'Token.nameString ',id:"code-style-fontweight-normal-tokenbnamebcodestring-",level:4},{value:'Token.ownerships[Ownership] ',id:"code-style-fontweight-normal-tokenbownershipsbcodeownership--",level:4},{value:'Token.propertiesTokenProperties ',id:"code-style-fontweight-normal-tokenbpropertiesbcodetokenproperties-",level:4},{value:'Token.supplyInt ',id:"code-style-fontweight-normal-tokenbsupplybcodeint-",level:4},{value:'Token.symbolString ',id:"code-style-fontweight-normal-tokenbsymbolbcodestring-",level:4},{value:'Token.typeString ',id:"code-style-fontweight-normal-tokenbtypebcodestring-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,l.kt)(a.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),k=e=>(0,l.kt)(a.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,l.kt)(a.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),u={toc:d,Bullet:p,SpecifiedBy:k,Badge:m},y="wrapper";function b(e){let{components:t,...n}=e;return(0,l.kt)(y,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"[token]"," represents a token metadata.\nIt includes:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"genesis: Genesis address to the token"),(0,l.kt)("li",{parentName:"ul"},"name: Name of the token"),(0,l.kt)("li",{parentName:"ul"},"symbol: Symbol of the token"),(0,l.kt)("li",{parentName:"ul"},"supply: Supply of the token"),(0,l.kt)("li",{parentName:"ul"},"type: Type of the token"),(0,l.kt)("li",{parentName:"ul"},"decimals: Number of decimals of the token"),(0,l.kt)("li",{parentName:"ul"},"properties: Properties of the token (if any)"),(0,l.kt)("li",{parentName:"ul"},"collection: List of properties for a collection (if any)"),(0,l.kt)("li",{parentName:"ul"},"ownerships: authorization/delegations containing list of secrets and their authorized public keys to proof the ownership"),(0,l.kt)("li",{parentName:"ul"},"id: Unique identification of the token on the chain")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"type Token {\n collection: [TokenProperties]\n decimals: Int\n genesis: Address\n id: String\n name: String\n ownerships: [Ownership]\n properties: TokenProperties\n supply: Int\n symbol: String\n type: String\n}\n")),(0,l.kt)("h3",{id:"fields"},"Fields"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbcollectionbcodetokenproperties--"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"collection"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/token-properties"},(0,l.kt)("inlineCode",{parentName:"a"},"[TokenProperties]"))," ",(0,l.kt)(m,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbdecimalsbcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"decimals"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbgenesisbcodeaddress-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"genesis"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,l.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbidbcodestring-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"id"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,l.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbnamebcodestring-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"name"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,l.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbownershipsbcodeownership--"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"ownerships"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/ownership"},(0,l.kt)("inlineCode",{parentName:"a"},"[Ownership]"))," ",(0,l.kt)(m,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,l.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbpropertiesbcodetokenproperties-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"properties"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/token-properties"},(0,l.kt)("inlineCode",{parentName:"a"},"TokenProperties"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbsupplybcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"supply"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbsymbolbcodestring-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"symbol"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,l.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbtypebcodestring-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"type"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,l.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"returned-by"},"Returned by"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/queries/token"},(0,l.kt)("inlineCode",{parentName:"a"},"token"))," ",(0,l.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/66545c3d.61bb01fc.js b/assets/js/66545c3d.61bb01fc.js deleted file mode 100644 index 64c6514ed..000000000 --- a/assets/js/66545c3d.61bb01fc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7045],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>u});var o=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=o.createContext({}),c=function(e){var t=o.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},p="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,u=p["".concat(i,".").concat(m)]||p[m]||k[m]||l;return n?o.createElement(u,r(r({ref:t},d),{},{components:n})):o.createElement(u,r({ref:t},d))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,r=new Array(l);r[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:a,r[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>k,assets:()=>c,contentTitle:()=>s,default:()=>b,frontMatter:()=>r,metadata:()=>i,toc:()=>d});var o=n(87462),a=n(67294),l=n(3905);n(8209);const r={id:"token",title:"Token",hide_table_of_contents:!1},s=void 0,i={unversionedId:"build/api/schema/objects/token",id:"build/api/schema/objects/token",title:"Token",description:"[token] represents a token metadata.",source:"@site/docs/build/api/schema/objects/token.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/token",permalink:"/build/api/schema/objects/token",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"token",title:"Token",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TokenTransfer",permalink:"/build/api/schema/objects/token-transfer"},next:{title:"TransactionAttestation",permalink:"/build/api/schema/objects/transaction-attestation"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'Token.collection[TokenProperties] ',id:"code-style-fontweight-normal-tokenbcollectionbcodetokenproperties--",level:4},{value:'Token.decimalsInt ',id:"code-style-fontweight-normal-tokenbdecimalsbcodeint-",level:4},{value:'Token.genesisAddress ',id:"code-style-fontweight-normal-tokenbgenesisbcodeaddress-",level:4},{value:'Token.idString ',id:"code-style-fontweight-normal-tokenbidbcodestring-",level:4},{value:'Token.nameString ',id:"code-style-fontweight-normal-tokenbnamebcodestring-",level:4},{value:'Token.ownerships[Ownership] ',id:"code-style-fontweight-normal-tokenbownershipsbcodeownership--",level:4},{value:'Token.propertiesTokenProperties ',id:"code-style-fontweight-normal-tokenbpropertiesbcodetokenproperties-",level:4},{value:'Token.supplyInt ',id:"code-style-fontweight-normal-tokenbsupplybcodeint-",level:4},{value:'Token.symbolString ',id:"code-style-fontweight-normal-tokenbsymbolbcodestring-",level:4},{value:'Token.typeString ',id:"code-style-fontweight-normal-tokenbtypebcodestring-",level:4},{value:"Returned by",id:"returned-by",level:3}],p=()=>(0,l.kt)(a.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),k=e=>(0,l.kt)(a.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,l.kt)(a.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),u={toc:d,Bullet:p,SpecifiedBy:k,Badge:m},y="wrapper";function b(e){let{components:t,...n}=e;return(0,l.kt)(y,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"[token]"," represents a token metadata.\nIt includes:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"genesis: Genesis address to the token"),(0,l.kt)("li",{parentName:"ul"},"name: Name of the token"),(0,l.kt)("li",{parentName:"ul"},"symbol: Symbol of the token"),(0,l.kt)("li",{parentName:"ul"},"supply: Supply of the token"),(0,l.kt)("li",{parentName:"ul"},"type: Type of the token"),(0,l.kt)("li",{parentName:"ul"},"decimals: Number of decimals of the token"),(0,l.kt)("li",{parentName:"ul"},"properties: Properties of the token (if any)"),(0,l.kt)("li",{parentName:"ul"},"collection: List of properties for a collection (if any)"),(0,l.kt)("li",{parentName:"ul"},"ownerships: authorization/delegations containing list of secrets and their authorized public keys to proof the ownership"),(0,l.kt)("li",{parentName:"ul"},"id: Unique identification of the token on the chain")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"type Token {\n collection: [TokenProperties]\n decimals: Int\n genesis: Address\n id: String\n name: String\n ownerships: [Ownership]\n properties: TokenProperties\n supply: Int\n symbol: String\n type: String\n}\n")),(0,l.kt)("h3",{id:"fields"},"Fields"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbcollectionbcodetokenproperties--"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"collection"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/token-properties"},(0,l.kt)("inlineCode",{parentName:"a"},"[TokenProperties]"))," ",(0,l.kt)(m,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbdecimalsbcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"decimals"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbgenesisbcodeaddress-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"genesis"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,l.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbidbcodestring-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"id"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,l.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbnamebcodestring-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"name"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,l.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbownershipsbcodeownership--"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"ownerships"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/ownership"},(0,l.kt)("inlineCode",{parentName:"a"},"[Ownership]"))," ",(0,l.kt)(m,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,l.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbpropertiesbcodetokenproperties-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"properties"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/token-properties"},(0,l.kt)("inlineCode",{parentName:"a"},"TokenProperties"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbsupplybcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"supply"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbsymbolbcodestring-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"symbol"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,l.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-tokenbtypebcodestring-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Token.",(0,l.kt)("b",null,"type"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,l.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"returned-by"},"Returned by"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/queries/token"},(0,l.kt)("inlineCode",{parentName:"a"},"token"))," ",(0,l.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/6aade8bf.cfc4d3c1.js b/assets/js/6aade8bf.735ae863.js similarity index 51% rename from assets/js/6aade8bf.cfc4d3c1.js rename to assets/js/6aade8bf.735ae863.js index db3456c42..ad1736740 100644 --- a/assets/js/6aade8bf.cfc4d3c1.js +++ b/assets/js/6aade8bf.735ae863.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6518],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>h});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var c=a.createContext({}),p=function(e){var t=a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},m="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),m=p(r),d=n,h=m["".concat(c,".").concat(d)]||m[d]||s[d]||o;return r?a.createElement(h,l(l({ref:t},u),{},{components:r})):a.createElement(h,l({ref:t},u))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[m]="string"==typeof e?e:n,l[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>s,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var a=r(87462),n=(r(67294),r(3905));r(8209);const o={id:"memory-table",title:"OracleChain Memory Tables",sidebar_label:"Memory database"},l=void 0,i={unversionedId:"build/core/oracle-chain/memory-table",id:"build/core/oracle-chain/memory-table",title:"OracleChain Memory Tables",description:"OracleChain component provides scheduler and services to maintain transaction chain and real world data integration.",source:"@site/docs/build/core/oracle-chain/mem_table.md",sourceDirName:"build/core/oracle-chain",slug:"/build/core/oracle-chain/memory-table",permalink:"/build/core/oracle-chain/memory-table",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"memory-table",title:"OracleChain Memory Tables",sidebar_label:"Memory database"},sidebar:"docs",previous:{title:"OracleChain",permalink:"/build/core/oracle-chain/"},next:{title:"Scheduler",permalink:"/build/core/oracle-chain/scheduler"}},c={},p=[],u={toc:p},m="wrapper";function s(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"OracleChain component provides ",(0,n.kt)("a",{parentName:"p",href:"/build/core/oracle-chain/scheduler"},"scheduler")," and ",(0,n.kt)("a",{parentName:"p",href:"/build/core/oracle-chain/service"},"services")," to maintain transaction chain and real world data integration."),(0,n.kt)("p",null,"But we need a way to access quickly this information for better computation latency."),(0,n.kt)("p",null,"For this purpose, the OracleChain service maintains a memory table using ETS to hold the information according to their date."),(0,n.kt)("p",null,"It represented in that way:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Timestamp"),(0,n.kt)("th",{parentName:"tr",align:null},"Service"),(0,n.kt)("th",{parentName:"tr",align:null},"Data")))),(0,n.kt)("p",null,"For example for the UCO service we may have:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Timestamp"),(0,n.kt)("th",{parentName:"tr",align:null},"Service"),(0,n.kt)("th",{parentName:"tr",align:null},"Data"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},"1622801400"),(0,n.kt)("td",{parentName:"tr",align:null},"UCO"),(0,n.kt)("td",{parentName:"tr",align:null},'%{ "eur" => 0.02 }')))),(0,n.kt)("p",null,"The table is loading after each oracle or oracle summary transaction and during the bootstrap for faster computation."),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"The transaction's fee algorithm is using this cached information to provide this computation quickly")))}s.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6518],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>b});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var c=a.createContext({}),p=function(e){var t=a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},m="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),m=p(r),d=n,b=m["".concat(c,".").concat(d)]||m[d]||s[d]||o;return r?a.createElement(b,l(l({ref:t},u),{},{components:r})):a.createElement(b,l({ref:t},u))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[m]="string"==typeof e?e:n,l[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>s,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var a=r(87462),n=(r(67294),r(3905));r(8209);const o={id:"memory-table",title:"OracleChain Memory Tables",sidebar_label:"Memory database"},l=void 0,i={unversionedId:"build/core/oracle-chain/memory-table",id:"build/core/oracle-chain/memory-table",title:"OracleChain Memory Tables",description:"OracleChain component provides scheduler and services to maintain transaction chain and real world data integration.",source:"@site/docs/build/core/oracle-chain/mem_table.md",sourceDirName:"build/core/oracle-chain",slug:"/build/core/oracle-chain/memory-table",permalink:"/build/core/oracle-chain/memory-table",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"memory-table",title:"OracleChain Memory Tables",sidebar_label:"Memory database"},sidebar:"docs",previous:{title:"OracleChain",permalink:"/build/core/oracle-chain/"},next:{title:"Scheduler",permalink:"/build/core/oracle-chain/scheduler"}},c={},p=[],u={toc:p},m="wrapper";function s(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"OracleChain component provides ",(0,n.kt)("a",{parentName:"p",href:"/build/core/oracle-chain/scheduler"},"scheduler")," and ",(0,n.kt)("a",{parentName:"p",href:"/build/core/oracle-chain/service"},"services")," to maintain transaction chain and real world data integration."),(0,n.kt)("p",null,"But we need a way to access quickly this information for better computation latency."),(0,n.kt)("p",null,"For this purpose, the OracleChain service maintains a memory table using ETS to hold the information according to their date."),(0,n.kt)("p",null,"It represented in that way:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Timestamp"),(0,n.kt)("th",{parentName:"tr",align:null},"Service"),(0,n.kt)("th",{parentName:"tr",align:null},"Data")))),(0,n.kt)("p",null,"For example for the UCO service we may have:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Timestamp"),(0,n.kt)("th",{parentName:"tr",align:null},"Service"),(0,n.kt)("th",{parentName:"tr",align:null},"Data"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},"1622801400"),(0,n.kt)("td",{parentName:"tr",align:null},"UCO"),(0,n.kt)("td",{parentName:"tr",align:null},'%{ "eur" => 0.02 }')))),(0,n.kt)("p",null,"The table is loading after each oracle or oracle summary transaction and during the bootstrap for faster computation."),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"The transaction's fee algorithm is using this cached information to provide this computation quickly")))}s.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/6efc9e6d.29a9c08f.js b/assets/js/6efc9e6d.c8c00b0b.js similarity index 52% rename from assets/js/6efc9e6d.29a9c08f.js rename to assets/js/6efc9e6d.c8c00b0b.js index 34fee621e..6a7b0a74c 100644 --- a/assets/js/6efc9e6d.29a9c08f.js +++ b/assets/js/6efc9e6d.c8c00b0b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[844],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>b});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),s=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(a),m=n,b=d["".concat(o,".").concat(m)]||d[m]||u[m]||i;return a?r.createElement(b,l(l({ref:t},p),{},{components:a})):r.createElement(b,l({ref:t},p))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=m;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c[d]="string"==typeof e?e:n,l[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var r=a(87462),n=a(67294),i=a(3905);a(8209);const l={id:"public-key",title:"PublicKey",hide_table_of_contents:!1},c=void 0,o={unversionedId:"build/api/schema/scalars/public-key",id:"build/api/schema/scalars/public-key",title:"PublicKey",description:"The [PublicKey] scalar type represents a public key.",source:"@site/docs/build/api/schema/scalars/public-key.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/public-key",permalink:"/build/api/schema/scalars/public-key",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"public-key",title:"PublicKey",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"PosInteger",permalink:"/build/api/schema/scalars/pos-integer"},next:{title:"String",permalink:"/build/api/schema/scalars/string"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,i.kt)(n.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},y="wrapper";function f(e){let{components:t,...a}=e;return(0,i.kt)(y,(0,r.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[PublicKey]"," scalar type represents a public key.\nThe PublicKey appears in a JSON response as Base16 formatted string. The parsed public key will\nbe converted to a binary and any invalid address with an invalid algorithm or invalid size will be rejected"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar PublicKey\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/authorized-key"},(0,i.kt)("inlineCode",{parentName:"a"},"AuthorizedKey"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/cross-validation-stamp"},(0,i.kt)("inlineCode",{parentName:"a"},"CrossValidationStamp"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,i.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/shared-secrets"},(0,i.kt)("inlineCode",{parentName:"a"},"SharedSecrets"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,i.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[844],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>b});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),s=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(a),m=n,b=d["".concat(o,".").concat(m)]||d[m]||u[m]||i;return a?r.createElement(b,l(l({ref:t},p),{},{components:a})):r.createElement(b,l({ref:t},p))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=m;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c[d]="string"==typeof e?e:n,l[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var r=a(87462),n=a(67294),i=a(3905);a(8209);const l={id:"public-key",title:"PublicKey",hide_table_of_contents:!1},c=void 0,o={unversionedId:"build/api/schema/scalars/public-key",id:"build/api/schema/scalars/public-key",title:"PublicKey",description:"The [PublicKey] scalar type represents a public key.",source:"@site/docs/build/api/schema/scalars/public-key.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/public-key",permalink:"/build/api/schema/scalars/public-key",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"public-key",title:"PublicKey",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"PosInteger",permalink:"/build/api/schema/scalars/pos-integer"},next:{title:"String",permalink:"/build/api/schema/scalars/string"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,i.kt)(n.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},y="wrapper";function f(e){let{components:t,...a}=e;return(0,i.kt)(y,(0,r.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[PublicKey]"," scalar type represents a public key.\nThe PublicKey appears in a JSON response as Base16 formatted string. The parsed public key will\nbe converted to a binary and any invalid address with an invalid algorithm or invalid size will be rejected"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar PublicKey\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/authorized-key"},(0,i.kt)("inlineCode",{parentName:"a"},"AuthorizedKey"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/cross-validation-stamp"},(0,i.kt)("inlineCode",{parentName:"a"},"CrossValidationStamp"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,i.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/shared-secrets"},(0,i.kt)("inlineCode",{parentName:"a"},"SharedSecrets"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,i.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/6fa4dae1.b38bb29d.js b/assets/js/6fa4dae1.b38bb29d.js new file mode 100644 index 000000000..11ab2965f --- /dev/null +++ b/assets/js/6fa4dae1.b38bb29d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9255],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=s(n),u=i,f=p["".concat(l,".").concat(u)]||p[u]||h[u]||r;return n?a.createElement(f,o(o({ref:t},d),{},{components:n})):a.createElement(f,o({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:i,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>c,toc:()=>s});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"transaction-validation",title:"Pending transaction validation"},o=void 0,c={unversionedId:"build/core/mining/transaction-validation",id:"build/core/mining/transaction-validation",title:"Pending transaction validation",description:"When a transaction is under validation a process is started to perform the ARCH consensus workflow.",source:"@site/docs/build/core/mining/pending-transaction-validation.md",sourceDirName:"build/core/mining",slug:"/build/core/mining/transaction-validation",permalink:"/build/core/mining/transaction-validation",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-validation",title:"Pending transaction validation"},sidebar:"docs",previous:{title:"Mining",permalink:"/build/core/mining/"},next:{title:"Proof of Work algorithm",permalink:"/build/core/mining/proof-of-work"}},l={},s=[{value:"Smart contract verification",id:"smart-contract-verification",level:2},{value:"Transaction type verification",id:"transaction-type-verification",level:2},{value:"Node transaction verification",id:"node-transaction-verification",level:3},{value:"Node shared secrets transaction verification",id:"node-shared-secrets-transaction-verification",level:3},{value:"Token transaction verification",id:"token-transaction-verification",level:3},{value:"Oracle transaction verification",id:"oracle-transaction-verification",level:3},{value:"OracleSummary transaction verification",id:"oraclesummary-transaction-verification",level:3},{value:"Code proposal transaction verification",id:"code-proposal-transaction-verification",level:3},{value:"Code approval transaction verification",id:"code-approval-transaction-verification",level:3}],d={toc:s},p="wrapper";function h(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"When a transaction is under validation a process is started to perform the ARCH consensus workflow."),(0,i.kt)("p",null,"At the beginning of this workflow, a prior validation is done to detect if the transaction is errornous according of several implementations based on the type of the transactions and other criterias."),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Check of the previous signature"),(0,i.kt)("li",{parentName:"ol"},"Check if there is smart contract, of its validity"),(0,i.kt)("li",{parentName:"ol"},"Check the content size does not exceed the threshold defined in the configuration"),(0,i.kt)("li",{parentName:"ol"},"Provide verification based on the transaction type")),(0,i.kt)("h2",{id:"smart-contract-verification"},"Smart contract verification"),(0,i.kt)("p",null,"If a transaction contains smart contract, it needs to verify certains things to be sure the smart contract is valid and the nodes will be able to interpret the contract, for example:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Parse the contract and determines its validity"),(0,i.kt)("li",{parentName:"ul"},"If an ownership and its secret have been encoded for the node shared storage nonce public key, so they will be able create new transaction on the chain")),(0,i.kt)("h2",{id:"transaction-type-verification"},"Transaction type verification"),(0,i.kt)("h3",{id:"node-transaction-verification"},"Node transaction verification"),(0,i.kt)("p",null,'Before to join the network, node must submit a transaction with a type "node".\nThe following checks are performed:'),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Decoding of the transaction's content"),(0,i.kt)("li",{parentName:"ul"},"Assert the origin key is authorized along with the certification. (See ",(0,i.kt)("a",{parentName:"li",href:"/learn/cryptography/hardware-root-of-trust"},"Hardware Root of Trust"),")"),(0,i.kt)("li",{parentName:"ul"},"Check if there are not already existing nodes with the same ip, port and public key")),(0,i.kt)("h3",{id:"node-shared-secrets-transaction-verification"},"Node shared secrets transaction verification"),(0,i.kt)("p",null,"Periodically the nodes submit a renewal of node shared secrets through a transaction.\nThe following checks are performed:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Decoding of the transactio's content"),(0,i.kt)("li",{parentName:"ul"},"Check is the new authorized node proposed are available")),(0,i.kt)("h3",{id:"token-transaction-verification"},"Token transaction verification"),(0,i.kt)("p",null,'To create a new asset (Token), a transaction with a type "token" is submitted to the network.'),(0,i.kt)("p",null,"The nodes asserts the content of the Token transactions respects the formatting to be able for the node to interpret it and mint tokens."),(0,i.kt)("h3",{id:"oracle-transaction-verification"},"Oracle transaction verification"),(0,i.kt)("p",null,"When the OracleChain polled some external data and build a transaction to propose the new changes, the nodes will assert the content from the services data are correct regarding the service SLA. (See ",(0,i.kt)("a",{parentName:"p",href:"/build/core/oracle-chain/service"},"OracleChain Service"),")"),(0,i.kt)("h3",{id:"oraclesummary-transaction-verification"},"OracleSummary transaction verification"),(0,i.kt)("p",null,"Periodically, after a cycle/epoch, the nodes submit a transaction which summarizes the entire oracle chain data for this epoch.\nThen the nodes have to assert the changes through:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Fetching the entire oracle chain for this epoch"),(0,i.kt)("li",{parentName:"ul"},"Assert the aggregated content in the oracle chain summary matches the data from all the transaction in the oracle chain ")),(0,i.kt)("h3",{id:"code-proposal-transaction-verification"},"Code proposal transaction verification"),(0,i.kt)("p",null,"When a new upgrade of the network is proposed, a transaction embeds the changes and is sent to the network. (See: On-Chain Governance "),(0,i.kt)("p",null,"The following checks are performed:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Decoding the proposal changes (like Git patch)"),(0,i.kt)("li",{parentName:"ul"},"Assert the validity of the changes: format, conformity with the latest Git commit")),(0,i.kt)("h3",{id:"code-approval-transaction-verification"},"Code approval transaction verification"),(0,i.kt)("p",null,"When an updated have been proposed, technical commitee member can vote for a proposal, then a transaction is sent. (See: On-Chain Governance)"),(0,i.kt)("p",null,"The following checks are performed:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Check if the approver is a member of the technical commitee,"),(0,i.kt)("li",{parentName:"ul"},"Check if the proposal exists"),(0,i.kt)("li",{parentName:"ul"},"Check if the proposal hasn't been signed by the approver earlier")))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/6fa4dae1.c9022514.js b/assets/js/6fa4dae1.c9022514.js deleted file mode 100644 index daa9de8a8..000000000 --- a/assets/js/6fa4dae1.c9022514.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9255],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=s(n),u=i,f=p["".concat(l,".").concat(u)]||p[u]||h[u]||r;return n?a.createElement(f,o(o({ref:t},d),{},{components:n})):a.createElement(f,o({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:i,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>c,toc:()=>s});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"transaction-validation",title:"Pending transaction validation"},o=void 0,c={unversionedId:"build/core/mining/transaction-validation",id:"build/core/mining/transaction-validation",title:"Pending transaction validation",description:"When a transaction is under validation a process is started to perform the ARCH consensus workflow.",source:"@site/docs/build/core/mining/pending-transaction-validation.md",sourceDirName:"build/core/mining",slug:"/build/core/mining/transaction-validation",permalink:"/build/core/mining/transaction-validation",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-validation",title:"Pending transaction validation"},sidebar:"docs",previous:{title:"Mining",permalink:"/build/core/mining/"},next:{title:"Proof of Work algorithm",permalink:"/build/core/mining/proof-of-work"}},l={},s=[{value:"Smart contract verification",id:"smart-contract-verification",level:2},{value:"Transaction type verification",id:"transaction-type-verification",level:2},{value:"Node transaction verification",id:"node-transaction-verification",level:3},{value:"Node shared secrets transaction verification",id:"node-shared-secrets-transaction-verification",level:3},{value:"Token transaction verification",id:"token-transaction-verification",level:3},{value:"Oracle transaction verification",id:"oracle-transaction-verification",level:3},{value:"OracleSummary transaction verification",id:"oraclesummary-transaction-verification",level:3},{value:"Code proposal transaction verification",id:"code-proposal-transaction-verification",level:3},{value:"Code approval transaction verification",id:"code-approval-transaction-verification",level:3}],d={toc:s},p="wrapper";function h(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"When a transaction is under validation a process is started to perform the ARCH consensus workflow."),(0,i.kt)("p",null,"At the beginning of this workflow, a prior validation is done to detect if the transaction is errornous according of several implementations based on the type of the transactions and other criterias."),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Check of the previous signature"),(0,i.kt)("li",{parentName:"ol"},"Check if there is smart contract, of its validity"),(0,i.kt)("li",{parentName:"ol"},"Check the content size does not exceed the threshold defined in the configuration"),(0,i.kt)("li",{parentName:"ol"},"Provide verification based on the transaction type")),(0,i.kt)("h2",{id:"smart-contract-verification"},"Smart contract verification"),(0,i.kt)("p",null,"If a transaction contains smart contract, it needs to verify certains things to be sure the smart contract is valid and the nodes will be able to interpret the contract, for example:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Parse the contract and determines its validity"),(0,i.kt)("li",{parentName:"ul"},"If an ownership and its secret have been encoded for the node shared storage nonce public key, so they will be able create new transaction on the chain")),(0,i.kt)("h2",{id:"transaction-type-verification"},"Transaction type verification"),(0,i.kt)("h3",{id:"node-transaction-verification"},"Node transaction verification"),(0,i.kt)("p",null,'Before to join the network, node must submit a transaction with a type "node".\nThe following checks are performed:'),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Decoding of the transaction's content"),(0,i.kt)("li",{parentName:"ul"},"Assert the origin key is authorized along with the certification. (See ",(0,i.kt)("a",{parentName:"li",href:"/learn/cryptography/hardware-root-of-trust"},"Hardware Root of Trust"),")"),(0,i.kt)("li",{parentName:"ul"},"Check if there are not already existing nodes with the same ip, port and public key")),(0,i.kt)("h3",{id:"node-shared-secrets-transaction-verification"},"Node shared secrets transaction verification"),(0,i.kt)("p",null,"Periodically the nodes submit a renewal of node shared secrets through a transaction.\nThe following checks are performed:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Decoding of the transactio's content"),(0,i.kt)("li",{parentName:"ul"},"Check is the new authorized node proposed are available")),(0,i.kt)("h3",{id:"token-transaction-verification"},"Token transaction verification"),(0,i.kt)("p",null,'To create a new asset (Token), a transaction with a type "token" is submitted to the network.'),(0,i.kt)("p",null,"The nodes asserts the content of the Token transactions respects the formatting to be able for the node to interpret it and mint tokens."),(0,i.kt)("h3",{id:"oracle-transaction-verification"},"Oracle transaction verification"),(0,i.kt)("p",null,"When the OracleChain polled some external data and build a transaction to propose the new changes, the nodes will assert the content from the services data are correct regarding the service SLA. (See ",(0,i.kt)("a",{parentName:"p",href:"/build/core/oracle-chain/service"},"OracleChain Service"),")"),(0,i.kt)("h3",{id:"oraclesummary-transaction-verification"},"OracleSummary transaction verification"),(0,i.kt)("p",null,"Periodically, after a cycle/epoch, the nodes submit a transaction which summarizes the entire oracle chain data for this epoch.\nThen the nodes have to assert the changes through:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Fetching the entire oracle chain for this epoch"),(0,i.kt)("li",{parentName:"ul"},"Assert the aggregated content in the oracle chain summary matches the data from all the transaction in the oracle chain ")),(0,i.kt)("h3",{id:"code-proposal-transaction-verification"},"Code proposal transaction verification"),(0,i.kt)("p",null,"When a new upgrade of the network is proposed, a transaction embeds the changes and is sent to the network. (See: On-Chain Governance "),(0,i.kt)("p",null,"The following checks are performed:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Decoding the proposal changes (like Git patch)"),(0,i.kt)("li",{parentName:"ul"},"Assert the validity of the changes: format, conformity with the latest Git commit")),(0,i.kt)("h3",{id:"code-approval-transaction-verification"},"Code approval transaction verification"),(0,i.kt)("p",null,"When an updated have been proposed, technical commitee member can vote for a proposal, then a transaction is sent. (See: On-Chain Governance)"),(0,i.kt)("p",null,"The following checks are performed:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Check if the approver is a member of the technical commitee,"),(0,i.kt)("li",{parentName:"ul"},"Check if the proposal exists"),(0,i.kt)("li",{parentName:"ul"},"Check if the proposal hasn't been signed by the approver earlier")))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/70e1f15f.833318fb.js b/assets/js/70e1f15f.8b0cbe7e.js similarity index 50% rename from assets/js/70e1f15f.833318fb.js rename to assets/js/70e1f15f.8b0cbe7e.js index 75e892ba6..bc8bbad0c 100644 --- a/assets/js/70e1f15f.833318fb.js +++ b/assets/js/70e1f15f.8b0cbe7e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1592],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>g});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var d=n.createContext({}),i=function(e){var t=n.useContext(d),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},s=function(e){var t=i(e.components);return n.createElement(d.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,d=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),p=i(r),m=o,g=p["".concat(d,".").concat(m)]||p[m]||u[m]||a;return r?n.createElement(g,l(l({ref:t},s),{},{components:r})):n.createElement(g,l({ref:t},s))}));function g(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=m;var c={};for(var d in t)hasOwnProperty.call(t,d)&&(c[d]=t[d]);c.originalType=e,c[p]="string"==typeof e?e:o,l[1]=c;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>d,toc:()=>s});var n=r(87462),o=r(67294),a=r(3905);r(8209);const l={id:"ledger",title:"Ledger",hide_table_of_contents:!1},c=void 0,d={unversionedId:"build/api/schema/objects/ledger",id:"build/api/schema/objects/ledger",title:"Ledger",description:"[Ledger] represents the ledger operations to perform",source:"@site/docs/build/api/schema/objects/ledger.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/ledger",permalink:"/build/api/schema/objects/ledger",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"ledger",title:"Ledger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"LedgerOperations",permalink:"/build/api/schema/objects/ledger-operations"},next:{title:"Node",permalink:"/build/api/schema/objects/node"}},i={},s=[{value:"Fields",id:"fields",level:3},{value:'Ledger.tokenTokenLedger ',id:"code-style-fontweight-normal-ledgerbtokenbcodetokenledger-",level:4},{value:'Ledger.ucoUcoLedger ',id:"code-style-fontweight-normal-ledgerbucobcodeucoledger-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,a.kt)(o.Fragment,null,"Specification",(0,a.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{class:"badge badge--"+e.class},e.text)),g={toc:s,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(b,(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"[Ledger]"," represents the ledger operations to perform"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-graphql"},"type Ledger {\n token: TokenLedger\n uco: UcoLedger\n}\n")),(0,a.kt)("h3",{id:"fields"},"Fields"),(0,a.kt)("h4",{id:"code-style-fontweight-normal-ledgerbtokenbcodetokenledger-"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"Ledger.",(0,a.kt)("b",null,"token"))),(0,a.kt)(p,{mdxType:"Bullet"}),(0,a.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/token-ledger"},(0,a.kt)("inlineCode",{parentName:"a"},"TokenLedger"))," ",(0,a.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,a.kt)("blockquote",null),(0,a.kt)("h4",{id:"code-style-fontweight-normal-ledgerbucobcodeucoledger-"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"Ledger.",(0,a.kt)("b",null,"uco"))),(0,a.kt)(p,{mdxType:"Bullet"}),(0,a.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/uco-ledger"},(0,a.kt)("inlineCode",{parentName:"a"},"UcoLedger"))," ",(0,a.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,a.kt)("blockquote",null),(0,a.kt)("h3",{id:"member-of"},"Member of"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,a.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,a.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1592],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>g});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var d=n.createContext({}),i=function(e){var t=n.useContext(d),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},s=function(e){var t=i(e.components);return n.createElement(d.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,d=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),p=i(r),m=o,g=p["".concat(d,".").concat(m)]||p[m]||u[m]||a;return r?n.createElement(g,l(l({ref:t},s),{},{components:r})):n.createElement(g,l({ref:t},s))}));function g(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=m;var c={};for(var d in t)hasOwnProperty.call(t,d)&&(c[d]=t[d]);c.originalType=e,c[p]="string"==typeof e?e:o,l[1]=c;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>d,toc:()=>s});var n=r(87462),o=r(67294),a=r(3905);r(8209);const l={id:"ledger",title:"Ledger",hide_table_of_contents:!1},c=void 0,d={unversionedId:"build/api/schema/objects/ledger",id:"build/api/schema/objects/ledger",title:"Ledger",description:"[Ledger] represents the ledger operations to perform",source:"@site/docs/build/api/schema/objects/ledger.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/ledger",permalink:"/build/api/schema/objects/ledger",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"ledger",title:"Ledger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"LedgerOperations",permalink:"/build/api/schema/objects/ledger-operations"},next:{title:"Node",permalink:"/build/api/schema/objects/node"}},i={},s=[{value:"Fields",id:"fields",level:3},{value:'Ledger.tokenTokenLedger ',id:"code-style-fontweight-normal-ledgerbtokenbcodetokenledger-",level:4},{value:'Ledger.ucoUcoLedger ',id:"code-style-fontweight-normal-ledgerbucobcodeucoledger-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,a.kt)(o.Fragment,null,"Specification",(0,a.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{class:"badge badge--"+e.class},e.text)),g={toc:s,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(b,(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"[Ledger]"," represents the ledger operations to perform"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-graphql"},"type Ledger {\n token: TokenLedger\n uco: UcoLedger\n}\n")),(0,a.kt)("h3",{id:"fields"},"Fields"),(0,a.kt)("h4",{id:"code-style-fontweight-normal-ledgerbtokenbcodetokenledger-"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"Ledger.",(0,a.kt)("b",null,"token"))),(0,a.kt)(p,{mdxType:"Bullet"}),(0,a.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/token-ledger"},(0,a.kt)("inlineCode",{parentName:"a"},"TokenLedger"))," ",(0,a.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,a.kt)("blockquote",null),(0,a.kt)("h4",{id:"code-style-fontweight-normal-ledgerbucobcodeucoledger-"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"Ledger.",(0,a.kt)("b",null,"uco"))),(0,a.kt)(p,{mdxType:"Bullet"}),(0,a.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/uco-ledger"},(0,a.kt)("inlineCode",{parentName:"a"},"UcoLedger"))," ",(0,a.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,a.kt)("blockquote",null),(0,a.kt)("h3",{id:"member-of"},"Member of"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,a.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,a.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/710ae1bb.0e883578.js b/assets/js/710ae1bb.0e883578.js new file mode 100644 index 000000000..23d3c11ef --- /dev/null +++ b/assets/js/710ae1bb.0e883578.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[847],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),p=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(a),h=n,y=d["".concat(s,".").concat(h)]||d[h]||u[h]||o;return a?r.createElement(y,i(i({ref:t},c),{},{components:a})):r.createElement(y,i({ref:t},c))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,i=new Array(o);i[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:n,i[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=a(87462),n=(a(67294),a(3905));a(8209);const o={id:"cryptography",title:"Cryptography"},i=void 0,l={unversionedId:"learn/cryptography/cryptography",id:"learn/cryptography/cryptography",title:"Cryptography",description:"Archethic network through the usage of TransactionChains is leveraging an adaptative and quantum-safe cryptography.",source:"@site/docs/learn/cryptography/README.md",sourceDirName:"learn/cryptography",slug:"/learn/cryptography/",permalink:"/learn/cryptography/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"cryptography",title:"Cryptography"},sidebar:"docs",previous:{title:"Proof of Work",permalink:"/learn/arch-consensus/proof-of-work"},next:{title:"Hardware Root of Trust",permalink:"/learn/cryptography/hardware-root-of-trust"}},s={},p=[{value:"Quantum-Safe",id:"quantum-safe",level:2},{value:"Non-Discolure of public keys",id:"non-discolure-of-public-keys",level:3},{value:"Origin Devices",id:"origin-devices",level:3},{value:"Adaptative",id:"adaptative",level:2},{value:"Public keys",id:"public-keys",level:3},{value:"Hashes",id:"hashes",level:3},{value:"Transaction addresses",id:"transaction-addresses",level:3},{value:"Default algorithms",id:"default-algorithms",level:2}],c={toc:p},d="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Archethic network through the usage of TransactionChains is leveraging an adaptative and quantum-safe cryptography."),(0,n.kt)("h2",{id:"quantum-safe"},"Quantum-Safe"),(0,n.kt)("h3",{id:"non-discolure-of-public-keys"},"Non-Discolure of public keys"),(0,n.kt)("p",null,"Archethic ",(0,n.kt)("a",{parentName:"p",href:"/learn/transaction-chain"},"TransactionChains")," uses a non-disclosure mechanism of public keys using chains of cryptography.\nEach transaction contains an address, which is a hash of the next public key and the previous public key.\nTherefore, we don't have way to know which public key is used for a given transaction until a next one is coming."),(0,n.kt)("h3",{id:"origin-devices"},"Origin Devices"),(0,n.kt)("p",null,"In order to build a transaction, we need to known multiple temporary private keys a key to provide a signature based on the previous private key and a signature based on an origin device private key.\nOrigin device can be categorized in several families: software, hardware, biometrics. (See ",(0,n.kt)("a",{parentName:"p",href:"/learn/arch-consensus/proof-of-work"},"Proof of Work"),")"),(0,n.kt)("p",null,"So to be allowed to generate a transaction, the task of a quantum computer potentially capable of ",(0,n.kt)("strong",{parentName:"p"},"breaking")," private keys should be considerably more complex"),(0,n.kt)("h2",{id:"adaptative"},"Adaptative"),(0,n.kt)("p",null,"In order to be backward compatible and to evolve the network as the cryptographic research progesses and to provide the choice of cryptographic algorithms to people, organizations or countries, Archethic is a versioned cryptography or metadata cryptography."),(0,n.kt)("p",null,"While this word sounds complex, it's not hard to get it."),(0,n.kt)("h3",{id:"public-keys"},"Public keys"),(0,n.kt)("p",null,"Each public key is prepended by some additional bytes to inform some metadata or algorithm versioning.\nThis includes:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"a byte to indicate the elliptic curve used (i.e Ed25519, NIST, secp256k1)"),(0,n.kt)("li",{parentName:"ul"},"a byte to indicate the origin of the generation (i.e software, hardware, ...)")),(0,n.kt)("h3",{id:"hashes"},"Hashes"),(0,n.kt)("p",null,"Like the public keys, cryptographic hashes are also versioned with a byte of to identify which algorithms is used (i.e SHA-256).\nThis information helps to determine the length of a hash and to perform some checks for the validition and for the encoding/decoding of the data."),(0,n.kt)("h3",{id:"transaction-addresses"},"Transaction addresses"),(0,n.kt)("p",null,"While transaction addresses are often represented as hashes, Archethic provide a new level of information inside the transaction's address. A byte is prepending the hash with an information regarding the elliptic curve used to generate the public key related."),(0,n.kt)("p",null,"You may be wondering why would we need this kind of information."),(0,n.kt)("p",null,"So, in order to be really adaptative and based on the non-disclosure mechanism offered by the transaction chain, we need to know which elliptic was used for a previous transaction to be able to reproduce the previous public key."),(0,n.kt)("p",null,"For example, imagine we have a transaction address encoded in that way, using a ",(0,n.kt)("inlineCode",{parentName:"p"},"secp256k1")," elliptic"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Hash algorithm"),(0,n.kt)("th",{parentName:"tr",align:null},"Digest"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},"01"),(0,n.kt)("td",{parentName:"tr",align:null},"01309F1C765967AC7")))),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Reminder: a transaction address is the hash of the next public key")),(0,n.kt)("p",null,"For a new transaction coming after, if now, we want to use the ",(0,n.kt)("inlineCode",{parentName:"p"},"ed25519")," elliptic curve, we need to know which was used before. For this reason, we have two possibility:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"keep an history of the previous transaction and curves (",(0,n.kt)("em",{parentName:"li"},"not really pratical and not scalable"),")"),(0,n.kt)("li",{parentName:"ul"},"add a byte in front of each transaction's address to the curve used")),(0,n.kt)("p",null,"So with a new model:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Curve type"),(0,n.kt)("th",{parentName:"tr",align:null},"Hash algorithm"),(0,n.kt)("th",{parentName:"tr",align:null},"Digest"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},"01"),(0,n.kt)("td",{parentName:"tr",align:null},"01"),(0,n.kt)("td",{parentName:"tr",align:null},"01309F1C765967AC7")))),(0,n.kt)("p",null,"Now we are able to compute the previous public key, with the curve ",(0,n.kt)("inlineCode",{parentName:"p"},"secp256k1")," and continues with new elliptic curve along the way."),(0,n.kt)("p",null,"This will be even more pratical with On-Chain Decentralized Wallet (",(0,n.kt)("inlineCode",{parentName:"p"},"Keychain"),") to support multiple derived keys and custom algorithms."),(0,n.kt)("h2",{id:"default-algorithms"},"Default algorithms"),(0,n.kt)("p",null,"Except for hardware compatability issues (HSM, etc..), EdDSA signatures, Curve25519 and AES256 will be used by default on the network."))}u.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/710ae1bb.ffe4cd6a.js b/assets/js/710ae1bb.ffe4cd6a.js deleted file mode 100644 index dddf78695..000000000 --- a/assets/js/710ae1bb.ffe4cd6a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[847],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),p=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(a),h=n,y=d["".concat(s,".").concat(h)]||d[h]||u[h]||o;return a?r.createElement(y,i(i({ref:t},c),{},{components:a})):r.createElement(y,i({ref:t},c))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,i=new Array(o);i[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:n,i[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=a(87462),n=(a(67294),a(3905));a(8209);const o={id:"cryptography",title:"Cryptography"},i=void 0,l={unversionedId:"learn/cryptography/cryptography",id:"learn/cryptography/cryptography",title:"Cryptography",description:"Archethic network through the usage of TransactionChains is leveraging an adaptative and quantum-safe cryptography.",source:"@site/docs/learn/cryptography/README.md",sourceDirName:"learn/cryptography",slug:"/learn/cryptography/",permalink:"/learn/cryptography/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"cryptography",title:"Cryptography"},sidebar:"docs",previous:{title:"Proof of Work",permalink:"/learn/arch-consensus/proof-of-work"},next:{title:"Hardware Root of Trust",permalink:"/learn/cryptography/hardware-root-of-trust"}},s={},p=[{value:"Quantum-Safe",id:"quantum-safe",level:2},{value:"Non-Discolure of public keys",id:"non-discolure-of-public-keys",level:3},{value:"Origin Devices",id:"origin-devices",level:3},{value:"Adaptative",id:"adaptative",level:2},{value:"Public keys",id:"public-keys",level:3},{value:"Hashes",id:"hashes",level:3},{value:"Transaction addresses",id:"transaction-addresses",level:3},{value:"Default algorithms",id:"default-algorithms",level:2}],c={toc:p},d="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Archethic network through the usage of TransactionChains is leveraging an adaptative and quantum-safe cryptography."),(0,n.kt)("h2",{id:"quantum-safe"},"Quantum-Safe"),(0,n.kt)("h3",{id:"non-discolure-of-public-keys"},"Non-Discolure of public keys"),(0,n.kt)("p",null,"Archethic ",(0,n.kt)("a",{parentName:"p",href:"/learn/transaction-chain"},"TransactionChains")," uses a non-disclosure mechanism of public keys using chains of cryptography.\nEach transaction contains an address, which is a hash of the next public key and the previous public key.\nTherefore, we don't have way to know which public key is used for a given transaction until a next one is coming."),(0,n.kt)("h3",{id:"origin-devices"},"Origin Devices"),(0,n.kt)("p",null,"In order to build a transaction, we need to known multiple temporary private keys a key to provide a signature based on the previous private key and a signature based on an origin device private key.\nOrigin device can be categorized in several families: software, hardware, biometrics. (See ",(0,n.kt)("a",{parentName:"p",href:"/learn/arch-consensus/proof-of-work"},"Proof of Work"),")"),(0,n.kt)("p",null,"So to be allowed to generate a transaction, the task of a quantum computer potentially capable of ",(0,n.kt)("strong",{parentName:"p"},"breaking")," private keys should be considerably more complex"),(0,n.kt)("h2",{id:"adaptative"},"Adaptative"),(0,n.kt)("p",null,"In order to be backward compatible and to evolve the network as the cryptographic research progesses and to provide the choice of cryptographic algorithms to people, organizations or countries, Archethic is a versioned cryptography or metadata cryptography."),(0,n.kt)("p",null,"While this word sounds complex, it's not hard to get it."),(0,n.kt)("h3",{id:"public-keys"},"Public keys"),(0,n.kt)("p",null,"Each public key is prepended by some additional bytes to inform some metadata or algorithm versioning.\nThis includes:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"a byte to indicate the elliptic curve used (i.e Ed25519, NIST, secp256k1)"),(0,n.kt)("li",{parentName:"ul"},"a byte to indicate the origin of the generation (i.e software, hardware, ...)")),(0,n.kt)("h3",{id:"hashes"},"Hashes"),(0,n.kt)("p",null,"Like the public keys, cryptographic hashes are also versioned with a byte of to identify which algorithms is used (i.e SHA-256).\nThis information helps to determine the length of a hash and to perform some checks for the validition and for the encoding/decoding of the data."),(0,n.kt)("h3",{id:"transaction-addresses"},"Transaction addresses"),(0,n.kt)("p",null,"While transaction addresses are often represented as hashes, Archethic provide a new level of information inside the transaction's address. A byte is prepending the hash with an information regarding the elliptic curve used to generate the public key related."),(0,n.kt)("p",null,"You may be wondering why would we need this kind of information."),(0,n.kt)("p",null,"So, in order to be really adaptative and based on the non-disclosure mechanism offered by the transaction chain, we need to know which elliptic was used for a previous transaction to be able to reproduce the previous public key."),(0,n.kt)("p",null,"For example, imagine we have a transaction address encoded in that way, using a ",(0,n.kt)("inlineCode",{parentName:"p"},"secp256k1")," elliptic"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Hash algorithm"),(0,n.kt)("th",{parentName:"tr",align:null},"Digest"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},"01"),(0,n.kt)("td",{parentName:"tr",align:null},"01309F1C765967AC7")))),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Reminder: a transaction address is the hash of the next public key")),(0,n.kt)("p",null,"For a new transaction coming after, if now, we want to use the ",(0,n.kt)("inlineCode",{parentName:"p"},"ed25519")," elliptic curve, we need to know which was used before. For this reason, we have two possibility:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"keep an history of the previous transaction and curves (",(0,n.kt)("em",{parentName:"li"},"not really pratical and not scalable"),")"),(0,n.kt)("li",{parentName:"ul"},"add a byte in front of each transaction's address to the curve used")),(0,n.kt)("p",null,"So with a new model:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Curve type"),(0,n.kt)("th",{parentName:"tr",align:null},"Hash algorithm"),(0,n.kt)("th",{parentName:"tr",align:null},"Digest"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},"01"),(0,n.kt)("td",{parentName:"tr",align:null},"01"),(0,n.kt)("td",{parentName:"tr",align:null},"01309F1C765967AC7")))),(0,n.kt)("p",null,"Now we are able to compute the previous public key, with the curve ",(0,n.kt)("inlineCode",{parentName:"p"},"secp256k1")," and continues with new elliptic curve along the way."),(0,n.kt)("p",null,"This will be even more pratical with On-Chain Decentralized Wallet (",(0,n.kt)("inlineCode",{parentName:"p"},"Keychain"),") to support multiple derived keys and custom algorithms."),(0,n.kt)("h2",{id:"default-algorithms"},"Default algorithms"),(0,n.kt)("p",null,"Except for hardware compatability issues (HSM, etc..), EdDSA signatures, Curve25519 and AES256 will be used by default on the network."))}u.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/72ec880a.18cfae67.js b/assets/js/72ec880a.18cfae67.js new file mode 100644 index 000000000..534504031 --- /dev/null +++ b/assets/js/72ec880a.18cfae67.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[420],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>A});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(n),p=r,A=u["".concat(l,".").concat(p)]||u[p]||m[p]||o;return n?a.createElement(A,i(i({ref:t},d),{},{components:n})):a.createElement(A,i({ref:t},d))}));function A(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"mock-form",title:"Smart Contracts Playground - Mock form",sidebar_label:"Mock form",sidebar_position:100},i=void 0,s={unversionedId:"build/smart-contracts/playground/mock-form",id:"build/smart-contracts/playground/mock-form",title:"Smart Contracts Playground - Mock form",description:"Mocks allow developers to simulate the behaviour of functions that have side-effects. A few examples of side-effect: retrieve the genesis address of a chain, retrieve the date, a random value etc.",source:"@site/docs/build/smart-contracts/playground/mock-form.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/mock-form",permalink:"/build/smart-contracts/playground/mock-form",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:100,frontMatter:{id:"mock-form",title:"Smart Contracts Playground - Mock form",sidebar_label:"Mock form",sidebar_position:100},sidebar:"docs",previous:{title:"Transaction form",permalink:"/build/smart-contracts/playground/transaction-form"},next:{title:"Fees",permalink:"/build/smart-contracts/fees"}},l={},c=[{value:"Example: Time.now/0",id:"example-timenow0",level:2},{value:"Example: Chain.get_genesis_address/1",id:"example-chainget_genesis_address1",level:2}],d={toc:c},u="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(u,(0,a.Z)({},d,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Mocks allow developers to simulate the behaviour of functions that have side-effects. A few examples of side-effect: retrieve the genesis address of a chain, retrieve the date, a random value etc."),(0,r.kt)("p",null,"The mock form is part of the trigger panel."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"the mock form is display",src:n(1604).Z,width:"415",height:"96"})),(0,r.kt)("p",null,"These functions must be mocked to test Smart Contracts that use them:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#get_genesis_address1-io"},"Chain.get_genesis_address/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#get_first_transaction_address1-io"},"Chain.get_first_transaction_address/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#get_genesis_public_key1-io"},"Chain.get_genesis_public_key/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#now0"},"Time.now/0")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#fetch_id_from_address1-io"},"Token.fetch_id_from_address/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#fetch1-io"},"Http.fetch/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#fetch_many1-io"},"Http.fetch_many/1"))),(0,r.kt)("p",null,"A function can be mocked multiple times, for example to mock multiple different inputs."),(0,r.kt)("h2",{id:"example-timenow0"},"Example: Time.now/0"),(0,r.kt)("p",null,"Time.now/0 can be mocked to simulate a future execution of the contract. This one is actually optional, the playground will use current time if it is not set."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\nactions triggered_by: interval, at: "* * * * *" do \n Contract.set_content(Time.now())\nend\n')),(0,r.kt)("p",null,"All you need to do is fill the expected output (seconds since epoch):"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"mocking the Time.now/0",src:n(52171).Z,width:"3600",height:"2390"})),(0,r.kt)("p",null,"Then click on the ",(0,r.kt)("inlineCode",{parentName:"p"},"Add")," button, then ",(0,r.kt)("inlineCode",{parentName:"p"},"trigger")," to test the Smart Contract:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Time.now/0 is mocked",src:n(92537).Z,width:"3600",height:"2390"})),(0,r.kt)("p",null,"We can see via the console that the mock was called as expected."),(0,r.kt)("h2",{id:"example-chainget_genesis_address1"},"Example: Chain.get_genesis_address/1"),(0,r.kt)("p",null,"Let's see an example with a function that takes an argument.\nIn the form you specify the output for a given input. Let's try it!"),(0,r.kt)("p",null,"The screenshot below mocked the function with these values: "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"input: ",(0,r.kt)("inlineCode",{parentName:"li"},"00002223BBD4EC3D64AE597696C7D7ADE1CEE65C639D885450AD2D7B75592AC76AFA")),(0,r.kt)("li",{parentName:"ul"},"output: ",(0,r.kt)("inlineCode",{parentName:"li"},"MOCKED"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\nactions triggered_by: interval, at: "* * * * *" do\n Contract.set_content(Chain.get_genesis_address(0x00002223bbd4ec3d64ae597696c7d7ade1cee65c639d885450ad2d7b75592ac76afa)) \nend\n')),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a contract that used Chain.get_genesis_address/1 is tested",src:n(88745).Z,width:"3600",height:"2390"})),(0,r.kt)("p",null,"We can see via the console that the mock was called as expected."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a contract that used Chain.get_genesis_address/1 is tested",src:n(4847).Z,width:"3600",height:"2390"})))}m.isMDXComponent=!0},1604:(e,t,n)=>{n.d(t,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ8AAABgCAYAAADCUX/sAAAUTklEQVR4Xu3dB1xW1f8H8M/DRkBRwYGK4MItmjO3mKk4cY8cpakNzfpnZVauzMbvV64ys6zU3Bv31tyJe0uImjMVURkiPP/vucajCP64D6I943N9+Sp47nPuOe9z4eM59zz3GrzzlzKCGwUoQAEKUOAZChgeFz7OLs5wcnaGg6MTHB0dYDAYnmG1eCgKUIACFLBWAWNKClLkb3JyMu4lJSHpblK6pqQLHxU4bjncJXAcrbXdrDcFKEABCliQgAqhhLg4CaJ7plqlCR8XNze4ubtxlGNBncaqUIACFLAFAaPRiMT4eCQmJGrNMYWPq4SOm7u7LbSRbaAABShAAQsVUCMgFUBa+Dg5OyGHpydHPBbaWawWBShAAVsRUCOgO7duS/gUKGX0ypUTDg68xmMrnct2UIACFLBkgZSUZBh8i5Q35vD0sOR6sm4UoAAFKGBjAga/4pWNzi4uNtYsNocCFKAABSxZwFCkVFWjA5dVW3IfsW4UoAAFbE7A4B9UzWhwcLC5hrFBFKAABShguQKGomVq8PY6lts/rBkFKEABmxRg+Nhkt7JRFKAABSxbgOFj2f3D2lGAAhSwSQGGj012KxtFAQpQwLIFGD6W3T+sHQUoQAGbFDArfMJqD0H1oJa4cD0S4xf3yhDE1SkHhnVbBmdHFyzc9iV2n1iarXAjXlqNLYdmY/3+adlaLgujAAUoQIFnJ5Cl8FHV+8/8brgaezZdTSsFhqBLw+Ha9xk+z64jeSQKUIAC1iRgdvhUKhaCpOS72HZkPjYe+CVdW7s3GgW/vKWQx8uP4WNNZwLrSgEKUOAZCpgdPhUCGuBg1Eb45yuHcY9MvTk7uuLjbsux/eh81K/YLU34OBgc0Si4B8oVrY/cngVxJeYM9pwMl7/L0jQ3X64ANK8+AIV9yyIlOQmnL0Zg5Z7JuBX/t7bfo9NuvrmKon/oJFyOicJPq97BvZS78HD1xgvP9UFQoRrwdM+Na7cu4PfDc/HHqfBnSMtDUYACFKDA4wSyFD4zN36MPk2/xn8WdMfVm9GmsstLMHVtMByTl7+O11pOThM+3UNGo5x/PS1sLl6LRPFCVVBegmjD/p+xJuJHrYwC3sXQv8V3uH77IiJOroCriwfqlOuAG/L1xGWvymNZk9OET84cvhgQ+i3i78bi+xVvIjEpTitHfS+fdwAiTq/GjVsXUT6gPgIKVMS0NUNw4vwOng0UoAAFKPAvC2QpfEb+1gIfdlmC7UcWYMOBn01N6CLB4+GaCwu3f4UhHWabwiewQCX0az4Ry/d8i62HZpn2b1fnAwTLNN7n8zrhdvw19Gj8GfzylMTXC3sg8d79IKlZpi3a1HobP6wYhMhLEabw2X5sAfpLmQ4OTvhewu52wg1tfxVIQzsvxLKd47Ht6DztezlccqJfi0k4ELk+TX3/ZXsengIUoIDdCmQpfEbMbI6w2u+iiO+DqTcnBxd8JKvcVkjAnPrrjzTh07RqP9Qu1xEjZzSX60X3H6GqNjXSeSvsF8zeNAKHzmzCqB7rsfHgr1j7z0hI7eMkU3mVizdG9JXDMlUXrYXPzmOLtZFM0XzlZcTzBqIuHTCVqabchnVdij8v7ce8LZ8i5s5lu+1cNpwCFKCApQpkOXxK+FWTqbf/mqbeyvrXRfdGozFmTlu4OLmnCZ+uDUagYN6Ssm/XNA6OMmoZ3XODTLtNxeGoTXin/UwJopHY/+fax3qp8FGjnbiEm/B0y4PD0Zswa9PwNPuHBPdGSHAv7Xvn/j6KyAt/YL+Meq7cPGOp/cB6UYACFLArgSyHj1pAMLTLYtPUW8d6w5DLwxc/rBwkK90KpQmfbg1HokCeEunCRz09dXSPDdpU2OGozdoo6LeNn8iChg3/M3yS7iVq15VqlQmTEVV7fCf/H335YJr3+OQsItd6GqCEX1UE5K8IB4MBS3eNk1HTIrvqYDaWAhSggCUKZDl8VGPU1Ju/TH1NWPIKhnVZhtURU7Rf7o+GT7Oq/fF82fYYMTMU9x6adlOLAt4Om47Zm0fhyJnNGNVzHVbvnZpuCXfLGoNwSkYvx89t06bdth6eg3X7foK7a068234WrsuigolL+2i+bi5ect0nL67Fnkdyyj3te+o6UM/Gn8squ/wY+VuoJfYD60QBClDArgSeKHxSp96W75qEZtUGyJRbmLZw4NHwKVagMl5tPh7LdskigCP3FwGorV2d9xBcvAm+nNcZsXFX0a/ZROT08ME3i3qarg2VlOm9V2R6b/r6D3Ekeku6pdZq9NO61mC5vjMGe0+vRClZXv3yi19h/tbPZGn1CtOx1N0Z1Oo6ho9dnd9sLAUoYKECTxQ+aupNrXpzcXKTayvHMEWWO6vt0fBR31Mr2UoXfh47TyzGJVlqXbJQVVQIbChLrX/RrvmozV8WMPSVkLpyI0qCY6V27ahuhU64efsqJoX3TbfUWr1H1WFQm2kyCvLCV3JNySB/3gmbAQdHZy3o7iTEIDB/JVQq1lg+f7QA4bvHW2hXsFoUoAAF7EfgicJHMampt+pBrbBkxzfYIcufHxc+KiRCKveSD5nWk+mvAtrKtT0nwrH7ZNp7v/nlKYWm1fqjcN4gbfRz6q89WLX3exlRXdfKzujebqmjo40Hpsu03RRtFV3Tav1QyKc03Jw9ZFruAv6QUdG2I3O1AONGAQpQgAL/roBZ4fPvVpVHpwAFKEABWxFg+NhKT7IdFKAABaxIgOFjRZ3FqlKAAhSwFQGGj630JNtBAQpQwIoEGD5W1FmsKgUoQAFbEWD42EpPsh0UoAAFrEiA4WNFncWqUoACFLAVAYaPrfQk20EBClDAigQYPlbUWawqBShAAVsRYPjYSk+yHRSgAAWsSIDhY0WdxapSgAIUsBUBho+t9CTbQQEKUMCKBBg+VtRZrCoFKEABWxFg+NhKT7IdFKAABaxIgOFjRZ3FqlKAAhSwFQGGj630JNtBAQpQwIoEGD5W1FmsKgUoQAFbEWD42EpPsh0UoAAFrEiA4WNFncWqUoACFLAVAYaPrfQk20EBClDAigQYPlbUWawqBShAAVsRYPjYSk+yHRSgAAWsSCDL4fN82fYoXjAYvrmKIp93gBU1mVWlAAUoQIEnFbh0IwpXY6IReSkCO48tMrs4s8PHJ2dh9Gw8FldvnsOxc9vx17XjuHDtlNkH5hsoQAEKUMB6BQrlLYVCPkEo618HuTzy4ee17+HmnSu6G2RW+KhRTr/QCVi+cwL2/blW90G4IwUoQAEK2K5AjdJt0LDiS5i8/HXE3Lmkq6Fmhc97HeZiTcRU7Itco6tw7kQBClCAAvYhUFsuxVQp0QwTlr6iq8G6w6dO2Q4oUaiaDK2G6CqYO1GAAhSggH0JDGz9EzYdnIGDURsybbju8OnXbCK2HpmDo2e3Zlood6AABShAAfsTqCnTbwEFgjF70/BMG687fD7pvgJfzO2E+Lu3Mi2UO1CAAhSggP0J+OTyR+8XvsCX8ztn2njd4TP25a14/6e6mRbIHShAAQpQwH4F9GYFw8d+zxG2nAIUoEC2CzB8sp2UBVKAAhSgQGYCDJ/MhPg6BShAAQpkuwDDJ9tJWSAFKEABCmQmwPDJTIivU4ACFKBAtgswfLKdlAU+bYHcHgVx487FbD/MwDY/wy9Pcfy28RNdH35rUuUVFMlXDj+uejvDuhgMDvis92Z8F/4aoq8cyvb6Ps0Cw2oPgZOjC+ZuGf00D8Oy7ViA4WPHnW+tTdd70prTvvzegRgc9qt8Pu0Ooi5G4Nf1QzN9O8MnUyLuQIHHCuj9OeZSa55EFiOg96Q1p8IvPvcqqgW1xLbDcxFSuTc+ndVKguj2/yyC4WOOMPelQFoBvT/HDB+eORYjoPekNafCQ+RmuCf/2o0th2ZhSIfZWPD7WOw5udxUhKODE1RAVQhoCEdHJxyO3oKkpAT4+ZQ0TbsV8S2L0GqvI79M3f198yxW7ZmMvs3HPXba7Tm5uWL9Cl2RO6cf4hNv4+T5nViy82sk3UtIV/XgYi+gTvlOss8uqFuTGOXPgaj12LD/F7R9/v9QrEBlCctYLN0xDsfPb9fe7+meB6HV35TnaVWRr1IQeXE/wneOw53EGO11NxcvtKo5CCX8qsFgAI6f3YHluycgIekOHp12a1KlL6pLOE9ZORBXYs6YQ8t9KZChgN6fY4YPT6B/TaBgnhJwc/Y0HV89ruP75W+avk5Iuo2L109nuX5F81XAgBbfYsqKgfjz0j6oaz9x8TcwdfVgU5nql3H5gPryy3kSrsWeR42g1igf2ABnLh/Qwie3lx/eDpuOo9FbsfP4InluSX40q9pf/uubYfj45Q3CwNZTJTx+xvFzO5DbsyDa1H4X2+S+iOv2TcswfDrWGyb7bsPafT9K2FRBy5oDEZcQK3WaiMsSCM2qDUBer0IYO7edhIkD3pJ2JCTFYc3eH7TymjzXFy5Obhi3uLd8ZcQbLX9AUvJdrJU70HtJUL1Y9VVEXz6MOVtGpQmfxpVfRs0ybfGD+FyOicqyM99IgYcFGD48Hyxe4KWQMfKv9AfhU7xgZflX/L4H4SPTY9N1XKN5XENb13wb5QLqYszsMO2XcqNKvdBYpt4+m9MWt+Kvw9MtN4Z2XoQ5m0dpo437m0G7RhQbd1ULn1Y139JGGF8v6qmVobZKgSHo0nB4huGjAjVQbqy4/eh8U7W6NxqFu/cSM7zIr0Y+Het9iJEzQ7WRidqGdJiD0xf2YuG2L7Svy/rXRY/GY/DBtPrag7s6N/hE7rPYQWuD2jzd8+L9jvMwY/0wbeTUPWQ0PpfXb//zepkidVCjdCvtjvSpIx/1MMhGlV7CpGX9cOlGpMWfK6yg9QgwfKynr1jTfwT0nrR6wBwMjhjaZTEi5Zf4uoiftLfky10ML4WMwlKZolLhEJg/WHs44vAZzZHw0A1zVWj5eBfWwqdvs3G4dD0Sy3aNNx1WhdawrksfO+2mnupY0q+q9oj5gnlLoriMZg5ErXts+DSv/oYEZGtT+WrkcujMZmw+NEP7XuoIToVPw4o9tJHa+CVqlPNgGySjIfWcLdXuioGN0r2euqcKn3JF68FoTJHQyo1pa4bgxPkdeki5DwV0Cej9Oea0my5O7vQsBPSetHrqElS4Fno3uT9yeHSLvnJEgqM/iuaviAGhkzIIn8ESPkW08Onz4tcyMohC+O4H4ZPDNRc+7haeYfhUCGyIjnU/lEeP/K6NXtSoQl3LUdNlGS1vViOf0Oqv49PZbR4Jn00SPjMzDB8VHhOWvpymWQNbT8MheYaKg1zDKutfW17vk2HbVfiULlwT38s1npDgXgjIXwH/XdgD95IT9bByHwpkKqD355jhkykld3hWAnpPWj316Vz/YxSTabzP5rTT/pWfujWs1FMWGPSRaauO2nWTYV2WYNbmEfKLe6Npn8FtZdot/m8tfFrWGIjiMor55qFpNzWy6NpwRIbho8LqVkKMTOWNMJXXvdGnMu0Wny3hU06m4DrV/wifz+tomlZT13WGyLTbrI3DJXwctfAbK+2Ok4UKalPTdmr68Kv5XdCq1lumz/mohQvvhM3AjmML5AnFP+ph5T4UyFRA788xwydTSu7wrAQ61B2KeVvHPPHhnOXi+7AuS7WptdV7p6Qpz1sWDLwnv6hXy8X6TQenyzWQd1FWRhLhuybguiw4qC4LDqqWao5TF/Zo4ZNHFgwMbjcDR2QabPuxhfCWKbWWspJM/cLP6EOmnep9hMK+pTFvyxhZfRarXR9qFNxDFjAcxC/r3k+34s3ckY9BrkmpBQdxUvbqCGmb0YCmsqDA1cVDW3CQ+nps/DVZcPCjdj1IvX7x2in8tumTdKvd1IKDFrJybtyiXrgae/aJ7VkABRg+PAfsViC4WGPtovyX87vKCrZz6RzU6MRDrneMW9wLDy+1zu1VADG3r+DgmQ0oKMuqU+9w4C9LrZvLUutCPkFwdnLVlm1XkmOoOyY8eocDL3cftKszRBYdVMKtuGuIOL0GZ68eQWcZrUScXoUVe75NUx9zw0eN4lTwtZARWaAsw1abWskXLtekUhcYqNdb1hiEYn5VkJKSItd0tmOFrOZTn29Kf4cDg6yOmyLXvG6nWQVotycPG/7EAgyfJyZkAfYmoD4fkyTTY8kp9zJsurpu4y5Lw1Ons+zNh+2lgB4Bho8eJe5DAQpQgALZKsDwyVZOFkYBClCAAnoEGD56lLgPBShAAQpkqwDDJ1s5WRgFKEABCugRYPjoUeI+FKAABSiQrQLZHj4fdl6M8fKp6Vtxf2drRVkYBShAAQrYhoC68e6A0G+1m+Bmtun+kGnvJl8h4tTKh27AmFnRfJ0CFKAABexJoEqJptq9B39d90GmzdYdPjVKt5ZnnjTA1FUPbkefaencgQIUoAAF7EbgtRaTsfPEEm2gktmmO3xUQe+2n431+6fJJ7VXZ1YuX6cABShAATsSqFUmTG5P1Uq7c4iezazw8clZBP1bTNLug7U/cq2e8rkPBShAAQrYuIC6R2AjedzHpPB+uHnniq7WmhU+qkQVQL1eGKvdZl49qfHi9VP469pJXQfjThSgAAUoYBsChX1Ky010y6C83JhXPWZE3ThXb/AoAbPDJ5WtbvnOcmPDivDN6Q9f76K2oclWUIACFKCALoGL8pDFqzHR8vThvdh1Yqmu9zy8k8E/qJrR4OBg9hv5BgpQgAIUoEBWBQyFS1U1Ojo6ZvX9fB8FKEABClDAbAFDweKVjS4uLma/kW+gAAUoQAEKZFXA4FuknDGHp2dW38/3UYACFKAABcwWMHjnK2H0yu2tPfudGwUoQAEKUOBpCyQnJ0MLHyeZdvPw8nrax2P5FKAABShAAdy5GXs/fJSFq7s73HLkIAsFKEABClDgqQkkxMUhMT7+QfikBpAKIYPB8NQOzIIpQAEKUMD+BIxGIxLiE3A3Pk5r/P8DugmsR44LoDgAAAAASUVORK5CYII="},88745:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_form_mock_chain_get_genesis_address-551bfba5c9fb4c85e95f5bc789767c9e.png"},4847:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_form_mock_chain_get_genesis_address2-8f7ef34a1659021e6a7283d31014a6f5.png"},52171:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_form_mock_time_now-d7694a9f2dd01c0a0010e8d18bfbe8e5.png"},92537:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_form_mock_time_now2-5a73d7c10f300e12b9cc96892afaaa1d.png"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/72ec880a.8dcd9763.js b/assets/js/72ec880a.8dcd9763.js deleted file mode 100644 index 4f30a5fe6..000000000 --- a/assets/js/72ec880a.8dcd9763.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[420],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>A});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(n),p=r,A=u["".concat(l,".").concat(p)]||u[p]||m[p]||o;return n?a.createElement(A,i(i({ref:t},d),{},{components:n})):a.createElement(A,i({ref:t},d))}));function A(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"mock-form",title:"Smart Contracts Playground - Mock form",sidebar_label:"Mock form",sidebar_position:100},i=void 0,s={unversionedId:"build/smart-contracts/playground/mock-form",id:"build/smart-contracts/playground/mock-form",title:"Smart Contracts Playground - Mock form",description:"Mocks allow developers to simulate the behaviour of functions that have side-effects. A few examples of side-effect: retrieve the genesis address of a chain, retrieve the date, a random value etc.",source:"@site/docs/build/smart-contracts/playground/mock-form.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/mock-form",permalink:"/build/smart-contracts/playground/mock-form",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:100,frontMatter:{id:"mock-form",title:"Smart Contracts Playground - Mock form",sidebar_label:"Mock form",sidebar_position:100},sidebar:"docs",previous:{title:"Transaction form",permalink:"/build/smart-contracts/playground/transaction-form"},next:{title:"Fees",permalink:"/build/smart-contracts/fees"}},l={},c=[{value:"Example: Time.now/0",id:"example-timenow0",level:2},{value:"Example: Chain.get_genesis_address/1",id:"example-chainget_genesis_address1",level:2}],d={toc:c},u="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(u,(0,a.Z)({},d,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Mocks allow developers to simulate the behaviour of functions that have side-effects. A few examples of side-effect: retrieve the genesis address of a chain, retrieve the date, a random value etc."),(0,r.kt)("p",null,"The mock form is part of the trigger panel."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"the mock form is display",src:n(1604).Z,width:"415",height:"96"})),(0,r.kt)("p",null,"These functions must be mocked to test Smart Contracts that use them:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#get_genesis_address1-io"},"Chain.get_genesis_address/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#get_first_transaction_address1-io"},"Chain.get_first_transaction_address/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#get_genesis_public_key1-io"},"Chain.get_genesis_public_key/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#now0"},"Time.now/0")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#fetch_id_from_address1-io"},"Token.fetch_id_from_address/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#fetch1-io"},"Http.fetch/1")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/library#fetch_many1-io"},"Http.fetch_many/1"))),(0,r.kt)("p",null,"A function can be mocked multiple times, for example to mock multiple different inputs."),(0,r.kt)("h2",{id:"example-timenow0"},"Example: Time.now/0"),(0,r.kt)("p",null,"Time.now/0 can be mocked to simulate a future execution of the contract. This one is actually optional, the playground will use current time if it is not set."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\nactions triggered_by: interval, at: "* * * * *" do \n Contract.set_content(Time.now())\nend\n')),(0,r.kt)("p",null,"All you need to do is fill the expected output (seconds since epoch):"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"mocking the Time.now/0",src:n(52171).Z,width:"3600",height:"2390"})),(0,r.kt)("p",null,"Then click on the ",(0,r.kt)("inlineCode",{parentName:"p"},"Add")," button, then ",(0,r.kt)("inlineCode",{parentName:"p"},"trigger")," to test the Smart Contract:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Time.now/0 is mocked",src:n(92537).Z,width:"3600",height:"2390"})),(0,r.kt)("p",null,"We can see via the console that the mock was called as expected."),(0,r.kt)("h2",{id:"example-chainget_genesis_address1"},"Example: Chain.get_genesis_address/1"),(0,r.kt)("p",null,"Let's see an example with a function that takes an argument.\nIn the form you specify the output for a given input. Let's try it!"),(0,r.kt)("p",null,"The screenshot below mocked the function with these values: "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"input: ",(0,r.kt)("inlineCode",{parentName:"li"},"00002223BBD4EC3D64AE597696C7D7ADE1CEE65C639D885450AD2D7B75592AC76AFA")),(0,r.kt)("li",{parentName:"ul"},"output: ",(0,r.kt)("inlineCode",{parentName:"li"},"MOCKED"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\nactions triggered_by: interval, at: "* * * * *" do\n Contract.set_content(Chain.get_genesis_address(0x00002223bbd4ec3d64ae597696c7d7ade1cee65c639d885450ad2d7b75592ac76afa)) \nend\n')),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a contract that used Chain.get_genesis_address/1 is tested",src:n(88745).Z,width:"3600",height:"2390"})),(0,r.kt)("p",null,"We can see via the console that the mock was called as expected."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"a contract that used Chain.get_genesis_address/1 is tested",src:n(4847).Z,width:"3600",height:"2390"})))}m.isMDXComponent=!0},1604:(e,t,n)=>{n.d(t,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ8AAABgCAYAAADCUX/sAAAUTklEQVR4Xu3dB1xW1f8H8M/DRkBRwYGK4MItmjO3mKk4cY8cpakNzfpnZVauzMbvV64ys6zU3Bv31tyJe0uImjMVURkiPP/vucajCP64D6I943N9+Sp47nPuOe9z4eM59zz3GrzzlzKCGwUoQAEKUOAZChgeFz7OLs5wcnaGg6MTHB0dYDAYnmG1eCgKUIACFLBWAWNKClLkb3JyMu4lJSHpblK6pqQLHxU4bjncJXAcrbXdrDcFKEABCliQgAqhhLg4CaJ7plqlCR8XNze4ubtxlGNBncaqUIACFLAFAaPRiMT4eCQmJGrNMYWPq4SOm7u7LbSRbaAABShAAQsVUCMgFUBa+Dg5OyGHpydHPBbaWawWBShAAVsRUCOgO7duS/gUKGX0ypUTDg68xmMrnct2UIACFLBkgZSUZBh8i5Q35vD0sOR6sm4UoAAFKGBjAga/4pWNzi4uNtYsNocCFKAABSxZwFCkVFWjA5dVW3IfsW4UoAAFbE7A4B9UzWhwcLC5hrFBFKAABShguQKGomVq8PY6lts/rBkFKEABmxRg+Nhkt7JRFKAABSxbgOFj2f3D2lGAAhSwSQGGj012KxtFAQpQwLIFGD6W3T+sHQUoQAGbFDArfMJqD0H1oJa4cD0S4xf3yhDE1SkHhnVbBmdHFyzc9iV2n1iarXAjXlqNLYdmY/3+adlaLgujAAUoQIFnJ5Cl8FHV+8/8brgaezZdTSsFhqBLw+Ha9xk+z64jeSQKUIAC1iRgdvhUKhaCpOS72HZkPjYe+CVdW7s3GgW/vKWQx8uP4WNNZwLrSgEKUOAZCpgdPhUCGuBg1Eb45yuHcY9MvTk7uuLjbsux/eh81K/YLU34OBgc0Si4B8oVrY/cngVxJeYM9pwMl7/L0jQ3X64ANK8+AIV9yyIlOQmnL0Zg5Z7JuBX/t7bfo9NuvrmKon/oJFyOicJPq97BvZS78HD1xgvP9UFQoRrwdM+Na7cu4PfDc/HHqfBnSMtDUYACFKDA4wSyFD4zN36MPk2/xn8WdMfVm9GmsstLMHVtMByTl7+O11pOThM+3UNGo5x/PS1sLl6LRPFCVVBegmjD/p+xJuJHrYwC3sXQv8V3uH77IiJOroCriwfqlOuAG/L1xGWvymNZk9OET84cvhgQ+i3i78bi+xVvIjEpTitHfS+fdwAiTq/GjVsXUT6gPgIKVMS0NUNw4vwOng0UoAAFKPAvC2QpfEb+1gIfdlmC7UcWYMOBn01N6CLB4+GaCwu3f4UhHWabwiewQCX0az4Ry/d8i62HZpn2b1fnAwTLNN7n8zrhdvw19Gj8GfzylMTXC3sg8d79IKlZpi3a1HobP6wYhMhLEabw2X5sAfpLmQ4OTvhewu52wg1tfxVIQzsvxLKd47Ht6DztezlccqJfi0k4ELk+TX3/ZXsengIUoIDdCmQpfEbMbI6w2u+iiO+DqTcnBxd8JKvcVkjAnPrrjzTh07RqP9Qu1xEjZzSX60X3H6GqNjXSeSvsF8zeNAKHzmzCqB7rsfHgr1j7z0hI7eMkU3mVizdG9JXDMlUXrYXPzmOLtZFM0XzlZcTzBqIuHTCVqabchnVdij8v7ce8LZ8i5s5lu+1cNpwCFKCApQpkOXxK+FWTqbf/mqbeyvrXRfdGozFmTlu4OLmnCZ+uDUagYN6Ssm/XNA6OMmoZ3XODTLtNxeGoTXin/UwJopHY/+fax3qp8FGjnbiEm/B0y4PD0Zswa9PwNPuHBPdGSHAv7Xvn/j6KyAt/YL+Meq7cPGOp/cB6UYACFLArgSyHj1pAMLTLYtPUW8d6w5DLwxc/rBwkK90KpQmfbg1HokCeEunCRz09dXSPDdpU2OGozdoo6LeNn8iChg3/M3yS7iVq15VqlQmTEVV7fCf/H335YJr3+OQsItd6GqCEX1UE5K8IB4MBS3eNk1HTIrvqYDaWAhSggCUKZDl8VGPU1Ju/TH1NWPIKhnVZhtURU7Rf7o+GT7Oq/fF82fYYMTMU9x6adlOLAt4Om47Zm0fhyJnNGNVzHVbvnZpuCXfLGoNwSkYvx89t06bdth6eg3X7foK7a068234WrsuigolL+2i+bi5ect0nL67Fnkdyyj3te+o6UM/Gn8squ/wY+VuoJfYD60QBClDArgSeKHxSp96W75qEZtUGyJRbmLZw4NHwKVagMl5tPh7LdskigCP3FwGorV2d9xBcvAm+nNcZsXFX0a/ZROT08ME3i3qarg2VlOm9V2R6b/r6D3Ekeku6pdZq9NO61mC5vjMGe0+vRClZXv3yi19h/tbPZGn1CtOx1N0Z1Oo6ho9dnd9sLAUoYKECTxQ+aupNrXpzcXKTayvHMEWWO6vt0fBR31Mr2UoXfh47TyzGJVlqXbJQVVQIbChLrX/RrvmozV8WMPSVkLpyI0qCY6V27ahuhU64efsqJoX3TbfUWr1H1WFQm2kyCvLCV3JNySB/3gmbAQdHZy3o7iTEIDB/JVQq1lg+f7QA4bvHW2hXsFoUoAAF7EfgicJHMampt+pBrbBkxzfYIcufHxc+KiRCKveSD5nWk+mvAtrKtT0nwrH7ZNp7v/nlKYWm1fqjcN4gbfRz6q89WLX3exlRXdfKzujebqmjo40Hpsu03RRtFV3Tav1QyKc03Jw9ZFruAv6QUdG2I3O1AONGAQpQgAL/roBZ4fPvVpVHpwAFKEABWxFg+NhKT7IdFKAABaxIgOFjRZ3FqlKAAhSwFQGGj630JNtBAQpQwIoEGD5W1FmsKgUoQAFbEWD42EpPsh0UoAAFrEiA4WNFncWqUoACFLAVAYaPrfQk20EBClDAigQYPlbUWawqBShAAVsRYPjYSk+yHRSgAAWsSIDhY0WdxapSgAIUsBUBho+t9CTbQQEKUMCKBBg+VtRZrCoFKEABWxFg+NhKT7IdFKAABaxIgOFjRZ3FqlKAAhSwFQGGj630JNtBAQpQwIoEGD5W1FmsKgUoQAFbEWD42EpPsh0UoAAFrEiA4WNFncWqUoACFLAVAYaPrfQk20EBClDAigQYPlbUWawqBShAAVsRYPjYSk+yHRSgAAWsSCDL4fN82fYoXjAYvrmKIp93gBU1mVWlAAUoQIEnFbh0IwpXY6IReSkCO48tMrs4s8PHJ2dh9Gw8FldvnsOxc9vx17XjuHDtlNkH5hsoQAEKUMB6BQrlLYVCPkEo618HuTzy4ee17+HmnSu6G2RW+KhRTr/QCVi+cwL2/blW90G4IwUoQAEK2K5AjdJt0LDiS5i8/HXE3Lmkq6Fmhc97HeZiTcRU7Itco6tw7kQBClCAAvYhUFsuxVQp0QwTlr6iq8G6w6dO2Q4oUaiaDK2G6CqYO1GAAhSggH0JDGz9EzYdnIGDURsybbju8OnXbCK2HpmDo2e3Zlood6AABShAAfsTqCnTbwEFgjF70/BMG687fD7pvgJfzO2E+Lu3Mi2UO1CAAhSggP0J+OTyR+8XvsCX8ztn2njd4TP25a14/6e6mRbIHShAAQpQwH4F9GYFw8d+zxG2nAIUoEC2CzB8sp2UBVKAAhSgQGYCDJ/MhPg6BShAAQpkuwDDJ9tJWSAFKEABCmQmwPDJTIivU4ACFKBAtgswfLKdlAU+bYHcHgVx487FbD/MwDY/wy9Pcfy28RNdH35rUuUVFMlXDj+uejvDuhgMDvis92Z8F/4aoq8cyvb6Ps0Cw2oPgZOjC+ZuGf00D8Oy7ViA4WPHnW+tTdd70prTvvzegRgc9qt8Pu0Ooi5G4Nf1QzN9O8MnUyLuQIHHCuj9OeZSa55EFiOg96Q1p8IvPvcqqgW1xLbDcxFSuTc+ndVKguj2/yyC4WOOMPelQFoBvT/HDB+eORYjoPekNafCQ+RmuCf/2o0th2ZhSIfZWPD7WOw5udxUhKODE1RAVQhoCEdHJxyO3oKkpAT4+ZQ0TbsV8S2L0GqvI79M3f198yxW7ZmMvs3HPXba7Tm5uWL9Cl2RO6cf4hNv4+T5nViy82sk3UtIV/XgYi+gTvlOss8uqFuTGOXPgaj12LD/F7R9/v9QrEBlCctYLN0xDsfPb9fe7+meB6HV35TnaVWRr1IQeXE/wneOw53EGO11NxcvtKo5CCX8qsFgAI6f3YHluycgIekOHp12a1KlL6pLOE9ZORBXYs6YQ8t9KZChgN6fY4YPT6B/TaBgnhJwc/Y0HV89ruP75W+avk5Iuo2L109nuX5F81XAgBbfYsqKgfjz0j6oaz9x8TcwdfVgU5nql3H5gPryy3kSrsWeR42g1igf2ABnLh/Qwie3lx/eDpuOo9FbsfP4InluSX40q9pf/uubYfj45Q3CwNZTJTx+xvFzO5DbsyDa1H4X2+S+iOv2TcswfDrWGyb7bsPafT9K2FRBy5oDEZcQK3WaiMsSCM2qDUBer0IYO7edhIkD3pJ2JCTFYc3eH7TymjzXFy5Obhi3uLd8ZcQbLX9AUvJdrJU70HtJUL1Y9VVEXz6MOVtGpQmfxpVfRs0ybfGD+FyOicqyM99IgYcFGD48Hyxe4KWQMfKv9AfhU7xgZflX/L4H4SPTY9N1XKN5XENb13wb5QLqYszsMO2XcqNKvdBYpt4+m9MWt+Kvw9MtN4Z2XoQ5m0dpo437m0G7RhQbd1ULn1Y139JGGF8v6qmVobZKgSHo0nB4huGjAjVQbqy4/eh8U7W6NxqFu/cSM7zIr0Y+Het9iJEzQ7WRidqGdJiD0xf2YuG2L7Svy/rXRY/GY/DBtPrag7s6N/hE7rPYQWuD2jzd8+L9jvMwY/0wbeTUPWQ0PpfXb//zepkidVCjdCvtjvSpIx/1MMhGlV7CpGX9cOlGpMWfK6yg9QgwfKynr1jTfwT0nrR6wBwMjhjaZTEi5Zf4uoiftLfky10ML4WMwlKZolLhEJg/WHs44vAZzZHw0A1zVWj5eBfWwqdvs3G4dD0Sy3aNNx1WhdawrksfO+2mnupY0q+q9oj5gnlLoriMZg5ErXts+DSv/oYEZGtT+WrkcujMZmw+NEP7XuoIToVPw4o9tJHa+CVqlPNgGySjIfWcLdXuioGN0r2euqcKn3JF68FoTJHQyo1pa4bgxPkdeki5DwV0Cej9Oea0my5O7vQsBPSetHrqElS4Fno3uT9yeHSLvnJEgqM/iuaviAGhkzIIn8ESPkW08Onz4tcyMohC+O4H4ZPDNRc+7haeYfhUCGyIjnU/lEeP/K6NXtSoQl3LUdNlGS1vViOf0Oqv49PZbR4Jn00SPjMzDB8VHhOWvpymWQNbT8MheYaKg1zDKutfW17vk2HbVfiULlwT38s1npDgXgjIXwH/XdgD95IT9bByHwpkKqD355jhkykld3hWAnpPWj316Vz/YxSTabzP5rTT/pWfujWs1FMWGPSRaauO2nWTYV2WYNbmEfKLe6Npn8FtZdot/m8tfFrWGIjiMor55qFpNzWy6NpwRIbho8LqVkKMTOWNMJXXvdGnMu0Wny3hU06m4DrV/wifz+tomlZT13WGyLTbrI3DJXwctfAbK+2Ok4UKalPTdmr68Kv5XdCq1lumz/mohQvvhM3AjmML5AnFP+ph5T4UyFRA788xwydTSu7wrAQ61B2KeVvHPPHhnOXi+7AuS7WptdV7p6Qpz1sWDLwnv6hXy8X6TQenyzWQd1FWRhLhuybguiw4qC4LDqqWao5TF/Zo4ZNHFgwMbjcDR2QabPuxhfCWKbWWspJM/cLP6EOmnep9hMK+pTFvyxhZfRarXR9qFNxDFjAcxC/r3k+34s3ckY9BrkmpBQdxUvbqCGmb0YCmsqDA1cVDW3CQ+nps/DVZcPCjdj1IvX7x2in8tumTdKvd1IKDFrJybtyiXrgae/aJ7VkABRg+PAfsViC4WGPtovyX87vKCrZz6RzU6MRDrneMW9wLDy+1zu1VADG3r+DgmQ0oKMuqU+9w4C9LrZvLUutCPkFwdnLVlm1XkmOoOyY8eocDL3cftKszRBYdVMKtuGuIOL0GZ68eQWcZrUScXoUVe75NUx9zw0eN4lTwtZARWaAsw1abWskXLtekUhcYqNdb1hiEYn5VkJKSItd0tmOFrOZTn29Kf4cDg6yOmyLXvG6nWQVotycPG/7EAgyfJyZkAfYmoD4fkyTTY8kp9zJsurpu4y5Lw1Ons+zNh+2lgB4Bho8eJe5DAQpQgALZKsDwyVZOFkYBClCAAnoEGD56lLgPBShAAQpkqwDDJ1s5WRgFKEABCugRYPjoUeI+FKAABSiQrQLZHj4fdl6M8fKp6Vtxf2drRVkYBShAAQrYhoC68e6A0G+1m+Bmtun+kGnvJl8h4tTKh27AmFnRfJ0CFKAABexJoEqJptq9B39d90GmzdYdPjVKt5ZnnjTA1FUPbkefaencgQIUoAAF7EbgtRaTsfPEEm2gktmmO3xUQe+2n431+6fJJ7VXZ1YuX6cABShAATsSqFUmTG5P1Uq7c4iezazw8clZBP1bTNLug7U/cq2e8rkPBShAAQrYuIC6R2AjedzHpPB+uHnniq7WmhU+qkQVQL1eGKvdZl49qfHi9VP469pJXQfjThSgAAUoYBsChX1Ky010y6C83JhXPWZE3ThXb/AoAbPDJ5WtbvnOcmPDivDN6Q9f76K2oclWUIACFKCALoGL8pDFqzHR8vThvdh1Yqmu9zy8k8E/qJrR4OBg9hv5BgpQgAIUoEBWBQyFS1U1Ojo6ZvX9fB8FKEABClDAbAFDweKVjS4uLma/kW+gAAUoQAEKZFXA4FuknDGHp2dW38/3UYACFKAABcwWMHjnK2H0yu2tPfudGwUoQAEKUOBpCyQnJ0MLHyeZdvPw8nrax2P5FKAABShAAdy5GXs/fJSFq7s73HLkIAsFKEABClDgqQkkxMUhMT7+QfikBpAKIYPB8NQOzIIpQAEKUMD+BIxGIxLiE3A3Pk5r/P8DugmsR44LoDgAAAAASUVORK5CYII="},88745:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_form_mock_chain_get_genesis_address-551bfba5c9fb4c85e95f5bc789767c9e.png"},4847:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_form_mock_chain_get_genesis_address2-8f7ef34a1659021e6a7283d31014a6f5.png"},52171:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_form_mock_time_now-d7694a9f2dd01c0a0010e8d18bfbe8e5.png"},92537:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/playground_form_mock_time_now2-5a73d7c10f300e12b9cc96892afaaa1d.png"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/749f8745.afa92f73.js b/assets/js/749f8745.c23abe89.js similarity index 58% rename from assets/js/749f8745.afa92f73.js rename to assets/js/749f8745.c23abe89.js index 2995994a0..8c2fdc2c7 100644 --- a/assets/js/749f8745.afa92f73.js +++ b/assets/js/749f8745.c23abe89.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9712],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(r),d=o,m=u["".concat(c,".").concat(d)]||u[d]||f[d]||i;return r?n.createElement(m,a(a({ref:t},p),{},{components:r})):n.createElement(m,a({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:o,a[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));r(8209);const i={id:"proof-of-work",title:"Proof of Work algorithm"},a=void 0,l={unversionedId:"build/core/mining/proof-of-work",id:"build/core/mining/proof-of-work",title:"Proof of Work algorithm",description:"The Archethic's proof of work algorithm defines way to assert the validity of the origin signature.",source:"@site/docs/build/core/mining/proof_of_work.md",sourceDirName:"build/core/mining",slug:"/build/core/mining/proof-of-work",permalink:"/build/core/mining/proof-of-work",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"proof-of-work",title:"Proof of Work algorithm"},sidebar:"docs",previous:{title:"Pending transaction validation",permalink:"/build/core/mining/transaction-validation"},next:{title:"Transaction context retrieval",permalink:"/build/core/mining/transaction-context"}},c={},s=[{value:"Origin public key candidates",id:"origin-public-key-candidates",level:2},{value:"Lookup",id:"lookup",level:2}],p={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The Archethic's proof of work algorithm defines way to assert the validity of the origin signature."),(0,o.kt)("p",null,"It defines two main components:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"List of origin public key candidates"),(0,o.kt)("li",{parentName:"ul"},"Lookup of the origin public key to verify the signature")),(0,o.kt)("h2",{id:"origin-public-key-candidates"},"Origin public key candidates"),(0,o.kt)("p",null,"Origin public keys listed for a given transaction are known by the entire network and are shared between clients and nodes."),(0,o.kt)("p",null,"However, a given transaction can specify - through ",(0,o.kt)("a",{parentName:"p",href:"/build/smart-contracts/"},"smart-contract")," the origin family."),(0,o.kt)("p",null,"By this way, the nodes are able to extract the list of origin public keys to assert with the signature."),(0,o.kt)("h2",{id:"lookup"},"Lookup"),(0,o.kt)("p",null,"A simple algorithm is defined to scan the entire list of public keys candidates and verify the cryptographic origin signature."),(0,o.kt)("p",null,"Once the public key is found, it becomes the Proof of Work.\nIf no public key is found, the proof of work is invalid and the transaction as well."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Telemetry timing is used for this algorithm to indicate how fast the algorithm is with a given number of public keys")))}f.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9712],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(r),d=o,m=u["".concat(c,".").concat(d)]||u[d]||f[d]||i;return r?n.createElement(m,a(a({ref:t},p),{},{components:r})):n.createElement(m,a({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:o,a[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));r(8209);const i={id:"proof-of-work",title:"Proof of Work algorithm"},a=void 0,l={unversionedId:"build/core/mining/proof-of-work",id:"build/core/mining/proof-of-work",title:"Proof of Work algorithm",description:"The Archethic's proof of work algorithm defines way to assert the validity of the origin signature.",source:"@site/docs/build/core/mining/proof_of_work.md",sourceDirName:"build/core/mining",slug:"/build/core/mining/proof-of-work",permalink:"/build/core/mining/proof-of-work",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"proof-of-work",title:"Proof of Work algorithm"},sidebar:"docs",previous:{title:"Pending transaction validation",permalink:"/build/core/mining/transaction-validation"},next:{title:"Transaction context retrieval",permalink:"/build/core/mining/transaction-context"}},c={},s=[{value:"Origin public key candidates",id:"origin-public-key-candidates",level:2},{value:"Lookup",id:"lookup",level:2}],p={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The Archethic's proof of work algorithm defines way to assert the validity of the origin signature."),(0,o.kt)("p",null,"It defines two main components:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"List of origin public key candidates"),(0,o.kt)("li",{parentName:"ul"},"Lookup of the origin public key to verify the signature")),(0,o.kt)("h2",{id:"origin-public-key-candidates"},"Origin public key candidates"),(0,o.kt)("p",null,"Origin public keys listed for a given transaction are known by the entire network and are shared between clients and nodes."),(0,o.kt)("p",null,"However, a given transaction can specify - through ",(0,o.kt)("a",{parentName:"p",href:"/build/smart-contracts/"},"smart-contract")," the origin family."),(0,o.kt)("p",null,"By this way, the nodes are able to extract the list of origin public keys to assert with the signature."),(0,o.kt)("h2",{id:"lookup"},"Lookup"),(0,o.kt)("p",null,"A simple algorithm is defined to scan the entire list of public keys candidates and verify the cryptographic origin signature."),(0,o.kt)("p",null,"Once the public key is found, it becomes the Proof of Work.\nIf no public key is found, the proof of work is invalid and the transaction as well."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Telemetry timing is used for this algorithm to indicate how fast the algorithm is with a given number of public keys")))}f.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/764c3c46.a288db97.js b/assets/js/764c3c46.a288db97.js new file mode 100644 index 000000000..c8d931b95 --- /dev/null +++ b/assets/js/764c3c46.a288db97.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1484],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>m});var i=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=i.createContext({}),c=function(e){var t=i.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},p=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},u=i.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=r(e,["components","mdxType","originalType","parentName"]),d=c(a),u=n,m=d["".concat(l,".").concat(u)]||d[u]||h[u]||o;return a?i.createElement(m,s(s({ref:t},p),{},{components:a})):i.createElement(m,s({ref:t},p))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,s=new Array(o);s[0]=u;var r={};for(var l in t)hasOwnProperty.call(t,l)&&(r[l]=t[l]);r.originalType=e,r[d]="string"==typeof e?e:n,s[1]=r;for(var c=2;c{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var i=a(87462),n=(a(67294),a(3905));a(8209);const o={id:"aeweb",title:"Archethic Web (AEWeb)"},s=void 0,r={unversionedId:"participate/aeweb/aeweb",id:"participate/aeweb/aeweb",title:"Archethic Web (AEWeb)",description:"Archethic has developed a new solution to host websites on a decentralized network to avoid censorship, increase security and have high-availability and resiliency.",source:"@site/docs/participate/aeweb/README.md",sourceDirName:"participate/aeweb",slug:"/participate/aeweb/",permalink:"/participate/aeweb/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"aeweb",title:"Archethic Web (AEWeb)"},sidebar:"docs",previous:{title:"Participate",permalink:"/category/participate"},next:{title:"How it works",permalink:"/participate/aeweb/how-it-works"}},l={},c=[{value:"Motivations",id:"motivations",level:2},{value:"Easy",id:"easy",level:3},{value:"Security",id:"security",level:3},{value:"Costly efficient",id:"costly-efficient",level:3},{value:"Target",id:"target",level:2},{value:"Try out",id:"try-out",level:2},{value:"Graphical interface",id:"graphical-interface",level:3},{value:"Developers",id:"developers",level:3},{value:"Roadmap",id:"roadmap",level:2}],p={toc:c},d="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,i.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Archethic has developed a new solution to host websites on a decentralized network to ",(0,n.kt)("strong",{parentName:"p"},"avoid censorship"),", ",(0,n.kt)("strong",{parentName:"p"},"increase security")," and ",(0,n.kt)("strong",{parentName:"p"},"have high-availability and resiliency"),"."),(0,n.kt)("h2",{id:"motivations"},"Motivations"),(0,n.kt)("p",null,"Web hosting is still a subject of innovation nowadays, even with the rise of Web3.\nExisting solutions provides P2P and distributed hosting, but it can lack some important aspects such as ease-of-use, fully on-chain and trust."),(0,n.kt)("h3",{id:"easy"},"Easy"),(0,n.kt)("p",null,"Since its design, ",(0,n.kt)("strong",{parentName:"p"},"AEWeb")," motivation was to allow deployment of websites in just a few steps. No need to transform your website to match our solution. The website you developed and know will be the same one deployed."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Your website will be transformed into transaction without additional work")),(0,n.kt)("h3",{id:"security"},"Security"),(0,n.kt)("p",null,"Web hosting solutions are either centralized and decentralized. The first doesn't provide security, as being centralized and subject to censorship. The latter would be quite often insecure because hosted out of the blockchain, like traditional P2P system (torrents, etc.)"),(0,n.kt)("p",null,"We wanted to make it completely secure and on-chain.\nHence, each of the websites will first be validated across the Archethic network with the ARCH consensus capable to handle even 90% of maliciousness.\nWhile being validated, the websites will be stored and split geographically across the globe for highest data availability and security."),(0,n.kt)("p",null,"Then each delivery of the websites will directly read the data on-chain to deliver to browsers and clients and provide a high confidence of the displayed website."),(0,n.kt)("h3",{id:"costly-efficient"},"Costly efficient"),(0,n.kt)("p",null,"There are rare situations when websites can be hosted on a blockchain due to its costs being based on virtual machine or high fee on a network."),(0,n.kt)("p",null,"Transactions on Archethic are cost-efficient, so hosting websites on-chain will be a cheap solution regarding existing centralized and decentralized protocols."),(0,n.kt)("p",null,"Because of the nature of Web3 and decentralized network, once a website is deployed there is no maintenance cost such as renting a VPS on a centralized system each month for a couple of bucks. As long as the website doesn't need to change, there will be not cost."),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Example: a VPS can cost around $5/month to host any website. On Archethic a website of 1MB could cost around $2 (with UCO at: $1 and with 200 replicas)."),(0,n.kt)("p",{parentName:"admonition"},"You might think it's more expensive, but the VPS was only a single instance. For the same data availability on centralized hosting you would have to pay around $500 + cost of maintenance")),(0,n.kt)("h2",{id:"target"},"Target"),(0,n.kt)("p",null,"Because of the Web is so wide, we have distinguished what AEWeb is capable to do or not."),(0,n.kt)("admonition",{title:"Website vs WebApp",type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Website are usually not Web app."),(0,n.kt)("p",{parentName:"admonition"},"Websites are often simple static pages (HTML, stylesheets, images, scripts) to create beautiful frontend such a portal, showcase, corporate sites."),(0,n.kt)("p",{parentName:"admonition"},"On the other side Web app (Web Application) are far more complex and provide a complete suite of administration and back-office with authentication and databases.")),(0,n.kt)("p",null,"For now, AEWeb solution only provides website hosting. So any website which contains static files can be hosted on-chain."),(0,n.kt)("p",null,"For more complex web applications, the front-end can still be hosted with AEWeb but the backend or business logic have to be managed in other ways, such as:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"centralized servers and databases"),(0,n.kt)("li",{parentName:"ul"},"blockchain dApp & smart contracts")),(0,n.kt)("p",null,"For instance, today a lot of web apps are leveraging SPA (Single Page Application) with front-end frameworks which are talking to external backend servers (fetching data, or authenticate users, etc.).\nIn that case, once the front-end page have been build from the SPA tooling, instead of being deployed on centralized servers, the generated static files could be hosted on Archethic through AEWeb tooling."),(0,n.kt)("h2",{id:"try-out"},"Try out"),(0,n.kt)("h3",{id:"graphical-interface"},"Graphical interface"),(0,n.kt)("p",null,"To test the user interface to deploy websites, visit the ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb"},"project")," by downloading the app to make webhosting no only for developers but for anyone which have static website to deploy."),(0,n.kt)("h3",{id:"developers"},"Developers"),(0,n.kt)("p",null,"You can try the ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb-cli"},"CLI")," to help developers to test and deploy existing websites using terminal."),(0,n.kt)("h2",{id:"roadmap"},"Roadmap"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Design"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Blockchain integration",(0,n.kt)("ul",{parentName:"li",className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","API"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","HTTPS & certificates"))),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Command Line Interface (CLI)",(0,n.kt)("ul",{parentName:"li",className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","File"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Folder"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Complete website"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Keychain integration"))),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","User Interface",(0,n.kt)("ul",{parentName:"li",className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Web or Native application"))),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","Domain Name System (DNS)",(0,n.kt)("ul",{parentName:"li",className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","DNSLink integration"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","Automation")))))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/764c3c46.ad3f9821.js b/assets/js/764c3c46.ad3f9821.js deleted file mode 100644 index fec4fbb30..000000000 --- a/assets/js/764c3c46.ad3f9821.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1484],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>m});var i=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=i.createContext({}),c=function(e){var t=i.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},p=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},u=i.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=r(e,["components","mdxType","originalType","parentName"]),d=c(a),u=n,m=d["".concat(l,".").concat(u)]||d[u]||h[u]||o;return a?i.createElement(m,s(s({ref:t},p),{},{components:a})):i.createElement(m,s({ref:t},p))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,s=new Array(o);s[0]=u;var r={};for(var l in t)hasOwnProperty.call(t,l)&&(r[l]=t[l]);r.originalType=e,r[d]="string"==typeof e?e:n,s[1]=r;for(var c=2;c{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var i=a(87462),n=(a(67294),a(3905));a(8209);const o={id:"aeweb",title:"Archethic Web (AEWeb)"},s=void 0,r={unversionedId:"participate/aeweb/aeweb",id:"participate/aeweb/aeweb",title:"Archethic Web (AEWeb)",description:"Archethic has developed a new solution to host websites on a decentralized network to avoid censorship, increase security and have high-availability and resiliency.",source:"@site/docs/participate/aeweb/README.md",sourceDirName:"participate/aeweb",slug:"/participate/aeweb/",permalink:"/participate/aeweb/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"aeweb",title:"Archethic Web (AEWeb)"},sidebar:"docs",previous:{title:"Participate",permalink:"/category/participate"},next:{title:"How it works",permalink:"/participate/aeweb/how-it-works"}},l={},c=[{value:"Motivations",id:"motivations",level:2},{value:"Easy",id:"easy",level:3},{value:"Security",id:"security",level:3},{value:"Costly efficient",id:"costly-efficient",level:3},{value:"Target",id:"target",level:2},{value:"Try out",id:"try-out",level:2},{value:"Graphical interface",id:"graphical-interface",level:3},{value:"Developers",id:"developers",level:3},{value:"Roadmap",id:"roadmap",level:2}],p={toc:c},d="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,i.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Archethic has developed a new solution to host websites on a decentralized network to ",(0,n.kt)("strong",{parentName:"p"},"avoid censorship"),", ",(0,n.kt)("strong",{parentName:"p"},"increase security")," and ",(0,n.kt)("strong",{parentName:"p"},"have high-availability and resiliency"),"."),(0,n.kt)("h2",{id:"motivations"},"Motivations"),(0,n.kt)("p",null,"Web hosting is still a subject of innovation nowadays, even with the rise of Web3.\nExisting solutions provides P2P and distributed hosting, but it can lack some important aspects such as ease-of-use, fully on-chain and trust."),(0,n.kt)("h3",{id:"easy"},"Easy"),(0,n.kt)("p",null,"Since its design, ",(0,n.kt)("strong",{parentName:"p"},"AEWeb")," motivation was to allow deployment of websites in just a few steps. No need to transform your website to match our solution. The website you developed and know will be the same one deployed."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Your website will be transformed into transaction without additional work")),(0,n.kt)("h3",{id:"security"},"Security"),(0,n.kt)("p",null,"Web hosting solutions are either centralized and decentralized. The first doesn't provide security, as being centralized and subject to censorship. The latter would be quite often insecure because hosted out of the blockchain, like traditional P2P system (torrents, etc.)"),(0,n.kt)("p",null,"We wanted to make it completely secure and on-chain.\nHence, each of the websites will first be validated across the Archethic network with the ARCH consensus capable to handle even 90% of maliciousness.\nWhile being validated, the websites will be stored and split geographically across the globe for highest data availability and security."),(0,n.kt)("p",null,"Then each delivery of the websites will directly read the data on-chain to deliver to browsers and clients and provide a high confidence of the displayed website."),(0,n.kt)("h3",{id:"costly-efficient"},"Costly efficient"),(0,n.kt)("p",null,"There are rare situations when websites can be hosted on a blockchain due to its costs being based on virtual machine or high fee on a network."),(0,n.kt)("p",null,"Transactions on Archethic are cost-efficient, so hosting websites on-chain will be a cheap solution regarding existing centralized and decentralized protocols."),(0,n.kt)("p",null,"Because of the nature of Web3 and decentralized network, once a website is deployed there is no maintenance cost such as renting a VPS on a centralized system each month for a couple of bucks. As long as the website doesn't need to change, there will be not cost."),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Example: a VPS can cost around $5/month to host any website. On Archethic a website of 1MB could cost around $2 (with UCO at: $1 and with 200 replicas)."),(0,n.kt)("p",{parentName:"admonition"},"You might think it's more expensive, but the VPS was only a single instance. For the same data availability on centralized hosting you would have to pay around $500 + cost of maintenance")),(0,n.kt)("h2",{id:"target"},"Target"),(0,n.kt)("p",null,"Because of the Web is so wide, we have distinguished what AEWeb is capable to do or not."),(0,n.kt)("admonition",{title:"Website vs WebApp",type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Website are usually not Web app."),(0,n.kt)("p",{parentName:"admonition"},"Websites are often simple static pages (HTML, stylesheets, images, scripts) to create beautiful frontend such a portal, showcase, corporate sites."),(0,n.kt)("p",{parentName:"admonition"},"On the other side Web app (Web Application) are far more complex and provide a complete suite of administration and back-office with authentication and databases.")),(0,n.kt)("p",null,"For now, AEWeb solution only provides website hosting. So any website which contains static files can be hosted on-chain."),(0,n.kt)("p",null,"For more complex web applications, the front-end can still be hosted with AEWeb but the backend or business logic have to be managed in other ways, such as:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"centralized servers and databases"),(0,n.kt)("li",{parentName:"ul"},"blockchain dApp & smart contracts")),(0,n.kt)("p",null,"For instance, today a lot of web apps are leveraging SPA (Single Page Application) with front-end frameworks which are talking to external backend servers (fetching data, or authenticate users, etc.).\nIn that case, once the front-end page have been build from the SPA tooling, instead of being deployed on centralized servers, the generated static files could be hosted on Archethic through AEWeb tooling."),(0,n.kt)("h2",{id:"try-out"},"Try out"),(0,n.kt)("h3",{id:"graphical-interface"},"Graphical interface"),(0,n.kt)("p",null,"To test the user interface to deploy websites, visit the ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb"},"project")," by downloading the app to make webhosting no only for developers but for anyone which have static website to deploy."),(0,n.kt)("h3",{id:"developers"},"Developers"),(0,n.kt)("p",null,"You can try the ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb-cli"},"CLI")," to help developers to test and deploy existing websites using terminal."),(0,n.kt)("h2",{id:"roadmap"},"Roadmap"),(0,n.kt)("ul",{className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Design"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Blockchain integration",(0,n.kt)("ul",{parentName:"li",className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","API"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","HTTPS & certificates"))),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Command Line Interface (CLI)",(0,n.kt)("ul",{parentName:"li",className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","File"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Folder"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Complete website"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Keychain integration"))),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","User Interface",(0,n.kt)("ul",{parentName:"li",className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","Web or Native application"))),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","Domain Name System (DNS)",(0,n.kt)("ul",{parentName:"li",className:"contains-task-list"},(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!0,disabled:!0})," ","DNSLink integration"),(0,n.kt)("li",{parentName:"ul",className:"task-list-item"},(0,n.kt)("input",{parentName:"li",type:"checkbox",checked:!1,disabled:!0})," ","Automation")))))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/76b1eb51.49c606e3.js b/assets/js/76b1eb51.49c606e3.js new file mode 100644 index 000000000..2cdb403bc --- /dev/null +++ b/assets/js/76b1eb51.49c606e3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5258],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>b});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(r),h=n,b=p["".concat(s,".").concat(h)]||p[h]||u[h]||o;return r?a.createElement(b,l(l({ref:t},d),{},{components:r})):a.createElement(b,l({ref:t},d))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=h;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var c=2;c{r.r(t),r.d(t,{Badge:()=>h,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var a=r(87462),n=r(67294),o=r(3905);r(8209);const l={id:"ownership",title:"Ownership",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/objects/ownership",id:"build/api/schema/objects/ownership",title:"Ownership",description:"[Ownership] represents a block to set a secret and the authorized public keys able to decrypt the secret",source:"@site/docs/build/api/schema/objects/ownership.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/ownership",permalink:"/build/api/schema/objects/ownership",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"ownership",title:"Ownership",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"OracleServices",permalink:"/build/api/schema/objects/oracle-services"},next:{title:"SharedSecrets",permalink:"/build/api/schema/objects/shared-secrets"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'Ownership.authorizedPublicKeys[AuthorizedKey] ',id:"code-style-fontweight-normal-ownershipbauthorizedpublickeysbcodeauthorizedkey--",level:4},{value:'Ownership.secretHex ',id:"code-style-fontweight-normal-ownershipbsecretbcodehex-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),h=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:h},m="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(m,(0,a.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[Ownership]"," represents a block to set a secret and the authorized public keys able to decrypt the secret"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type Ownership {\n authorizedPublicKeys: [AuthorizedKey]\n secret: Hex\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ownershipbauthorizedpublickeysbcodeauthorizedkey--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Ownership.",(0,o.kt)("b",null,"authorizedPublicKeys"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/authorized-key"},(0,o.kt)("inlineCode",{parentName:"a"},"[AuthorizedKey]"))," ",(0,o.kt)(h,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(h,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ownershipbsecretbcodehex-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Ownership.",(0,o.kt)("b",null,"secret"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,o.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,o.kt)(h,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,o.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,o.kt)(h,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,o.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,o.kt)(h,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/76b1eb51.e7d131ed.js b/assets/js/76b1eb51.e7d131ed.js deleted file mode 100644 index 0f9c2ee7f..000000000 --- a/assets/js/76b1eb51.e7d131ed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5258],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>b});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(r),h=n,b=p["".concat(s,".").concat(h)]||p[h]||u[h]||o;return r?a.createElement(b,l(l({ref:t},d),{},{components:r})):a.createElement(b,l({ref:t},d))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=h;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var c=2;c{r.r(t),r.d(t,{Badge:()=>h,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var a=r(87462),n=r(67294),o=r(3905);r(8209);const l={id:"ownership",title:"Ownership",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/objects/ownership",id:"build/api/schema/objects/ownership",title:"Ownership",description:"[Ownership] represents a block to set a secret and the authorized public keys able to decrypt the secret",source:"@site/docs/build/api/schema/objects/ownership.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/ownership",permalink:"/build/api/schema/objects/ownership",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"ownership",title:"Ownership",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"OracleServices",permalink:"/build/api/schema/objects/oracle-services"},next:{title:"SharedSecrets",permalink:"/build/api/schema/objects/shared-secrets"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'Ownership.authorizedPublicKeys[AuthorizedKey] ',id:"code-style-fontweight-normal-ownershipbauthorizedpublickeysbcodeauthorizedkey--",level:4},{value:'Ownership.secretHex ',id:"code-style-fontweight-normal-ownershipbsecretbcodehex-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(n.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),h=e=>(0,o.kt)(n.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:h},m="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(m,(0,a.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[Ownership]"," represents a block to set a secret and the authorized public keys able to decrypt the secret"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type Ownership {\n authorizedPublicKeys: [AuthorizedKey]\n secret: Hex\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ownershipbauthorizedpublickeysbcodeauthorizedkey--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Ownership.",(0,o.kt)("b",null,"authorizedPublicKeys"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/authorized-key"},(0,o.kt)("inlineCode",{parentName:"a"},"[AuthorizedKey]"))," ",(0,o.kt)(h,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(h,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ownershipbsecretbcodehex-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Ownership.",(0,o.kt)("b",null,"secret"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,o.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,o.kt)(h,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,o.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,o.kt)(h,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,o.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,o.kt)(h,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/7746a795.609c2297.js b/assets/js/7746a795.609c2297.js new file mode 100644 index 000000000..0350f781d --- /dev/null +++ b/assets/js/7746a795.609c2297.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5935],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>m});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),c=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(a),d=n,m=p["".concat(s,".").concat(d)]||p[d]||h[d]||i;return a?r.createElement(m,o(o({ref:t},u),{},{components:a})):r.createElement(m,o({ref:t},u))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,o[1]=l;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=a(87462),n=(a(67294),a(3905));a(8209);const i={id:"archethic-wallet",title:"Archethic Wallet"},o=void 0,l={unversionedId:"participate/wallet/archethic-wallet",id:"participate/wallet/archethic-wallet",title:"Archethic Wallet",description:"Archethic has developed a fully decentralized and non-custodial cryptocurrency hot wallet that enables users to safely manage assets on Layer 1 Archethic blockchain.",source:"@site/docs/participate/wallet/README.md",sourceDirName:"participate/wallet",slug:"/participate/wallet/",permalink:"/participate/wallet/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"archethic-wallet",title:"Archethic Wallet"},sidebar:"docs",previous:{title:"aeSwap",permalink:"/participate/dex/usage/aeSwap"},next:{title:"Communication with DApps",permalink:"/participate/wallet/dapps-communication"}},s={},c=[{value:"Features",id:"features",level:2},{value:"Framework",id:"framework",level:2},{value:"Seed",id:"seed",level:2},{value:"Securing the application",id:"securing-the-application",level:2},{value:"Data store",id:"data-store",level:2},{value:"Interactions with the Archethic blockchain",id:"interactions-with-the-archethic-blockchain",level:2},{value:"Setup",id:"setup",level:2},{value:"Pre-requisites",id:"pre-requisites",level:3},{value:"Instructions",id:"instructions",level:3}],u={toc:c},p="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(p,(0,r.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Archethic has developed a fully decentralized and non-custodial cryptocurrency hot wallet that enables users to safely manage assets on Layer 1 Archethic blockchain.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"No signup or KYC needed, users just control their services and access keychain, protected by different secure access methods like PIN Code, Password, YubiKey like devices and Biometrics.")),(0,n.kt)("h2",{id:"features"},"Features"),(0,n.kt)("p",null,"Archethic Wallet has implemented the following features:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Main features",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Decentralized keychain management"),(0,n.kt)("li",{parentName:"ul"},"Multiple accounts' management"),(0,n.kt)("li",{parentName:"ul"},"Creation of Fungible Tokens"),(0,n.kt)("li",{parentName:"ul"},"Creation of NFTs"),(0,n.kt)("li",{parentName:"ul"},"Support for transactions (Sending and Receiving UCO Token, Fungible Tokens and NFTs)"),(0,n.kt)("li",{parentName:"ul"},"List of recent transactions"),(0,n.kt)("li",{parentName:"ul"},"List of acquired tokens"))),(0,n.kt)("li",{parentName:"ul"},"Security",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Security access with Password, PIN, Yubicloud OTP, Face ID, Touch ID, Uniris Biometrics (2023)"),(0,n.kt)("li",{parentName:"ul"},"Use of 24 Words Mnemonics"))),(0,n.kt)("li",{parentName:"ul"},"Customization",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Support for English and French Language"),(0,n.kt)("li",{parentName:"ul"},"Support for multiple Currencies (view only, not meant as multiple cryptocurrencies wallet)"),(0,n.kt)("li",{parentName:"ul"},"Multi themes (9 themes available)"),(0,n.kt)("li",{parentName:"ul"},"UI customization"))),(0,n.kt)("li",{parentName:"ul"},"Other features",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Local notifications"),(0,n.kt)("li",{parentName:"ul"},"Access to exchanges to buy ERC20 UCO"),(0,n.kt)("li",{parentName:"ul"},"Share address with QR Code or mobile share feature"),(0,n.kt)("li",{parentName:"ul"},"Address book"),(0,n.kt)("li",{parentName:"ul"},"UCO Price chart"),(0,n.kt)("li",{parentName:"ul"},"Access latest Archethic blog articles")))),(0,n.kt)("h2",{id:"framework"},"Framework"),(0,n.kt)("p",null,"Archethic developed the wallet using Flutter based on Dart language.\nFlutter is an open-source mobile application development framework from Google. The main reason for its popularity is that it supports the creation of cross-platform applications. Flutter is also used to create interactive apps that run on web pages or on the desktop."),(0,n.kt)("p",null,"Here are some of Flutter's features*"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Single code base for Android, iOS, Windows, Linux, macOS, Web, Extension"),": This approach simplifies and reduces the development time, cost, and maintenance is also an easy task. The Flutter-based user interface can be installed virtually on any platform. It has its own rendering engine that allows developers to keep the UI as it is while moving to another platform. As a result, application users can enjoy an excellent native-like experience on various platforms."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Open-source and made by Google"),": Flutter is a popular choice among developers because of the huge community support. Google designed the Flutter framework with all the security issues of modern applications in mind. One can find reliable and well-tested plugins in Flutter to mitigate security risks such as user authentication flaws, malicious code injections and data leaks."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Dart Programming"),": Flutter uses an easy to learn and implement programming language called Dart, which is Google's general purpose programming language."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Performance"),": As a cross-platform framework, Flutter offers unmatched performance compared to its competitors. Flutter compiles designs to native code. Unlike React Native, Flutter renders widgets directly from the native library rather than downloading libraries and components to the device before rendering.")),(0,n.kt)("p",null,(0,n.kt)("em",{parentName:"p"},"Source: ",(0,n.kt)("a",{parentName:"em",href:"https://mobiskill.fr/blog/conseils-emploi-tech/pourquoi-utiliser-flutter-en-2022/"},"https://mobiskill.fr/blog/conseils-emploi-tech/pourquoi-utiliser-flutter-en-2022/"))),(0,n.kt)("h2",{id:"seed"},"Seed"),(0,n.kt)("p",null,"When the wallet is created, a seed is randomly created from a cryptographically secure random number generator provided by Dart."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-dart"}," static String generateSeed() {\n String result = '';\n const String chars = 'abcdef0123456789';\n final Random rng = Random.secure();\n for (int i = 0; i < 64; i++) {\n result += chars[rng.nextInt(chars.length)];\n }\n return result.toUpperCase();\n }\n")),(0,n.kt)("p",null,"In order to make the seed more accessible, BIP39 is used and aims to provide a method of simplifying the reading of the seed using a series of mnemonic words. BIP39 takes random words (usually from the English language, although they can be from another language) and creates a long phrase with them, usually 12 to 24 words. In the case of the Archethic wallet, we use 24 words because the higher the number of words, the greater the entropy and security attributable to the resulting sentence. These words are chosen from a dictionary of 2048 words. The flutter library bip39_mnemonic is thus used with English and French dictionaries."),(0,n.kt)("p",null,"In the case of wallet restoration, the library bip39_mnemonic allows to find the seed from the seed phrase."),(0,n.kt)("h2",{id:"securing-the-application"},"Securing the application"),(0,n.kt)("p",null,"Access to the application and interactions with the blockchain are secured so that certain actions are not done beyond the user's control.\nFollowing are the ways to access:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"by ",(0,n.kt)("strong",{parentName:"li"},"PIN code"),", comprising of 6 digits, with the possibility to mix the numbers of the keyboard to reduce the risks of access to your code by observation,"),(0,n.kt)("li",{parentName:"ul"},"by ",(0,n.kt)("strong",{parentName:"li"},"password"),","),(0,n.kt)("li",{parentName:"ul"},"by using a ",(0,n.kt)("strong",{parentName:"li"},"YubiKey"),", it is an electronic authentication device to secure your access. Whether you are using NFC with your mobile or USB on your desktop, you can identify yourself with this key,"),(0,n.kt)("li",{parentName:"ul"},"by the ",(0,n.kt)("strong",{parentName:"li"},"touch ID or face ID system"),", depending on your device capabilities.")),(0,n.kt)("p",null,"In the case of ",(0,n.kt)("strong",{parentName:"p"},"PIN")," and ",(0,n.kt)("strong",{parentName:"p"},"password"),', authentication information is stored locally (see "What data is stored in my device?").\nIn the case of ',(0,n.kt)("strong",{parentName:"p"},"touch ID or Face ID"),", the ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/packages/local_auth"},"Flutter Local Auth library")," provides the means to authenticate on devices supporting fingerprint or facial recognition authentication.\nFinally, for ",(0,n.kt)("strong",{parentName:"p"},"OTP via Yubicloud"),": Yubico OTP is a simple yet strong authentication mechanism that is supported by all ",(0,n.kt)("strong",{parentName:"p"},"YubiKeys")," out of the box. Yubico OTP can be used as the second factor in a 2-factor authentication scheme or on its own, providing 1-factor authentication. ",(0,n.kt)("a",{parentName:"p",href:"https://www.yubico.com/products/yubicloud/"},"YubiCloud")," is the name of Yubico\u2019s web service for verifying OTPs. Before using YubiCloud, you need to get an API key from ",(0,n.kt)("a",{parentName:"p",href:"https://upgrade.yubico.com/getapikey/"},"here")," -\u2009it is quick, free and helps us in preventing misuse of YubiCloud. "),(0,n.kt)("h2",{id:"data-store"},"Data store"),(0,n.kt)("p",null,"Archethic Wallet stores a set of information so that the application is functional in both online and offline mode."),(0,n.kt)("p",null,"The first group of information represents the globally available user preferences:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"First Launch"),": Allows to know if this is the first launch of the application in order to clear the keystore for iOS. Indeed, iOS key store is persistent, so if this is first launch then we will clear the keystore."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Authentification Method"),": Allows to know which authentication mode is used (PIN, password, YubiKey, biometrics)."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Currency"),": Allows you to know what currency is used in the application."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Language"),": Allows you to know which language is used in the application."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Primary Setting"),": Allows to know if the currency displayed in priority is Fiat or Crypto."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Network"),": Allows to know if the wallet is connected to mainnet, testnet or to a local node whose endpoint is recorded in the following information."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Network Endpoint"),": Allows to know the address of the local node."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Theme"),": Allows to know which theme is used in the application."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Lock"),": Allows to know if it is necessary to authenticate at the launching of the application."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Lock Timeout"),": Allows to know after how long the application requires authentication at its launch if the user has left the application open to browse for another one for example."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Auto Lock Date"),": Contains the timestamp of the last autolock."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Pin Pad Shuffle"),": Allows you to determine whether the PIN code keyboard should be shuffled when entering."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Show Balances"),": Allows you to determine if the financial information should be displayed."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Show Blog"),": Allows you to know which blog articles should be displayed."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Show Price Chart"),": Allows you to determine whether the graph and indicators of the UCO price chart should be displayed."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Price Chart Scale"),": Current scale of the price chart."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Active Vibrations"),": Allows to know if at each action, a small vibration is emitted on the mobiles."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Active Notifications"),": Allows to know if the notifications of reception of UCO are active or not."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Active RPC Server"),": Allows DApps connect to the wallet to get informations or send/sign transactions."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Language Seed"),": Allows to know if the seed phrase is composed of French or English words."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Version"),": Current version of the wallet app installed."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Main Screen Current Page"),": Current page selected on the main screen.")),(0,n.kt)("p",null,"The second group of information represents the sensitive elements related to security:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Seed"),": Allows to store the wallet seed needed to perform transactions on the Archethic blockchain."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"PIN"),": Allows to store the PIN code in case this authentication method has been chosen."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Password"),": Allows to keep the password in case this authentication method has been chosen."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Yubicloud ID and API Key"),": Allows to keep the authentication information for the management of the OTP with the YubiKey in case this authentication method has been chosen.\nThis information is stored securely."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Keychain secured informations"),": Keychain's informations like keychain's seed, keychain's version and the associated list of services."),(0,n.kt)("li",{parentName:"ul"},"And finally, ",(0,n.kt)("strong",{parentName:"li"},"a secure 256-bit (32 bytes) encryption key")," to secure data on the disk.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Remember that Archethic will never pass on your data to a third party or use your data in any other way than that offered by the application")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"In the case of user preference data"),", we made the choice to store it in a local database ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/packages/hive"},"Hive")," rather than the Flutter object ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/packages/shared_preferences"},"SharedPreferences")," for performance reasons. All the information is available in this ",(0,n.kt)("a",{parentName:"p",href:"https://medium.com/flutter-community/using-hive-instead-of-sharedpreferences-for-storing-preferences-2d98c9db930f"},"medium article"),".\nThese data are stored in clear text because they are not sensitive."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"On the other hand, the information related to security management must be protected.")," Here again, Hive is used but the stored values are encrypted. Hive provides a helper function to generate a secure encryption key using the ",(0,n.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Fortuna_%28PRNG%29"},"Fortuna")," random number generator.\nThe key is stored base64 encoded in a secure space via the ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/packages/flutter_secure_storage"},"FlutterSecureStorage library"),"."),(0,n.kt)("h2",{id:"interactions-with-the-archethic-blockchain"},"Interactions with the Archethic blockchain"),(0,n.kt)("p",null,"Based on the Archethic JS SDK, ",(0,n.kt)("a",{parentName:"p",href:"/build/sdk/dart"},(0,n.kt)("strong",{parentName:"a"},"a SDK has been developed in dart"))," and is maintained by the Archethic teams in order to offer internal or community-developed Flutter DApps to interact with the Archethic Blockchain."),(0,n.kt)("p",null,"This open-source SDK ",(0,n.kt)("strong",{parentName:"p"},'"archethic_lib_dart"'),", available on ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/libdart"},"GitHub"),", can be added as dependencies in Dart or Flutter projects via the Flutter libraries and packages sharing site ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/"},"Pub.dev"),"."),(0,n.kt)("h2",{id:"setup"},"Setup"),(0,n.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Flutter 3.10+"),(0,n.kt)("li",{parentName:"ul"},"Dart 3.0+")),(0,n.kt)("h3",{id:"instructions"},"Instructions"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Download the ",(0,n.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/archethic-wallet"},"repo")," into a folder"),(0,n.kt)("li",{parentName:"ul"},"Goto the folder and from terminal run ",(0,n.kt)("inlineCode",{parentName:"li"},"flutter pub get")," to get the packages"),(0,n.kt)("li",{parentName:"ul"},"Once packages are installed ",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"You can build and run the program for emulator from VSCode Flutter SDK Tools"),(0,n.kt)("li",{parentName:"ul"},"You can build for android emulator if already installed."))),(0,n.kt)("li",{parentName:"ul"},"Once the packages and installed and application is built"),(0,n.kt)("li",{parentName:"ul"},"Run the program with ",(0,n.kt)("inlineCode",{parentName:"li"},"flutter run"))))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/7746a795.c8dc238a.js b/assets/js/7746a795.c8dc238a.js deleted file mode 100644 index a3212598d..000000000 --- a/assets/js/7746a795.c8dc238a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5935],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>m});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),c=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(a),d=n,m=p["".concat(s,".").concat(d)]||p[d]||h[d]||i;return a?r.createElement(m,o(o({ref:t},u),{},{components:a})):r.createElement(m,o({ref:t},u))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,o[1]=l;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=a(87462),n=(a(67294),a(3905));a(8209);const i={id:"archethic-wallet",title:"Archethic Wallet"},o=void 0,l={unversionedId:"participate/wallet/archethic-wallet",id:"participate/wallet/archethic-wallet",title:"Archethic Wallet",description:"Archethic has developed a fully decentralized and non-custodial cryptocurrency hot wallet that enables users to safely manage assets on Layer 1 Archethic blockchain.",source:"@site/docs/participate/wallet/README.md",sourceDirName:"participate/wallet",slug:"/participate/wallet/",permalink:"/participate/wallet/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"archethic-wallet",title:"Archethic Wallet"},sidebar:"docs",previous:{title:"aeSwap",permalink:"/participate/dex/usage/aeSwap"},next:{title:"Communication with DApps",permalink:"/participate/wallet/dapps-communication"}},s={},c=[{value:"Features",id:"features",level:2},{value:"Framework",id:"framework",level:2},{value:"Seed",id:"seed",level:2},{value:"Securing the application",id:"securing-the-application",level:2},{value:"Data store",id:"data-store",level:2},{value:"Interactions with the Archethic blockchain",id:"interactions-with-the-archethic-blockchain",level:2},{value:"Setup",id:"setup",level:2},{value:"Pre-requisites",id:"pre-requisites",level:3},{value:"Instructions",id:"instructions",level:3}],u={toc:c},p="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(p,(0,r.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Archethic has developed a fully decentralized and non-custodial cryptocurrency hot wallet that enables users to safely manage assets on Layer 1 Archethic blockchain.")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"No signup or KYC needed, users just control their services and access keychain, protected by different secure access methods like PIN Code, Password, YubiKey like devices and Biometrics.")),(0,n.kt)("h2",{id:"features"},"Features"),(0,n.kt)("p",null,"Archethic Wallet has implemented the following features:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Main features",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Decentralized keychain management"),(0,n.kt)("li",{parentName:"ul"},"Multiple accounts' management"),(0,n.kt)("li",{parentName:"ul"},"Creation of Fungible Tokens"),(0,n.kt)("li",{parentName:"ul"},"Creation of NFTs"),(0,n.kt)("li",{parentName:"ul"},"Support for transactions (Sending and Receiving UCO Token, Fungible Tokens and NFTs)"),(0,n.kt)("li",{parentName:"ul"},"List of recent transactions"),(0,n.kt)("li",{parentName:"ul"},"List of acquired tokens"))),(0,n.kt)("li",{parentName:"ul"},"Security",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Security access with Password, PIN, Yubicloud OTP, Face ID, Touch ID, Uniris Biometrics (2023)"),(0,n.kt)("li",{parentName:"ul"},"Use of 24 Words Mnemonics"))),(0,n.kt)("li",{parentName:"ul"},"Customization",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Support for English and French Language"),(0,n.kt)("li",{parentName:"ul"},"Support for multiple Currencies (view only, not meant as multiple cryptocurrencies wallet)"),(0,n.kt)("li",{parentName:"ul"},"Multi themes (9 themes available)"),(0,n.kt)("li",{parentName:"ul"},"UI customization"))),(0,n.kt)("li",{parentName:"ul"},"Other features",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Local notifications"),(0,n.kt)("li",{parentName:"ul"},"Access to exchanges to buy ERC20 UCO"),(0,n.kt)("li",{parentName:"ul"},"Share address with QR Code or mobile share feature"),(0,n.kt)("li",{parentName:"ul"},"Address book"),(0,n.kt)("li",{parentName:"ul"},"UCO Price chart"),(0,n.kt)("li",{parentName:"ul"},"Access latest Archethic blog articles")))),(0,n.kt)("h2",{id:"framework"},"Framework"),(0,n.kt)("p",null,"Archethic developed the wallet using Flutter based on Dart language.\nFlutter is an open-source mobile application development framework from Google. The main reason for its popularity is that it supports the creation of cross-platform applications. Flutter is also used to create interactive apps that run on web pages or on the desktop."),(0,n.kt)("p",null,"Here are some of Flutter's features*"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Single code base for Android, iOS, Windows, Linux, macOS, Web, Extension"),": This approach simplifies and reduces the development time, cost, and maintenance is also an easy task. The Flutter-based user interface can be installed virtually on any platform. It has its own rendering engine that allows developers to keep the UI as it is while moving to another platform. As a result, application users can enjoy an excellent native-like experience on various platforms."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Open-source and made by Google"),": Flutter is a popular choice among developers because of the huge community support. Google designed the Flutter framework with all the security issues of modern applications in mind. One can find reliable and well-tested plugins in Flutter to mitigate security risks such as user authentication flaws, malicious code injections and data leaks."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Dart Programming"),": Flutter uses an easy to learn and implement programming language called Dart, which is Google's general purpose programming language."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Performance"),": As a cross-platform framework, Flutter offers unmatched performance compared to its competitors. Flutter compiles designs to native code. Unlike React Native, Flutter renders widgets directly from the native library rather than downloading libraries and components to the device before rendering.")),(0,n.kt)("p",null,(0,n.kt)("em",{parentName:"p"},"Source: ",(0,n.kt)("a",{parentName:"em",href:"https://mobiskill.fr/blog/conseils-emploi-tech/pourquoi-utiliser-flutter-en-2022/"},"https://mobiskill.fr/blog/conseils-emploi-tech/pourquoi-utiliser-flutter-en-2022/"))),(0,n.kt)("h2",{id:"seed"},"Seed"),(0,n.kt)("p",null,"When the wallet is created, a seed is randomly created from a cryptographically secure random number generator provided by Dart."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-dart"}," static String generateSeed() {\n String result = '';\n const String chars = 'abcdef0123456789';\n final Random rng = Random.secure();\n for (int i = 0; i < 64; i++) {\n result += chars[rng.nextInt(chars.length)];\n }\n return result.toUpperCase();\n }\n")),(0,n.kt)("p",null,"In order to make the seed more accessible, BIP39 is used and aims to provide a method of simplifying the reading of the seed using a series of mnemonic words. BIP39 takes random words (usually from the English language, although they can be from another language) and creates a long phrase with them, usually 12 to 24 words. In the case of the Archethic wallet, we use 24 words because the higher the number of words, the greater the entropy and security attributable to the resulting sentence. These words are chosen from a dictionary of 2048 words. The flutter library bip39_mnemonic is thus used with English and French dictionaries."),(0,n.kt)("p",null,"In the case of wallet restoration, the library bip39_mnemonic allows to find the seed from the seed phrase."),(0,n.kt)("h2",{id:"securing-the-application"},"Securing the application"),(0,n.kt)("p",null,"Access to the application and interactions with the blockchain are secured so that certain actions are not done beyond the user's control.\nFollowing are the ways to access:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"by ",(0,n.kt)("strong",{parentName:"li"},"PIN code"),", comprising of 6 digits, with the possibility to mix the numbers of the keyboard to reduce the risks of access to your code by observation,"),(0,n.kt)("li",{parentName:"ul"},"by ",(0,n.kt)("strong",{parentName:"li"},"password"),","),(0,n.kt)("li",{parentName:"ul"},"by using a ",(0,n.kt)("strong",{parentName:"li"},"YubiKey"),", it is an electronic authentication device to secure your access. Whether you are using NFC with your mobile or USB on your desktop, you can identify yourself with this key,"),(0,n.kt)("li",{parentName:"ul"},"by the ",(0,n.kt)("strong",{parentName:"li"},"touch ID or face ID system"),", depending on your device capabilities.")),(0,n.kt)("p",null,"In the case of ",(0,n.kt)("strong",{parentName:"p"},"PIN")," and ",(0,n.kt)("strong",{parentName:"p"},"password"),', authentication information is stored locally (see "What data is stored in my device?").\nIn the case of ',(0,n.kt)("strong",{parentName:"p"},"touch ID or Face ID"),", the ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/packages/local_auth"},"Flutter Local Auth library")," provides the means to authenticate on devices supporting fingerprint or facial recognition authentication.\nFinally, for ",(0,n.kt)("strong",{parentName:"p"},"OTP via Yubicloud"),": Yubico OTP is a simple yet strong authentication mechanism that is supported by all ",(0,n.kt)("strong",{parentName:"p"},"YubiKeys")," out of the box. Yubico OTP can be used as the second factor in a 2-factor authentication scheme or on its own, providing 1-factor authentication. ",(0,n.kt)("a",{parentName:"p",href:"https://www.yubico.com/products/yubicloud/"},"YubiCloud")," is the name of Yubico\u2019s web service for verifying OTPs. Before using YubiCloud, you need to get an API key from ",(0,n.kt)("a",{parentName:"p",href:"https://upgrade.yubico.com/getapikey/"},"here")," -\u2009it is quick, free and helps us in preventing misuse of YubiCloud. "),(0,n.kt)("h2",{id:"data-store"},"Data store"),(0,n.kt)("p",null,"Archethic Wallet stores a set of information so that the application is functional in both online and offline mode."),(0,n.kt)("p",null,"The first group of information represents the globally available user preferences:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"First Launch"),": Allows to know if this is the first launch of the application in order to clear the keystore for iOS. Indeed, iOS key store is persistent, so if this is first launch then we will clear the keystore."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Authentification Method"),": Allows to know which authentication mode is used (PIN, password, YubiKey, biometrics)."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Currency"),": Allows you to know what currency is used in the application."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Language"),": Allows you to know which language is used in the application."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Primary Setting"),": Allows to know if the currency displayed in priority is Fiat or Crypto."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Network"),": Allows to know if the wallet is connected to mainnet, testnet or to a local node whose endpoint is recorded in the following information."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Network Endpoint"),": Allows to know the address of the local node."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Theme"),": Allows to know which theme is used in the application."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Lock"),": Allows to know if it is necessary to authenticate at the launching of the application."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Lock Timeout"),": Allows to know after how long the application requires authentication at its launch if the user has left the application open to browse for another one for example."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Auto Lock Date"),": Contains the timestamp of the last autolock."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Pin Pad Shuffle"),": Allows you to determine whether the PIN code keyboard should be shuffled when entering."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Show Balances"),": Allows you to determine if the financial information should be displayed."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Show Blog"),": Allows you to know which blog articles should be displayed."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Show Price Chart"),": Allows you to determine whether the graph and indicators of the UCO price chart should be displayed."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Price Chart Scale"),": Current scale of the price chart."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Active Vibrations"),": Allows to know if at each action, a small vibration is emitted on the mobiles."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Active Notifications"),": Allows to know if the notifications of reception of UCO are active or not."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Active RPC Server"),": Allows DApps connect to the wallet to get informations or send/sign transactions."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Language Seed"),": Allows to know if the seed phrase is composed of French or English words."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Current Version"),": Current version of the wallet app installed."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Main Screen Current Page"),": Current page selected on the main screen.")),(0,n.kt)("p",null,"The second group of information represents the sensitive elements related to security:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Seed"),": Allows to store the wallet seed needed to perform transactions on the Archethic blockchain."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"PIN"),": Allows to store the PIN code in case this authentication method has been chosen."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Password"),": Allows to keep the password in case this authentication method has been chosen."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Yubicloud ID and API Key"),": Allows to keep the authentication information for the management of the OTP with the YubiKey in case this authentication method has been chosen.\nThis information is stored securely."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Keychain secured informations"),": Keychain's informations like keychain's seed, keychain's version and the associated list of services."),(0,n.kt)("li",{parentName:"ul"},"And finally, ",(0,n.kt)("strong",{parentName:"li"},"a secure 256-bit (32 bytes) encryption key")," to secure data on the disk.")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"Remember that Archethic will never pass on your data to a third party or use your data in any other way than that offered by the application")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"In the case of user preference data"),", we made the choice to store it in a local database ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/packages/hive"},"Hive")," rather than the Flutter object ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/packages/shared_preferences"},"SharedPreferences")," for performance reasons. All the information is available in this ",(0,n.kt)("a",{parentName:"p",href:"https://medium.com/flutter-community/using-hive-instead-of-sharedpreferences-for-storing-preferences-2d98c9db930f"},"medium article"),".\nThese data are stored in clear text because they are not sensitive."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"On the other hand, the information related to security management must be protected.")," Here again, Hive is used but the stored values are encrypted. Hive provides a helper function to generate a secure encryption key using the ",(0,n.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Fortuna_%28PRNG%29"},"Fortuna")," random number generator.\nThe key is stored base64 encoded in a secure space via the ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/packages/flutter_secure_storage"},"FlutterSecureStorage library"),"."),(0,n.kt)("h2",{id:"interactions-with-the-archethic-blockchain"},"Interactions with the Archethic blockchain"),(0,n.kt)("p",null,"Based on the Archethic JS SDK, ",(0,n.kt)("a",{parentName:"p",href:"/build/sdk/dart"},(0,n.kt)("strong",{parentName:"a"},"a SDK has been developed in dart"))," and is maintained by the Archethic teams in order to offer internal or community-developed Flutter DApps to interact with the Archethic Blockchain."),(0,n.kt)("p",null,"This open-source SDK ",(0,n.kt)("strong",{parentName:"p"},'"archethic_lib_dart"'),", available on ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/libdart"},"GitHub"),", can be added as dependencies in Dart or Flutter projects via the Flutter libraries and packages sharing site ",(0,n.kt)("a",{parentName:"p",href:"https://pub.dev/"},"Pub.dev"),"."),(0,n.kt)("h2",{id:"setup"},"Setup"),(0,n.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Flutter 3.10+"),(0,n.kt)("li",{parentName:"ul"},"Dart 3.0+")),(0,n.kt)("h3",{id:"instructions"},"Instructions"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Download the ",(0,n.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/archethic-wallet"},"repo")," into a folder"),(0,n.kt)("li",{parentName:"ul"},"Goto the folder and from terminal run ",(0,n.kt)("inlineCode",{parentName:"li"},"flutter pub get")," to get the packages"),(0,n.kt)("li",{parentName:"ul"},"Once packages are installed ",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"You can build and run the program for emulator from VSCode Flutter SDK Tools"),(0,n.kt)("li",{parentName:"ul"},"You can build for android emulator if already installed."))),(0,n.kt)("li",{parentName:"ul"},"Once the packages and installed and application is built"),(0,n.kt)("li",{parentName:"ul"},"Run the program with ",(0,n.kt)("inlineCode",{parentName:"li"},"flutter run"))))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/7764509b.2ce1786f.js b/assets/js/7764509b.2ce1786f.js deleted file mode 100644 index bed8cc795..000000000 --- a/assets/js/7764509b.2ce1786f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1996],{3905:(e,a,t)=>{t.d(a,{Zo:()=>m,kt:()=>y});var n=t(67294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=n.createContext({}),s=function(e){var a=n.useContext(c),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},m=function(e){var a=s(e.components);return n.createElement(c.Provider,{value:a},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},p=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=s(t),p=r,y=d["".concat(c,".").concat(p)]||d[p]||u[p]||i;return t?n.createElement(y,o(o({ref:a},m),{},{components:t})):n.createElement(y,o({ref:a},m))}));function y(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=p;var l={};for(var c in a)hasOwnProperty.call(a,c)&&(l[c]=a[c]);l.originalType=e,l[d]="string"==typeof e?e:r,o[1]=l;for(var s=2;s{t.r(a),t.d(a,{Badge:()=>p,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>m});var n=t(87462),r=t(67294),i=t(3905);t(8209);const o={id:"beacon-chain-summary",title:"BeaconChainSummary",hide_table_of_contents:!1},l=void 0,c={unversionedId:"build/api/schema/objects/beacon-chain-summary",id:"build/api/schema/objects/beacon-chain-summary",title:"BeaconChainSummary",description:"[Beacon Chain Summary] represents the beacon chain aggregate for a certain date",source:"@site/docs/build/api/schema/objects/beacon-chain-summary.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/beacon-chain-summary",permalink:"/build/api/schema/objects/beacon-chain-summary",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"beacon-chain-summary",title:"BeaconChainSummary",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Balance",permalink:"/build/api/schema/objects/balance"},next:{title:"CrossValidationStamp",permalink:"/build/api/schema/objects/cross-validation-stamp"}},s={},m=[{value:"Fields",id:"fields",level:3},{value:'BeaconChainSummary.availabilityAddingTimeInt ',id:"code-style-fontweight-normal-beaconchainsummarybavailabilityaddingtimebcodeint-",level:4},{value:'BeaconChainSummary.p2pAvailabilitiesP2pAvailabilities ',id:"code-style-fontweight-normal-beaconchainsummarybp2pavailabilitiesbcodep2pavailabilities-",level:4},{value:'BeaconChainSummary.summaryTimeTimestamp ',id:"code-style-fontweight-normal-beaconchainsummarybsummarytimebcodetimestamp-",level:4},{value:'BeaconChainSummary.transactionSummaries[TransactionSummary] ',id:"code-style-fontweight-normal-beaconchainsummarybtransactionsummariesbcodetransactionsummary--",level:4},{value:'BeaconChainSummary.transactionSummaries.pagingOffsetNonNegInteger ',id:"code-style-fontweight-normal-beaconchainsummarytransactionsummariesbpagingoffsetbcodenonneginteger-",level:5},{value:'BeaconChainSummary.versionInt ',id:"code-style-fontweight-normal-beaconchainsummarybversionbcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3}],d=()=>(0,i.kt)(r.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,i.kt)(r.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),p=e=>(0,i.kt)(r.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:m,Bullet:d,SpecifiedBy:u,Badge:p},b="wrapper";function h(e){let{components:a,...t}=e;return(0,i.kt)(b,(0,n.Z)({},y,t,{components:a,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"[Beacon Chain Summary]"," represents the beacon chain aggregate for a certain date"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"type BeaconChainSummary {\n availabilityAddingTime: Int\n p2pAvailabilities: P2pAvailabilities\n summaryTime: Timestamp\n transactionSummaries(\n limit: PosInteger\n pagingOffset: NonNegInteger\n): [TransactionSummary]\n version: Int\n}\n")),(0,i.kt)("h3",{id:"fields"},"Fields"),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybavailabilityaddingtimebcodeint-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"availabilityAddingTime"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,i.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybp2pavailabilitiesbcodep2pavailabilities-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"p2pAvailabilities"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/p2-p-availabilities"},(0,i.kt)("inlineCode",{parentName:"a"},"P2pAvailabilities"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybsummarytimebcodetimestamp-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"summaryTime"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,i.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybtransactionsummariesbcodetransactionsummary--"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"transactionSummaries"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"[TransactionSummary]"))," ",(0,i.kt)(p,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,i.kt)(p,{class:"secondary",text:"object",mdxType:"Badge"})),(0,i.kt)("blockquote",null,(0,i.kt)("h5",{parentName:"blockquote",id:"code-style-fontweight-normal-beaconchainsummarytransactionsummariesblimitbcodeposinteger-"},(0,i.kt)("a",{parentName:"h5",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.transactionSummaries.",(0,i.kt)("b",null,"limit"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h5",href:"/build/api/schema/scalars/pos-integer"},(0,i.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"}))),(0,i.kt)("h5",{id:"code-style-fontweight-normal-beaconchainsummarytransactionsummariesbpagingoffsetbcodenonneginteger-"},(0,i.kt)("a",{parentName:"h5",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.transactionSummaries.",(0,i.kt)("b",null,"pagingOffset"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h5",href:"/build/api/schema/scalars/non-neg-integer"},(0,i.kt)("inlineCode",{parentName:"a"},"NonNegInteger"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybversionbcodeint-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"version"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,i.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h3",{id:"returned-by"},"Returned by"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"beaconChainSummary"))," ",(0,i.kt)(p,{class:"secondary",text:"query",mdxType:"Badge"})))}h.isMDXComponent=!0},8209:(e,a,t)=>{t(67294)}}]); \ No newline at end of file diff --git a/assets/js/7764509b.a35c8053.js b/assets/js/7764509b.a35c8053.js new file mode 100644 index 000000000..d0070ee25 --- /dev/null +++ b/assets/js/7764509b.a35c8053.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1996],{3905:(e,a,t)=>{t.d(a,{Zo:()=>m,kt:()=>y});var n=t(67294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=n.createContext({}),s=function(e){var a=n.useContext(c),t=a;return e&&(t="function"==typeof e?e(a):o(o({},a),e)),t},m=function(e){var a=s(e.components);return n.createElement(c.Provider,{value:a},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},p=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=s(t),p=r,y=d["".concat(c,".").concat(p)]||d[p]||u[p]||i;return t?n.createElement(y,o(o({ref:a},m),{},{components:t})):n.createElement(y,o({ref:a},m))}));function y(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=p;var l={};for(var c in a)hasOwnProperty.call(a,c)&&(l[c]=a[c]);l.originalType=e,l[d]="string"==typeof e?e:r,o[1]=l;for(var s=2;s{t.r(a),t.d(a,{Badge:()=>p,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>m});var n=t(87462),r=t(67294),i=t(3905);t(8209);const o={id:"beacon-chain-summary",title:"BeaconChainSummary",hide_table_of_contents:!1},l=void 0,c={unversionedId:"build/api/schema/objects/beacon-chain-summary",id:"build/api/schema/objects/beacon-chain-summary",title:"BeaconChainSummary",description:"[Beacon Chain Summary] represents the beacon chain aggregate for a certain date",source:"@site/docs/build/api/schema/objects/beacon-chain-summary.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/beacon-chain-summary",permalink:"/build/api/schema/objects/beacon-chain-summary",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"beacon-chain-summary",title:"BeaconChainSummary",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Balance",permalink:"/build/api/schema/objects/balance"},next:{title:"CrossValidationStamp",permalink:"/build/api/schema/objects/cross-validation-stamp"}},s={},m=[{value:"Fields",id:"fields",level:3},{value:'BeaconChainSummary.availabilityAddingTimeInt ',id:"code-style-fontweight-normal-beaconchainsummarybavailabilityaddingtimebcodeint-",level:4},{value:'BeaconChainSummary.p2pAvailabilitiesP2pAvailabilities ',id:"code-style-fontweight-normal-beaconchainsummarybp2pavailabilitiesbcodep2pavailabilities-",level:4},{value:'BeaconChainSummary.summaryTimeTimestamp ',id:"code-style-fontweight-normal-beaconchainsummarybsummarytimebcodetimestamp-",level:4},{value:'BeaconChainSummary.transactionSummaries[TransactionSummary] ',id:"code-style-fontweight-normal-beaconchainsummarybtransactionsummariesbcodetransactionsummary--",level:4},{value:'BeaconChainSummary.transactionSummaries.pagingOffsetNonNegInteger ',id:"code-style-fontweight-normal-beaconchainsummarytransactionsummariesbpagingoffsetbcodenonneginteger-",level:5},{value:'BeaconChainSummary.versionInt ',id:"code-style-fontweight-normal-beaconchainsummarybversionbcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3}],d=()=>(0,i.kt)(r.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,i.kt)(r.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),p=e=>(0,i.kt)(r.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:m,Bullet:d,SpecifiedBy:u,Badge:p},b="wrapper";function h(e){let{components:a,...t}=e;return(0,i.kt)(b,(0,n.Z)({},y,t,{components:a,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"[Beacon Chain Summary]"," represents the beacon chain aggregate for a certain date"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"type BeaconChainSummary {\n availabilityAddingTime: Int\n p2pAvailabilities: P2pAvailabilities\n summaryTime: Timestamp\n transactionSummaries(\n limit: PosInteger\n pagingOffset: NonNegInteger\n): [TransactionSummary]\n version: Int\n}\n")),(0,i.kt)("h3",{id:"fields"},"Fields"),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybavailabilityaddingtimebcodeint-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"availabilityAddingTime"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,i.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybp2pavailabilitiesbcodep2pavailabilities-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"p2pAvailabilities"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/p2-p-availabilities"},(0,i.kt)("inlineCode",{parentName:"a"},"P2pAvailabilities"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybsummarytimebcodetimestamp-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"summaryTime"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,i.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybtransactionsummariesbcodetransactionsummary--"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"transactionSummaries"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"[TransactionSummary]"))," ",(0,i.kt)(p,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,i.kt)(p,{class:"secondary",text:"object",mdxType:"Badge"})),(0,i.kt)("blockquote",null,(0,i.kt)("h5",{parentName:"blockquote",id:"code-style-fontweight-normal-beaconchainsummarytransactionsummariesblimitbcodeposinteger-"},(0,i.kt)("a",{parentName:"h5",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.transactionSummaries.",(0,i.kt)("b",null,"limit"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h5",href:"/build/api/schema/scalars/pos-integer"},(0,i.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"}))),(0,i.kt)("h5",{id:"code-style-fontweight-normal-beaconchainsummarytransactionsummariesbpagingoffsetbcodenonneginteger-"},(0,i.kt)("a",{parentName:"h5",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.transactionSummaries.",(0,i.kt)("b",null,"pagingOffset"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h5",href:"/build/api/schema/scalars/non-neg-integer"},(0,i.kt)("inlineCode",{parentName:"a"},"NonNegInteger"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h4",{id:"code-style-fontweight-normal-beaconchainsummarybversionbcodeint-"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"BeaconChainSummary.",(0,i.kt)("b",null,"version"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,i.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,i.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null),(0,i.kt)("h3",{id:"returned-by"},"Returned by"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"beaconChainSummary"))," ",(0,i.kt)(p,{class:"secondary",text:"query",mdxType:"Badge"})))}h.isMDXComponent=!0},8209:(e,a,t)=>{t(67294)}}]); \ No newline at end of file diff --git a/assets/js/777b0dfa.e43744bf.js b/assets/js/777b0dfa.d38c8799.js similarity index 53% rename from assets/js/777b0dfa.e43744bf.js rename to assets/js/777b0dfa.d38c8799.js index bff7b1ad0..5cb9bea86 100644 --- a/assets/js/777b0dfa.e43744bf.js +++ b/assets/js/777b0dfa.d38c8799.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7849],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,c=d(e,["components","mdxType","originalType","parentName"]),p=s(n),y=i,h=p["".concat(l,".").concat(y)]||p[y]||u[y]||a;return n?r.createElement(h,o(o({ref:t},c),{},{components:n})):r.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=y;var d={};for(var l in t)hasOwnProperty.call(t,l)&&(d[l]=t[l]);d.originalType=e,d[p]="string"==typeof e?e:i,o[1]=d;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>s});var r=n(87462),i=(n(67294),n(3905));n(8209);const a={id:"decentralized-id",title:"Decentralized Identity"},o=void 0,d={unversionedId:"learn/decentralized-id/decentralized-id",id:"learn/decentralized-id/decentralized-id",title:"Decentralized Identity",description:"Identity",source:"@site/docs/learn/decentralized-id/README.md",sourceDirName:"learn/decentralized-id",slug:"/learn/decentralized-id/",permalink:"/learn/decentralized-id/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"decentralized-id",title:"Decentralized Identity"},sidebar:"docs",previous:{title:"Hardware Root of Trust",permalink:"/learn/cryptography/hardware-root-of-trust"},next:{title:"Keychain",permalink:"/learn/decentralized-id/keychain"}},l={},s=[{value:"Identity",id:"identity",level:2},{value:"Password-less",id:"password-less",level:2}],c={toc:s},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"identity"},"Identity"),(0,i.kt)("p",null,"Archethic was designed mainly to resolve one big issue that we are facing right now in the technology: provide an secure and easy way to identify ourselves."),(0,i.kt)("p",null,"Decentralized identity avoids the need of entrusting one's identity to a third party, who might find itself in a conflict of interest and exploit our identity without our knowledge.\nThis person retains sole control of his/her identity, which is stored on a multitude of nodes ensuring its durability and integrity."),(0,i.kt)("p",null,"Hence Archethic's decentralized identity is brought by the Archethic transaction chain which enables authorization, end to end encryption and upgradability in the decentralized network."),(0,i.kt)("p",null,"The identity is or will be compatible and interoperable with others standard in the industry such as W3C DID, FIDO2, WebAuthn, etc."),(0,i.kt)("h2",{id:"password-less"},"Password-less"),(0,i.kt)("p",null,"While digital identity is being standardized, we also designed a new way to connect and access this identy: password-less authentication."),(0,i.kt)("p",null,"Embedded in the blockchain, on-chain wallet access allows anyone to identify themselves using several methods: biometric, hardware (usb, ledger), or event password. (We don't want to prevent passphrase to being use, just keep it as the lowest secure authentication method)."),(0,i.kt)("p",null,"For this reason we have created a ",(0,i.kt)("a",{parentName:"p",href:"/learn/decentralized-id/keychain"},"Keychain"),", a new way to access our private keys for several services easily."),(0,i.kt)("p",null,"The idea of an on-chain wallet, end to end encrypted wallet, makes the password-less possible in a near future."))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7849],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,c=d(e,["components","mdxType","originalType","parentName"]),p=s(n),y=i,h=p["".concat(l,".").concat(y)]||p[y]||u[y]||a;return n?r.createElement(h,o(o({ref:t},c),{},{components:n})):r.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=y;var d={};for(var l in t)hasOwnProperty.call(t,l)&&(d[l]=t[l]);d.originalType=e,d[p]="string"==typeof e?e:i,o[1]=d;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>s});var r=n(87462),i=(n(67294),n(3905));n(8209);const a={id:"decentralized-id",title:"Decentralized Identity"},o=void 0,d={unversionedId:"learn/decentralized-id/decentralized-id",id:"learn/decentralized-id/decentralized-id",title:"Decentralized Identity",description:"Identity",source:"@site/docs/learn/decentralized-id/README.md",sourceDirName:"learn/decentralized-id",slug:"/learn/decentralized-id/",permalink:"/learn/decentralized-id/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"decentralized-id",title:"Decentralized Identity"},sidebar:"docs",previous:{title:"Hardware Root of Trust",permalink:"/learn/cryptography/hardware-root-of-trust"},next:{title:"Keychain",permalink:"/learn/decentralized-id/keychain"}},l={},s=[{value:"Identity",id:"identity",level:2},{value:"Password-less",id:"password-less",level:2}],c={toc:s},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"identity"},"Identity"),(0,i.kt)("p",null,"Archethic was designed mainly to resolve one big issue that we are facing right now in the technology: provide an secure and easy way to identify ourselves."),(0,i.kt)("p",null,"Decentralized identity avoids the need of entrusting one's identity to a third party, who might find itself in a conflict of interest and exploit our identity without our knowledge.\nThis person retains sole control of his/her identity, which is stored on a multitude of nodes ensuring its durability and integrity."),(0,i.kt)("p",null,"Hence Archethic's decentralized identity is brought by the Archethic transaction chain which enables authorization, end to end encryption and upgradability in the decentralized network."),(0,i.kt)("p",null,"The identity is or will be compatible and interoperable with others standard in the industry such as W3C DID, FIDO2, WebAuthn, etc."),(0,i.kt)("h2",{id:"password-less"},"Password-less"),(0,i.kt)("p",null,"While digital identity is being standardized, we also designed a new way to connect and access this identy: password-less authentication."),(0,i.kt)("p",null,"Embedded in the blockchain, on-chain wallet access allows anyone to identify themselves using several methods: biometric, hardware (usb, ledger), or event password. (We don't want to prevent passphrase to being use, just keep it as the lowest secure authentication method)."),(0,i.kt)("p",null,"For this reason we have created a ",(0,i.kt)("a",{parentName:"p",href:"/learn/decentralized-id/keychain"},"Keychain"),", a new way to access our private keys for several services easily."),(0,i.kt)("p",null,"The idea of an on-chain wallet, end to end encrypted wallet, makes the password-less possible in a near future."))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/79891879.57b5c40f.js b/assets/js/79891879.8b3bc09b.js similarity index 54% rename from assets/js/79891879.57b5c40f.js rename to assets/js/79891879.8b3bc09b.js index 7f4426b60..569138f00 100644 --- a/assets/js/79891879.57b5c40f.js +++ b/assets/js/79891879.8b3bc09b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1260],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>h});var o=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=o.createContext({}),c=function(e){var t=o.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},d="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,l=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),d=c(r),u=n,h=d["".concat(l,".").concat(u)]||d[u]||y[u]||a;return r?o.createElement(h,i(i({ref:t},s),{},{components:r})):o.createElement(h,i({ref:t},s))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=u;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[d]="string"==typeof e?e:n,i[1]=p;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>y,frontMatter:()=>a,metadata:()=>p,toc:()=>c});var o=r(87462),n=(r(67294),r(3905));r(8209);const a={id:"cryptography",title:"Cryptography"},i=void 0,p={unversionedId:"build/core/cryptography/cryptography",id:"build/core/cryptography/cryptography",title:"Cryptography",description:"Node cryptography is maintains through keystores",source:"@site/docs/build/core/cryptography/README.md",sourceDirName:"build/core/cryptography",slug:"/build/core/cryptography/",permalink:"/build/core/cryptography/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"cryptography",title:"Cryptography"},sidebar:"docs",previous:{title:"Bootstrap",permalink:"/build/core/bootstrap"},next:{title:"TPM Implementation",permalink:"/build/core/cryptography/tpm"}},l={},c=[{value:"Node Keystore",id:"node-keystore",level:2},{value:"Node Shared Secrets Keystore",id:"node-shared-secrets-keystore",level:2}],s={toc:c},d="wrapper";function y(e){let{components:t,...r}=e;return(0,n.kt)(d,(0,o.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Node cryptography is maintains through keystores"),(0,n.kt)("h2",{id:"node-keystore"},"Node Keystore"),(0,n.kt)("p",null,"Node cryptography is maintain through keystore which stores the transaction index and reference to the public keys."),(0,n.kt)("p",null,"A behavior is defined to be able swap and test easily implementations."),(0,n.kt)("p",null,"There are several implementations of the node keystore:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Software implementation (used in dev mode and testnet)"),(0,n.kt)("li",{parentName:"ul"},"Hardware implementation",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/build/core/cryptography/tpm"},"TPM")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/build/core/cryptography/yubikey"},"Yubikey"))))),(0,n.kt)("p",null,"More details here: ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/crypto/keystore/node.ex"},"Node keystore")),(0,n.kt)("h2",{id:"node-shared-secrets-keystore"},"Node Shared Secrets Keystore"),(0,n.kt)("p",null,"Along with node keystore, node shared secrets have their own keystore as it used to store secrets as daily nonce, storage nonce and provide the API to leverage them for transaction validation, election algorithm, etc.."),(0,n.kt)("p",null,"A behavior is also provided to be able to swap implementations. Right now only the software implementation is supported."),(0,n.kt)("p",null,"More details here: ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/crypto/keystore/shared_secrets.ex"},"Shared Secrets keystore")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1260],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>h});var o=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=o.createContext({}),c=function(e){var t=o.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},d="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,l=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),d=c(r),u=n,h=d["".concat(l,".").concat(u)]||d[u]||y[u]||a;return r?o.createElement(h,i(i({ref:t},s),{},{components:r})):o.createElement(h,i({ref:t},s))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=u;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[d]="string"==typeof e?e:n,i[1]=p;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>y,frontMatter:()=>a,metadata:()=>p,toc:()=>c});var o=r(87462),n=(r(67294),r(3905));r(8209);const a={id:"cryptography",title:"Cryptography"},i=void 0,p={unversionedId:"build/core/cryptography/cryptography",id:"build/core/cryptography/cryptography",title:"Cryptography",description:"Node cryptography is maintains through keystores",source:"@site/docs/build/core/cryptography/README.md",sourceDirName:"build/core/cryptography",slug:"/build/core/cryptography/",permalink:"/build/core/cryptography/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"cryptography",title:"Cryptography"},sidebar:"docs",previous:{title:"Bootstrap",permalink:"/build/core/bootstrap"},next:{title:"TPM Implementation",permalink:"/build/core/cryptography/tpm"}},l={},c=[{value:"Node Keystore",id:"node-keystore",level:2},{value:"Node Shared Secrets Keystore",id:"node-shared-secrets-keystore",level:2}],s={toc:c},d="wrapper";function y(e){let{components:t,...r}=e;return(0,n.kt)(d,(0,o.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Node cryptography is maintains through keystores"),(0,n.kt)("h2",{id:"node-keystore"},"Node Keystore"),(0,n.kt)("p",null,"Node cryptography is maintain through keystore which stores the transaction index and reference to the public keys."),(0,n.kt)("p",null,"A behavior is defined to be able swap and test easily implementations."),(0,n.kt)("p",null,"There are several implementations of the node keystore:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Software implementation (used in dev mode and testnet)"),(0,n.kt)("li",{parentName:"ul"},"Hardware implementation",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/build/core/cryptography/tpm"},"TPM")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/build/core/cryptography/yubikey"},"Yubikey"))))),(0,n.kt)("p",null,"More details here: ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/crypto/keystore/node.ex"},"Node keystore")),(0,n.kt)("h2",{id:"node-shared-secrets-keystore"},"Node Shared Secrets Keystore"),(0,n.kt)("p",null,"Along with node keystore, node shared secrets have their own keystore as it used to store secrets as daily nonce, storage nonce and provide the API to leverage them for transaction validation, election algorithm, etc.."),(0,n.kt)("p",null,"A behavior is also provided to be able to swap implementations. Right now only the software implementation is supported."),(0,n.kt)("p",null,"More details here: ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/crypto/keystore/shared_secrets.ex"},"Shared Secrets keystore")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/7bfcff53.3a2b0ab4.js b/assets/js/7bfcff53.f456b3ae.js similarity index 56% rename from assets/js/7bfcff53.3a2b0ab4.js rename to assets/js/7bfcff53.f456b3ae.js index bfd872272..21a958cea 100644 --- a/assets/js/7bfcff53.3a2b0ab4.js +++ b/assets/js/7bfcff53.f456b3ae.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3592],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),u=a,h=d["".concat(l,".").concat(u)]||d[u]||f[u]||i;return n?r.createElement(h,o(o({ref:t},p),{},{components:n})):r.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:a,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"self-repair",title:"Self Repair"},o=void 0,s={unversionedId:"learn/p2p/self-repair",id:"learn/p2p/self-repair",title:"Self Repair",description:"Archethic Blockchain is using a self-repair mechanism to be able to sync/re-sync missing transactions to be able",source:"@site/docs/learn/p2p/self-repair.md",sourceDirName:"learn/p2p",slug:"/learn/p2p/self-repair",permalink:"/learn/p2p/self-repair",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"self-repair",title:"Self Repair"},sidebar:"docs",previous:{title:"Bootstrapping",permalink:"/learn/p2p/bootstrapping"},next:{title:"Sharding",permalink:"/learn/sharding/"}},l={},c=[{value:"Identification",id:"identification",level:2},{value:"Synchronization",id:"synchronization",level:2}],p={toc:c},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic Blockchain is using a self-repair mechanism to be able to sync/re-sync missing transactions to be able\nto restore the state of a node."),(0,a.kt)("p",null,"Because Archethic is using a multidimensional sharding, a node needs to execute a self-repair on multiple occasions, to ensure data availability and security:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When the node bootstraps"),(0,a.kt)("li",{parentName:"ul"},"When a node goes offline"),(0,a.kt)("li",{parentName:"ul"},"When the code and heuristic algorithms changes")),(0,a.kt)("h2",{id:"identification"},"Identification"),(0,a.kt)("p",null,"To be able to determine which transactions are missing, for each cycle of repair, a date of last sync is persisted.\nTherefore, we can decide from this date, the list of missing BeaconChain transactions to sync. (Reminder: BeaconChain summaries transactions across the entire network each day)"),(0,a.kt)("p",null,"The Self-Repair will then request BeaconChain storage pools to get the missing transactions from those missing days"),(0,a.kt)("h2",{id:"synchronization"},"Synchronization"),(0,a.kt)("p",null,"Because we are using rotating election, nodes need to perform the ",(0,a.kt)("inlineCode",{parentName:"p"},"Storage Node Election")," to determine if they need to store this transaction."),(0,a.kt)("p",null,"In that case, we will get the list of existing storage nodes from the transaction's address to sync and request from the closest nodes the transaction to be replicated."),(0,a.kt)("p",null,"Once finalized, a new last date of sync is persisted for the next cycle."))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3592],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),u=a,h=d["".concat(l,".").concat(u)]||d[u]||f[u]||i;return n?r.createElement(h,o(o({ref:t},p),{},{components:n})):r.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:a,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"self-repair",title:"Self Repair"},o=void 0,s={unversionedId:"learn/p2p/self-repair",id:"learn/p2p/self-repair",title:"Self Repair",description:"Archethic Blockchain is using a self-repair mechanism to be able to sync/re-sync missing transactions to be able",source:"@site/docs/learn/p2p/self-repair.md",sourceDirName:"learn/p2p",slug:"/learn/p2p/self-repair",permalink:"/learn/p2p/self-repair",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"self-repair",title:"Self Repair"},sidebar:"docs",previous:{title:"Bootstrapping",permalink:"/learn/p2p/bootstrapping"},next:{title:"Sharding",permalink:"/learn/sharding/"}},l={},c=[{value:"Identification",id:"identification",level:2},{value:"Synchronization",id:"synchronization",level:2}],p={toc:c},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic Blockchain is using a self-repair mechanism to be able to sync/re-sync missing transactions to be able\nto restore the state of a node."),(0,a.kt)("p",null,"Because Archethic is using a multidimensional sharding, a node needs to execute a self-repair on multiple occasions, to ensure data availability and security:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When the node bootstraps"),(0,a.kt)("li",{parentName:"ul"},"When a node goes offline"),(0,a.kt)("li",{parentName:"ul"},"When the code and heuristic algorithms changes")),(0,a.kt)("h2",{id:"identification"},"Identification"),(0,a.kt)("p",null,"To be able to determine which transactions are missing, for each cycle of repair, a date of last sync is persisted.\nTherefore, we can decide from this date, the list of missing BeaconChain transactions to sync. (Reminder: BeaconChain summaries transactions across the entire network each day)"),(0,a.kt)("p",null,"The Self-Repair will then request BeaconChain storage pools to get the missing transactions from those missing days"),(0,a.kt)("h2",{id:"synchronization"},"Synchronization"),(0,a.kt)("p",null,"Because we are using rotating election, nodes need to perform the ",(0,a.kt)("inlineCode",{parentName:"p"},"Storage Node Election")," to determine if they need to store this transaction."),(0,a.kt)("p",null,"In that case, we will get the list of existing storage nodes from the transaction's address to sync and request from the closest nodes the transaction to be replicated."),(0,a.kt)("p",null,"Once finalized, a new last date of sync is persisted for the next cycle."))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/7d24ac82.036847ce.js b/assets/js/7d24ac82.036847ce.js deleted file mode 100644 index 5d859319d..000000000 --- a/assets/js/7d24ac82.036847ce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6691],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>u});var i=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),d=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},h=function(e){var t=d(e.components);return i.createElement(l.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},y=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),p=d(n),y=a,u=p["".concat(l,".").concat(y)]||p[y]||c[y]||r;return n?i.createElement(u,o(o({ref:t},h),{},{components:n})):i.createElement(u,o({ref:t},h))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=y;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,o[1]=s;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>r,metadata:()=>s,toc:()=>d});var i=n(87462),a=(n(67294),n(3905));n(8209);const r={id:"tpm",title:"TPM Implementation"},o=void 0,s={unversionedId:"build/core/cryptography/tpm",id:"build/core/cryptography/tpm",title:"TPM Implementation",description:"This section explains the HRT TPM Library implementation.",source:"@site/docs/build/core/cryptography/tpm.md",sourceDirName:"build/core/cryptography",slug:"/build/core/cryptography/tpm",permalink:"/build/core/cryptography/tpm",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"tpm",title:"TPM Implementation"},sidebar:"docs",previous:{title:"Cryptography",permalink:"/build/core/cryptography/"},next:{title:"Yubikey implementation",permalink:"/build/core/cryptography/yubikey"}},l={},d=[{value:"Global Variables",id:"global-variables",level:2},{value:"void keyToASN():",id:"void-keytoasn",level:2},{value:"void signToASN(BYTE r, INT sizeR, BYTE s, INT sizeS, INT *asnSignSize)",id:"void-signtoasnbyte-r-int-sizer-byte-s-int-sizes-int-asnsignsize",level:2},{value:"void generatePublicKey(INT keyIndex)",id:"void-generatepublickeyint-keyindex",level:2},{value:"setRootKey()",id:"setrootkey",level:2},{value:"updateHandlesIndexes()",id:"updatehandlesindexes",level:2},{value:"initializeTPM(INT keyIndex):",id:"initializetpmint-keyindex",level:2},{value:"getKeyIndex():",id:"getkeyindex",level:2},{value:"setKeyIndex(INT keyIndex):",id:"setkeyindexint-keyindex",level:2},{value:"getPublicKey(INT keyIndex, INT *publicKeySize):",id:"getpublickeyint-keyindex-int-publickeysize",level:2},{value:"signECDSA(INT keyIndex, BYTE hashToSign, INT eccSignSize, bool increment):",id:"signecdsaint-keyindex-byte-hashtosign-int-eccsignsize-bool-increment",level:2},{value:"getECDHPoint(INT keyIndex, BYTE *euphemeralKey):",id:"getecdhpointint-keyindex-byte-euphemeralkey",level:2}],h={toc:d},p="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,i.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"This section explains the HRT TPM Library implementation. "),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Reference Files:\n",(0,a.kt)("a",{parentName:"p",href:"https://github.com/UNIRIS/tpm-core/blob/main/uniris-tpm.c"},"uniris-tpm.c"),"\n",(0,a.kt)("a",{parentName:"p",href:"https://github.com/UNIRIS/tpm-core/blob/main/uniris-tpm.h"},"uniris-tpm.h"))),(0,a.kt)("h2",{id:"global-variables"},"Global Variables"),(0,a.kt)("admonition",{type:"warning"},(0,a.kt)("p",{parentName:"admonition"},"The global variables are defined as static to maintain the static lifecycle of the global variable, to prevent data leak and external access of the variables.")),(0,a.kt)("h2",{id:"void-keytoasn"},"void keyToASN():"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"This function converts raw elliptical public key generated by TPM to ASN1 DER encoding. ")),(0,a.kt)("p",null,"TPM generated uncompressed public key does not include the curve information required for elliptic key cryptography. keyToASN() encodes the raw public key by appending curve information to it."),(0,a.kt)("p",null,"The ASN DER Public Key is an outer structure which contains 2 inner structures. First inner structure having key type and curve type and second inner structure containning the raw key. The structure containning public key is a header containing ","[0x00 0x04 x coordinate y coordinate]","."),(0,a.kt)("p",null,"The following structure is the format of ASN DER: "),(0,a.kt)("admonition",{type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"ASN DER Public Key = [ ","[ [keytype] [curvetype] ][publickey]"," ]")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Logic Flow:"),"\nThe function adds the headers squentially and then the raw x coordinate of public key and then the y coordinate finally the size is updated."),(0,a.kt)("h2",{id:"void-signtoasnbyte-r-int-sizer-byte-s-int-sizes-int-asnsignsize"},"void signToASN(BYTE ",(0,a.kt)("em",{parentName:"h2"},"r, INT sizeR, BYTE "),"s, INT sizeS, INT *asnSignSize)"),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Converts uncompressed signature values to ASN DER format.")),(0,a.kt)("p",null,"TPM generates the raw signature in form of integer values : R & S. signToASN() converts these raw values into ASN DER format. It first prepends the ASN sequence then checks the MSB of R . If it is 1 then it prepends a byte (0) to R otherwise it move on to increase the index pointed to the asn by the size of R.\nSimilarly, it does the above for S."),(0,a.kt)("h2",{id:"void-generatepublickeyint-keyindex"},"void generatePublicKey(INT keyIndex)"),(0,a.kt)("admonition",{type:"warning"},(0,a.kt)("p",{parentName:"admonition"},"Generates public key on the endorsement key hierarchy of TPM by taking one byte key index as input.")),(0,a.kt)("p",null,"Firstly, the template of the public key is defined in the inPublicECC which contains the endorsement key template such that certificate on the keys can be generated except modifying the endorsement key object attributes.\nThe inPublicECC structure defines the following sub-structure:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"publicArea : defines the attributes of the public key to be generated. For endorsement key the signing operation is restricted due to privacy concern, defined under this structure. In this case we are generating key in the endordement hierarchy by using the template of the endorsement key.")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"The object attributes of generating key are as follows:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'* TPMA_OBJECT_USERWITHAUTH: Signifies the approval of "USER" actions with associated with the public key with a password.\n* TPMA_OBJECT_ADMINWITHPOLICY: Signifies the Approval of "ADMIN" role actions with this object may only be done with a policy session.\n* TPMA_OBJECT_SIGN_ENCRYPT: For a symmetric cipher object, the private portion of the key be used to encrypt. For other objects, the private portion of the key can be used to sign.\n* TPMA_OBJECT_DECRYPT:The private portion of the key can be used to decrypt\n* TPMA_OBJECT_FIXEDTPM: Indicates that the hierarchy of the key genrated cannot be changed.\n* TPMA_OBJECT_FIXEDPARENT:Indicates that the parent of the object cannot be changed.\n* TPMA_OBJECT_SENSITIVEDATAORIGIN: Indicates that the sensitive data is generated by the TPM on the key generation except the authvalue.\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},".objectAttributes = (TPMA_OBJECT_USERWITHAUTH |\n TPMA_OBJECT_ADMINWITHPOLICY |\n TPMA_OBJECT_SIGN_ENCRYPT |\n TPMA_OBJECT_DECRYPT |\n TPMA_OBJECT_FIXEDTPM |\n TPMA_OBJECT_FIXEDPARENT |\n TPMA_OBJECT_SENSITIVEDATAORIGIN),\n\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Object attributes for generating under Endorsement key hierarchy:",(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},"TPMA_OBJECT_RESTRICTED: Key usage is restricted to manipulate structures of known format.")))),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Endorsement key has same template except that there is no SIGN_ENCRYPT FLAG in the object attribute.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},".objectAttributes = (TPMA_OBJECT_RESTRICTED |\n TPMA_OBJECT_ADMINWITHPOLICY |\n TPMA_OBJECT_DECRYPT |\n TPMA_OBJECT_FIXEDTPM |\n TPMA_OBJECT_FIXEDPARENT |\n TPMA_OBJECT_SENSITIVEDATAORIGIN),\n")),(0,a.kt)("ol",{start:2},(0,a.kt)("li",{parentName:"ol"},"authPolicy: this substructure contains a 32 byte buffer with values exactly same as endorsement key attributes. This parameter associates the generated key template to the TPM hence during certificate generation the CA is able to return the certificate for the public key generated under Endorsement key hierarchy.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},".authPolicy = {\n .size = 32,\n .buffer = {0x83, 0x71, 0x97, 0x67, 0x44, 0x84, 0xB3, 0xF8, 0x1A, 0x90, 0xCC,\n 0x8D, 0x46, 0xA5, 0xD7, 0x24, 0xFD, 0x52, 0xD7, 0x6E, 0x06, 0x52,\n 0x0B, 0x64, 0xF2, 0xA1, 0xDA, 0x1B, 0x33, 0x14, 0x69, 0xAA}},\n")),(0,a.kt)("ol",{start:4},(0,a.kt)("li",{parentName:"ol"},"parameters: In the parameter structure we define the algorithm to be used for private key cryptography and public key cryptography operations.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," .parameters.eccDetail = {.symmetric = {\n .algorithm = TPM2_ALG_AES,\n .keyBits.aes = 128,\n .mode.sym = TPM2_ALG_CFB,\n },\n .scheme = {.scheme = TPM2_ALG_NULL, .details = {.ecdsa = {.hashAlg = TPM2_ALG_SHA256}}},\n .curveID = TPM2_ECC_NIST_P256,\n .kdf = {.scheme = TPM2_ALG_NULL, .details = {}}},\n")),(0,a.kt)("p",null," After definning the template of the public key, a unique data is passed to each key in the unique structure of inPublicEC which is root key hash and key index. For the root key the root key hash is 0 and key index is 0. "),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},".unique.ecc = {.x = {.size = 32, .buffer = {0}}, .y = {.size = 32, .buffer = {0}}},\n")),(0,a.kt)("p",null,"The primary key is created by using Esys_CreatePrimary() function with the following parameters:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"ESYS_TR_RH_ENDORSEMENT: To generate key in the endorsement hierarchy6."),(0,a.kt)("li",{parentName:"ul"},"ESYS_TR_PASSWORD: indicates a password authorization"),(0,a.kt)("li",{parentName:"ul"},"inPublicECC: the public key template defined is passed.")),(0,a.kt)("p",null,"Finally the created key is converted to ASN DER format."),(0,a.kt)("h2",{id:"setrootkey"},"setRootKey()"),(0,a.kt)("admonition",{type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"Initializes root key by calling generatePublicKey(0) since 0 is the index of root key.")),(0,a.kt)("p",null,"It also sets the root key hash. It is calculated by concatenating the raw x and y part of the root key and then hashing it."),(0,a.kt)("p",null,"The rootkey hash is stored statically and is important for every new primary key generation since it is passed as parameter to the unique structure of inPublicEC.X part. The key index is passed as parameter to the inpublicEc.y."),(0,a.kt)("h2",{id:"updatehandlesindexes"},"updateHandlesIndexes()"),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Increments the current index value by 1 and also updates all the corresponding keys.")),(0,a.kt)("p",null,"Flushes the previous key handles index and points it to the nextKeyHandle then increments NEXT index by 1 to store it in the nextkeyindex. Then generates a new public key by sending nextkeyIndex as the parameter. Finally it assigns the currentKeyhandle to the nextkey handle ."),(0,a.kt)("h2",{id:"initializetpmint-keyindex"},"initializeTPM(INT keyIndex):"),(0,a.kt)("admonition",{type:"warning"},(0,a.kt)("p",{parentName:"admonition"},"Initializes TPM context by calling Esys_Initialize() function and sets the previous key handle and nextkey handle as null. Then it sets the root key and key index.")),(0,a.kt)("h2",{id:"getkeyindex"},"getKeyIndex():"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},'Returns previous key index because that is the "current" key index used for performing signature.')),(0,a.kt)("h2",{id:"setkeyindexint-keyindex"},"setKeyIndex(INT keyIndex):"),(0,a.kt)("admonition",{type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"Sets the previous key index (which is our current key) to the key index passed as parameter.")),(0,a.kt)("p",null,"Also sets keyIndex+1 as the nextKey index."),(0,a.kt)("p",null,"For the key generated at after first initialization it flushes the previous key handle and generates the key with keyIndex then points then populates the previous key handle with the current key handle value.\nNext it generates the public key with keyIndex+1 and stores it in the nextkey handle. "),(0,a.kt)("h2",{id:"getpublickeyint-keyindex-int-publickeysize"},"getPublicKey(INT keyIndex, INT *publicKeySize):"),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Returns the public key for the given index.")),(0,a.kt)("p",null,"Takes keyIndex and returns root key if the keyINDEX is 0, next key if the keyindex matches with the nextKey index, previous key if the keyINdex matches with the previous Key index. "),(0,a.kt)("p",null,"If it matches with none of these indexes, then it flushes the root key from the tpm (due to the limit of max 3 transient handles), generates the key for the corresponding keyIndex and copies it into temp key then flushes it from the TPM. Finally, it regenerates the root key and then returns temp key."),(0,a.kt)("h2",{id:"signecdsaint-keyindex-byte-hashtosign-int-eccsignsize-bool-increment"},"signECDSA(INT keyIndex, BYTE ",(0,a.kt)("em",{parentName:"h2"},"hashToSign, INT "),"eccSignSize, bool increment):"),(0,a.kt)("admonition",{type:"warning"},(0,a.kt)("p",{parentName:"admonition"},"Signs the given hash using the key referred by the key index.")),(0,a.kt)("p",null,"Converts the byte hash to TPM2B_hash object and then checks the key index . If it is root key or previous key then assigns it to the signing key handle otherwise; "),(0,a.kt)("p",null,"Sets the previous key index to the given keyindex by calling setkeyindex() function and assigns it to the signing handle. It signs the hash using Esys_Sign() function. Finally the signature is converted to ASN DER format which is returned by signECDSA()."),(0,a.kt)("h2",{id:"getecdhpointint-keyindex-byte-euphemeralkey"},"getECDHPoint(INT keyIndex, BYTE *euphemeralKey):"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Performs Elliptic Curve Diffe Hellmen Key Exchange using the private part of the key referred by the Key Index and public euphemeral key. Returns the derived shared secret uncompressed point.")),(0,a.kt)("p",null,"Takes the key index and checks whether it's previous key, next key or root key. If it's one of these then it assigns it to the ECDH key handle else it removes the root key and generates a new key for the given key index and use it in the ECDH handle. "),(0,a.kt)("p",null,"Next, it re-structures the euphemeral key with the format 04 x y and generates an ECDH point using the Esys_ECDH_ZGen() function and stores it 04 x y format in zPoint which is then returned by the function."))}c.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/7d24ac82.88e8314d.js b/assets/js/7d24ac82.88e8314d.js new file mode 100644 index 000000000..09f867f13 --- /dev/null +++ b/assets/js/7d24ac82.88e8314d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6691],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>u});var i=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),d=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},h=function(e){var t=d(e.components);return i.createElement(l.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},y=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),p=d(n),y=a,u=p["".concat(l,".").concat(y)]||p[y]||c[y]||r;return n?i.createElement(u,o(o({ref:t},h),{},{components:n})):i.createElement(u,o({ref:t},h))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=y;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,o[1]=s;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>r,metadata:()=>s,toc:()=>d});var i=n(87462),a=(n(67294),n(3905));n(8209);const r={id:"tpm",title:"TPM Implementation"},o=void 0,s={unversionedId:"build/core/cryptography/tpm",id:"build/core/cryptography/tpm",title:"TPM Implementation",description:"This section explains the HRT TPM Library implementation.",source:"@site/docs/build/core/cryptography/tpm.md",sourceDirName:"build/core/cryptography",slug:"/build/core/cryptography/tpm",permalink:"/build/core/cryptography/tpm",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"tpm",title:"TPM Implementation"},sidebar:"docs",previous:{title:"Cryptography",permalink:"/build/core/cryptography/"},next:{title:"Yubikey implementation",permalink:"/build/core/cryptography/yubikey"}},l={},d=[{value:"Global Variables",id:"global-variables",level:2},{value:"void keyToASN():",id:"void-keytoasn",level:2},{value:"void signToASN(BYTE r, INT sizeR, BYTE s, INT sizeS, INT *asnSignSize)",id:"void-signtoasnbyte-r-int-sizer-byte-s-int-sizes-int-asnsignsize",level:2},{value:"void generatePublicKey(INT keyIndex)",id:"void-generatepublickeyint-keyindex",level:2},{value:"setRootKey()",id:"setrootkey",level:2},{value:"updateHandlesIndexes()",id:"updatehandlesindexes",level:2},{value:"initializeTPM(INT keyIndex):",id:"initializetpmint-keyindex",level:2},{value:"getKeyIndex():",id:"getkeyindex",level:2},{value:"setKeyIndex(INT keyIndex):",id:"setkeyindexint-keyindex",level:2},{value:"getPublicKey(INT keyIndex, INT *publicKeySize):",id:"getpublickeyint-keyindex-int-publickeysize",level:2},{value:"signECDSA(INT keyIndex, BYTE hashToSign, INT eccSignSize, bool increment):",id:"signecdsaint-keyindex-byte-hashtosign-int-eccsignsize-bool-increment",level:2},{value:"getECDHPoint(INT keyIndex, BYTE *euphemeralKey):",id:"getecdhpointint-keyindex-byte-euphemeralkey",level:2}],h={toc:d},p="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,i.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"This section explains the HRT TPM Library implementation. "),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Reference Files:\n",(0,a.kt)("a",{parentName:"p",href:"https://github.com/UNIRIS/tpm-core/blob/main/uniris-tpm.c"},"uniris-tpm.c"),"\n",(0,a.kt)("a",{parentName:"p",href:"https://github.com/UNIRIS/tpm-core/blob/main/uniris-tpm.h"},"uniris-tpm.h"))),(0,a.kt)("h2",{id:"global-variables"},"Global Variables"),(0,a.kt)("admonition",{type:"warning"},(0,a.kt)("p",{parentName:"admonition"},"The global variables are defined as static to maintain the static lifecycle of the global variable, to prevent data leak and external access of the variables.")),(0,a.kt)("h2",{id:"void-keytoasn"},"void keyToASN():"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"This function converts raw elliptical public key generated by TPM to ASN1 DER encoding. ")),(0,a.kt)("p",null,"TPM generated uncompressed public key does not include the curve information required for elliptic key cryptography. keyToASN() encodes the raw public key by appending curve information to it."),(0,a.kt)("p",null,"The ASN DER Public Key is an outer structure which contains 2 inner structures. First inner structure having key type and curve type and second inner structure containning the raw key. The structure containning public key is a header containing ","[0x00 0x04 x coordinate y coordinate]","."),(0,a.kt)("p",null,"The following structure is the format of ASN DER: "),(0,a.kt)("admonition",{type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"ASN DER Public Key = [ ","[ [keytype] [curvetype] ][publickey]"," ]")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Logic Flow:"),"\nThe function adds the headers squentially and then the raw x coordinate of public key and then the y coordinate finally the size is updated."),(0,a.kt)("h2",{id:"void-signtoasnbyte-r-int-sizer-byte-s-int-sizes-int-asnsignsize"},"void signToASN(BYTE ",(0,a.kt)("em",{parentName:"h2"},"r, INT sizeR, BYTE "),"s, INT sizeS, INT *asnSignSize)"),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Converts uncompressed signature values to ASN DER format.")),(0,a.kt)("p",null,"TPM generates the raw signature in form of integer values : R & S. signToASN() converts these raw values into ASN DER format. It first prepends the ASN sequence then checks the MSB of R . If it is 1 then it prepends a byte (0) to R otherwise it move on to increase the index pointed to the asn by the size of R.\nSimilarly, it does the above for S."),(0,a.kt)("h2",{id:"void-generatepublickeyint-keyindex"},"void generatePublicKey(INT keyIndex)"),(0,a.kt)("admonition",{type:"warning"},(0,a.kt)("p",{parentName:"admonition"},"Generates public key on the endorsement key hierarchy of TPM by taking one byte key index as input.")),(0,a.kt)("p",null,"Firstly, the template of the public key is defined in the inPublicECC which contains the endorsement key template such that certificate on the keys can be generated except modifying the endorsement key object attributes.\nThe inPublicECC structure defines the following sub-structure:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"publicArea : defines the attributes of the public key to be generated. For endorsement key the signing operation is restricted due to privacy concern, defined under this structure. In this case we are generating key in the endordement hierarchy by using the template of the endorsement key.")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"The object attributes of generating key are as follows:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'* TPMA_OBJECT_USERWITHAUTH: Signifies the approval of "USER" actions with associated with the public key with a password.\n* TPMA_OBJECT_ADMINWITHPOLICY: Signifies the Approval of "ADMIN" role actions with this object may only be done with a policy session.\n* TPMA_OBJECT_SIGN_ENCRYPT: For a symmetric cipher object, the private portion of the key be used to encrypt. For other objects, the private portion of the key can be used to sign.\n* TPMA_OBJECT_DECRYPT:The private portion of the key can be used to decrypt\n* TPMA_OBJECT_FIXEDTPM: Indicates that the hierarchy of the key genrated cannot be changed.\n* TPMA_OBJECT_FIXEDPARENT:Indicates that the parent of the object cannot be changed.\n* TPMA_OBJECT_SENSITIVEDATAORIGIN: Indicates that the sensitive data is generated by the TPM on the key generation except the authvalue.\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},".objectAttributes = (TPMA_OBJECT_USERWITHAUTH |\n TPMA_OBJECT_ADMINWITHPOLICY |\n TPMA_OBJECT_SIGN_ENCRYPT |\n TPMA_OBJECT_DECRYPT |\n TPMA_OBJECT_FIXEDTPM |\n TPMA_OBJECT_FIXEDPARENT |\n TPMA_OBJECT_SENSITIVEDATAORIGIN),\n\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Object attributes for generating under Endorsement key hierarchy:",(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},"TPMA_OBJECT_RESTRICTED: Key usage is restricted to manipulate structures of known format.")))),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Endorsement key has same template except that there is no SIGN_ENCRYPT FLAG in the object attribute.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},".objectAttributes = (TPMA_OBJECT_RESTRICTED |\n TPMA_OBJECT_ADMINWITHPOLICY |\n TPMA_OBJECT_DECRYPT |\n TPMA_OBJECT_FIXEDTPM |\n TPMA_OBJECT_FIXEDPARENT |\n TPMA_OBJECT_SENSITIVEDATAORIGIN),\n")),(0,a.kt)("ol",{start:2},(0,a.kt)("li",{parentName:"ol"},"authPolicy: this substructure contains a 32 byte buffer with values exactly same as endorsement key attributes. This parameter associates the generated key template to the TPM hence during certificate generation the CA is able to return the certificate for the public key generated under Endorsement key hierarchy.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},".authPolicy = {\n .size = 32,\n .buffer = {0x83, 0x71, 0x97, 0x67, 0x44, 0x84, 0xB3, 0xF8, 0x1A, 0x90, 0xCC,\n 0x8D, 0x46, 0xA5, 0xD7, 0x24, 0xFD, 0x52, 0xD7, 0x6E, 0x06, 0x52,\n 0x0B, 0x64, 0xF2, 0xA1, 0xDA, 0x1B, 0x33, 0x14, 0x69, 0xAA}},\n")),(0,a.kt)("ol",{start:4},(0,a.kt)("li",{parentName:"ol"},"parameters: In the parameter structure we define the algorithm to be used for private key cryptography and public key cryptography operations.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," .parameters.eccDetail = {.symmetric = {\n .algorithm = TPM2_ALG_AES,\n .keyBits.aes = 128,\n .mode.sym = TPM2_ALG_CFB,\n },\n .scheme = {.scheme = TPM2_ALG_NULL, .details = {.ecdsa = {.hashAlg = TPM2_ALG_SHA256}}},\n .curveID = TPM2_ECC_NIST_P256,\n .kdf = {.scheme = TPM2_ALG_NULL, .details = {}}},\n")),(0,a.kt)("p",null," After definning the template of the public key, a unique data is passed to each key in the unique structure of inPublicEC which is root key hash and key index. For the root key the root key hash is 0 and key index is 0. "),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},".unique.ecc = {.x = {.size = 32, .buffer = {0}}, .y = {.size = 32, .buffer = {0}}},\n")),(0,a.kt)("p",null,"The primary key is created by using Esys_CreatePrimary() function with the following parameters:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"ESYS_TR_RH_ENDORSEMENT: To generate key in the endorsement hierarchy6."),(0,a.kt)("li",{parentName:"ul"},"ESYS_TR_PASSWORD: indicates a password authorization"),(0,a.kt)("li",{parentName:"ul"},"inPublicECC: the public key template defined is passed.")),(0,a.kt)("p",null,"Finally the created key is converted to ASN DER format."),(0,a.kt)("h2",{id:"setrootkey"},"setRootKey()"),(0,a.kt)("admonition",{type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"Initializes root key by calling generatePublicKey(0) since 0 is the index of root key.")),(0,a.kt)("p",null,"It also sets the root key hash. It is calculated by concatenating the raw x and y part of the root key and then hashing it."),(0,a.kt)("p",null,"The rootkey hash is stored statically and is important for every new primary key generation since it is passed as parameter to the unique structure of inPublicEC.X part. The key index is passed as parameter to the inpublicEc.y."),(0,a.kt)("h2",{id:"updatehandlesindexes"},"updateHandlesIndexes()"),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Increments the current index value by 1 and also updates all the corresponding keys.")),(0,a.kt)("p",null,"Flushes the previous key handles index and points it to the nextKeyHandle then increments NEXT index by 1 to store it in the nextkeyindex. Then generates a new public key by sending nextkeyIndex as the parameter. Finally it assigns the currentKeyhandle to the nextkey handle ."),(0,a.kt)("h2",{id:"initializetpmint-keyindex"},"initializeTPM(INT keyIndex):"),(0,a.kt)("admonition",{type:"warning"},(0,a.kt)("p",{parentName:"admonition"},"Initializes TPM context by calling Esys_Initialize() function and sets the previous key handle and nextkey handle as null. Then it sets the root key and key index.")),(0,a.kt)("h2",{id:"getkeyindex"},"getKeyIndex():"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},'Returns previous key index because that is the "current" key index used for performing signature.')),(0,a.kt)("h2",{id:"setkeyindexint-keyindex"},"setKeyIndex(INT keyIndex):"),(0,a.kt)("admonition",{type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"Sets the previous key index (which is our current key) to the key index passed as parameter.")),(0,a.kt)("p",null,"Also sets keyIndex+1 as the nextKey index."),(0,a.kt)("p",null,"For the key generated at after first initialization it flushes the previous key handle and generates the key with keyIndex then points then populates the previous key handle with the current key handle value.\nNext it generates the public key with keyIndex+1 and stores it in the nextkey handle. "),(0,a.kt)("h2",{id:"getpublickeyint-keyindex-int-publickeysize"},"getPublicKey(INT keyIndex, INT *publicKeySize):"),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Returns the public key for the given index.")),(0,a.kt)("p",null,"Takes keyIndex and returns root key if the keyINDEX is 0, next key if the keyindex matches with the nextKey index, previous key if the keyINdex matches with the previous Key index. "),(0,a.kt)("p",null,"If it matches with none of these indexes, then it flushes the root key from the tpm (due to the limit of max 3 transient handles), generates the key for the corresponding keyIndex and copies it into temp key then flushes it from the TPM. Finally, it regenerates the root key and then returns temp key."),(0,a.kt)("h2",{id:"signecdsaint-keyindex-byte-hashtosign-int-eccsignsize-bool-increment"},"signECDSA(INT keyIndex, BYTE ",(0,a.kt)("em",{parentName:"h2"},"hashToSign, INT "),"eccSignSize, bool increment):"),(0,a.kt)("admonition",{type:"warning"},(0,a.kt)("p",{parentName:"admonition"},"Signs the given hash using the key referred by the key index.")),(0,a.kt)("p",null,"Converts the byte hash to TPM2B_hash object and then checks the key index . If it is root key or previous key then assigns it to the signing key handle otherwise; "),(0,a.kt)("p",null,"Sets the previous key index to the given keyindex by calling setkeyindex() function and assigns it to the signing handle. It signs the hash using Esys_Sign() function. Finally the signature is converted to ASN DER format which is returned by signECDSA()."),(0,a.kt)("h2",{id:"getecdhpointint-keyindex-byte-euphemeralkey"},"getECDHPoint(INT keyIndex, BYTE *euphemeralKey):"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Performs Elliptic Curve Diffe Hellmen Key Exchange using the private part of the key referred by the Key Index and public euphemeral key. Returns the derived shared secret uncompressed point.")),(0,a.kt)("p",null,"Takes the key index and checks whether it's previous key, next key or root key. If it's one of these then it assigns it to the ECDH key handle else it removes the root key and generates a new key for the given key index and use it in the ECDH handle. "),(0,a.kt)("p",null,"Next, it re-structures the euphemeral key with the format 04 x y and generates an ECDH point using the Esys_ECDH_ZGen() function and stores it 04 x y format in zPoint which is then returned by the function."))}c.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/7e96883b.0e91ccbb.js b/assets/js/7e96883b.0e91ccbb.js new file mode 100644 index 000000000..76f1d829f --- /dev/null +++ b/assets/js/7e96883b.0e91ccbb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7655],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>b});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(n),u=i,b=d["".concat(l,".").concat(u)]||d[u]||h[u]||r;return n?a.createElement(b,s(s({ref:t},p),{},{components:n})):a.createElement(b,s({ref:t},p))}));function b(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,s=new Array(r);s[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:i,s[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"how-it-works",title:"AEWeb - How it works",sidebar_label:"How it works",sidebar_position:1},s=void 0,o={unversionedId:"participate/aeweb/how-it-works",id:"participate/aeweb/how-it-works",title:"AEWeb - How it works",description:"Archethic Web (AEWeb) is using transaction chains to host any website on Archethic Blockchain.",source:"@site/docs/participate/aeweb/how-it-works.md",sourceDirName:"participate/aeweb",slug:"/participate/aeweb/how-it-works",permalink:"/participate/aeweb/how-it-works",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:1,frontMatter:{id:"how-it-works",title:"AEWeb - How it works",sidebar_label:"How it works",sidebar_position:1},sidebar:"docs",previous:{title:"Archethic Web (AEWeb)",permalink:"/participate/aeweb/"},next:{title:"Domain Names",permalink:"/participate/aeweb/dns"}},l={},c=[{value:"Transaction building",id:"transaction-building",level:2},{value:"Content delivery",id:"content-delivery",level:2},{value:"Website updates",id:"website-updates",level:2},{value:"Website unpublication",id:"website-unpublication",level:2}],p={toc:c},d="wrapper";function h(e){let{components:t,...r}=e;return(0,i.kt)(d,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Web (AEWeb) is using transaction chains to host any website on Archethic Blockchain."),(0,i.kt)("p",null,"We will describe the following process from the building until the delivery to the browser."),(0,i.kt)("h2",{id:"transaction-building"},"Transaction building"),(0,i.kt)("p",null,"On the beginning of any hosting, there is a website composed of:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"HTML pages"),(0,i.kt)("li",{parentName:"ul"},"CSS files"),(0,i.kt)("li",{parentName:"ul"},"Javascript files"),(0,i.kt)("li",{parentName:"ul"},"Images"),(0,i.kt)("li",{parentName:"ul"},"Videos")),(0,i.kt)("p",null,"When the folder of the website is passed to the AEWeb CLI, the files are analyzed and packaged into blob of 3MB (current limitation of transaction's content)."),(0,i.kt)("mermaid",{value:"graph TD\n\n HTML --\x3e AEWeb\n CSS --\x3e AEWeb\n Javascript --\x3e AEWeb\n Images --\x3e AEWeb\n\n AEWeb --\x3e Transaction#1\n AEWeb --\x3e Transaction#2\n AEWeb --\x3e Transaction#3\n"}),(0,i.kt)("p",null,"One of this transaction is called the ",(0,i.kt)("inlineCode",{parentName:"p"},"reference"),". Its goals is to act as a pointer to other transactions helping the retrieval of the files and allows upgrades to be transparent for the users."),(0,i.kt)("p",null,"The reference transaction's address will become the address of the website, hence managing its lifecycle."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aewebVersion": 1,\n "hashFunction": "sha-1",\n "metaData": {\n "index.html": {\n "size": 68420,\n "hash": "ABC123F...",\n "encoding": "gzip",\n "addresses": ["0FB27DAC...."]\n },\n "scripts/main.js": {\n "size": 255121,\n "hash": "01AB2CD...",\n "encoding": "gzip",\n "addresses": ["0AC1BFA9..."]\n } \n }\n}\n')),(0,i.kt)("p",null,"The other transactions (called ",(0,i.kt)("inlineCode",{parentName:"p"},"data"),") will contain the content of the files encoded in base64"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "index.html": "b298kJKFS98dj7Xdnsq....", \n "scripts/main.js": "aGVsbG8gd29ybGQ=" \n}\n')),(0,i.kt)("p",null,"To leverage the maximum of the transaction size, all the content are grouped into the smallest amount of transaction possible.\nFor example, you could have a website which contains: 3 files:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"HTML page"),(0,i.kt)("li",{parentName:"ul"},"Image"),(0,i.kt)("li",{parentName:"ul"},"CSS")),(0,i.kt)("p",null,"3 transactions could be generated:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Reference:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-jsonc"},'{\n "aewebVersion": 1,\n "hashFunction": "sha-1",\n "metaData": {\n "index.html": {\n ...\n "addresses": ["0ac7fj..."]\n },\n "assets/app.css": {\n ...\n "addresses": ["0ac7fj..."]\n },\n "assets/image.jpg": {\n ...\n // image.jpg is too big to fit in a single data transaction\n "addresses": ["0ac7fj...", "1fb2ha..."] \n }\n}\n')),(0,i.kt)("ol",{start:2},(0,i.kt)("li",{parentName:"ol"},"HTML + CSS + Image (chunked by 30%)")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-jsonc"},'// data transaction: "0ac7fj..."\n{\n "index.html": "...",\n "assets/app.css": "..."\n "assets/image.jpg": "..."\n}\n')),(0,i.kt)("ol",{start:3},(0,i.kt)("li",{parentName:"ol"},"Image (remaining chunks)")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-jsonc"},'// data transaction: "1fb2ha..."\n{\n "assets/image.jpg": "..."\n}\n')),(0,i.kt)("h2",{id:"content-delivery"},"Content delivery"),(0,i.kt)("p",null,"On the other side, the transactions are validated and stored on the Archethic Blockchain.\nAny Archethic node exposes an API dedicated for the web hosting by AEWeb."),(0,i.kt)("p",null,"This API takes a reference address as a parameter, and then proceeds to take the path of the file, just like any web server would do."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"https://mainnet.archethic.net/aeweb/0c19fd13......../image.jpg\n")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"aeweb_CDN",src:n(94313).Z+"#gh-light-mode-only",width:"274",height:"215"}),"\n",(0,i.kt)("img",{alt:"aeweb_CDN",src:n(91951).Z+"#gh-dark-mode-only",width:"274",height:"215"})),(0,i.kt)("p",null,"The welcome node will request the reference transaction download to its related shard.\nIt will parse the reference content and detect the transactions to download for the requested file."),(0,i.kt)("p",null,"Once the file downloaded, the content will send back to the client and the browser will display the file."),(0,i.kt)("p",null,"Because websites rendering is composed of multiple HTTP requests for each file, the browser will be able to understand the responses and display the website entirely - while leveraging a single reference on-chain."),(0,i.kt)("admonition",{title:"Good to know",type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Once the website retrieved, the data will be cached locally. So, the next time the same person will visit the website, no data will be fetched again."),(0,i.kt)("p",{parentName:"admonition"},"This will be true until the website and the reference chain evolves.")),(0,i.kt)("h2",{id:"website-updates"},"Website updates"),(0,i.kt)("p",null,"The first thing a node does when it receives an AEWeb request is to download the latest ",(0,i.kt)("inlineCode",{parentName:"p"},"reference")," transaction from the chain. This behaviour allows a user to update its website and to keep the same URL."),(0,i.kt)("p",null,"This means that updating a website is as simple as sending a new ",(0,i.kt)("inlineCode",{parentName:"p"},"reference")," transaction!"),(0,i.kt)("h2",{id:"website-unpublication"},"Website unpublication"),(0,i.kt)("p",null,"Introduced by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-13.md"},"AEIP-13"),", a website can be unpublished by sending the following ",(0,i.kt)("inlineCode",{parentName:"p"},"reference")," transaction:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aeip": [8, 13],\n "aewebVersion": 1,\n "publicationStatus": "UNPUBLISHED"\n}\n')),(0,i.kt)("p",null,"As long as this ",(0,i.kt)("inlineCode",{parentName:"p"},"reference")," transaction is the latest, the nodes will not serve the website. An HTTP status code 410 is sent."),(0,i.kt)("admonition",{title:"Data is permanent",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"The data from an unpublished website (and all previous version as a matter of fact) always remain in the blockchain. Here, we only disable the endpoint to access it.")))}h.isMDXComponent=!0},91951:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/aeweb_CDN-dark-a23984e644c6a6122b47d21df57208e0.svg"},94313:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/aeweb_CDN-a2976501bd49a6a0049eebd89e41f66c.svg"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/7e96883b.4cd45932.js b/assets/js/7e96883b.4cd45932.js deleted file mode 100644 index 33f649923..000000000 --- a/assets/js/7e96883b.4cd45932.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7655],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>b});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(n),u=i,b=d["".concat(l,".").concat(u)]||d[u]||h[u]||r;return n?a.createElement(b,s(s({ref:t},p),{},{components:n})):a.createElement(b,s({ref:t},p))}));function b(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,s=new Array(r);s[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:i,s[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"how-it-works",title:"AEWeb - How it works",sidebar_label:"How it works",sidebar_position:1},s=void 0,o={unversionedId:"participate/aeweb/how-it-works",id:"participate/aeweb/how-it-works",title:"AEWeb - How it works",description:"Archethic Web (AEWeb) is using transaction chains to host any website on Archethic Blockchain.",source:"@site/docs/participate/aeweb/how-it-works.md",sourceDirName:"participate/aeweb",slug:"/participate/aeweb/how-it-works",permalink:"/participate/aeweb/how-it-works",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:1,frontMatter:{id:"how-it-works",title:"AEWeb - How it works",sidebar_label:"How it works",sidebar_position:1},sidebar:"docs",previous:{title:"Archethic Web (AEWeb)",permalink:"/participate/aeweb/"},next:{title:"Domain Names",permalink:"/participate/aeweb/dns"}},l={},c=[{value:"Transaction building",id:"transaction-building",level:2},{value:"Content delivery",id:"content-delivery",level:2},{value:"Website updates",id:"website-updates",level:2},{value:"Website unpublication",id:"website-unpublication",level:2}],p={toc:c},d="wrapper";function h(e){let{components:t,...r}=e;return(0,i.kt)(d,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Web (AEWeb) is using transaction chains to host any website on Archethic Blockchain."),(0,i.kt)("p",null,"We will describe the following process from the building until the delivery to the browser."),(0,i.kt)("h2",{id:"transaction-building"},"Transaction building"),(0,i.kt)("p",null,"On the beginning of any hosting, there is a website composed of:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"HTML pages"),(0,i.kt)("li",{parentName:"ul"},"CSS files"),(0,i.kt)("li",{parentName:"ul"},"Javascript files"),(0,i.kt)("li",{parentName:"ul"},"Images"),(0,i.kt)("li",{parentName:"ul"},"Videos")),(0,i.kt)("p",null,"When the folder of the website is passed to the AEWeb CLI, the files are analyzed and packaged into blob of 3MB (current limitation of transaction's content)."),(0,i.kt)("mermaid",{value:"graph TD\n\n HTML --\x3e AEWeb\n CSS --\x3e AEWeb\n Javascript --\x3e AEWeb\n Images --\x3e AEWeb\n\n AEWeb --\x3e Transaction#1\n AEWeb --\x3e Transaction#2\n AEWeb --\x3e Transaction#3\n"}),(0,i.kt)("p",null,"One of this transaction is called the ",(0,i.kt)("inlineCode",{parentName:"p"},"reference"),". Its goals is to act as a pointer to other transactions helping the retrieval of the files and allows upgrades to be transparent for the users."),(0,i.kt)("p",null,"The reference transaction's address will become the address of the website, hence managing its lifecycle."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aewebVersion": 1,\n "hashFunction": "sha-1",\n "metaData": {\n "index.html": {\n "size": 68420,\n "hash": "ABC123F...",\n "encoding": "gzip",\n "addresses": ["0FB27DAC...."]\n },\n "scripts/main.js": {\n "size": 255121,\n "hash": "01AB2CD...",\n "encoding": "gzip",\n "addresses": ["0AC1BFA9..."]\n } \n }\n}\n')),(0,i.kt)("p",null,"The other transactions (called ",(0,i.kt)("inlineCode",{parentName:"p"},"data"),") will contain the content of the files encoded in base64"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "index.html": "b298kJKFS98dj7Xdnsq....", \n "scripts/main.js": "aGVsbG8gd29ybGQ=" \n}\n')),(0,i.kt)("p",null,"To leverage the maximum of the transaction size, all the content are grouped into the smallest amount of transaction possible.\nFor example, you could have a website which contains: 3 files:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"HTML page"),(0,i.kt)("li",{parentName:"ul"},"Image"),(0,i.kt)("li",{parentName:"ul"},"CSS")),(0,i.kt)("p",null,"3 transactions could be generated:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Reference:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-jsonc"},'{\n "aewebVersion": 1,\n "hashFunction": "sha-1",\n "metaData": {\n "index.html": {\n ...\n "addresses": ["0ac7fj..."]\n },\n "assets/app.css": {\n ...\n "addresses": ["0ac7fj..."]\n },\n "assets/image.jpg": {\n ...\n // image.jpg is too big to fit in a single data transaction\n "addresses": ["0ac7fj...", "1fb2ha..."] \n }\n}\n')),(0,i.kt)("ol",{start:2},(0,i.kt)("li",{parentName:"ol"},"HTML + CSS + Image (chunked by 30%)")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-jsonc"},'// data transaction: "0ac7fj..."\n{\n "index.html": "...",\n "assets/app.css": "..."\n "assets/image.jpg": "..."\n}\n')),(0,i.kt)("ol",{start:3},(0,i.kt)("li",{parentName:"ol"},"Image (remaining chunks)")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-jsonc"},'// data transaction: "1fb2ha..."\n{\n "assets/image.jpg": "..."\n}\n')),(0,i.kt)("h2",{id:"content-delivery"},"Content delivery"),(0,i.kt)("p",null,"On the other side, the transactions are validated and stored on the Archethic Blockchain.\nAny Archethic node exposes an API dedicated for the web hosting by AEWeb."),(0,i.kt)("p",null,"This API takes a reference address as a parameter, and then proceeds to take the path of the file, just like any web server would do."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"https://mainnet.archethic.net/aeweb/0c19fd13......../image.jpg\n")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"aeweb_CDN",src:n(94313).Z+"#gh-light-mode-only",width:"274",height:"215"}),"\n",(0,i.kt)("img",{alt:"aeweb_CDN",src:n(91951).Z+"#gh-dark-mode-only",width:"274",height:"215"})),(0,i.kt)("p",null,"The welcome node will request the reference transaction download to its related shard.\nIt will parse the reference content and detect the transactions to download for the requested file."),(0,i.kt)("p",null,"Once the file downloaded, the content will send back to the client and the browser will display the file."),(0,i.kt)("p",null,"Because websites rendering is composed of multiple HTTP requests for each file, the browser will be able to understand the responses and display the website entirely - while leveraging a single reference on-chain."),(0,i.kt)("admonition",{title:"Good to know",type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Once the website retrieved, the data will be cached locally. So, the next time the same person will visit the website, no data will be fetched again."),(0,i.kt)("p",{parentName:"admonition"},"This will be true until the website and the reference chain evolves.")),(0,i.kt)("h2",{id:"website-updates"},"Website updates"),(0,i.kt)("p",null,"The first thing a node does when it receives an AEWeb request is to download the latest ",(0,i.kt)("inlineCode",{parentName:"p"},"reference")," transaction from the chain. This behaviour allows a user to update its website and to keep the same URL."),(0,i.kt)("p",null,"This means that updating a website is as simple as sending a new ",(0,i.kt)("inlineCode",{parentName:"p"},"reference")," transaction!"),(0,i.kt)("h2",{id:"website-unpublication"},"Website unpublication"),(0,i.kt)("p",null,"Introduced by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-13.md"},"AEIP-13"),", a website can be unpublished by sending the following ",(0,i.kt)("inlineCode",{parentName:"p"},"reference")," transaction:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "aeip": [8, 13],\n "aewebVersion": 1,\n "publicationStatus": "UNPUBLISHED"\n}\n')),(0,i.kt)("p",null,"As long as this ",(0,i.kt)("inlineCode",{parentName:"p"},"reference")," transaction is the latest, the nodes will not serve the website. An HTTP status code 410 is sent."),(0,i.kt)("admonition",{title:"Data is permanent",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"The data from an unpublished website (and all previous version as a matter of fact) always remain in the blockchain. Here, we only disable the endpoint to access it.")))}h.isMDXComponent=!0},91951:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/aeweb_CDN-dark-a23984e644c6a6122b47d21df57208e0.svg"},94313:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/aeweb_CDN-a2976501bd49a6a0049eebd89e41f66c.svg"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/8153e280.48584e96.js b/assets/js/8153e280.ff0967de.js similarity index 52% rename from assets/js/8153e280.48584e96.js rename to assets/js/8153e280.ff0967de.js index cdbc76bd3..7d0d49e74 100644 --- a/assets/js/8153e280.48584e96.js +++ b/assets/js/8153e280.ff0967de.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[711],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>f});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),c=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,i=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=c(a),m=r,f=u["".concat(i,".").concat(m)]||u[m]||p[m]||s;return a?n.createElement(f,o(o({ref:t},d),{},{components:a})):n.createElement(f,o({ref:t},d))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,o=new Array(s);o[0]=m;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[u]="string"==typeof e?e:r,o[1]=l;for(var c=2;c{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>c,contentTitle:()=>l,default:()=>b,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var n=a(87462),r=a(67294),s=a(3905);a(8209);const o={id:"last-transaction",title:"lastTransaction",hide_table_of_contents:!1},l=void 0,i={unversionedId:"build/api/schema/queries/last-transaction",id:"build/api/schema/queries/last-transaction",title:"lastTransaction",description:"Query the network to find the last transaction from an address",source:"@site/docs/build/api/schema/queries/last-transaction.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/last-transaction",permalink:"/build/api/schema/queries/last-transaction",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"last-transaction",title:"lastTransaction",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"genesisAddress",permalink:"/build/api/schema/queries/genesis-address"},next:{title:"nearestEndpoints",permalink:"/build/api/schema/queries/nearest-endpoints"}},c={},d=[{value:"Arguments",id:"arguments",level:3},{value:'lastTransaction.addressAddress! ',id:"code-style-fontweight-normal-lasttransactionbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],u=()=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,s.kt)(r.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},y="wrapper";function b(e){let{components:t,...a}=e;return(0,s.kt)(y,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Query the network to find the last transaction from an address"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"lastTransaction(\n address: Address!\n): Transaction\n")),(0,s.kt)("h3",{id:"arguments"},"Arguments"),(0,s.kt)("h4",{id:"code-style-fontweight-normal-lasttransactionbaddressbcodeaddress--"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"lastTransaction.",(0,s.kt)("b",null,"address"))),(0,s.kt)(u,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,s.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,s.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,s.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h3",{id:"type"},"Type"),(0,s.kt)("h4",{id:"transaction-"},(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,s.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,s.kt)("blockquote",null,(0,s.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}b.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[711],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>f});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),c=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,i=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=c(a),m=r,f=u["".concat(i,".").concat(m)]||u[m]||p[m]||s;return a?n.createElement(f,o(o({ref:t},d),{},{components:a})):n.createElement(f,o({ref:t},d))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,o=new Array(s);o[0]=m;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[u]="string"==typeof e?e:r,o[1]=l;for(var c=2;c{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>c,contentTitle:()=>l,default:()=>b,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var n=a(87462),r=a(67294),s=a(3905);a(8209);const o={id:"last-transaction",title:"lastTransaction",hide_table_of_contents:!1},l=void 0,i={unversionedId:"build/api/schema/queries/last-transaction",id:"build/api/schema/queries/last-transaction",title:"lastTransaction",description:"Query the network to find the last transaction from an address",source:"@site/docs/build/api/schema/queries/last-transaction.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/last-transaction",permalink:"/build/api/schema/queries/last-transaction",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"last-transaction",title:"lastTransaction",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"genesisAddress",permalink:"/build/api/schema/queries/genesis-address"},next:{title:"nearestEndpoints",permalink:"/build/api/schema/queries/nearest-endpoints"}},c={},d=[{value:"Arguments",id:"arguments",level:3},{value:'lastTransaction.addressAddress! ',id:"code-style-fontweight-normal-lasttransactionbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],u=()=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,s.kt)(r.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},y="wrapper";function b(e){let{components:t,...a}=e;return(0,s.kt)(y,(0,n.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Query the network to find the last transaction from an address"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"lastTransaction(\n address: Address!\n): Transaction\n")),(0,s.kt)("h3",{id:"arguments"},"Arguments"),(0,s.kt)("h4",{id:"code-style-fontweight-normal-lasttransactionbaddressbcodeaddress--"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"lastTransaction.",(0,s.kt)("b",null,"address"))),(0,s.kt)(u,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,s.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,s.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,s.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h3",{id:"type"},"Type"),(0,s.kt)("h4",{id:"transaction-"},(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,s.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,s.kt)("blockquote",null,(0,s.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}b.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/851bf865.bb8f4aaa.js b/assets/js/851bf865.8dc52d31.js similarity index 73% rename from assets/js/851bf865.bb8f4aaa.js rename to assets/js/851bf865.8dc52d31.js index e1f19491a..b68363f4a 100644 --- a/assets/js/851bf865.bb8f4aaa.js +++ b/assets/js/851bf865.8dc52d31.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[827],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=s(n),d=a,f=p["".concat(l,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:a,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"schema",slug:"/schema",title:"Schema Documentation",sidebar_position:1,hide_table_of_contents:!0,pagination_next:null,pagination_prev:null,sidebar_class_name:"navbar__toggle"},i=void 0,c={unversionedId:"build/api/schema/schema",id:"build/api/schema/schema",title:"Schema Documentation",description:"This documentation has been automatically generated from the GraphQL schema.",source:"@site/docs/build/api/schema/generated.md",sourceDirName:"build/api/schema",slug:"/schema",permalink:"/schema",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:1,frontMatter:{id:"schema",slug:"/schema",title:"Schema Documentation",sidebar_position:1,hide_table_of_contents:!0,pagination_next:null,pagination_prev:null,sidebar_class_name:"navbar__toggle"},sidebar:"docs"},l={},s=[],u={toc:s},p="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"This documentation has been automatically generated from the GraphQL schema."),(0,a.kt)("p",null,"Use the docs in the sidebar to find out how to use the schema:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Allowed operations"),": queries and mutations."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Schema-defined types"),": scalars, objects, enums, interfaces, unions, and input objects.")),(0,a.kt)("small",null,(0,a.kt)("i",null,"Generated on 09/06/2023 13:56:15.")))}m.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[827],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=s(n),d=a,f=p["".concat(l,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:a,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"schema",slug:"/schema",title:"Schema Documentation",sidebar_position:1,hide_table_of_contents:!0,pagination_next:null,pagination_prev:null,sidebar_class_name:"navbar__toggle"},i=void 0,c={unversionedId:"build/api/schema/schema",id:"build/api/schema/schema",title:"Schema Documentation",description:"This documentation has been automatically generated from the GraphQL schema.",source:"@site/docs/build/api/schema/generated.md",sourceDirName:"build/api/schema",slug:"/schema",permalink:"/schema",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:1,frontMatter:{id:"schema",slug:"/schema",title:"Schema Documentation",sidebar_position:1,hide_table_of_contents:!0,pagination_next:null,pagination_prev:null,sidebar_class_name:"navbar__toggle"},sidebar:"docs"},l={},s=[],u={toc:s},p="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"This documentation has been automatically generated from the GraphQL schema."),(0,a.kt)("p",null,"Use the docs in the sidebar to find out how to use the schema:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Allowed operations"),": queries and mutations."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Schema-defined types"),": scalars, objects, enums, interfaces, unions, and input objects.")),(0,a.kt)("small",null,(0,a.kt)("i",null,"Generated on 09/06/2023 13:56:15.")))}m.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/87dfbf5d.2ede6072.js b/assets/js/87dfbf5d.f753efe5.js similarity index 57% rename from assets/js/87dfbf5d.2ede6072.js rename to assets/js/87dfbf5d.f753efe5.js index 759006712..08c8c90a9 100644 --- a/assets/js/87dfbf5d.2ede6072.js +++ b/assets/js/87dfbf5d.f753efe5.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1171],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>h});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=r.createContext({}),c=function(e){var t=r.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(a),m=n,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||i;return a?r.createElement(h,s(s({ref:t},p),{},{components:a})):r.createElement(h,s({ref:t},p))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:n,s[1]=o;for(var c=2;c{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>o,default:()=>y,frontMatter:()=>s,metadata:()=>l,toc:()=>p});var r=a(87462),n=a(67294),i=a(3905);a(8209);const s={id:"hash",title:"Hash",hide_table_of_contents:!1},o=void 0,l={unversionedId:"build/api/schema/scalars/hash",id:"build/api/schema/scalars/hash",title:"Hash",description:"The [Hash] scalar type represents a cryptographic hash used in",source:"@site/docs/build/api/schema/scalars/hash.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/hash",permalink:"/build/api/schema/scalars/hash",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"hash",title:"Hash",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Float",permalink:"/build/api/schema/scalars/float"},next:{title:"Hex",permalink:"/build/api/schema/scalars/hex"}},c={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,i.kt)(n.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),h={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...a}=e;return(0,i.kt)(f,(0,r.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[Hash]"," scalar type represents a cryptographic hash used in\nthe Archethic network with an identification byte to specify from which algorithm the hash was generated.\nThe Hash appears in a JSON response as Base16 formatted string. The parsed hash will\nbe converted to a binary and any invalid hash with an invalid algorithm or invalid size will be rejected"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Hash\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1171],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>h});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=r.createContext({}),c=function(e){var t=r.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(a),m=n,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||i;return a?r.createElement(h,s(s({ref:t},p),{},{components:a})):r.createElement(h,s({ref:t},p))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:n,s[1]=o;for(var c=2;c{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>o,default:()=>b,frontMatter:()=>s,metadata:()=>l,toc:()=>p});var r=a(87462),n=a(67294),i=a(3905);a(8209);const s={id:"hash",title:"Hash",hide_table_of_contents:!1},o=void 0,l={unversionedId:"build/api/schema/scalars/hash",id:"build/api/schema/scalars/hash",title:"Hash",description:"The [Hash] scalar type represents a cryptographic hash used in",source:"@site/docs/build/api/schema/scalars/hash.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/hash",permalink:"/build/api/schema/scalars/hash",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"hash",title:"Hash",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Float",permalink:"/build/api/schema/scalars/float"},next:{title:"Hex",permalink:"/build/api/schema/scalars/hex"}},c={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,i.kt)(n.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),h={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},f="wrapper";function b(e){let{components:t,...a}=e;return(0,i.kt)(f,(0,r.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[Hash]"," scalar type represents a cryptographic hash used in\nthe Archethic network with an identification byte to specify from which algorithm the hash was generated.\nThe Hash appears in a JSON response as Base16 formatted string. The parsed hash will\nbe converted to a binary and any invalid hash with an invalid algorithm or invalid size will be rejected"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Hash\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"}),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/89af9b08.0744b2b9.js b/assets/js/89af9b08.0744b2b9.js deleted file mode 100644 index 89d72f832..000000000 --- a/assets/js/89af9b08.0744b2b9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4230],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),s=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=s(a),b=r,m=u["".concat(i,".").concat(b)]||u[b]||p[b]||l;return a?n.createElement(m,o(o({ref:t},d),{},{components:a})):n.createElement(m,o({ref:t},d))}));function m(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,o=new Array(l);o[0]=b;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[u]="string"==typeof e?e:r,o[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>b,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>s,contentTitle:()=>c,default:()=>y,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var n=a(87462),r=a(67294),l=a(3905);a(8209);const o={id:"balance",title:"Balance",hide_table_of_contents:!1},c=void 0,i={unversionedId:"build/api/schema/objects/balance",id:"build/api/schema/objects/balance",title:"Balance",description:"[Balance] represents a ledger balance.",source:"@site/docs/build/api/schema/objects/balance.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/balance",permalink:"/build/api/schema/objects/balance",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"balance",title:"Balance",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"AuthorizedKey",permalink:"/build/api/schema/objects/authorized-key"},next:{title:"BeaconChainSummary",permalink:"/build/api/schema/objects/beacon-chain-summary"}},s={},d=[{value:"Fields",id:"fields",level:3},{value:'Balance.token[TokenBalance] ',id:"code-style-fontweight-normal-balancebtokenbcodetokenbalance--",level:4},{value:'Balance.ucoInt ',id:"code-style-fontweight-normal-balancebucobcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3},{value:"Member of",id:"member-of",level:3}],u=()=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,l.kt)(r.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),b=e=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:u,SpecifiedBy:p,Badge:b},f="wrapper";function y(e){let{components:t,...a}=e;return(0,l.kt)(f,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"[Balance]"," represents a ledger balance.\nIt includes:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"UCO: uco balance"),(0,l.kt)("li",{parentName:"ul"},"token: token balances")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"type Balance {\n token: [TokenBalance]\n uco: Int\n}\n")),(0,l.kt)("h3",{id:"fields"},"Fields"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-balancebtokenbcodetokenbalance--"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Balance.",(0,l.kt)("b",null,"token"))),(0,l.kt)(u,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/token-balance"},(0,l.kt)("inlineCode",{parentName:"a"},"[TokenBalance]"))," ",(0,l.kt)(b,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,l.kt)(b,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-balancebucobcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Balance.",(0,l.kt)("b",null,"uco"))),(0,l.kt)(u,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(b,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"returned-by"},"Returned by"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/queries/balance"},(0,l.kt)("inlineCode",{parentName:"a"},"balance"))," ",(0,l.kt)(b,{class:"secondary",text:"query",mdxType:"Badge"})),(0,l.kt)("h3",{id:"member-of"},"Member of"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,l.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,l.kt)(b,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/89af9b08.62809998.js b/assets/js/89af9b08.62809998.js new file mode 100644 index 000000000..0e52f665b --- /dev/null +++ b/assets/js/89af9b08.62809998.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4230],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),s=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=s(a),b=r,m=u["".concat(i,".").concat(b)]||u[b]||p[b]||l;return a?n.createElement(m,o(o({ref:t},d),{},{components:a})):n.createElement(m,o({ref:t},d))}));function m(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,o=new Array(l);o[0]=b;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[u]="string"==typeof e?e:r,o[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>b,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>s,contentTitle:()=>c,default:()=>y,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var n=a(87462),r=a(67294),l=a(3905);a(8209);const o={id:"balance",title:"Balance",hide_table_of_contents:!1},c=void 0,i={unversionedId:"build/api/schema/objects/balance",id:"build/api/schema/objects/balance",title:"Balance",description:"[Balance] represents a ledger balance.",source:"@site/docs/build/api/schema/objects/balance.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/balance",permalink:"/build/api/schema/objects/balance",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"balance",title:"Balance",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"AuthorizedKey",permalink:"/build/api/schema/objects/authorized-key"},next:{title:"BeaconChainSummary",permalink:"/build/api/schema/objects/beacon-chain-summary"}},s={},d=[{value:"Fields",id:"fields",level:3},{value:'Balance.token[TokenBalance] ',id:"code-style-fontweight-normal-balancebtokenbcodetokenbalance--",level:4},{value:'Balance.ucoInt ',id:"code-style-fontweight-normal-balancebucobcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3},{value:"Member of",id:"member-of",level:3}],u=()=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,l.kt)(r.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),b=e=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:u,SpecifiedBy:p,Badge:b},f="wrapper";function y(e){let{components:t,...a}=e;return(0,l.kt)(f,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"[Balance]"," represents a ledger balance.\nIt includes:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"UCO: uco balance"),(0,l.kt)("li",{parentName:"ul"},"token: token balances")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"type Balance {\n token: [TokenBalance]\n uco: Int\n}\n")),(0,l.kt)("h3",{id:"fields"},"Fields"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-balancebtokenbcodetokenbalance--"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Balance.",(0,l.kt)("b",null,"token"))),(0,l.kt)(u,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/token-balance"},(0,l.kt)("inlineCode",{parentName:"a"},"[TokenBalance]"))," ",(0,l.kt)(b,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,l.kt)(b,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h4",{id:"code-style-fontweight-normal-balancebucobcodeint-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"Balance.",(0,l.kt)("b",null,"uco"))),(0,l.kt)(u,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,l.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,l.kt)(b,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"returned-by"},"Returned by"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/queries/balance"},(0,l.kt)("inlineCode",{parentName:"a"},"balance"))," ",(0,l.kt)(b,{class:"secondary",text:"query",mdxType:"Badge"})),(0,l.kt)("h3",{id:"member-of"},"Member of"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,l.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,l.kt)(b,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/8a9337ba.0234efb4.js b/assets/js/8a9337ba.0234efb4.js new file mode 100644 index 000000000..4bc281e04 --- /dev/null +++ b/assets/js/8a9337ba.0234efb4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1113],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=l(n),h=r,m=d["".concat(c,".").concat(h)]||d[h]||p[h]||o;return n?a.createElement(m,i(i({ref:t},u),{},{components:n})):a.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=h;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:r,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"beacon-chain",title:"BeaconChain"},i=void 0,s={unversionedId:"build/core/beacon-chain/beacon-chain",id:"build/core/beacon-chain/beacon-chain",title:"BeaconChain",description:"BeaconChain helps the Archethic sharding network to be supervised and provided global view of the system.",source:"@site/docs/build/core/beacon-chain/README.md",sourceDirName:"build/core/beacon-chain",slug:"/build/core/beacon-chain/",permalink:"/build/core/beacon-chain/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"beacon-chain",title:"BeaconChain"},sidebar:"docs",previous:{title:"Account",permalink:"/build/core/account"},next:{title:"P2P availability sampling",permalink:"/build/core/beacon-chain/p2p-sampling"}},c={},l=[{value:"Subsets",id:"subsets",level:2},{value:"Timers and schedulers",id:"timers-and-schedulers",level:2},{value:"Transaction loading",id:"transaction-loading",level:2},{value:"Supervisor",id:"supervisor",level:2}],u={toc:l},d="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"BeaconChain helps the Archethic sharding network to be supervised and provided global view of the system."),(0,r.kt)("p",null,"To be able to manage it, few modules and functions are needed to make this possible."),(0,r.kt)("h2",{id:"subsets"},"Subsets"),(0,r.kt)("p",null,"The BeaconChain is divided into a set of subsets (shards of the BeaconChain) based on hexadecimal splits.\nCurrently the BeaconChain supports 256 subsets, from 0 to F (hex)"),(0,r.kt)("p",null,"Each subset is maintained by its own ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/beacon_chain/subset.ex"},"process")),(0,r.kt)("p",null,"This process is responsible of:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Add transaction replication confirmation to the current slot"),(0,r.kt)("li",{parentName:"ul"},"Check ",(0,r.kt)("a",{parentName:"li",href:"/build/core/beacon-chain/p2p-sampling"},"P2P availability")," of the nodes where their public key starts by the subset hexadecimal identifier "),(0,r.kt)("li",{parentName:"ul"},"Create beacon transaction and notify BeaconChain summary nodes (for the current epoch)"),(0,r.kt)("li",{parentName:"ul"},"Create beacon summary transaction (if it's one of the summary node)"),(0,r.kt)("li",{parentName:"ul"},"Notify explorer about the new transaction validated (See ",(0,r.kt)("a",{parentName:"li",href:"http://localhost:9001/archethic-docs/learn/sharding/beacon-chain/explorer"},"Sharded Explorer"),")")),(0,r.kt)("h2",{id:"timers-and-schedulers"},"Timers and schedulers"),(0,r.kt)("p",null,"Because each BeaconChain subsets change over time, we need a may to determine what are the current nodes for those subsets and so on. So we have two kind of timers and schedulers:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Slot timer: Manage the interval for the beacon slot creations"),(0,r.kt)("li",{parentName:"ul"},"Summary timer: Manage the interval for the beacon summary creations")),(0,r.kt)("p",null,"Each of those timer provides helpers to be able to generate previous or next dates"),(0,r.kt)("h2",{id:"transaction-loading"},"Transaction loading"),(0,r.kt)("p",null,"Before a transaction's confirmation is loaded into the BeaconChain, a phase of validation is performed to ensure the correctness of the replication:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"it asserts the transaction's address is the right one"),(0,r.kt)("li",{parentName:"ul"},"it asserts the transaction attestation (node election, signatures, etc.)")),(0,r.kt)("p",null,"For more details, ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/beacon_chain/slot/validation.ex"},"SlotValidation")),(0,r.kt)("p",null,"Then the slot is deserialized to be loaded into a cache, for a faster summary aggregation and computation"),(0,r.kt)("h2",{id:"supervisor"},"Supervisor"),(0,r.kt)("p",null,"To manage all those processes and isolation a proper supervision tree is defined"),(0,r.kt)("mermaid",{value:"graph TD\n A[BeaconChain Supervisor]\n A --\x3eB[Slot Timer]\n A --\x3eC[Summary Timer]\n A --\x3eD{Subset supervisor}\n D --\x3eE[Summary Cache]\n D --\x3eF[Subset 0]\n D --\x3eH[Subset ..F]\n D --\x3eI[Subset registry]"}))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/8a9337ba.e6240d21.js b/assets/js/8a9337ba.e6240d21.js deleted file mode 100644 index b553fa9ff..000000000 --- a/assets/js/8a9337ba.e6240d21.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1113],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=l(n),h=r,m=d["".concat(c,".").concat(h)]||d[h]||p[h]||o;return n?a.createElement(m,i(i({ref:t},u),{},{components:n})):a.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=h;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:r,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"beacon-chain",title:"BeaconChain"},i=void 0,s={unversionedId:"build/core/beacon-chain/beacon-chain",id:"build/core/beacon-chain/beacon-chain",title:"BeaconChain",description:"BeaconChain helps the Archethic sharding network to be supervised and provided global view of the system.",source:"@site/docs/build/core/beacon-chain/README.md",sourceDirName:"build/core/beacon-chain",slug:"/build/core/beacon-chain/",permalink:"/build/core/beacon-chain/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"beacon-chain",title:"BeaconChain"},sidebar:"docs",previous:{title:"Account",permalink:"/build/core/account"},next:{title:"P2P availability sampling",permalink:"/build/core/beacon-chain/p2p-sampling"}},c={},l=[{value:"Subsets",id:"subsets",level:2},{value:"Timers and schedulers",id:"timers-and-schedulers",level:2},{value:"Transaction loading",id:"transaction-loading",level:2},{value:"Supervisor",id:"supervisor",level:2}],u={toc:l},d="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"BeaconChain helps the Archethic sharding network to be supervised and provided global view of the system."),(0,r.kt)("p",null,"To be able to manage it, few modules and functions are needed to make this possible."),(0,r.kt)("h2",{id:"subsets"},"Subsets"),(0,r.kt)("p",null,"The BeaconChain is divided into a set of subsets (shards of the BeaconChain) based on hexadecimal splits.\nCurrently the BeaconChain supports 256 subsets, from 0 to F (hex)"),(0,r.kt)("p",null,"Each subset is maintained by its own ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/beacon_chain/subset.ex"},"process")),(0,r.kt)("p",null,"This process is responsible of:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Add transaction replication confirmation to the current slot"),(0,r.kt)("li",{parentName:"ul"},"Check ",(0,r.kt)("a",{parentName:"li",href:"/build/core/beacon-chain/p2p-sampling"},"P2P availability")," of the nodes where their public key starts by the subset hexadecimal identifier "),(0,r.kt)("li",{parentName:"ul"},"Create beacon transaction and notify BeaconChain summary nodes (for the current epoch)"),(0,r.kt)("li",{parentName:"ul"},"Create beacon summary transaction (if it's one of the summary node)"),(0,r.kt)("li",{parentName:"ul"},"Notify explorer about the new transaction validated (See ",(0,r.kt)("a",{parentName:"li",href:"http://localhost:9001/archethic-docs/learn/sharding/beacon-chain/explorer"},"Sharded Explorer"),")")),(0,r.kt)("h2",{id:"timers-and-schedulers"},"Timers and schedulers"),(0,r.kt)("p",null,"Because each BeaconChain subsets change over time, we need a may to determine what are the current nodes for those subsets and so on. So we have two kind of timers and schedulers:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Slot timer: Manage the interval for the beacon slot creations"),(0,r.kt)("li",{parentName:"ul"},"Summary timer: Manage the interval for the beacon summary creations")),(0,r.kt)("p",null,"Each of those timer provides helpers to be able to generate previous or next dates"),(0,r.kt)("h2",{id:"transaction-loading"},"Transaction loading"),(0,r.kt)("p",null,"Before a transaction's confirmation is loaded into the BeaconChain, a phase of validation is performed to ensure the correctness of the replication:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"it asserts the transaction's address is the right one"),(0,r.kt)("li",{parentName:"ul"},"it asserts the transaction attestation (node election, signatures, etc.)")),(0,r.kt)("p",null,"For more details, ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node/blob/master/lib/archethic/beacon_chain/slot/validation.ex"},"SlotValidation")),(0,r.kt)("p",null,"Then the slot is deserialized to be loaded into a cache, for a faster summary aggregation and computation"),(0,r.kt)("h2",{id:"supervisor"},"Supervisor"),(0,r.kt)("p",null,"To manage all those processes and isolation a proper supervision tree is defined"),(0,r.kt)("mermaid",{value:"graph TD\n A[BeaconChain Supervisor]\n A --\x3eB[Slot Timer]\n A --\x3eC[Summary Timer]\n A --\x3eD{Subset supervisor}\n D --\x3eE[Summary Cache]\n D --\x3eF[Subset 0]\n D --\x3eH[Subset ..F]\n D --\x3eI[Subset registry]"}))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/8b5bd275.6609331f.js b/assets/js/8b5bd275.6609331f.js deleted file mode 100644 index 79dac6f3c..000000000 --- a/assets/js/8b5bd275.6609331f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6451],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},d=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=l(r),m=a,f=p["".concat(c,".").concat(m)]||p[m]||u[m]||o;return r?n.createElement(f,s(s({ref:t},d),{},{components:r})):n.createElement(f,s({ref:t},d))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[p]="string"==typeof e?e:a,s[1]=i;for(var l=2;l{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>i,default:()=>y,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const s={id:"transaction-error",title:"transactionError",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/subscriptions/transaction-error",id:"build/api/schema/subscriptions/transaction-error",title:"transactionError",description:"Subscribe to be notified when a transaction is on error",source:"@site/docs/build/api/schema/subscriptions/transaction-error.mdx",sourceDirName:"build/api/schema/subscriptions",slug:"/build/api/schema/subscriptions/transaction-error",permalink:"/build/api/schema/subscriptions/transaction-error",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-error",title:"transactionError",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transactionConfirmed",permalink:"/build/api/schema/subscriptions/transaction-confirmed"},next:{title:"Core development",permalink:"/build/core/"}},l={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transactionError.addressAddress! ',id:"code-style-fontweight-normal-transactionerrorbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'TransactionError ',id:"transactionerror-",level:4}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Subscribe to be notified when a transaction is on error"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transactionError(\n address: Address!\n): TransactionError\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionerrorbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionError.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transactionerror-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-error"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionError"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[TransactionError]"," represents an error.")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/8b5bd275.ba46d1d1.js b/assets/js/8b5bd275.ba46d1d1.js new file mode 100644 index 000000000..0cc55f416 --- /dev/null +++ b/assets/js/8b5bd275.ba46d1d1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6451],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},d=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=l(r),m=a,b=p["".concat(c,".").concat(m)]||p[m]||u[m]||o;return r?n.createElement(b,s(s({ref:t},d),{},{components:r})):n.createElement(b,s({ref:t},d))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[p]="string"==typeof e?e:a,s[1]=i;for(var l=2;l{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>i,default:()=>y,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const s={id:"transaction-error",title:"transactionError",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/subscriptions/transaction-error",id:"build/api/schema/subscriptions/transaction-error",title:"transactionError",description:"Subscribe to be notified when a transaction is on error",source:"@site/docs/build/api/schema/subscriptions/transaction-error.mdx",sourceDirName:"build/api/schema/subscriptions",slug:"/build/api/schema/subscriptions/transaction-error",permalink:"/build/api/schema/subscriptions/transaction-error",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-error",title:"transactionError",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transactionConfirmed",permalink:"/build/api/schema/subscriptions/transaction-confirmed"},next:{title:"Core development",permalink:"/build/core/"}},l={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transactionError.addressAddress! ',id:"code-style-fontweight-normal-transactionerrorbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'TransactionError ',id:"transactionerror-",level:4}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Subscribe to be notified when a transaction is on error"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transactionError(\n address: Address!\n): TransactionError\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionerrorbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionError.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transactionerror-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-error"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionError"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[TransactionError]"," represents an error.")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/8d60aa1f.cac498a6.js b/assets/js/8d60aa1f.6898febf.js similarity index 67% rename from assets/js/8d60aa1f.cac498a6.js rename to assets/js/8d60aa1f.6898febf.js index d8a614b9a..ab66b8cc0 100644 --- a/assets/js/8d60aa1f.cac498a6.js +++ b/assets/js/8d60aa1f.6898febf.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2614],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=s(a),m=n,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||i;return a?r.createElement(f,l(l({ref:t},p),{},{components:a})):r.createElement(f,l({ref:t},p))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[u]="string"==typeof e?e:n,l[1]=o;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>s,contentTitle:()=>o,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),i=a(3905);a(8209);const l={id:"p2-p-availabilities",title:"P2pAvailabilities",hide_table_of_contents:!1},o=void 0,c={unversionedId:"build/api/schema/scalars/p2-p-availabilities",id:"build/api/schema/scalars/p2-p-availabilities",title:"P2pAvailabilities",description:"No description",source:"@site/docs/build/api/schema/scalars/p2-p-availabilities.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/p2-p-availabilities",permalink:"/build/api/schema/scalars/p2-p-availabilities",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"p2-p-availabilities",title:"P2pAvailabilities",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"NonNegInteger",permalink:"/build/api/schema/scalars/non-neg-integer"},next:{title:"PosInteger",permalink:"/build/api/schema/scalars/pos-integer"}},s={},p=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,i.kt)(n.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:u,SpecifiedBy:d,Badge:m},b="wrapper";function y(e){let{components:t,...a}=e;return(0,i.kt)(b,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"No description"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar P2pAvailabilities\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2614],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=s(a),m=n,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||i;return a?r.createElement(f,l(l({ref:t},p),{},{components:a})):r.createElement(f,l({ref:t},p))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[u]="string"==typeof e?e:n,l[1]=o;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>s,contentTitle:()=>o,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),i=a(3905);a(8209);const l={id:"p2-p-availabilities",title:"P2pAvailabilities",hide_table_of_contents:!1},o=void 0,c={unversionedId:"build/api/schema/scalars/p2-p-availabilities",id:"build/api/schema/scalars/p2-p-availabilities",title:"P2pAvailabilities",description:"No description",source:"@site/docs/build/api/schema/scalars/p2-p-availabilities.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/p2-p-availabilities",permalink:"/build/api/schema/scalars/p2-p-availabilities",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"p2-p-availabilities",title:"P2pAvailabilities",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"NonNegInteger",permalink:"/build/api/schema/scalars/non-neg-integer"},next:{title:"PosInteger",permalink:"/build/api/schema/scalars/pos-integer"}},s={},p=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,i.kt)(n.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(n.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:u,SpecifiedBy:d,Badge:m},b="wrapper";function y(e){let{components:t,...a}=e;return(0,i.kt)(b,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"No description"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar P2pAvailabilities\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/objects/beacon-chain-summary"},(0,i.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,i.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/8dbf302e.b2094358.js b/assets/js/8dbf302e.b2094358.js deleted file mode 100644 index fda95d876..000000000 --- a/assets/js/8dbf302e.b2094358.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9254],{3905:(e,t,i)=>{i.d(t,{Zo:()=>l,kt:()=>s});var n=i(67294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var I=n.createContext({}),o=function(e){var t=n.useContext(I),i=t;return e&&(i="function"==typeof e?e(t):r(r({},t),e)),i},l=function(e){var t=o(e.components);return n.createElement(I.Provider,{value:t},e.children)},g="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,c=e.originalType,I=e.parentName,l=M(e,["components","mdxType","originalType","parentName"]),g=o(i),u=a,s=g["".concat(I,".").concat(u)]||g[u]||d[u]||c;return i?n.createElement(s,r(r({ref:t},l),{},{components:i})):n.createElement(s,r({ref:t},l))}));function s(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=i.length,r=new Array(c);r[0]=u;var M={};for(var I in t)hasOwnProperty.call(t,I)&&(M[I]=t[I]);M.originalType=e,M[g]="string"==typeof e?e:a,r[1]=M;for(var o=2;o{i.r(t),i.d(t,{assets:()=>I,contentTitle:()=>r,default:()=>d,frontMatter:()=>c,metadata:()=>M,toc:()=>o});var n=i(87462),a=(i(67294),i(3905));i(8209);const c={id:"keychain",title:"Keychain"},r=void 0,M={unversionedId:"learn/decentralized-id/keychain",id:"learn/decentralized-id/keychain",title:"Keychain",description:"Archethic's keychain is new concept to make wallet accessible, configurable and interoperable with several service providers and why not multi chains.",source:"@site/docs/learn/decentralized-id/keychain.md",sourceDirName:"learn/decentralized-id",slug:"/learn/decentralized-id/keychain",permalink:"/learn/decentralized-id/keychain",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"keychain",title:"Keychain"},sidebar:"docs",previous:{title:"Decentralized Identity",permalink:"/learn/decentralized-id/"},next:{title:"Governance",permalink:"/learn/governance/"}},I={},o=[{value:"Key generation",id:"key-generation",level:2},{value:"End to end encryption",id:"end-to-end-encryption",level:2},{value:"Standard compliance",id:"standard-compliance",level:2},{value:"Customization",id:"customization",level:2}],l={toc:o},g="wrapper";function d(e){let{components:t,...c}=e;return(0,a.kt)(g,(0,n.Z)({},l,c,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic's keychain is new concept to make wallet accessible, configurable and interoperable with several service providers and why not multi chains."),(0,a.kt)("p",null,"It describes wallet which is stored encrypted on chain, as only you and the authorized access or person you allowed, to be able to decrypt and build transactions from it."),(0,a.kt)("h2",{id:"key-generation"},"Key generation"),(0,a.kt)("p",null,"Technically speaking, this wallet - also referenced as ",(0,a.kt)("inlineCode",{parentName:"p"},"Decentralized Identity")," - is made up of randomly generated ",(0,a.kt)("inlineCode",{parentName:"p"},"seed")," (root key) from which it's possible to generate all keys according to a path of derivation. "),(0,a.kt)("p",null,"So for any access to a service or an application, a key will be generated on the fly from the ",(0,a.kt)("inlineCode",{parentName:"p"},"seed")," (root key) and the first public key associated with a service or an application."),(0,a.kt)("p",null,"Thus allowing creating an infinite number of identities without even having to store related keys. "),(0,a.kt)("p",null,(0,a.kt)("img",{src:i(24449).Z,width:"372",height:"259"})),(0,a.kt)("h2",{id:"end-to-end-encryption"},"End to end encryption"),(0,a.kt)("p",null,"While this wallet or keychain being on-chain, it still remains secure as no other party (at least non authorized) can access with service keys. "),(0,a.kt)("p",null,"This is possible as we are using end to end encryption and elliptic curve cryptography."),(0,a.kt)("p",null,"Each keychain/wallet generated is embedded into a transaction encrypted using an AES key itself encrypted with a list of authorized keys or authenticated access (biometric, smartphone, USB, etc.)"),(0,a.kt)("p",null,"Once generated, we also create transactions for the access of this keychain.\nSo in other words, each access have its own transaction chain, where the keychain's location is encrypted as well."),(0,a.kt)("p",null,"Then in order to retrieve or access your keychain, your authentication method should retrieve its transaction chain, then decrypt the keychain's location, download the keychain transaction and finally decrypt the keychain with the right AES key."),(0,a.kt)("p",null,"This avoids disclosure of critical information and prevents unauthorized access."),(0,a.kt)("p",null,(0,a.kt)("img",{src:i(43719).Z,width:"767",height:"362"})),(0,a.kt)("h2",{id:"standard-compliance"},"Standard compliance"),(0,a.kt)("p",null,"Archethic decentralized identity and keychain concepts is also compliant with industry standard in the field of online and digital identity."),(0,a.kt)("p",null,"Then once created, the keychain embeds on-chain a representation of a ",(0,a.kt)("a",{parentName:"p",href:"https://www.w3.org/TR/did-core/"},"W3C DID (Decentralized Identitifier)")," document which help the discovery of your key materials."),(0,a.kt)("p",null,"It displays a JSON message with the list of public key you own and you allow other parties to interact with, such as your main Archethic public key or your Amazon public for example."),(0,a.kt)("p",null,"This coupled with ",(0,a.kt)("a",{parentName:"p",href:"https://www.w3.org/TR/vc-data-model/"},"verifiable credentials")," and ",(0,a.kt)("a",{parentName:"p",href:"https://webauthn.io/"},"WebAuthn (Website authentication without password)")," make the complete usage of decentralized identity possible."),(0,a.kt)("h2",{id:"customization"},"Customization"),(0,a.kt)("p",null,"Because this wallet should be your digital identity security, we can customize the services and way the keys are generated."),(0,a.kt)("p",null,"Each service in the keychain is joined with other customizable property:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"derivation path: this will inform how the key will be generated. For example, the default one is ",(0,a.kt)("inlineCode",{parentName:"li"},"m/650'/0/0")," informing we are using Archethic derivation method (",(0,a.kt)("inlineCode",{parentName:"li"},"650")," instead of the usual BIP44) and then the ",(0,a.kt)("inlineCode",{parentName:"li"},"0/0")," indicates the first account and the first key of the chain.")),(0,a.kt)("p",null,"But nothing prevent to add something like: ",(0,a.kt)("inlineCode",{parentName:"p"},"m/650'/Amazon/0")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"m/650'/JohnDoeUCO@!/0")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"curve: this indicates during the derivate key which elliptic curve we want to use. (Ed25519, NIST, Bitcoin curve)")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"hash algorithm: this is used in the transaction address generation from the key produced, by default it's associated to ",(0,a.kt)("inlineCode",{parentName:"p"},"sha256")," but if you want higher security you could use something like ",(0,a.kt)("inlineCode",{parentName:"p"},"sha3-512")," o ",(0,a.kt)("inlineCode",{parentName:"p"},"blake2b")))))}d.isMDXComponent=!0},43719:(e,t,i)=>{i.d(t,{Z:()=>n});const n=i.p+"assets/images/keychain-access-wallet-780a9e51e7490fb38fe1171ddd8e028f.svg"},24449:(e,t,i)=>{i.d(t,{Z:()=>n});const n="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDM3MS41NTA0NzYwNzQyMTg3NSAyNTguNTYyODA1MTc1NzgxMjUiIHdpZHRoPSIzNzEuNTUwNDc2MDc0MjE4NzUiIGhlaWdodD0iMjU4LjU2MjgwNTE3NTc4MTI1Ij4KICA8IS0tIHN2Zy1zb3VyY2U6ZXhjYWxpZHJhdyAtLT4KICAKICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgQGZvbnQtZmFjZSB7CiAgICAgICAgZm9udC1mYW1pbHk6ICJWaXJnaWwiOwogICAgICAgIHNyYzogdXJsKCJodHRwczovL2V4Y2FsaWRyYXcuY29tL1ZpcmdpbC53b2ZmMiIpOwogICAgICB9CiAgICAgIEBmb250LWZhY2UgewogICAgICAgIGZvbnQtZmFtaWx5OiAiQ2FzY2FkaWEiOwogICAgICAgIHNyYzogdXJsKCJodHRwczovL2V4Y2FsaWRyYXcuY29tL0Nhc2NhZGlhLndvZmYyIik7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAgMTApIHJvdGF0ZSgwIDQ5IDI0Ljc2NTY4NjAzNTE1NjI1KSI+PHBhdGggZD0iTS0xLjQ3IDAuNDkgQzMwLjgxIC0xLjc0LCA2MS44MyAtMS41NywgOTguMDUgLTEuMjIgTS0wLjI5IC0wLjQzIEMzMS4wNyAwLjMzLCA2My43NCAtMC4zNCwgOTguNSAwLjA1IE05Ni42IDAuOTYgQzk2LjQgMTEuNTgsIDEwMC4xNCAyMi40MywgOTcuODMgNTAuOSBNOTguMDYgMC4yNiBDOTguNSAxMC4yNywgOTguMzYgMjEuMjEsIDk3LjY3IDUwLjIyIE05Ny4yOSA0Ny44MiBDNjguODcgNTAuMSwgMzcuNjkgNTAuNjEsIDEuMDggNTAuMTIgTTk3LjggNDkuNTEgQzYwLjIzIDQ4Ljc4LCAyMi4wNyA1MC4zMiwgMC45MSA0OS44OSBNLTEuNDggNDguNjQgQy0wLjQ5IDMyLjg1LCAxLjA4IDE0LjcsIC0wLjM2IDEuODUgTTAuMzQgNDkuMjMgQy0wLjYxIDM3LjgxLCAtMC4xIDI4LjYzLCAwLjM5IDAuMTkiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE1IDIyLjI2NTY4NjAzNTE1NjI1KSByb3RhdGUoMCA0NCAxMi41KSI+PHRleHQgeD0iNDQiIHk9IjE4IiBmb250LWZhbWlseT0iVmlyZ2lsLCBTZWdvZSBVSSBFbW9qaSIgZm9udC1zaXplPSIyMHB4IiBmaWxsPSIjNWYzZGM0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBzdHlsZT0id2hpdGUtc3BhY2U6IHByZTsiIGRpcmVjdGlvbj0ibHRyIj5TZWVkPC90ZXh0PjwvZz48ZyBzdHJva2UtbGluZWNhcD0icm91bmQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU4LjQ5MjAwNDM5NDUzMTI1IDYzLjU2MjE5NDgyNDIxODc1KSByb3RhdGUoMCAtMC40MzE3NTc1MzQ0ODE1NjIzIDg4LjE0OTE4NjA4NDY4MDI1KSI+PHBhdGggZD0iTTAgMCBDLTAuMTQgMjkuMzgsIC0wLjcyIDE0Ni45MiwgLTAuODYgMTc2LjMgTTAgMCBDLTAuMTQgMjkuMzgsIC0wLjcyIDE0Ni45MiwgLTAuODYgMTc2LjMiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjwvZz48ZyBzdHJva2UtbGluZWNhcD0icm91bmQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU3LjI2OTQwOTE3OTY4NzUgMTA3Ljc0MDQ3ODUxNTYyNSkgcm90YXRlKDAgNjEuMzA4MjYyOTg0MDgyMDkgMC4yMDY2MjIwNDU5NjUxOTAxOCkiPjxwYXRoIGQ9Ik0tMC41OSAwLjgxIEMyMC4wMyAwLjc4LCAxMDIuNzIgLTAuNDEsIDEyMy4yIC0wLjQ3IE0xLjMxIDAuMTkgQzIxLjg5IDAuMzUsIDEwMi42OCAxLjEzLCAxMjIuNzMgMC44MiIgc3Ryb2tlPSIjNWYzZGM0IiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPjwvcGF0aD48L2c+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTcuMjY5NDA5MTc5Njg3NSAxMDcuNzQwNDc4NTE1NjI1KSByb3RhdGUoMCA2MS4zMDgyNjI5ODQwODIwOSAwLjIwNjYyMjA0NTk2NTE5MDE4KSI+PHBhdGggZD0iTTk1LjkxIDEyLjYzIEMxMDEuMDYgOC42NywgMTA5Ljg1IDQuMDEsIDEyMS44NiAtMC44OCBNOTQuNiAxMC4yOCBDMTAxLjkzIDkuMjEsIDEwOC4xNiA1LjYzLCAxMjIuOTYgMS4zNyIgc3Ryb2tlPSIjNWYzZGM0IiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPjwvcGF0aD48L2c+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTcuMjY5NDA5MTc5Njg3NSAxMDcuNzQwNDc4NTE1NjI1KSByb3RhdGUoMCA2MS4zMDgyNjI5ODQwODIwOSAwLjIwNjYyMjA0NTk2NTE5MDE4KSI+PHBhdGggZD0iTTk1Ljg5IC03LjkgQzEwMSAtNi41NiwgMTA5Ljc5IC01LjkxLCAxMjEuODYgLTAuODggTTk0LjU4IC0xMC4yNCBDMTAxLjc0IC02LjQxLCAxMDcuOTggLTUuMDksIDEyMi45NiAxLjM3IiBzdHJva2U9IiM1ZjNkYzQiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSI+PC9wYXRoPjwvZz48L2c+PGcgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2Mi41MTgyNDk1MTE3MTg3NSAxNzAuMjY4NTI0MTY5OTIxODgpIHJvdGF0ZSgwIDYxLjU1MzkyODE1MDI0NTk1IDAuMTIyNDM3NjEyMzM5ODY1NjEpIj48cGF0aCBkPSJNLTAuOTggMC44OCBDMTkuMTkgMC43NywgMTAwLjk4IC0wLjM2LCAxMjEuNjkgLTAuNjQgTTAuNzEgMC4zIEMyMS4yMiAwLjM0LCAxMDMuNyAwLjU5LCAxMjQuMDggMC41NiIgc3Ryb2tlPSIjNWYzZGM0IiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPjwvcGF0aD48L2c+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjIuNTE4MjQ5NTExNzE4NzUgMTcwLjI2ODUyNDE2OTkyMTg4KSByb3RhdGUoMCA2MS41NTM5MjgxNTAyNDU5NSAwLjEyMjQzNzYxMjMzOTg2NTYxKSI+PHBhdGggZD0iTTk3LjM2IDkuNzggQzEwNC45MSA4Ljk4LCAxMTQuNzkgMy45MywgMTI1Ljc2IDAuMzQgTTk1LjYyIDExLjM4IEMxMDUuNDIgOC4wNiwgMTE1LjAxIDQsIDEyMy43OSAxLjU1IiBzdHJva2U9IiM1ZjNkYzQiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSI+PC9wYXRoPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2Mi41MTgyNDk1MTE3MTg3NSAxNzAuMjY4NTI0MTY5OTIxODgpIHJvdGF0ZSgwIDYxLjU1MzkyODE1MDI0NTk1IDAuMTIyNDM3NjEyMzM5ODY1NjEpIj48cGF0aCBkPSJNOTcuMzggLTEwLjc0IEMxMDQuOTMgLTQuMTksIDExNC44MSAtMS44OSwgMTI1Ljc2IDAuMzQgTTk1LjY1IC05LjE0IEMxMDUuNjEgLTUuNTgsIDExNS4xOSAtMi43NiwgMTIzLjc5IDEuNTUiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMTQuNTUxMDg2NDI1NzgxMjUgOTMuMzAxODE4ODQ3NjU2MjUpIHJvdGF0ZSgwIDU5LjUgMTIuNSkiPjx0ZXh0IHg9IjAiIHk9IjE4IiBmb250LWZhbWlseT0iVmlyZ2lsLCBTZWdvZSBVSSBFbW9qaSIgZm9udC1zaXplPSIyMHB4IiBmaWxsPSIjMzY0ZmM3IiB0ZXh0LWFuY2hvcj0ic3RhcnQiIHN0eWxlPSJ3aGl0ZS1zcGFjZTogcHJlOyIgZGlyZWN0aW9uPSJsdHIiPldhbGxldCBVQ08xPC90ZXh0PjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMTMuMDQyMzU4Mzk4NDM3NSAxNTYuNjYyMjkyNDgwNDY4NzUpIHJvdGF0ZSgwIDY4LjUgMTIuNSkiPjx0ZXh0IHg9IjAiIHk9IjE4IiBmb250LWZhbWlseT0iVmlyZ2lsLCBTZWdvZSBVSSBFbW9qaSIgZm9udC1zaXplPSIyMHB4IiBmaWxsPSIjMmI4YTNlIiB0ZXh0LWFuY2hvcj0ic3RhcnQiIHN0eWxlPSJ3aGl0ZS1zcGFjZTogcHJlOyIgZGlyZWN0aW9uPSJsdHIiPldhbGxldCBCaXRjb2luPC90ZXh0PjwvZz48ZyBzdHJva2UtbGluZWNhcD0icm91bmQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU4LjMzMzY3OTE5OTIxODc1IDIzNy41NzYwMTkyODcxMDkzOCkgcm90YXRlKDAgNjYuNDAxMDMzMTUzOTQzNzMgMC41MzYyMTQ3Mzc5ODQ1MjI2KSI+PHBhdGggZD0iTTAuOTYgMC45MSBDMjMgMS4wMSwgMTEwLjU2IDEuMzgsIDEzMi44IDEuMzcgTTAuMDEgMC4zNSBDMjEuOCAwLjA0LCAxMDkuMjQgLTAuMDMsIDEzMS42IC0wLjMiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU4LjMzMzY3OTE5OTIxODc1IDIzNy41NzYwMTkyODcxMDkzOCkgcm90YXRlKDAgNjYuNDAxMDMzMTUzOTQzNzMgMC41MzYyMTQ3Mzc5ODQ1MjI2KSI+PHBhdGggZD0iTTEwNC45OSA5LjM0IEMxMTQuNTQgOC4xLCAxMjMuNDIgMS41NCwgMTMxLjI2IDAuMzMgTTEwMi42NSAxMC43IEMxMTIuOTkgNi44NiwgMTE5LjggMi43NiwgMTMxLjY2IC0wLjQxIiBzdHJva2U9IiM1ZjNkYzQiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSI+PC9wYXRoPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1OC4zMzM2NzkxOTkyMTg3NSAyMzcuNTc2MDE5Mjg3MTA5MzgpIHJvdGF0ZSgwIDY2LjQwMTAzMzE1Mzk0MzczIDAuNTM2MjE0NzM3OTg0NTIyNikiPjxwYXRoIGQ9Ik0xMDQuODcgLTExLjE4IEMxMTQuNiAtNS4zMywgMTIzLjUxIC00LjgsIDEzMS4yNiAwLjMzIE0xMDIuNTMgLTkuODIgQzExMi44OCAtNy40NSwgMTE5LjcyIC01LjM0LCAxMzEuNjYgLTAuNDEiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMTguNTUwNDc2MDc0MjE4NzUgMjIzLjU2MjgwNTE3NTc4MTI1KSByb3RhdGUoMCA3MS41IDEyLjUpIj48dGV4dCB4PSIwIiB5PSIxOCIgZm9udC1mYW1pbHk9IlZpcmdpbCwgU2Vnb2UgVUkgRW1vamkiIGZvbnQtc2l6ZT0iMjBweCIgZmlsbD0iI2Q5NDgwZiIgdGV4dC1hbmNob3I9InN0YXJ0IiBzdHlsZT0id2hpdGUtc3BhY2U6IHByZTsiIGRpcmVjdGlvbj0ibHRyIj5XYWxsZXQgQW1hem9uPC90ZXh0PjwvZz48L3N2Zz4="},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/8dbf302e.f71b9526.js b/assets/js/8dbf302e.f71b9526.js new file mode 100644 index 000000000..34aa43515 --- /dev/null +++ b/assets/js/8dbf302e.f71b9526.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9254],{3905:(e,t,i)=>{i.d(t,{Zo:()=>l,kt:()=>s});var n=i(67294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var I=n.createContext({}),o=function(e){var t=n.useContext(I),i=t;return e&&(i="function"==typeof e?e(t):r(r({},t),e)),i},l=function(e){var t=o(e.components);return n.createElement(I.Provider,{value:t},e.children)},g="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,c=e.originalType,I=e.parentName,l=M(e,["components","mdxType","originalType","parentName"]),g=o(i),u=a,s=g["".concat(I,".").concat(u)]||g[u]||d[u]||c;return i?n.createElement(s,r(r({ref:t},l),{},{components:i})):n.createElement(s,r({ref:t},l))}));function s(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=i.length,r=new Array(c);r[0]=u;var M={};for(var I in t)hasOwnProperty.call(t,I)&&(M[I]=t[I]);M.originalType=e,M[g]="string"==typeof e?e:a,r[1]=M;for(var o=2;o{i.r(t),i.d(t,{assets:()=>I,contentTitle:()=>r,default:()=>d,frontMatter:()=>c,metadata:()=>M,toc:()=>o});var n=i(87462),a=(i(67294),i(3905));i(8209);const c={id:"keychain",title:"Keychain"},r=void 0,M={unversionedId:"learn/decentralized-id/keychain",id:"learn/decentralized-id/keychain",title:"Keychain",description:"Archethic's keychain is new concept to make wallet accessible, configurable and interoperable with several service providers and why not multi chains.",source:"@site/docs/learn/decentralized-id/keychain.md",sourceDirName:"learn/decentralized-id",slug:"/learn/decentralized-id/keychain",permalink:"/learn/decentralized-id/keychain",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"keychain",title:"Keychain"},sidebar:"docs",previous:{title:"Decentralized Identity",permalink:"/learn/decentralized-id/"},next:{title:"Governance",permalink:"/learn/governance/"}},I={},o=[{value:"Key generation",id:"key-generation",level:2},{value:"End to end encryption",id:"end-to-end-encryption",level:2},{value:"Standard compliance",id:"standard-compliance",level:2},{value:"Customization",id:"customization",level:2}],l={toc:o},g="wrapper";function d(e){let{components:t,...c}=e;return(0,a.kt)(g,(0,n.Z)({},l,c,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic's keychain is new concept to make wallet accessible, configurable and interoperable with several service providers and why not multi chains."),(0,a.kt)("p",null,"It describes wallet which is stored encrypted on chain, as only you and the authorized access or person you allowed, to be able to decrypt and build transactions from it."),(0,a.kt)("h2",{id:"key-generation"},"Key generation"),(0,a.kt)("p",null,"Technically speaking, this wallet - also referenced as ",(0,a.kt)("inlineCode",{parentName:"p"},"Decentralized Identity")," - is made up of randomly generated ",(0,a.kt)("inlineCode",{parentName:"p"},"seed")," (root key) from which it's possible to generate all keys according to a path of derivation. "),(0,a.kt)("p",null,"So for any access to a service or an application, a key will be generated on the fly from the ",(0,a.kt)("inlineCode",{parentName:"p"},"seed")," (root key) and the first public key associated with a service or an application."),(0,a.kt)("p",null,"Thus allowing creating an infinite number of identities without even having to store related keys. "),(0,a.kt)("p",null,(0,a.kt)("img",{src:i(24449).Z,width:"372",height:"259"})),(0,a.kt)("h2",{id:"end-to-end-encryption"},"End to end encryption"),(0,a.kt)("p",null,"While this wallet or keychain being on-chain, it still remains secure as no other party (at least non authorized) can access with service keys. "),(0,a.kt)("p",null,"This is possible as we are using end to end encryption and elliptic curve cryptography."),(0,a.kt)("p",null,"Each keychain/wallet generated is embedded into a transaction encrypted using an AES key itself encrypted with a list of authorized keys or authenticated access (biometric, smartphone, USB, etc.)"),(0,a.kt)("p",null,"Once generated, we also create transactions for the access of this keychain.\nSo in other words, each access have its own transaction chain, where the keychain's location is encrypted as well."),(0,a.kt)("p",null,"Then in order to retrieve or access your keychain, your authentication method should retrieve its transaction chain, then decrypt the keychain's location, download the keychain transaction and finally decrypt the keychain with the right AES key."),(0,a.kt)("p",null,"This avoids disclosure of critical information and prevents unauthorized access."),(0,a.kt)("p",null,(0,a.kt)("img",{src:i(43719).Z,width:"767",height:"362"})),(0,a.kt)("h2",{id:"standard-compliance"},"Standard compliance"),(0,a.kt)("p",null,"Archethic decentralized identity and keychain concepts is also compliant with industry standard in the field of online and digital identity."),(0,a.kt)("p",null,"Then once created, the keychain embeds on-chain a representation of a ",(0,a.kt)("a",{parentName:"p",href:"https://www.w3.org/TR/did-core/"},"W3C DID (Decentralized Identitifier)")," document which help the discovery of your key materials."),(0,a.kt)("p",null,"It displays a JSON message with the list of public key you own and you allow other parties to interact with, such as your main Archethic public key or your Amazon public for example."),(0,a.kt)("p",null,"This coupled with ",(0,a.kt)("a",{parentName:"p",href:"https://www.w3.org/TR/vc-data-model/"},"verifiable credentials")," and ",(0,a.kt)("a",{parentName:"p",href:"https://webauthn.io/"},"WebAuthn (Website authentication without password)")," make the complete usage of decentralized identity possible."),(0,a.kt)("h2",{id:"customization"},"Customization"),(0,a.kt)("p",null,"Because this wallet should be your digital identity security, we can customize the services and way the keys are generated."),(0,a.kt)("p",null,"Each service in the keychain is joined with other customizable property:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"derivation path: this will inform how the key will be generated. For example, the default one is ",(0,a.kt)("inlineCode",{parentName:"li"},"m/650'/0/0")," informing we are using Archethic derivation method (",(0,a.kt)("inlineCode",{parentName:"li"},"650")," instead of the usual BIP44) and then the ",(0,a.kt)("inlineCode",{parentName:"li"},"0/0")," indicates the first account and the first key of the chain.")),(0,a.kt)("p",null,"But nothing prevent to add something like: ",(0,a.kt)("inlineCode",{parentName:"p"},"m/650'/Amazon/0")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"m/650'/JohnDoeUCO@!/0")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"curve: this indicates during the derivate key which elliptic curve we want to use. (Ed25519, NIST, Bitcoin curve)")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"hash algorithm: this is used in the transaction address generation from the key produced, by default it's associated to ",(0,a.kt)("inlineCode",{parentName:"p"},"sha256")," but if you want higher security you could use something like ",(0,a.kt)("inlineCode",{parentName:"p"},"sha3-512")," o ",(0,a.kt)("inlineCode",{parentName:"p"},"blake2b")))))}d.isMDXComponent=!0},43719:(e,t,i)=>{i.d(t,{Z:()=>n});const n=i.p+"assets/images/keychain-access-wallet-780a9e51e7490fb38fe1171ddd8e028f.svg"},24449:(e,t,i)=>{i.d(t,{Z:()=>n});const n="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDM3MS41NTA0NzYwNzQyMTg3NSAyNTguNTYyODA1MTc1NzgxMjUiIHdpZHRoPSIzNzEuNTUwNDc2MDc0MjE4NzUiIGhlaWdodD0iMjU4LjU2MjgwNTE3NTc4MTI1Ij4KICA8IS0tIHN2Zy1zb3VyY2U6ZXhjYWxpZHJhdyAtLT4KICAKICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgQGZvbnQtZmFjZSB7CiAgICAgICAgZm9udC1mYW1pbHk6ICJWaXJnaWwiOwogICAgICAgIHNyYzogdXJsKCJodHRwczovL2V4Y2FsaWRyYXcuY29tL1ZpcmdpbC53b2ZmMiIpOwogICAgICB9CiAgICAgIEBmb250LWZhY2UgewogICAgICAgIGZvbnQtZmFtaWx5OiAiQ2FzY2FkaWEiOwogICAgICAgIHNyYzogdXJsKCJodHRwczovL2V4Y2FsaWRyYXcuY29tL0Nhc2NhZGlhLndvZmYyIik7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAgMTApIHJvdGF0ZSgwIDQ5IDI0Ljc2NTY4NjAzNTE1NjI1KSI+PHBhdGggZD0iTS0xLjQ3IDAuNDkgQzMwLjgxIC0xLjc0LCA2MS44MyAtMS41NywgOTguMDUgLTEuMjIgTS0wLjI5IC0wLjQzIEMzMS4wNyAwLjMzLCA2My43NCAtMC4zNCwgOTguNSAwLjA1IE05Ni42IDAuOTYgQzk2LjQgMTEuNTgsIDEwMC4xNCAyMi40MywgOTcuODMgNTAuOSBNOTguMDYgMC4yNiBDOTguNSAxMC4yNywgOTguMzYgMjEuMjEsIDk3LjY3IDUwLjIyIE05Ny4yOSA0Ny44MiBDNjguODcgNTAuMSwgMzcuNjkgNTAuNjEsIDEuMDggNTAuMTIgTTk3LjggNDkuNTEgQzYwLjIzIDQ4Ljc4LCAyMi4wNyA1MC4zMiwgMC45MSA0OS44OSBNLTEuNDggNDguNjQgQy0wLjQ5IDMyLjg1LCAxLjA4IDE0LjcsIC0wLjM2IDEuODUgTTAuMzQgNDkuMjMgQy0wLjYxIDM3LjgxLCAtMC4xIDI4LjYzLCAwLjM5IDAuMTkiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE1IDIyLjI2NTY4NjAzNTE1NjI1KSByb3RhdGUoMCA0NCAxMi41KSI+PHRleHQgeD0iNDQiIHk9IjE4IiBmb250LWZhbWlseT0iVmlyZ2lsLCBTZWdvZSBVSSBFbW9qaSIgZm9udC1zaXplPSIyMHB4IiBmaWxsPSIjNWYzZGM0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBzdHlsZT0id2hpdGUtc3BhY2U6IHByZTsiIGRpcmVjdGlvbj0ibHRyIj5TZWVkPC90ZXh0PjwvZz48ZyBzdHJva2UtbGluZWNhcD0icm91bmQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU4LjQ5MjAwNDM5NDUzMTI1IDYzLjU2MjE5NDgyNDIxODc1KSByb3RhdGUoMCAtMC40MzE3NTc1MzQ0ODE1NjIzIDg4LjE0OTE4NjA4NDY4MDI1KSI+PHBhdGggZD0iTTAgMCBDLTAuMTQgMjkuMzgsIC0wLjcyIDE0Ni45MiwgLTAuODYgMTc2LjMgTTAgMCBDLTAuMTQgMjkuMzgsIC0wLjcyIDE0Ni45MiwgLTAuODYgMTc2LjMiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjwvZz48ZyBzdHJva2UtbGluZWNhcD0icm91bmQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU3LjI2OTQwOTE3OTY4NzUgMTA3Ljc0MDQ3ODUxNTYyNSkgcm90YXRlKDAgNjEuMzA4MjYyOTg0MDgyMDkgMC4yMDY2MjIwNDU5NjUxOTAxOCkiPjxwYXRoIGQ9Ik0tMC41OSAwLjgxIEMyMC4wMyAwLjc4LCAxMDIuNzIgLTAuNDEsIDEyMy4yIC0wLjQ3IE0xLjMxIDAuMTkgQzIxLjg5IDAuMzUsIDEwMi42OCAxLjEzLCAxMjIuNzMgMC44MiIgc3Ryb2tlPSIjNWYzZGM0IiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPjwvcGF0aD48L2c+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTcuMjY5NDA5MTc5Njg3NSAxMDcuNzQwNDc4NTE1NjI1KSByb3RhdGUoMCA2MS4zMDgyNjI5ODQwODIwOSAwLjIwNjYyMjA0NTk2NTE5MDE4KSI+PHBhdGggZD0iTTk1LjkxIDEyLjYzIEMxMDEuMDYgOC42NywgMTA5Ljg1IDQuMDEsIDEyMS44NiAtMC44OCBNOTQuNiAxMC4yOCBDMTAxLjkzIDkuMjEsIDEwOC4xNiA1LjYzLCAxMjIuOTYgMS4zNyIgc3Ryb2tlPSIjNWYzZGM0IiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPjwvcGF0aD48L2c+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTcuMjY5NDA5MTc5Njg3NSAxMDcuNzQwNDc4NTE1NjI1KSByb3RhdGUoMCA2MS4zMDgyNjI5ODQwODIwOSAwLjIwNjYyMjA0NTk2NTE5MDE4KSI+PHBhdGggZD0iTTk1Ljg5IC03LjkgQzEwMSAtNi41NiwgMTA5Ljc5IC01LjkxLCAxMjEuODYgLTAuODggTTk0LjU4IC0xMC4yNCBDMTAxLjc0IC02LjQxLCAxMDcuOTggLTUuMDksIDEyMi45NiAxLjM3IiBzdHJva2U9IiM1ZjNkYzQiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSI+PC9wYXRoPjwvZz48L2c+PGcgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2Mi41MTgyNDk1MTE3MTg3NSAxNzAuMjY4NTI0MTY5OTIxODgpIHJvdGF0ZSgwIDYxLjU1MzkyODE1MDI0NTk1IDAuMTIyNDM3NjEyMzM5ODY1NjEpIj48cGF0aCBkPSJNLTAuOTggMC44OCBDMTkuMTkgMC43NywgMTAwLjk4IC0wLjM2LCAxMjEuNjkgLTAuNjQgTTAuNzEgMC4zIEMyMS4yMiAwLjM0LCAxMDMuNyAwLjU5LCAxMjQuMDggMC41NiIgc3Ryb2tlPSIjNWYzZGM0IiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPjwvcGF0aD48L2c+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjIuNTE4MjQ5NTExNzE4NzUgMTcwLjI2ODUyNDE2OTkyMTg4KSByb3RhdGUoMCA2MS41NTM5MjgxNTAyNDU5NSAwLjEyMjQzNzYxMjMzOTg2NTYxKSI+PHBhdGggZD0iTTk3LjM2IDkuNzggQzEwNC45MSA4Ljk4LCAxMTQuNzkgMy45MywgMTI1Ljc2IDAuMzQgTTk1LjYyIDExLjM4IEMxMDUuNDIgOC4wNiwgMTE1LjAxIDQsIDEyMy43OSAxLjU1IiBzdHJva2U9IiM1ZjNkYzQiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSI+PC9wYXRoPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2Mi41MTgyNDk1MTE3MTg3NSAxNzAuMjY4NTI0MTY5OTIxODgpIHJvdGF0ZSgwIDYxLjU1MzkyODE1MDI0NTk1IDAuMTIyNDM3NjEyMzM5ODY1NjEpIj48cGF0aCBkPSJNOTcuMzggLTEwLjc0IEMxMDQuOTMgLTQuMTksIDExNC44MSAtMS44OSwgMTI1Ljc2IDAuMzQgTTk1LjY1IC05LjE0IEMxMDUuNjEgLTUuNTgsIDExNS4xOSAtMi43NiwgMTIzLjc5IDEuNTUiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMTQuNTUxMDg2NDI1NzgxMjUgOTMuMzAxODE4ODQ3NjU2MjUpIHJvdGF0ZSgwIDU5LjUgMTIuNSkiPjx0ZXh0IHg9IjAiIHk9IjE4IiBmb250LWZhbWlseT0iVmlyZ2lsLCBTZWdvZSBVSSBFbW9qaSIgZm9udC1zaXplPSIyMHB4IiBmaWxsPSIjMzY0ZmM3IiB0ZXh0LWFuY2hvcj0ic3RhcnQiIHN0eWxlPSJ3aGl0ZS1zcGFjZTogcHJlOyIgZGlyZWN0aW9uPSJsdHIiPldhbGxldCBVQ08xPC90ZXh0PjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMTMuMDQyMzU4Mzk4NDM3NSAxNTYuNjYyMjkyNDgwNDY4NzUpIHJvdGF0ZSgwIDY4LjUgMTIuNSkiPjx0ZXh0IHg9IjAiIHk9IjE4IiBmb250LWZhbWlseT0iVmlyZ2lsLCBTZWdvZSBVSSBFbW9qaSIgZm9udC1zaXplPSIyMHB4IiBmaWxsPSIjMmI4YTNlIiB0ZXh0LWFuY2hvcj0ic3RhcnQiIHN0eWxlPSJ3aGl0ZS1zcGFjZTogcHJlOyIgZGlyZWN0aW9uPSJsdHIiPldhbGxldCBCaXRjb2luPC90ZXh0PjwvZz48ZyBzdHJva2UtbGluZWNhcD0icm91bmQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU4LjMzMzY3OTE5OTIxODc1IDIzNy41NzYwMTkyODcxMDkzOCkgcm90YXRlKDAgNjYuNDAxMDMzMTUzOTQzNzMgMC41MzYyMTQ3Mzc5ODQ1MjI2KSI+PHBhdGggZD0iTTAuOTYgMC45MSBDMjMgMS4wMSwgMTEwLjU2IDEuMzgsIDEzMi44IDEuMzcgTTAuMDEgMC4zNSBDMjEuOCAwLjA0LCAxMDkuMjQgLTAuMDMsIDEzMS42IC0wLjMiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU4LjMzMzY3OTE5OTIxODc1IDIzNy41NzYwMTkyODcxMDkzOCkgcm90YXRlKDAgNjYuNDAxMDMzMTUzOTQzNzMgMC41MzYyMTQ3Mzc5ODQ1MjI2KSI+PHBhdGggZD0iTTEwNC45OSA5LjM0IEMxMTQuNTQgOC4xLCAxMjMuNDIgMS41NCwgMTMxLjI2IDAuMzMgTTEwMi42NSAxMC43IEMxMTIuOTkgNi44NiwgMTE5LjggMi43NiwgMTMxLjY2IC0wLjQxIiBzdHJva2U9IiM1ZjNkYzQiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSI+PC9wYXRoPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1OC4zMzM2NzkxOTkyMTg3NSAyMzcuNTc2MDE5Mjg3MTA5MzgpIHJvdGF0ZSgwIDY2LjQwMTAzMzE1Mzk0MzczIDAuNTM2MjE0NzM3OTg0NTIyNikiPjxwYXRoIGQ9Ik0xMDQuODcgLTExLjE4IEMxMTQuNiAtNS4zMywgMTIzLjUxIC00LjgsIDEzMS4yNiAwLjMzIE0xMDIuNTMgLTkuODIgQzExMi44OCAtNy40NSwgMTE5LjcyIC01LjM0LCAxMzEuNjYgLTAuNDEiIHN0cm9rZT0iIzVmM2RjNCIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIj48L3BhdGg+PC9nPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMTguNTUwNDc2MDc0MjE4NzUgMjIzLjU2MjgwNTE3NTc4MTI1KSByb3RhdGUoMCA3MS41IDEyLjUpIj48dGV4dCB4PSIwIiB5PSIxOCIgZm9udC1mYW1pbHk9IlZpcmdpbCwgU2Vnb2UgVUkgRW1vamkiIGZvbnQtc2l6ZT0iMjBweCIgZmlsbD0iI2Q5NDgwZiIgdGV4dC1hbmNob3I9InN0YXJ0IiBzdHlsZT0id2hpdGUtc3BhY2U6IHByZTsiIGRpcmVjdGlvbj0ibHRyIj5XYWxsZXQgQW1hem9uPC90ZXh0PjwvZz48L3N2Zz4="},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/9280a2e5.6ec7eb90.js b/assets/js/9280a2e5.214020e2.js similarity index 54% rename from assets/js/9280a2e5.6ec7eb90.js rename to assets/js/9280a2e5.214020e2.js index 186ec7fd9..7e23e3063 100644 --- a/assets/js/9280a2e5.6ec7eb90.js +++ b/assets/js/9280a2e5.214020e2.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2814],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=s(a),u=n,f=d["".concat(c,".").concat(u)]||d[u]||m[u]||l;return a?r.createElement(f,i(i({ref:t},p),{},{components:a})):r.createElement(f,i({ref:t},p))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,i=new Array(l);i[0]=u;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[d]="string"==typeof e?e:n,i[1]=o;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>d,SpecifiedBy:()=>m,assets:()=>s,contentTitle:()=>o,default:()=>y,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),l=a(3905);a(8209);const i={id:"hex",title:"Hex",hide_table_of_contents:!1},o=void 0,c={unversionedId:"build/api/schema/scalars/hex",id:"build/api/schema/scalars/hex",title:"Hex",description:"The [Hex] scalar type represents an hexadecimal",source:"@site/docs/build/api/schema/scalars/hex.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/hex",permalink:"/build/api/schema/scalars/hex",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"hex",title:"Hex",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Hash",permalink:"/build/api/schema/scalars/hash"},next:{title:"Int",permalink:"/build/api/schema/scalars/int"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,l.kt)(n.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:d,SpecifiedBy:m,Badge:u},b="wrapper";function y(e){let{components:t,...a}=e;return(0,l.kt)(b,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"The ","[Hex]"," scalar type represents an hexadecimal"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Hex\n")),(0,l.kt)("h3",{id:"member-of"},"Member of"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/authorized-key"},(0,l.kt)("inlineCode",{parentName:"a"},"AuthorizedKey"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,l.kt)(d,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/cross-validation-stamp"},(0,l.kt)("inlineCode",{parentName:"a"},"CrossValidationStamp"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,l.kt)(d,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ownership"},(0,l.kt)("inlineCode",{parentName:"a"},"Ownership"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,l.kt)(d,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,l.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,l.kt)(d,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,l.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2814],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),s=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=s(a),u=n,f=d["".concat(c,".").concat(u)]||d[u]||m[u]||l;return a?r.createElement(f,i(i({ref:t},p),{},{components:a})):r.createElement(f,i({ref:t},p))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,i=new Array(l);i[0]=u;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[d]="string"==typeof e?e:n,i[1]=o;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>d,SpecifiedBy:()=>m,assets:()=>s,contentTitle:()=>o,default:()=>y,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),l=a(3905);a(8209);const i={id:"hex",title:"Hex",hide_table_of_contents:!1},o=void 0,c={unversionedId:"build/api/schema/scalars/hex",id:"build/api/schema/scalars/hex",title:"Hex",description:"The [Hex] scalar type represents an hexadecimal",source:"@site/docs/build/api/schema/scalars/hex.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/hex",permalink:"/build/api/schema/scalars/hex",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"hex",title:"Hex",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Hash",permalink:"/build/api/schema/scalars/hash"},next:{title:"Int",permalink:"/build/api/schema/scalars/int"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,l.kt)(n.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:d,SpecifiedBy:m,Badge:u},b="wrapper";function y(e){let{components:t,...a}=e;return(0,l.kt)(b,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"The ","[Hex]"," scalar type represents an hexadecimal"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Hex\n")),(0,l.kt)("h3",{id:"member-of"},"Member of"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/authorized-key"},(0,l.kt)("inlineCode",{parentName:"a"},"AuthorizedKey"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,l.kt)(d,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/cross-validation-stamp"},(0,l.kt)("inlineCode",{parentName:"a"},"CrossValidationStamp"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,l.kt)(d,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ownership"},(0,l.kt)("inlineCode",{parentName:"a"},"Ownership"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,l.kt)(d,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,l.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,l.kt)(d,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,l.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,l.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/9327017b.4b08d991.js b/assets/js/9327017b.4b08d991.js deleted file mode 100644 index 796586e0d..000000000 --- a/assets/js/9327017b.4b08d991.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8016],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),i=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=i(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=i(a),u=r,b=p["".concat(c,".").concat(u)]||p[u]||m[u]||o;return a?n.createElement(b,l(l({ref:t},d),{},{components:a})):n.createElement(b,l({ref:t},d))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:r,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>i,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var n=a(87462),r=a(67294),o=a(3905);a(8209);const l={id:"data",title:"Data",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/objects/data",id:"build/api/schema/objects/data",title:"Data",description:"[TransactionData] represents the data section for every transaction.",source:"@site/docs/build/api/schema/objects/data.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/data",permalink:"/build/api/schema/objects/data",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"data",title:"Data",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"CrossValidationStamp",permalink:"/build/api/schema/objects/cross-validation-stamp"},next:{title:"Endpoint",permalink:"/build/api/schema/objects/endpoint"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'Data.codeString ',id:"code-style-fontweight-normal-databcodebcodestring-",level:4},{value:'Data.contentContent ',id:"code-style-fontweight-normal-databcontentbcodecontent-",level:4},{value:'Data.ledgerLedger ',id:"code-style-fontweight-normal-databledgerbcodeledger-",level:4},{value:'Data.ownerships[Ownership] ',id:"code-style-fontweight-normal-databownershipsbcodeownership--",level:4},{value:'Data.recipients[Address] ',id:"code-style-fontweight-normal-databrecipientsbcodeaddress--",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:m,Badge:u},f="wrapper";function h(e){let{components:t,...a}=e;return(0,o.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TransactionData]"," represents the data section for every transaction.\nIt includes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Ledger: asset transfers"),(0,o.kt)("li",{parentName:"ul"},"Code: smart contract code (hexadecimal),"),(0,o.kt)("li",{parentName:"ul"},"Content: free zone for data hosting (string or hexadecimal)"),(0,o.kt)("li",{parentName:"ul"},"Ownership: authorization/delegations containing list of secrets and their authorized public keys to proof the ownership"),(0,o.kt)("li",{parentName:"ul"},"Recipients: For non asset transfers, the list of recipients of the transaction (e.g Smart contract interactions)")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type Data {\n code: String\n content: Content\n ledger: Ledger\n ownerships: [Ownership]\n recipients: [Address]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databcodebcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"code"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databcontentbcodecontent-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"content"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/content"},(0,o.kt)("inlineCode",{parentName:"a"},"Content"))," ",(0,o.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databledgerbcodeledger-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"ledger"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"Ledger"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databownershipsbcodeownership--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"ownerships"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/ownership"},(0,o.kt)("inlineCode",{parentName:"a"},"[Ownership]"))," ",(0,o.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databrecipientsbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"recipients"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"[Address]"))," ",(0,o.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/9327017b.e91bf2f8.js b/assets/js/9327017b.e91bf2f8.js new file mode 100644 index 000000000..7dcbe7509 --- /dev/null +++ b/assets/js/9327017b.e91bf2f8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8016],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),i=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=i(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=i(a),u=r,b=p["".concat(c,".").concat(u)]||p[u]||m[u]||o;return a?n.createElement(b,l(l({ref:t},d),{},{components:a})):n.createElement(b,l({ref:t},d))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:r,l[1]=s;for(var i=2;i{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>i,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var n=a(87462),r=a(67294),o=a(3905);a(8209);const l={id:"data",title:"Data",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/objects/data",id:"build/api/schema/objects/data",title:"Data",description:"[TransactionData] represents the data section for every transaction.",source:"@site/docs/build/api/schema/objects/data.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/data",permalink:"/build/api/schema/objects/data",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"data",title:"Data",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"CrossValidationStamp",permalink:"/build/api/schema/objects/cross-validation-stamp"},next:{title:"Endpoint",permalink:"/build/api/schema/objects/endpoint"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'Data.codeString ',id:"code-style-fontweight-normal-databcodebcodestring-",level:4},{value:'Data.contentContent ',id:"code-style-fontweight-normal-databcontentbcodecontent-",level:4},{value:'Data.ledgerLedger ',id:"code-style-fontweight-normal-databledgerbcodeledger-",level:4},{value:'Data.ownerships[Ownership] ',id:"code-style-fontweight-normal-databownershipsbcodeownership--",level:4},{value:'Data.recipients[Address] ',id:"code-style-fontweight-normal-databrecipientsbcodeaddress--",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:m,Badge:u},f="wrapper";function h(e){let{components:t,...a}=e;return(0,o.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TransactionData]"," represents the data section for every transaction.\nIt includes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Ledger: asset transfers"),(0,o.kt)("li",{parentName:"ul"},"Code: smart contract code (hexadecimal),"),(0,o.kt)("li",{parentName:"ul"},"Content: free zone for data hosting (string or hexadecimal)"),(0,o.kt)("li",{parentName:"ul"},"Ownership: authorization/delegations containing list of secrets and their authorized public keys to proof the ownership"),(0,o.kt)("li",{parentName:"ul"},"Recipients: For non asset transfers, the list of recipients of the transaction (e.g Smart contract interactions)")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type Data {\n code: String\n content: Content\n ledger: Ledger\n ownerships: [Ownership]\n recipients: [Address]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databcodebcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"code"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databcontentbcodecontent-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"content"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/content"},(0,o.kt)("inlineCode",{parentName:"a"},"Content"))," ",(0,o.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databledgerbcodeledger-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"ledger"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"Ledger"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databownershipsbcodeownership--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"ownerships"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/ownership"},(0,o.kt)("inlineCode",{parentName:"a"},"[Ownership]"))," ",(0,o.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-databrecipientsbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Data.",(0,o.kt)("b",null,"recipients"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"[Address]"))," ",(0,o.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.43073d4a.js b/assets/js/935f2afb.43073d4a.js new file mode 100644 index 000000000..c18ef4266 --- /dev/null +++ b/assets/js/935f2afb.43073d4a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"category","label":"Learn","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"UCO token","href":"/learn/uco","docId":"learn/uco"},{"type":"link","label":"Ecosystem","href":"/learn/ecosystem","docId":"learn/ecosystem"},{"type":"link","label":"Patents","href":"/learn/patents","docId":"learn/patents"},{"type":"link","label":"Transaction chains","href":"/learn/transaction-chain","docId":"learn/transaction-chain"},{"type":"link","label":"Transaction fees","href":"/learn/fee","docId":"learn/fee"},{"type":"link","label":"Transaction types","href":"/learn/transaction-types","docId":"learn/transaction-types"},{"type":"category","label":"ARCH consensus","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Proof of Work","href":"/learn/arch-consensus/proof-of-work","docId":"learn/arch-consensus/proof-of-work"}],"href":"/learn/arch-consensus/"},{"type":"category","label":"Cryptography","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Hardware Root of Trust","href":"/learn/cryptography/hardware-root-of-trust","docId":"learn/cryptography/hardware-root-of-trust"}],"href":"/learn/cryptography/"},{"type":"category","label":"Decentralized Identity","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Keychain","href":"/learn/decentralized-id/keychain","docId":"learn/decentralized-id/keychain"}],"href":"/learn/decentralized-id/"},{"type":"link","label":"Governance","href":"/learn/governance/","docId":"learn/governance/governance"},{"type":"link","label":"OracleChain","href":"/learn/oracle-chain","docId":"learn/oracle-chain"},{"type":"category","label":"P2P","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Bootstrapping","href":"/learn/p2p/bootstrapping","docId":"learn/p2p/bootstrapping"},{"type":"link","label":"Self Repair","href":"/learn/p2p/self-repair","docId":"learn/p2p/self-repair"}],"href":"/learn/p2p/"},{"type":"category","label":"Sharding","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Beacon Chain","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Beacon Explorer","href":"/learn/sharding/beacon-chain/explorer","docId":"learn/sharding/beacon-chain/explorer"}],"href":"/learn/sharding/beacon-chain/"},{"type":"link","label":"Replication attestation","href":"/learn/sharding/replication-attestation","docId":"learn/sharding/replication-attestation"}],"href":"/learn/sharding/"},{"type":"link","label":"Tokens","href":"/learn/token","docId":"learn/token"}],"href":"/learn/"},{"type":"category","label":"Participate","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Archethic Web (AEWeb)","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"How it works","href":"/participate/aeweb/how-it-works","docId":"participate/aeweb/how-it-works"},{"type":"link","label":"Domain Names","href":"/participate/aeweb/dns","docId":"participate/aeweb/dns"},{"type":"category","label":"Usage","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"CLI","href":"/participate/aeweb/usage/cli","docId":"participate/aeweb/usage/cli"},{"type":"link","label":"AEWeb Front End","href":"/participate/aeweb/usage/aeweb-front","docId":"participate/aeweb/usage/aeweb-front"}],"href":"/category/usage"},{"type":"link","label":"Automate deployments","href":"/participate/aeweb/automation","docId":"participate/aeweb/automation"}],"href":"/participate/aeweb/"},{"type":"category","label":"Archethic\'s bridge","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Usage","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Bridge Front End","href":"/participate/bridge/usage/bridge-front","docId":"participate/bridge/usage/bridge-front"}],"href":"/category/usage-1"}],"href":"/participate/bridge/"},{"type":"link","label":"Archethic\'s CLI","href":"/participate/cli/","docId":"participate/cli/archethic-cli"},{"type":"category","label":"Archethic\'s DEX","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Usage","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"aeSwap","href":"/participate/dex/usage/aeSwap","docId":"participate/dex/usage/aeSwap"}],"href":"/category/usage-2"}],"href":"/participate/dex/"},{"type":"category","label":"Archethic Wallet","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Communication with DApps","href":"/participate/wallet/dapps-communication","docId":"participate/wallet/dapps-communication"}],"href":"/participate/wallet/"}],"href":"/category/participate"},{"type":"category","label":"Build","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Clients","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Ledger wallet","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Ledger Application API","href":"/build/clients/ledger-wallet/api","docId":"build/clients/ledger-wallet/api"},{"type":"link","label":"ADPU commands","href":"/build/clients/ledger-wallet/commands","docId":"build/clients/ledger-wallet/commands"}],"href":"/build/clients/ledger-wallet/"},{"type":"link","label":"Archethic\'s wallet access","href":"/build/clients/wallet-access","docId":"build/clients/wallet-access"},{"type":"link","label":"Archethic\'s wallet specification","href":"/build/clients/wallet-spec","docId":"build/clients/wallet-spec"}],"href":"/category/clients"},{"type":"category","label":"API","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"GraphQL","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Schema Documentation","href":"/schema","className":"navbar__toggle","docId":"build/api/schema/schema"},{"type":"category","label":"Directives","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"include","href":"/build/api/schema/directives/include","docId":"build/api/schema/directives/include"},{"type":"link","label":"skip","href":"/build/api/schema/directives/skip","docId":"build/api/schema/directives/skip"}]},{"type":"category","label":"Enums","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"ErrorContext","href":"/build/api/schema/enums/error-context","docId":"build/api/schema/enums/error-context"},{"type":"link","label":"SortOrder","href":"/build/api/schema/enums/sort-order","docId":"build/api/schema/enums/sort-order"}]},{"type":"category","label":"Objects","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"AuthorizedKey","href":"/build/api/schema/objects/authorized-key","docId":"build/api/schema/objects/authorized-key"},{"type":"link","label":"Balance","href":"/build/api/schema/objects/balance","docId":"build/api/schema/objects/balance"},{"type":"link","label":"BeaconChainSummary","href":"/build/api/schema/objects/beacon-chain-summary","docId":"build/api/schema/objects/beacon-chain-summary"},{"type":"link","label":"CrossValidationStamp","href":"/build/api/schema/objects/cross-validation-stamp","docId":"build/api/schema/objects/cross-validation-stamp"},{"type":"link","label":"Data","href":"/build/api/schema/objects/data","docId":"build/api/schema/objects/data"},{"type":"link","label":"Endpoint","href":"/build/api/schema/objects/endpoint","docId":"build/api/schema/objects/endpoint"},{"type":"link","label":"LedgerOperations","href":"/build/api/schema/objects/ledger-operations","docId":"build/api/schema/objects/ledger-operations"},{"type":"link","label":"Ledger","href":"/build/api/schema/objects/ledger","docId":"build/api/schema/objects/ledger"},{"type":"link","label":"Node","href":"/build/api/schema/objects/node","docId":"build/api/schema/objects/node"},{"type":"link","label":"OracleData","href":"/build/api/schema/objects/oracle-data","docId":"build/api/schema/objects/oracle-data"},{"type":"link","label":"OracleServices","href":"/build/api/schema/objects/oracle-services","docId":"build/api/schema/objects/oracle-services"},{"type":"link","label":"Ownership","href":"/build/api/schema/objects/ownership","docId":"build/api/schema/objects/ownership"},{"type":"link","label":"SharedSecrets","href":"/build/api/schema/objects/shared-secrets","docId":"build/api/schema/objects/shared-secrets"},{"type":"link","label":"TokenBalance","href":"/build/api/schema/objects/token-balance","docId":"build/api/schema/objects/token-balance"},{"type":"link","label":"TokenLedger","href":"/build/api/schema/objects/token-ledger","docId":"build/api/schema/objects/token-ledger"},{"type":"link","label":"TokenTransfer","href":"/build/api/schema/objects/token-transfer","docId":"build/api/schema/objects/token-transfer"},{"type":"link","label":"Token","href":"/build/api/schema/objects/token","docId":"build/api/schema/objects/token"},{"type":"link","label":"TransactionAttestation","href":"/build/api/schema/objects/transaction-attestation","docId":"build/api/schema/objects/transaction-attestation"},{"type":"link","label":"TransactionError","href":"/build/api/schema/objects/transaction-error","docId":"build/api/schema/objects/transaction-error"},{"type":"link","label":"TransactionInput","href":"/build/api/schema/objects/transaction-input","docId":"build/api/schema/objects/transaction-input"},{"type":"link","label":"TransactionMovement","href":"/build/api/schema/objects/transaction-movement","docId":"build/api/schema/objects/transaction-movement"},{"type":"link","label":"TransactionSummary","href":"/build/api/schema/objects/transaction-summary","docId":"build/api/schema/objects/transaction-summary"},{"type":"link","label":"Transaction","href":"/build/api/schema/objects/transaction","docId":"build/api/schema/objects/transaction"},{"type":"link","label":"UcoData","href":"/build/api/schema/objects/uco-data","docId":"build/api/schema/objects/uco-data"},{"type":"link","label":"UcoLedger","href":"/build/api/schema/objects/uco-ledger","docId":"build/api/schema/objects/uco-ledger"},{"type":"link","label":"UcoTransfer","href":"/build/api/schema/objects/uco-transfer","docId":"build/api/schema/objects/uco-transfer"},{"type":"link","label":"UnspentOutput","href":"/build/api/schema/objects/unspent-output","docId":"build/api/schema/objects/unspent-output"},{"type":"link","label":"ValidationStamp","href":"/build/api/schema/objects/validation-stamp","docId":"build/api/schema/objects/validation-stamp"},{"type":"link","label":"Version","href":"/build/api/schema/objects/version","docId":"build/api/schema/objects/version"}]},{"type":"category","label":"Queries","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"balance","href":"/build/api/schema/queries/balance","docId":"build/api/schema/queries/balance"},{"type":"link","label":"beaconChainSummary","href":"/build/api/schema/queries/beacon-chain-summary","docId":"build/api/schema/queries/beacon-chain-summary"},{"type":"link","label":"genesisAddress","href":"/build/api/schema/queries/genesis-address","docId":"build/api/schema/queries/genesis-address"},{"type":"link","label":"lastTransaction","href":"/build/api/schema/queries/last-transaction","docId":"build/api/schema/queries/last-transaction"},{"type":"link","label":"nearestEndpoints","href":"/build/api/schema/queries/nearest-endpoints","docId":"build/api/schema/queries/nearest-endpoints"},{"type":"link","label":"networkTransactions","href":"/build/api/schema/queries/network-transactions","docId":"build/api/schema/queries/network-transactions"},{"type":"link","label":"nodes","href":"/build/api/schema/queries/nodes","docId":"build/api/schema/queries/nodes"},{"type":"link","label":"oracleData","href":"/build/api/schema/queries/oracle-data","docId":"build/api/schema/queries/oracle-data"},{"type":"link","label":"sharedSecrets","href":"/build/api/schema/queries/shared-secrets","docId":"build/api/schema/queries/shared-secrets"},{"type":"link","label":"token","href":"/build/api/schema/queries/token","docId":"build/api/schema/queries/token"},{"type":"link","label":"transactionChain","href":"/build/api/schema/queries/transaction-chain","docId":"build/api/schema/queries/transaction-chain"},{"type":"link","label":"transactionInputs","href":"/build/api/schema/queries/transaction-inputs","docId":"build/api/schema/queries/transaction-inputs"},{"type":"link","label":"transaction","href":"/build/api/schema/queries/transaction","docId":"build/api/schema/queries/transaction"},{"type":"link","label":"transactions","href":"/build/api/schema/queries/transactions","docId":"build/api/schema/queries/transactions"},{"type":"link","label":"version","href":"/build/api/schema/queries/version","docId":"build/api/schema/queries/version"}]},{"type":"category","label":"Scalars","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Address","href":"/build/api/schema/scalars/address","docId":"build/api/schema/scalars/address"},{"type":"link","label":"Boolean","href":"/build/api/schema/scalars/boolean","docId":"build/api/schema/scalars/boolean"},{"type":"link","label":"Content","href":"/build/api/schema/scalars/content","docId":"build/api/schema/scalars/content"},{"type":"link","label":"Float","href":"/build/api/schema/scalars/float","docId":"build/api/schema/scalars/float"},{"type":"link","label":"Hash","href":"/build/api/schema/scalars/hash","docId":"build/api/schema/scalars/hash"},{"type":"link","label":"Hex","href":"/build/api/schema/scalars/hex","docId":"build/api/schema/scalars/hex"},{"type":"link","label":"Int","href":"/build/api/schema/scalars/int","docId":"build/api/schema/scalars/int"},{"type":"link","label":"NonNegInteger","href":"/build/api/schema/scalars/non-neg-integer","docId":"build/api/schema/scalars/non-neg-integer"},{"type":"link","label":"P2pAvailabilities","href":"/build/api/schema/scalars/p2-p-availabilities","docId":"build/api/schema/scalars/p2-p-availabilities"},{"type":"link","label":"PosInteger","href":"/build/api/schema/scalars/pos-integer","docId":"build/api/schema/scalars/pos-integer"},{"type":"link","label":"PublicKey","href":"/build/api/schema/scalars/public-key","docId":"build/api/schema/scalars/public-key"},{"type":"link","label":"String","href":"/build/api/schema/scalars/string","docId":"build/api/schema/scalars/string"},{"type":"link","label":"Timestamp","href":"/build/api/schema/scalars/timestamp","docId":"build/api/schema/scalars/timestamp"},{"type":"link","label":"TokenProperties","href":"/build/api/schema/scalars/token-properties","docId":"build/api/schema/scalars/token-properties"},{"type":"link","label":"TransactionType","href":"/build/api/schema/scalars/transaction-type","docId":"build/api/schema/scalars/transaction-type"}]},{"type":"category","label":"Subscriptions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"oracleUpdate","href":"/build/api/schema/subscriptions/oracle-update","docId":"build/api/schema/subscriptions/oracle-update"},{"type":"link","label":"transactionConfirmed","href":"/build/api/schema/subscriptions/transaction-confirmed","docId":"build/api/schema/subscriptions/transaction-confirmed"},{"type":"link","label":"transactionError","href":"/build/api/schema/subscriptions/transaction-error","docId":"build/api/schema/subscriptions/transaction-error"}]}],"href":"/category/graphql"}],"href":"/category/api"},{"type":"category","label":"Core development","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Account","href":"/build/core/account","docId":"build/core/account"},{"type":"category","label":"BeaconChain","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"P2P availability sampling","href":"/build/core/beacon-chain/p2p-sampling","docId":"build/core/beacon-chain/p2p-sampling"}],"href":"/build/core/beacon-chain/"},{"type":"link","label":"Bootstrap","href":"/build/core/bootstrap","docId":"build/core/bootstrap"},{"type":"category","label":"Cryptography","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"TPM Implementation","href":"/build/core/cryptography/tpm","docId":"build/core/cryptography/tpm"},{"type":"link","label":"Yubikey implementation","href":"/build/core/cryptography/yubikey","docId":"build/core/cryptography/yubikey"}],"href":"/build/core/cryptography/"},{"type":"link","label":"Archethic\'s database","href":"/build/core/database","docId":"build/core/database"},{"type":"link","label":"Election","href":"/build/core/election","docId":"build/core/election"},{"type":"category","label":"governance","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"CD","href":"/build/core/governance/code-proposals-cd","docId":"build/core/governance/code-proposals-cd"},{"type":"link","label":"CI","href":"/build/core/governance/code-proposals-ci","docId":"build/core/governance/code-proposals-ci"},{"type":"link","label":"Code Proposals","href":"/build/core/governance/code-proposals","docId":"build/core/governance/code-proposals"}]},{"type":"category","label":"Mining","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Pending transaction validation","href":"/build/core/mining/transaction-validation","docId":"build/core/mining/transaction-validation"},{"type":"link","label":"Proof of Work algorithm","href":"/build/core/mining/proof-of-work","docId":"build/core/mining/proof-of-work"},{"type":"link","label":"Transaction context retrieval","href":"/build/core/mining/transaction-context","docId":"build/core/mining/transaction-context"}],"href":"/build/core/mining/"},{"type":"category","label":"OracleChain","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Memory database","href":"/build/core/oracle-chain/memory-table","docId":"build/core/oracle-chain/memory-table"},{"type":"link","label":"Scheduler","href":"/build/core/oracle-chain/scheduler","docId":"build/core/oracle-chain/scheduler"},{"type":"link","label":"Service","href":"/build/core/oracle-chain/service","docId":"build/core/oracle-chain/service"}],"href":"/build/core/oracle-chain/"},{"type":"category","label":"P2P","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Messaging","href":"/build/core/p2p/messaging","docId":"build/core/p2p/messaging"},{"type":"link","label":"Node","href":"/build/core/p2p/node","docId":"build/core/p2p/node"}],"href":"/build/core/p2p/"}],"href":"/build/core/"},{"type":"category","label":"SDK","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Dart SDK","href":"/build/sdk/dart","docId":"build/sdk/dart"},{"type":"link","label":"Go SDK","href":"/build/sdk/go","docId":"build/sdk/go"},{"type":"link","label":"Javascript SDK","href":"/build/sdk/js","docId":"build/sdk/js"}],"href":"/build/sdk/"},{"type":"category","label":"Smart Contracts","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Language","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Triggers","href":"/build/smart-contracts/language/triggers","docId":"build/smart-contracts/language/triggers"},{"type":"link","label":"Condition","href":"/build/smart-contracts/language/condition","docId":"build/smart-contracts/language/condition"},{"type":"link","label":"Actions","href":"/build/smart-contracts/language/actions","docId":"build/smart-contracts/language/actions"},{"type":"link","label":"Library","href":"/build/smart-contracts/language/library","docId":"build/smart-contracts/language/library"},{"type":"link","label":"Examples","href":"/build/smart-contracts/language/examples","docId":"build/smart-contracts/language/examples"},{"type":"category","label":"Legacy","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Examples","href":"/build/smart-contracts/language/legacy/examples","docId":"build/smart-contracts/language/legacy/examples"},{"type":"link","label":"Language","href":"/build/smart-contracts/language/legacy/language","docId":"build/smart-contracts/language/legacy/language"}],"href":"/build/smart-contracts/language/legacy/"}],"href":"/build/smart-contracts/language/"},{"type":"category","label":"Playground","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Build","href":"/build/smart-contracts/playground/build","docId":"build/smart-contracts/playground/build"},{"type":"link","label":"Deploy","href":"/build/smart-contracts/playground/deploy","docId":"build/smart-contracts/playground/deploy"},{"type":"link","label":"Function calls","href":"/build/smart-contracts/playground/functions","docId":"build/smart-contracts/playground/functions"},{"type":"link","label":"Transaction form","href":"/build/smart-contracts/playground/transaction-form","docId":"build/smart-contracts/playground/transaction-form"},{"type":"link","label":"Mock form","href":"/build/smart-contracts/playground/mock-form","docId":"build/smart-contracts/playground/mock-form"}],"href":"/build/smart-contracts/playground/"},{"type":"link","label":"Fees","href":"/build/smart-contracts/fees","docId":"build/smart-contracts/fees"}],"href":"/build/smart-contracts/"},{"type":"link","label":"Testnet","href":"/build/testnet","docId":"build/testnet"}],"href":"/category/build"},{"type":"category","label":"FAQ","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"AEWeb","href":"/FAQ/aeweb","docId":"FAQ/aeweb"},{"type":"link","label":"Archethic Bridge 2-ways","href":"/FAQ/bridge-2-ways","docId":"FAQ/bridge-2-ways"},{"type":"link","label":"Archethic Bridge $UCO one-way","href":"/FAQ/bridge","docId":"FAQ/bridge"},{"type":"link","label":"Archethic aeSwap","href":"/FAQ/dex","docId":"FAQ/dex"},{"type":"link","label":"Wallet","href":"/FAQ/wallet","docId":"FAQ/wallet"}],"href":"/category/faq"},{"type":"link","label":"Contributing","href":"/contributing","docId":"contributing"}]},"docs":{"build/api/schema/directives/include":{"id":"build/api/schema/directives/include","title":"include","description":"Directs the executor to include this field or fragment only when the if argument is true.","sidebar":"docs"},"build/api/schema/directives/skip":{"id":"build/api/schema/directives/skip","title":"skip","description":"Directs the executor to skip this field or fragment when the if argument is true.","sidebar":"docs"},"build/api/schema/enums/error-context":{"id":"build/api/schema/enums/error-context","title":"ErrorContext","description":"Transaction error context","sidebar":"docs"},"build/api/schema/enums/sort-order":{"id":"build/api/schema/enums/sort-order","title":"SortOrder","description":"SortOrder represents the order of the result","sidebar":"docs"},"build/api/schema/objects/authorized-key":{"id":"build/api/schema/objects/authorized-key","title":"AuthorizedKey","description":"[AuthorizedKey] represents a authorized public key with the encrypted secret key for this given key.","sidebar":"docs"},"build/api/schema/objects/balance":{"id":"build/api/schema/objects/balance","title":"Balance","description":"[Balance] represents a ledger balance.","sidebar":"docs"},"build/api/schema/objects/beacon-chain-summary":{"id":"build/api/schema/objects/beacon-chain-summary","title":"BeaconChainSummary","description":"[Beacon Chain Summary] represents the beacon chain aggregate for a certain date","sidebar":"docs"},"build/api/schema/objects/cross-validation-stamp":{"id":"build/api/schema/objects/cross-validation-stamp","title":"CrossValidationStamp","description":"[CrossValidationStamp] represents the approval of the validation stamp by a cross validation node.","sidebar":"docs"},"build/api/schema/objects/data":{"id":"build/api/schema/objects/data","title":"Data","description":"[TransactionData] represents the data section for every transaction.","sidebar":"docs"},"build/api/schema/objects/endpoint":{"id":"build/api/schema/objects/endpoint","title":"Endpoint","description":"[Endpoint] represents a network node\'s endpoint","sidebar":"docs"},"build/api/schema/objects/ledger":{"id":"build/api/schema/objects/ledger","title":"Ledger","description":"[Ledger] represents the ledger operations to perform","sidebar":"docs"},"build/api/schema/objects/ledger-operations":{"id":"build/api/schema/objects/ledger-operations","title":"LedgerOperations","description":"[LedgerOperations] represents the ledger operations performed by the transaction","sidebar":"docs"},"build/api/schema/objects/node":{"id":"build/api/schema/objects/node","title":"Node","description":"[Node] represents a node in the network","sidebar":"docs"},"build/api/schema/objects/oracle-data":{"id":"build/api/schema/objects/oracle-data","title":"OracleData","description":"[OracleData] represents an oracle data.","sidebar":"docs"},"build/api/schema/objects/oracle-services":{"id":"build/api/schema/objects/oracle-services","title":"OracleServices","description":"No description","sidebar":"docs"},"build/api/schema/objects/ownership":{"id":"build/api/schema/objects/ownership","title":"Ownership","description":"[Ownership] represents a block to set a secret and the authorized public keys able to decrypt the secret","sidebar":"docs"},"build/api/schema/objects/shared-secrets":{"id":"build/api/schema/objects/shared-secrets","title":"SharedSecrets","description":"[SharedSecrets] represents the public shared secret information","sidebar":"docs"},"build/api/schema/objects/token":{"id":"build/api/schema/objects/token","title":"Token","description":"[token] represents a token metadata.","sidebar":"docs"},"build/api/schema/objects/token-balance":{"id":"build/api/schema/objects/token-balance","title":"TokenBalance","description":"[tokenBalance] represents a token ledger balance.","sidebar":"docs"},"build/api/schema/objects/token-ledger":{"id":"build/api/schema/objects/token-ledger","title":"TokenLedger","description":"[TokenLedger] represents the transfers to perform on the UCO ledger","sidebar":"docs"},"build/api/schema/objects/token-transfer":{"id":"build/api/schema/objects/token-transfer","title":"TokenTransfer","description":"[TokenTransfer] represents the an asset transfer","sidebar":"docs"},"build/api/schema/objects/transaction":{"id":"build/api/schema/objects/transaction","title":"Transaction","description":"[Transaction] represents a unitary transaction in the Archethic network.","sidebar":"docs"},"build/api/schema/objects/transaction-attestation":{"id":"build/api/schema/objects/transaction-attestation","title":"TransactionAttestation","description":"[TransactionAttestation] represents an attestation when a transaction is successfully validated and stored.","sidebar":"docs"},"build/api/schema/objects/transaction-error":{"id":"build/api/schema/objects/transaction-error","title":"TransactionError","description":"[TransactionError] represents an error.","sidebar":"docs"},"build/api/schema/objects/transaction-input":{"id":"build/api/schema/objects/transaction-input","title":"TransactionInput","description":"[TransactionInput] represents the inputs from the transaction","sidebar":"docs"},"build/api/schema/objects/transaction-movement":{"id":"build/api/schema/objects/transaction-movement","title":"TransactionMovement","description":"[TransactionMovement] represents ledger transaction movement","sidebar":"docs"},"build/api/schema/objects/transaction-summary":{"id":"build/api/schema/objects/transaction-summary","title":"TransactionSummary","description":"[Transaction Summary] Represents transaction header or extract to summarize it","sidebar":"docs"},"build/api/schema/objects/uco-data":{"id":"build/api/schema/objects/uco-data","title":"UcoData","description":"No description","sidebar":"docs"},"build/api/schema/objects/uco-ledger":{"id":"build/api/schema/objects/uco-ledger","title":"UcoLedger","description":"[UCOLedger] represents the transfers to perform on the UCO ledger","sidebar":"docs"},"build/api/schema/objects/uco-transfer":{"id":"build/api/schema/objects/uco-transfer","title":"UcoTransfer","description":"[UCOTransfer] represents the an asset transfer","sidebar":"docs"},"build/api/schema/objects/unspent-output":{"id":"build/api/schema/objects/unspent-output","title":"UnspentOutput","description":"[UnspentOutput] represents the remaining unspent output of the transaction.","sidebar":"docs"},"build/api/schema/objects/validation-stamp":{"id":"build/api/schema/objects/validation-stamp","title":"ValidationStamp","description":"[ValidationStamp] represents the validation performs by the coordinator","sidebar":"docs"},"build/api/schema/objects/version":{"id":"build/api/schema/objects/version","title":"Version","description":"[Version] represents code, transaction and protocol version","sidebar":"docs"},"build/api/schema/queries/balance":{"id":"build/api/schema/queries/balance","title":"balance","description":"Query the network to find a balance from an address coming from the latest transaction on the chain","sidebar":"docs"},"build/api/schema/queries/beacon-chain-summary":{"id":"build/api/schema/queries/beacon-chain-summary","title":"beaconChainSummary","description":"Query the network to get the value of the summary of beacon chain at a specific time or the last value","sidebar":"docs"},"build/api/schema/queries/genesis-address":{"id":"build/api/schema/queries/genesis-address","title":"genesisAddress","description":"Query the network to find the genesis address of a transaction","sidebar":"docs"},"build/api/schema/queries/last-transaction":{"id":"build/api/schema/queries/last-transaction","title":"lastTransaction","description":"Query the network to find the last transaction from an address","sidebar":"docs"},"build/api/schema/queries/nearest-endpoints":{"id":"build/api/schema/queries/nearest-endpoints","title":"nearestEndpoints","description":"List the nearest endpoints nodes from the client\'s IP","sidebar":"docs"},"build/api/schema/queries/network-transactions":{"id":"build/api/schema/queries/network-transactions","title":"networkTransactions","description":"Query the network to list the transaction on the type","sidebar":"docs"},"build/api/schema/queries/nodes":{"id":"build/api/schema/queries/nodes","title":"nodes","description":"List all the nodes registered in the network","sidebar":"docs"},"build/api/schema/queries/oracle-data":{"id":"build/api/schema/queries/oracle-data","title":"oracleData","description":"Query the network to get the value of an oracle at a specific time or the last value","sidebar":"docs"},"build/api/schema/queries/shared-secrets":{"id":"build/api/schema/queries/shared-secrets","title":"sharedSecrets","description":"Query the network to get the storage nonce public key","sidebar":"docs"},"build/api/schema/queries/token":{"id":"build/api/schema/queries/token","title":"token","description":"Query the network to find a token\'s data","sidebar":"docs"},"build/api/schema/queries/transaction":{"id":"build/api/schema/queries/transaction","title":"transaction","description":"Query the network to find a transaction","sidebar":"docs"},"build/api/schema/queries/transaction-chain":{"id":"build/api/schema/queries/transaction-chain","title":"transactionChain","description":"Query the network to find a transaction chain","sidebar":"docs"},"build/api/schema/queries/transaction-inputs":{"id":"build/api/schema/queries/transaction-inputs","title":"transactionInputs","description":"Query the network to list the transaction inputs from an address","sidebar":"docs"},"build/api/schema/queries/transactions":{"id":"build/api/schema/queries/transactions","title":"transactions","description":"Query the network to find all the transactions locally stored","sidebar":"docs"},"build/api/schema/queries/version":{"id":"build/api/schema/queries/version","title":"version","description":"List protocol, transaction and code versions","sidebar":"docs"},"build/api/schema/scalars/address":{"id":"build/api/schema/scalars/address","title":"Address","description":"The [Address] scalar type represents a transaction\'s address.","sidebar":"docs"},"build/api/schema/scalars/boolean":{"id":"build/api/schema/scalars/boolean","title":"Boolean","description":"The Boolean scalar type represents true or false.","sidebar":"docs"},"build/api/schema/scalars/content":{"id":"build/api/schema/scalars/content","title":"Content","description":"The [Content] scalar type represents transaction content. Depending if the content can displayed","sidebar":"docs"},"build/api/schema/scalars/float":{"id":"build/api/schema/scalars/float","title":"Float","description":"The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.","sidebar":"docs"},"build/api/schema/scalars/hash":{"id":"build/api/schema/scalars/hash","title":"Hash","description":"The [Hash] scalar type represents a cryptographic hash used in","sidebar":"docs"},"build/api/schema/scalars/hex":{"id":"build/api/schema/scalars/hex","title":"Hex","description":"The [Hex] scalar type represents an hexadecimal","sidebar":"docs"},"build/api/schema/scalars/int":{"id":"build/api/schema/scalars/int","title":"Int","description":"The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.","sidebar":"docs"},"build/api/schema/scalars/non-neg-integer":{"id":"build/api/schema/scalars/non-neg-integer","title":"NonNegInteger","description":"The [Non Negative Integer] scalar type represents a non negative number","sidebar":"docs"},"build/api/schema/scalars/p2-p-availabilities":{"id":"build/api/schema/scalars/p2-p-availabilities","title":"P2pAvailabilities","description":"No description","sidebar":"docs"},"build/api/schema/scalars/pos-integer":{"id":"build/api/schema/scalars/pos-integer","title":"PosInteger","description":"The [Positive Integer] scalar type represents a positive number","sidebar":"docs"},"build/api/schema/scalars/public-key":{"id":"build/api/schema/scalars/public-key","title":"PublicKey","description":"The [PublicKey] scalar type represents a public key.","sidebar":"docs"},"build/api/schema/scalars/string":{"id":"build/api/schema/scalars/string","title":"String","description":"The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","sidebar":"docs"},"build/api/schema/scalars/timestamp":{"id":"build/api/schema/scalars/timestamp","title":"Timestamp","description":"The [Timestamp] scalar type represents a UNIX timestamp in seconds","sidebar":"docs"},"build/api/schema/scalars/token-properties":{"id":"build/api/schema/scalars/token-properties","title":"TokenProperties","description":"[tokenProperties] represents a token\'s properties","sidebar":"docs"},"build/api/schema/scalars/transaction-type":{"id":"build/api/schema/scalars/transaction-type","title":"TransactionType","description":"The [TransactionType] scalar type represents a transaction type","sidebar":"docs"},"build/api/schema/schema":{"id":"build/api/schema/schema","title":"Schema Documentation","description":"This documentation has been automatically generated from the GraphQL schema.","sidebar":"docs"},"build/api/schema/subscriptions/oracle-update":{"id":"build/api/schema/subscriptions/oracle-update","title":"oracleUpdate","description":"Subscribe to be notified when a new oracle data is stored","sidebar":"docs"},"build/api/schema/subscriptions/transaction-confirmed":{"id":"build/api/schema/subscriptions/transaction-confirmed","title":"transactionConfirmed","description":"Subscribe to be notified when a transaction is stored (if acted as welcome node)","sidebar":"docs"},"build/api/schema/subscriptions/transaction-error":{"id":"build/api/schema/subscriptions/transaction-error","title":"transactionError","description":"Subscribe to be notified when a transaction is on error","sidebar":"docs"},"build/clients/ledger-wallet/api":{"id":"build/clients/ledger-wallet/api","title":"Ledger Application API","description":"Reference Repository:","sidebar":"docs"},"build/clients/ledger-wallet/commands":{"id":"build/clients/ledger-wallet/commands","title":"ADPU commands","description":"APDU commands","sidebar":"docs"},"build/clients/ledger-wallet/ledger-wallet":{"id":"build/clients/ledger-wallet/ledger-wallet","title":"Ledger wallet","description":"A blockchain or crypto wallet is a way to manage, secure, and use cryptocurrencies such as UCO, Bitcoin, Ethereum and other digital assets based on a blockchain (for example, an NFT). There are two basic types of blockchain wallets: software wallets and hardware wallets.","sidebar":"docs"},"build/clients/wallet-access":{"id":"build/clients/wallet-access","title":"Archethic\'s wallet access","description":"Onchain wallet (aka Keychain) is a wallet stored on Archethic blockchain in encrypted form, to allow only the authorized access to read it and build transaction from it.","sidebar":"docs"},"build/clients/wallet-spec":{"id":"build/clients/wallet-spec","title":"Archethic\'s wallet specification","description":"Onchain wallet (aka Keychain) is a wallet stored on Archethic blockchain in encrypted form.","sidebar":"docs"},"build/core/account":{"id":"build/core/account","title":"Account","description":"Archethic node provides a high level and fast access to an account assets using primarily memory tables with ETS.","sidebar":"docs"},"build/core/beacon-chain/beacon-chain":{"id":"build/core/beacon-chain/beacon-chain","title":"BeaconChain","description":"BeaconChain helps the Archethic sharding network to be supervised and provided global view of the system.","sidebar":"docs"},"build/core/beacon-chain/p2p-sampling":{"id":"build/core/beacon-chain/p2p-sampling","title":"P2P availability sampling","description":"Each beacon chain\'s subset is responsible to perform verification of the nodes is in charge to monitor.","sidebar":"docs"},"build/core/bootstrap":{"id":"build/core/bootstrap","title":"Bootstrap","description":"When the Archethic node, a task is launched to perform the node bootstrapping to join the network.","sidebar":"docs"},"build/core/core":{"id":"build/core/core","title":"Core development","description":"Archethic Node repository can be found here","sidebar":"docs"},"build/core/cryptography/cryptography":{"id":"build/core/cryptography/cryptography","title":"Cryptography","description":"Node cryptography is maintains through keystores","sidebar":"docs"},"build/core/cryptography/tpm":{"id":"build/core/cryptography/tpm","title":"TPM Implementation","description":"This section explains the HRT TPM Library implementation.","sidebar":"docs"},"build/core/cryptography/yubikey":{"id":"build/core/cryptography/yubikey","title":"Yubikey implementation","description":"This section explains the HRT Yubikey Library implementation.","sidebar":"docs"},"build/core/database":{"id":"build/core/database","title":"Archethic\'s database","description":"Archethic is shipped with a custom database engine built from scratch to support an efficient data storage to support","sidebar":"docs"},"build/core/election":{"id":"build/core/election","title":"Election","description":"Archethic provides rotating algorithm to elect validation and storage nodes.","sidebar":"docs"},"build/core/governance/code-proposals":{"id":"build/core/governance/code-proposals","title":"Code Proposals","description":"Archethic Blockchain is using code proposals to have a way to upgrade current blockchain","sidebar":"docs"},"build/core/governance/code-proposals-cd":{"id":"build/core/governance/code-proposals-cd","title":"CD","description":"The archethic-cd target produces an image capable of running archethic_node release.","sidebar":"docs"},"build/core/governance/code-proposals-ci":{"id":"build/core/governance/code-proposals-ci","title":"CI","description":"After a code proposal is received by a node in the network and passes initial validation, the next step in the process is the CI.","sidebar":"docs"},"build/core/mining/mining":{"id":"build/core/mining/mining","title":"Mining","description":"Transaction validation (aka Mining) defines processes and validations algorithms.","sidebar":"docs"},"build/core/mining/proof-of-work":{"id":"build/core/mining/proof-of-work","title":"Proof of Work algorithm","description":"The Archethic\'s proof of work algorithm defines way to assert the validity of the origin signature.","sidebar":"docs"},"build/core/mining/transaction-context":{"id":"build/core/mining/transaction-context","title":"Transaction context retrieval","description":"When a transaction is under validation, after the pending transaction validation, the nodes are fetching the context of the transaction.","sidebar":"docs"},"build/core/mining/transaction-validation":{"id":"build/core/mining/transaction-validation","title":"Pending transaction validation","description":"When a transaction is under validation a process is started to perform the ARCH consensus workflow.","sidebar":"docs"},"build/core/oracle-chain/memory-table":{"id":"build/core/oracle-chain/memory-table","title":"OracleChain Memory Tables","description":"OracleChain component provides scheduler and services to maintain transaction chain and real world data integration.","sidebar":"docs"},"build/core/oracle-chain/oracle-chain":{"id":"build/core/oracle-chain/oracle-chain","title":"OracleChain","description":"OracleChain is an internal mechanism inside Archethic Node Software making external data fetching embedded into a transaction chain.","sidebar":"docs"},"build/core/oracle-chain/scheduler":{"id":"build/core/oracle-chain/scheduler","title":"OracleChain Scheduler","description":"The OracleChain module contains a process in charge of scheduling the data fetching and transaction submitting.","sidebar":"docs"},"build/core/oracle-chain/service":{"id":"build/core/oracle-chain/service","title":"Oracle Chain Service","description":"OracleChain provides a way to extend it and to add more services to the scheduler.","sidebar":"docs"},"build/core/p2p/messaging":{"id":"build/core/p2p/messaging","title":"Messaging","description":"Archethic Blockchain is used a brand new P2P layer from the Supervised Multicast, but to ensure the best data transmission possible, we are using two modern approaches: Stream Multiplexer and Binary Protocol.","sidebar":"docs"},"build/core/p2p/node":{"id":"build/core/p2p/node","title":"Node","description":"Data structure","sidebar":"docs"},"build/core/p2p/p2p":{"id":"build/core/p2p/p2p","title":"P2P","description":"","sidebar":"docs"},"build/sdk/dart":{"id":"build/sdk/dart","title":"Dart SDK","description":"Archethic Blockchain Official Dart SDK available on Github","sidebar":"docs"},"build/sdk/go":{"id":"build/sdk/go","title":"Go SDK","description":"Archethic Blockchain Official Go SDK is available on Github","sidebar":"docs"},"build/sdk/js":{"id":"build/sdk/js","title":"Javascript SDK","description":"Archethic Blockchain Official Javascript SDK is available on Github","sidebar":"docs"},"build/sdk/sdk":{"id":"build/sdk/sdk","title":"SDK","description":"","sidebar":"docs"},"build/smart-contracts/fees":{"id":"build/smart-contracts/fees","title":"Smart Contracts - Fees","description":"","sidebar":"docs"},"build/smart-contracts/language/actions":{"id":"build/smart-contracts/language/actions","title":"Smart Contracts - Actions block","description":"The actions block is the code executed when the associated trigger is triggered.","sidebar":"docs"},"build/smart-contracts/language/condition":{"id":"build/smart-contracts/language/condition","title":"Smart Contracts - Condition block","description":"Conditions are blocks which purpose is to check the validity of a transaction.","sidebar":"docs"},"build/smart-contracts/language/examples":{"id":"build/smart-contracts/language/examples","title":"Smart Contracts - Examples","description":"Hello World","sidebar":"docs"},"build/smart-contracts/language/language":{"id":"build/smart-contracts/language/language","title":"Smart Contracts - Language","description":"A Smart Contract is defined as followed:","sidebar":"docs"},"build/smart-contracts/language/legacy/examples":{"id":"build/smart-contracts/language/legacy/examples","title":"Smart Contract examples","description":"Recurrent transfer","sidebar":"docs"},"build/smart-contracts/language/legacy/language":{"id":"build/smart-contracts/language/legacy/language","title":"Smart Contract Language","description":"Archethic Blockchain defines a new smart contract language which was designed to resolve the issue of smart contracts:","sidebar":"docs"},"build/smart-contracts/language/legacy/smart-contracts":{"id":"build/smart-contracts/language/legacy/smart-contracts","title":"Smart Contracts (Legacy)","description":"This specification is deprecated and will be still be valid for SC before 1.1.0. The new version is available here","sidebar":"docs"},"build/smart-contracts/language/library":{"id":"build/smart-contracts/language/library","title":"Smart Contracts - Library","description":"The Smart Contract library is composed of many modules with many functions in each.","sidebar":"docs"},"build/smart-contracts/language/triggers":{"id":"build/smart-contracts/language/triggers","title":"Smart Contracts - Triggers","description":"Contract triggered by a transaction","sidebar":"docs"},"build/smart-contracts/playground/build":{"id":"build/smart-contracts/playground/build","title":"Smart Contracts Playground - Build","description":"Let\'s create a small smart contracts that reacts to two different triggers. We\'ll then be able to test them separately.","sidebar":"docs"},"build/smart-contracts/playground/deploy":{"id":"build/smart-contracts/playground/deploy","title":"Smart Contracts Playground - Deploy","description":"The communication via the archethic wallet has not been done yet. For this reason we disabled the deployment to the mainnet because it doesn\'t meet the security standard we expect.","sidebar":"docs"},"build/smart-contracts/playground/functions":{"id":"build/smart-contracts/playground/functions","title":"Smart Contracts Playground - Functions","description":"Since 1.3, we introduced the capability to have some public functions in to smart contract code.","sidebar":"docs"},"build/smart-contracts/playground/mock-form":{"id":"build/smart-contracts/playground/mock-form","title":"Smart Contracts Playground - Mock form","description":"Mocks allow developers to simulate the behaviour of functions that have side-effects. A few examples of side-effect: retrieve the genesis address of a chain, retrieve the date, a random value etc.","sidebar":"docs"},"build/smart-contracts/playground/sc-playground":{"id":"build/smart-contracts/playground/sc-playground","title":"Smart Contracts Playground","description":"The Smart Contracts playground is an online service use to write, test and deploy smart contracts.","sidebar":"docs"},"build/smart-contracts/playground/transaction-form":{"id":"build/smart-contracts/playground/transaction-form","title":"Smart Contracts Playground - Transaction form","description":"The transaction form is a form that you might encounter at different places:","sidebar":"docs"},"build/smart-contracts/smart-contracts":{"id":"build/smart-contracts/smart-contracts","title":"Smart Contracts","description":"Smart-contracts are in computing what robots are in real life: they perform actions according to events.","sidebar":"docs"},"build/testnet":{"id":"build/testnet","title":"Testnet","description":"Local","sidebar":"docs"},"contributing":{"id":"contributing","title":"Contributing","description":"This documentation is maintained by the Archethic Foundation. It\'s an open source project and aims to be the most extensive","sidebar":"docs"},"FAQ/aeweb":{"id":"FAQ/aeweb","title":"AEWeb","description":"General","sidebar":"docs"},"FAQ/bridge":{"id":"FAQ/bridge","title":"Archethic Bridge $UCO one-way","description":"General","sidebar":"docs"},"FAQ/bridge-2-ways":{"id":"FAQ/bridge-2-ways","title":"Archethic Bridge 2-ways","description":"General","sidebar":"docs"},"FAQ/dex":{"id":"FAQ/dex","title":"Archethic aeSwap","description":"General","sidebar":"docs"},"FAQ/wallet":{"id":"FAQ/wallet","title":"Wallet","description":"General","sidebar":"docs"},"learn/arch-consensus/arch-consensus":{"id":"learn/arch-consensus/arch-consensus","title":"ARCH consensus","description":"Archethic Blockchain is using a new consensus called ARCH (Atomic Rotating Commitment Heuristic) for an uncompromising consensus to support high scalability and high throughput.","sidebar":"docs"},"learn/arch-consensus/proof-of-work":{"id":"learn/arch-consensus/proof-of-work","title":"Proof of Work","description":"Others blockchains are using the concept of Proof of Work to ensure an unpredictable and pseudo random election of block validation (mining).","sidebar":"docs"},"learn/archethic-intro":{"id":"learn/archethic-intro","title":"Archethic introduction","description":"Archethic is the next generation of Blockchain which provides a truly decentralized limitless network, using TransactionChain and a new consensus named ARCH (Atomic Rotating Commitment Heuristic),","sidebar":"docs"},"learn/cryptography/cryptography":{"id":"learn/cryptography/cryptography","title":"Cryptography","description":"Archethic network through the usage of TransactionChains is leveraging an adaptative and quantum-safe cryptography.","sidebar":"docs"},"learn/cryptography/hardware-root-of-trust":{"id":"learn/cryptography/hardware-root-of-trust","title":"Hardware Root of Trust","description":"What is hardware root of trust?","sidebar":"docs"},"learn/decentralized-id/decentralized-id":{"id":"learn/decentralized-id/decentralized-id","title":"Decentralized Identity","description":"Identity","sidebar":"docs"},"learn/decentralized-id/keychain":{"id":"learn/decentralized-id/keychain","title":"Keychain","description":"Archethic\'s keychain is new concept to make wallet accessible, configurable and interoperable with several service providers and why not multi chains.","sidebar":"docs"},"learn/ecosystem":{"id":"learn/ecosystem","title":"Ecosystem","description":"The technical and functional parameters that make Archethic unique and ready for global adoption:","sidebar":"docs"},"learn/fee":{"id":"learn/fee","title":"Transaction fees","description":"Archethic Blockchain is using specific heuristic algorithms to ensure the best transaction\'s distribution.","sidebar":"docs"},"learn/governance/governance":{"id":"learn/governance/governance","title":"Governance","description":"A DAO (Decentralized Autonomous Organization) is a decentralized organization whose governance rules are automated,","sidebar":"docs"},"learn/oracle-chain":{"id":"learn/oracle-chain","title":"OracleChain","description":"Archethic Blockchain supports Off-Chain communication through a dedicated transaction chain called OracleChain.","sidebar":"docs"},"learn/p2p/bootstrapping":{"id":"learn/p2p/bootstrapping","title":"Bootstrapping","description":"Archethic Blockchain by using Network Transaction and Supervised Multicast, requires some actions to be performed","sidebar":"docs"},"learn/p2p/p2p":{"id":"learn/p2p/p2p","title":"P2P","description":"Archethic is a permissionless network where any node can participate into the network as long as they have some hardware requirements such secure element to enclave the private keys","sidebar":"docs"},"learn/p2p/self-repair":{"id":"learn/p2p/self-repair","title":"Self Repair","description":"Archethic Blockchain is using a self-repair mechanism to be able to sync/re-sync missing transactions to be able","sidebar":"docs"},"learn/patents":{"id":"learn/patents","title":"Patents","description":"12 patents to build a new ecosystem","sidebar":"docs"},"learn/sharding/beacon-chain/beacon-chain":{"id":"learn/sharding/beacon-chain/beacon-chain","title":"Beacon Chain","description":"Archethic Blockchain is using Sharding mechanism to ensure scalability in terms of storage and validation.","sidebar":"docs"},"learn/sharding/beacon-chain/explorer":{"id":"learn/sharding/beacon-chain/explorer","title":"Beacon Explorer","description":"Archethic Blockchain leverages Sharding to outperform the exiting blockchains using shards called: subsets and BeaconChain Explorer displays the entire transactions across subsets.","sidebar":"docs"},"learn/sharding/replication-attestation":{"id":"learn/sharding/replication-attestation","title":"Replication attestation","description":"How to ensure a minimum of confirmation from the storage nodes to ensure the data availability of a given transaction.","sidebar":"docs"},"learn/sharding/sharding":{"id":"learn/sharding/sharding","title":"Sharding","description":"To become an unlimited decentralized network, Archethic Blockchain is using a feature called Sharding, used to split processing and storage power to ensure a scalable system.","sidebar":"docs"},"learn/token":{"id":"learn/token","title":"Tokens","description":"Tokens is an important feature on Archethic.","sidebar":"docs"},"learn/transaction-chain":{"id":"learn/transaction-chain","title":"Transaction chains","description":"In the Archethic network, there are no blocks but only transactions, as each block is reduced to its atomic form - transaction with its own validation evidences.","sidebar":"docs"},"learn/transaction-types":{"id":"learn/transaction-types","title":"Transaction types","description":"The transaction\'s type is used to give a hint on what the transaction contains. Some types must respect some conditions.","sidebar":"docs"},"learn/uco":{"id":"learn/uco","title":"UCO token","description":"Archethic, an open-source public blockchain is an infrastructure that is fuelled by its native cryptocurrency and should ideally scale to the sum of its individual nodes\u2019 performance. It needs to be designed in such a way that it is a self-sustaining economy run by the people, for the people.","sidebar":"docs"},"participate/aeweb/aeweb":{"id":"participate/aeweb/aeweb","title":"Archethic Web (AEWeb)","description":"Archethic has developed a new solution to host websites on a decentralized network to avoid censorship, increase security and have high-availability and resiliency.","sidebar":"docs"},"participate/aeweb/automation":{"id":"participate/aeweb/automation","title":"Automate deployments","description":"AEWeb\'s CLI is really simple to deploy websites from the command line and is handy on low-frequent deployment usage.","sidebar":"docs"},"participate/aeweb/dns":{"id":"participate/aeweb/dns","title":"AEWeb - Domain names","description":"DNS (Domain Name System) is a mechanism which resolves websites names to server IP addresses, making website\'s URL nicer.","sidebar":"docs"},"participate/aeweb/how-it-works":{"id":"participate/aeweb/how-it-works","title":"AEWeb - How it works","description":"Archethic Web (AEWeb) is using transaction chains to host any website on Archethic Blockchain.","sidebar":"docs"},"participate/aeweb/usage/aeweb-front":{"id":"participate/aeweb/usage/aeweb-front","title":"AEWeb - Application Front End","description":"Access//aeweb.archethic.net","sidebar":"docs"},"participate/aeweb/usage/cli":{"id":"participate/aeweb/usage/cli","title":"AEWeb - CLI","description":"Repository//github.com/archethic-foundation/aeweb-cli","sidebar":"docs"},"participate/bridge/bridge":{"id":"participate/bridge/bridge","title":"Archethic\'s bridge","description":"Archethic has developed a decentralized and P2P bridge to facilitate the exchange of your UCO ERC20 tokens with other blockchains (e.g., Ethereum, Polygon, BSC) and to allow for a simple and secure exchange of assets in the most atomic way.","sidebar":"docs"},"participate/bridge/usage/bridge-front":{"id":"participate/bridge/usage/bridge-front","title":"Bridge - Application Front End","description":"Currently, the two-way bridge is available exclusively on the testnet.","sidebar":"docs"},"participate/cli/archethic-cli":{"id":"participate/cli/archethic-cli","title":"Archethic\'s CLI","description":"Developers like to use terminal applications to speed up their productivity, therefore Archethic have also","sidebar":"docs"},"participate/dex/dex":{"id":"participate/dex/dex","title":"Archethic\'s DEX","description":"The current version of Archethic\'s DEX is only available on the testnet.","sidebar":"docs"},"participate/dex/usage/aeSwap":{"id":"participate/dex/usage/aeSwap","title":"DEX - Application Front End","description":"Please note that aeSwap is currently available exclusively on the testnet.","sidebar":"docs"},"participate/wallet/archethic-wallet":{"id":"participate/wallet/archethic-wallet","title":"Archethic Wallet","description":"Archethic has developed a fully decentralized and non-custodial cryptocurrency hot wallet that enables users to safely manage assets on Layer 1 Archethic blockchain.","sidebar":"docs"},"participate/wallet/dapps-communication":{"id":"participate/wallet/dapps-communication","title":"Communication with DApps","description":"In the blockchain ecosystem, decentralized applications (dApps) are becoming increasingly popular. To enable reliable and secure communication between these applications and the blockchain, Archethic has developed a communication protocol with its Archethic Wallet application. This protocol allows dApps to delegate secure communication with the blockchain to the wallet and to protect private information within the wallet (seed, private keys) without exposing it to the dApps.","sidebar":"docs"}}}')}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.c70d4fbe.js b/assets/js/935f2afb.c70d4fbe.js deleted file mode 100644 index 64cb4a924..000000000 --- a/assets/js/935f2afb.c70d4fbe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"category","label":"Learn","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"UCO token","href":"/learn/uco","docId":"learn/uco"},{"type":"link","label":"Ecosystem","href":"/learn/ecosystem","docId":"learn/ecosystem"},{"type":"link","label":"Patents","href":"/learn/patents","docId":"learn/patents"},{"type":"link","label":"Transaction chains","href":"/learn/transaction-chain","docId":"learn/transaction-chain"},{"type":"link","label":"Transaction fees","href":"/learn/fee","docId":"learn/fee"},{"type":"link","label":"Transaction types","href":"/learn/transaction-types","docId":"learn/transaction-types"},{"type":"category","label":"ARCH consensus","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Proof of Work","href":"/learn/arch-consensus/proof-of-work","docId":"learn/arch-consensus/proof-of-work"}],"href":"/learn/arch-consensus/"},{"type":"category","label":"Cryptography","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Hardware Root of Trust","href":"/learn/cryptography/hardware-root-of-trust","docId":"learn/cryptography/hardware-root-of-trust"}],"href":"/learn/cryptography/"},{"type":"category","label":"Decentralized Identity","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Keychain","href":"/learn/decentralized-id/keychain","docId":"learn/decentralized-id/keychain"}],"href":"/learn/decentralized-id/"},{"type":"link","label":"Governance","href":"/learn/governance/","docId":"learn/governance/governance"},{"type":"link","label":"OracleChain","href":"/learn/oracle-chain","docId":"learn/oracle-chain"},{"type":"category","label":"P2P","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Bootstrapping","href":"/learn/p2p/bootstrapping","docId":"learn/p2p/bootstrapping"},{"type":"link","label":"Self Repair","href":"/learn/p2p/self-repair","docId":"learn/p2p/self-repair"}],"href":"/learn/p2p/"},{"type":"category","label":"Sharding","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Beacon Chain","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Beacon Explorer","href":"/learn/sharding/beacon-chain/explorer","docId":"learn/sharding/beacon-chain/explorer"}],"href":"/learn/sharding/beacon-chain/"},{"type":"link","label":"Replication attestation","href":"/learn/sharding/replication-attestation","docId":"learn/sharding/replication-attestation"}],"href":"/learn/sharding/"},{"type":"link","label":"Tokens","href":"/learn/token","docId":"learn/token"}],"href":"/learn/"},{"type":"category","label":"Participate","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Archethic Web (AEWeb)","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"How it works","href":"/participate/aeweb/how-it-works","docId":"participate/aeweb/how-it-works"},{"type":"link","label":"Domain Names","href":"/participate/aeweb/dns","docId":"participate/aeweb/dns"},{"type":"category","label":"Usage","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"CLI","href":"/participate/aeweb/usage/cli","docId":"participate/aeweb/usage/cli"},{"type":"link","label":"AEWeb Front End","href":"/participate/aeweb/usage/aeweb-front","docId":"participate/aeweb/usage/aeweb-front"}],"href":"/category/usage"},{"type":"link","label":"Automate deployments","href":"/participate/aeweb/automation","docId":"participate/aeweb/automation"}],"href":"/participate/aeweb/"},{"type":"category","label":"Archethic\'s bridge","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Usage","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Bridge Front End","href":"/participate/bridge/usage/bridge-front","docId":"participate/bridge/usage/bridge-front"}],"href":"/category/usage-1"}],"href":"/participate/bridge/"},{"type":"link","label":"Archethic\'s CLI","href":"/participate/cli/","docId":"participate/cli/archethic-cli"},{"type":"category","label":"Archethic\'s DEX","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Usage","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"aeSwap","href":"/participate/dex/usage/aeSwap","docId":"participate/dex/usage/aeSwap"}],"href":"/category/usage-2"}],"href":"/participate/dex/"},{"type":"category","label":"Archethic Wallet","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Communication with DApps","href":"/participate/wallet/dapps-communication","docId":"participate/wallet/dapps-communication"}],"href":"/participate/wallet/"}],"href":"/category/participate"},{"type":"category","label":"Build","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Clients","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Ledger wallet","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Ledger Application API","href":"/build/clients/ledger-wallet/api","docId":"build/clients/ledger-wallet/api"},{"type":"link","label":"ADPU commands","href":"/build/clients/ledger-wallet/commands","docId":"build/clients/ledger-wallet/commands"}],"href":"/build/clients/ledger-wallet/"},{"type":"link","label":"Archethic\'s wallet access","href":"/build/clients/wallet-access","docId":"build/clients/wallet-access"},{"type":"link","label":"Archethic\'s wallet specification","href":"/build/clients/wallet-spec","docId":"build/clients/wallet-spec"}],"href":"/category/clients"},{"type":"category","label":"API","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"GraphQL","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Schema Documentation","href":"/schema","className":"navbar__toggle","docId":"build/api/schema/schema"},{"type":"category","label":"Directives","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"include","href":"/build/api/schema/directives/include","docId":"build/api/schema/directives/include"},{"type":"link","label":"skip","href":"/build/api/schema/directives/skip","docId":"build/api/schema/directives/skip"}]},{"type":"category","label":"Enums","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"ErrorContext","href":"/build/api/schema/enums/error-context","docId":"build/api/schema/enums/error-context"},{"type":"link","label":"SortOrder","href":"/build/api/schema/enums/sort-order","docId":"build/api/schema/enums/sort-order"}]},{"type":"category","label":"Objects","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"AuthorizedKey","href":"/build/api/schema/objects/authorized-key","docId":"build/api/schema/objects/authorized-key"},{"type":"link","label":"Balance","href":"/build/api/schema/objects/balance","docId":"build/api/schema/objects/balance"},{"type":"link","label":"BeaconChainSummary","href":"/build/api/schema/objects/beacon-chain-summary","docId":"build/api/schema/objects/beacon-chain-summary"},{"type":"link","label":"CrossValidationStamp","href":"/build/api/schema/objects/cross-validation-stamp","docId":"build/api/schema/objects/cross-validation-stamp"},{"type":"link","label":"Data","href":"/build/api/schema/objects/data","docId":"build/api/schema/objects/data"},{"type":"link","label":"Endpoint","href":"/build/api/schema/objects/endpoint","docId":"build/api/schema/objects/endpoint"},{"type":"link","label":"LedgerOperations","href":"/build/api/schema/objects/ledger-operations","docId":"build/api/schema/objects/ledger-operations"},{"type":"link","label":"Ledger","href":"/build/api/schema/objects/ledger","docId":"build/api/schema/objects/ledger"},{"type":"link","label":"Node","href":"/build/api/schema/objects/node","docId":"build/api/schema/objects/node"},{"type":"link","label":"OracleData","href":"/build/api/schema/objects/oracle-data","docId":"build/api/schema/objects/oracle-data"},{"type":"link","label":"OracleServices","href":"/build/api/schema/objects/oracle-services","docId":"build/api/schema/objects/oracle-services"},{"type":"link","label":"Ownership","href":"/build/api/schema/objects/ownership","docId":"build/api/schema/objects/ownership"},{"type":"link","label":"SharedSecrets","href":"/build/api/schema/objects/shared-secrets","docId":"build/api/schema/objects/shared-secrets"},{"type":"link","label":"TokenBalance","href":"/build/api/schema/objects/token-balance","docId":"build/api/schema/objects/token-balance"},{"type":"link","label":"TokenLedger","href":"/build/api/schema/objects/token-ledger","docId":"build/api/schema/objects/token-ledger"},{"type":"link","label":"TokenTransfer","href":"/build/api/schema/objects/token-transfer","docId":"build/api/schema/objects/token-transfer"},{"type":"link","label":"Token","href":"/build/api/schema/objects/token","docId":"build/api/schema/objects/token"},{"type":"link","label":"TransactionAttestation","href":"/build/api/schema/objects/transaction-attestation","docId":"build/api/schema/objects/transaction-attestation"},{"type":"link","label":"TransactionError","href":"/build/api/schema/objects/transaction-error","docId":"build/api/schema/objects/transaction-error"},{"type":"link","label":"TransactionInput","href":"/build/api/schema/objects/transaction-input","docId":"build/api/schema/objects/transaction-input"},{"type":"link","label":"TransactionMovement","href":"/build/api/schema/objects/transaction-movement","docId":"build/api/schema/objects/transaction-movement"},{"type":"link","label":"TransactionSummary","href":"/build/api/schema/objects/transaction-summary","docId":"build/api/schema/objects/transaction-summary"},{"type":"link","label":"Transaction","href":"/build/api/schema/objects/transaction","docId":"build/api/schema/objects/transaction"},{"type":"link","label":"UcoData","href":"/build/api/schema/objects/uco-data","docId":"build/api/schema/objects/uco-data"},{"type":"link","label":"UcoLedger","href":"/build/api/schema/objects/uco-ledger","docId":"build/api/schema/objects/uco-ledger"},{"type":"link","label":"UcoTransfer","href":"/build/api/schema/objects/uco-transfer","docId":"build/api/schema/objects/uco-transfer"},{"type":"link","label":"UnspentOutput","href":"/build/api/schema/objects/unspent-output","docId":"build/api/schema/objects/unspent-output"},{"type":"link","label":"ValidationStamp","href":"/build/api/schema/objects/validation-stamp","docId":"build/api/schema/objects/validation-stamp"},{"type":"link","label":"Version","href":"/build/api/schema/objects/version","docId":"build/api/schema/objects/version"}]},{"type":"category","label":"Queries","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"balance","href":"/build/api/schema/queries/balance","docId":"build/api/schema/queries/balance"},{"type":"link","label":"beaconChainSummary","href":"/build/api/schema/queries/beacon-chain-summary","docId":"build/api/schema/queries/beacon-chain-summary"},{"type":"link","label":"genesisAddress","href":"/build/api/schema/queries/genesis-address","docId":"build/api/schema/queries/genesis-address"},{"type":"link","label":"lastTransaction","href":"/build/api/schema/queries/last-transaction","docId":"build/api/schema/queries/last-transaction"},{"type":"link","label":"nearestEndpoints","href":"/build/api/schema/queries/nearest-endpoints","docId":"build/api/schema/queries/nearest-endpoints"},{"type":"link","label":"networkTransactions","href":"/build/api/schema/queries/network-transactions","docId":"build/api/schema/queries/network-transactions"},{"type":"link","label":"nodes","href":"/build/api/schema/queries/nodes","docId":"build/api/schema/queries/nodes"},{"type":"link","label":"oracleData","href":"/build/api/schema/queries/oracle-data","docId":"build/api/schema/queries/oracle-data"},{"type":"link","label":"sharedSecrets","href":"/build/api/schema/queries/shared-secrets","docId":"build/api/schema/queries/shared-secrets"},{"type":"link","label":"token","href":"/build/api/schema/queries/token","docId":"build/api/schema/queries/token"},{"type":"link","label":"transactionChain","href":"/build/api/schema/queries/transaction-chain","docId":"build/api/schema/queries/transaction-chain"},{"type":"link","label":"transactionInputs","href":"/build/api/schema/queries/transaction-inputs","docId":"build/api/schema/queries/transaction-inputs"},{"type":"link","label":"transaction","href":"/build/api/schema/queries/transaction","docId":"build/api/schema/queries/transaction"},{"type":"link","label":"transactions","href":"/build/api/schema/queries/transactions","docId":"build/api/schema/queries/transactions"},{"type":"link","label":"version","href":"/build/api/schema/queries/version","docId":"build/api/schema/queries/version"}]},{"type":"category","label":"Scalars","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Address","href":"/build/api/schema/scalars/address","docId":"build/api/schema/scalars/address"},{"type":"link","label":"Boolean","href":"/build/api/schema/scalars/boolean","docId":"build/api/schema/scalars/boolean"},{"type":"link","label":"Content","href":"/build/api/schema/scalars/content","docId":"build/api/schema/scalars/content"},{"type":"link","label":"Float","href":"/build/api/schema/scalars/float","docId":"build/api/schema/scalars/float"},{"type":"link","label":"Hash","href":"/build/api/schema/scalars/hash","docId":"build/api/schema/scalars/hash"},{"type":"link","label":"Hex","href":"/build/api/schema/scalars/hex","docId":"build/api/schema/scalars/hex"},{"type":"link","label":"Int","href":"/build/api/schema/scalars/int","docId":"build/api/schema/scalars/int"},{"type":"link","label":"NonNegInteger","href":"/build/api/schema/scalars/non-neg-integer","docId":"build/api/schema/scalars/non-neg-integer"},{"type":"link","label":"P2pAvailabilities","href":"/build/api/schema/scalars/p2-p-availabilities","docId":"build/api/schema/scalars/p2-p-availabilities"},{"type":"link","label":"PosInteger","href":"/build/api/schema/scalars/pos-integer","docId":"build/api/schema/scalars/pos-integer"},{"type":"link","label":"PublicKey","href":"/build/api/schema/scalars/public-key","docId":"build/api/schema/scalars/public-key"},{"type":"link","label":"String","href":"/build/api/schema/scalars/string","docId":"build/api/schema/scalars/string"},{"type":"link","label":"Timestamp","href":"/build/api/schema/scalars/timestamp","docId":"build/api/schema/scalars/timestamp"},{"type":"link","label":"TokenProperties","href":"/build/api/schema/scalars/token-properties","docId":"build/api/schema/scalars/token-properties"},{"type":"link","label":"TransactionType","href":"/build/api/schema/scalars/transaction-type","docId":"build/api/schema/scalars/transaction-type"}]},{"type":"category","label":"Subscriptions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"oracleUpdate","href":"/build/api/schema/subscriptions/oracle-update","docId":"build/api/schema/subscriptions/oracle-update"},{"type":"link","label":"transactionConfirmed","href":"/build/api/schema/subscriptions/transaction-confirmed","docId":"build/api/schema/subscriptions/transaction-confirmed"},{"type":"link","label":"transactionError","href":"/build/api/schema/subscriptions/transaction-error","docId":"build/api/schema/subscriptions/transaction-error"}]}],"href":"/category/graphql"}],"href":"/category/api"},{"type":"category","label":"Core development","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Account","href":"/build/core/account","docId":"build/core/account"},{"type":"category","label":"BeaconChain","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"P2P availability sampling","href":"/build/core/beacon-chain/p2p-sampling","docId":"build/core/beacon-chain/p2p-sampling"}],"href":"/build/core/beacon-chain/"},{"type":"link","label":"Bootstrap","href":"/build/core/bootstrap","docId":"build/core/bootstrap"},{"type":"category","label":"Cryptography","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"TPM Implementation","href":"/build/core/cryptography/tpm","docId":"build/core/cryptography/tpm"},{"type":"link","label":"Yubikey implementation","href":"/build/core/cryptography/yubikey","docId":"build/core/cryptography/yubikey"}],"href":"/build/core/cryptography/"},{"type":"link","label":"Archethic\'s database","href":"/build/core/database","docId":"build/core/database"},{"type":"link","label":"Election","href":"/build/core/election","docId":"build/core/election"},{"type":"category","label":"governance","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"CD","href":"/build/core/governance/code-proposals-cd","docId":"build/core/governance/code-proposals-cd"},{"type":"link","label":"CI","href":"/build/core/governance/code-proposals-ci","docId":"build/core/governance/code-proposals-ci"},{"type":"link","label":"Code Proposals","href":"/build/core/governance/code-proposals","docId":"build/core/governance/code-proposals"}]},{"type":"category","label":"Mining","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Pending transaction validation","href":"/build/core/mining/transaction-validation","docId":"build/core/mining/transaction-validation"},{"type":"link","label":"Proof of Work algorithm","href":"/build/core/mining/proof-of-work","docId":"build/core/mining/proof-of-work"},{"type":"link","label":"Transaction context retrieval","href":"/build/core/mining/transaction-context","docId":"build/core/mining/transaction-context"}],"href":"/build/core/mining/"},{"type":"category","label":"OracleChain","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Memory database","href":"/build/core/oracle-chain/memory-table","docId":"build/core/oracle-chain/memory-table"},{"type":"link","label":"Scheduler","href":"/build/core/oracle-chain/scheduler","docId":"build/core/oracle-chain/scheduler"},{"type":"link","label":"Service","href":"/build/core/oracle-chain/service","docId":"build/core/oracle-chain/service"}],"href":"/build/core/oracle-chain/"},{"type":"category","label":"P2P","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Messaging","href":"/build/core/p2p/messaging","docId":"build/core/p2p/messaging"},{"type":"link","label":"Node","href":"/build/core/p2p/node","docId":"build/core/p2p/node"}],"href":"/build/core/p2p/"}],"href":"/build/core/"},{"type":"category","label":"SDK","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Dart SDK","href":"/build/sdk/dart","docId":"build/sdk/dart"},{"type":"link","label":"Go SDK","href":"/build/sdk/go","docId":"build/sdk/go"},{"type":"link","label":"Javascript SDK","href":"/build/sdk/js","docId":"build/sdk/js"}],"href":"/build/sdk/"},{"type":"category","label":"Smart Contracts","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Language","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Triggers","href":"/build/smart-contracts/language/triggers","docId":"build/smart-contracts/language/triggers"},{"type":"link","label":"Condition","href":"/build/smart-contracts/language/condition","docId":"build/smart-contracts/language/condition"},{"type":"link","label":"Actions","href":"/build/smart-contracts/language/actions","docId":"build/smart-contracts/language/actions"},{"type":"link","label":"Library","href":"/build/smart-contracts/language/library","docId":"build/smart-contracts/language/library"},{"type":"link","label":"Examples","href":"/build/smart-contracts/language/examples","docId":"build/smart-contracts/language/examples"},{"type":"category","label":"Legacy","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Examples","href":"/build/smart-contracts/language/legacy/examples","docId":"build/smart-contracts/language/legacy/examples"},{"type":"link","label":"Language","href":"/build/smart-contracts/language/legacy/language","docId":"build/smart-contracts/language/legacy/language"}],"href":"/build/smart-contracts/language/legacy/"}],"href":"/build/smart-contracts/language/"},{"type":"category","label":"Playground","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Build","href":"/build/smart-contracts/playground/build","docId":"build/smart-contracts/playground/build"},{"type":"link","label":"Deploy","href":"/build/smart-contracts/playground/deploy","docId":"build/smart-contracts/playground/deploy"},{"type":"link","label":"Function calls","href":"/build/smart-contracts/playground/functions","docId":"build/smart-contracts/playground/functions"},{"type":"link","label":"Transaction form","href":"/build/smart-contracts/playground/transaction-form","docId":"build/smart-contracts/playground/transaction-form"},{"type":"link","label":"Mock form","href":"/build/smart-contracts/playground/mock-form","docId":"build/smart-contracts/playground/mock-form"}],"href":"/build/smart-contracts/playground/"},{"type":"link","label":"Fees","href":"/build/smart-contracts/fees","docId":"build/smart-contracts/fees"}],"href":"/build/smart-contracts/"},{"type":"link","label":"Testnet","href":"/build/testnet","docId":"build/testnet"}],"href":"/category/build"},{"type":"category","label":"FAQ","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"AEWeb","href":"/FAQ/aeweb","docId":"FAQ/aeweb"},{"type":"link","label":"Archethic Bridge 2-ways","href":"/FAQ/bridge-2-ways","docId":"FAQ/bridge-2-ways"},{"type":"link","label":"Archethic Bridge $UCO one-way","href":"/FAQ/bridge","docId":"FAQ/bridge"},{"type":"link","label":"Wallet","href":"/FAQ/wallet","docId":"FAQ/wallet"}],"href":"/category/faq"},{"type":"link","label":"Contributing","href":"/contributing","docId":"contributing"}]},"docs":{"build/api/schema/directives/include":{"id":"build/api/schema/directives/include","title":"include","description":"Directs the executor to include this field or fragment only when the if argument is true.","sidebar":"docs"},"build/api/schema/directives/skip":{"id":"build/api/schema/directives/skip","title":"skip","description":"Directs the executor to skip this field or fragment when the if argument is true.","sidebar":"docs"},"build/api/schema/enums/error-context":{"id":"build/api/schema/enums/error-context","title":"ErrorContext","description":"Transaction error context","sidebar":"docs"},"build/api/schema/enums/sort-order":{"id":"build/api/schema/enums/sort-order","title":"SortOrder","description":"SortOrder represents the order of the result","sidebar":"docs"},"build/api/schema/objects/authorized-key":{"id":"build/api/schema/objects/authorized-key","title":"AuthorizedKey","description":"[AuthorizedKey] represents a authorized public key with the encrypted secret key for this given key.","sidebar":"docs"},"build/api/schema/objects/balance":{"id":"build/api/schema/objects/balance","title":"Balance","description":"[Balance] represents a ledger balance.","sidebar":"docs"},"build/api/schema/objects/beacon-chain-summary":{"id":"build/api/schema/objects/beacon-chain-summary","title":"BeaconChainSummary","description":"[Beacon Chain Summary] represents the beacon chain aggregate for a certain date","sidebar":"docs"},"build/api/schema/objects/cross-validation-stamp":{"id":"build/api/schema/objects/cross-validation-stamp","title":"CrossValidationStamp","description":"[CrossValidationStamp] represents the approval of the validation stamp by a cross validation node.","sidebar":"docs"},"build/api/schema/objects/data":{"id":"build/api/schema/objects/data","title":"Data","description":"[TransactionData] represents the data section for every transaction.","sidebar":"docs"},"build/api/schema/objects/endpoint":{"id":"build/api/schema/objects/endpoint","title":"Endpoint","description":"[Endpoint] represents a network node\'s endpoint","sidebar":"docs"},"build/api/schema/objects/ledger":{"id":"build/api/schema/objects/ledger","title":"Ledger","description":"[Ledger] represents the ledger operations to perform","sidebar":"docs"},"build/api/schema/objects/ledger-operations":{"id":"build/api/schema/objects/ledger-operations","title":"LedgerOperations","description":"[LedgerOperations] represents the ledger operations performed by the transaction","sidebar":"docs"},"build/api/schema/objects/node":{"id":"build/api/schema/objects/node","title":"Node","description":"[Node] represents a node in the network","sidebar":"docs"},"build/api/schema/objects/oracle-data":{"id":"build/api/schema/objects/oracle-data","title":"OracleData","description":"[OracleData] represents an oracle data.","sidebar":"docs"},"build/api/schema/objects/oracle-services":{"id":"build/api/schema/objects/oracle-services","title":"OracleServices","description":"No description","sidebar":"docs"},"build/api/schema/objects/ownership":{"id":"build/api/schema/objects/ownership","title":"Ownership","description":"[Ownership] represents a block to set a secret and the authorized public keys able to decrypt the secret","sidebar":"docs"},"build/api/schema/objects/shared-secrets":{"id":"build/api/schema/objects/shared-secrets","title":"SharedSecrets","description":"[SharedSecrets] represents the public shared secret information","sidebar":"docs"},"build/api/schema/objects/token":{"id":"build/api/schema/objects/token","title":"Token","description":"[token] represents a token metadata.","sidebar":"docs"},"build/api/schema/objects/token-balance":{"id":"build/api/schema/objects/token-balance","title":"TokenBalance","description":"[tokenBalance] represents a token ledger balance.","sidebar":"docs"},"build/api/schema/objects/token-ledger":{"id":"build/api/schema/objects/token-ledger","title":"TokenLedger","description":"[TokenLedger] represents the transfers to perform on the UCO ledger","sidebar":"docs"},"build/api/schema/objects/token-transfer":{"id":"build/api/schema/objects/token-transfer","title":"TokenTransfer","description":"[TokenTransfer] represents the an asset transfer","sidebar":"docs"},"build/api/schema/objects/transaction":{"id":"build/api/schema/objects/transaction","title":"Transaction","description":"[Transaction] represents a unitary transaction in the Archethic network.","sidebar":"docs"},"build/api/schema/objects/transaction-attestation":{"id":"build/api/schema/objects/transaction-attestation","title":"TransactionAttestation","description":"[TransactionAttestation] represents an attestation when a transaction is successfully validated and stored.","sidebar":"docs"},"build/api/schema/objects/transaction-error":{"id":"build/api/schema/objects/transaction-error","title":"TransactionError","description":"[TransactionError] represents an error.","sidebar":"docs"},"build/api/schema/objects/transaction-input":{"id":"build/api/schema/objects/transaction-input","title":"TransactionInput","description":"[TransactionInput] represents the inputs from the transaction","sidebar":"docs"},"build/api/schema/objects/transaction-movement":{"id":"build/api/schema/objects/transaction-movement","title":"TransactionMovement","description":"[TransactionMovement] represents ledger transaction movement","sidebar":"docs"},"build/api/schema/objects/transaction-summary":{"id":"build/api/schema/objects/transaction-summary","title":"TransactionSummary","description":"[Transaction Summary] Represents transaction header or extract to summarize it","sidebar":"docs"},"build/api/schema/objects/uco-data":{"id":"build/api/schema/objects/uco-data","title":"UcoData","description":"No description","sidebar":"docs"},"build/api/schema/objects/uco-ledger":{"id":"build/api/schema/objects/uco-ledger","title":"UcoLedger","description":"[UCOLedger] represents the transfers to perform on the UCO ledger","sidebar":"docs"},"build/api/schema/objects/uco-transfer":{"id":"build/api/schema/objects/uco-transfer","title":"UcoTransfer","description":"[UCOTransfer] represents the an asset transfer","sidebar":"docs"},"build/api/schema/objects/unspent-output":{"id":"build/api/schema/objects/unspent-output","title":"UnspentOutput","description":"[UnspentOutput] represents the remaining unspent output of the transaction.","sidebar":"docs"},"build/api/schema/objects/validation-stamp":{"id":"build/api/schema/objects/validation-stamp","title":"ValidationStamp","description":"[ValidationStamp] represents the validation performs by the coordinator","sidebar":"docs"},"build/api/schema/objects/version":{"id":"build/api/schema/objects/version","title":"Version","description":"[Version] represents code, transaction and protocol version","sidebar":"docs"},"build/api/schema/queries/balance":{"id":"build/api/schema/queries/balance","title":"balance","description":"Query the network to find a balance from an address coming from the latest transaction on the chain","sidebar":"docs"},"build/api/schema/queries/beacon-chain-summary":{"id":"build/api/schema/queries/beacon-chain-summary","title":"beaconChainSummary","description":"Query the network to get the value of the summary of beacon chain at a specific time or the last value","sidebar":"docs"},"build/api/schema/queries/genesis-address":{"id":"build/api/schema/queries/genesis-address","title":"genesisAddress","description":"Query the network to find the genesis address of a transaction","sidebar":"docs"},"build/api/schema/queries/last-transaction":{"id":"build/api/schema/queries/last-transaction","title":"lastTransaction","description":"Query the network to find the last transaction from an address","sidebar":"docs"},"build/api/schema/queries/nearest-endpoints":{"id":"build/api/schema/queries/nearest-endpoints","title":"nearestEndpoints","description":"List the nearest endpoints nodes from the client\'s IP","sidebar":"docs"},"build/api/schema/queries/network-transactions":{"id":"build/api/schema/queries/network-transactions","title":"networkTransactions","description":"Query the network to list the transaction on the type","sidebar":"docs"},"build/api/schema/queries/nodes":{"id":"build/api/schema/queries/nodes","title":"nodes","description":"List all the nodes registered in the network","sidebar":"docs"},"build/api/schema/queries/oracle-data":{"id":"build/api/schema/queries/oracle-data","title":"oracleData","description":"Query the network to get the value of an oracle at a specific time or the last value","sidebar":"docs"},"build/api/schema/queries/shared-secrets":{"id":"build/api/schema/queries/shared-secrets","title":"sharedSecrets","description":"Query the network to get the storage nonce public key","sidebar":"docs"},"build/api/schema/queries/token":{"id":"build/api/schema/queries/token","title":"token","description":"Query the network to find a token\'s data","sidebar":"docs"},"build/api/schema/queries/transaction":{"id":"build/api/schema/queries/transaction","title":"transaction","description":"Query the network to find a transaction","sidebar":"docs"},"build/api/schema/queries/transaction-chain":{"id":"build/api/schema/queries/transaction-chain","title":"transactionChain","description":"Query the network to find a transaction chain","sidebar":"docs"},"build/api/schema/queries/transaction-inputs":{"id":"build/api/schema/queries/transaction-inputs","title":"transactionInputs","description":"Query the network to list the transaction inputs from an address","sidebar":"docs"},"build/api/schema/queries/transactions":{"id":"build/api/schema/queries/transactions","title":"transactions","description":"Query the network to find all the transactions locally stored","sidebar":"docs"},"build/api/schema/queries/version":{"id":"build/api/schema/queries/version","title":"version","description":"List protocol, transaction and code versions","sidebar":"docs"},"build/api/schema/scalars/address":{"id":"build/api/schema/scalars/address","title":"Address","description":"The [Address] scalar type represents a transaction\'s address.","sidebar":"docs"},"build/api/schema/scalars/boolean":{"id":"build/api/schema/scalars/boolean","title":"Boolean","description":"The Boolean scalar type represents true or false.","sidebar":"docs"},"build/api/schema/scalars/content":{"id":"build/api/schema/scalars/content","title":"Content","description":"The [Content] scalar type represents transaction content. Depending if the content can displayed","sidebar":"docs"},"build/api/schema/scalars/float":{"id":"build/api/schema/scalars/float","title":"Float","description":"The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.","sidebar":"docs"},"build/api/schema/scalars/hash":{"id":"build/api/schema/scalars/hash","title":"Hash","description":"The [Hash] scalar type represents a cryptographic hash used in","sidebar":"docs"},"build/api/schema/scalars/hex":{"id":"build/api/schema/scalars/hex","title":"Hex","description":"The [Hex] scalar type represents an hexadecimal","sidebar":"docs"},"build/api/schema/scalars/int":{"id":"build/api/schema/scalars/int","title":"Int","description":"The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.","sidebar":"docs"},"build/api/schema/scalars/non-neg-integer":{"id":"build/api/schema/scalars/non-neg-integer","title":"NonNegInteger","description":"The [Non Negative Integer] scalar type represents a non negative number","sidebar":"docs"},"build/api/schema/scalars/p2-p-availabilities":{"id":"build/api/schema/scalars/p2-p-availabilities","title":"P2pAvailabilities","description":"No description","sidebar":"docs"},"build/api/schema/scalars/pos-integer":{"id":"build/api/schema/scalars/pos-integer","title":"PosInteger","description":"The [Positive Integer] scalar type represents a positive number","sidebar":"docs"},"build/api/schema/scalars/public-key":{"id":"build/api/schema/scalars/public-key","title":"PublicKey","description":"The [PublicKey] scalar type represents a public key.","sidebar":"docs"},"build/api/schema/scalars/string":{"id":"build/api/schema/scalars/string","title":"String","description":"The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","sidebar":"docs"},"build/api/schema/scalars/timestamp":{"id":"build/api/schema/scalars/timestamp","title":"Timestamp","description":"The [Timestamp] scalar type represents a UNIX timestamp in seconds","sidebar":"docs"},"build/api/schema/scalars/token-properties":{"id":"build/api/schema/scalars/token-properties","title":"TokenProperties","description":"[tokenProperties] represents a token\'s properties","sidebar":"docs"},"build/api/schema/scalars/transaction-type":{"id":"build/api/schema/scalars/transaction-type","title":"TransactionType","description":"The [TransactionType] scalar type represents a transaction type","sidebar":"docs"},"build/api/schema/schema":{"id":"build/api/schema/schema","title":"Schema Documentation","description":"This documentation has been automatically generated from the GraphQL schema.","sidebar":"docs"},"build/api/schema/subscriptions/oracle-update":{"id":"build/api/schema/subscriptions/oracle-update","title":"oracleUpdate","description":"Subscribe to be notified when a new oracle data is stored","sidebar":"docs"},"build/api/schema/subscriptions/transaction-confirmed":{"id":"build/api/schema/subscriptions/transaction-confirmed","title":"transactionConfirmed","description":"Subscribe to be notified when a transaction is stored (if acted as welcome node)","sidebar":"docs"},"build/api/schema/subscriptions/transaction-error":{"id":"build/api/schema/subscriptions/transaction-error","title":"transactionError","description":"Subscribe to be notified when a transaction is on error","sidebar":"docs"},"build/clients/ledger-wallet/api":{"id":"build/clients/ledger-wallet/api","title":"Ledger Application API","description":"Reference Repository:","sidebar":"docs"},"build/clients/ledger-wallet/commands":{"id":"build/clients/ledger-wallet/commands","title":"ADPU commands","description":"APDU commands","sidebar":"docs"},"build/clients/ledger-wallet/ledger-wallet":{"id":"build/clients/ledger-wallet/ledger-wallet","title":"Ledger wallet","description":"A blockchain or crypto wallet is a way to manage, secure, and use cryptocurrencies such as UCO, Bitcoin, Ethereum and other digital assets based on a blockchain (for example, an NFT). There are two basic types of blockchain wallets: software wallets and hardware wallets.","sidebar":"docs"},"build/clients/wallet-access":{"id":"build/clients/wallet-access","title":"Archethic\'s wallet access","description":"Onchain wallet (aka Keychain) is a wallet stored on Archethic blockchain in encrypted form, to allow only the authorized access to read it and build transaction from it.","sidebar":"docs"},"build/clients/wallet-spec":{"id":"build/clients/wallet-spec","title":"Archethic\'s wallet specification","description":"Onchain wallet (aka Keychain) is a wallet stored on Archethic blockchain in encrypted form.","sidebar":"docs"},"build/core/account":{"id":"build/core/account","title":"Account","description":"Archethic node provides a high level and fast access to an account assets using primarily memory tables with ETS.","sidebar":"docs"},"build/core/beacon-chain/beacon-chain":{"id":"build/core/beacon-chain/beacon-chain","title":"BeaconChain","description":"BeaconChain helps the Archethic sharding network to be supervised and provided global view of the system.","sidebar":"docs"},"build/core/beacon-chain/p2p-sampling":{"id":"build/core/beacon-chain/p2p-sampling","title":"P2P availability sampling","description":"Each beacon chain\'s subset is responsible to perform verification of the nodes is in charge to monitor.","sidebar":"docs"},"build/core/bootstrap":{"id":"build/core/bootstrap","title":"Bootstrap","description":"When the Archethic node, a task is launched to perform the node bootstrapping to join the network.","sidebar":"docs"},"build/core/core":{"id":"build/core/core","title":"Core development","description":"Archethic Node repository can be found here","sidebar":"docs"},"build/core/cryptography/cryptography":{"id":"build/core/cryptography/cryptography","title":"Cryptography","description":"Node cryptography is maintains through keystores","sidebar":"docs"},"build/core/cryptography/tpm":{"id":"build/core/cryptography/tpm","title":"TPM Implementation","description":"This section explains the HRT TPM Library implementation.","sidebar":"docs"},"build/core/cryptography/yubikey":{"id":"build/core/cryptography/yubikey","title":"Yubikey implementation","description":"This section explains the HRT Yubikey Library implementation.","sidebar":"docs"},"build/core/database":{"id":"build/core/database","title":"Archethic\'s database","description":"Archethic is shipped with a custom database engine built from scratch to support an efficient data storage to support","sidebar":"docs"},"build/core/election":{"id":"build/core/election","title":"Election","description":"Archethic provides rotating algorithm to elect validation and storage nodes.","sidebar":"docs"},"build/core/governance/code-proposals":{"id":"build/core/governance/code-proposals","title":"Code Proposals","description":"Archethic Blockchain is using code proposals to have a way to upgrade current blockchain","sidebar":"docs"},"build/core/governance/code-proposals-cd":{"id":"build/core/governance/code-proposals-cd","title":"CD","description":"The archethic-cd target produces an image capable of running archethic_node release.","sidebar":"docs"},"build/core/governance/code-proposals-ci":{"id":"build/core/governance/code-proposals-ci","title":"CI","description":"After a code proposal is received by a node in the network and passes initial validation, the next step in the process is the CI.","sidebar":"docs"},"build/core/mining/mining":{"id":"build/core/mining/mining","title":"Mining","description":"Transaction validation (aka Mining) defines processes and validations algorithms.","sidebar":"docs"},"build/core/mining/proof-of-work":{"id":"build/core/mining/proof-of-work","title":"Proof of Work algorithm","description":"The Archethic\'s proof of work algorithm defines way to assert the validity of the origin signature.","sidebar":"docs"},"build/core/mining/transaction-context":{"id":"build/core/mining/transaction-context","title":"Transaction context retrieval","description":"When a transaction is under validation, after the pending transaction validation, the nodes are fetching the context of the transaction.","sidebar":"docs"},"build/core/mining/transaction-validation":{"id":"build/core/mining/transaction-validation","title":"Pending transaction validation","description":"When a transaction is under validation a process is started to perform the ARCH consensus workflow.","sidebar":"docs"},"build/core/oracle-chain/memory-table":{"id":"build/core/oracle-chain/memory-table","title":"OracleChain Memory Tables","description":"OracleChain component provides scheduler and services to maintain transaction chain and real world data integration.","sidebar":"docs"},"build/core/oracle-chain/oracle-chain":{"id":"build/core/oracle-chain/oracle-chain","title":"OracleChain","description":"OracleChain is an internal mechanism inside Archethic Node Software making external data fetching embedded into a transaction chain.","sidebar":"docs"},"build/core/oracle-chain/scheduler":{"id":"build/core/oracle-chain/scheduler","title":"OracleChain Scheduler","description":"The OracleChain module contains a process in charge of scheduling the data fetching and transaction submitting.","sidebar":"docs"},"build/core/oracle-chain/service":{"id":"build/core/oracle-chain/service","title":"Oracle Chain Service","description":"OracleChain provides a way to extend it and to add more services to the scheduler.","sidebar":"docs"},"build/core/p2p/messaging":{"id":"build/core/p2p/messaging","title":"Messaging","description":"Archethic Blockchain is used a brand new P2P layer from the Supervised Multicast, but to ensure the best data transmission possible, we are using two modern approaches: Stream Multiplexer and Binary Protocol.","sidebar":"docs"},"build/core/p2p/node":{"id":"build/core/p2p/node","title":"Node","description":"Data structure","sidebar":"docs"},"build/core/p2p/p2p":{"id":"build/core/p2p/p2p","title":"P2P","description":"","sidebar":"docs"},"build/sdk/dart":{"id":"build/sdk/dart","title":"Dart SDK","description":"Archethic Blockchain Official Dart SDK available on Github","sidebar":"docs"},"build/sdk/go":{"id":"build/sdk/go","title":"Go SDK","description":"Archethic Blockchain Official Go SDK is available on Github","sidebar":"docs"},"build/sdk/js":{"id":"build/sdk/js","title":"Javascript SDK","description":"Archethic Blockchain Official Javascript SDK is available on Github","sidebar":"docs"},"build/sdk/sdk":{"id":"build/sdk/sdk","title":"SDK","description":"","sidebar":"docs"},"build/smart-contracts/fees":{"id":"build/smart-contracts/fees","title":"Smart Contracts - Fees","description":"","sidebar":"docs"},"build/smart-contracts/language/actions":{"id":"build/smart-contracts/language/actions","title":"Smart Contracts - Actions block","description":"The actions block is the code executed when the associated trigger is triggered.","sidebar":"docs"},"build/smart-contracts/language/condition":{"id":"build/smart-contracts/language/condition","title":"Smart Contracts - Condition block","description":"Conditions are blocks which purpose is to check the validity of a transaction.","sidebar":"docs"},"build/smart-contracts/language/examples":{"id":"build/smart-contracts/language/examples","title":"Smart Contracts - Examples","description":"Hello World","sidebar":"docs"},"build/smart-contracts/language/language":{"id":"build/smart-contracts/language/language","title":"Smart Contracts - Language","description":"A Smart Contract is defined as followed:","sidebar":"docs"},"build/smart-contracts/language/legacy/examples":{"id":"build/smart-contracts/language/legacy/examples","title":"Smart Contract examples","description":"Recurrent transfer","sidebar":"docs"},"build/smart-contracts/language/legacy/language":{"id":"build/smart-contracts/language/legacy/language","title":"Smart Contract Language","description":"Archethic Blockchain defines a new smart contract language which was designed to resolve the issue of smart contracts:","sidebar":"docs"},"build/smart-contracts/language/legacy/smart-contracts":{"id":"build/smart-contracts/language/legacy/smart-contracts","title":"Smart Contracts (Legacy)","description":"This specification is deprecated and will be still be valid for SC before 1.1.0. The new version is available here","sidebar":"docs"},"build/smart-contracts/language/library":{"id":"build/smart-contracts/language/library","title":"Smart Contracts - Library","description":"The Smart Contract library is composed of many modules with many functions in each.","sidebar":"docs"},"build/smart-contracts/language/triggers":{"id":"build/smart-contracts/language/triggers","title":"Smart Contracts - Triggers","description":"Contract triggered by a transaction","sidebar":"docs"},"build/smart-contracts/playground/build":{"id":"build/smart-contracts/playground/build","title":"Smart Contracts Playground - Build","description":"Let\'s create a small smart contracts that reacts to two different triggers. We\'ll then be able to test them separately.","sidebar":"docs"},"build/smart-contracts/playground/deploy":{"id":"build/smart-contracts/playground/deploy","title":"Smart Contracts Playground - Deploy","description":"The communication via the archethic wallet has not been done yet. For this reason we disabled the deployment to the mainnet because it doesn\'t meet the security standard we expect.","sidebar":"docs"},"build/smart-contracts/playground/functions":{"id":"build/smart-contracts/playground/functions","title":"Smart Contracts Playground - Functions","description":"Since 1.3, we introduced the capability to have some public functions in to smart contract code.","sidebar":"docs"},"build/smart-contracts/playground/mock-form":{"id":"build/smart-contracts/playground/mock-form","title":"Smart Contracts Playground - Mock form","description":"Mocks allow developers to simulate the behaviour of functions that have side-effects. A few examples of side-effect: retrieve the genesis address of a chain, retrieve the date, a random value etc.","sidebar":"docs"},"build/smart-contracts/playground/sc-playground":{"id":"build/smart-contracts/playground/sc-playground","title":"Smart Contracts Playground","description":"The Smart Contracts playground is an online service use to write, test and deploy smart contracts.","sidebar":"docs"},"build/smart-contracts/playground/transaction-form":{"id":"build/smart-contracts/playground/transaction-form","title":"Smart Contracts Playground - Transaction form","description":"The transaction form is a form that you might encounter at different places:","sidebar":"docs"},"build/smart-contracts/smart-contracts":{"id":"build/smart-contracts/smart-contracts","title":"Smart Contracts","description":"Smart-contracts are in computing what robots are in real life: they perform actions according to events.","sidebar":"docs"},"build/testnet":{"id":"build/testnet","title":"Testnet","description":"Local","sidebar":"docs"},"contributing":{"id":"contributing","title":"Contributing","description":"This documentation is maintained by the Archethic Foundation. It\'s an open source project and aims to be the most extensive","sidebar":"docs"},"FAQ/aeweb":{"id":"FAQ/aeweb","title":"AEWeb","description":"General","sidebar":"docs"},"FAQ/bridge":{"id":"FAQ/bridge","title":"Archethic Bridge $UCO one-way","description":"General","sidebar":"docs"},"FAQ/bridge-2-ways":{"id":"FAQ/bridge-2-ways","title":"Archethic Bridge 2-ways","description":"General","sidebar":"docs"},"FAQ/wallet":{"id":"FAQ/wallet","title":"Wallet","description":"General","sidebar":"docs"},"learn/arch-consensus/arch-consensus":{"id":"learn/arch-consensus/arch-consensus","title":"ARCH consensus","description":"Archethic Blockchain is using a new consensus called ARCH (Atomic Rotating Commitment Heuristic) for an uncompromising consensus to support high scalability and high throughput.","sidebar":"docs"},"learn/arch-consensus/proof-of-work":{"id":"learn/arch-consensus/proof-of-work","title":"Proof of Work","description":"Others blockchains are using the concept of Proof of Work to ensure an unpredictable and pseudo random election of block validation (mining).","sidebar":"docs"},"learn/archethic-intro":{"id":"learn/archethic-intro","title":"Archethic introduction","description":"Archethic is the next generation of Blockchain which provides a truly decentralized limitless network, using TransactionChain and a new consensus named ARCH (Atomic Rotating Commitment Heuristic),","sidebar":"docs"},"learn/cryptography/cryptography":{"id":"learn/cryptography/cryptography","title":"Cryptography","description":"Archethic network through the usage of TransactionChains is leveraging an adaptative and quantum-safe cryptography.","sidebar":"docs"},"learn/cryptography/hardware-root-of-trust":{"id":"learn/cryptography/hardware-root-of-trust","title":"Hardware Root of Trust","description":"What is hardware root of trust?","sidebar":"docs"},"learn/decentralized-id/decentralized-id":{"id":"learn/decentralized-id/decentralized-id","title":"Decentralized Identity","description":"Identity","sidebar":"docs"},"learn/decentralized-id/keychain":{"id":"learn/decentralized-id/keychain","title":"Keychain","description":"Archethic\'s keychain is new concept to make wallet accessible, configurable and interoperable with several service providers and why not multi chains.","sidebar":"docs"},"learn/ecosystem":{"id":"learn/ecosystem","title":"Ecosystem","description":"The technical and functional parameters that make Archethic unique and ready for global adoption:","sidebar":"docs"},"learn/fee":{"id":"learn/fee","title":"Transaction fees","description":"Archethic Blockchain is using specific heuristic algorithms to ensure the best transaction\'s distribution.","sidebar":"docs"},"learn/governance/governance":{"id":"learn/governance/governance","title":"Governance","description":"A DAO (Decentralized Autonomous Organization) is a decentralized organization whose governance rules are automated,","sidebar":"docs"},"learn/oracle-chain":{"id":"learn/oracle-chain","title":"OracleChain","description":"Archethic Blockchain supports Off-Chain communication through a dedicated transaction chain called OracleChain.","sidebar":"docs"},"learn/p2p/bootstrapping":{"id":"learn/p2p/bootstrapping","title":"Bootstrapping","description":"Archethic Blockchain by using Network Transaction and Supervised Multicast, requires some actions to be performed","sidebar":"docs"},"learn/p2p/p2p":{"id":"learn/p2p/p2p","title":"P2P","description":"Archethic is a permissionless network where any node can participate into the network as long as they have some hardware requirements such secure element to enclave the private keys","sidebar":"docs"},"learn/p2p/self-repair":{"id":"learn/p2p/self-repair","title":"Self Repair","description":"Archethic Blockchain is using a self-repair mechanism to be able to sync/re-sync missing transactions to be able","sidebar":"docs"},"learn/patents":{"id":"learn/patents","title":"Patents","description":"12 patents to build a new ecosystem","sidebar":"docs"},"learn/sharding/beacon-chain/beacon-chain":{"id":"learn/sharding/beacon-chain/beacon-chain","title":"Beacon Chain","description":"Archethic Blockchain is using Sharding mechanism to ensure scalability in terms of storage and validation.","sidebar":"docs"},"learn/sharding/beacon-chain/explorer":{"id":"learn/sharding/beacon-chain/explorer","title":"Beacon Explorer","description":"Archethic Blockchain leverages Sharding to outperform the exiting blockchains using shards called: subsets and BeaconChain Explorer displays the entire transactions across subsets.","sidebar":"docs"},"learn/sharding/replication-attestation":{"id":"learn/sharding/replication-attestation","title":"Replication attestation","description":"How to ensure a minimum of confirmation from the storage nodes to ensure the data availability of a given transaction.","sidebar":"docs"},"learn/sharding/sharding":{"id":"learn/sharding/sharding","title":"Sharding","description":"To become an unlimited decentralized network, Archethic Blockchain is using a feature called Sharding, used to split processing and storage power to ensure a scalable system.","sidebar":"docs"},"learn/token":{"id":"learn/token","title":"Tokens","description":"Tokens is an important feature on Archethic.","sidebar":"docs"},"learn/transaction-chain":{"id":"learn/transaction-chain","title":"Transaction chains","description":"In the Archethic network, there are no blocks but only transactions, as each block is reduced to its atomic form - transaction with its own validation evidences.","sidebar":"docs"},"learn/transaction-types":{"id":"learn/transaction-types","title":"Transaction types","description":"The transaction\'s type is used to give a hint on what the transaction contains. Some types must respect some conditions.","sidebar":"docs"},"learn/uco":{"id":"learn/uco","title":"UCO token","description":"Archethic, an open-source public blockchain is an infrastructure that is fuelled by its native cryptocurrency and should ideally scale to the sum of its individual nodes\u2019 performance. It needs to be designed in such a way that it is a self-sustaining economy run by the people, for the people.","sidebar":"docs"},"participate/aeweb/aeweb":{"id":"participate/aeweb/aeweb","title":"Archethic Web (AEWeb)","description":"Archethic has developed a new solution to host websites on a decentralized network to avoid censorship, increase security and have high-availability and resiliency.","sidebar":"docs"},"participate/aeweb/automation":{"id":"participate/aeweb/automation","title":"Automate deployments","description":"AEWeb\'s CLI is really simple to deploy websites from the command line and is handy on low-frequent deployment usage.","sidebar":"docs"},"participate/aeweb/dns":{"id":"participate/aeweb/dns","title":"AEWeb - Domain names","description":"DNS (Domain Name System) is a mechanism which resolves websites names to server IP addresses, making website\'s URL nicer.","sidebar":"docs"},"participate/aeweb/how-it-works":{"id":"participate/aeweb/how-it-works","title":"AEWeb - How it works","description":"Archethic Web (AEWeb) is using transaction chains to host any website on Archethic Blockchain.","sidebar":"docs"},"participate/aeweb/usage/aeweb-front":{"id":"participate/aeweb/usage/aeweb-front","title":"AEWeb - Application Front End","description":"Access//aeweb.archethic.net","sidebar":"docs"},"participate/aeweb/usage/cli":{"id":"participate/aeweb/usage/cli","title":"AEWeb - CLI","description":"Repository//github.com/archethic-foundation/aeweb-cli","sidebar":"docs"},"participate/bridge/bridge":{"id":"participate/bridge/bridge","title":"Archethic\'s bridge","description":"Archethic has developed a decentralized and P2P bridge to facilitate the exchange of your UCO ERC20 tokens with other blockchains (e.g., Ethereum, Polygon, BSC) and to allow for a simple and secure exchange of assets in the most atomic way.","sidebar":"docs"},"participate/bridge/usage/bridge-front":{"id":"participate/bridge/usage/bridge-front","title":"Bridge - Application Front End","description":"Currently, the two-way bridge is available exclusively on the testnet.","sidebar":"docs"},"participate/cli/archethic-cli":{"id":"participate/cli/archethic-cli","title":"Archethic\'s CLI","description":"Developers like to use terminal applications to speed up their productivity, therefore Archethic have also","sidebar":"docs"},"participate/dex/dex":{"id":"participate/dex/dex","title":"Archethic\'s DEX","description":"The current version of Archethic\'s DEX is only available on the testnet.","sidebar":"docs"},"participate/dex/usage/aeSwap":{"id":"participate/dex/usage/aeSwap","title":"DEX - Application Front End","description":"Please note that aeSwap is currently available exclusively on the testnet.","sidebar":"docs"},"participate/wallet/archethic-wallet":{"id":"participate/wallet/archethic-wallet","title":"Archethic Wallet","description":"Archethic has developed a fully decentralized and non-custodial cryptocurrency hot wallet that enables users to safely manage assets on Layer 1 Archethic blockchain.","sidebar":"docs"},"participate/wallet/dapps-communication":{"id":"participate/wallet/dapps-communication","title":"Communication with DApps","description":"In the blockchain ecosystem, decentralized applications (dApps) are becoming increasingly popular. To enable reliable and secure communication between these applications and the blockchain, Archethic has developed a communication protocol with its Archethic Wallet application. This protocol allows dApps to delegate secure communication with the blockchain to the wallet and to protect private information within the wallet (seed, private keys) without exposing it to the dApps.","sidebar":"docs"}}}')}}]); \ No newline at end of file diff --git a/assets/js/93c272fe.04429a74.js b/assets/js/93c272fe.04429a74.js new file mode 100644 index 000000000..ef791e974 --- /dev/null +++ b/assets/js/93c272fe.04429a74.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5896],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=l(n),h=r,m=p["".concat(c,".").concat(h)]||p[h]||u[h]||o;return n?a.createElement(m,i(i({ref:t},d),{},{components:n})):a.createElement(m,i({ref:t},d))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=h;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"smart-contracts",title:"Smart Contracts"},i=void 0,s={unversionedId:"build/smart-contracts/smart-contracts",id:"build/smart-contracts/smart-contracts",title:"Smart Contracts",description:"Smart-contracts are in computing what robots are in real life: they perform actions according to events.",source:"@site/docs/build/smart-contracts/README.md",sourceDirName:"build/smart-contracts",slug:"/build/smart-contracts/",permalink:"/build/smart-contracts/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"smart-contracts",title:"Smart Contracts"},sidebar:"docs",previous:{title:"Javascript SDK",permalink:"/build/sdk/js"},next:{title:"Language",permalink:"/build/smart-contracts/language/"}},c={},l=[{value:"Autonomous",id:"autonomous",level:2},{value:"Modifiable:",id:"modifiable",level:2},{value:"Interpreted",id:"interpreted",level:2},{value:"Stateless",id:"stateless",level:2}],d={toc:l},p="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"Smart-contracts are in computing what robots are in real life: they perform actions according to events.")),(0,r.kt)("p",null,"Archethic Blockchain leverages next generation of smart contract to make the development of decentralized application easier to bring a mass adoption of the Blockchain technology."),(0,r.kt)("p",null,"They introduce new features to this domain:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Completly autonomous and can be triggered from internal states (date, transactions) or real life (OracleChain updates)."),(0,r.kt)("li",{parentName:"ul"},"Entirely modifiable: TransactionChains make update seamless"),(0,r.kt)("li",{parentName:"ul"},"Interpreted: Code is interpreted and atomically verified by the miners"),(0,r.kt)("li",{parentName:"ul"},"Without external reality: They are entirely based on the UTXO model and do not depend on the state of an internal database but only the transactions validated")),(0,r.kt)("p",null,"Archethic Smart Contract is defined by: ",(0,r.kt)("inlineCode",{parentName:"p"},"triggers"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"conditions")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"actions")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Triggers: events will automatically launch the execution of a contract."),(0,r.kt)("li",{parentName:"ul"},"Conditions: define the rules to accept new transactions (chain or UTXO)"),(0,r.kt)("li",{parentName:"ul"},"Actions: operations to perform from a trigger's calls")),(0,r.kt)("h2",{id:"autonomous"},"Autonomous"),(0,r.kt)("p",null,"Archethic smart contracts autonomous behavior is due to the capability to define different kind of triggers:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Datetime: when the current date matches this timestamp"),(0,r.kt)("li",{parentName:"ul"},"Interval: when the current dates matches this cron interval scheduler"),(0,r.kt)("li",{parentName:"ul"},"Transaction: when the contract receive a transaction in input (UTXO model)"),(0,r.kt)("li",{parentName:"ul"},"Oracle: when the OracleChain pushed new data")),(0,r.kt)("p",null,"Transactions are then created on the behalf of the contract's owner which authorized nodes to use the chain's private key to generate transaction."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"To restrict a misusage of the user's cryptographic keys, ",(0,r.kt)("inlineCode",{parentName:"p"},"inherit conditions")," can be defined as a security guard by the contract's owner."),(0,r.kt)("p",{parentName:"admonition"},"However, in order to make contract development and improve readability, transparent inherit conditions are generated based on the action's code.\nThis verification is done during the transaction validation and the ARCH consensus with atomic commitment and ensures the next transaction of the chain respects the inherit constraints either :"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"mentioned in the code by the contract's owner"),(0,r.kt)("li",{parentName:"ul"},"derived by the action's code.")),(0,r.kt)("p",{parentName:"admonition"},"This way, users can delegate the chain's private key to the nodes with the guarantee of a good usage of the chain's identity and signature capability.")),(0,r.kt)("h2",{id:"modifiable"},"Modifiable:"),(0,r.kt)("p",null,"Archethic relies on TransactionChain which means that a smart contract can have its own transaction chain."),(0,r.kt)("p",null,"Then, it is subject to the same properties of the transaction chain: any last transaction of a chain is considered as the reference."),(0,r.kt)("p",null,"For example:"),(0,r.kt)("p",null,"We deployed a smart contract with the address ",(0,r.kt)("inlineCode",{parentName:"p"},"@Contract1"),"."),(0,r.kt)("p",null,"Then we want to add a feature or to fix an issue, we resend a transaction on this chain, and we get the new address: ",(0,r.kt)("inlineCode",{parentName:"p"},"@Contract2")),(0,r.kt)("p",null,"But clients which depends on the smart contract don't need to update their code or interaction, as each destination address is forwarded to the last one."),(0,r.kt)("p",null,"So if we send a transaction to ",(0,r.kt)("inlineCode",{parentName:"p"},"@Contract#"),", the code executed will be at ",(0,r.kt)("inlineCode",{parentName:"p"},"@Contract2")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Because we are not relying on internal state and database, and only with the UTXO, we don't need to provide migrations of data or funds, and neither implement cross shard synchronization")),(0,r.kt)("h2",{id:"interpreted"},"Interpreted"),(0,r.kt)("p",null,"Archethic smart contracts are interpreted instead of compiled, here are the reasons:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Interpreted code is understandable by the human, and compiled code are only understandable by the computer.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Intepreted code makes the transparency and audit of smart contracts easier as we do need to provide the source of the contracts")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Interpreted code makes verification and safety checks better, instead to execute a code in blindness, miners can step by step verify the instructions and avoid any security issues"))),(0,r.kt)("h2",{id:"stateless"},"Stateless"),(0,r.kt)("p",null,"Archethic Smart Contracts does not depend on internal state or databases, only the UTXO is used as inputs and the source of truth relies on the transactions."),(0,r.kt)("p",null,"For example, in an e-commerce smart contract, the smart-contract issued by a merchant will be able to define stocks, prices and interactions with its customers using a view which is continuously updated by the transactions validated to that same smart-contract."),(0,r.kt)("p",null,"The contract doesn't hold a given state but allows it to be calculated. In the example above, can verify the proven status of orders through validated transactions."),(0,r.kt)("p",null,"Hence, each state is irrefutable and unambiguous."),(0,r.kt)("p",null,'However, if required, we could easily make a snapshot data during time to have faster reads for archived data, by creating a new transaction on the chain.\nThis operation would serialize the "state" of a contract and be able to be queried by applications.'),(0,r.kt)("admonition",{title:"Be careful",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Any data processed within the contract which is not stored in the next transaction or send somewhere will be lost")))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/93c272fe.7dfed720.js b/assets/js/93c272fe.7dfed720.js deleted file mode 100644 index 9bcd68849..000000000 --- a/assets/js/93c272fe.7dfed720.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5896],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=l(n),h=r,m=p["".concat(c,".").concat(h)]||p[h]||u[h]||o;return n?a.createElement(m,i(i({ref:t},d),{},{components:n})):a.createElement(m,i({ref:t},d))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=h;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"smart-contracts",title:"Smart Contracts"},i=void 0,s={unversionedId:"build/smart-contracts/smart-contracts",id:"build/smart-contracts/smart-contracts",title:"Smart Contracts",description:"Smart-contracts are in computing what robots are in real life: they perform actions according to events.",source:"@site/docs/build/smart-contracts/README.md",sourceDirName:"build/smart-contracts",slug:"/build/smart-contracts/",permalink:"/build/smart-contracts/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"smart-contracts",title:"Smart Contracts"},sidebar:"docs",previous:{title:"Javascript SDK",permalink:"/build/sdk/js"},next:{title:"Language",permalink:"/build/smart-contracts/language/"}},c={},l=[{value:"Autonomous",id:"autonomous",level:2},{value:"Modifiable:",id:"modifiable",level:2},{value:"Interpreted",id:"interpreted",level:2},{value:"Stateless",id:"stateless",level:2}],d={toc:l},p="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"Smart-contracts are in computing what robots are in real life: they perform actions according to events.")),(0,r.kt)("p",null,"Archethic Blockchain leverages next generation of smart contract to make the development of decentralized application easier to bring a mass adoption of the Blockchain technology."),(0,r.kt)("p",null,"They introduce new features to this domain:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Completly autonomous and can be triggered from internal states (date, transactions) or real life (OracleChain updates)."),(0,r.kt)("li",{parentName:"ul"},"Entirely modifiable: TransactionChains make update seamless"),(0,r.kt)("li",{parentName:"ul"},"Interpreted: Code is interpreted and atomically verified by the miners"),(0,r.kt)("li",{parentName:"ul"},"Without external reality: They are entirely based on the UTXO model and do not depend on the state of an internal database but only the transactions validated")),(0,r.kt)("p",null,"Archethic Smart Contract is defined by: ",(0,r.kt)("inlineCode",{parentName:"p"},"triggers"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"conditions")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"actions")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Triggers: events will automatically launch the execution of a contract."),(0,r.kt)("li",{parentName:"ul"},"Conditions: define the rules to accept new transactions (chain or UTXO)"),(0,r.kt)("li",{parentName:"ul"},"Actions: operations to perform from a trigger's calls")),(0,r.kt)("h2",{id:"autonomous"},"Autonomous"),(0,r.kt)("p",null,"Archethic smart contracts autonomous behavior is due to the capability to define different kind of triggers:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Datetime: when the current date matches this timestamp"),(0,r.kt)("li",{parentName:"ul"},"Interval: when the current dates matches this cron interval scheduler"),(0,r.kt)("li",{parentName:"ul"},"Transaction: when the contract receive a transaction in input (UTXO model)"),(0,r.kt)("li",{parentName:"ul"},"Oracle: when the OracleChain pushed new data")),(0,r.kt)("p",null,"Transactions are then created on the behalf of the contract's owner which authorized nodes to use the chain's private key to generate transaction."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"To restrict a misusage of the user's cryptographic keys, ",(0,r.kt)("inlineCode",{parentName:"p"},"inherit conditions")," can be defined as a security guard by the contract's owner."),(0,r.kt)("p",{parentName:"admonition"},"However, in order to make contract development and improve readability, transparent inherit conditions are generated based on the action's code.\nThis verification is done during the transaction validation and the ARCH consensus with atomic commitment and ensures the next transaction of the chain respects the inherit constraints either :"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"mentioned in the code by the contract's owner"),(0,r.kt)("li",{parentName:"ul"},"derived by the action's code.")),(0,r.kt)("p",{parentName:"admonition"},"This way, users can delegate the chain's private key to the nodes with the guarantee of a good usage of the chain's identity and signature capability.")),(0,r.kt)("h2",{id:"modifiable"},"Modifiable:"),(0,r.kt)("p",null,"Archethic relies on TransactionChain which means that a smart contract can have its own transaction chain."),(0,r.kt)("p",null,"Then, it is subject to the same properties of the transaction chain: any last transaction of a chain is considered as the reference."),(0,r.kt)("p",null,"For example:"),(0,r.kt)("p",null,"We deployed a smart contract with the address ",(0,r.kt)("inlineCode",{parentName:"p"},"@Contract1"),"."),(0,r.kt)("p",null,"Then we want to add a feature or to fix an issue, we resend a transaction on this chain, and we get the new address: ",(0,r.kt)("inlineCode",{parentName:"p"},"@Contract2")),(0,r.kt)("p",null,"But clients which depends on the smart contract don't need to update their code or interaction, as each destination address is forwarded to the last one."),(0,r.kt)("p",null,"So if we send a transaction to ",(0,r.kt)("inlineCode",{parentName:"p"},"@Contract#"),", the code executed will be at ",(0,r.kt)("inlineCode",{parentName:"p"},"@Contract2")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Because we are not relying on internal state and database, and only with the UTXO, we don't need to provide migrations of data or funds, and neither implement cross shard synchronization")),(0,r.kt)("h2",{id:"interpreted"},"Interpreted"),(0,r.kt)("p",null,"Archethic smart contracts are interpreted instead of compiled, here are the reasons:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Interpreted code is understandable by the human, and compiled code are only understandable by the computer.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Intepreted code makes the transparency and audit of smart contracts easier as we do need to provide the source of the contracts")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Interpreted code makes verification and safety checks better, instead to execute a code in blindness, miners can step by step verify the instructions and avoid any security issues"))),(0,r.kt)("h2",{id:"stateless"},"Stateless"),(0,r.kt)("p",null,"Archethic Smart Contracts does not depend on internal state or databases, only the UTXO is used as inputs and the source of truth relies on the transactions."),(0,r.kt)("p",null,"For example, in an e-commerce smart contract, the smart-contract issued by a merchant will be able to define stocks, prices and interactions with its customers using a view which is continuously updated by the transactions validated to that same smart-contract."),(0,r.kt)("p",null,"The contract doesn't hold a given state but allows it to be calculated. In the example above, can verify the proven status of orders through validated transactions."),(0,r.kt)("p",null,"Hence, each state is irrefutable and unambiguous."),(0,r.kt)("p",null,'However, if required, we could easily make a snapshot data during time to have faster reads for archived data, by creating a new transaction on the chain.\nThis operation would serialize the "state" of a contract and be able to be queried by applications.'),(0,r.kt)("admonition",{title:"Be careful",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Any data processed within the contract which is not stored in the next transaction or send somewhere will be lost")))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/954979f8.2e3de44a.js b/assets/js/954979f8.2e3de44a.js deleted file mode 100644 index 2c24b66d3..000000000 --- a/assets/js/954979f8.2e3de44a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9707],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),u=l(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||p[m]||o;return n?r.createElement(f,s(s({ref:t},d),{},{components:n})):r.createElement(f,s({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:a,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"examples",title:"Smart Contracts - Examples",sidebar_label:"Examples",sidebar_position:5},s=void 0,i={unversionedId:"build/smart-contracts/language/examples",id:"build/smart-contracts/language/examples",title:"Smart Contracts - Examples",description:"Hello World",source:"@site/docs/build/smart-contracts/language/examples.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/examples",permalink:"/build/smart-contracts/language/examples",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:5,frontMatter:{id:"examples",title:"Smart Contracts - Examples",sidebar_label:"Examples",sidebar_position:5},sidebar:"docs",previous:{title:"Library",permalink:"/build/smart-contracts/language/library"},next:{title:"Legacy",permalink:"/build/smart-contracts/language/legacy/"}},c={},l=[{value:"Hello World",id:"hello-world",level:2},{value:"ICO (Initial Coin Offering)",id:"ico-initial-coin-offering",level:2},{value:"Recurring ICO",id:"recurring-ico",level:2},{value:"Vote system",id:"vote-system",level:2}],d={toc:l},u="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"hello-world"},"Hello World"),(0,a.kt)("p",null,'This simple contract will be triggered once, at the specified unix timestamp.\nIt will create a new transaction with a content "Hello world!".'),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: datetime, at: 1689857160 do\n Contract.set_content("Hello world!")\nend\n')),(0,a.kt)("h2",{id:"ico-initial-coin-offering"},"ICO (Initial Coin Offering)"),(0,a.kt)("p",null,"This contract the crowdsale of an ICO."),(0,a.kt)("p",null,"Users can send UCOs to this contract and will receive 10000 times the amount as token from this contract."),(0,a.kt)("p",null,"It is possible for users to define a different receive address."),(0,a.kt)("p",null,"The Smart Contract's chain must define a token."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\ncondition triggered_by: transaction, on: buyToken(recipient_address), as: [\n uco_transfers: check_amount(transaction.uco_movements)\n]\n\nactions triggered_by: transaction, on: buyToken(recipient_address) do\n transfers = get_transfered_amount()\n\n # Get the amount of UCO sent to this contract\n amount_send = number_of_uco_sent()\n\n # Convert UCO to the number of tokens to credit. Each UCO worth 10000 token\n token_to_credit = number_of_tokens(amount_send)\n\n Contract.set_type("transfer")\n\n # Users can specify to send the token in a different address\n Contract.add_token_transfer(to: recipient_address, token_address: token_address(), amount: token_to_credit)\nend\n\nfun number_of_tokens(uco_amount) do\n uco_amount * 10000\nend\n\nfun number_of_uco_sent() do\n Map.get(transaction.uco_movements, contract.address)\nend\n\nfun get_transfered_amount() do\n Map.get(transaction.uco_transfers, contract.address)\nend\n\nfun check_amount(transfers) do \n transfered_amount = Map.get(transfers, contract.address)\n transfered_amount != nil && transfered_amount > 0\nend\n\nfun token_address() do\n Chain.get_genesis_address(contract.address)\nend\n\n')),(0,a.kt)("h2",{id:"recurring-ico"},"Recurring ICO"),(0,a.kt)("p",null,"This contract will automatically call the ICO contract with 2 UCOs every hours.\nThe tokens will be transfered in a different chain."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: interval, at: "0 * * * *" do\n\n ico_contract = 0x0000993F3BE0CE40541E47735AA083854ECAC7785B39435C90D8456C777B9E9D81F1\n\n Contract.set_type("transfer")\n Contract.add_recipient(address: ico_contract, action: "buyToken", args: [0x0000A3A066DD64FBD51AE384F2383684B3803BC72012BFEAA9CD1C93AB7C60F584DC])\n Contract.add_uco_transfer(to: ico_contract, amount: 2)\nend\n')),(0,a.kt)("h2",{id:"vote-system"},"Vote system"),(0,a.kt)("p",null,"This contract counts the number of votes for list of candidates (Mr.X and Mrs.Y)."),(0,a.kt)("p",null,"For each vote request, it increments the number of votes for the given candidate,\nand create a new transaction out of it, with the new state in the ",(0,a.kt)("inlineCode",{parentName:"p"},"content")," field of the transaction as JSON document."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"A public function is available to be able to easily query the number of votes in the system")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\ncondition triggered_by: transaction, on: vote(candidate), as: [\n content: List.in?(["X", "Y"], candidate)\n]\n\nactions triggered_by: transaction, on: vote(candidate) do\n votes = []\n\n if contract.content == "" do\n votes = add_vote([x: 0, y: 0], candidate)\n else\n votes = get_votes()\n votes = add_vote(votes, candidate)\n end\n\n Contract.set_content(Json.to_string(votes))\nend\n\nfun add_vote(votes, candidate) do\n if candidate == "X" do\n Map.set(votes, "x", votes.x + 1)\n else\n Map.set(votes, "y", votes.y + 1)\n end\nend\n\nexport fun get_votes() do\n count_x = Json.path_extract(contract.content, "$.x")\n count_y = Json.path_extract(contract.content, "$.y")\n [x: count_x, y: count_y]\nend\n')))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/954979f8.5d4d7fd4.js b/assets/js/954979f8.5d4d7fd4.js new file mode 100644 index 000000000..cf87a59f6 --- /dev/null +++ b/assets/js/954979f8.5d4d7fd4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9707],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),u=l(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||p[m]||o;return n?r.createElement(f,s(s({ref:t},d),{},{components:n})):r.createElement(f,s({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:a,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"examples",title:"Smart Contracts - Examples",sidebar_label:"Examples",sidebar_position:5},s=void 0,i={unversionedId:"build/smart-contracts/language/examples",id:"build/smart-contracts/language/examples",title:"Smart Contracts - Examples",description:"Hello World",source:"@site/docs/build/smart-contracts/language/examples.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/examples",permalink:"/build/smart-contracts/language/examples",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:5,frontMatter:{id:"examples",title:"Smart Contracts - Examples",sidebar_label:"Examples",sidebar_position:5},sidebar:"docs",previous:{title:"Library",permalink:"/build/smart-contracts/language/library"},next:{title:"Legacy",permalink:"/build/smart-contracts/language/legacy/"}},c={},l=[{value:"Hello World",id:"hello-world",level:2},{value:"ICO (Initial Coin Offering)",id:"ico-initial-coin-offering",level:2},{value:"Recurring ICO",id:"recurring-ico",level:2},{value:"Vote system",id:"vote-system",level:2}],d={toc:l},u="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"hello-world"},"Hello World"),(0,a.kt)("p",null,'This simple contract will be triggered once, at the specified unix timestamp.\nIt will create a new transaction with a content "Hello world!".'),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: datetime, at: 1689857160 do\n Contract.set_content("Hello world!")\nend\n')),(0,a.kt)("h2",{id:"ico-initial-coin-offering"},"ICO (Initial Coin Offering)"),(0,a.kt)("p",null,"This contract the crowdsale of an ICO."),(0,a.kt)("p",null,"Users can send UCOs to this contract and will receive 10000 times the amount as token from this contract."),(0,a.kt)("p",null,"It is possible for users to define a different receive address."),(0,a.kt)("p",null,"The Smart Contract's chain must define a token."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\ncondition triggered_by: transaction, on: buyToken(recipient_address), as: [\n uco_transfers: check_amount(transaction.uco_movements)\n]\n\nactions triggered_by: transaction, on: buyToken(recipient_address) do\n transfers = get_transfered_amount()\n\n # Get the amount of UCO sent to this contract\n amount_send = number_of_uco_sent()\n\n # Convert UCO to the number of tokens to credit. Each UCO worth 10000 token\n token_to_credit = number_of_tokens(amount_send)\n\n Contract.set_type("transfer")\n\n # Users can specify to send the token in a different address\n Contract.add_token_transfer(to: recipient_address, token_address: token_address(), amount: token_to_credit)\nend\n\nfun number_of_tokens(uco_amount) do\n uco_amount * 10000\nend\n\nfun number_of_uco_sent() do\n Map.get(transaction.uco_movements, contract.address)\nend\n\nfun get_transfered_amount() do\n Map.get(transaction.uco_transfers, contract.address)\nend\n\nfun check_amount(transfers) do \n transfered_amount = Map.get(transfers, contract.address)\n transfered_amount != nil && transfered_amount > 0\nend\n\nfun token_address() do\n Chain.get_genesis_address(contract.address)\nend\n\n')),(0,a.kt)("h2",{id:"recurring-ico"},"Recurring ICO"),(0,a.kt)("p",null,"This contract will automatically call the ICO contract with 2 UCOs every hours.\nThe tokens will be transfered in a different chain."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: interval, at: "0 * * * *" do\n\n ico_contract = 0x0000993F3BE0CE40541E47735AA083854ECAC7785B39435C90D8456C777B9E9D81F1\n\n Contract.set_type("transfer")\n Contract.add_recipient(address: ico_contract, action: "buyToken", args: [0x0000A3A066DD64FBD51AE384F2383684B3803BC72012BFEAA9CD1C93AB7C60F584DC])\n Contract.add_uco_transfer(to: ico_contract, amount: 2)\nend\n')),(0,a.kt)("h2",{id:"vote-system"},"Vote system"),(0,a.kt)("p",null,"This contract counts the number of votes for list of candidates (Mr.X and Mrs.Y)."),(0,a.kt)("p",null,"For each vote request, it increments the number of votes for the given candidate,\nand create a new transaction out of it, with the new state in the ",(0,a.kt)("inlineCode",{parentName:"p"},"content")," field of the transaction as JSON document."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"A public function is available to be able to easily query the number of votes in the system")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\ncondition triggered_by: transaction, on: vote(candidate), as: [\n content: List.in?(["X", "Y"], candidate)\n]\n\nactions triggered_by: transaction, on: vote(candidate) do\n votes = []\n\n if contract.content == "" do\n votes = add_vote([x: 0, y: 0], candidate)\n else\n votes = get_votes()\n votes = add_vote(votes, candidate)\n end\n\n Contract.set_content(Json.to_string(votes))\nend\n\nfun add_vote(votes, candidate) do\n if candidate == "X" do\n Map.set(votes, "x", votes.x + 1)\n else\n Map.set(votes, "y", votes.y + 1)\n end\nend\n\nexport fun get_votes() do\n count_x = Json.path_extract(contract.content, "$.x")\n count_y = Json.path_extract(contract.content, "$.y")\n [x: count_x, y: count_y]\nend\n')))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/9bb63452.38760e0d.js b/assets/js/9bb63452.ddc3563d.js similarity index 57% rename from assets/js/9bb63452.38760e0d.js rename to assets/js/9bb63452.ddc3563d.js index 1ed443b0e..472bd0a03 100644 --- a/assets/js/9bb63452.38760e0d.js +++ b/assets/js/9bb63452.ddc3563d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[974],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),s=l(r),f=o,m=s["".concat(p,".").concat(f)]||s[f]||d[f]||c;return r?n.createElement(m,a(a({ref:t},u),{},{components:r})):n.createElement(m,a({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,a=new Array(c);a[0]=f;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[s]="string"==typeof e?e:o,a[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>d,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var n=r(87462),o=(r(67294),r(3905));r(8209);const c={id:"p2p",title:"P2P"},a=void 0,i={unversionedId:"build/core/p2p/p2p",id:"build/core/p2p/p2p",title:"P2P",description:"",source:"@site/docs/build/core/p2p/README.md",sourceDirName:"build/core/p2p",slug:"/build/core/p2p/",permalink:"/build/core/p2p/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"p2p",title:"P2P"},sidebar:"docs",previous:{title:"Service",permalink:"/build/core/oracle-chain/service"},next:{title:"Messaging",permalink:"/build/core/p2p/messaging"}},p={},l=[],u={toc:l},s="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[974],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,p=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),s=l(r),f=o,m=s["".concat(p,".").concat(f)]||s[f]||d[f]||c;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,i=new Array(c);i[0]=f;var a={};for(var p in t)hasOwnProperty.call(t,p)&&(a[p]=t[p]);a.originalType=e,a[s]="string"==typeof e?e:o,i[1]=a;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>d,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var n=r(87462),o=(r(67294),r(3905));r(8209);const c={id:"p2p",title:"P2P"},i=void 0,a={unversionedId:"build/core/p2p/p2p",id:"build/core/p2p/p2p",title:"P2P",description:"",source:"@site/docs/build/core/p2p/README.md",sourceDirName:"build/core/p2p",slug:"/build/core/p2p/",permalink:"/build/core/p2p/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"p2p",title:"P2P"},sidebar:"docs",previous:{title:"Service",permalink:"/build/core/oracle-chain/service"},next:{title:"Messaging",permalink:"/build/core/p2p/messaging"}},p={},l=[],u={toc:l},s="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/9c94cf05.776e4dce.js b/assets/js/9c94cf05.23524fab.js similarity index 56% rename from assets/js/9c94cf05.776e4dce.js rename to assets/js/9c94cf05.23524fab.js index fe7ae5799..4f94bf517 100644 --- a/assets/js/9c94cf05.776e4dce.js +++ b/assets/js/9c94cf05.23524fab.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9559],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=s(r),f=a,m=d["".concat(c,".").concat(f)]||d[f]||u[f]||i;return r?n.createElement(m,o(o({ref:t},p),{},{components:r})):n.createElement(m,o({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>l,default:()=>b,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var n=r(87462),a=r(67294),i=r(3905);r(8209);const o={id:"skip",title:"skip",hide_table_of_contents:!1},l=void 0,c={unversionedId:"build/api/schema/directives/skip",id:"build/api/schema/directives/skip",title:"skip",description:"Directs the executor to skip this field or fragment when the if argument is true.",source:"@site/docs/build/api/schema/directives/skip.mdx",sourceDirName:"build/api/schema/directives",slug:"/build/api/schema/directives/skip",permalink:"/build/api/schema/directives/skip",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"skip",title:"skip",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"include",permalink:"/build/api/schema/directives/include"},next:{title:"ErrorContext",permalink:"/build/api/schema/enums/error-context"}},s={},p=[{value:"Arguments",id:"arguments",level:3},{value:'skip.ifBoolean! ',id:"code-style-fontweight-normal-skipbifbcodeboolean--",level:4}],d=()=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,i.kt)(a.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},k="wrapper";function b(e){let{components:t,...r}=e;return(0,i.kt)(k,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Directs the executor to skip this field or fragment when the ",(0,i.kt)("inlineCode",{parentName:"p"},"if")," argument is true."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"directive @skip(\n if: Boolean!\n)\n")),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("h4",{id:"code-style-fontweight-normal-skipbifbcodeboolean--"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"skip.",(0,i.kt)("b",null,"if"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,i.kt)("inlineCode",{parentName:"a"},"Boolean!"))," ",(0,i.kt)(f,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,i.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Skipped when true.")))}b.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9559],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=s(r),f=a,m=d["".concat(c,".").concat(f)]||d[f]||u[f]||i;return r?n.createElement(m,o(o({ref:t},p),{},{components:r})):n.createElement(m,o({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>l,default:()=>k,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var n=r(87462),a=r(67294),i=r(3905);r(8209);const o={id:"skip",title:"skip",hide_table_of_contents:!1},l=void 0,c={unversionedId:"build/api/schema/directives/skip",id:"build/api/schema/directives/skip",title:"skip",description:"Directs the executor to skip this field or fragment when the if argument is true.",source:"@site/docs/build/api/schema/directives/skip.mdx",sourceDirName:"build/api/schema/directives",slug:"/build/api/schema/directives/skip",permalink:"/build/api/schema/directives/skip",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"skip",title:"skip",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"include",permalink:"/build/api/schema/directives/include"},next:{title:"ErrorContext",permalink:"/build/api/schema/enums/error-context"}},s={},p=[{value:"Arguments",id:"arguments",level:3},{value:'skip.ifBoolean! ',id:"code-style-fontweight-normal-skipbifbcodeboolean--",level:4}],d=()=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,i.kt)(a.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},b="wrapper";function k(e){let{components:t,...r}=e;return(0,i.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Directs the executor to skip this field or fragment when the ",(0,i.kt)("inlineCode",{parentName:"p"},"if")," argument is true."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"directive @skip(\n if: Boolean!\n)\n")),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("h4",{id:"code-style-fontweight-normal-skipbifbcodeboolean--"},(0,i.kt)("a",{parentName:"h4",href:"#"},(0,i.kt)("code",{style:{fontWeight:"normal"}},"skip.",(0,i.kt)("b",null,"if"))),(0,i.kt)(d,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,i.kt)("inlineCode",{parentName:"a"},"Boolean!"))," ",(0,i.kt)(f,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,i.kt)(f,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Skipped when true.")))}k.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/9c964f59.10da8495.js b/assets/js/9c964f59.10da8495.js new file mode 100644 index 000000000..c92a1c695 --- /dev/null +++ b/assets/js/9c964f59.10da8495.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8715],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),s=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},p=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=s(a),u=r,b=d["".concat(i,".").concat(u)]||d[u]||m[u]||o;return a?n.createElement(b,c(c({ref:t},p),{},{components:a})):n.createElement(b,c({ref:t},p))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,c=new Array(o);c[0]=u;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[d]="string"==typeof e?e:r,c[1]=l;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>d,SpecifiedBy:()=>m,assets:()=>s,contentTitle:()=>l,default:()=>y,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var n=a(87462),r=a(67294),o=a(3905);a(8209);const c={id:"int",title:"Int",hide_table_of_contents:!1},l=void 0,i={unversionedId:"build/api/schema/scalars/int",id:"build/api/schema/scalars/int",title:"Int",description:"The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",source:"@site/docs/build/api/schema/scalars/int.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/int",permalink:"/build/api/schema/scalars/int",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"int",title:"Int",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Hex",permalink:"/build/api/schema/scalars/hex"},next:{title:"NonNegInteger",permalink:"/build/api/schema/scalars/non-neg-integer"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:p,Bullet:d,SpecifiedBy:m,Badge:u},k="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"Int")," scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Int\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/balance"},(0,o.kt)("inlineCode",{parentName:"a"},"Balance"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/beacon-chain-summary"},(0,o.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/endpoint"},(0,o.kt)("inlineCode",{parentName:"a"},"Endpoint"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger-operations"},(0,o.kt)("inlineCode",{parentName:"a"},"LedgerOperations"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,o.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,o.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-balance"},(0,o.kt)("inlineCode",{parentName:"a"},"TokenBalance"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-transfer"},(0,o.kt)("inlineCode",{parentName:"a"},"TokenTransfer"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-attestation"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionAttestation"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-movement"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionMovement"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/uco-transfer"},(0,o.kt)("inlineCode",{parentName:"a"},"UcoTransfer"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/unspent-output"},(0,o.kt)("inlineCode",{parentName:"a"},"UnspentOutput"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/9c964f59.79a2f491.js b/assets/js/9c964f59.79a2f491.js deleted file mode 100644 index 3176a9432..000000000 --- a/assets/js/9c964f59.79a2f491.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8715],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),s=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},p=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=s(a),u=r,b=d["".concat(i,".").concat(u)]||d[u]||m[u]||o;return a?n.createElement(b,c(c({ref:t},p),{},{components:a})):n.createElement(b,c({ref:t},p))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,c=new Array(o);c[0]=u;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[d]="string"==typeof e?e:r,c[1]=l;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>d,SpecifiedBy:()=>m,assets:()=>s,contentTitle:()=>l,default:()=>y,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var n=a(87462),r=a(67294),o=a(3905);a(8209);const c={id:"int",title:"Int",hide_table_of_contents:!1},l=void 0,i={unversionedId:"build/api/schema/scalars/int",id:"build/api/schema/scalars/int",title:"Int",description:"The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",source:"@site/docs/build/api/schema/scalars/int.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/int",permalink:"/build/api/schema/scalars/int",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"int",title:"Int",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Hex",permalink:"/build/api/schema/scalars/hex"},next:{title:"NonNegInteger",permalink:"/build/api/schema/scalars/non-neg-integer"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:p,Bullet:d,SpecifiedBy:m,Badge:u},k="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(k,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"Int")," scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Int\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/balance"},(0,o.kt)("inlineCode",{parentName:"a"},"Balance"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/beacon-chain-summary"},(0,o.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/endpoint"},(0,o.kt)("inlineCode",{parentName:"a"},"Endpoint"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger-operations"},(0,o.kt)("inlineCode",{parentName:"a"},"LedgerOperations"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,o.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,o.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-balance"},(0,o.kt)("inlineCode",{parentName:"a"},"TokenBalance"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-transfer"},(0,o.kt)("inlineCode",{parentName:"a"},"TokenTransfer"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-attestation"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionAttestation"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-movement"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionMovement"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/uco-transfer"},(0,o.kt)("inlineCode",{parentName:"a"},"UcoTransfer"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/unspent-output"},(0,o.kt)("inlineCode",{parentName:"a"},"UnspentOutput"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/validation-stamp"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationStamp"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/9d5784d1.51fc0465.js b/assets/js/9d5784d1.51fc0465.js new file mode 100644 index 000000000..712a4754e --- /dev/null +++ b/assets/js/9d5784d1.51fc0465.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7028],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>b});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),s=u(r),f=o,b=s["".concat(l,".").concat(f)]||s[f]||d[f]||i;return r?n.createElement(b,a(a({ref:t},p),{},{components:r})):n.createElement(b,a({ref:t},p))}));function b(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:o,a[1]=c;for(var u=2;u{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var n=r(87462),o=(r(67294),r(3905));r(8209);const i={id:"go",title:"Go SDK"},a=void 0,c={unversionedId:"build/sdk/go",id:"build/sdk/go",title:"Go SDK",description:"Archethic Blockchain Official Go SDK is available on Github",source:"@site/docs/build/sdk/go.md",sourceDirName:"build/sdk",slug:"/build/sdk/go",permalink:"/build/sdk/go",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"go",title:"Go SDK"},sidebar:"docs",previous:{title:"Dart SDK",permalink:"/build/sdk/dart"},next:{title:"Javascript SDK",permalink:"/build/sdk/js"}},l={},u=[],p={toc:u},s="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic Blockchain Official Go SDK is available on ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/libgo"},"Github")),(0,o.kt)("hr",null),(0,o.kt)("p",null,"This SDK will help you to generate transaction on top of Archethic Blockchain."))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/9d5784d1.ff2a162c.js b/assets/js/9d5784d1.ff2a162c.js deleted file mode 100644 index 8d92c549c..000000000 --- a/assets/js/9d5784d1.ff2a162c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7028],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>b});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),s=u(r),f=o,b=s["".concat(l,".").concat(f)]||s[f]||d[f]||a;return r?n.createElement(b,i(i({ref:t},p),{},{components:r})):n.createElement(b,i({ref:t},p))}));function b(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:o,i[1]=c;for(var u=2;u{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"go",title:"Go SDK"},i=void 0,c={unversionedId:"build/sdk/go",id:"build/sdk/go",title:"Go SDK",description:"Archethic Blockchain Official Go SDK is available on Github",source:"@site/docs/build/sdk/go.md",sourceDirName:"build/sdk",slug:"/build/sdk/go",permalink:"/build/sdk/go",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"go",title:"Go SDK"},sidebar:"docs",previous:{title:"Dart SDK",permalink:"/build/sdk/dart"},next:{title:"Javascript SDK",permalink:"/build/sdk/js"}},l={},u=[],p={toc:u},s="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic Blockchain Official Go SDK is available on ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/libgo"},"Github")),(0,o.kt)("hr",null),(0,o.kt)("p",null,"This SDK will help you to generate transaction on top of Archethic Blockchain."))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/9de09737.0c7aaa64.js b/assets/js/9de09737.0c7aaa64.js deleted file mode 100644 index e4511e142..000000000 --- a/assets/js/9de09737.0c7aaa64.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6783],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),k=r,h=p["".concat(l,".").concat(k)]||p[k]||u[k]||o;return n?a.createElement(h,i(i({ref:t},d),{},{components:n})):a.createElement(h,i({ref:t},d))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=k;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"transaction-types",title:"Transaction types",sidebar_position:4},i=void 0,s={unversionedId:"learn/transaction-types",id:"learn/transaction-types",title:"Transaction types",description:"The transaction's type is used to give a hint on what the transaction contains. Some types must respect some conditions.",source:"@site/docs/learn/transaction-types.md",sourceDirName:"learn",slug:"/learn/transaction-types",permalink:"/learn/transaction-types",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:4,frontMatter:{id:"transaction-types",title:"Transaction types",sidebar_position:4},sidebar:"docs",previous:{title:"Transaction fees",permalink:"/learn/fee"},next:{title:"ARCH consensus",permalink:"/learn/arch-consensus/"}},l={},c=[{value:"node (network)",id:"node-network",level:2},{value:"node_shared_secrets (network)",id:"node_shared_secrets-network",level:2},{value:"node_rewards (network)",id:"node_rewards-network",level:2},{value:"mint_rewards (network)",id:"mint_rewards-network",level:2},{value:"oracle (network)",id:"oracle-network",level:2},{value:"oracle_summary (network)",id:"oracle_summary-network",level:2},{value:"code_proposal (network)",id:"code_proposal-network",level:2},{value:"code_approval (network)",id:"code_approval-network",level:2},{value:"origin (network)",id:"origin-network",level:2},{value:"keychain",id:"keychain",level:2},{value:"keychain_access",id:"keychain_access",level:2},{value:"transfer",id:"transfer",level:2},{value:"token",id:"token",level:2},{value:"hosting",id:"hosting",level:2},{value:"data",id:"data",level:2},{value:"contract",id:"contract",level:2}],d={toc:c},p="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The transaction's type is used to give a hint on what the transaction contains. Some types must respect some conditions. "),(0,r.kt)("p",null,"There are 2 categories of transaction types, the network transactions and the others:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"network transactions: every nodes in the network must replicate them"),(0,r.kt)("li",{parentName:"ul"},"others: only elected nodes must replicate them")),(0,r.kt)("h2",{id:"node-network"},"node (network)"),(0,r.kt)("p",null,"Only nodes are allowed to create a node transaction. It contains the information about a running node. It is sent when a node joins or when it changes its network configuration."),(0,r.kt)("h2",{id:"node_shared_secrets-network"},"node_shared_secrets (network)"),(0,r.kt)("p",null,"This daily (11:30pm) transaction provides a shared secret to all the running nodes."),(0,r.kt)("h2",{id:"node_rewards-network"},"node_rewards (network)"),(0,r.kt)("p",null,"This daily (02:00am) transaction rewards the nodes by sending them some MUCOs based on their uptime."),(0,r.kt)("h2",{id:"mint_rewards-network"},"mint_rewards (network)"),(0,r.kt)("p",null,"This daily (02:00am) transaction mints some MUCOs. The amount minted is the same as the amount of UCO burned previous day."),(0,r.kt)("h2",{id:"oracle-network"},"oracle (network)"),(0,r.kt)("p",null,"This transaction fetch some off-chain data and provides it in the content. It is sent every minutes. Please note that the oracle content may not always contain the same information. For example the UCO price is only sent if it changes."),(0,r.kt)("h2",{id:"oracle_summary-network"},"oracle_summary (network)"),(0,r.kt)("p",null,"This daily (00:00am) transaction aggregates all oracles transaction of the previous day."),(0,r.kt)("h2",{id:"code_proposal-network"},"code_proposal (network)"),(0,r.kt)("p",null,"This transaction contains a diff (code change) to be applied on the nodes. It then need to be approved before it is applied."),(0,r.kt)("h2",{id:"code_approval-network"},"code_approval (network)"),(0,r.kt)("p",null,"This transaction is used to approve a ",(0,r.kt)("inlineCode",{parentName:"p"},"code_proposal"),". Once a threshold is passed, the diff is applied to all nodes."),(0,r.kt)("h2",{id:"origin-network"},"origin (network)"),(0,r.kt)("p",null,"TODO"),(0,r.kt)("h2",{id:"keychain"},"keychain"),(0,r.kt)("p",null,"This transaction is created when creating a wallet. It is used to be able to receive/send UCOs and Tokens."),(0,r.kt)("h2",{id:"keychain_access"},"keychain_access"),(0,r.kt)("p",null,"This transaction defines the authorization of a ",(0,r.kt)("inlineCode",{parentName:"p"},"keychain"),"."),(0,r.kt)("h2",{id:"transfer"},"transfer"),(0,r.kt)("p",null,"This transaction contains either at least, one ",(0,r.kt)("inlineCode",{parentName:"p"},"uco_transfer"),", one ",(0,r.kt)("inlineCode",{parentName:"p"},"token_transfer")," or one ",(0,r.kt)("inlineCode",{parentName:"p"},"recipient"),"."),(0,r.kt)("h2",{id:"token"},"token"),(0,r.kt)("p",null,"This transaction defines a ",(0,r.kt)("a",{parentName:"p",href:"/learn/token"},"Token"),"."),(0,r.kt)("h2",{id:"hosting"},"hosting"),(0,r.kt)("p",null,"This transaction is a ",(0,r.kt)("a",{parentName:"p",href:"/participate/aeweb"},"AEWeb")," transaction. Read ",(0,r.kt)("a",{parentName:"p",href:"/participate/aeweb/how-it-works"},"How it works")," for the details."),(0,r.kt)("h2",{id:"data"},"data"),(0,r.kt)("p",null,"This transaction contains either a ",(0,r.kt)("inlineCode",{parentName:"p"},"content")," or at least one ",(0,r.kt)("inlineCode",{parentName:"p"},"ownership"),"."),(0,r.kt)("h2",{id:"contract"},"contract"),(0,r.kt)("p",null,"This transaction contains a contract in the ",(0,r.kt)("inlineCode",{parentName:"p"},"code")," field."))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/9de09737.d30fbc4a.js b/assets/js/9de09737.d30fbc4a.js new file mode 100644 index 000000000..40c81e5ab --- /dev/null +++ b/assets/js/9de09737.d30fbc4a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6783],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),k=r,h=p["".concat(l,".").concat(k)]||p[k]||u[k]||o;return n?a.createElement(h,i(i({ref:t},d),{},{components:n})):a.createElement(h,i({ref:t},d))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=k;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"transaction-types",title:"Transaction types",sidebar_position:4},i=void 0,s={unversionedId:"learn/transaction-types",id:"learn/transaction-types",title:"Transaction types",description:"The transaction's type is used to give a hint on what the transaction contains. Some types must respect some conditions.",source:"@site/docs/learn/transaction-types.md",sourceDirName:"learn",slug:"/learn/transaction-types",permalink:"/learn/transaction-types",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:4,frontMatter:{id:"transaction-types",title:"Transaction types",sidebar_position:4},sidebar:"docs",previous:{title:"Transaction fees",permalink:"/learn/fee"},next:{title:"ARCH consensus",permalink:"/learn/arch-consensus/"}},l={},c=[{value:"node (network)",id:"node-network",level:2},{value:"node_shared_secrets (network)",id:"node_shared_secrets-network",level:2},{value:"node_rewards (network)",id:"node_rewards-network",level:2},{value:"mint_rewards (network)",id:"mint_rewards-network",level:2},{value:"oracle (network)",id:"oracle-network",level:2},{value:"oracle_summary (network)",id:"oracle_summary-network",level:2},{value:"code_proposal (network)",id:"code_proposal-network",level:2},{value:"code_approval (network)",id:"code_approval-network",level:2},{value:"origin (network)",id:"origin-network",level:2},{value:"keychain",id:"keychain",level:2},{value:"keychain_access",id:"keychain_access",level:2},{value:"transfer",id:"transfer",level:2},{value:"token",id:"token",level:2},{value:"hosting",id:"hosting",level:2},{value:"data",id:"data",level:2},{value:"contract",id:"contract",level:2}],d={toc:c},p="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The transaction's type is used to give a hint on what the transaction contains. Some types must respect some conditions. "),(0,r.kt)("p",null,"There are 2 categories of transaction types, the network transactions and the others:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"network transactions: every nodes in the network must replicate them"),(0,r.kt)("li",{parentName:"ul"},"others: only elected nodes must replicate them")),(0,r.kt)("h2",{id:"node-network"},"node (network)"),(0,r.kt)("p",null,"Only nodes are allowed to create a node transaction. It contains the information about a running node. It is sent when a node joins or when it changes its network configuration."),(0,r.kt)("h2",{id:"node_shared_secrets-network"},"node_shared_secrets (network)"),(0,r.kt)("p",null,"This daily (11:30pm) transaction provides a shared secret to all the running nodes."),(0,r.kt)("h2",{id:"node_rewards-network"},"node_rewards (network)"),(0,r.kt)("p",null,"This daily (02:00am) transaction rewards the nodes by sending them some MUCOs based on their uptime."),(0,r.kt)("h2",{id:"mint_rewards-network"},"mint_rewards (network)"),(0,r.kt)("p",null,"This daily (02:00am) transaction mints some MUCOs. The amount minted is the same as the amount of UCO burned previous day."),(0,r.kt)("h2",{id:"oracle-network"},"oracle (network)"),(0,r.kt)("p",null,"This transaction fetch some off-chain data and provides it in the content. It is sent every minutes. Please note that the oracle content may not always contain the same information. For example the UCO price is only sent if it changes."),(0,r.kt)("h2",{id:"oracle_summary-network"},"oracle_summary (network)"),(0,r.kt)("p",null,"This daily (00:00am) transaction aggregates all oracles transaction of the previous day."),(0,r.kt)("h2",{id:"code_proposal-network"},"code_proposal (network)"),(0,r.kt)("p",null,"This transaction contains a diff (code change) to be applied on the nodes. It then need to be approved before it is applied."),(0,r.kt)("h2",{id:"code_approval-network"},"code_approval (network)"),(0,r.kt)("p",null,"This transaction is used to approve a ",(0,r.kt)("inlineCode",{parentName:"p"},"code_proposal"),". Once a threshold is passed, the diff is applied to all nodes."),(0,r.kt)("h2",{id:"origin-network"},"origin (network)"),(0,r.kt)("p",null,"TODO"),(0,r.kt)("h2",{id:"keychain"},"keychain"),(0,r.kt)("p",null,"This transaction is created when creating a wallet. It is used to be able to receive/send UCOs and Tokens."),(0,r.kt)("h2",{id:"keychain_access"},"keychain_access"),(0,r.kt)("p",null,"This transaction defines the authorization of a ",(0,r.kt)("inlineCode",{parentName:"p"},"keychain"),"."),(0,r.kt)("h2",{id:"transfer"},"transfer"),(0,r.kt)("p",null,"This transaction contains either at least, one ",(0,r.kt)("inlineCode",{parentName:"p"},"uco_transfer"),", one ",(0,r.kt)("inlineCode",{parentName:"p"},"token_transfer")," or one ",(0,r.kt)("inlineCode",{parentName:"p"},"recipient"),"."),(0,r.kt)("h2",{id:"token"},"token"),(0,r.kt)("p",null,"This transaction defines a ",(0,r.kt)("a",{parentName:"p",href:"/learn/token"},"Token"),"."),(0,r.kt)("h2",{id:"hosting"},"hosting"),(0,r.kt)("p",null,"This transaction is a ",(0,r.kt)("a",{parentName:"p",href:"/participate/aeweb"},"AEWeb")," transaction. Read ",(0,r.kt)("a",{parentName:"p",href:"/participate/aeweb/how-it-works"},"How it works")," for the details."),(0,r.kt)("h2",{id:"data"},"data"),(0,r.kt)("p",null,"This transaction contains either a ",(0,r.kt)("inlineCode",{parentName:"p"},"content")," or at least one ",(0,r.kt)("inlineCode",{parentName:"p"},"ownership"),"."),(0,r.kt)("h2",{id:"contract"},"contract"),(0,r.kt)("p",null,"This transaction contains a contract in the ",(0,r.kt)("inlineCode",{parentName:"p"},"code")," field."))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/9e3de0ed.33e5b395.js b/assets/js/9e3de0ed.e1e230dd.js similarity index 77% rename from assets/js/9e3de0ed.33e5b395.js rename to assets/js/9e3de0ed.e1e230dd.js index 8eb961eb1..79b2182be 100644 --- a/assets/js/9e3de0ed.33e5b395.js +++ b/assets/js/9e3de0ed.e1e230dd.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4435],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>y});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),u=s(r),f=a,y=u["".concat(p,".").concat(f)]||u[f]||d[f]||i;return r?n.createElement(y,o(o({ref:t},l),{},{components:r})):n.createElement(y,o({ref:t},l))}));function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[u]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));r(8209);const i={id:"dex",title:"Archethic's DEX"},o=void 0,c={unversionedId:"participate/dex/dex",id:"participate/dex/dex",title:"Archethic's DEX",description:"The current version of Archethic's DEX is only available on the testnet.",source:"@site/docs/participate/dex/README.md",sourceDirName:"participate/dex",slug:"/participate/dex/",permalink:"/participate/dex/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"dex",title:"Archethic's DEX"},sidebar:"docs",previous:{title:"Archethic's CLI",permalink:"/participate/cli/"},next:{title:"Usage",permalink:"/category/usage-2"}},p={},s=[],l={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("admonition",{title:"Testnet's only",type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"The current version of Archethic's DEX is only available on the testnet.\nYou can experiment and start swapping your assets on-chain by visiting ",(0,a.kt)("a",{parentName:"p",href:"https://dex.testnet.archethic.net/"},"dex.testnet.archethic.net/"))))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4435],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>y});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),u=s(r),f=a,y=u["".concat(p,".").concat(f)]||u[f]||d[f]||i;return r?n.createElement(y,o(o({ref:t},l),{},{components:r})):n.createElement(y,o({ref:t},l))}));function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[u]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));r(8209);const i={id:"dex",title:"Archethic's DEX"},o=void 0,c={unversionedId:"participate/dex/dex",id:"participate/dex/dex",title:"Archethic's DEX",description:"The current version of Archethic's DEX is only available on the testnet.",source:"@site/docs/participate/dex/README.md",sourceDirName:"participate/dex",slug:"/participate/dex/",permalink:"/participate/dex/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"dex",title:"Archethic's DEX"},sidebar:"docs",previous:{title:"Archethic's CLI",permalink:"/participate/cli/"},next:{title:"Usage",permalink:"/category/usage-2"}},p={},s=[],l={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("admonition",{title:"Testnet's only",type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"The current version of Archethic's DEX is only available on the testnet.\nYou can experiment and start swapping your assets on-chain by visiting ",(0,a.kt)("a",{parentName:"p",href:"https://dex.testnet.archethic.net/"},"dex.testnet.archethic.net/"))))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/a0393694.15332ea5.js b/assets/js/a0393694.15332ea5.js deleted file mode 100644 index 9ec21c1a2..000000000 --- a/assets/js/a0393694.15332ea5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1248],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var n=a(67294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var c=n.createContext({}),l=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},h="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,r=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),h=l(a),u=i,m=h["".concat(c,".").concat(u)]||h[u]||p[u]||r;return a?n.createElement(m,o(o({ref:t},d),{},{components:a})):n.createElement(m,o({ref:t},d))}));function m(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=a.length,o=new Array(r);o[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[h]="string"==typeof e?e:i,o[1]=s;for(var l=2;l{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>s,toc:()=>l});var n=a(87462),i=(a(67294),a(3905));a(8209);const r={id:"archethic-cli",title:"Archethic's CLI"},o=void 0,s={unversionedId:"participate/cli/archethic-cli",id:"participate/cli/archethic-cli",title:"Archethic's CLI",description:"Developers like to use terminal applications to speed up their productivity, therefore Archethic have also",source:"@site/docs/participate/cli/README.md",sourceDirName:"participate/cli",slug:"/participate/cli/",permalink:"/participate/cli/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"archethic-cli",title:"Archethic's CLI"},sidebar:"docs",previous:{title:"Bridge Front End",permalink:"/participate/bridge/usage/bridge-front"},next:{title:"Archethic's DEX",permalink:"/participate/dex/"}},c={},l=[{value:"Installation",id:"installation",level:2},{value:"Generate address",id:"generate-address",level:2},{value:"Build and send transaction",id:"build-and-send-transaction",level:2},{value:"UCO transfers",id:"uco-transfers",level:3},{value:"Token transfers",id:"token-transfers",level:3},{value:"Recipients",id:"recipients",level:3},{value:"Ownerships",id:"ownerships",level:4},{value:"Content",id:"content",level:3},{value:"Smart contract",id:"smart-contract",level:3},{value:"Sending the transaction",id:"sending-the-transaction",level:3},{value:"Keychain management",id:"keychain-management",level:2},{value:"Creating a keychain",id:"creating-a-keychain",level:3},{value:"Accessing a keychain",id:"accessing-a-keychain",level:3},{value:"Adding / removing a service",id:"adding--removing-a-service",level:3},{value:"Create a transaction for a service",id:"create-a-transaction-for-a-service",level:3},{value:"CLI - Archethic Command Line Interpreter",id:"cli---archethic-command-line-interpreter",level:2},{value:"Contribution",id:"contribution",level:2}],d={toc:l},h="wrapper";function p(e){let{components:t,...r}=e;return(0,i.kt)(h,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Developers like to use terminal applications to speed up their productivity, therefore Archethic have also\nits own command line interpreter is available to make interaction with the Blockchain easier for power users."),(0,i.kt)("p",null,"This tool helps you to connect to your decentralized wallet (keychain), manage it, send transactions, etc."),(0,i.kt)("h2",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Download a pre-compiled binary or package from the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-cli/releases"},"releases")," page."),(0,i.kt)("p",null,"Or install it with go:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go install github.com/archethic-foundation/archethic-cli@latest\n")),(0,i.kt)("p",null,"Or just build it yourself (requires Go 1.18+):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"git clone https://github.com/archethic-foundation/archethic-cli.git\ncd archethic-cli\ngo build .\n")),(0,i.kt)("hr",null),(0,i.kt)("p",null,"By default the CLI works as TUI (terminal user interface) application allowing the application to be interactive. "),(0,i.kt)("p",null,"When launching the Archethic CLI you will access to the main menu that allows you to select an action. "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Generate an address"),(0,i.kt)("li",{parentName:"ul"},"Build and send a transaction"),(0,i.kt)("li",{parentName:"ul"},"Manage keychains (and send transaction keychains)")),(0,i.kt)("h2",{id:"generate-address"},"Generate address"),(0,i.kt)("p",null,"This generate address page allows you to get the address for a given seed, a specific index and with a given elliptic curve and hash algorithm. The default values are probably fine for elliptic curve and hash algorithm."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Generate address",src:a(57848).Z,width:"1334",height:"698"})),(0,i.kt)("h2",{id:"build-and-send-transaction"},"Build and send transaction"),(0,i.kt)("p",null,"This menu allows you to create a transaction. There are 7 tabs you can navigate to, by using the left and right arrows of your keyboard in order to configure your transaction."),(0,i.kt)("p",null,"This is where you set the main info (like the endpoint, the seed, the transaction type\u2026) and send the transaction. By selecting one of the default node endpoint you will have the URL to send your transaction automatically set. You will need to enter your seed. "),(0,i.kt)("p",null,"The index of the transaction will be set automatically (based on the index of the last transaction). Select one of the transaction type, regarding the type you select, you might have specific information to provide to your transaction (for example a transaction of type ",(0,i.kt)("inlineCode",{parentName:"p"},"Transfer")," needs a UCO transfer or a token transfer. "),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"Add")," buttons sends the transaction and the ",(0,i.kt)("inlineCode",{parentName:"p"},"Reset")," button clears the form."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Main tab",src:a(83288).Z,width:"2224",height:"1418"})),(0,i.kt)("h3",{id:"uco-transfers"},"UCO transfers"),(0,i.kt)("p",null,"This tab allows you to create UCO transfers in your transaction. Type a valid address and an amount and press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Add")," button.\n",(0,i.kt)("img",{alt:"UCO transfer tab",src:a(63040).Z,width:"2224",height:"544"})),(0,i.kt)("p",null,"You will then have a list of configured UCO transfers. Using the up and down keys, you can highlight a configured transfer and delete it by typing ",(0,i.kt)("inlineCode",{parentName:"p"},"d"),"."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"UCO transfer tab 2",src:a(75436).Z,width:"2226",height:"620"})),(0,i.kt)("h3",{id:"token-transfers"},"Token transfers"),(0,i.kt)("p",null,"The same logic applies to the token transfers tab. But you need to specify a token address and an token id."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Token transfers tab",src:a(86753).Z,width:"2212",height:"654"})),(0,i.kt)("h3",{id:"recipients"},"Recipients"),(0,i.kt)("p",null,"The same logic also applies to the recipients tab which targets smart contract executions."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Recipients tab",src:a(91699).Z,width:"2214",height:"518"})),(0,i.kt)("h4",{id:"ownerships"},"Ownerships"),(0,i.kt)("p",null,"The ownership tab contains the information about the access you give to execute your transaction. "),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"This will be needed if you want to create a smart contract.")),(0,i.kt)("p",null,"You can define several ownerships.\nEach ownership has"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"a secret"),(0,i.kt)("li",{parentName:"ul"},"a list of authorization keys that get access to the secret. ")),(0,i.kt)("p",null,"At least one of the ownership must have the seed as a secret and the storage nouce public key as an authorization key. "),(0,i.kt)("p",null,"You can press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Load Storage Nounce Public Key")," to automatically set the authorization key with the value of the storage nonce public key. (ie. for smart contract's creation key delegation) "),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"You must have selected an endpoint in the main tab in order to load the storage nounce public key of the network you target.")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Ownerships tab",src:a(771).Z,width:"2216",height:"644"})),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Ownerhips tab 2",src:a(44786).Z,width:"2222",height:"764"})),(0,i.kt)("p",null,"Pressing the ",(0,i.kt)("inlineCode",{parentName:"p"},"Add authorization key")," allows you to add a new authorization key that will get access to the secret. Once added to the list of autorized keys, you can highlight a key and press ",(0,i.kt)("inlineCode",{parentName:"p"},"d")," to delete it. "),(0,i.kt)("p",null,"Once you\u2019re done with the configuration, you can press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Add")," button to add the ownership configuration to the transaction."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Ownerships tab 3",src:a(11100).Z,width:"2216",height:"708"})),(0,i.kt)("p",null,"And here also, if you want to delete a configured ownership, you can highlight it and press ",(0,i.kt)("inlineCode",{parentName:"p"},"d"),"."),(0,i.kt)("h3",{id:"content"},"Content"),(0,i.kt)("p",null,"The content tab allows you to set the content of the transaction. Start typing to enter the edit mode of this tab and press ",(0,i.kt)("inlineCode",{parentName:"p"},"esc")," if you want to exit the edit mode and navigate to another tab."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Content tab",src:a(8914).Z,width:"2214",height:"450"})),(0,i.kt)("h3",{id:"smart-contract"},"Smart contract"),(0,i.kt)("p",null,"The smart contract tab allows you to set the smart contract of the transaction. Start typing to enter the edit mode of this tab and press ",(0,i.kt)("inlineCode",{parentName:"p"},"esc")," if you want to exit the edit mode and navigate to another tab."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Smart contract tab",src:a(14241).Z,width:"2226",height:"446"})),(0,i.kt)("h3",{id:"sending-the-transaction"},"Sending the transaction"),(0,i.kt)("p",null,"When you\u2019re done configuring the transaction, go back to the main tab and press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Add")," button."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Sending transaction",src:a(90941).Z,width:"2216",height:"1340"})),(0,i.kt)("h2",{id:"keychain-management"},"Keychain management"),(0,i.kt)("p",null,"The keychain management menu allows you to "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"create a keychain with a given seed"),(0,i.kt)("li",{parentName:"ul"},"access a keychain"),(0,i.kt)("li",{parentName:"ul"},"add and remove services from a keychain"),(0,i.kt)("li",{parentName:"ul"},"send a keychain transaction for a specific service")),(0,i.kt)("p",null,"In any cases you will need to start by selecting the endpoint you want, that will automatically feed the URL of the endpoint.\nThen specify your access seed."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Keychain management",src:a(92603).Z,width:"356",height:"538"})),(0,i.kt)("h3",{id:"creating-a-keychain"},"Creating a keychain"),(0,i.kt)("p",null,"If you press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Create keychain")," button, a new keychain will be created. And the seed you provided will be used to access it. "),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Create a keychain",src:a(17995).Z,width:"1982",height:"814"})),(0,i.kt)("h3",{id:"accessing-a-keychain"},"Accessing a keychain"),(0,i.kt)("p",null,"Pressing the ",(0,i.kt)("inlineCode",{parentName:"p"},"Access keychain")," button will give you access to the list of services associated with your keychain (one default ",(0,i.kt)("inlineCode",{parentName:"p"},"uco")," service has been created).\n",(0,i.kt)("img",{alt:"Access a keychain",src:a(78634).Z,width:"912",height:"1162"})),(0,i.kt)("h3",{id:"adding--removing-a-service"},"Adding / removing a service"),(0,i.kt)("p",null,"If you go down to the ",(0,i.kt)("inlineCode",{parentName:"p"},"service name")," field you can type a new service name and a default derivation path will be created. If you then press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Create Service"),", your new service will be displayed in the list of services."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Add a service",src:a(53061).Z,width:"898",height:"1212"})),(0,i.kt)("p",null,"If you highlight a service and press ",(0,i.kt)("inlineCode",{parentName:"p"},"d")," the service will be deleted."),(0,i.kt)("h3",{id:"create-a-transaction-for-a-service"},"Create a transaction for a service"),(0,i.kt)("p",null,"If you highlight a specific service and press ",(0,i.kt)("inlineCode",{parentName:"p"},"enter")," the highlighted will be selected."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Create a transaction for a service",src:a(92029).Z,width:"898",height:"1208"})),(0,i.kt)("p",null,"If you then press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Create Transaction for Service")," button, you will get a new menu to create a transaction for the selected service."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Main tab of create keychain transaction",src:a(89294).Z,width:"2212",height:"870"})),(0,i.kt)("p",null,"The mechanism to configure a keychain transaction for a service is the same as the one for a transaction (described above). Only a few configuration are not possible (like the endpoint, the seed, the index and the elliptic curve)."),(0,i.kt)("h2",{id:"cli---archethic-command-line-interpreter"},"CLI - Archethic Command Line Interpreter"),(0,i.kt)("p",null,"It is also possible to call the archethic cli tool using the command line."),(0,i.kt)("p",null,"For details of available commands, you can"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"consult the ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/archethic-cli#cli"},"readme")," of the corresponding github project."),(0,i.kt)("li",{parentName:"ul"},"display help with the command ",(0,i.kt)("inlineCode",{parentName:"li"},"--help"),".")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Help command",src:a(32941).Z,width:"1526",height:"810"})),(0,i.kt)("h2",{id:"contribution"},"Contribution"),(0,i.kt)("p",null,"If you like this product and wish to contribute to its development, please visit our ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-cli"},"Github Page")),(0,i.kt)("p",null,"We are welcoming contributions in any forms (code, issues, documentation, ideas, question, etc.)"))}p.isMDXComponent=!0},78634:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/access_keychain-9f933a8d669d6ed955e30dd1aa169bbb.png"},53061:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/add_service-0678042a796e4c8290090dc5ecfae0d2.png"},8914:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/content-ab19f634acaad0b5246fe5983d98f129.png"},17995:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/create_keychain-8addb948180651745f730122e7bce878.png"},92029:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/create_keychain_transaction-cedc8bbccf4171fbb0dd5eda74b3736e.png"},57848:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/generate_address-ba70791dfe6de72c28139e89d1584039.png"},32941:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/help-command-a79b629216cd48d2acca13cf35714ee5.png"},92603:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/keychain_management-c8b7e23b91a14f3f555ae8a054eb7bae.png"},89294:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/main_keychain_transaction-03d95c68a9a99ad66b7321d291387d22.png"},83288:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/main_tab-5783418ecc8dd832b65d81a6579b7d19.png"},771:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/ownerships-559b27b31d1a636f3fcb406889868258.png"},44786:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/ownerships_2-3ef9c28939b2def4fb31695668e0fa15.png"},11100:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/ownerships_3-b1e74fd7bb29438106163db16673b731.png"},91699:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/recipients-b1436cd932b7a6402cd47a8f1a1860ca.png"},90941:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/sending_transaction-970c825476f166398dededfcc355d705.png"},14241:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/smart_contract-2d09068ad09c2a03858e8463b4176964.png"},86753:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/token_transfers-7387b1e8c1f1049818261970230af678.png"},63040:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/uco_transfers-c67df50fb05e1d0062ad690ce2609f34.png"},75436:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/uco_transfers_2-2f1a38a418f288087aae516f1b9e11c4.png"},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/a0393694.2bdb54ff.js b/assets/js/a0393694.2bdb54ff.js new file mode 100644 index 000000000..fc2ffd4ff --- /dev/null +++ b/assets/js/a0393694.2bdb54ff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1248],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var n=a(67294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var c=n.createContext({}),l=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},h="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,r=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),h=l(a),u=i,m=h["".concat(c,".").concat(u)]||h[u]||p[u]||r;return a?n.createElement(m,o(o({ref:t},d),{},{components:a})):n.createElement(m,o({ref:t},d))}));function m(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=a.length,o=new Array(r);o[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[h]="string"==typeof e?e:i,o[1]=s;for(var l=2;l{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>s,toc:()=>l});var n=a(87462),i=(a(67294),a(3905));a(8209);const r={id:"archethic-cli",title:"Archethic's CLI"},o=void 0,s={unversionedId:"participate/cli/archethic-cli",id:"participate/cli/archethic-cli",title:"Archethic's CLI",description:"Developers like to use terminal applications to speed up their productivity, therefore Archethic have also",source:"@site/docs/participate/cli/README.md",sourceDirName:"participate/cli",slug:"/participate/cli/",permalink:"/participate/cli/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"archethic-cli",title:"Archethic's CLI"},sidebar:"docs",previous:{title:"Bridge Front End",permalink:"/participate/bridge/usage/bridge-front"},next:{title:"Archethic's DEX",permalink:"/participate/dex/"}},c={},l=[{value:"Installation",id:"installation",level:2},{value:"Generate address",id:"generate-address",level:2},{value:"Build and send transaction",id:"build-and-send-transaction",level:2},{value:"UCO transfers",id:"uco-transfers",level:3},{value:"Token transfers",id:"token-transfers",level:3},{value:"Recipients",id:"recipients",level:3},{value:"Ownerships",id:"ownerships",level:4},{value:"Content",id:"content",level:3},{value:"Smart contract",id:"smart-contract",level:3},{value:"Sending the transaction",id:"sending-the-transaction",level:3},{value:"Keychain management",id:"keychain-management",level:2},{value:"Creating a keychain",id:"creating-a-keychain",level:3},{value:"Accessing a keychain",id:"accessing-a-keychain",level:3},{value:"Adding / removing a service",id:"adding--removing-a-service",level:3},{value:"Create a transaction for a service",id:"create-a-transaction-for-a-service",level:3},{value:"CLI - Archethic Command Line Interpreter",id:"cli---archethic-command-line-interpreter",level:2},{value:"Contribution",id:"contribution",level:2}],d={toc:l},h="wrapper";function p(e){let{components:t,...r}=e;return(0,i.kt)(h,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Developers like to use terminal applications to speed up their productivity, therefore Archethic have also\nits own command line interpreter is available to make interaction with the Blockchain easier for power users."),(0,i.kt)("p",null,"This tool helps you to connect to your decentralized wallet (keychain), manage it, send transactions, etc."),(0,i.kt)("h2",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Download a pre-compiled binary or package from the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-cli/releases"},"releases")," page."),(0,i.kt)("p",null,"Or install it with go:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go install github.com/archethic-foundation/archethic-cli@latest\n")),(0,i.kt)("p",null,"Or just build it yourself (requires Go 1.18+):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"git clone https://github.com/archethic-foundation/archethic-cli.git\ncd archethic-cli\ngo build .\n")),(0,i.kt)("hr",null),(0,i.kt)("p",null,"By default the CLI works as TUI (terminal user interface) application allowing the application to be interactive. "),(0,i.kt)("p",null,"When launching the Archethic CLI you will access to the main menu that allows you to select an action. "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Generate an address"),(0,i.kt)("li",{parentName:"ul"},"Build and send a transaction"),(0,i.kt)("li",{parentName:"ul"},"Manage keychains (and send transaction keychains)")),(0,i.kt)("h2",{id:"generate-address"},"Generate address"),(0,i.kt)("p",null,"This generate address page allows you to get the address for a given seed, a specific index and with a given elliptic curve and hash algorithm. The default values are probably fine for elliptic curve and hash algorithm."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Generate address",src:a(57848).Z,width:"1334",height:"698"})),(0,i.kt)("h2",{id:"build-and-send-transaction"},"Build and send transaction"),(0,i.kt)("p",null,"This menu allows you to create a transaction. There are 7 tabs you can navigate to, by using the left and right arrows of your keyboard in order to configure your transaction."),(0,i.kt)("p",null,"This is where you set the main info (like the endpoint, the seed, the transaction type\u2026) and send the transaction. By selecting one of the default node endpoint you will have the URL to send your transaction automatically set. You will need to enter your seed. "),(0,i.kt)("p",null,"The index of the transaction will be set automatically (based on the index of the last transaction). Select one of the transaction type, regarding the type you select, you might have specific information to provide to your transaction (for example a transaction of type ",(0,i.kt)("inlineCode",{parentName:"p"},"Transfer")," needs a UCO transfer or a token transfer. "),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"Add")," buttons sends the transaction and the ",(0,i.kt)("inlineCode",{parentName:"p"},"Reset")," button clears the form."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Main tab",src:a(83288).Z,width:"2224",height:"1418"})),(0,i.kt)("h3",{id:"uco-transfers"},"UCO transfers"),(0,i.kt)("p",null,"This tab allows you to create UCO transfers in your transaction. Type a valid address and an amount and press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Add")," button.\n",(0,i.kt)("img",{alt:"UCO transfer tab",src:a(63040).Z,width:"2224",height:"544"})),(0,i.kt)("p",null,"You will then have a list of configured UCO transfers. Using the up and down keys, you can highlight a configured transfer and delete it by typing ",(0,i.kt)("inlineCode",{parentName:"p"},"d"),"."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"UCO transfer tab 2",src:a(75436).Z,width:"2226",height:"620"})),(0,i.kt)("h3",{id:"token-transfers"},"Token transfers"),(0,i.kt)("p",null,"The same logic applies to the token transfers tab. But you need to specify a token address and an token id."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Token transfers tab",src:a(86753).Z,width:"2212",height:"654"})),(0,i.kt)("h3",{id:"recipients"},"Recipients"),(0,i.kt)("p",null,"The same logic also applies to the recipients tab which targets smart contract executions."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Recipients tab",src:a(91699).Z,width:"2214",height:"518"})),(0,i.kt)("h4",{id:"ownerships"},"Ownerships"),(0,i.kt)("p",null,"The ownership tab contains the information about the access you give to execute your transaction. "),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"This will be needed if you want to create a smart contract.")),(0,i.kt)("p",null,"You can define several ownerships.\nEach ownership has"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"a secret"),(0,i.kt)("li",{parentName:"ul"},"a list of authorization keys that get access to the secret. ")),(0,i.kt)("p",null,"At least one of the ownership must have the seed as a secret and the storage nouce public key as an authorization key. "),(0,i.kt)("p",null,"You can press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Load Storage Nounce Public Key")," to automatically set the authorization key with the value of the storage nonce public key. (ie. for smart contract's creation key delegation) "),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"You must have selected an endpoint in the main tab in order to load the storage nounce public key of the network you target.")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Ownerships tab",src:a(771).Z,width:"2216",height:"644"})),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Ownerhips tab 2",src:a(44786).Z,width:"2222",height:"764"})),(0,i.kt)("p",null,"Pressing the ",(0,i.kt)("inlineCode",{parentName:"p"},"Add authorization key")," allows you to add a new authorization key that will get access to the secret. Once added to the list of autorized keys, you can highlight a key and press ",(0,i.kt)("inlineCode",{parentName:"p"},"d")," to delete it. "),(0,i.kt)("p",null,"Once you\u2019re done with the configuration, you can press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Add")," button to add the ownership configuration to the transaction."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Ownerships tab 3",src:a(11100).Z,width:"2216",height:"708"})),(0,i.kt)("p",null,"And here also, if you want to delete a configured ownership, you can highlight it and press ",(0,i.kt)("inlineCode",{parentName:"p"},"d"),"."),(0,i.kt)("h3",{id:"content"},"Content"),(0,i.kt)("p",null,"The content tab allows you to set the content of the transaction. Start typing to enter the edit mode of this tab and press ",(0,i.kt)("inlineCode",{parentName:"p"},"esc")," if you want to exit the edit mode and navigate to another tab."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Content tab",src:a(8914).Z,width:"2214",height:"450"})),(0,i.kt)("h3",{id:"smart-contract"},"Smart contract"),(0,i.kt)("p",null,"The smart contract tab allows you to set the smart contract of the transaction. Start typing to enter the edit mode of this tab and press ",(0,i.kt)("inlineCode",{parentName:"p"},"esc")," if you want to exit the edit mode and navigate to another tab."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Smart contract tab",src:a(14241).Z,width:"2226",height:"446"})),(0,i.kt)("h3",{id:"sending-the-transaction"},"Sending the transaction"),(0,i.kt)("p",null,"When you\u2019re done configuring the transaction, go back to the main tab and press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Add")," button."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Sending transaction",src:a(90941).Z,width:"2216",height:"1340"})),(0,i.kt)("h2",{id:"keychain-management"},"Keychain management"),(0,i.kt)("p",null,"The keychain management menu allows you to "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"create a keychain with a given seed"),(0,i.kt)("li",{parentName:"ul"},"access a keychain"),(0,i.kt)("li",{parentName:"ul"},"add and remove services from a keychain"),(0,i.kt)("li",{parentName:"ul"},"send a keychain transaction for a specific service")),(0,i.kt)("p",null,"In any cases you will need to start by selecting the endpoint you want, that will automatically feed the URL of the endpoint.\nThen specify your access seed."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Keychain management",src:a(92603).Z,width:"356",height:"538"})),(0,i.kt)("h3",{id:"creating-a-keychain"},"Creating a keychain"),(0,i.kt)("p",null,"If you press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Create keychain")," button, a new keychain will be created. And the seed you provided will be used to access it. "),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Create a keychain",src:a(17995).Z,width:"1982",height:"814"})),(0,i.kt)("h3",{id:"accessing-a-keychain"},"Accessing a keychain"),(0,i.kt)("p",null,"Pressing the ",(0,i.kt)("inlineCode",{parentName:"p"},"Access keychain")," button will give you access to the list of services associated with your keychain (one default ",(0,i.kt)("inlineCode",{parentName:"p"},"uco")," service has been created).\n",(0,i.kt)("img",{alt:"Access a keychain",src:a(78634).Z,width:"912",height:"1162"})),(0,i.kt)("h3",{id:"adding--removing-a-service"},"Adding / removing a service"),(0,i.kt)("p",null,"If you go down to the ",(0,i.kt)("inlineCode",{parentName:"p"},"service name")," field you can type a new service name and a default derivation path will be created. If you then press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Create Service"),", your new service will be displayed in the list of services."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Add a service",src:a(53061).Z,width:"898",height:"1212"})),(0,i.kt)("p",null,"If you highlight a service and press ",(0,i.kt)("inlineCode",{parentName:"p"},"d")," the service will be deleted."),(0,i.kt)("h3",{id:"create-a-transaction-for-a-service"},"Create a transaction for a service"),(0,i.kt)("p",null,"If you highlight a specific service and press ",(0,i.kt)("inlineCode",{parentName:"p"},"enter")," the highlighted will be selected."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Create a transaction for a service",src:a(92029).Z,width:"898",height:"1208"})),(0,i.kt)("p",null,"If you then press the ",(0,i.kt)("inlineCode",{parentName:"p"},"Create Transaction for Service")," button, you will get a new menu to create a transaction for the selected service."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Main tab of create keychain transaction",src:a(89294).Z,width:"2212",height:"870"})),(0,i.kt)("p",null,"The mechanism to configure a keychain transaction for a service is the same as the one for a transaction (described above). Only a few configuration are not possible (like the endpoint, the seed, the index and the elliptic curve)."),(0,i.kt)("h2",{id:"cli---archethic-command-line-interpreter"},"CLI - Archethic Command Line Interpreter"),(0,i.kt)("p",null,"It is also possible to call the archethic cli tool using the command line."),(0,i.kt)("p",null,"For details of available commands, you can"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"consult the ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/archethic-cli#cli"},"readme")," of the corresponding github project."),(0,i.kt)("li",{parentName:"ul"},"display help with the command ",(0,i.kt)("inlineCode",{parentName:"li"},"--help"),".")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Help command",src:a(32941).Z,width:"1526",height:"810"})),(0,i.kt)("h2",{id:"contribution"},"Contribution"),(0,i.kt)("p",null,"If you like this product and wish to contribute to its development, please visit our ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-cli"},"Github Page")),(0,i.kt)("p",null,"We are welcoming contributions in any forms (code, issues, documentation, ideas, question, etc.)"))}p.isMDXComponent=!0},78634:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/access_keychain-9f933a8d669d6ed955e30dd1aa169bbb.png"},53061:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/add_service-0678042a796e4c8290090dc5ecfae0d2.png"},8914:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/content-ab19f634acaad0b5246fe5983d98f129.png"},17995:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/create_keychain-8addb948180651745f730122e7bce878.png"},92029:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/create_keychain_transaction-cedc8bbccf4171fbb0dd5eda74b3736e.png"},57848:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/generate_address-ba70791dfe6de72c28139e89d1584039.png"},32941:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/help-command-a79b629216cd48d2acca13cf35714ee5.png"},92603:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/keychain_management-c8b7e23b91a14f3f555ae8a054eb7bae.png"},89294:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/main_keychain_transaction-03d95c68a9a99ad66b7321d291387d22.png"},83288:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/main_tab-5783418ecc8dd832b65d81a6579b7d19.png"},771:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/ownerships-559b27b31d1a636f3fcb406889868258.png"},44786:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/ownerships_2-3ef9c28939b2def4fb31695668e0fa15.png"},11100:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/ownerships_3-b1e74fd7bb29438106163db16673b731.png"},91699:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/recipients-b1436cd932b7a6402cd47a8f1a1860ca.png"},90941:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/sending_transaction-970c825476f166398dededfcc355d705.png"},14241:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/smart_contract-2d09068ad09c2a03858e8463b4176964.png"},86753:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/token_transfers-7387b1e8c1f1049818261970230af678.png"},63040:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/uco_transfers-c67df50fb05e1d0062ad690ce2609f34.png"},75436:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/uco_transfers_2-2f1a38a418f288087aae516f1b9e11c4.png"},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/a1844ead.56f11ede.js b/assets/js/a1844ead.56f11ede.js new file mode 100644 index 000000000..e50e61d76 --- /dev/null +++ b/assets/js/a1844ead.56f11ede.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1778],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=d(n),m=a,h=p["".concat(l,".").concat(m)]||p[m]||u[m]||o;return n?r.createElement(h,i(i({ref:t},c),{},{components:n})):r.createElement(h,i({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>d});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"transaction-form",title:"Smart Contracts Playground - Transaction form",sidebar_label:"Transaction form",sidebar_position:99},i=void 0,s={unversionedId:"build/smart-contracts/playground/transaction-form",id:"build/smart-contracts/playground/transaction-form",title:"Smart Contracts Playground - Transaction form",description:"The transaction form is a form that you might encounter at different places:",source:"@site/docs/build/smart-contracts/playground/transaction-form.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/transaction-form",permalink:"/build/smart-contracts/playground/transaction-form",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:99,frontMatter:{id:"transaction-form",title:"Smart Contracts Playground - Transaction form",sidebar_label:"Transaction form",sidebar_position:99},sidebar:"docs",previous:{title:"Function calls",permalink:"/build/smart-contracts/playground/functions"},next:{title:"Mock form",permalink:"/build/smart-contracts/playground/mock-form"}},l={},d=[{value:"type",id:"type",level:3},{value:"code",id:"code",level:3},{value:"content",id:"content",level:3},{value:"validation timestamp (not used in deployment)",id:"validation-timestamp-not-used-in-deployment",level:3},{value:"address (not used in deployment)",id:"address-not-used-in-deployment",level:3},{value:"uco transfers",id:"uco-transfers",level:3},{value:"token transfers",id:"token-transfers",level:3},{value:"recipients",id:"recipients",level:3},{value:"ownerships",id:"ownerships",level:3}],c={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The transaction form is a form that you might encounter at different places:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Trigger panel"),(0,a.kt)("li",{parentName:"ol"},"Previous contract panel"),(0,a.kt)("li",{parentName:"ol"},"Deploy panel")),(0,a.kt)("p",null,"The goal of this form is to prepare a transaction payload (everything non-crypto).\nWe'll describe here every subpart of this form."),(0,a.kt)("h3",{id:"type"},"type"),(0,a.kt)("p",null,"This is a selector to choose the transaction's type. It is used to give a hint about what's in the transaction. Some types impose some rules to follow."),(0,a.kt)("p",null,"Read ",(0,a.kt)("a",{parentName:"p",href:"/learn/transaction-types"},"Transaction types")," for the details."),(0,a.kt)("h3",{id:"code"},"code"),(0,a.kt)("p",null,"This is the text field for the code of the Smart Contract. It may be hidden because in the Smart Contracts Playground, the code is usually at the root level of the user interface."),(0,a.kt)("h3",{id:"content"},"content"),(0,a.kt)("p",null,"The content is a text field. It often depends on the transaction's type.\nFor Smart Contracts, we use it to store the aggregated state. This might change in the very near future (see ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-14.md"},"AEIP-14"),")."),(0,a.kt)("h3",{id:"validation-timestamp-not-used-in-deployment"},"validation timestamp (not used in deployment)"),(0,a.kt)("p",null,"It represents the time at which the transaction was validated. This is only used to mock a value for your tests."),(0,a.kt)("h3",{id:"address-not-used-in-deployment"},"address (not used in deployment)"),(0,a.kt)("p",null,"It's the transaction's address. It must be a 68 characters hexadecimal. This is only used to mock a value for your tests."),(0,a.kt)("h3",{id:"uco-transfers"},"uco transfers"),(0,a.kt)("p",null,"This is the list of transfers for the UCOs. Every transfer is defined by 2 fields:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"amount"),": required - float"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"to"),": required - hexadecimal address of destination (68 characters)")),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"The amount accepts 8 decimals maximum.")),(0,a.kt)("h3",{id:"token-transfers"},"token transfers"),(0,a.kt)("p",null,"This is the list of transfers for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-02.md"},"AEIP-02")," tokens. Every transfer is defined by 3-4 fields:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"amount"),": required - float"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"to"),": required - hexadecimal address of destination (68 characters)"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"token_address"),": required - hexadecimal address of the token's definition (68 characters)"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"token_id"),": optional - default: 0 - the index of the token in the token's definition (mainly used for NFTs)")),(0,a.kt)("h3",{id:"recipients"},"recipients"),(0,a.kt)("p",null,"This is the list of the Smart Contracts addresses to trigger. Note that the Smart Contracts are executed in dry mode (not writing anything) when the transaction is being validated, which means that if an execution fails, the transaction is invalid."),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"For now a Smart Contracts should not trigger other Smart Contracts because the execution is not atomic.")),(0,a.kt)("h3",{id:"ownerships"},"ownerships"),(0,a.kt)("p",null,"This is the list of secrets with the public keys authorized to decrypt them.\nEvery secret is defined by 2 fields: "),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"secret"),": required - the ",(0,a.kt)("strong",{parentName:"li"},"non-encrypted")," secret (the SDK will encrypt with a key that is then encrypted for every authorized_public_keys below)"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"authorized_public_keys"),": required - the list of public keys allowed to decrypt the secret")),(0,a.kt)("admonition",{title:"contract's ownership",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"When deploying, the playground automatically creates a secret that is used to give the ability to execute the contract to all authorized nodes. "),(0,a.kt)("p",{parentName:"admonition"},"In raw terms, it encrypts the ",(0,a.kt)("inlineCode",{parentName:"p"},"seed")," with the ",(0,a.kt)("inlineCode",{parentName:"p"},"storage nonce public key"),".")),(0,a.kt)("admonition",{title:"TODO",type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"missing mock for movements")))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/a1844ead.c10c17b2.js b/assets/js/a1844ead.c10c17b2.js deleted file mode 100644 index 9b71294bd..000000000 --- a/assets/js/a1844ead.c10c17b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1778],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=d(n),m=a,h=p["".concat(l,".").concat(m)]||p[m]||u[m]||o;return n?r.createElement(h,i(i({ref:t},c),{},{components:n})):r.createElement(h,i({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>d});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"transaction-form",title:"Smart Contracts Playground - Transaction form",sidebar_label:"Transaction form",sidebar_position:99},i=void 0,s={unversionedId:"build/smart-contracts/playground/transaction-form",id:"build/smart-contracts/playground/transaction-form",title:"Smart Contracts Playground - Transaction form",description:"The transaction form is a form that you might encounter at different places:",source:"@site/docs/build/smart-contracts/playground/transaction-form.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/transaction-form",permalink:"/build/smart-contracts/playground/transaction-form",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:99,frontMatter:{id:"transaction-form",title:"Smart Contracts Playground - Transaction form",sidebar_label:"Transaction form",sidebar_position:99},sidebar:"docs",previous:{title:"Function calls",permalink:"/build/smart-contracts/playground/functions"},next:{title:"Mock form",permalink:"/build/smart-contracts/playground/mock-form"}},l={},d=[{value:"type",id:"type",level:3},{value:"code",id:"code",level:3},{value:"content",id:"content",level:3},{value:"validation timestamp (not used in deployment)",id:"validation-timestamp-not-used-in-deployment",level:3},{value:"address (not used in deployment)",id:"address-not-used-in-deployment",level:3},{value:"uco transfers",id:"uco-transfers",level:3},{value:"token transfers",id:"token-transfers",level:3},{value:"recipients",id:"recipients",level:3},{value:"ownerships",id:"ownerships",level:3}],c={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The transaction form is a form that you might encounter at different places:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Trigger panel"),(0,a.kt)("li",{parentName:"ol"},"Previous contract panel"),(0,a.kt)("li",{parentName:"ol"},"Deploy panel")),(0,a.kt)("p",null,"The goal of this form is to prepare a transaction payload (everything non-crypto).\nWe'll describe here every subpart of this form."),(0,a.kt)("h3",{id:"type"},"type"),(0,a.kt)("p",null,"This is a selector to choose the transaction's type. It is used to give a hint about what's in the transaction. Some types impose some rules to follow."),(0,a.kt)("p",null,"Read ",(0,a.kt)("a",{parentName:"p",href:"/learn/transaction-types"},"Transaction types")," for the details."),(0,a.kt)("h3",{id:"code"},"code"),(0,a.kt)("p",null,"This is the text field for the code of the Smart Contract. It may be hidden because in the Smart Contracts Playground, the code is usually at the root level of the user interface."),(0,a.kt)("h3",{id:"content"},"content"),(0,a.kt)("p",null,"The content is a text field. It often depends on the transaction's type.\nFor Smart Contracts, we use it to store the aggregated state. This might change in the very near future (see ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-14.md"},"AEIP-14"),")."),(0,a.kt)("h3",{id:"validation-timestamp-not-used-in-deployment"},"validation timestamp (not used in deployment)"),(0,a.kt)("p",null,"It represents the time at which the transaction was validated. This is only used to mock a value for your tests."),(0,a.kt)("h3",{id:"address-not-used-in-deployment"},"address (not used in deployment)"),(0,a.kt)("p",null,"It's the transaction's address. It must be a 68 characters hexadecimal. This is only used to mock a value for your tests."),(0,a.kt)("h3",{id:"uco-transfers"},"uco transfers"),(0,a.kt)("p",null,"This is the list of transfers for the UCOs. Every transfer is defined by 2 fields:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"amount"),": required - float"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"to"),": required - hexadecimal address of destination (68 characters)")),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"The amount accepts 8 decimals maximum.")),(0,a.kt)("h3",{id:"token-transfers"},"token transfers"),(0,a.kt)("p",null,"This is the list of transfers for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-02.md"},"AEIP-02")," tokens. Every transfer is defined by 3-4 fields:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"amount"),": required - float"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"to"),": required - hexadecimal address of destination (68 characters)"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"token_address"),": required - hexadecimal address of the token's definition (68 characters)"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"token_id"),": optional - default: 0 - the index of the token in the token's definition (mainly used for NFTs)")),(0,a.kt)("h3",{id:"recipients"},"recipients"),(0,a.kt)("p",null,"This is the list of the Smart Contracts addresses to trigger. Note that the Smart Contracts are executed in dry mode (not writing anything) when the transaction is being validated, which means that if an execution fails, the transaction is invalid."),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"For now a Smart Contracts should not trigger other Smart Contracts because the execution is not atomic.")),(0,a.kt)("h3",{id:"ownerships"},"ownerships"),(0,a.kt)("p",null,"This is the list of secrets with the public keys authorized to decrypt them.\nEvery secret is defined by 2 fields: "),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"secret"),": required - the ",(0,a.kt)("strong",{parentName:"li"},"non-encrypted")," secret (the SDK will encrypt with a key that is then encrypted for every authorized_public_keys below)"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"authorized_public_keys"),": required - the list of public keys allowed to decrypt the secret")),(0,a.kt)("admonition",{title:"contract's ownership",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"When deploying, the playground automatically creates a secret that is used to give the ability to execute the contract to all authorized nodes. "),(0,a.kt)("p",{parentName:"admonition"},"In raw terms, it encrypts the ",(0,a.kt)("inlineCode",{parentName:"p"},"seed")," with the ",(0,a.kt)("inlineCode",{parentName:"p"},"storage nonce public key"),".")),(0,a.kt)("admonition",{title:"TODO",type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"missing mock for movements")))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/a18b1795.365b4052.js b/assets/js/a18b1795.365b4052.js deleted file mode 100644 index 7dba44999..000000000 --- a/assets/js/a18b1795.365b4052.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3890],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>y});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=l(n),m=r,y=d["".concat(c,".").concat(m)]||d[m]||u[m]||o;return n?a.createElement(y,s(s({ref:t},p),{},{components:n})):a.createElement(y,s({ref:t},p))}));function y(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:r,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var a=n(87462),r=n(67294),o=n(3905);n(8209);const s={id:"network-transactions",title:"networkTransactions",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/queries/network-transactions",id:"build/api/schema/queries/network-transactions",title:"networkTransactions",description:"Query the network to list the transaction on the type",source:"@site/docs/build/api/schema/queries/network-transactions.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/network-transactions",permalink:"/build/api/schema/queries/network-transactions",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"network-transactions",title:"networkTransactions",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"nearestEndpoints",permalink:"/build/api/schema/queries/nearest-endpoints"},next:{title:"nodes",permalink:"/build/api/schema/queries/nodes"}},l={},p=[{value:"Arguments",id:"arguments",level:3},{value:'networkTransactions.pagePosInteger ',id:"code-style-fontweight-normal-networktransactionsbpagebcodeposinteger-",level:4},{value:'networkTransactions.typeTransactionType! ',id:"code-style-fontweight-normal-networktransactionsbtypebcodetransactiontype--",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],d=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},k="wrapper";function f(e){let{components:t,...n}=e;return(0,o.kt)(k,(0,a.Z)({},y,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to list the transaction on the type"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"networkTransactions(\n page: PosInteger\n type: TransactionType!\n): [Transaction]\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-networktransactionsbpagebcodeposinteger-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"networkTransactions.",(0,o.kt)("b",null,"page"))),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/pos-integer"},(0,o.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-networktransactionsbtypebcodetransactiontype--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"networkTransactions.",(0,o.kt)("b",null,"type"))),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/transaction-type"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionType!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transaction-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/a18b1795.662c6784.js b/assets/js/a18b1795.662c6784.js new file mode 100644 index 000000000..1e373cefd --- /dev/null +++ b/assets/js/a18b1795.662c6784.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3890],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>y});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=l(n),m=r,y=d["".concat(c,".").concat(m)]||d[m]||u[m]||o;return n?a.createElement(y,s(s({ref:t},p),{},{components:n})):a.createElement(y,s({ref:t},p))}));function y(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:r,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var a=n(87462),r=n(67294),o=n(3905);n(8209);const s={id:"network-transactions",title:"networkTransactions",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/queries/network-transactions",id:"build/api/schema/queries/network-transactions",title:"networkTransactions",description:"Query the network to list the transaction on the type",source:"@site/docs/build/api/schema/queries/network-transactions.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/network-transactions",permalink:"/build/api/schema/queries/network-transactions",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"network-transactions",title:"networkTransactions",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"nearestEndpoints",permalink:"/build/api/schema/queries/nearest-endpoints"},next:{title:"nodes",permalink:"/build/api/schema/queries/nodes"}},l={},p=[{value:"Arguments",id:"arguments",level:3},{value:'networkTransactions.pagePosInteger ',id:"code-style-fontweight-normal-networktransactionsbpagebcodeposinteger-",level:4},{value:'networkTransactions.typeTransactionType! ',id:"code-style-fontweight-normal-networktransactionsbtypebcodetransactiontype--",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],d=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:p,Bullet:d,SpecifiedBy:u,Badge:m},k="wrapper";function f(e){let{components:t,...n}=e;return(0,o.kt)(k,(0,a.Z)({},y,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to list the transaction on the type"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"networkTransactions(\n page: PosInteger\n type: TransactionType!\n): [Transaction]\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-networktransactionsbpagebcodeposinteger-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"networkTransactions.",(0,o.kt)("b",null,"page"))),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/pos-integer"},(0,o.kt)("inlineCode",{parentName:"a"},"PosInteger"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-networktransactionsbtypebcodetransactiontype--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"networkTransactions.",(0,o.kt)("b",null,"type"))),(0,o.kt)(d,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/transaction-type"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionType!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transaction-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/a22626c5.0093487e.js b/assets/js/a22626c5.0093487e.js new file mode 100644 index 000000000..8266e5263 --- /dev/null +++ b/assets/js/a22626c5.0093487e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9286],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=s(r),h=o,f=d["".concat(c,".").concat(h)]||d[h]||p[h]||i;return r?n.createElement(f,a(a({ref:t},u),{},{components:r})):n.createElement(f,a({ref:t},u))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=h;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[d]="string"==typeof e?e:o,a[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));r(8209);const i={id:"core",title:"Core development"},a=void 0,l={unversionedId:"build/core/core",id:"build/core/core",title:"Core development",description:"Archethic Node repository can be found here",source:"@site/docs/build/core/README.md",sourceDirName:"build/core",slug:"/build/core/",permalink:"/build/core/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"core",title:"Core development"},sidebar:"docs",previous:{title:"transactionError",permalink:"/build/api/schema/subscriptions/transaction-error"},next:{title:"Account",permalink:"/build/core/account"}},c={},s=[{value:"Technology Stack",id:"technology-stack",level:2},{value:"Why Elixir ?",id:"why-elixir-",level:3},{value:"Why C ?",id:"why-c-",level:3},{value:"Structure",id:"structure",level:2}],u={toc:s},d="wrapper";function p(e){let{components:t,...i}=e;return(0,o.kt)(d,(0,n.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic Node repository can be found ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node"},"here")),(0,o.kt)("h2",{id:"technology-stack"},"Technology Stack"),(0,o.kt)("p",null,"Archethic Blockchain node used a combination of Elixir & C programming languages to achieve fast and reliable decentralized network."),(0,o.kt)("h3",{id:"why-elixir-"},"Why Elixir ?"),(0,o.kt)("p",null,"Elixir is a dynamic, functional language for building scalable and maintainable applications."),(0,o.kt)("p",null,"It leverages the Erlang VM, known for running low-latency, distributed, and fault-tolerant systems."),(0,o.kt)("p",null,"Elixir is successfully used in web development, embedded software, data ingestion, and multimedia processing, across a wide range of industries."),(0,o.kt)("p",null,"When we are building P2P systems and Blockchain technologies we need to think about fault-tolerance, low-latency, concurrent/parallelism.\nElixir matches all those requirements."),(0,o.kt)("p",null,"Because all Elixir code runs inside lightweight threads of execution (called processes) that are isolated and exchange information via messages, we can build fast\nprocessing of data which result in a high TPS for a better scalability."),(0,o.kt)("p",null,"The unavoidable truth about software running in production is that things will go wrong."),(0,o.kt)("p",null,"Even more when we take network, file systems, and other third-party resources into account."),(0,o.kt)("p",null,"Elixir provides supervisors which describe how to restart parts of your system when things go awry, going back to a known initial state that is guaranteed to work."),(0,o.kt)("p",null,"This feature ensures in case of failure, the entire system will not be down, and the isolation provided by the processes and their restarting strategy helps us to achieve it."),(0,o.kt)("p",null,"Functional programming promotes a coding style that helps developers write code that is short, concise, and maintainable."),(0,o.kt)("p",null,"Out of the box, Erlang VM provides the capability to hot reload code, which is the best case scenario if we want to provide an on-chain governance without restarting nodes."),(0,o.kt)("h3",{id:"why-c-"},"Why C ?"),(0,o.kt)("p",null,"We need to interact with hardware components and C seems the best candidate, so we are using this language to communicate with TPM for instance."),(0,o.kt)("p",null,"But also, for some intensive task which are really complex in computing, we rely on C to perform those processing."),(0,o.kt)("h2",{id:"structure"},"Structure"),(0,o.kt)("p",null,"Code base is divided into domains (contexts) for better single responsibility principle:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"core structure",src:r(93532).Z,width:"1568",height:"2446"})))}p.isMDXComponent=!0},93532:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/core_structure-e53af1776beef639ac15f67f9344dab0.png"},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/a22626c5.b24da04c.js b/assets/js/a22626c5.b24da04c.js deleted file mode 100644 index 76f7d46d2..000000000 --- a/assets/js/a22626c5.b24da04c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9286],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=s(r),h=o,f=d["".concat(c,".").concat(h)]||d[h]||p[h]||i;return r?n.createElement(f,a(a({ref:t},u),{},{components:r})):n.createElement(f,a({ref:t},u))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=h;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[d]="string"==typeof e?e:o,a[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));r(8209);const i={id:"core",title:"Core development"},a=void 0,l={unversionedId:"build/core/core",id:"build/core/core",title:"Core development",description:"Archethic Node repository can be found here",source:"@site/docs/build/core/README.md",sourceDirName:"build/core",slug:"/build/core/",permalink:"/build/core/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"core",title:"Core development"},sidebar:"docs",previous:{title:"transactionError",permalink:"/build/api/schema/subscriptions/transaction-error"},next:{title:"Account",permalink:"/build/core/account"}},c={},s=[{value:"Technology Stack",id:"technology-stack",level:2},{value:"Why Elixir ?",id:"why-elixir-",level:3},{value:"Why C ?",id:"why-c-",level:3},{value:"Structure",id:"structure",level:2}],u={toc:s},d="wrapper";function p(e){let{components:t,...i}=e;return(0,o.kt)(d,(0,n.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic Node repository can be found ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic-node"},"here")),(0,o.kt)("h2",{id:"technology-stack"},"Technology Stack"),(0,o.kt)("p",null,"Archethic Blockchain node used a combination of Elixir & C programming languages to achieve fast and reliable decentralized network."),(0,o.kt)("h3",{id:"why-elixir-"},"Why Elixir ?"),(0,o.kt)("p",null,"Elixir is a dynamic, functional language for building scalable and maintainable applications."),(0,o.kt)("p",null,"It leverages the Erlang VM, known for running low-latency, distributed, and fault-tolerant systems."),(0,o.kt)("p",null,"Elixir is successfully used in web development, embedded software, data ingestion, and multimedia processing, across a wide range of industries."),(0,o.kt)("p",null,"When we are building P2P systems and Blockchain technologies we need to think about fault-tolerance, low-latency, concurrent/parallelism.\nElixir matches all those requirements."),(0,o.kt)("p",null,"Because all Elixir code runs inside lightweight threads of execution (called processes) that are isolated and exchange information via messages, we can build fast\nprocessing of data which result in a high TPS for a better scalability."),(0,o.kt)("p",null,"The unavoidable truth about software running in production is that things will go wrong."),(0,o.kt)("p",null,"Even more when we take network, file systems, and other third-party resources into account."),(0,o.kt)("p",null,"Elixir provides supervisors which describe how to restart parts of your system when things go awry, going back to a known initial state that is guaranteed to work."),(0,o.kt)("p",null,"This feature ensures in case of failure, the entire system will not be down, and the isolation provided by the processes and their restarting strategy helps us to achieve it."),(0,o.kt)("p",null,"Functional programming promotes a coding style that helps developers write code that is short, concise, and maintainable."),(0,o.kt)("p",null,"Out of the box, Erlang VM provides the capability to hot reload code, which is the best case scenario if we want to provide an on-chain governance without restarting nodes."),(0,o.kt)("h3",{id:"why-c-"},"Why C ?"),(0,o.kt)("p",null,"We need to interact with hardware components and C seems the best candidate, so we are using this language to communicate with TPM for instance."),(0,o.kt)("p",null,"But also, for some intensive task which are really complex in computing, we rely on C to perform those processing."),(0,o.kt)("h2",{id:"structure"},"Structure"),(0,o.kt)("p",null,"Code base is divided into domains (contexts) for better single responsibility principle:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"core structure",src:r(93532).Z,width:"1568",height:"2446"})))}p.isMDXComponent=!0},93532:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/core_structure-e53af1776beef639ac15f67f9344dab0.png"},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/a90ecf70.3d776168.js b/assets/js/a90ecf70.3d776168.js new file mode 100644 index 000000000..8228c580f --- /dev/null +++ b/assets/js/a90ecf70.3d776168.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9056],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},h="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),h=c(n),u=i,f=h["".concat(l,".").concat(u)]||h[u]||p[u]||o;return n?r.createElement(f,a(a({ref:t},d),{},{components:n})):r.createElement(f,a({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[h]="string"==typeof e?e:i,a[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"aeweb",title:"AEWeb"},a=void 0,s={unversionedId:"FAQ/aeweb",id:"FAQ/aeweb",title:"AEWeb",description:"General",source:"@site/docs/FAQ/aeweb.md",sourceDirName:"FAQ",slug:"/FAQ/aeweb",permalink:"/FAQ/aeweb",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"aeweb",title:"AEWeb"},sidebar:"docs",previous:{title:"FAQ",permalink:"/category/faq"},next:{title:"Archethic Bridge 2-ways",permalink:"/FAQ/bridge-2-ways"}},l={},c=[{value:"General",id:"general",level:2},{value:" How do I redirect my domain names to my websites deployed on the Archethic Blockchain?",id:"-how-do-i-redirect-my-domain-names-to-my-websites-deployed-on-the-archethic-blockchain",level:3},{value:"What is the purpose of a .gitignore file?",id:"what-is-the-purpose-of-a-gitignore-file",level:3},{value:"When using the Archethic wallet's "link to a file hosted on AEWeb" option to create an NFT with an image, does it require sending funds to the newly created address using AEWeb CLI?",id:"when-using-the-archethic-wallets-link-to-a-file-hosted-on-aeweb-option-to-create-an-nft-with-an-image-does-it-require-sending-funds-to-the-newly-created-address-using-aeweb-cli",level:3}],d={toc:c},h="wrapper";function p(e){let{components:t,...n}=e;return(0,i.kt)(h,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"general"},"General"),(0,i.kt)("h3",{id:"-how-do-i-redirect-my-domain-names-to-my-websites-deployed-on-the-archethic-blockchain"},(0,i.kt)("strong",{parentName:"h3"}," How do I redirect my domain names to my websites deployed on the Archethic Blockchain?")),(0,i.kt)("p",null,"All the information regarding DNS configuration is available in the ",(0,i.kt)("a",{href:"/participate/aeweb/dns",target:"_blank"},"dedicated section"),"."),(0,i.kt)("p",null,"You will also find ",(0,i.kt)("a",{href:"/participate/aeweb/dns#hosting-provider-integration",target:"_blank"},"examples")," for Gandi, Cloudflare, and OVH services."),(0,i.kt)("h3",{id:"what-is-the-purpose-of-a-gitignore-file"},(0,i.kt)("strong",{parentName:"h3"},"What is the purpose of a .gitignore file?")),(0,i.kt)("p",null,"The .gitignore file serves to exclude specific files and directories from version control with Git. In the context of AEWeb, it's used to prevent the upload and synchronization of configuration and development files that are specific to the Git repository. This ensures that only the essential files of the website are transferred during the upload process."),(0,i.kt)("h3",{id:"when-using-the-archethic-wallets-link-to-a-file-hosted-on-aeweb-option-to-create-an-nft-with-an-image-does-it-require-sending-funds-to-the-newly-created-address-using-aeweb-cli"},(0,i.kt)("strong",{parentName:"h3"},'When using the Archethic wallet\'s "link to a file hosted on AEWeb" option to create an NFT with an image, does it require sending funds to the newly created address using AEWeb CLI?')),(0,i.kt)("p",null,"Currently, the AEWeb CLI is not directly connected to the wallet. Therefore, it is necessary to provision the chain that will host the files in order to pay the transaction fees. However, you can still use the wallet's keychain by retrieving the passphrase and utilizing the wallet's service to send funds to the service hosting the image, just as if you were performing the action directly from the wallet."),(0,i.kt)("p",null,"Here's an example using the Testnet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},'aeweb deploy --seed myseedphrase --endpoint https://testnet.archethic.net --path ./website --keychain-funding-service "archethic-wallet-ALICE" --keychain-website-service myImageAEWeb\n')))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/a90ecf70.b15787f0.js b/assets/js/a90ecf70.b15787f0.js deleted file mode 100644 index 9010c291d..000000000 --- a/assets/js/a90ecf70.b15787f0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9056],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},h="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),h=c(n),u=i,f=h["".concat(l,".").concat(u)]||h[u]||p[u]||o;return n?r.createElement(f,a(a({ref:t},d),{},{components:n})):r.createElement(f,a({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[h]="string"==typeof e?e:i,a[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"aeweb",title:"AEWeb"},a=void 0,s={unversionedId:"FAQ/aeweb",id:"FAQ/aeweb",title:"AEWeb",description:"General",source:"@site/docs/FAQ/aeweb.md",sourceDirName:"FAQ",slug:"/FAQ/aeweb",permalink:"/FAQ/aeweb",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"aeweb",title:"AEWeb"},sidebar:"docs",previous:{title:"FAQ",permalink:"/category/faq"},next:{title:"Archethic Bridge 2-ways",permalink:"/FAQ/bridge-2-ways"}},l={},c=[{value:"General",id:"general",level:2},{value:" How do I redirect my domain names to my websites deployed on the Archethic Blockchain?",id:"-how-do-i-redirect-my-domain-names-to-my-websites-deployed-on-the-archethic-blockchain",level:3},{value:"What is the purpose of a .gitignore file?",id:"what-is-the-purpose-of-a-gitignore-file",level:3},{value:"When using the Archethic wallet's "link to a file hosted on AEWeb" option to create an NFT with an image, does it require sending funds to the newly created address using AEWeb CLI?",id:"when-using-the-archethic-wallets-link-to-a-file-hosted-on-aeweb-option-to-create-an-nft-with-an-image-does-it-require-sending-funds-to-the-newly-created-address-using-aeweb-cli",level:3}],d={toc:c},h="wrapper";function p(e){let{components:t,...n}=e;return(0,i.kt)(h,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"general"},"General"),(0,i.kt)("h3",{id:"-how-do-i-redirect-my-domain-names-to-my-websites-deployed-on-the-archethic-blockchain"},(0,i.kt)("strong",{parentName:"h3"}," How do I redirect my domain names to my websites deployed on the Archethic Blockchain?")),(0,i.kt)("p",null,"All the information regarding DNS configuration is available in the ",(0,i.kt)("a",{href:"/participate/aeweb/dns",target:"_blank"},"dedicated section"),"."),(0,i.kt)("p",null,"You will also find ",(0,i.kt)("a",{href:"/participate/aeweb/dns#hosting-provider-integration",target:"_blank"},"examples")," for Gandi, Cloudflare, and OVH services."),(0,i.kt)("h3",{id:"what-is-the-purpose-of-a-gitignore-file"},(0,i.kt)("strong",{parentName:"h3"},"What is the purpose of a .gitignore file?")),(0,i.kt)("p",null,"The .gitignore file serves to exclude specific files and directories from version control with Git. In the context of AEWeb, it's used to prevent the upload and synchronization of configuration and development files that are specific to the Git repository. This ensures that only the essential files of the website are transferred during the upload process."),(0,i.kt)("h3",{id:"when-using-the-archethic-wallets-link-to-a-file-hosted-on-aeweb-option-to-create-an-nft-with-an-image-does-it-require-sending-funds-to-the-newly-created-address-using-aeweb-cli"},(0,i.kt)("strong",{parentName:"h3"},'When using the Archethic wallet\'s "link to a file hosted on AEWeb" option to create an NFT with an image, does it require sending funds to the newly created address using AEWeb CLI?')),(0,i.kt)("p",null,"Currently, the AEWeb CLI is not directly connected to the wallet. Therefore, it is necessary to provision the chain that will host the files in order to pay the transaction fees. However, you can still use the wallet's keychain by retrieving the passphrase and utilizing the wallet's service to send funds to the service hosting the image, just as if you were performing the action directly from the wallet."),(0,i.kt)("p",null,"Here's an example using the Testnet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},'aeweb deploy --seed myseedphrase --endpoint https://testnet.archethic.net --path ./website --keychain-funding-service "archethic-wallet-ALICE" --keychain-website-service myImageAEWeb\n')))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/aa1914e6.68b528e8.js b/assets/js/aa1914e6.8fa8ff17.js similarity index 77% rename from assets/js/aa1914e6.68b528e8.js rename to assets/js/aa1914e6.8fa8ff17.js index 932bd9528..29dccaac2 100644 --- a/assets/js/aa1914e6.68b528e8.js +++ b/assets/js/aa1914e6.8fa8ff17.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6694],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(r),f=o,m=u["".concat(l,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(m,i(i({ref:t},s),{},{components:r})):n.createElement(m,i({ref:t},s))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"sdk",title:"SDK"},i=void 0,c={unversionedId:"build/sdk/sdk",id:"build/sdk/sdk",title:"SDK",description:"",source:"@site/docs/build/sdk/README.md",sourceDirName:"build/sdk",slug:"/build/sdk/",permalink:"/build/sdk/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"sdk",title:"SDK"},sidebar:"docs",previous:{title:"Node",permalink:"/build/core/p2p/node"},next:{title:"Dart SDK",permalink:"/build/sdk/dart"}},l={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6694],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>b});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(r),f=o,b=u["".concat(l,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(b,i(i({ref:t},s),{},{components:r})):n.createElement(b,i({ref:t},s))}));function b(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"sdk",title:"SDK"},i=void 0,c={unversionedId:"build/sdk/sdk",id:"build/sdk/sdk",title:"SDK",description:"",source:"@site/docs/build/sdk/README.md",sourceDirName:"build/sdk",slug:"/build/sdk/",permalink:"/build/sdk/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"sdk",title:"SDK"},sidebar:"docs",previous:{title:"Node",permalink:"/build/core/p2p/node"},next:{title:"Dart SDK",permalink:"/build/sdk/dart"}},l={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/ac1890eb.18c841da.js b/assets/js/ac1890eb.18c841da.js new file mode 100644 index 000000000..4104f388e --- /dev/null +++ b/assets/js/ac1890eb.18c841da.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1719],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),l=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=l(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,c=d(e,["components","mdxType","originalType","parentName"]),p=l(a),u=r,y=p["".concat(o,".").concat(u)]||p[u]||m[u]||s;return a?n.createElement(y,i(i({ref:t},c),{},{components:a})):n.createElement(y,i({ref:t},c))}));function y(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,i=new Array(s);i[0]=u;var d={};for(var o in t)hasOwnProperty.call(t,o)&&(d[o]=t[o]);d.originalType=e,d[p]="string"==typeof e?e:r,i[1]=d;for(var l=2;l{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>l,contentTitle:()=>d,default:()=>b,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var n=a(87462),r=a(67294),s=a(3905);a(8209);const i={id:"address",title:"Address",hide_table_of_contents:!1},d=void 0,o={unversionedId:"build/api/schema/scalars/address",id:"build/api/schema/scalars/address",title:"Address",description:"The [Address] scalar type represents a transaction's address.",source:"@site/docs/build/api/schema/scalars/address.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/address",permalink:"/build/api/schema/scalars/address",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"address",title:"Address",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"version",permalink:"/build/api/schema/queries/version"},next:{title:"Boolean",permalink:"/build/api/schema/scalars/boolean"}},l={},c=[{value:"Returned by",id:"returned-by",level:3},{value:"Member of",id:"member-of",level:3}],p=()=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,s.kt)(r.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:c,Bullet:p,SpecifiedBy:m,Badge:u},k="wrapper";function b(e){let{components:t,...a}=e;return(0,s.kt)(k,(0,n.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"The ","[Address]"," scalar type represents a transaction's address.\nThe Address appears in a JSON response as Base16 formatted string. The parsed address will\nbe converted to a binary and any invalid address with an invalid algorithm or invalid size will be rejected"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Address\n")),(0,s.kt)("h3",{id:"returned-by"},"Returned by"),(0,s.kt)("p",null,(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/genesis-address"},(0,s.kt)("inlineCode",{parentName:"a"},"genesisAddress"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"})),(0,s.kt)("h3",{id:"member-of"},"Member of"),(0,s.kt)("p",null,(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/balance"},(0,s.kt)("inlineCode",{parentName:"a"},"balance"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,s.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/genesis-address"},(0,s.kt)("inlineCode",{parentName:"a"},"genesisAddress"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/last-transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"lastTransaction"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,s.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,s.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/token"},(0,s.kt)("inlineCode",{parentName:"a"},"token"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-balance"},(0,s.kt)("inlineCode",{parentName:"a"},"TokenBalance"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-transfer"},(0,s.kt)("inlineCode",{parentName:"a"},"TokenTransfer"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"transaction"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-attestation"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionAttestation"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-chain"},(0,s.kt)("inlineCode",{parentName:"a"},"transactionChain"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/transaction-confirmed"},(0,s.kt)("inlineCode",{parentName:"a"},"transactionConfirmed"))," ",(0,s.kt)(u,{class:"secondary",text:"subscription",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-error"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionError"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/transaction-error"},(0,s.kt)("inlineCode",{parentName:"a"},"transactionError"))," ",(0,s.kt)(u,{class:"secondary",text:"subscription",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-inputs"},(0,s.kt)("inlineCode",{parentName:"a"},"transactionInputs"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-movement"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionMovement"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/uco-transfer"},(0,s.kt)("inlineCode",{parentName:"a"},"UcoTransfer"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/unspent-output"},(0,s.kt)("inlineCode",{parentName:"a"},"UnspentOutput"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/ac1890eb.682f15ae.js b/assets/js/ac1890eb.682f15ae.js deleted file mode 100644 index 0087fc238..000000000 --- a/assets/js/ac1890eb.682f15ae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1719],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>y});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),l=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=l(e.components);return n.createElement(o.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,c=d(e,["components","mdxType","originalType","parentName"]),p=l(a),u=r,y=p["".concat(o,".").concat(u)]||p[u]||m[u]||s;return a?n.createElement(y,i(i({ref:t},c),{},{components:a})):n.createElement(y,i({ref:t},c))}));function y(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,i=new Array(s);i[0]=u;var d={};for(var o in t)hasOwnProperty.call(t,o)&&(d[o]=t[o]);d.originalType=e,d[p]="string"==typeof e?e:r,i[1]=d;for(var l=2;l{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>m,assets:()=>l,contentTitle:()=>d,default:()=>b,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var n=a(87462),r=a(67294),s=a(3905);a(8209);const i={id:"address",title:"Address",hide_table_of_contents:!1},d=void 0,o={unversionedId:"build/api/schema/scalars/address",id:"build/api/schema/scalars/address",title:"Address",description:"The [Address] scalar type represents a transaction's address.",source:"@site/docs/build/api/schema/scalars/address.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/address",permalink:"/build/api/schema/scalars/address",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"address",title:"Address",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"version",permalink:"/build/api/schema/queries/version"},next:{title:"Boolean",permalink:"/build/api/schema/scalars/boolean"}},l={},c=[{value:"Returned by",id:"returned-by",level:3},{value:"Member of",id:"member-of",level:3}],p=()=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,s.kt)(r.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:c,Bullet:p,SpecifiedBy:m,Badge:u},k="wrapper";function b(e){let{components:t,...a}=e;return(0,s.kt)(k,(0,n.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"The ","[Address]"," scalar type represents a transaction's address.\nThe Address appears in a JSON response as Base16 formatted string. The parsed address will\nbe converted to a binary and any invalid address with an invalid algorithm or invalid size will be rejected"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Address\n")),(0,s.kt)("h3",{id:"returned-by"},"Returned by"),(0,s.kt)("p",null,(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/genesis-address"},(0,s.kt)("inlineCode",{parentName:"a"},"genesisAddress"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"})),(0,s.kt)("h3",{id:"member-of"},"Member of"),(0,s.kt)("p",null,(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/balance"},(0,s.kt)("inlineCode",{parentName:"a"},"balance"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,s.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/genesis-address"},(0,s.kt)("inlineCode",{parentName:"a"},"genesisAddress"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/last-transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"lastTransaction"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,s.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,s.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/token"},(0,s.kt)("inlineCode",{parentName:"a"},"token"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-balance"},(0,s.kt)("inlineCode",{parentName:"a"},"TokenBalance"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-transfer"},(0,s.kt)("inlineCode",{parentName:"a"},"TokenTransfer"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"transaction"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-attestation"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionAttestation"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-chain"},(0,s.kt)("inlineCode",{parentName:"a"},"transactionChain"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/transaction-confirmed"},(0,s.kt)("inlineCode",{parentName:"a"},"transactionConfirmed"))," ",(0,s.kt)(u,{class:"secondary",text:"subscription",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-error"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionError"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/subscriptions/transaction-error"},(0,s.kt)("inlineCode",{parentName:"a"},"transactionError"))," ",(0,s.kt)(u,{class:"secondary",text:"subscription",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-inputs"},(0,s.kt)("inlineCode",{parentName:"a"},"transactionInputs"))," ",(0,s.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-movement"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionMovement"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/uco-transfer"},(0,s.kt)("inlineCode",{parentName:"a"},"UcoTransfer"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(p,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/unspent-output"},(0,s.kt)("inlineCode",{parentName:"a"},"UnspentOutput"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/ae218501.5829ca4f.js b/assets/js/ae218501.688ac581.js similarity index 53% rename from assets/js/ae218501.5829ca4f.js rename to assets/js/ae218501.688ac581.js index 278063695..538a951da 100644 --- a/assets/js/ae218501.5829ca4f.js +++ b/assets/js/ae218501.688ac581.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7443],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),i=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=i(r),u=a,m=p["".concat(c,".").concat(u)]||p[u]||f[u]||o;return r?n.createElement(m,l(l({ref:t},d),{},{components:r})):n.createElement(m,l({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:a,l[1]=s;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>f,assets:()=>i,contentTitle:()=>s,default:()=>k,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const l={id:"token-ledger",title:"TokenLedger",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/objects/token-ledger",id:"build/api/schema/objects/token-ledger",title:"TokenLedger",description:"[TokenLedger] represents the transfers to perform on the UCO ledger",source:"@site/docs/build/api/schema/objects/token-ledger.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/token-ledger",permalink:"/build/api/schema/objects/token-ledger",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"token-ledger",title:"TokenLedger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TokenBalance",permalink:"/build/api/schema/objects/token-balance"},next:{title:"TokenTransfer",permalink:"/build/api/schema/objects/token-transfer"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'TokenLedger.transfers[TokenTransfer] ',id:"code-style-fontweight-normal-tokenledgerbtransfersbcodetokentransfer--",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),f=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:p,SpecifiedBy:f,Badge:u},b="wrapper";function k(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TokenLedger]"," represents the transfers to perform on the UCO ledger"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TokenLedger {\n transfers: [TokenTransfer]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokenledgerbtransfersbcodetokentransfer--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenLedger.",(0,o.kt)("b",null,"transfers"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/token-transfer"},(0,o.kt)("inlineCode",{parentName:"a"},"[TokenTransfer]"))," ",(0,o.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"Ledger"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}k.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7443],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),i=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=i(r),u=a,m=p["".concat(c,".").concat(u)]||p[u]||f[u]||o;return r?n.createElement(m,l(l({ref:t},d),{},{components:r})):n.createElement(m,l({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:a,l[1]=s;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>u,Bullet:()=>p,SpecifiedBy:()=>f,assets:()=>i,contentTitle:()=>s,default:()=>k,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const l={id:"token-ledger",title:"TokenLedger",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/objects/token-ledger",id:"build/api/schema/objects/token-ledger",title:"TokenLedger",description:"[TokenLedger] represents the transfers to perform on the UCO ledger",source:"@site/docs/build/api/schema/objects/token-ledger.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/token-ledger",permalink:"/build/api/schema/objects/token-ledger",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"token-ledger",title:"TokenLedger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TokenBalance",permalink:"/build/api/schema/objects/token-balance"},next:{title:"TokenTransfer",permalink:"/build/api/schema/objects/token-transfer"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'TokenLedger.transfers[TokenTransfer] ',id:"code-style-fontweight-normal-tokenledgerbtransfersbcodetokentransfer--",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),f=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:p,SpecifiedBy:f,Badge:u},b="wrapper";function k(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TokenLedger]"," represents the transfers to perform on the UCO ledger"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TokenLedger {\n transfers: [TokenTransfer]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokenledgerbtransfersbcodetokentransfer--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenLedger.",(0,o.kt)("b",null,"transfers"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/token-transfer"},(0,o.kt)("inlineCode",{parentName:"a"},"[TokenTransfer]"))," ",(0,o.kt)(u,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"Ledger"))," ",(0,o.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}k.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/aef11b3c.e60be9f4.js b/assets/js/aef11b3c.2937a5df.js similarity index 50% rename from assets/js/aef11b3c.e60be9f4.js rename to assets/js/aef11b3c.2937a5df.js index 85f2321c4..43e6fe79b 100644 --- a/assets/js/aef11b3c.e60be9f4.js +++ b/assets/js/aef11b3c.2937a5df.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9573],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=l(n),m=r,f=p["".concat(c,".").concat(m)]||p[m]||u[m]||o;return n?a.createElement(f,i(i({ref:t},d),{},{components:n})):a.createElement(f,i({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>s,default:()=>y,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var a=n(87462),r=n(67294),o=n(3905);n(8209);const i={id:"transaction-confirmed",title:"transactionConfirmed",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/subscriptions/transaction-confirmed",id:"build/api/schema/subscriptions/transaction-confirmed",title:"transactionConfirmed",description:"Subscribe to be notified when a transaction is stored (if acted as welcome node)",source:"@site/docs/build/api/schema/subscriptions/transaction-confirmed.mdx",sourceDirName:"build/api/schema/subscriptions",slug:"/build/api/schema/subscriptions/transaction-confirmed",permalink:"/build/api/schema/subscriptions/transaction-confirmed",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-confirmed",title:"transactionConfirmed",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"oracleUpdate",permalink:"/build/api/schema/subscriptions/oracle-update"},next:{title:"transactionError",permalink:"/build/api/schema/subscriptions/transaction-error"}},l={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transactionConfirmed.addressAddress! ',id:"code-style-fontweight-normal-transactionconfirmedbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'TransactionAttestation ',id:"transactionattestation-",level:4}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Subscribe to be notified when a transaction is stored (if acted as welcome node)"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transactionConfirmed(\n address: Address!\n): TransactionAttestation\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionconfirmedbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionConfirmed.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transactionattestation-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-attestation"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionAttestation"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[TransactionAttestation]"," represents an attestation when a transaction is successfully validated and stored.\nFew attestations can be received with differents confirmations to ensure a better security of the replication.")))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9573],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=l(n),m=r,f=p["".concat(c,".").concat(m)]||p[m]||u[m]||o;return n?a.createElement(f,i(i({ref:t},d),{},{components:n})):a.createElement(f,i({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>l,contentTitle:()=>s,default:()=>y,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var a=n(87462),r=n(67294),o=n(3905);n(8209);const i={id:"transaction-confirmed",title:"transactionConfirmed",hide_table_of_contents:!1},s=void 0,c={unversionedId:"build/api/schema/subscriptions/transaction-confirmed",id:"build/api/schema/subscriptions/transaction-confirmed",title:"transactionConfirmed",description:"Subscribe to be notified when a transaction is stored (if acted as welcome node)",source:"@site/docs/build/api/schema/subscriptions/transaction-confirmed.mdx",sourceDirName:"build/api/schema/subscriptions",slug:"/build/api/schema/subscriptions/transaction-confirmed",permalink:"/build/api/schema/subscriptions/transaction-confirmed",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-confirmed",title:"transactionConfirmed",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"oracleUpdate",permalink:"/build/api/schema/subscriptions/oracle-update"},next:{title:"transactionError",permalink:"/build/api/schema/subscriptions/transaction-error"}},l={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transactionConfirmed.addressAddress! ',id:"code-style-fontweight-normal-transactionconfirmedbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'TransactionAttestation ',id:"transactionattestation-",level:4}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Subscribe to be notified when a transaction is stored (if acted as welcome node)"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transactionConfirmed(\n address: Address!\n): TransactionAttestation\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionconfirmedbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transactionConfirmed.",(0,o.kt)("b",null,"address"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transactionattestation-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction-attestation"},(0,o.kt)("inlineCode",{parentName:"a"},"TransactionAttestation"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[TransactionAttestation]"," represents an attestation when a transaction is successfully validated and stored.\nFew attestations can be received with differents confirmations to ensure a better security of the replication.")))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/b17a2c3b.843f7f31.js b/assets/js/b17a2c3b.cb4ad526.js similarity index 61% rename from assets/js/b17a2c3b.843f7f31.js rename to assets/js/b17a2c3b.cb4ad526.js index 1bd250b08..597a2f31f 100644 --- a/assets/js/b17a2c3b.843f7f31.js +++ b/assets/js/b17a2c3b.cb4ad526.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4099],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=c(r),f=a,m=p["".concat(s,".").concat(f)]||p[f]||u[f]||o;return r?n.createElement(m,i(i({ref:t},d),{},{components:r})):n.createElement(m,i({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>l,default:()=>b,frontMatter:()=>i,metadata:()=>s,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const i={id:"nodes",title:"nodes",hide_table_of_contents:!1},l=void 0,s={unversionedId:"build/api/schema/queries/nodes",id:"build/api/schema/queries/nodes",title:"nodes",description:"List all the nodes registered in the network",source:"@site/docs/build/api/schema/queries/nodes.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/nodes",permalink:"/build/api/schema/queries/nodes",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"nodes",title:"nodes",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"networkTransactions",permalink:"/build/api/schema/queries/network-transactions"},next:{title:"oracleData",permalink:"/build/api/schema/queries/oracle-data"}},c={},d=[{value:"Type",id:"type",level:3},{value:'Node ',id:"node-",level:4}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:p,SpecifiedBy:u,Badge:f},y="wrapper";function b(e){let{components:t,...r}=e;return(0,o.kt)(y,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"List all the nodes registered in the network"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"nodes: [Node]\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"node-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/node"},(0,o.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Node]"," represents a node in the network")))}b.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4099],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=c(r),f=a,m=p["".concat(s,".").concat(f)]||p[f]||u[f]||o;return r?n.createElement(m,i(i({ref:t},d),{},{components:r})):n.createElement(m,i({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>l,default:()=>y,frontMatter:()=>i,metadata:()=>s,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const i={id:"nodes",title:"nodes",hide_table_of_contents:!1},l=void 0,s={unversionedId:"build/api/schema/queries/nodes",id:"build/api/schema/queries/nodes",title:"nodes",description:"List all the nodes registered in the network",source:"@site/docs/build/api/schema/queries/nodes.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/nodes",permalink:"/build/api/schema/queries/nodes",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"nodes",title:"nodes",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"networkTransactions",permalink:"/build/api/schema/queries/network-transactions"},next:{title:"oracleData",permalink:"/build/api/schema/queries/oracle-data"}},c={},d=[{value:"Type",id:"type",level:3},{value:'Node ',id:"node-",level:4}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:p,SpecifiedBy:u,Badge:f},b="wrapper";function y(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"List all the nodes registered in the network"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"nodes: [Node]\n")),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"node-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/node"},(0,o.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Node]"," represents a node in the network")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/b2e52e63.033b1ff8.js b/assets/js/b2e52e63.033b1ff8.js new file mode 100644 index 000000000..9a59d0eb5 --- /dev/null +++ b/assets/js/b2e52e63.033b1ff8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1938],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),m=i,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||o;return n?a.createElement(h,r(r({ref:t},p),{},{components:n})):a.createElement(h,r({ref:t},p))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:i,r[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"condition",title:"Smart Contracts - Condition block",sidebar_label:"Condition",sidebar_position:2},r=void 0,s={unversionedId:"build/smart-contracts/language/condition",id:"build/smart-contracts/language/condition",title:"Smart Contracts - Condition block",description:"Conditions are blocks which purpose is to check the validity of a transaction.",source:"@site/docs/build/smart-contracts/language/condition.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/condition",permalink:"/build/smart-contracts/language/condition",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:2,frontMatter:{id:"condition",title:"Smart Contracts - Condition block",sidebar_label:"Condition",sidebar_position:2},sidebar:"docs",previous:{title:"Triggers",permalink:"/build/smart-contracts/language/triggers"},next:{title:"Actions",permalink:"/build/smart-contracts/language/actions"}},l={},c=[{value:"Rules",id:"rules",level:2},{value:"Condition inherit",id:"condition-inherit",level:2},{value:"Examples",id:"examples",level:3},{value:"Condition transaction",id:"condition-transaction",level:2},{value:"Examples",id:"examples-1",level:3},{value:"Condition oracle",id:"condition-oracle",level:2},{value:"Examples",id:"examples-2",level:3},{value:"Legacy syntax",id:"legacy-syntax",level:2}],p={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Conditions are blocks which purpose is to check the validity of a transaction. "),(0,i.kt)("p",null,"There are 3 types of ",(0,i.kt)("inlineCode",{parentName:"p"},"condition")," block: "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#condition-inherit"},"inherit")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#condition-transaction"},"transaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#condition-oracle"},"oracle"))),(0,i.kt)("p",null,'The condition blocks are not code block, they are maps of what we call "boolean expressions". '),(0,i.kt)("p",null,"In this map, the keys are the transaction property, and the values are expressions that must return a boolean or a value."),(0,i.kt)("p",null,"Conditions ",(0,i.kt)("inlineCode",{parentName:"p"},"transaction")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"oracle")," are mandatory if the associated trigger is used. Condition ",(0,i.kt)("inlineCode",{parentName:"p"},"inherit")," is optional."),(0,i.kt)("p",null,"Pseudo-code:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: , as: [\n : ,\n : ,\n : ,\n : \n]\n\n# note the syntax is a bit different for the inherit\ncondition inherit: [\n : ,\n : ,\n : ,\n : \n]\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"type")," is either ",(0,i.kt)("inlineCode",{parentName:"li"},"transaction")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"oracle"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"prop")," is a property of the transaction or ",(0,i.kt)("inlineCode",{parentName:"li"},"origin_family"),". See ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Action's Appendix 1")," for the available properties."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"expr")," is a code expression.")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"If you wish use a complex expression for condition property. You can use multi-lines block enclosed by parenthesis"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition transaction: [\n content: (\n # Complex logic\n # ...\n )\n]\n"))),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition inherit: [\n # \n type: "contract",\n\n # \n content: true,\n\n # \n code:\n if Time.now() > 1677572714 do\n "condition inherit: []"\n else\n previous.code\n end,\n\n # \n uco_transfers: Map.size() > 0\n]\n')),(0,i.kt)("h2",{id:"rules"},"Rules"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("strong",{parentName:"li"},'All "boolean expressions" must pass for the transaction to be valid.')),(0,i.kt)("li",{parentName:"ol"},'If the expression returns true, this "boolean expression" passes.'),(0,i.kt)("li",{parentName:"ol"},'If the expression returns false, this "boolean expression" fails.'),(0,i.kt)("li",{parentName:"ol"},'If the expression returns a value, this "boolean expression" passes if the transaction\'s property has the same value.')),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"In these blocks, there is also some sugar to automatically add the property as an argument of the functions called. For example ",(0,i.kt)("inlineCode",{parentName:"p"},"uco_transfers: Map.size() > 0")," will automatically expand to ",(0,i.kt)("inlineCode",{parentName:"p"},"uco_transfers: Map.size(transaction.uco_transfers) > 0"),".")),(0,i.kt)("h2",{id:"condition-inherit"},"Condition inherit"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition inherit")," purpose is to check the next transaction generated by the smart contract after its code execution. It ensures the next transaction respects specific rules so the smart contract chain cannot be compromised."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition inherit: [...]\n")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If the map is empty ",(0,i.kt)("inlineCode",{parentName:"p"},"[]"),", it means the transaction chain is closed: no transaction will be accepted anymore.")),(0,i.kt)("p",null,"There are 2 global variables for this condition block:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"previous")," is the transaction of the current contract."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"next"),' is the "next transaction".')),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Action's Appendix 1")," for the details of the transaction map."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"A specific rule is applied for inherit condition, if a field is not specified in the conditions, it assumes that it must have the same value as the previous transaction. ie. ",(0,i.kt)("inlineCode",{parentName:"p"},"code: previous.code == next.code"))),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Pass only if it is executed before a timestamp:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition inherit: [\n timestamp: next.timestamp < 1677598185\n]\n")),(0,i.kt)("p",null,'Pass only if the transaction is type "transfer", without any uco_transfers and at least one token_transfers:'),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition inherit: [\n type: "transfer",\n uco_transfers: Map.size() == 0,\n token_transfers: Map.size() > 0\n]\n')),(0,i.kt)("p",null,"Pass only if chain has been closed (the code part) and there is a 2 UCO transfer to an address depending on the time:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition inherit: [\n code: "condition inherit: []",\n uco_transfers: \n if Time.now() >= 1674564088 do\n ["00003bafdfb7a8e66b59de5692b79088063853bbd69a7d555faec906e6215e57ff98": 2]\n else\n ["0000ba28ce06631ff2ef4fe3dc89a34be13c0d252f8952bbfa3173b03dbef3c04afd": 2]\n end\n]\n')),(0,i.kt)("p",null,'Pass only if the key "index" of the content is greater than the previous one:'),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'# Note that we have to embed a block code inside parenthesis as we create complex code \n# like create/assign variables with multilines conditions statements\ncondition inherit: [\n content: (\n json_path = "$.index"\n if Json.path_match?(next.content, json_path) do\n previous_index = Json.path_extract(previous.content, json_path)\n new_index = Json.path_extract(next.content, json_path)\n\n new_index > previous_index\n else\n false\n end\n )\n]\n')),(0,i.kt)("h2",{id:"condition-transaction"},"Condition transaction"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition transaction")," purpose is to check the transaction that triggered the contract (a transaction with the contract address in the recipients)."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: transaction, as: [...]\n")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If the map is empty ",(0,i.kt)("inlineCode",{parentName:"p"},"[]"),", it means any transaction can trigger the contract.")),(0,i.kt)("p",null,"There are 2 global variables for this condition block:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"contract")," is the transaction of the current contract."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"transaction")," is the transaction that triggered the contract.")),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Action's Appendix 1")," for the details of the transaction map."),(0,i.kt)("h3",{id:"examples-1"},"Examples"),(0,i.kt)("p",null,"Pass only if the transaction that triggered the contract comes from a specific chain (a chain can be identified by it's genesis address):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: transaction, as: [\n address: Chain.get_genesis_address() == 0x00001234ab\n]\n")),(0,i.kt)("p",null,"Pass only if the transaction that triggered sent 10 UCOs to this contract:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: transaction, as: [\n uco_transfers: Map.get(contract.address) == 10\n]\n")),(0,i.kt)("p",null,"Pass only if the candidate is in the list:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition triggered_by: transaction, on: vote(candidate), as: [\n content: List.in?(["Peter", "Sofia", "Claire"], candidate)\n]\n')),(0,i.kt)("admonition",{title:"Did you notice?",type:"info"},(0,i.kt)("p",{parentName:"admonition"},"We wrote the expression in the ",(0,i.kt)("inlineCode",{parentName:"p"},"content"),' and we did not use this field. We\'ll soon introduce a new syntax to avoid this "hack".')),(0,i.kt)("h2",{id:"condition-oracle"},"Condition oracle"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition oracle")," purpose is to check the oracle transaction that triggered the contract."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: oracle, as: [...]\n")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If the map is empty ",(0,i.kt)("inlineCode",{parentName:"p"},"[]"),", it means any transaction can trigger the contract.")),(0,i.kt)("p",null,"There are 2 global variables for this condition block:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"contract")," is the transaction of the current contract."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"transaction")," is the oracle transaction that triggered the contract.")),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Action's Appendix 1")," for the details of the transaction map."),(0,i.kt)("h3",{id:"examples-2"},"Examples"),(0,i.kt)("p",null,"Pass only if the transaction's content is a JSON string including the UCO price in USD."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition triggered_by: oracle, as: [\n content: Json.path_match?(transaction.content, "$.uco.usd")\n]\n')),(0,i.kt)("h2",{id:"legacy-syntax"},"Legacy syntax"),(0,i.kt)("admonition",{title:"Deprecated",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"The syntax still works, but we'd like everyone to use the new syntax.")),(0,i.kt)("p",null,"The condition ",(0,i.kt)("inlineCode",{parentName:"p"},"oracle")," & ",(0,i.kt)("inlineCode",{parentName:"p"},"transaction")," used to have the same syntax as ",(0,i.kt)("inlineCode",{parentName:"p"},"inherit"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition transaction: [...]\ncondition oracle: [...]\n")))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/b2e52e63.d800e444.js b/assets/js/b2e52e63.d800e444.js deleted file mode 100644 index 2ac6861c7..000000000 --- a/assets/js/b2e52e63.d800e444.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1938],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),m=i,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||o;return n?a.createElement(h,r(r({ref:t},p),{},{components:n})):a.createElement(h,r({ref:t},p))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:i,r[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"condition",title:"Smart Contracts - Condition block",sidebar_label:"Condition",sidebar_position:2},r=void 0,s={unversionedId:"build/smart-contracts/language/condition",id:"build/smart-contracts/language/condition",title:"Smart Contracts - Condition block",description:"Conditions are blocks which purpose is to check the validity of a transaction.",source:"@site/docs/build/smart-contracts/language/condition.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/condition",permalink:"/build/smart-contracts/language/condition",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:2,frontMatter:{id:"condition",title:"Smart Contracts - Condition block",sidebar_label:"Condition",sidebar_position:2},sidebar:"docs",previous:{title:"Triggers",permalink:"/build/smart-contracts/language/triggers"},next:{title:"Actions",permalink:"/build/smart-contracts/language/actions"}},l={},c=[{value:"Rules",id:"rules",level:2},{value:"Condition inherit",id:"condition-inherit",level:2},{value:"Examples",id:"examples",level:3},{value:"Condition transaction",id:"condition-transaction",level:2},{value:"Examples",id:"examples-1",level:3},{value:"Condition oracle",id:"condition-oracle",level:2},{value:"Examples",id:"examples-2",level:3},{value:"Legacy syntax",id:"legacy-syntax",level:2}],p={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Conditions are blocks which purpose is to check the validity of a transaction. "),(0,i.kt)("p",null,"There are 3 types of ",(0,i.kt)("inlineCode",{parentName:"p"},"condition")," block: "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#condition-inherit"},"inherit")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#condition-transaction"},"transaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#condition-oracle"},"oracle"))),(0,i.kt)("p",null,'The condition blocks are not code block, they are maps of what we call "boolean expressions". '),(0,i.kt)("p",null,"In this map, the keys are the transaction property, and the values are expressions that must return a boolean or a value."),(0,i.kt)("p",null,"Conditions ",(0,i.kt)("inlineCode",{parentName:"p"},"transaction")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"oracle")," are mandatory if the associated trigger is used. Condition ",(0,i.kt)("inlineCode",{parentName:"p"},"inherit")," is optional."),(0,i.kt)("p",null,"Pseudo-code:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: , as: [\n : ,\n : ,\n : ,\n : \n]\n\n# note the syntax is a bit different for the inherit\ncondition inherit: [\n : ,\n : ,\n : ,\n : \n]\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"type")," is either ",(0,i.kt)("inlineCode",{parentName:"li"},"transaction")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"oracle"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"prop")," is a property of the transaction or ",(0,i.kt)("inlineCode",{parentName:"li"},"origin_family"),". See ",(0,i.kt)("a",{parentName:"li",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Action's Appendix 1")," for the available properties."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"expr")," is a code expression.")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"If you wish use a complex expression for condition property. You can use multi-lines block enclosed by parenthesis"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition transaction: [\n content: (\n # Complex logic\n # ...\n )\n]\n"))),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition inherit: [\n # \n type: "contract",\n\n # \n content: true,\n\n # \n code:\n if Time.now() > 1677572714 do\n "condition inherit: []"\n else\n previous.code\n end,\n\n # \n uco_transfers: Map.size() > 0\n]\n')),(0,i.kt)("h2",{id:"rules"},"Rules"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("strong",{parentName:"li"},'All "boolean expressions" must pass for the transaction to be valid.')),(0,i.kt)("li",{parentName:"ol"},'If the expression returns true, this "boolean expression" passes.'),(0,i.kt)("li",{parentName:"ol"},'If the expression returns false, this "boolean expression" fails.'),(0,i.kt)("li",{parentName:"ol"},'If the expression returns a value, this "boolean expression" passes if the transaction\'s property has the same value.')),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"In these blocks, there is also some sugar to automatically add the property as an argument of the functions called. For example ",(0,i.kt)("inlineCode",{parentName:"p"},"uco_transfers: Map.size() > 0")," will automatically expand to ",(0,i.kt)("inlineCode",{parentName:"p"},"uco_transfers: Map.size(transaction.uco_transfers) > 0"),".")),(0,i.kt)("h2",{id:"condition-inherit"},"Condition inherit"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition inherit")," purpose is to check the next transaction generated by the smart contract after its code execution. It ensures the next transaction respects specific rules so the smart contract chain cannot be compromised."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition inherit: [...]\n")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If the map is empty ",(0,i.kt)("inlineCode",{parentName:"p"},"[]"),", it means the transaction chain is closed: no transaction will be accepted anymore.")),(0,i.kt)("p",null,"There are 2 global variables for this condition block:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"previous")," is the transaction of the current contract."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"next"),' is the "next transaction".')),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Action's Appendix 1")," for the details of the transaction map."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"A specific rule is applied for inherit condition, if a field is not specified in the conditions, it assumes that it must have the same value as the previous transaction. ie. ",(0,i.kt)("inlineCode",{parentName:"p"},"code: previous.code == next.code"))),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Pass only if it is executed before a timestamp:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition inherit: [\n timestamp: next.timestamp < 1677598185\n]\n")),(0,i.kt)("p",null,'Pass only if the transaction is type "transfer", without any uco_transfers and at least one token_transfers:'),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition inherit: [\n type: "transfer",\n uco_transfers: Map.size() == 0,\n token_transfers: Map.size() > 0\n]\n')),(0,i.kt)("p",null,"Pass only if chain has been closed (the code part) and there is a 2 UCO transfer to an address depending on the time:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition inherit: [\n code: "condition inherit: []",\n uco_transfers: \n if Time.now() >= 1674564088 do\n ["00003bafdfb7a8e66b59de5692b79088063853bbd69a7d555faec906e6215e57ff98": 2]\n else\n ["0000ba28ce06631ff2ef4fe3dc89a34be13c0d252f8952bbfa3173b03dbef3c04afd": 2]\n end\n]\n')),(0,i.kt)("p",null,'Pass only if the key "index" of the content is greater than the previous one:'),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'# Note that we have to embed a block code inside parenthesis as we create complex code \n# like create/assign variables with multilines conditions statements\ncondition inherit: [\n content: (\n json_path = "$.index"\n if Json.path_match?(next.content, json_path) do\n previous_index = Json.path_extract(previous.content, json_path)\n new_index = Json.path_extract(next.content, json_path)\n\n new_index > previous_index\n else\n false\n end\n )\n]\n')),(0,i.kt)("h2",{id:"condition-transaction"},"Condition transaction"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition transaction")," purpose is to check the transaction that triggered the contract (a transaction with the contract address in the recipients)."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: transaction, as: [...]\n")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If the map is empty ",(0,i.kt)("inlineCode",{parentName:"p"},"[]"),", it means any transaction can trigger the contract.")),(0,i.kt)("p",null,"There are 2 global variables for this condition block:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"contract")," is the transaction of the current contract."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"transaction")," is the transaction that triggered the contract.")),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Action's Appendix 1")," for the details of the transaction map."),(0,i.kt)("h3",{id:"examples-1"},"Examples"),(0,i.kt)("p",null,"Pass only if the transaction that triggered the contract comes from a specific chain (a chain can be identified by it's genesis address):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: transaction, as: [\n address: Chain.get_genesis_address() == 0x00001234ab\n]\n")),(0,i.kt)("p",null,"Pass only if the transaction that triggered sent 10 UCOs to this contract:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: transaction, as: [\n uco_transfers: Map.get(contract.address) == 10\n]\n")),(0,i.kt)("p",null,"Pass only if the candidate is in the list:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition triggered_by: transaction, on: vote(candidate), as: [\n content: List.in?(["Peter", "Sofia", "Claire"], candidate)\n]\n')),(0,i.kt)("admonition",{title:"Did you notice?",type:"info"},(0,i.kt)("p",{parentName:"admonition"},"We wrote the expression in the ",(0,i.kt)("inlineCode",{parentName:"p"},"content"),' and we did not use this field. We\'ll soon introduce a new syntax to avoid this "hack".')),(0,i.kt)("h2",{id:"condition-oracle"},"Condition oracle"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"condition oracle")," purpose is to check the oracle transaction that triggered the contract."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition triggered_by: oracle, as: [...]\n")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If the map is empty ",(0,i.kt)("inlineCode",{parentName:"p"},"[]"),", it means any transaction can trigger the contract.")),(0,i.kt)("p",null,"There are 2 global variables for this condition block:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"contract")," is the transaction of the current contract."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"transaction")," is the oracle transaction that triggered the contract.")),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Action's Appendix 1")," for the details of the transaction map."),(0,i.kt)("h3",{id:"examples-2"},"Examples"),(0,i.kt)("p",null,"Pass only if the transaction's content is a JSON string including the UCO price in USD."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},'condition triggered_by: oracle, as: [\n content: Json.path_match?(transaction.content, "$.uco.usd")\n]\n')),(0,i.kt)("h2",{id:"legacy-syntax"},"Legacy syntax"),(0,i.kt)("admonition",{title:"Deprecated",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"The syntax still works, but we'd like everyone to use the new syntax.")),(0,i.kt)("p",null,"The condition ",(0,i.kt)("inlineCode",{parentName:"p"},"oracle")," & ",(0,i.kt)("inlineCode",{parentName:"p"},"transaction")," used to have the same syntax as ",(0,i.kt)("inlineCode",{parentName:"p"},"inherit"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-elixir"},"condition transaction: [...]\ncondition oracle: [...]\n")))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/b4914bc5.62ee6a28.js b/assets/js/b4914bc5.65bb66bc.js similarity index 53% rename from assets/js/b4914bc5.62ee6a28.js rename to assets/js/b4914bc5.65bb66bc.js index 281b28855..e3eda6d0e 100644 --- a/assets/js/b4914bc5.62ee6a28.js +++ b/assets/js/b4914bc5.65bb66bc.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8959],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=s(n),f=o,h=d["".concat(c,".").concat(f)]||d[f]||p[f]||i;return n?r.createElement(h,a(a({ref:t},u),{},{components:n})):r.createElement(h,a({ref:t},u))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[d]="string"==typeof e?e:o,a[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(87462),o=(n(67294),n(3905));n(8209);const i={id:"transaction-context",title:"Transaction context retrieval"},a=void 0,l={unversionedId:"build/core/mining/transaction-context",id:"build/core/mining/transaction-context",title:"Transaction context retrieval",description:"When a transaction is under validation, after the pending transaction validation, the nodes are fetching the context of the transaction.",source:"@site/docs/build/core/mining/transaction-context.md",sourceDirName:"build/core/mining",slug:"/build/core/mining/transaction-context",permalink:"/build/core/mining/transaction-context",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-context",title:"Transaction context retrieval"},sidebar:"docs",previous:{title:"Proof of Work algorithm",permalink:"/build/core/mining/proof-of-work"},next:{title:"OracleChain",permalink:"/build/core/oracle-chain/"}},c={},s=[{value:"Retrieval",id:"retrieval",level:2},{value:"Node distribution",id:"node-distribution",level:2}],u={toc:s},d="wrapper";function p(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"When a transaction is under validation, after the ",(0,o.kt)("a",{parentName:"p",href:"/build/core/mining/transaction-validation"},"pending transaction validation"),", the nodes are fetching the context of the transaction."),(0,o.kt)("h2",{id:"retrieval"},"Retrieval"),(0,o.kt)("p",null,"This retrieval include multiple queries to be able to perform an efficient validation:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Get the previous transaction"),(0,o.kt)("li",{parentName:"ul"},"Get the unspent outputs"),(0,o.kt)("li",{parentName:"ul"},"Get the P2P view of the storage nodes (chain and beacon)")),(0,o.kt)("p",null,"All of thoses queries happen concurrently making efficient the transaction validation."),(0,o.kt)("p",null,"To be sure the data is fetched faster, an algorithm is provided to first target the closest nodes from the validation node but\nalso ensure the if node fails to respond, other nodes will take the relay."),(0,o.kt)("p",null,"However, if for the P2P view query, some node doesn't respond in a timeframe, it will be considered as offline, and through aggregation during the replication tree creation, this node will not receive replication request"),(0,o.kt)("h2",{id:"node-distribution"},"Node distribution"),(0,o.kt)("p",null,"To be sure all the validation will get the best of this retrieval, an algorithm have been developed to ensure a fair distribution of the nodes invovled in those queries."),(0,o.kt)("p",null,"The storage nodes for the previous chain are split into 2 group: previous transaction and unspent outputs"),(0,o.kt)("p",null,"This way a given node will get several responses ensuring the atomic commitment of the transaction."),(0,o.kt)("p",null,"The algorithm defines the number of group to have and the number of nodes in each group."),(0,o.kt)("p",null,"Also it balances the groups to be sure a group have the same number of node without duplication"))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8959],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=s(n),f=o,h=d["".concat(c,".").concat(f)]||d[f]||p[f]||i;return n?r.createElement(h,a(a({ref:t},u),{},{components:n})):r.createElement(h,a({ref:t},u))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[d]="string"==typeof e?e:o,a[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(87462),o=(n(67294),n(3905));n(8209);const i={id:"transaction-context",title:"Transaction context retrieval"},a=void 0,l={unversionedId:"build/core/mining/transaction-context",id:"build/core/mining/transaction-context",title:"Transaction context retrieval",description:"When a transaction is under validation, after the pending transaction validation, the nodes are fetching the context of the transaction.",source:"@site/docs/build/core/mining/transaction-context.md",sourceDirName:"build/core/mining",slug:"/build/core/mining/transaction-context",permalink:"/build/core/mining/transaction-context",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-context",title:"Transaction context retrieval"},sidebar:"docs",previous:{title:"Proof of Work algorithm",permalink:"/build/core/mining/proof-of-work"},next:{title:"OracleChain",permalink:"/build/core/oracle-chain/"}},c={},s=[{value:"Retrieval",id:"retrieval",level:2},{value:"Node distribution",id:"node-distribution",level:2}],u={toc:s},d="wrapper";function p(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"When a transaction is under validation, after the ",(0,o.kt)("a",{parentName:"p",href:"/build/core/mining/transaction-validation"},"pending transaction validation"),", the nodes are fetching the context of the transaction."),(0,o.kt)("h2",{id:"retrieval"},"Retrieval"),(0,o.kt)("p",null,"This retrieval include multiple queries to be able to perform an efficient validation:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Get the previous transaction"),(0,o.kt)("li",{parentName:"ul"},"Get the unspent outputs"),(0,o.kt)("li",{parentName:"ul"},"Get the P2P view of the storage nodes (chain and beacon)")),(0,o.kt)("p",null,"All of thoses queries happen concurrently making efficient the transaction validation."),(0,o.kt)("p",null,"To be sure the data is fetched faster, an algorithm is provided to first target the closest nodes from the validation node but\nalso ensure the if node fails to respond, other nodes will take the relay."),(0,o.kt)("p",null,"However, if for the P2P view query, some node doesn't respond in a timeframe, it will be considered as offline, and through aggregation during the replication tree creation, this node will not receive replication request"),(0,o.kt)("h2",{id:"node-distribution"},"Node distribution"),(0,o.kt)("p",null,"To be sure all the validation will get the best of this retrieval, an algorithm have been developed to ensure a fair distribution of the nodes invovled in those queries."),(0,o.kt)("p",null,"The storage nodes for the previous chain are split into 2 group: previous transaction and unspent outputs"),(0,o.kt)("p",null,"This way a given node will get several responses ensuring the atomic commitment of the transaction."),(0,o.kt)("p",null,"The algorithm defines the number of group to have and the number of nodes in each group."),(0,o.kt)("p",null,"Also it balances the groups to be sure a group have the same number of node without duplication"))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/b5651cae.f310b3ab.js b/assets/js/b5651cae.f310b3ab.js deleted file mode 100644 index e3e0ba6b5..000000000 --- a/assets/js/b5651cae.f310b3ab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1855],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>c});var n=a(67294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var s=n.createContext({}),d=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},p=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=d(a),m=l,c=u["".concat(s,".").concat(m)]||u[m]||k[m]||i;return a?n.createElement(c,r(r({ref:t},p),{},{components:a})):n.createElement(c,r({ref:t},p))}));function c(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=a.length,r=new Array(i);r[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:l,r[1]=o;for(var d=2;d{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>k,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var n=a(87462),l=(a(67294),a(3905));a(8209);const i={id:"library",title:"Smart Contracts - Library",sidebar_label:"Library",sidebar_position:4},r=void 0,o={unversionedId:"build/smart-contracts/language/library",id:"build/smart-contracts/language/library",title:"Smart Contracts - Library",description:"The Smart Contract library is composed of many modules with many functions in each.",source:"@site/docs/build/smart-contracts/language/library.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/library",permalink:"/build/smart-contracts/language/library",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:4,frontMatter:{id:"library",title:"Smart Contracts - Library",sidebar_label:"Library",sidebar_position:4},sidebar:"docs",previous:{title:"Actions",permalink:"/build/smart-contracts/language/actions"},next:{title:"Examples",permalink:"/build/smart-contracts/language/examples"}},s={},d=[{value:"String",id:"string",level:2},{value:"size/1",id:"size1",level:3},{value:"in?/2",id:"in2",level:3},{value:"to_number/1",id:"to_number1",level:3},{value:"from_number/1",id:"from_number1",level:3},{value:"to_hex/1",id:"to_hex1",level:3},{value:"to_uppercase/1",id:"to_uppercase1",level:3},{value:"to_lowercase/1",id:"to_lowercase1",level:3},{value:"Map",id:"map",level:2},{value:"new/0",id:"new0",level:3},{value:"size/1",id:"size1-1",level:3},{value:"get/2",id:"get2",level:3},{value:"get/3",id:"get3",level:3},{value:"set/3",id:"set3",level:3},{value:"keys/1",id:"keys1",level:3},{value:"values/1",id:"values1",level:3},{value:"delete/2",id:"delete2",level:3},{value:"List",id:"list",level:2},{value:"at/2",id:"at2",level:3},{value:"size/1",id:"size1-2",level:3},{value:"in?/2",id:"in2-1",level:3},{value:"empty?/1",id:"empty1",level:3},{value:"concat/2",id:"concat2",level:3},{value:"append/2",id:"append2",level:3},{value:"prepend/2",id:"prepend2",level:3},{value:"join/2",id:"join2",level:3},{value:"Regex",id:"regex",level:2},{value:"extract/2",id:"extract2",level:3},{value:"match?/2",id:"match2",level:3},{value:"scan/2",id:"scan2",level:3},{value:"Json",id:"json",level:2},{value:"path_extract/2",id:"path_extract2",level:3},{value:"path_match?/2",id:"path_match2",level:3},{value:"to_string/1",id:"to_string1",level:3},{value:"parse/1",id:"parse1",level:3},{value:"is_valid?/1",id:"is_valid1",level:3},{value:"Time",id:"time",level:2},{value:"now/0",id:"now0",level:3},{value:"Chain",id:"chain",level:2},{value:"get_genesis_address/1 [I/O]",id:"get_genesis_address1-io",level:3},{value:"get_first_transaction_address/1 [I/O]",id:"get_first_transaction_address1-io",level:3},{value:"get_genesis_public_key/1 [I/O]",id:"get_genesis_public_key1-io",level:3},{value:"get_burn_address/0",id:"get_burn_address0",level:3},{value:"get_transaction/1 [I/O]",id:"get_transaction1--io",level:3},{value:"get_last_address/1 [I/O]",id:"get_last_address1-io",level:3},{value:"get_last_transaction/1 [I/O]",id:"get_last_transaction1-io",level:3},{value:"get_previous_address/1",id:"get_previous_address1",level:3},{value:"get_balance/1 [I/O]",id:"get_balance1-io",level:3},{value:"get_uco_balance/1 [I/O]",id:"get_uco_balance1-io",level:3},{value:"get_token_balance/2 [I/O]",id:"get_token_balance2-io",level:3},{value:"get_token_balance/3 [I/O]",id:"get_token_balance3-io",level:3},{value:"get_tokens_balance/1 [I/O]",id:"get_tokens_balance1-io",level:3},{value:"get_tokens_balance/2 [I/O]",id:"get_tokens_balance2-io",level:3},{value:"Crypto",id:"crypto",level:2},{value:"hash/1",id:"hash1",level:3},{value:"hash/2",id:"hash2",level:3},{value:"hmac/1",id:"hmac1",level:3},{value:"hmac/2",id:"hmac2",level:3},{value:"hmac/3",id:"hmac3",level:3},{value:"sign_with_recovery/1",id:"sign_with_recovery1",level:3},{value:"Token",id:"token",level:2},{value:"fetch_id_from_address/1 [I/O]",id:"fetch_id_from_address1-io",level:3},{value:"Code",id:"code",level:2},{value:"is_same?/2",id:"is_same2",level:3},{value:"is_valid?/1",id:"is_valid1-1",level:3},{value:"Math",id:"math",level:2},{value:"pow/2",id:"pow2",level:3},{value:"trunc/1",id:"trunc1",level:3},{value:"sqrt/1",id:"sqrt1",level:3},{value:"rem/2",id:"rem2",level:3},{value:"Http",id:"http",level:2},{value:"request/1 [I/O]",id:"request1-io",level:3},{value:"request/2 [I/O]",id:"request2-io",level:3},{value:"request/3 [I/O]",id:"request3-io",level:3},{value:"request/4 [I/O]",id:"request4-io",level:3},{value:"request_many/1 [I/O]",id:"request_many1-io",level:3},{value:"Contract",id:"contract",level:2},{value:"call_function/3 [I/O]",id:"call_function3-io",level:3},{value:"set_type/1 [Transaction]",id:"set_type1-transaction",level:3},{value:"set_content/1 [Transaction]",id:"set_content1-transaction",level:3},{value:"set_code/1 [Transaction]",id:"set_code1-transaction",level:3},{value:"add_uco_transfer/1 [Transaction]",id:"add_uco_transfer1-transaction",level:3},{value:"add_uco_transfers/1 [Transaction]",id:"add_uco_transfers1-transaction",level:3},{value:"add_token_transfer/1 [Transaction]",id:"add_token_transfer1-transaction",level:3},{value:"add_token_transfers/1 [Transaction]",id:"add_token_transfers1-transaction",level:3},{value:"add_ownership/1 [Transaction]",id:"add_ownership1-transaction",level:3},{value:"add_ownerships/1 [Transaction]",id:"add_ownerships1-transaction",level:3},{value:"add_recipient/1 [Transaction]",id:"add_recipient1-transaction",level:3},{value:"add_recipients/1 [Transaction]",id:"add_recipients1-transaction",level:3},{value:"Evm",id:"evm",level:2},{value:"abi_encode/2",id:"abi_encode2",level:3},{value:"abi_decode/2",id:"abi_decode2",level:3}],p={toc:d},u="wrapper";function k(e){let{components:t,...a}=e;return(0,l.kt)(u,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"The Smart Contract library is composed of many modules with many functions in each.\n",(0,l.kt)("strong",{parentName:"p"},"Unless it is explicitely written, the functions will not mutate their arguments"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"# Don't\nsold_items = [1,2,3]\nList.concat(sold_items, [4,5,6])\n\n# Do\nsold_items = [1,2,3]\nsold_items = List.concat(sold_items, [4,5,6])\n")),(0,l.kt)("admonition",{title:"function/arity",type:"note"},(0,l.kt)("p",{parentName:"admonition"},"In this page, the number after the slash indicates the arity of the function (number or arguments)."),(0,l.kt)("p",{parentName:"admonition"},"For example ",(0,l.kt)("inlineCode",{parentName:"p"},"size/1")," means the function ",(0,l.kt)("inlineCode",{parentName:"p"},"size")," has 1 argument.")),(0,l.kt)("admonition",{title:"Tagged functions",type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Functions are tagged as ",(0,l.kt)("inlineCode",{parentName:"p"},"[Transaction]")," are special:"),(0,l.kt)("ul",{parentName:"admonition"},(0,l.kt)("li",{parentName:"ul"},"They are only available in the ",(0,l.kt)("inlineCode",{parentName:"li"},"actions")," block."),(0,l.kt)("li",{parentName:"ul"},'They mutate an internal state, the "next transaction".'),(0,l.kt)("li",{parentName:"ul"},'This "next transaction" is initiated with current contract (all values but transfers are copied)')),(0,l.kt)("p",{parentName:"admonition"},"Other functions are tagged as ",(0,l.kt)("inlineCode",{parentName:"p"},"[I/O]")," and help to fetch data making network calls by either:"),(0,l.kt)("ul",{parentName:"admonition"},(0,l.kt)("li",{parentName:"ul"},"requesting Archethic"),(0,l.kt)("li",{parentName:"ul"},"requesting the outside world"))),(0,l.kt)("h2",{id:"string"},"String"),(0,l.kt)("h3",{id:"size1"},"size/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.size("hello") # 5\nString.size("\u4f60\u597d") # 2\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Returns the number of characters in ",(0,l.kt)("inlineCode",{parentName:"p"},"str"),"."),(0,l.kt)("h3",{id:"in2"},"in?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.in?("bob,alice,julia", "alice") # true\nString.in?("bob,alice,julia", "fred") # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str1")," the haystack"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str2")," the needle")),(0,l.kt)("p",null,"Returns whether the ",(0,l.kt)("inlineCode",{parentName:"p"},"needle")," is in the ",(0,l.kt)("inlineCode",{parentName:"p"},"haystack"),"."),(0,l.kt)("h3",{id:"to_number1"},"to_number/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.to_number("12") # 12\nString.to_number("-12") # -12\nString.to_number("12.1") # 12.1\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Returns the number which text representation is ",(0,l.kt)("inlineCode",{parentName:"p"},"str"),"."),(0,l.kt)("h3",{id:"from_number1"},"from_number/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.from_number(13) # "13"\nString.from_number(13.2) # "13.2"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"number")," the number")),(0,l.kt)("p",null,"Returns the text representation of ",(0,l.kt)("inlineCode",{parentName:"p"},"number"),"."),(0,l.kt)("h3",{id:"to_hex1"},"to_hex/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.to_hex("592ac76afa") # "592AC76AFA"\nString.to_hex("592AC76AFA") # "592AC76AFA"\nString.to_hex("hello") # "68656C6C6F"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Return the text representation of hexadecimal ",(0,l.kt)("inlineCode",{parentName:"p"},"str"),".\nIf ",(0,l.kt)("inlineCode",{parentName:"p"},"str")," is already an hex it just uppercase it"),(0,l.kt)("h3",{id:"to_uppercase1"},"to_uppercase/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.to_uppercase("Ars\xe8ne Lupin") # "ARS\xc8NE LUPIN"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Return the ",(0,l.kt)("inlineCode",{parentName:"p"},"str")," in uppercase."),(0,l.kt)("h3",{id:"to_lowercase1"},"to_lowercase/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.to_lowercase("Sherlock Holmes") # "sherlock holmes"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Return the ",(0,l.kt)("inlineCode",{parentName:"p"},"str")," in lowercase."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"map"},"Map"),(0,l.kt)("h3",{id:"new0"},"new/0"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Map.new() # empty map\n")),(0,l.kt)("p",null,"Returns an empty map. There is no shorthand notation."),(0,l.kt)("h3",{id:"size1-1"},"size/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.size(key1: "value", key2: "value2") # 2\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map")),(0,l.kt)("p",null,"Returns the number of keys in ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("h3",{id:"get2"},"get/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.get([key1: "value", key2: "value2"], "key1") # "value"\nMap.get([key1: "value", key2: "value2"], "key3") # nil\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key")),(0,l.kt)("p",null,"Returns the value at ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"map")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"nil")," if ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," is not in the ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"There is a shorthand notation ",(0,l.kt)("inlineCode",{parentName:"p"},"map.key")," when key is not a variable.")),(0,l.kt)("h3",{id:"get3"},"get/3"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.get([key1: "value", key2: "value2"], "key1", "not in map") # "value"\nMap.get([key1: "value", key2: "value2"], "key3", "not in map") # "not in map"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"default")," the default value")),(0,l.kt)("p",null,"Returns the value at ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"map")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," if ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," is not in the ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("h3",{id:"set3"},"set/3"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.set([key1: "value", key2: "value2"], "key1", "valueX") # [key1: "valueX", key2: "value2"]\nMap.get([key1: "value", key2: "value2"], "key3", "value3") # [key1: "value", key2: "value2, key3: "value3"]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"value")," the value to set")),(0,l.kt)("p",null,"Returns a copy of ",(0,l.kt)("inlineCode",{parentName:"p"},"map")," where the value at ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"value"),"."),(0,l.kt)("h3",{id:"keys1"},"keys/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.keys(key1: "value", key2: "value2") # ["key1", "key2"]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map")),(0,l.kt)("p",null,"Returns the list of keys in ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"Use it with a ",(0,l.kt)("inlineCode",{parentName:"p"},"for loop")," to iterate on a map!"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre"},"for key in Map.keys(map) do\n ...\n value = map[key]\n ...\nend\n"))),(0,l.kt)("h3",{id:"values1"},"values/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.values(key1: "value", key2: "value2") # ["value", "value2"]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map")),(0,l.kt)("p",null,"Returns the list of values in ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("h3",{id:"delete2"},"delete/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.delete([key1: "value", key2: "value2"], "key2") # [key1: "value"]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key to remove")),(0,l.kt)("p",null,"Returns a copy of the ",(0,l.kt)("inlineCode",{parentName:"p"},"map")," without the value at given ",(0,l.kt)("inlineCode",{parentName:"p"},"key"),"."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"list"},"List"),(0,l.kt)("p",null,"Lists are actually ",(0,l.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Linked_list"},"Linked List"),"."),(0,l.kt)("h3",{id:"at2"},"at/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'List.at(["a", "b", "c"], 0) # "a"\nList.at(["a", "b", "c"], 1) # "b"\nList.at(["a", "b", "c"], 2) # "c"\nList.at([], 0) # nil\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"index")," the index (zero-based)")),(0,l.kt)("p",null,"Returns the element at ",(0,l.kt)("inlineCode",{parentName:"p"},"index")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"."),(0,l.kt)("h3",{id:"size1-2"},"size/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"List.size([]) # 0\nList.size([1,2,3,4]) # 4\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list")),(0,l.kt)("p",null,"Returns the number of keys in ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"."),(0,l.kt)("h3",{id:"in2-1"},"in?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'List.in?(["bob", "alice"], "alice") # true\nList.in?(["bob", "alice"], "fred") # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the haystack"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"element")," the needle")),(0,l.kt)("p",null,"Returns whether the ",(0,l.kt)("inlineCode",{parentName:"p"},"needle")," is in the ",(0,l.kt)("inlineCode",{parentName:"p"},"haystack"),"."),(0,l.kt)("h3",{id:"empty1"},"empty?/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'List.empty?([]) # true\nList.empty?(["apple"]) # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list")),(0,l.kt)("p",null,"Returns whether the ",(0,l.kt)("inlineCode",{parentName:"p"},"list")," is empty or not."),(0,l.kt)("h3",{id:"concat2"},"concat/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"List.concat([], []) # []\nList.concat([1,2], [3,4]) # [1,2,3,4]\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list1")," a list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list2")," another list")),(0,l.kt)("p",null,"Returns a new list where ",(0,l.kt)("inlineCode",{parentName:"p"},"list2")," is concatenated to ",(0,l.kt)("inlineCode",{parentName:"p"},"list1"),"."),(0,l.kt)("h3",{id:"append2"},"append/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"List.append([], 1) # [1]\nList.append([1], 2) # [1,2]\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"element")," the element")),(0,l.kt)("p",null,"Returns a new list where ",(0,l.kt)("inlineCode",{parentName:"p"},"element")," is appended to the end of ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"If order doesn't matter, we suggest to use ",(0,l.kt)("inlineCode",{parentName:"p"},"prepend/2")," instead (Complexity: O(1) instead of O(n)).")),(0,l.kt)("h3",{id:"prepend2"},"prepend/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"List.prepend([], 1) # [1]\nList.prepend([1], 0) # [0,1]\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"element")," the element")),(0,l.kt)("p",null,"Returns a new list where ",(0,l.kt)("inlineCode",{parentName:"p"},"element")," is appended to the start of ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"."),(0,l.kt)("h3",{id:"join2"},"join/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'List.join([], ", ") # ""\nList.join(["Mike", "Robert", "Joe"], ", ") # "Mike, Robert, Joe"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list of strings"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"separator")," the separator")),(0,l.kt)("p",null,"Returns a string where all ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"'s elements have been joined with ",(0,l.kt)("inlineCode",{parentName:"p"},"separator")," separator."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"regex"},"Regex"),(0,l.kt)("h3",{id:"extract2"},"extract/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Regex.extract("123456abc", "[0-9]+") # "123456"\nRegex.extract("voodoo", "[abc]") # ""\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"text")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pattern")," the element")),(0,l.kt)("p",null,"Returns the data from ",(0,l.kt)("inlineCode",{parentName:"p"},"text")," extract via the regex ",(0,l.kt)("inlineCode",{parentName:"p"},"pattern"),"."),(0,l.kt)("h3",{id:"match2"},"match?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Regex.match?("123456", "^[0-9]+$") # true\nRegex.match?("123456abc", "^[0-9]+$") # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"text")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pattern")," the element")),(0,l.kt)("p",null,"Returns whether the ",(0,l.kt)("inlineCode",{parentName:"p"},"pattern")," matches the ",(0,l.kt)("inlineCode",{parentName:"p"},"text")," or not."),(0,l.kt)("h3",{id:"scan2"},"scan/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Regex.scan("foo", "bar") # []\nRegex.scan("toto,123\\ntutu,456\\n", "toto,([0-9]+)") # ["123"]\nRegex.scan("toto,123\\ntutu,456\\n", "t.t.,([0-9]+)") # ["123", "456"]\nRegex.scan("A0B1C2,123\\nD3E4F5,456\\n", "^(\\\\w+),(\\\\d+)$") # [["A0B1C2", "123"], ["D3E4F5", "456"]]\n\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"text")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pattern")," the element")),(0,l.kt)("p",null,"Returns the data from ",(0,l.kt)("inlineCode",{parentName:"p"},"text")," extract via the regex ",(0,l.kt)("inlineCode",{parentName:"p"},"pattern"),"."),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"This function requires the usage of capture groups (subexpressions).")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"json"},"Json"),(0,l.kt)("p",null,"Functions to manipulate JSON strings."),(0,l.kt)("p",null,"Useful resources:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://goessner.net/articles/JsonPath/"},"JSONPath documentation"))),(0,l.kt)("h3",{id:"path_extract2"},"path_extract/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.path_extract("{ \\"firstName\\": \\"John\\", \\"lastName\\": \\"Doe\\"}", "$.firstName") # "John"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json")," the json string"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"path")," the path")),(0,l.kt)("p",null,"Returns the data at ",(0,l.kt)("inlineCode",{parentName:"p"},"path")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"json"),"."),(0,l.kt)("h3",{id:"path_match2"},"path_match?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.path_match?("{\\"1622541930\\":{\\"uco\\":{\\"eur\\":0.176922,\\"usd\\":0.21642}}}", "$.*.uco.usd") # true\nJson.path_match?("{\\"1622541930\\":{\\"uco\\":{\\"eur\\":0.176922,\\"usd\\":0.21642}}}", "$.*.uco.aud") # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json")," the json string"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"path")," the path")),(0,l.kt)("p",null,"Returns if there is a value at ",(0,l.kt)("inlineCode",{parentName:"p"},"path")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"json"),"."),(0,l.kt)("h3",{id:"to_string1"},"to_string/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.to_string(1) # "1"\nJson.to_string("str") # "\\"str\\""\nJson.to_string([1,2,3]) # "[1,2,3]"\nJson.to_string(foo: "bar") # "{\\"foo\\":\\"bar\\"}"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"any")," anything")),(0,l.kt)("p",null,"Returns the Json representation of ",(0,l.kt)("inlineCode",{parentName:"p"},"any"),"."),(0,l.kt)("h3",{id:"parse1"},"parse/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.parse("1") # "1"\nJson.parse("\\"str\\"") # "str"\nJson.parse("[1,2,3]") # [1,2,3]\nJson.parse("{\\"foo\\":\\"bar\\"}") # foo: "bar"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json")," the json string")),(0,l.kt)("p",null,"Returns the value represented by ",(0,l.kt)("inlineCode",{parentName:"p"},"json"),"."),(0,l.kt)("h3",{id:"is_valid1"},"is_valid?/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.is_valid?("str") # false\nJson.is_valid?("\\"str\\"") # true\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json")," the json string")),(0,l.kt)("p",null,"Returns whether the string is valid JSON or not."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"time"},"Time"),(0,l.kt)("h3",{id:"now0"},"now/0"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Time.now() # 1677493444\n")),(0,l.kt)("p",null,"Returns an approximation of current time (seconds since epoch).\n",(0,l.kt)("strong",{parentName:"p"},"It will always return the same value within a contract.")),(0,l.kt)("admonition",{title:"Why an approximation?",type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Because we need the smart contracts to be determinist.\nMany nodes will run them and all of them must produce the same transaction to validate a contract's execution.")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"chain"},"Chain"),(0,l.kt)("h3",{id:"get_genesis_address1-io"},"get_genesis_address/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_genesis_address("000012345...") # "000056789..."\nChain.get_genesis_address("000012345...") # "000012345..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the genesis address of the transaction chain that contains a transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),". If there is no transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),", it returns ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("h3",{id:"get_first_transaction_address1-io"},"get_first_transaction_address/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_first_transaction_address("000012345...") # "000056789..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the address of the first transaction of the transaction chain that contains a transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("admonition",{type:"danger"},(0,l.kt)("p",{parentName:"admonition"},"[IT CURRENTLY CRASH IF THERE IS NO TRANSACTION]")),(0,l.kt)("h3",{id:"get_genesis_public_key1-io"},"get_genesis_public_key/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_genesis_public_key("00013B08D...") # "000108A5C..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"public_key")," the public key")),(0,l.kt)("p",null,"Returns the genesis public key of ",(0,l.kt)("inlineCode",{parentName:"p"},"public_key"),"."),(0,l.kt)("h3",{id:"get_burn_address0"},"get_burn_address/0"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_burn_address() # "0000000000..."\n')),(0,l.kt)("p",null,"Returns the burn address."),(0,l.kt)("h3",{id:"get_transaction1--io"},"get_transaction/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_transaction(0x00ABCD..) # [address: "00ABCD..", content: "...", uco_transfers: [], ...]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),". If there is no transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),", it returns ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),". See ",(0,l.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Appendix 1"),"."),(0,l.kt)("h3",{id:"get_last_address1-io"},"get_last_address/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_last_address(0x00ABCD..) # "00EFAB..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the latest transaction address of the chain that contains ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("h3",{id:"get_last_transaction1-io"},"get_last_transaction/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_last_transaction(0x00ABCD..) # [address: "00EFAB..", content: "...", uco_transfers: [], ...]\nChain.get_last_transaction(0x00ABCF..) # nil\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the latest transaction of the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),". May return nil if ",(0,l.kt)("inlineCode",{parentName:"p"},"address")," does not exist. See ",(0,l.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Appendix 1"),"."),(0,l.kt)("h3",{id:"get_previous_address1"},"get_previous_address/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_previous_address(0x00ABCD..) # "00EFAB.."\nChain.get_previous_address(transaction) # "0014AC.."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"previous_public_key")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"transaction")," either a transaction map or a the previous_public_key")),(0,l.kt)("p",null,"Returns previous transaction's address. Usually called with a ",(0,l.kt)("inlineCode",{parentName:"p"},"transaction"),", it is also possible to call it with the ",(0,l.kt)("inlineCode",{parentName:"p"},"previous_public_key")," directly."),(0,l.kt)("h3",{id:"get_balance1-io"},"get_balance/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"balance = Chain.get_balance(0x00ABCD..)\nuco_balance = balance.uco # 181812.87\ntestcoin_balance = Map.get(balance.tokens, [token_address: 0x00ABCD.., token_id: 0]) # 4756.5401\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in")),(0,l.kt)("p",null,"Returns the balance of the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("p",null,"The return value is a map with two keys ",(0,l.kt)("inlineCode",{parentName:"p"},"uco")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"tokens"),". The value behind ",(0,l.kt)("inlineCode",{parentName:"p"},"tokens")," is a map where the keys are tokens' identifiers (",(0,l.kt)("inlineCode",{parentName:"p"},"[token_address: HEX, token_id: POS_INT]"),") and the values are floats."),(0,l.kt)("p",null,"Useful if you need to retrieve the entire list of tokens (and uco) at the same time."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If you're only interested at UCO, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_uco_balance1-io"},"get_uco_balance/1"),"."),(0,l.kt)("li",{parentName:"ul"},"If you're only interested in a specific token, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_token_balance2-io"},"get_token_balance/2"),"."),(0,l.kt)("li",{parentName:"ul"},"If you're only interested in a few specific tokens, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_tokens_balance2-io"},"get_tokens_balance/2"),".")),(0,l.kt)("h3",{id:"get_uco_balance1-io"},"get_uco_balance/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Chain.get_uco_balance(0x00ABCD..) # 14.26239\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in")),(0,l.kt)("p",null,"Returns the amount of UCO in the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("h3",{id:"get_token_balance2-io"},"get_token_balance/2 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("p",null,"Same as ",(0,l.kt)("a",{parentName:"p",href:"#get_token_balance3-io"},"get_token_balance/3")," called with ",(0,l.kt)("inlineCode",{parentName:"p"},"token_id: 0"),"."),(0,l.kt)("h3",{id:"get_token_balance3-io"},"get_token_balance/3 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"transaction_address = 0x00ABCD..\nfungible_token_address = 0x00BCDE..\nnon_fungible_token_address = 0x00FEDC..\nChain.get_token_balance(transaction_address, fungible_token_address, 0) # 14.26239591\nChain.get_token_balance(transaction_address, non_fungible_token_address, 1) # 1\nChain.get_token_balance(transaction_address, non_fungible_token_address, 2) # 0\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"token_address")," the address of the transaction that defined the token"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"token_id")," the index of the element in the collection (0 for fungible tokens)")),(0,l.kt)("p",null,"Returns the token balance of the token defined at ",(0,l.kt)("inlineCode",{parentName:"p"},"token_address")," in the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),".\nNon-fungible tokens must precise the ",(0,l.kt)("inlineCode",{parentName:"p"},"token_id")," (index of the token in the collection)."),(0,l.kt)("h3",{id:"get_tokens_balance1-io"},"get_tokens_balance/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"balance = Chain.get_tokens_balance(0x00ABCD..)\nabdecoin_balance = Map.get(balance, [token_address: 0x00ABDE.., token_id: 0]) # 8.90800012\ndefacoin_balance = Map.get(balance, [token_address: 0x00DEFA.., token_id: 0]) # 4.05902597\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in")),(0,l.kt)("p",null,"Returns a subset of the token balance of the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),".\nThe return value is a map where the keys are the tokens' identifiers: ",(0,l.kt)("inlineCode",{parentName:"p"},"[token_address: HEX, token_id: POS_INT]")," and the value are floats."),(0,l.kt)("p",null,"Useful if you need to retrieve many tokens at the same time."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If you're only interested in a specific token, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_token_balance2-io"},"get_token_balance/2"),".")),(0,l.kt)("h3",{id:"get_tokens_balance2-io"},"get_tokens_balance/2 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"balance = Chain.get_tokens_balance(0x00ABCD.., [\n [token_address: 0x00DEFA.., token_id: 1],\n [token_address: 0x00DEFA.., token_id: 2]\n])\nnft1 = Map.get(balance, [token_address: 0x00DEFA.., token_id: 1]) # 1\nnft2 = Map.get(balance, [token_address: 0x00DEFA.., token_id: 2]) # 0\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"tokens_identifiers")," the list of tokens' identifiers (",(0,l.kt)("inlineCode",{parentName:"li"},"[token_address: HEX, token_id: POS_INT]"),") to return")),(0,l.kt)("p",null,"Returns a subset of the token balance of the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),".\nThe return value is a map where the keys are the tokens' identifiers: ",(0,l.kt)("inlineCode",{parentName:"p"},"[token_address: HEX, token_id: POS_INT]")," and the value are floats."),(0,l.kt)("p",null,"Useful if you need to retrieve many tokens at the same time."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If you're only interested in a specific token, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_token_balance2-io"},"get_token_balance/2"),".")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"crypto"},"Crypto"),(0,l.kt)("h3",{id:"hash1"},"hash/1"),(0,l.kt)("p",null,"Equivalent to ",(0,l.kt)("a",{parentName:"p",href:"#hash2"},"hash/2"),' with the second argument "sha256".'),(0,l.kt)("h3",{id:"hash2"},"hash/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Crypto.hash("my text", "sha256") # "7330D2B39CA35EA..."\nCrypto.hash("my text", "sha512") # "A3D7E45A0D9BE5F..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the text to hash"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"algo"),' the hash algorithm ("sha256", "sha512", "sha3_256", "sha3_512", "blake2b", "keccak256")')),(0,l.kt)("p",null,"Returns the hash of ",(0,l.kt)("inlineCode",{parentName:"p"},"str")," by using ",(0,l.kt)("inlineCode",{parentName:"p"},"algo")," algorithm."),(0,l.kt)("h3",{id:"hmac1"},"hmac/1"),(0,l.kt)("p",null,"Equivalent to ",(0,l.kt)("a",{parentName:"p",href:"#hmac2"},"hmac/2"),' with the second argument "sha256".'),(0,l.kt)("h3",{id:"hmac2"},"hmac/2"),(0,l.kt)("p",null,"Equivalent to ",(0,l.kt)("a",{parentName:"p",href:"#hmac3"},"hmac/3")," with the third argument being a key created from the contract seed and secret data known by nodes.\nThe key created is deterministic and will always be the same for a contract."),(0,l.kt)("h3",{id:"hmac3"},"hmac/3"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Crypto.hmac("my text") # "374C7527733556..."\nCrypto.hmac("my text", "sha256") # "374C7527733556..."\nCrypto.hmac("my text", "sha256", "secret_key") # "901A365FF22B895..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," the data to hash (if the data is hexadecimal it will be decoded in binary)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"algo"),' the hash algorithm ("sha256", "sha512", "sha3_256", "sha3_512")'),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key to perform the hmac (if the data is hexadecimal it will be decoded in binary)")),(0,l.kt)("p",null,"Returns the hmac of ",(0,l.kt)("inlineCode",{parentName:"p"},"data")," with ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," using ",(0,l.kt)("inlineCode",{parentName:"p"},"algo"),"."),(0,l.kt)("h3",{id:"sign_with_recovery1"},"sign_with_recovery/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'signature_payload = Crypto.hash("tintin", "keccak256")\nCrypto.sign_with_recovery(signature_payload) # [r: "00ABCD...", s: "00BCDE...", v: 0]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash")," the hash to sign")),(0,l.kt)("p",null,"Return a signature of the given ",(0,l.kt)("inlineCode",{parentName:"p"},"hash"),"."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"token"},"Token"),(0,l.kt)("h3",{id:"fetch_id_from_address1-io"},"fetch_id_from_address/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Token.fetch_id_from_address("000012345") # "3C21EF708BF11B4232..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the token address")),(0,l.kt)("p",null,"Returns the token's id of the token at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"code"},"Code"),(0,l.kt)("h3",{id:"is_same2"},"is_same?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'code = """\n@version\n\ncondition triggered_by: transaction, as: []\n\nactions triggered_by: transaction do\n Contract.add_uco_transfer to: 0x1234, amount: 15.5\nend\n"""\n\nCode.is_same?(code, transaction.code)\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"first_code")," a string containing a smart contract code"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"second_code")," a string containing a smart contract code")),(0,l.kt)("p",null,"Return true if codes are the same, false otherwise.\nThis function is more accurate than comparing two strings, as it convert code into structured AST and compare only code instruction and not line numbers, carriage return ..."),(0,l.kt)("h3",{id:"is_valid1-1"},"is_valid?/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'code = """\n@version\n\ncondition triggered_by: transaction, as: []\n\nactions triggered_by: transaction do\n Contract.add_uco_transfer to: 0x1234, amount: 15.5\nend\n"""\n\nCode.is_valid?(code)\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"code")," a string containing a smart contract code")),(0,l.kt)("p",null,"Returns true if the code is valid according to Archethic smart contracts language, false otherwise"),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"math"},"Math"),(0,l.kt)("h3",{id:"pow2"},"pow/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Math.pow(2, 3)\n# 8\nMath.pow(1.7, 8)\n# 69.75757441\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"number")," the number to apply the power"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"exponent")," the exponent of the power")),(0,l.kt)("p",null,"Returns the result of the power of number by exponent."),(0,l.kt)("h3",{id:"trunc1"},"trunc/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Math.trunc(8.32)\n# 8\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"number")," the number to truncate")),(0,l.kt)("p",null,"Returns the truncated number as an integer."),(0,l.kt)("h3",{id:"sqrt1"},"sqrt/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Math.sqrt(16)\n# 4\nMath.sqrt(12.5)\n# 3.53553390\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"number")," the number to calculate the square root")),(0,l.kt)("p",null,"Returns the square root if the number."),(0,l.kt)("h3",{id:"rem2"},"rem/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Math.rem(2.1, 3)\n# 2.1\nMath.rem(10, 3)\n# 1\nMath.rem(-10, 3)\n# -1\nMath.rem(10.2, 1)\n# 0.2\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"dividend")," the number to divid"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"divisor")," the number which divid")),(0,l.kt)("p",null,"Returns the remainder (modulo) of a division."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"http"},"Http"),(0,l.kt)("h3",{id:"request1-io"},"request/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("p",null,"Similar to ",(0,l.kt)("a",{parentName:"p",href:"#request2-io"},"request/2")," with ",(0,l.kt)("inlineCode",{parentName:"p"},'method: "GET"'),"."),(0,l.kt)("h3",{id:"request2-io"},"request/2 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("p",null,"Similar to ",(0,l.kt)("a",{parentName:"p",href:"#request3-io"},"request/3")," with ",(0,l.kt)("inlineCode",{parentName:"p"},"headers: Map.new()"),"."),(0,l.kt)("h3",{id:"request3-io"},"request/3 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("p",null,"Similar to ",(0,l.kt)("a",{parentName:"p",href:"#request4-io"},"request/4")," with ",(0,l.kt)("inlineCode",{parentName:"p"},"body: nil"),"."),(0,l.kt)("h3",{id:"request4-io"},"request/4 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'response = Http.request("https://fakerapi.it/api/v1/addresses?_quantity=1&_seed=watermelon", "GET", Map.new(), nil) # [status: 200, body: "..."]\nif response.status == 200 do\n # do something with response.body\nend\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"url")," the url to fetch"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"method")," the HTTP method (",(0,l.kt)("inlineCode",{parentName:"li"},'"GET"'),", ",(0,l.kt)("inlineCode",{parentName:"li"},'"POST"'),", ",(0,l.kt)("inlineCode",{parentName:"li"},'"PUT"'),", ",(0,l.kt)("inlineCode",{parentName:"li"},'"DELETE"')," or ",(0,l.kt)("inlineCode",{parentName:"li"},'"PATCH"'),")"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"headers")," the HTTP headers"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"body")," the HTTP body")),(0,l.kt)("p",null,"Performs a HTTP request and returns a map with ",(0,l.kt)("inlineCode",{parentName:"p"},"status")," (integer) and ",(0,l.kt)("inlineCode",{parentName:"p"},"body")," (string)."),(0,l.kt)("p",null,"This status integer can be any ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Status"},"HTTP status code"),"."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The URL must use HTTPS protocol."),(0,l.kt)("li",{parentName:"ul"},"The response body's size must be less than 256KB."),(0,l.kt)("li",{parentName:"ul"},"The response must be received in less than 2 seconds."),(0,l.kt)("li",{parentName:"ul"},"The response must be idempotent (= identical every time it is called)"),(0,l.kt)("li",{parentName:"ul"},"Only 1 call of either ",(0,l.kt)("inlineCode",{parentName:"li"},"request/1,2,3,4")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"request_many/1")," is allowed per execution.")),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"The function raises if these requirements are not meet.")),(0,l.kt)("admonition",{title:"Disclaimer",type:"danger"},(0,l.kt)("p",{parentName:"admonition"},"We discourage to call services that change their internal state directly (such as writing to a database or notifying a user). Because Archethic ",(0,l.kt)("strong",{parentName:"p"},"relies on atomic commitment of all storage nodes"),", it may happen that atomic commitment is not reached and the transaction resulting of a Smart Contract is not validated."),(0,l.kt)("p",{parentName:"admonition"},"Instead, you should notify the service of the transaction being validated. The service subscribes to that transaction via the GraphQL API, and once it receives a confirmation, it should act accordingly.")),(0,l.kt)("h3",{id:"request_many1-io"},"request_many/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'responses = Http.request_many([\n [url: "https://fakerapi.it/api/v1/users?_quantity=1&_gender=male&_seed=cucumber"],\n [url: "https://fakerapi.it/api/v1/users?_quantity=1&_gender=female&_seed=tomato", method: "GET", headers: Map.new(), body: nil]\n])\nfor r in responses do\n if r.status == 200 do\n # do something with r.body\n end\nend\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"request")," a list of requests to perform")),(0,l.kt)("p",null,"Performs a HTTP request and returns a map with ",(0,l.kt)("inlineCode",{parentName:"p"},"status")," (integer) and ",(0,l.kt)("inlineCode",{parentName:"p"},"body")," (string). Order and length is preserved."),(0,l.kt)("p",null,"See ",(0,l.kt)("a",{parentName:"p",href:"#request4-io"},"request/4")," for rules and more details."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"contract"},"Contract"),(0,l.kt)("h3",{id:"call_function3-io"},"call_function/3 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.call_function(0x0000ABCD..., "add", [1, 2])\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"contract_address")," the contract's adddress"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"function_name")," the function name"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"args")," the list of arguments to call the function with")),(0,l.kt)("p",null,"Calls the exported function ",(0,l.kt)("inlineCode",{parentName:"p"},"function_name")," of the Smart Contract at ",(0,l.kt)("inlineCode",{parentName:"p"},"contract_address")," with given ",(0,l.kt)("inlineCode",{parentName:"p"},"args")," and return the result value."),(0,l.kt)("h3",{id:"set_type1-transaction"},"set_type/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.set_type("transfer")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),' the transaction type ("contract", "transfer", "data", "hosting")')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to be of type ",(0,l.kt)("inlineCode",{parentName:"p"},"type"),"."),(0,l.kt)("h3",{id:"set_content1-transaction"},"set_content/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.set_content("Hello Smart Contract")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"content")," the transaction's content (we usually use this as the state of the smart contract)")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction content to be ",(0,l.kt)("inlineCode",{parentName:"p"},"content"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"While ",(0,l.kt)("inlineCode",{parentName:"p"},"content")," is always a string when you read it, it is possible here to send an integer or a float for convenience.\nFor any other data structure, you should serialize it with the ",(0,l.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library#json"},"Json module")," for example.")),(0,l.kt)("h3",{id:"set_code1-transaction"},"set_code/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.set_code("@version 1\\ncondition inherit: []")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"code")," the code")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction code to be ",(0,l.kt)("inlineCode",{parentName:"p"},"code"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},'This example "closes" the contract, by adding an ',(0,l.kt)("inlineCode",{parentName:"p"},"condition inherit")," that doesn't accept anything. It will be impossible to create a new transaction in this chain.")),(0,l.kt)("h3",{id:"add_uco_transfer1-transaction"},"add_uco_transfer/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.add_uco_transfer(to: "000012345...", amount: 1)\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"uco_transfer")," a map with two keys:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"to"),": the destination address"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"amount"),": the number of UCO")))),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to add the ",(0,l.kt)("inlineCode",{parentName:"p"},"uco_transfer"),"."),(0,l.kt)("h3",{id:"add_uco_transfers1-transaction"},"add_uco_transfers/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("p",null,"Equivalent to call ",(0,l.kt)("a",{parentName:"p",href:"#add_uco_transfer1-transaction"},"add_uco_transfer/1")," for each element of the list"),(0,l.kt)("h3",{id:"add_token_transfer1-transaction"},"add_token_transfer/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.add_token_transfer(\n to: "000012345...",\n amount: 1.2,\n token_address: "000023456...")\nContract.add_token_transfer(\n to: "000012345...",\n amount: 1.2,\n token_id: 4,\n token_address: "000023456...")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"token_transfer")," a map with three or four keys:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"to"),": the destination address"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"amount"),": the number of UCO"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"token_address"),": the transaction address of the token"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"[token_id]"),": an optional integer to specify which index in the list (used for the NFTs)")))),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to add the ",(0,l.kt)("inlineCode",{parentName:"p"},"token_transfer"),"."),(0,l.kt)("h3",{id:"add_token_transfers1-transaction"},"add_token_transfers/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("p",null,"Equivalent to call ",(0,l.kt)("a",{parentName:"p",href:"#add_token_transfer1-transaction"},"add_token_transfer/1")," for each element of the list"),(0,l.kt)("h3",{id:"add_ownership1-transaction"},"add_ownership/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'authorized_keys = Map.new()\nauthorized_keys = Map.set(authorized_keys, public_key, encoded_secret_key)\nContract.add_ownership(\n secret: "ENCODED_SECRET1",\n authorized_keys: authorized_keys\n)\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"ownership")," a map with two keys:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"secret"),": the encoded secret"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"authorized_keys"),": a map where the keys are the ",(0,l.kt)("inlineCode",{parentName:"li"},"public_keys")," and the values are the ",(0,l.kt)("inlineCode",{parentName:"li"},"encoded_secret_keys")," (the keys to decode the secret encoded by each ",(0,l.kt)("inlineCode",{parentName:"li"},"public_key"),")")))),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"It is the developer's job to encode the secret & the secret key for each authorized key.")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to add the ",(0,l.kt)("inlineCode",{parentName:"p"},"ownership"),"."),(0,l.kt)("h3",{id:"add_ownerships1-transaction"},"add_ownerships/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("p",null,"Equivalent to call ",(0,l.kt)("a",{parentName:"p",href:"#add_ownership1-transaction"},"add_ownership/1")," for each element of the list"),(0,l.kt)("h3",{id:"add_recipient1-transaction"},"add_recipient/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.add_recipient("000012345...")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address"),": a transaction address (one with a smart contract)")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to add the ",(0,l.kt)("inlineCode",{parentName:"p"},"address")," in the recipients."),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Recipients are used to trigger smart contracts")),(0,l.kt)("h3",{id:"add_recipients1-transaction"},"add_recipients/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("p",null,"Equivalent to call ",(0,l.kt)("a",{parentName:"p",href:"#add_recipient1-transaction"},"add_recipients/1")," for each element of the list"),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"evm"},"Evm"),(0,l.kt)("h3",{id:"abi_encode2"},"abi_encode/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Evm.abi_encode(signature, data)\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signature"),': the function or tuple signature (ex: "baz(uint,address)")'),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"data"),": the data to encode")),(0,l.kt)("p",null,"Encodes the given ",(0,l.kt)("inlineCode",{parentName:"p"},"data")," according to the ",(0,l.kt)("inlineCode",{parentName:"p"},"signature"),"."),(0,l.kt)("h3",{id:"abi_decode2"},"abi_decode/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Evm.abi_decode(signature, encoded_data)\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signature"),': the function or tuple signature (ex: "baz(uint,address)")'),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"encoded_data"),": the data to decode")),(0,l.kt)("p",null,"Decodes the given ",(0,l.kt)("inlineCode",{parentName:"p"},"encoded_data")," according to the ",(0,l.kt)("inlineCode",{parentName:"p"},"signature"),"."))}k.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/b5651cae.ff7e140e.js b/assets/js/b5651cae.ff7e140e.js new file mode 100644 index 000000000..8655dfd5c --- /dev/null +++ b/assets/js/b5651cae.ff7e140e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1855],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>c});var n=a(67294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var s=n.createContext({}),d=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},p=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=d(a),m=l,c=u["".concat(s,".").concat(m)]||u[m]||k[m]||i;return a?n.createElement(c,r(r({ref:t},p),{},{components:a})):n.createElement(c,r({ref:t},p))}));function c(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=a.length,r=new Array(i);r[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:l,r[1]=o;for(var d=2;d{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>k,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var n=a(87462),l=(a(67294),a(3905));a(8209);const i={id:"library",title:"Smart Contracts - Library",sidebar_label:"Library",sidebar_position:4},r=void 0,o={unversionedId:"build/smart-contracts/language/library",id:"build/smart-contracts/language/library",title:"Smart Contracts - Library",description:"The Smart Contract library is composed of many modules with many functions in each.",source:"@site/docs/build/smart-contracts/language/library.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/library",permalink:"/build/smart-contracts/language/library",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:4,frontMatter:{id:"library",title:"Smart Contracts - Library",sidebar_label:"Library",sidebar_position:4},sidebar:"docs",previous:{title:"Actions",permalink:"/build/smart-contracts/language/actions"},next:{title:"Examples",permalink:"/build/smart-contracts/language/examples"}},s={},d=[{value:"String",id:"string",level:2},{value:"size/1",id:"size1",level:3},{value:"in?/2",id:"in2",level:3},{value:"to_number/1",id:"to_number1",level:3},{value:"from_number/1",id:"from_number1",level:3},{value:"to_hex/1",id:"to_hex1",level:3},{value:"to_uppercase/1",id:"to_uppercase1",level:3},{value:"to_lowercase/1",id:"to_lowercase1",level:3},{value:"Map",id:"map",level:2},{value:"new/0",id:"new0",level:3},{value:"size/1",id:"size1-1",level:3},{value:"get/2",id:"get2",level:3},{value:"get/3",id:"get3",level:3},{value:"set/3",id:"set3",level:3},{value:"keys/1",id:"keys1",level:3},{value:"values/1",id:"values1",level:3},{value:"delete/2",id:"delete2",level:3},{value:"List",id:"list",level:2},{value:"at/2",id:"at2",level:3},{value:"size/1",id:"size1-2",level:3},{value:"in?/2",id:"in2-1",level:3},{value:"empty?/1",id:"empty1",level:3},{value:"concat/2",id:"concat2",level:3},{value:"append/2",id:"append2",level:3},{value:"prepend/2",id:"prepend2",level:3},{value:"join/2",id:"join2",level:3},{value:"Regex",id:"regex",level:2},{value:"extract/2",id:"extract2",level:3},{value:"match?/2",id:"match2",level:3},{value:"scan/2",id:"scan2",level:3},{value:"Json",id:"json",level:2},{value:"path_extract/2",id:"path_extract2",level:3},{value:"path_match?/2",id:"path_match2",level:3},{value:"to_string/1",id:"to_string1",level:3},{value:"parse/1",id:"parse1",level:3},{value:"is_valid?/1",id:"is_valid1",level:3},{value:"Time",id:"time",level:2},{value:"now/0",id:"now0",level:3},{value:"Chain",id:"chain",level:2},{value:"get_genesis_address/1 [I/O]",id:"get_genesis_address1-io",level:3},{value:"get_first_transaction_address/1 [I/O]",id:"get_first_transaction_address1-io",level:3},{value:"get_genesis_public_key/1 [I/O]",id:"get_genesis_public_key1-io",level:3},{value:"get_burn_address/0",id:"get_burn_address0",level:3},{value:"get_transaction/1 [I/O]",id:"get_transaction1--io",level:3},{value:"get_last_address/1 [I/O]",id:"get_last_address1-io",level:3},{value:"get_last_transaction/1 [I/O]",id:"get_last_transaction1-io",level:3},{value:"get_previous_address/1",id:"get_previous_address1",level:3},{value:"get_balance/1 [I/O]",id:"get_balance1-io",level:3},{value:"get_uco_balance/1 [I/O]",id:"get_uco_balance1-io",level:3},{value:"get_token_balance/2 [I/O]",id:"get_token_balance2-io",level:3},{value:"get_token_balance/3 [I/O]",id:"get_token_balance3-io",level:3},{value:"get_tokens_balance/1 [I/O]",id:"get_tokens_balance1-io",level:3},{value:"get_tokens_balance/2 [I/O]",id:"get_tokens_balance2-io",level:3},{value:"Crypto",id:"crypto",level:2},{value:"hash/1",id:"hash1",level:3},{value:"hash/2",id:"hash2",level:3},{value:"hmac/1",id:"hmac1",level:3},{value:"hmac/2",id:"hmac2",level:3},{value:"hmac/3",id:"hmac3",level:3},{value:"sign_with_recovery/1",id:"sign_with_recovery1",level:3},{value:"Token",id:"token",level:2},{value:"fetch_id_from_address/1 [I/O]",id:"fetch_id_from_address1-io",level:3},{value:"Code",id:"code",level:2},{value:"is_same?/2",id:"is_same2",level:3},{value:"is_valid?/1",id:"is_valid1-1",level:3},{value:"Math",id:"math",level:2},{value:"pow/2",id:"pow2",level:3},{value:"trunc/1",id:"trunc1",level:3},{value:"sqrt/1",id:"sqrt1",level:3},{value:"rem/2",id:"rem2",level:3},{value:"Http",id:"http",level:2},{value:"request/1 [I/O]",id:"request1-io",level:3},{value:"request/2 [I/O]",id:"request2-io",level:3},{value:"request/3 [I/O]",id:"request3-io",level:3},{value:"request/4 [I/O]",id:"request4-io",level:3},{value:"request_many/1 [I/O]",id:"request_many1-io",level:3},{value:"Contract",id:"contract",level:2},{value:"call_function/3 [I/O]",id:"call_function3-io",level:3},{value:"set_type/1 [Transaction]",id:"set_type1-transaction",level:3},{value:"set_content/1 [Transaction]",id:"set_content1-transaction",level:3},{value:"set_code/1 [Transaction]",id:"set_code1-transaction",level:3},{value:"add_uco_transfer/1 [Transaction]",id:"add_uco_transfer1-transaction",level:3},{value:"add_uco_transfers/1 [Transaction]",id:"add_uco_transfers1-transaction",level:3},{value:"add_token_transfer/1 [Transaction]",id:"add_token_transfer1-transaction",level:3},{value:"add_token_transfers/1 [Transaction]",id:"add_token_transfers1-transaction",level:3},{value:"add_ownership/1 [Transaction]",id:"add_ownership1-transaction",level:3},{value:"add_ownerships/1 [Transaction]",id:"add_ownerships1-transaction",level:3},{value:"add_recipient/1 [Transaction]",id:"add_recipient1-transaction",level:3},{value:"add_recipients/1 [Transaction]",id:"add_recipients1-transaction",level:3},{value:"Evm",id:"evm",level:2},{value:"abi_encode/2",id:"abi_encode2",level:3},{value:"abi_decode/2",id:"abi_decode2",level:3}],p={toc:d},u="wrapper";function k(e){let{components:t,...a}=e;return(0,l.kt)(u,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"The Smart Contract library is composed of many modules with many functions in each.\n",(0,l.kt)("strong",{parentName:"p"},"Unless it is explicitely written, the functions will not mutate their arguments"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"# Don't\nsold_items = [1,2,3]\nList.concat(sold_items, [4,5,6])\n\n# Do\nsold_items = [1,2,3]\nsold_items = List.concat(sold_items, [4,5,6])\n")),(0,l.kt)("admonition",{title:"function/arity",type:"note"},(0,l.kt)("p",{parentName:"admonition"},"In this page, the number after the slash indicates the arity of the function (number or arguments)."),(0,l.kt)("p",{parentName:"admonition"},"For example ",(0,l.kt)("inlineCode",{parentName:"p"},"size/1")," means the function ",(0,l.kt)("inlineCode",{parentName:"p"},"size")," has 1 argument.")),(0,l.kt)("admonition",{title:"Tagged functions",type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Functions are tagged as ",(0,l.kt)("inlineCode",{parentName:"p"},"[Transaction]")," are special:"),(0,l.kt)("ul",{parentName:"admonition"},(0,l.kt)("li",{parentName:"ul"},"They are only available in the ",(0,l.kt)("inlineCode",{parentName:"li"},"actions")," block."),(0,l.kt)("li",{parentName:"ul"},'They mutate an internal state, the "next transaction".'),(0,l.kt)("li",{parentName:"ul"},'This "next transaction" is initiated with current contract (all values but transfers are copied)')),(0,l.kt)("p",{parentName:"admonition"},"Other functions are tagged as ",(0,l.kt)("inlineCode",{parentName:"p"},"[I/O]")," and help to fetch data making network calls by either:"),(0,l.kt)("ul",{parentName:"admonition"},(0,l.kt)("li",{parentName:"ul"},"requesting Archethic"),(0,l.kt)("li",{parentName:"ul"},"requesting the outside world"))),(0,l.kt)("h2",{id:"string"},"String"),(0,l.kt)("h3",{id:"size1"},"size/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.size("hello") # 5\nString.size("\u4f60\u597d") # 2\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Returns the number of characters in ",(0,l.kt)("inlineCode",{parentName:"p"},"str"),"."),(0,l.kt)("h3",{id:"in2"},"in?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.in?("bob,alice,julia", "alice") # true\nString.in?("bob,alice,julia", "fred") # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str1")," the haystack"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str2")," the needle")),(0,l.kt)("p",null,"Returns whether the ",(0,l.kt)("inlineCode",{parentName:"p"},"needle")," is in the ",(0,l.kt)("inlineCode",{parentName:"p"},"haystack"),"."),(0,l.kt)("h3",{id:"to_number1"},"to_number/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.to_number("12") # 12\nString.to_number("-12") # -12\nString.to_number("12.1") # 12.1\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Returns the number which text representation is ",(0,l.kt)("inlineCode",{parentName:"p"},"str"),"."),(0,l.kt)("h3",{id:"from_number1"},"from_number/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.from_number(13) # "13"\nString.from_number(13.2) # "13.2"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"number")," the number")),(0,l.kt)("p",null,"Returns the text representation of ",(0,l.kt)("inlineCode",{parentName:"p"},"number"),"."),(0,l.kt)("h3",{id:"to_hex1"},"to_hex/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.to_hex("592ac76afa") # "592AC76AFA"\nString.to_hex("592AC76AFA") # "592AC76AFA"\nString.to_hex("hello") # "68656C6C6F"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Return the text representation of hexadecimal ",(0,l.kt)("inlineCode",{parentName:"p"},"str"),".\nIf ",(0,l.kt)("inlineCode",{parentName:"p"},"str")," is already an hex it just uppercase it"),(0,l.kt)("h3",{id:"to_uppercase1"},"to_uppercase/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.to_uppercase("Ars\xe8ne Lupin") # "ARS\xc8NE LUPIN"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Return the ",(0,l.kt)("inlineCode",{parentName:"p"},"str")," in uppercase."),(0,l.kt)("h3",{id:"to_lowercase1"},"to_lowercase/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'String.to_lowercase("Sherlock Holmes") # "sherlock holmes"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the string")),(0,l.kt)("p",null,"Return the ",(0,l.kt)("inlineCode",{parentName:"p"},"str")," in lowercase."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"map"},"Map"),(0,l.kt)("h3",{id:"new0"},"new/0"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Map.new() # empty map\n")),(0,l.kt)("p",null,"Returns an empty map. There is no shorthand notation."),(0,l.kt)("h3",{id:"size1-1"},"size/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.size(key1: "value", key2: "value2") # 2\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map")),(0,l.kt)("p",null,"Returns the number of keys in ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("h3",{id:"get2"},"get/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.get([key1: "value", key2: "value2"], "key1") # "value"\nMap.get([key1: "value", key2: "value2"], "key3") # nil\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key")),(0,l.kt)("p",null,"Returns the value at ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"map")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"nil")," if ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," is not in the ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"There is a shorthand notation ",(0,l.kt)("inlineCode",{parentName:"p"},"map.key")," when key is not a variable.")),(0,l.kt)("h3",{id:"get3"},"get/3"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.get([key1: "value", key2: "value2"], "key1", "not in map") # "value"\nMap.get([key1: "value", key2: "value2"], "key3", "not in map") # "not in map"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"default")," the default value")),(0,l.kt)("p",null,"Returns the value at ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"map")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," if ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," is not in the ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("h3",{id:"set3"},"set/3"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.set([key1: "value", key2: "value2"], "key1", "valueX") # [key1: "valueX", key2: "value2"]\nMap.get([key1: "value", key2: "value2"], "key3", "value3") # [key1: "value", key2: "value2, key3: "value3"]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"value")," the value to set")),(0,l.kt)("p",null,"Returns a copy of ",(0,l.kt)("inlineCode",{parentName:"p"},"map")," where the value at ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"value"),"."),(0,l.kt)("h3",{id:"keys1"},"keys/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.keys(key1: "value", key2: "value2") # ["key1", "key2"]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map")),(0,l.kt)("p",null,"Returns the list of keys in ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"Use it with a ",(0,l.kt)("inlineCode",{parentName:"p"},"for loop")," to iterate on a map!"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre"},"for key in Map.keys(map) do\n ...\n value = map[key]\n ...\nend\n"))),(0,l.kt)("h3",{id:"values1"},"values/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.values(key1: "value", key2: "value2") # ["value", "value2"]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map")),(0,l.kt)("p",null,"Returns the list of values in ",(0,l.kt)("inlineCode",{parentName:"p"},"map"),"."),(0,l.kt)("h3",{id:"delete2"},"delete/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Map.delete([key1: "value", key2: "value2"], "key2") # [key1: "value"]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," the map"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key to remove")),(0,l.kt)("p",null,"Returns a copy of the ",(0,l.kt)("inlineCode",{parentName:"p"},"map")," without the value at given ",(0,l.kt)("inlineCode",{parentName:"p"},"key"),"."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"list"},"List"),(0,l.kt)("p",null,"Lists are actually ",(0,l.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Linked_list"},"Linked List"),"."),(0,l.kt)("h3",{id:"at2"},"at/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'List.at(["a", "b", "c"], 0) # "a"\nList.at(["a", "b", "c"], 1) # "b"\nList.at(["a", "b", "c"], 2) # "c"\nList.at([], 0) # nil\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"index")," the index (zero-based)")),(0,l.kt)("p",null,"Returns the element at ",(0,l.kt)("inlineCode",{parentName:"p"},"index")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"."),(0,l.kt)("h3",{id:"size1-2"},"size/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"List.size([]) # 0\nList.size([1,2,3,4]) # 4\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list")),(0,l.kt)("p",null,"Returns the number of keys in ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"."),(0,l.kt)("h3",{id:"in2-1"},"in?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'List.in?(["bob", "alice"], "alice") # true\nList.in?(["bob", "alice"], "fred") # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the haystack"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"element")," the needle")),(0,l.kt)("p",null,"Returns whether the ",(0,l.kt)("inlineCode",{parentName:"p"},"needle")," is in the ",(0,l.kt)("inlineCode",{parentName:"p"},"haystack"),"."),(0,l.kt)("h3",{id:"empty1"},"empty?/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'List.empty?([]) # true\nList.empty?(["apple"]) # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list")),(0,l.kt)("p",null,"Returns whether the ",(0,l.kt)("inlineCode",{parentName:"p"},"list")," is empty or not."),(0,l.kt)("h3",{id:"concat2"},"concat/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"List.concat([], []) # []\nList.concat([1,2], [3,4]) # [1,2,3,4]\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list1")," a list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list2")," another list")),(0,l.kt)("p",null,"Returns a new list where ",(0,l.kt)("inlineCode",{parentName:"p"},"list2")," is concatenated to ",(0,l.kt)("inlineCode",{parentName:"p"},"list1"),"."),(0,l.kt)("h3",{id:"append2"},"append/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"List.append([], 1) # [1]\nList.append([1], 2) # [1,2]\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"element")," the element")),(0,l.kt)("p",null,"Returns a new list where ",(0,l.kt)("inlineCode",{parentName:"p"},"element")," is appended to the end of ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"If order doesn't matter, we suggest to use ",(0,l.kt)("inlineCode",{parentName:"p"},"prepend/2")," instead (Complexity: O(1) instead of O(n)).")),(0,l.kt)("h3",{id:"prepend2"},"prepend/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"List.prepend([], 1) # [1]\nList.prepend([1], 0) # [0,1]\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"element")," the element")),(0,l.kt)("p",null,"Returns a new list where ",(0,l.kt)("inlineCode",{parentName:"p"},"element")," is appended to the start of ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"."),(0,l.kt)("h3",{id:"join2"},"join/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'List.join([], ", ") # ""\nList.join(["Mike", "Robert", "Joe"], ", ") # "Mike, Robert, Joe"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"list")," the list of strings"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"separator")," the separator")),(0,l.kt)("p",null,"Returns a string where all ",(0,l.kt)("inlineCode",{parentName:"p"},"list"),"'s elements have been joined with ",(0,l.kt)("inlineCode",{parentName:"p"},"separator")," separator."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"regex"},"Regex"),(0,l.kt)("h3",{id:"extract2"},"extract/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Regex.extract("123456abc", "[0-9]+") # "123456"\nRegex.extract("voodoo", "[abc]") # ""\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"text")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pattern")," the element")),(0,l.kt)("p",null,"Returns the data from ",(0,l.kt)("inlineCode",{parentName:"p"},"text")," extract via the regex ",(0,l.kt)("inlineCode",{parentName:"p"},"pattern"),"."),(0,l.kt)("h3",{id:"match2"},"match?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Regex.match?("123456", "^[0-9]+$") # true\nRegex.match?("123456abc", "^[0-9]+$") # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"text")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pattern")," the element")),(0,l.kt)("p",null,"Returns whether the ",(0,l.kt)("inlineCode",{parentName:"p"},"pattern")," matches the ",(0,l.kt)("inlineCode",{parentName:"p"},"text")," or not."),(0,l.kt)("h3",{id:"scan2"},"scan/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Regex.scan("foo", "bar") # []\nRegex.scan("toto,123\\ntutu,456\\n", "toto,([0-9]+)") # ["123"]\nRegex.scan("toto,123\\ntutu,456\\n", "t.t.,([0-9]+)") # ["123", "456"]\nRegex.scan("A0B1C2,123\\nD3E4F5,456\\n", "^(\\\\w+),(\\\\d+)$") # [["A0B1C2", "123"], ["D3E4F5", "456"]]\n\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"text")," the list"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"pattern")," the element")),(0,l.kt)("p",null,"Returns the data from ",(0,l.kt)("inlineCode",{parentName:"p"},"text")," extract via the regex ",(0,l.kt)("inlineCode",{parentName:"p"},"pattern"),"."),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"This function requires the usage of capture groups (subexpressions).")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"json"},"Json"),(0,l.kt)("p",null,"Functions to manipulate JSON strings."),(0,l.kt)("p",null,"Useful resources:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://goessner.net/articles/JsonPath/"},"JSONPath documentation"))),(0,l.kt)("h3",{id:"path_extract2"},"path_extract/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.path_extract("{ \\"firstName\\": \\"John\\", \\"lastName\\": \\"Doe\\"}", "$.firstName") # "John"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json")," the json string"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"path")," the path")),(0,l.kt)("p",null,"Returns the data at ",(0,l.kt)("inlineCode",{parentName:"p"},"path")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"json"),"."),(0,l.kt)("h3",{id:"path_match2"},"path_match?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.path_match?("{\\"1622541930\\":{\\"uco\\":{\\"eur\\":0.176922,\\"usd\\":0.21642}}}", "$.*.uco.usd") # true\nJson.path_match?("{\\"1622541930\\":{\\"uco\\":{\\"eur\\":0.176922,\\"usd\\":0.21642}}}", "$.*.uco.aud") # false\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json")," the json string"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"path")," the path")),(0,l.kt)("p",null,"Returns if there is a value at ",(0,l.kt)("inlineCode",{parentName:"p"},"path")," in ",(0,l.kt)("inlineCode",{parentName:"p"},"json"),"."),(0,l.kt)("h3",{id:"to_string1"},"to_string/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.to_string(1) # "1"\nJson.to_string("str") # "\\"str\\""\nJson.to_string([1,2,3]) # "[1,2,3]"\nJson.to_string(foo: "bar") # "{\\"foo\\":\\"bar\\"}"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"any")," anything")),(0,l.kt)("p",null,"Returns the Json representation of ",(0,l.kt)("inlineCode",{parentName:"p"},"any"),"."),(0,l.kt)("h3",{id:"parse1"},"parse/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.parse("1") # "1"\nJson.parse("\\"str\\"") # "str"\nJson.parse("[1,2,3]") # [1,2,3]\nJson.parse("{\\"foo\\":\\"bar\\"}") # foo: "bar"\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json")," the json string")),(0,l.kt)("p",null,"Returns the value represented by ",(0,l.kt)("inlineCode",{parentName:"p"},"json"),"."),(0,l.kt)("h3",{id:"is_valid1"},"is_valid?/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Json.is_valid?("str") # false\nJson.is_valid?("\\"str\\"") # true\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"json")," the json string")),(0,l.kt)("p",null,"Returns whether the string is valid JSON or not."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"time"},"Time"),(0,l.kt)("h3",{id:"now0"},"now/0"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Time.now() # 1677493444\n")),(0,l.kt)("p",null,"Returns an approximation of current time (seconds since epoch).\n",(0,l.kt)("strong",{parentName:"p"},"It will always return the same value within a contract.")),(0,l.kt)("admonition",{title:"Why an approximation?",type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Because we need the smart contracts to be determinist.\nMany nodes will run them and all of them must produce the same transaction to validate a contract's execution.")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"chain"},"Chain"),(0,l.kt)("h3",{id:"get_genesis_address1-io"},"get_genesis_address/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_genesis_address("000012345...") # "000056789..."\nChain.get_genesis_address("000012345...") # "000012345..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the genesis address of the transaction chain that contains a transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),". If there is no transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),", it returns ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("h3",{id:"get_first_transaction_address1-io"},"get_first_transaction_address/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_first_transaction_address("000012345...") # "000056789..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the address of the first transaction of the transaction chain that contains a transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("admonition",{type:"danger"},(0,l.kt)("p",{parentName:"admonition"},"[IT CURRENTLY CRASH IF THERE IS NO TRANSACTION]")),(0,l.kt)("h3",{id:"get_genesis_public_key1-io"},"get_genesis_public_key/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_genesis_public_key("00013B08D...") # "000108A5C..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"public_key")," the public key")),(0,l.kt)("p",null,"Returns the genesis public key of ",(0,l.kt)("inlineCode",{parentName:"p"},"public_key"),"."),(0,l.kt)("h3",{id:"get_burn_address0"},"get_burn_address/0"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_burn_address() # "0000000000..."\n')),(0,l.kt)("p",null,"Returns the burn address."),(0,l.kt)("h3",{id:"get_transaction1--io"},"get_transaction/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_transaction(0x00ABCD..) # [address: "00ABCD..", content: "...", uco_transfers: [], ...]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),". If there is no transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),", it returns ",(0,l.kt)("inlineCode",{parentName:"p"},"nil"),". See ",(0,l.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Appendix 1"),"."),(0,l.kt)("h3",{id:"get_last_address1-io"},"get_last_address/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_last_address(0x00ABCD..) # "00EFAB..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the latest transaction address of the chain that contains ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("h3",{id:"get_last_transaction1-io"},"get_last_transaction/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_last_transaction(0x00ABCD..) # [address: "00EFAB..", content: "...", uco_transfers: [], ...]\nChain.get_last_transaction(0x00ABCF..) # nil\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the transaction address")),(0,l.kt)("p",null,"Returns the latest transaction of the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),". May return nil if ",(0,l.kt)("inlineCode",{parentName:"p"},"address")," does not exist. See ",(0,l.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/actions#appendix-1-the-transaction-map"},"Appendix 1"),"."),(0,l.kt)("h3",{id:"get_previous_address1"},"get_previous_address/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Chain.get_previous_address(0x00ABCD..) # "00EFAB.."\nChain.get_previous_address(transaction) # "0014AC.."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"previous_public_key")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"transaction")," either a transaction map or a the previous_public_key")),(0,l.kt)("p",null,"Returns previous transaction's address. Usually called with a ",(0,l.kt)("inlineCode",{parentName:"p"},"transaction"),", it is also possible to call it with the ",(0,l.kt)("inlineCode",{parentName:"p"},"previous_public_key")," directly."),(0,l.kt)("h3",{id:"get_balance1-io"},"get_balance/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"balance = Chain.get_balance(0x00ABCD..)\nuco_balance = balance.uco # 181812.87\ntestcoin_balance = Map.get(balance.tokens, [token_address: 0x00ABCD.., token_id: 0]) # 4756.5401\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in")),(0,l.kt)("p",null,"Returns the balance of the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("p",null,"The return value is a map with two keys ",(0,l.kt)("inlineCode",{parentName:"p"},"uco")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"tokens"),". The value behind ",(0,l.kt)("inlineCode",{parentName:"p"},"tokens")," is a map where the keys are tokens' identifiers (",(0,l.kt)("inlineCode",{parentName:"p"},"[token_address: HEX, token_id: POS_INT]"),") and the values are floats."),(0,l.kt)("p",null,"Useful if you need to retrieve the entire list of tokens (and uco) at the same time."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If you're only interested at UCO, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_uco_balance1-io"},"get_uco_balance/1"),"."),(0,l.kt)("li",{parentName:"ul"},"If you're only interested in a specific token, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_token_balance2-io"},"get_token_balance/2"),"."),(0,l.kt)("li",{parentName:"ul"},"If you're only interested in a few specific tokens, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_tokens_balance2-io"},"get_tokens_balance/2"),".")),(0,l.kt)("h3",{id:"get_uco_balance1-io"},"get_uco_balance/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Chain.get_uco_balance(0x00ABCD..) # 14.26239\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in")),(0,l.kt)("p",null,"Returns the amount of UCO in the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("h3",{id:"get_token_balance2-io"},"get_token_balance/2 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("p",null,"Same as ",(0,l.kt)("a",{parentName:"p",href:"#get_token_balance3-io"},"get_token_balance/3")," called with ",(0,l.kt)("inlineCode",{parentName:"p"},"token_id: 0"),"."),(0,l.kt)("h3",{id:"get_token_balance3-io"},"get_token_balance/3 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"transaction_address = 0x00ABCD..\nfungible_token_address = 0x00BCDE..\nnon_fungible_token_address = 0x00FEDC..\nChain.get_token_balance(transaction_address, fungible_token_address, 0) # 14.26239591\nChain.get_token_balance(transaction_address, non_fungible_token_address, 1) # 1\nChain.get_token_balance(transaction_address, non_fungible_token_address, 2) # 0\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"token_address")," the address of the transaction that defined the token"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"token_id")," the index of the element in the collection (0 for fungible tokens)")),(0,l.kt)("p",null,"Returns the token balance of the token defined at ",(0,l.kt)("inlineCode",{parentName:"p"},"token_address")," in the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),".\nNon-fungible tokens must precise the ",(0,l.kt)("inlineCode",{parentName:"p"},"token_id")," (index of the token in the collection)."),(0,l.kt)("h3",{id:"get_tokens_balance1-io"},"get_tokens_balance/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"balance = Chain.get_tokens_balance(0x00ABCD..)\nabdecoin_balance = Map.get(balance, [token_address: 0x00ABDE.., token_id: 0]) # 8.90800012\ndefacoin_balance = Map.get(balance, [token_address: 0x00DEFA.., token_id: 0]) # 4.05902597\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in")),(0,l.kt)("p",null,"Returns a subset of the token balance of the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),".\nThe return value is a map where the keys are the tokens' identifiers: ",(0,l.kt)("inlineCode",{parentName:"p"},"[token_address: HEX, token_id: POS_INT]")," and the value are floats."),(0,l.kt)("p",null,"Useful if you need to retrieve many tokens at the same time."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If you're only interested in a specific token, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_token_balance2-io"},"get_token_balance/2"),".")),(0,l.kt)("h3",{id:"get_tokens_balance2-io"},"get_tokens_balance/2 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"balance = Chain.get_tokens_balance(0x00ABCD.., [\n [token_address: 0x00DEFA.., token_id: 1],\n [token_address: 0x00DEFA.., token_id: 2]\n])\nnft1 = Map.get(balance, [token_address: 0x00DEFA.., token_id: 1]) # 1\nnft2 = Map.get(balance, [token_address: 0x00DEFA.., token_id: 2]) # 0\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the address of a transaction in the chain you're interested in"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"tokens_identifiers")," the list of tokens' identifiers (",(0,l.kt)("inlineCode",{parentName:"li"},"[token_address: HEX, token_id: POS_INT]"),") to return")),(0,l.kt)("p",null,"Returns a subset of the token balance of the chain that contains the transaction at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),".\nThe return value is a map where the keys are the tokens' identifiers: ",(0,l.kt)("inlineCode",{parentName:"p"},"[token_address: HEX, token_id: POS_INT]")," and the value are floats."),(0,l.kt)("p",null,"Useful if you need to retrieve many tokens at the same time."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If you're only interested in a specific token, consider ",(0,l.kt)("a",{parentName:"li",href:"#get_token_balance2-io"},"get_token_balance/2"),".")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"crypto"},"Crypto"),(0,l.kt)("h3",{id:"hash1"},"hash/1"),(0,l.kt)("p",null,"Equivalent to ",(0,l.kt)("a",{parentName:"p",href:"#hash2"},"hash/2"),' with the second argument "sha256".'),(0,l.kt)("h3",{id:"hash2"},"hash/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Crypto.hash("my text", "sha256") # "7330D2B39CA35EA..."\nCrypto.hash("my text", "sha512") # "A3D7E45A0D9BE5F..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"str")," the text to hash"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"algo"),' the hash algorithm ("sha256", "sha512", "sha3_256", "sha3_512", "blake2b", "keccak256")')),(0,l.kt)("p",null,"Returns the hash of ",(0,l.kt)("inlineCode",{parentName:"p"},"str")," by using ",(0,l.kt)("inlineCode",{parentName:"p"},"algo")," algorithm."),(0,l.kt)("h3",{id:"hmac1"},"hmac/1"),(0,l.kt)("p",null,"Equivalent to ",(0,l.kt)("a",{parentName:"p",href:"#hmac2"},"hmac/2"),' with the second argument "sha256".'),(0,l.kt)("h3",{id:"hmac2"},"hmac/2"),(0,l.kt)("p",null,"Equivalent to ",(0,l.kt)("a",{parentName:"p",href:"#hmac3"},"hmac/3")," with the third argument being a key created from the contract seed and secret data known by nodes.\nThe key created is deterministic and will always be the same for a contract."),(0,l.kt)("h3",{id:"hmac3"},"hmac/3"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Crypto.hmac("my text") # "374C7527733556..."\nCrypto.hmac("my text", "sha256") # "374C7527733556..."\nCrypto.hmac("my text", "sha256", "secret_key") # "901A365FF22B895..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"data")," the data to hash (if the data is hexadecimal it will be decoded in binary)"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"algo"),' the hash algorithm ("sha256", "sha512", "sha3_256", "sha3_512")'),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"key")," the key to perform the hmac (if the data is hexadecimal it will be decoded in binary)")),(0,l.kt)("p",null,"Returns the hmac of ",(0,l.kt)("inlineCode",{parentName:"p"},"data")," with ",(0,l.kt)("inlineCode",{parentName:"p"},"key")," using ",(0,l.kt)("inlineCode",{parentName:"p"},"algo"),"."),(0,l.kt)("h3",{id:"sign_with_recovery1"},"sign_with_recovery/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'signature_payload = Crypto.hash("tintin", "keccak256")\nCrypto.sign_with_recovery(signature_payload) # [r: "00ABCD...", s: "00BCDE...", v: 0]\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash")," the hash to sign")),(0,l.kt)("p",null,"Return a signature of the given ",(0,l.kt)("inlineCode",{parentName:"p"},"hash"),"."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"token"},"Token"),(0,l.kt)("h3",{id:"fetch_id_from_address1-io"},"fetch_id_from_address/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Token.fetch_id_from_address("000012345") # "3C21EF708BF11B4232..."\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address")," the token address")),(0,l.kt)("p",null,"Returns the token's id of the token at ",(0,l.kt)("inlineCode",{parentName:"p"},"address"),"."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"code"},"Code"),(0,l.kt)("h3",{id:"is_same2"},"is_same?/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'code = """\n@version\n\ncondition triggered_by: transaction, as: []\n\nactions triggered_by: transaction do\n Contract.add_uco_transfer to: 0x1234, amount: 15.5\nend\n"""\n\nCode.is_same?(code, transaction.code)\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"first_code")," a string containing a smart contract code"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"second_code")," a string containing a smart contract code")),(0,l.kt)("p",null,"Return true if codes are the same, false otherwise.\nThis function is more accurate than comparing two strings, as it convert code into structured AST and compare only code instruction and not line numbers, carriage return ..."),(0,l.kt)("h3",{id:"is_valid1-1"},"is_valid?/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'code = """\n@version\n\ncondition triggered_by: transaction, as: []\n\nactions triggered_by: transaction do\n Contract.add_uco_transfer to: 0x1234, amount: 15.5\nend\n"""\n\nCode.is_valid?(code)\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"code")," a string containing a smart contract code")),(0,l.kt)("p",null,"Returns true if the code is valid according to Archethic smart contracts language, false otherwise"),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"math"},"Math"),(0,l.kt)("h3",{id:"pow2"},"pow/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Math.pow(2, 3)\n# 8\nMath.pow(1.7, 8)\n# 69.75757441\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"number")," the number to apply the power"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"exponent")," the exponent of the power")),(0,l.kt)("p",null,"Returns the result of the power of number by exponent."),(0,l.kt)("h3",{id:"trunc1"},"trunc/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Math.trunc(8.32)\n# 8\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"number")," the number to truncate")),(0,l.kt)("p",null,"Returns the truncated number as an integer."),(0,l.kt)("h3",{id:"sqrt1"},"sqrt/1"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Math.sqrt(16)\n# 4\nMath.sqrt(12.5)\n# 3.53553390\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"number")," the number to calculate the square root")),(0,l.kt)("p",null,"Returns the square root if the number."),(0,l.kt)("h3",{id:"rem2"},"rem/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Math.rem(2.1, 3)\n# 2.1\nMath.rem(10, 3)\n# 1\nMath.rem(-10, 3)\n# -1\nMath.rem(10.2, 1)\n# 0.2\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"dividend")," the number to divid"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"divisor")," the number which divid")),(0,l.kt)("p",null,"Returns the remainder (modulo) of a division."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"http"},"Http"),(0,l.kt)("h3",{id:"request1-io"},"request/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("p",null,"Similar to ",(0,l.kt)("a",{parentName:"p",href:"#request2-io"},"request/2")," with ",(0,l.kt)("inlineCode",{parentName:"p"},'method: "GET"'),"."),(0,l.kt)("h3",{id:"request2-io"},"request/2 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("p",null,"Similar to ",(0,l.kt)("a",{parentName:"p",href:"#request3-io"},"request/3")," with ",(0,l.kt)("inlineCode",{parentName:"p"},"headers: Map.new()"),"."),(0,l.kt)("h3",{id:"request3-io"},"request/3 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("p",null,"Similar to ",(0,l.kt)("a",{parentName:"p",href:"#request4-io"},"request/4")," with ",(0,l.kt)("inlineCode",{parentName:"p"},"body: nil"),"."),(0,l.kt)("h3",{id:"request4-io"},"request/4 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'response = Http.request("https://fakerapi.it/api/v1/addresses?_quantity=1&_seed=watermelon", "GET", Map.new(), nil) # [status: 200, body: "..."]\nif response.status == 200 do\n # do something with response.body\nend\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"url")," the url to fetch"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"method")," the HTTP method (",(0,l.kt)("inlineCode",{parentName:"li"},'"GET"'),", ",(0,l.kt)("inlineCode",{parentName:"li"},'"POST"'),", ",(0,l.kt)("inlineCode",{parentName:"li"},'"PUT"'),", ",(0,l.kt)("inlineCode",{parentName:"li"},'"DELETE"')," or ",(0,l.kt)("inlineCode",{parentName:"li"},'"PATCH"'),")"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"headers")," the HTTP headers"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"body")," the HTTP body")),(0,l.kt)("p",null,"Performs a HTTP request and returns a map with ",(0,l.kt)("inlineCode",{parentName:"p"},"status")," (integer) and ",(0,l.kt)("inlineCode",{parentName:"p"},"body")," (string)."),(0,l.kt)("p",null,"This status integer can be any ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Status"},"HTTP status code"),"."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The URL must use HTTPS protocol."),(0,l.kt)("li",{parentName:"ul"},"The response body's size must be less than 256KB."),(0,l.kt)("li",{parentName:"ul"},"The response must be received in less than 2 seconds."),(0,l.kt)("li",{parentName:"ul"},"The response must be idempotent (= identical every time it is called)"),(0,l.kt)("li",{parentName:"ul"},"Only 1 call of either ",(0,l.kt)("inlineCode",{parentName:"li"},"request/1,2,3,4")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"request_many/1")," is allowed per execution.")),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"The function raises if these requirements are not meet.")),(0,l.kt)("admonition",{title:"Disclaimer",type:"danger"},(0,l.kt)("p",{parentName:"admonition"},"We discourage to call services that change their internal state directly (such as writing to a database or notifying a user). Because Archethic ",(0,l.kt)("strong",{parentName:"p"},"relies on atomic commitment of all storage nodes"),", it may happen that atomic commitment is not reached and the transaction resulting of a Smart Contract is not validated."),(0,l.kt)("p",{parentName:"admonition"},"Instead, you should notify the service of the transaction being validated. The service subscribes to that transaction via the GraphQL API, and once it receives a confirmation, it should act accordingly.")),(0,l.kt)("h3",{id:"request_many1-io"},"request_many/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'responses = Http.request_many([\n [url: "https://fakerapi.it/api/v1/users?_quantity=1&_gender=male&_seed=cucumber"],\n [url: "https://fakerapi.it/api/v1/users?_quantity=1&_gender=female&_seed=tomato", method: "GET", headers: Map.new(), body: nil]\n])\nfor r in responses do\n if r.status == 200 do\n # do something with r.body\n end\nend\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"request")," a list of requests to perform")),(0,l.kt)("p",null,"Performs a HTTP request and returns a map with ",(0,l.kt)("inlineCode",{parentName:"p"},"status")," (integer) and ",(0,l.kt)("inlineCode",{parentName:"p"},"body")," (string). Order and length is preserved."),(0,l.kt)("p",null,"See ",(0,l.kt)("a",{parentName:"p",href:"#request4-io"},"request/4")," for rules and more details."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"contract"},"Contract"),(0,l.kt)("h3",{id:"call_function3-io"},"call_function/3 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[I/O]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.call_function(0x0000ABCD..., "add", [1, 2])\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"contract_address")," the contract's adddress"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"function_name")," the function name"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"args")," the list of arguments to call the function with")),(0,l.kt)("p",null,"Calls the exported function ",(0,l.kt)("inlineCode",{parentName:"p"},"function_name")," of the Smart Contract at ",(0,l.kt)("inlineCode",{parentName:"p"},"contract_address")," with given ",(0,l.kt)("inlineCode",{parentName:"p"},"args")," and return the result value."),(0,l.kt)("h3",{id:"set_type1-transaction"},"set_type/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.set_type("transfer")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),' the transaction type ("contract", "transfer", "data", "hosting")')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to be of type ",(0,l.kt)("inlineCode",{parentName:"p"},"type"),"."),(0,l.kt)("h3",{id:"set_content1-transaction"},"set_content/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.set_content("Hello Smart Contract")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"content")," the transaction's content (we usually use this as the state of the smart contract)")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction content to be ",(0,l.kt)("inlineCode",{parentName:"p"},"content"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"While ",(0,l.kt)("inlineCode",{parentName:"p"},"content")," is always a string when you read it, it is possible here to send an integer or a float for convenience.\nFor any other data structure, you should serialize it with the ",(0,l.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library#json"},"Json module")," for example.")),(0,l.kt)("h3",{id:"set_code1-transaction"},"set_code/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.set_code("@version 1\\ncondition inherit: []")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"code")," the code")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction code to be ",(0,l.kt)("inlineCode",{parentName:"p"},"code"),"."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},'This example "closes" the contract, by adding an ',(0,l.kt)("inlineCode",{parentName:"p"},"condition inherit")," that doesn't accept anything. It will be impossible to create a new transaction in this chain.")),(0,l.kt)("h3",{id:"add_uco_transfer1-transaction"},"add_uco_transfer/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.add_uco_transfer(to: "000012345...", amount: 1)\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"uco_transfer")," a map with two keys:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"to"),": the destination address"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"amount"),": the number of UCO")))),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to add the ",(0,l.kt)("inlineCode",{parentName:"p"},"uco_transfer"),"."),(0,l.kt)("h3",{id:"add_uco_transfers1-transaction"},"add_uco_transfers/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("p",null,"Equivalent to call ",(0,l.kt)("a",{parentName:"p",href:"#add_uco_transfer1-transaction"},"add_uco_transfer/1")," for each element of the list"),(0,l.kt)("h3",{id:"add_token_transfer1-transaction"},"add_token_transfer/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.add_token_transfer(\n to: "000012345...",\n amount: 1.2,\n token_address: "000023456...")\nContract.add_token_transfer(\n to: "000012345...",\n amount: 1.2,\n token_id: 4,\n token_address: "000023456...")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"token_transfer")," a map with three or four keys:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"to"),": the destination address"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"amount"),": the number of UCO"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"token_address"),": the transaction address of the token"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"[token_id]"),": an optional integer to specify which index in the list (used for the NFTs)")))),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to add the ",(0,l.kt)("inlineCode",{parentName:"p"},"token_transfer"),"."),(0,l.kt)("h3",{id:"add_token_transfers1-transaction"},"add_token_transfers/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("p",null,"Equivalent to call ",(0,l.kt)("a",{parentName:"p",href:"#add_token_transfer1-transaction"},"add_token_transfer/1")," for each element of the list"),(0,l.kt)("h3",{id:"add_ownership1-transaction"},"add_ownership/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'authorized_keys = Map.new()\nauthorized_keys = Map.set(authorized_keys, public_key, encoded_secret_key)\nContract.add_ownership(\n secret: "ENCODED_SECRET1",\n authorized_keys: authorized_keys\n)\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"ownership")," a map with two keys:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"secret"),": the encoded secret"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"authorized_keys"),": a map where the keys are the ",(0,l.kt)("inlineCode",{parentName:"li"},"public_keys")," and the values are the ",(0,l.kt)("inlineCode",{parentName:"li"},"encoded_secret_keys")," (the keys to decode the secret encoded by each ",(0,l.kt)("inlineCode",{parentName:"li"},"public_key"),")")))),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"It is the developer's job to encode the secret & the secret key for each authorized key.")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to add the ",(0,l.kt)("inlineCode",{parentName:"p"},"ownership"),"."),(0,l.kt)("h3",{id:"add_ownerships1-transaction"},"add_ownerships/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("p",null,"Equivalent to call ",(0,l.kt)("a",{parentName:"p",href:"#add_ownership1-transaction"},"add_ownership/1")," for each element of the list"),(0,l.kt)("h3",{id:"add_recipient1-transaction"},"add_recipient/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},'Contract.add_recipient("000012345...")\n')),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address"),": a transaction address (one with a smart contract)")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mutates")," the next transaction to add the ",(0,l.kt)("inlineCode",{parentName:"p"},"address")," in the recipients."),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Recipients are used to trigger smart contracts")),(0,l.kt)("h3",{id:"add_recipients1-transaction"},"add_recipients/1 ",(0,l.kt)("inlineCode",{parentName:"h3"},"[Transaction]")),(0,l.kt)("p",null,"Equivalent to call ",(0,l.kt)("a",{parentName:"p",href:"#add_recipient1-transaction"},"add_recipients/1")," for each element of the list"),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"evm"},"Evm"),(0,l.kt)("h3",{id:"abi_encode2"},"abi_encode/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Evm.abi_encode(signature, data)\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signature"),': the function or tuple signature (ex: "baz(uint,address)")'),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"data"),": the data to encode")),(0,l.kt)("p",null,"Encodes the given ",(0,l.kt)("inlineCode",{parentName:"p"},"data")," according to the ",(0,l.kt)("inlineCode",{parentName:"p"},"signature"),"."),(0,l.kt)("h3",{id:"abi_decode2"},"abi_decode/2"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-elixir"},"Evm.abi_decode(signature, encoded_data)\n")),(0,l.kt)("p",null,"Parameters:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signature"),': the function or tuple signature (ex: "baz(uint,address)")'),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"encoded_data"),": the data to decode")),(0,l.kt)("p",null,"Decodes the given ",(0,l.kt)("inlineCode",{parentName:"p"},"encoded_data")," according to the ",(0,l.kt)("inlineCode",{parentName:"p"},"signature"),"."))}k.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/b684cce9.7050a27b.js b/assets/js/b684cce9.7050a27b.js deleted file mode 100644 index caa3fda4c..000000000 --- a/assets/js/b684cce9.7050a27b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6829],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=c(n),m=r,h=d["".concat(s,".").concat(m)]||d[m]||p[m]||i;return n?a.createElement(h,o(o({ref:t},u),{},{components:n})):a.createElement(h,o({ref:t},u))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:r,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>C,contentTitle:()=>S,default:()=>A,frontMatter:()=>_,metadata:()=>D,toc:()=>O});var a=n(87462),r=n(67294),i=n(3905),o=(n(8209),n(86010)),l=n(12466),s=n(16550),c=n(91980),u=n(67392),d=n(50012);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function m(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function h(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,c._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=m(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[s,c]=f({queryString:n,groupId:a}),[u,p]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,d.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),b=(()=>{const e=s??u;return h({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{b&&l(b)}),[b]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),p(e)}),[c,p,i]),tabValues:i}}var k=n(72389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(d(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:p},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function w(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=b(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(w,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}const T={tabItem:"tabItem_Ymn6"};function E(e){let{children:t,hidden:n,className:a}=e;return r.createElement("div",{role:"tabpanel",className:(0,o.Z)(T.tabItem,a),hidden:n},t)}const _={id:"dns",title:"AEWeb - Domain names",sidebar_label:"Domain Names",sidebar_position:2},S=void 0,D={unversionedId:"participate/aeweb/dns",id:"participate/aeweb/dns",title:"AEWeb - Domain names",description:"DNS (Domain Name System) is a mechanism which resolves websites names to server IP addresses, making website's URL nicer.",source:"@site/docs/participate/aeweb/dns.md",sourceDirName:"participate/aeweb",slug:"/participate/aeweb/dns",permalink:"/participate/aeweb/dns",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:2,frontMatter:{id:"dns",title:"AEWeb - Domain names",sidebar_label:"Domain Names",sidebar_position:2},sidebar:"docs",previous:{title:"How it works",permalink:"/participate/aeweb/how-it-works"},next:{title:"Usage",permalink:"/category/usage"}},C={},O=[{value:"DNSLink",id:"dnslink",level:2},{value:"Hosting provider integration",id:"hosting-provider-integration",level:3},{value:"SSL",id:"ssl",level:2},{value:"1. Get the certificate",id:"1-get-the-certificate",level:3},{value:"Manual",id:"manual",level:4},{value:"2. Add the certificate on chain",id:"2-add-the-certificate-on-chain",level:3}],I={toc:O},x="wrapper";function A(e){let{components:t,...r}=e;return(0,i.kt)(x,(0,a.Z)({},I,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"DNS (Domain Name System) is a mechanism which resolves websites names to server IP addresses, making website's URL nicer."),(0,i.kt)("p",null,"This works well for classical websites, however for decentralized websites new solutions need to be found such as: DNSLink, extensions, etc."),(0,i.kt)("h2",{id:"dnslink"},"DNSLink"),(0,i.kt)("p",null,"We suggest using a hybrid approach, where ordinary DNS systems would still be used, but would point to Archethic nodes (gateways) instead."),(0,i.kt)("p",null,"To redirect your domain name to your Archethic hosted website, a simple operation needs to be done."),(0,i.kt)("p",null,"In your website domain provider administration, you must add two entries:"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"NAME"),(0,i.kt)("th",{parentName:"tr",align:null},"TYPE"),(0,i.kt)("th",{parentName:"tr",align:null},"VALUE"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"example.com"),(0,i.kt)("td",{parentName:"tr",align:null},"CNAME"),(0,i.kt)("td",{parentName:"tr",align:null},"mainnet.archethic.net")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"_","dnslink.example.com"),(0,i.kt)("td",{parentName:"tr",align:null},"TXT"),(0,i.kt)("td",{parentName:"tr",align:null},"dnslink=/archethic/0f1e3....")))),(0,i.kt)("p",null,"The subdomain ",(0,i.kt)("inlineCode",{parentName:"p"},"_dnslink")," is used to indicate the reference address and will be used by the nodes to redirect to the on-chain version of your website."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"aeweb_CDN",src:n(82088).Z+"#gh-light-mode-only",width:"329",height:"135"}),"\n",(0,i.kt)("img",{alt:"aeweb_CDN",src:n(26436).Z+"#gh-dark-mode-only",width:"329",height:"135"})),(0,i.kt)("h3",{id:"hosting-provider-integration"},"Hosting provider integration"),(0,i.kt)(N,{mdxType:"Tabs"},(0,i.kt)(E,{value:"gandi",label:"Gandi",default:!0,mdxType:"TabItem"},(0,i.kt)("p",null,'Click on the "Add record" from the DNS record page'),(0,i.kt)("img",{src:"/img/gandi_list_dns_record.png"}),(0,i.kt)("p",null,'Fill the form with "TXT" record type and with _dnslink entry to point the website to the hosting transaction chain'),(0,i.kt)("img",{src:"/img/gandi_add_dns_record.png"}),(0,i.kt)("p",null,'Then you need to do the same for the "CNAME" record to point it to mainnet.archethic.net')),(0,i.kt)(E,{value:"cloudfare",label:"Cloudfare",default:!0,mdxType:"TabItem"},(0,i.kt)("p",null,'Click on the "Add record" from the DNS record page'),(0,i.kt)("img",{src:"/img/cloudfare_list_dns_record.png"}),(0,i.kt)("p",null,'Fill the form with "TXT" record type and with _dnslink entry to point the website to the hosting transaction chain'),(0,i.kt)("img",{src:"/img/cloudfare_add_dns_record.png"}),(0,i.kt)("p",null,'Then you need to do the same for the "CNAME" record to point it to mainnet.archethic.net')),(0,i.kt)(E,{value:"ovh",label:"OVH",default:!0,mdxType:"TabItem"},(0,i.kt)("p",null,'Click on the "Add record" from the DNS record page'),(0,i.kt)("img",{src:"/img/ovh_list_dns_record.png"}),(0,i.kt)("p",null,'Fill the form with "TXT" record type and with _dnslink entry to point the website to the hosting transaction chain'),(0,i.kt)("img",{src:"/img/ovh_add_dns_record.png"}),(0,i.kt)("p",null,'Then you need to do the same for the "CNAME" record to point it to mainnet.archethic.net'))),(0,i.kt)("h2",{id:"ssl"},"SSL"),(0,i.kt)("p",null,"We defined above to create a link between a domain and a hosted website on Archethic."),(0,i.kt)("p",null,"However, if we let it like this the modern browsers will not able to render the website without security warning."),(0,i.kt)("p",null,"Indeed, we said the example.com should be redirect to mainnet.archethic.net, but the certificate for mainnet.archethic.net can't\nverify example.com"),(0,i.kt)("p",null,"No worry, we can request a SSL certificate and embed it into AEWeb transactions.\nThe website will then be certified and the blockchain will render the website with security enabled."),(0,i.kt)("p",null,"To support it, we have to do two things:"),(0,i.kt)("h3",{id:"1-get-the-certificate"},"1. Get the certificate"),(0,i.kt)("h4",{id:"manual"},"Manual"),(0,i.kt)("p",null,"We recommand to use certbot CLI to perform this task, but we can use any other ACME client to request certificates."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"certbot certonly --manual --domain example.com --preferred-challenges dns\n")),(0,i.kt)("p",null,"This command will request a certificate to Let's Encrypt about ",(0,i.kt)("inlineCode",{parentName:"p"},"example.com")," and will require to prove\nthe ownership of the domain with a DNS challenge."),(0,i.kt)("p",null,"The certificate can be found at: ",(0,i.kt)("inlineCode",{parentName:"p"},"/etc/letsencrypt/live/example.com/cert.pem"),"\nand the key at: ",(0,i.kt)("inlineCode",{parentName:"p"},"/etc/letsencrypt/live/example.com/privatekey.pem")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"We might notice the command gives the end of validity for the certificate.\nBefore this date, you just have to reply the command to assert you still own the domain to get the new certificate and/or key.")),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(68647).Z,width:"2000",height:"1024"})),(0,i.kt)("h3",{id:"2-add-the-certificate-on-chain"},"2. Add the certificate on chain"),(0,i.kt)("p",null,"You need to get the certificate and the private key associated."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"The private key is necessary to sign/encrypt the webpages to match the certificates and be considered as valid.\nOnly the nodes will have access to this key to allow the servers to use SSL communications.")),(0,i.kt)("p",null,"If you use the AEWeb CLI, we can perform this by running the command: "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"aeweb deploy --seed XXX --path ./my_website --ssl-certificate ./cert.pem --ssl-key ./key.pem --endpoint https://mainnet.archethic.net \n")),(0,i.kt)("p",null,"You're website transaction chain will then contains a ",(0,i.kt)("inlineCode",{parentName:"p"},"Reference")," transaction with the ssl certificate in the content\nand the private key end to end encrypted for the network."))}A.isMDXComponent=!0},68647:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/acme_dns-3c3182fe25541047fc08bf5307993f70.png"},26436:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/aeweb_dns-dark-f3e9f702ea266d0aec084ba4960e8c62.svg"},82088:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/aeweb_dns-06778c4756739f0a9144cff45a4dd64e.svg"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/b684cce9.7c663b2d.js b/assets/js/b684cce9.7c663b2d.js new file mode 100644 index 000000000..214e4c991 --- /dev/null +++ b/assets/js/b684cce9.7c663b2d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6829],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=c(n),m=r,h=d["".concat(s,".").concat(m)]||d[m]||p[m]||i;return n?a.createElement(h,o(o({ref:t},u),{},{components:n})):a.createElement(h,o({ref:t},u))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:r,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>C,contentTitle:()=>S,default:()=>A,frontMatter:()=>_,metadata:()=>D,toc:()=>O});var a=n(87462),r=n(67294),i=n(3905),o=(n(8209),n(86010)),l=n(12466),s=n(16550),c=n(91980),u=n(67392),d=n(50012);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function m(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function h(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,c._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=m(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[s,c]=b({queryString:n,groupId:a}),[u,p]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,d.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),f=(()=>{const e=s??u;return h({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{f&&l(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),p(e)}),[c,p,i]),tabValues:i}}var k=n(72389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const t=e.currentTarget,n=u.indexOf(t),a=c[n].value;a!==i&&(d(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:p},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function w(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=f(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},r.createElement(y,(0,a.Z)({},e,t)),r.createElement(w,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}const T={tabItem:"tabItem_Ymn6"};function E(e){let{children:t,hidden:n,className:a}=e;return r.createElement("div",{role:"tabpanel",className:(0,o.Z)(T.tabItem,a),hidden:n},t)}const _={id:"dns",title:"AEWeb - Domain names",sidebar_label:"Domain Names",sidebar_position:2},S=void 0,D={unversionedId:"participate/aeweb/dns",id:"participate/aeweb/dns",title:"AEWeb - Domain names",description:"DNS (Domain Name System) is a mechanism which resolves websites names to server IP addresses, making website's URL nicer.",source:"@site/docs/participate/aeweb/dns.md",sourceDirName:"participate/aeweb",slug:"/participate/aeweb/dns",permalink:"/participate/aeweb/dns",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:2,frontMatter:{id:"dns",title:"AEWeb - Domain names",sidebar_label:"Domain Names",sidebar_position:2},sidebar:"docs",previous:{title:"How it works",permalink:"/participate/aeweb/how-it-works"},next:{title:"Usage",permalink:"/category/usage"}},C={},O=[{value:"DNSLink",id:"dnslink",level:2},{value:"Hosting provider integration",id:"hosting-provider-integration",level:3},{value:"SSL",id:"ssl",level:2},{value:"1. Get the certificate",id:"1-get-the-certificate",level:3},{value:"Manual",id:"manual",level:4},{value:"2. Add the certificate on chain",id:"2-add-the-certificate-on-chain",level:3}],I={toc:O},x="wrapper";function A(e){let{components:t,...r}=e;return(0,i.kt)(x,(0,a.Z)({},I,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"DNS (Domain Name System) is a mechanism which resolves websites names to server IP addresses, making website's URL nicer."),(0,i.kt)("p",null,"This works well for classical websites, however for decentralized websites new solutions need to be found such as: DNSLink, extensions, etc."),(0,i.kt)("h2",{id:"dnslink"},"DNSLink"),(0,i.kt)("p",null,"We suggest using a hybrid approach, where ordinary DNS systems would still be used, but would point to Archethic nodes (gateways) instead."),(0,i.kt)("p",null,"To redirect your domain name to your Archethic hosted website, a simple operation needs to be done."),(0,i.kt)("p",null,"In your website domain provider administration, you must add two entries:"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"NAME"),(0,i.kt)("th",{parentName:"tr",align:null},"TYPE"),(0,i.kt)("th",{parentName:"tr",align:null},"VALUE"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"example.com"),(0,i.kt)("td",{parentName:"tr",align:null},"CNAME"),(0,i.kt)("td",{parentName:"tr",align:null},"mainnet.archethic.net")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"_","dnslink.example.com"),(0,i.kt)("td",{parentName:"tr",align:null},"TXT"),(0,i.kt)("td",{parentName:"tr",align:null},"dnslink=/archethic/0f1e3....")))),(0,i.kt)("p",null,"The subdomain ",(0,i.kt)("inlineCode",{parentName:"p"},"_dnslink")," is used to indicate the reference address and will be used by the nodes to redirect to the on-chain version of your website."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"aeweb_CDN",src:n(82088).Z+"#gh-light-mode-only",width:"329",height:"135"}),"\n",(0,i.kt)("img",{alt:"aeweb_CDN",src:n(26436).Z+"#gh-dark-mode-only",width:"329",height:"135"})),(0,i.kt)("h3",{id:"hosting-provider-integration"},"Hosting provider integration"),(0,i.kt)(N,{mdxType:"Tabs"},(0,i.kt)(E,{value:"gandi",label:"Gandi",default:!0,mdxType:"TabItem"},(0,i.kt)("p",null,'Click on the "Add record" from the DNS record page'),(0,i.kt)("img",{src:"/img/gandi_list_dns_record.png"}),(0,i.kt)("p",null,'Fill the form with "TXT" record type and with _dnslink entry to point the website to the hosting transaction chain'),(0,i.kt)("img",{src:"/img/gandi_add_dns_record.png"}),(0,i.kt)("p",null,'Then you need to do the same for the "CNAME" record to point it to mainnet.archethic.net')),(0,i.kt)(E,{value:"cloudfare",label:"Cloudfare",default:!0,mdxType:"TabItem"},(0,i.kt)("p",null,'Click on the "Add record" from the DNS record page'),(0,i.kt)("img",{src:"/img/cloudfare_list_dns_record.png"}),(0,i.kt)("p",null,'Fill the form with "TXT" record type and with _dnslink entry to point the website to the hosting transaction chain'),(0,i.kt)("img",{src:"/img/cloudfare_add_dns_record.png"}),(0,i.kt)("p",null,'Then you need to do the same for the "CNAME" record to point it to mainnet.archethic.net')),(0,i.kt)(E,{value:"ovh",label:"OVH",default:!0,mdxType:"TabItem"},(0,i.kt)("p",null,'Click on the "Add record" from the DNS record page'),(0,i.kt)("img",{src:"/img/ovh_list_dns_record.png"}),(0,i.kt)("p",null,'Fill the form with "TXT" record type and with _dnslink entry to point the website to the hosting transaction chain'),(0,i.kt)("img",{src:"/img/ovh_add_dns_record.png"}),(0,i.kt)("p",null,'Then you need to do the same for the "CNAME" record to point it to mainnet.archethic.net'))),(0,i.kt)("h2",{id:"ssl"},"SSL"),(0,i.kt)("p",null,"We defined above to create a link between a domain and a hosted website on Archethic."),(0,i.kt)("p",null,"However, if we let it like this the modern browsers will not able to render the website without security warning."),(0,i.kt)("p",null,"Indeed, we said the example.com should be redirect to mainnet.archethic.net, but the certificate for mainnet.archethic.net can't\nverify example.com"),(0,i.kt)("p",null,"No worry, we can request a SSL certificate and embed it into AEWeb transactions.\nThe website will then be certified and the blockchain will render the website with security enabled."),(0,i.kt)("p",null,"To support it, we have to do two things:"),(0,i.kt)("h3",{id:"1-get-the-certificate"},"1. Get the certificate"),(0,i.kt)("h4",{id:"manual"},"Manual"),(0,i.kt)("p",null,"We recommand to use certbot CLI to perform this task, but we can use any other ACME client to request certificates."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"certbot certonly --manual --domain example.com --preferred-challenges dns\n")),(0,i.kt)("p",null,"This command will request a certificate to Let's Encrypt about ",(0,i.kt)("inlineCode",{parentName:"p"},"example.com")," and will require to prove\nthe ownership of the domain with a DNS challenge."),(0,i.kt)("p",null,"The certificate can be found at: ",(0,i.kt)("inlineCode",{parentName:"p"},"/etc/letsencrypt/live/example.com/cert.pem"),"\nand the key at: ",(0,i.kt)("inlineCode",{parentName:"p"},"/etc/letsencrypt/live/example.com/privatekey.pem")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"We might notice the command gives the end of validity for the certificate.\nBefore this date, you just have to reply the command to assert you still own the domain to get the new certificate and/or key.")),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(68647).Z,width:"2000",height:"1024"})),(0,i.kt)("h3",{id:"2-add-the-certificate-on-chain"},"2. Add the certificate on chain"),(0,i.kt)("p",null,"You need to get the certificate and the private key associated."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"The private key is necessary to sign/encrypt the webpages to match the certificates and be considered as valid.\nOnly the nodes will have access to this key to allow the servers to use SSL communications.")),(0,i.kt)("p",null,"If you use the AEWeb CLI, we can perform this by running the command: "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"aeweb deploy --seed XXX --path ./my_website --ssl-certificate ./cert.pem --ssl-key ./key.pem --endpoint https://mainnet.archethic.net \n")),(0,i.kt)("p",null,"You're website transaction chain will then contains a ",(0,i.kt)("inlineCode",{parentName:"p"},"Reference")," transaction with the ssl certificate in the content\nand the private key end to end encrypted for the network."))}A.isMDXComponent=!0},68647:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/acme_dns-3c3182fe25541047fc08bf5307993f70.png"},26436:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/aeweb_dns-dark-f3e9f702ea266d0aec084ba4960e8c62.svg"},82088:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/aeweb_dns-06778c4756739f0a9144cff45a4dd64e.svg"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/bb9d9339.942cf904.js b/assets/js/bb9d9339.eaf82b76.js similarity index 66% rename from assets/js/bb9d9339.942cf904.js rename to assets/js/bb9d9339.eaf82b76.js index e29eb1a2d..980238832 100644 --- a/assets/js/bb9d9339.942cf904.js +++ b/assets/js/bb9d9339.eaf82b76.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4398],{3905:(t,e,r)=>{r.d(e,{Zo:()=>u,kt:()=>m});var n=r(67294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var i=n.createContext({}),s=function(t){var e=n.useContext(i),r=e;return t&&(r="function"==typeof t?t(e):l(l({},e),t)),r},u=function(t){var e=s(t.components);return n.createElement(i.Provider,{value:e},t.children)},p="mdxType",d={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},y=n.forwardRef((function(t,e){var r=t.components,a=t.mdxType,o=t.originalType,i=t.parentName,u=c(t,["components","mdxType","originalType","parentName"]),p=s(r),y=a,m=p["".concat(i,".").concat(y)]||p[y]||d[y]||o;return r?n.createElement(m,l(l({ref:e},u),{},{components:r})):n.createElement(m,l({ref:e},u))}));function m(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var o=r.length,l=new Array(o);l[0]=y;var c={};for(var i in e)hasOwnProperty.call(e,i)&&(c[i]=e[i]);c.originalType=t,c[p]="string"==typeof t?t:a,l[1]=c;for(var s=2;s{r.r(e),r.d(e,{assets:()=>i,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));r(8209);const o={id:"sc-playground",title:"Smart Contracts Playground",sidebar_label:"Playground",sidebar_position:3},l=void 0,c={unversionedId:"build/smart-contracts/playground/sc-playground",id:"build/smart-contracts/playground/sc-playground",title:"Smart Contracts Playground",description:"The Smart Contracts playground is an online service use to write, test and deploy smart contracts.",source:"@site/docs/build/smart-contracts/playground/README.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/",permalink:"/build/smart-contracts/playground/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:3,frontMatter:{id:"sc-playground",title:"Smart Contracts Playground",sidebar_label:"Playground",sidebar_position:3},sidebar:"docs",previous:{title:"Language",permalink:"/build/smart-contracts/language/legacy/language"},next:{title:"Build",permalink:"/build/smart-contracts/playground/build"}},i={},s=[],u={toc:s},p="wrapper";function d(t){let{components:e,...o}=t;return(0,a.kt)(p,(0,n.Z)({},u,o,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The Smart Contracts playground is an online service use to write, test and deploy smart contracts.\nIt is available here: ",(0,a.kt)("a",{parentName:"p",href:"https://playground.archethic.net/"},"https://playground.archethic.net/"),". "),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/build/smart-contracts/playground/build"},"Build")," menu to build a smart contracts with the playground."),(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/build/smart-contracts/playground/deploy"},"Deploy")," menu to deploy a smart contracts.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"The Smart Contracts playground",src:r(73161).Z,width:"3600",height:"2390"})))}d.isMDXComponent=!0},73161:(t,e,r)=>{r.d(e,{Z:()=>n});const n=r.p+"assets/images/playground_hello_contract-41f5d178b0db8bcc3a7406bffc3f5035.png"},8209:(t,e,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4398],{3905:(t,e,r)=>{r.d(e,{Zo:()=>u,kt:()=>m});var n=r(67294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var i=n.createContext({}),s=function(t){var e=n.useContext(i),r=e;return t&&(r="function"==typeof t?t(e):l(l({},e),t)),r},u=function(t){var e=s(t.components);return n.createElement(i.Provider,{value:e},t.children)},p="mdxType",d={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},y=n.forwardRef((function(t,e){var r=t.components,a=t.mdxType,o=t.originalType,i=t.parentName,u=c(t,["components","mdxType","originalType","parentName"]),p=s(r),y=a,m=p["".concat(i,".").concat(y)]||p[y]||d[y]||o;return r?n.createElement(m,l(l({ref:e},u),{},{components:r})):n.createElement(m,l({ref:e},u))}));function m(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var o=r.length,l=new Array(o);l[0]=y;var c={};for(var i in e)hasOwnProperty.call(e,i)&&(c[i]=e[i]);c.originalType=t,c[p]="string"==typeof t?t:a,l[1]=c;for(var s=2;s{r.r(e),r.d(e,{assets:()=>i,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));r(8209);const o={id:"sc-playground",title:"Smart Contracts Playground",sidebar_label:"Playground",sidebar_position:3},l=void 0,c={unversionedId:"build/smart-contracts/playground/sc-playground",id:"build/smart-contracts/playground/sc-playground",title:"Smart Contracts Playground",description:"The Smart Contracts playground is an online service use to write, test and deploy smart contracts.",source:"@site/docs/build/smart-contracts/playground/README.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/",permalink:"/build/smart-contracts/playground/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:3,frontMatter:{id:"sc-playground",title:"Smart Contracts Playground",sidebar_label:"Playground",sidebar_position:3},sidebar:"docs",previous:{title:"Language",permalink:"/build/smart-contracts/language/legacy/language"},next:{title:"Build",permalink:"/build/smart-contracts/playground/build"}},i={},s=[],u={toc:s},p="wrapper";function d(t){let{components:e,...o}=t;return(0,a.kt)(p,(0,n.Z)({},u,o,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The Smart Contracts playground is an online service use to write, test and deploy smart contracts.\nIt is available here: ",(0,a.kt)("a",{parentName:"p",href:"https://playground.archethic.net/"},"https://playground.archethic.net/"),". "),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/build/smart-contracts/playground/build"},"Build")," menu to build a smart contracts with the playground."),(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/build/smart-contracts/playground/deploy"},"Deploy")," menu to deploy a smart contracts.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"The Smart Contracts playground",src:r(73161).Z,width:"3600",height:"2390"})))}d.isMDXComponent=!0},73161:(t,e,r)=>{r.d(e,{Z:()=>n});const n=r.p+"assets/images/playground_hello_contract-41f5d178b0db8bcc3a7406bffc3f5035.png"},8209:(t,e,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/bbc3785e.fea09594.js b/assets/js/bbc3785e.5363a7c4.js similarity index 50% rename from assets/js/bbc3785e.fea09594.js rename to assets/js/bbc3785e.5363a7c4.js index dff3efff3..a401c78ff 100644 --- a/assets/js/bbc3785e.fea09594.js +++ b/assets/js/bbc3785e.5363a7c4.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1690],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d=r.createContext({}),c=function(e){var t=r.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(d.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,d=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=c(n),m=a,f=s["".concat(d,".").concat(m)]||s[m]||u[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var d in t)hasOwnProperty.call(t,d)&&(l[d]=t[d]);l.originalType=e,l[s]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>s,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>l,default:()=>y,frontMatter:()=>i,metadata:()=>d,toc:()=>p});var r=n(87462),a=n(67294),o=n(3905);n(8209);const i={id:"endpoint",title:"Endpoint",hide_table_of_contents:!1},l=void 0,d={unversionedId:"build/api/schema/objects/endpoint",id:"build/api/schema/objects/endpoint",title:"Endpoint",description:"[Endpoint] represents a network node's endpoint",source:"@site/docs/build/api/schema/objects/endpoint.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/endpoint",permalink:"/build/api/schema/objects/endpoint",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"endpoint",title:"Endpoint",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Data",permalink:"/build/api/schema/objects/data"},next:{title:"LedgerOperations",permalink:"/build/api/schema/objects/ledger-operations"}},c={},p=[{value:"Fields",id:"fields",level:3},{value:'Endpoint.ipString ',id:"code-style-fontweight-normal-endpointbipbcodestring-",level:4},{value:'Endpoint.portInt ',id:"code-style-fontweight-normal-endpointbportbcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3}],s=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:s,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[Endpoint]"," represents a network node's endpoint"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type Endpoint {\n ip: String\n port: Int\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-endpointbipbcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Endpoint.",(0,o.kt)("b",null,"ip"))),(0,o.kt)(s,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-endpointbportbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Endpoint.",(0,o.kt)("b",null,"port"))),(0,o.kt)(s,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/queries/nearest-endpoints"},(0,o.kt)("inlineCode",{parentName:"a"},"nearestEndpoints"))," ",(0,o.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1690],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d=r.createContext({}),c=function(e){var t=r.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(d.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,d=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=c(n),m=a,f=s["".concat(d,".").concat(m)]||s[m]||u[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var d in t)hasOwnProperty.call(t,d)&&(l[d]=t[d]);l.originalType=e,l[s]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>s,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>l,default:()=>y,frontMatter:()=>i,metadata:()=>d,toc:()=>p});var r=n(87462),a=n(67294),o=n(3905);n(8209);const i={id:"endpoint",title:"Endpoint",hide_table_of_contents:!1},l=void 0,d={unversionedId:"build/api/schema/objects/endpoint",id:"build/api/schema/objects/endpoint",title:"Endpoint",description:"[Endpoint] represents a network node's endpoint",source:"@site/docs/build/api/schema/objects/endpoint.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/endpoint",permalink:"/build/api/schema/objects/endpoint",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"endpoint",title:"Endpoint",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Data",permalink:"/build/api/schema/objects/data"},next:{title:"LedgerOperations",permalink:"/build/api/schema/objects/ledger-operations"}},c={},p=[{value:"Fields",id:"fields",level:3},{value:'Endpoint.ipString ',id:"code-style-fontweight-normal-endpointbipbcodestring-",level:4},{value:'Endpoint.portInt ',id:"code-style-fontweight-normal-endpointbportbcodeint-",level:4},{value:"Returned by",id:"returned-by",level:3}],s=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:s,SpecifiedBy:u,Badge:m},b="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[Endpoint]"," represents a network node's endpoint"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type Endpoint {\n ip: String\n port: Int\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-endpointbipbcodestring-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Endpoint.",(0,o.kt)("b",null,"ip"))),(0,o.kt)(s,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-endpointbportbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"Endpoint.",(0,o.kt)("b",null,"port"))),(0,o.kt)(s,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"returned-by"},"Returned by"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/queries/nearest-endpoints"},(0,o.kt)("inlineCode",{parentName:"a"},"nearestEndpoints"))," ",(0,o.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/bd1424fb.40f0642c.js b/assets/js/bd1424fb.40f0642c.js deleted file mode 100644 index cef359d71..000000000 --- a/assets/js/bd1424fb.40f0642c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9036],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=a.createContext({}),c=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(p.Provider,{value:t},e.children)},s="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),s=c(n),u=i,k=s["".concat(p,".").concat(u)]||s[u]||h[u]||l;return n?a.createElement(k,r(r({ref:t},d),{},{components:n})):a.createElement(k,r({ref:t},d))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=u;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[s]="string"==typeof e?e:i,r[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>r,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const l={id:"wallet-spec",title:"Archethic's wallet specification"},r=void 0,o={unversionedId:"build/clients/wallet-spec",id:"build/clients/wallet-spec",title:"Archethic's wallet specification",description:"Onchain wallet (aka Keychain) is a wallet stored on Archethic blockchain in encrypted form.",source:"@site/docs/build/clients/wallet-specification.md",sourceDirName:"build/clients",slug:"/build/clients/wallet-spec",permalink:"/build/clients/wallet-spec",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"wallet-spec",title:"Archethic's wallet specification"},sidebar:"docs",previous:{title:"Archethic's wallet access",permalink:"/build/clients/wallet-access"},next:{title:"API",permalink:"/category/api"}},p={},c=[{value:"Glossary",id:"glossary",level:2},{value:"Cryptography",id:"cryptography",level:2},{value:"Derivation path",id:"derivation-path",level:3},{value:"Key derivation",id:"key-derivation",level:3},{value:"Replace the derivation path index",id:"replace-the-derivation-path-index",level:4},{value:"Hash of the derivation path",id:"hash-of-the-derivation-path",level:4},{value:"Derive private key",id:"derive-private-key",level:4},{value:"Derive public key",id:"derive-public-key",level:4},{value:"Encryption",id:"encryption",level:3},{value:"Encrypting the Onchain Wallet",id:"encrypting-the-onchain-wallet",level:4},{value:"Encoding of Encrypted Wallet",id:"encoding-of-encrypted-wallet",level:4},{value:"Encrypting Wallet Encryption Key",id:"encrypting-wallet-encryption-key",level:4},{value:"Encoding of Encrypted Wallet Key",id:"encoding-of-encrypted-wallet-key",level:4},{value:"Encoding",id:"encoding",level:2},{value:"Encoding of wallet",id:"encoding-of-wallet",level:3},{value:"Encoding of Curve Types",id:"encoding-of-curve-types",level:3},{value:"Encoding of Hash Types",id:"encoding-of-hash-types",level:3},{value:"Transaction representation",id:"transaction-representation",level:2},{value:"Format",id:"format",level:2},{value:"Public Key Format",id:"public-key-format",level:3},{value:"Account Address Format",id:"account-address-format",level:3}],d={toc:c},s="wrapper";function h(e){let{components:t,...n}=e;return(0,i.kt)(s,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Onchain wallet (aka ",(0,i.kt)("strong",{parentName:"p"},"Keychain"),") is a wallet stored on Archethic blockchain in encrypted form. "),(0,i.kt)("p",null,"This keychain aims to support several way to identify a user and its transaction chains.\nIt can also support multichains identification through the use of key derivation and derivation path."),(0,i.kt)("p",null,"A keychain is then a wallet which stores a main master seed, with a list of services (Archethic chains / other crypto identification) encrypted and only accessible by a list of authorized public keys"),(0,i.kt)("h2",{id:"glossary"},"Glossary"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"w_{e}")," = Encoded Onchain Archethic Wallet"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")," = AES256 CTR Key used to encrypt w_{e}"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"enc(w_{e})")," = AES256 CTR Encryption of ",(0,i.kt)("inlineCode",{parentName:"li"},"w_{e}")," using ",(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ew_{aes}")," = Encoded ",(0,i.kt)("inlineCode",{parentName:"li"},"enc(w_{e})")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"aes_key")," = AES256 CBC Key used to encrypt ",(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"enc(wk_{aes})")," = AES256 CBC Encryption of ",(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")," using ",(0,i.kt)("inlineCode",{parentName:"li"},"aes_key")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ewk_{aes}")," = Encoded ",(0,i.kt)("inlineCode",{parentName:"li"},"enc(wk_{aes})")," "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"encode(pub_key)")," = Encoded Public Key. "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"arch_address")," = Encoded Account Address. "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o_{priv}")," = Origin Device Private Key "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o_{pub}")," = Origin Device Public Key (raw 04xy) "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"encode(o_{pub})")," = Encoded Origin Device Public Key "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"e_{key}")," = Ephemeral Key Pair "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"e_{pub}")," = Ephemeral Public Key (raw 04xy) "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"e_{priv}")," = Ephemeral Private Key ")),(0,i.kt)("h2",{id:"cryptography"},"Cryptography"),(0,i.kt)("h3",{id:"derivation-path"},"Derivation path"),(0,i.kt)("p",null,"Archethic's keychain is using hierarchical derivation key scheme inspired by BIP32 to define a way\nto generate keys and addresses."),(0,i.kt)("p",null,"Because Archethic cryptography and transaction chain paradigm differs from traditional blockchain (used in BIP32/BIP44)\nwe adapted it to use specific derivation scheme (as describe in the BIP43)"),(0,i.kt)("p",null,"The main derivation path of Archethic keychain is: ",(0,i.kt)("strong",{parentName:"p"},"m/650'/account/index")," (where 650 is the Archethic transaction chain purpose - in the BIP43 terminology)"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"account")," can be anything, by default ",(0,i.kt)("inlineCode",{parentName:"p"},"0")," is the main uco transaction chain, but it could be customized to create more entropy."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"index")," is the number of transaction in the chain, used to compute the derived keys and addresses"),(0,i.kt)("h3",{id:"key-derivation"},"Key derivation"),(0,i.kt)("p",null,"In order to derive the keys using the derivation path mentioned above, we implemented our own key derivation scheme, which takes inspiration from BIP32 but simplifies it a bit."),(0,i.kt)("h4",{id:"replace-the-derivation-path-index"},"Replace the derivation path index"),(0,i.kt)("p",null,"Given the derivation path: ",(0,i.kt)("inlineCode",{parentName:"p"},"m/650'/0/0"),", we change the last number (the transaction's index in the chain) we some variable provided by the application(ie: ",(0,i.kt)("inlineCode",{parentName:"p"},"m/650'/0/1")," will give the 1st transaction's address on the chain)"),(0,i.kt)("h4",{id:"hash-of-the-derivation-path"},"Hash of the derivation path"),(0,i.kt)("p",null,"Once the derivation path index is replaced we hashed it to give a constant size through ",(0,i.kt)("inlineCode",{parentName:"p"},"SHA256")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"hashedPath = SHA256(ReplaceDerivationPath(derivationPath, index))\n")),(0,i.kt)("h4",{id:"derive-private-key"},"Derive private key"),(0,i.kt)("p",null,"Then we have to derive the private key based on the hashedPath and the master seed by using HMAC and extracting the first 32 bytes of the result"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"extendedSeed = HMAC-SHA512(Key=MasterSeed, Data=hashedPath)\nextendedPrivateKey = extendedSeed.slice(0, 32)\n")),(0,i.kt)("h4",{id:"derive-public-key"},"Derive public key"),(0,i.kt)("p",null,"Now with the given private key we can easily extract the public key for the given curve specified in the Keychain's service"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"{ publicKey, private } = generateKeyPair(extendedPrivateKey, curve)\n")),(0,i.kt)("h3",{id:"encryption"},"Encryption"),(0,i.kt)("p",null,"The keychain is using a double encryption scheme where:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"the wallet is encrypted with AES "),(0,i.kt)("li",{parentName:"ul"},"the ",(0,i.kt)("inlineCode",{parentName:"li"},"aes_key")," is encrypted with elliptic curve cryptography using ECIES (Elliptic Curve Integration Encryption Scheme): ",(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")," for the authorized public keys")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Ephemeral key is used to perform ECDH with authorized public key, in order to derive ",(0,i.kt)("inlineCode",{parentName:"p"},"aes_key"),". This ",(0,i.kt)("inlineCode",{parentName:"p"},"aes_key")," is then used to encrypt the ",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}"),". This is called ",(0,i.kt)("inlineCode",{parentName:"p"},"ECIESE"),"(Elliptic Curve Integration Encryption Scheme Ephemeral)")),(0,i.kt)("p",null,"Then to guarantee the security of the wallet, only the authorized public keys are able to decrypt the encrypted aes key(",(0,i.kt)("inlineCode",{parentName:"p"},"enc(aes_key)"),") to be able to decrypt the encrypted wallet (",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}"),")"),(0,i.kt)("h4",{id:"encrypting-the-onchain-wallet"},"Encrypting the Onchain Wallet"),(0,i.kt)("p",null,"The onchain encoded wallet ",(0,i.kt)("inlineCode",{parentName:"p"},"w_{e}")," is encrypted using symmetric encryption AES256 CTR key ",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}")," as follows: "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"wallet_iv [16 bytes], reserved [16 bytes] = sha256(sha256(wk_{aes})) \nenc(w_{e}) = aes256(mode=ctr, key = wk_{aes}, iv = wallet_iv, data = w_{e}) \n")),(0,i.kt)("h4",{id:"encoding-of-encrypted-wallet"},"Encoding of Encrypted Wallet"),(0,i.kt)("p",null,"The above encrypted wallet ",(0,i.kt)("inlineCode",{parentName:"p"},"enc(w_{e})")," is stored on the Archethic Blockchain with the following format. "),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"enc(w_{e}) ","[bytes]")))),(0,i.kt)("h4",{id:"encrypting-wallet-encryption-key"},"Encrypting Wallet Encryption Key"),(0,i.kt)("p",null,"The key (",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}"),") which encrypts the wallet (",(0,i.kt)("inlineCode",{parentName:"p"},"w_{e}"),") is subsequently encrypted using Elliptic Curve Integrated Encryption Scheme to support different authorized public keys and to reduce the increased space overhead of the encryptions. "),(0,i.kt)("p",null,"Algorithm$ for encrypting ",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}"),"= ECIES (ECDH + AES256 CBC) "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"ecdh_secret = ecdh_point_x(e_{pub}, o_{priv}) = ecdh_point_x(e_{priv}, o_{pub}) \n \naes_key [32 bytes], iv [16 bytes], auth_seed [16 bytes] = sha512(sha512(ecdh\\_secret)) \n \nenc(wk_{aes}) = aes256(mode=cbc, key = aes\\_key, iv = iv, data = wk_{aes}) \n \nauth_key = sha256(auth_seed) \n \nauth_tag [16 bytes], reserved [16 bytes] = hmac256(key = auth_key, data = enc(wk_{aes}))\n")),(0,i.kt)("h4",{id:"encoding-of-encrypted-wallet-key"},"Encoding of Encrypted Wallet Key"),(0,i.kt)("p",null,"The above encrypted key ",(0,i.kt)("inlineCode",{parentName:"p"},"enc(wk_{aes})")," is stored on the Archethic Blockchain with the following format. "),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"e_{pub} 04xy ","[bytes]"),(0,i.kt)("th",{parentName:"tr",align:null},"auth_tag ","[16 bytes]"),(0,i.kt)("th",{parentName:"tr",align:null},"enc(wk_{aes}) ","[32 bytes]")))),(0,i.kt)("h2",{id:"encoding"},"Encoding"),(0,i.kt)("p",null,"The wallet before encryption is encoding into a binary format"),(0,i.kt)("h3",{id:"encoding-of-wallet"},"Encoding of wallet"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Version"),(0,i.kt)("th",{parentName:"tr",align:null},"Seed size"),(0,i.kt)("th",{parentName:"tr",align:null},"Seed"),(0,i.kt)("th",{parentName:"tr",align:null},"Nb services"),(0,i.kt)("th",{parentName:"tr",align:null},"Service name size"),(0,i.kt)("th",{parentName:"tr",align:null},"Service name"),(0,i.kt)("th",{parentName:"tr",align:null},"Derivation path length"),(0,i.kt)("th",{parentName:"tr",align:null},"Derivation path"),(0,i.kt)("th",{parentName:"tr",align:null},"Curve type"),(0,i.kt)("th",{parentName:"tr",align:null},"Hash type"),(0,i.kt)("th",{parentName:"tr",align:null},"..."))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"4 bytes"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"...")))),(0,i.kt)("h3",{id:"encoding-of-curve-types"},"Encoding of Curve Types"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"curve_type")," is a 1 byte long field, hex encoded. Currently, following curves are supported: "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"0: ED25519 "),(0,i.kt)("li",{parentName:"ul"},"1: NISTP256 "),(0,i.kt)("li",{parentName:"ul"},"2: SECP256K1 ")),(0,i.kt)("h3",{id:"encoding-of-hash-types"},"Encoding of Hash Types"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"hash_type")," is a 1 byte long field, hex encoded. Currently, following hashes are supported: "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"0: SHA256 (sha2) "),(0,i.kt)("li",{parentName:"ul"},"1: SHA512 (sha2) "),(0,i.kt)("li",{parentName:"ul"},"2: SHA3_256 (keccak) "),(0,i.kt)("li",{parentName:"ul"},"3: SHA3_512 (keccak) "),(0,i.kt)("li",{parentName:"ul"},"4: BLAKE2B ")),(0,i.kt)("h2",{id:"transaction-representation"},"Transaction representation"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"Transaction \n- Data: \n - Ownerships: \n Secret: Encrypted Wallet, \n Authorized Keys: \n Public Key: Origin Device / Password Public Key, \n Encrypted Secret Key: Encrypted AES Key for the authorized public key \n")),(0,i.kt)("h2",{id:"format"},"Format"),(0,i.kt)("h3",{id:"public-key-format"},"Public Key Format"),(0,i.kt)("p",null,"When clients have to produce public key, an origin type identification byte have to prepend before the key material as well as the curve type."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Curve ID"),(0,i.kt)("th",{parentName:"tr",align:null},"Origin ID"),(0,i.kt)("th",{parentName:"tr",align:null},"Key material"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes")))),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"origin_type")," is a 1 byte long field, hex encoded. Currently, following origins are defined: "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"0: Onchain Wallet"),(0,i.kt)("li",{parentName:"ul"},"1: Software Wallet (Node, Mobile App, Desktop, etc.)"),(0,i.kt)("li",{parentName:"ul"},"2: TPM (Node) "),(0,i.kt)("li",{parentName:"ul"},"3: Yubikey (Node, Hardware Wallet)"),(0,i.kt)("li",{parentName:"ul"},"4: Ledger (Hardware Wallet) ")),(0,i.kt)("h3",{id:"account-address-format"},"Account Address Format"),(0,i.kt)("p",null,"Archethic addresses following a specific format to version algorithms used helping\nto evolve easily between curves and hash algorithms."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Curve Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Hash algo"),(0,i.kt)("th",{parentName:"tr",align:null},"hash(encode(pub_key))"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes")))))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/bd1424fb.ab7f5430.js b/assets/js/bd1424fb.ab7f5430.js new file mode 100644 index 000000000..d11f1c21b --- /dev/null +++ b/assets/js/bd1424fb.ab7f5430.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9036],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=a.createContext({}),c=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(p.Provider,{value:t},e.children)},s="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),s=c(n),u=i,k=s["".concat(p,".").concat(u)]||s[u]||h[u]||l;return n?a.createElement(k,r(r({ref:t},d),{},{components:n})):a.createElement(k,r({ref:t},d))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=u;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[s]="string"==typeof e?e:i,r[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>r,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const l={id:"wallet-spec",title:"Archethic's wallet specification"},r=void 0,o={unversionedId:"build/clients/wallet-spec",id:"build/clients/wallet-spec",title:"Archethic's wallet specification",description:"Onchain wallet (aka Keychain) is a wallet stored on Archethic blockchain in encrypted form.",source:"@site/docs/build/clients/wallet-specification.md",sourceDirName:"build/clients",slug:"/build/clients/wallet-spec",permalink:"/build/clients/wallet-spec",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"wallet-spec",title:"Archethic's wallet specification"},sidebar:"docs",previous:{title:"Archethic's wallet access",permalink:"/build/clients/wallet-access"},next:{title:"API",permalink:"/category/api"}},p={},c=[{value:"Glossary",id:"glossary",level:2},{value:"Cryptography",id:"cryptography",level:2},{value:"Derivation path",id:"derivation-path",level:3},{value:"Key derivation",id:"key-derivation",level:3},{value:"Replace the derivation path index",id:"replace-the-derivation-path-index",level:4},{value:"Hash of the derivation path",id:"hash-of-the-derivation-path",level:4},{value:"Derive private key",id:"derive-private-key",level:4},{value:"Derive public key",id:"derive-public-key",level:4},{value:"Encryption",id:"encryption",level:3},{value:"Encrypting the Onchain Wallet",id:"encrypting-the-onchain-wallet",level:4},{value:"Encoding of Encrypted Wallet",id:"encoding-of-encrypted-wallet",level:4},{value:"Encrypting Wallet Encryption Key",id:"encrypting-wallet-encryption-key",level:4},{value:"Encoding of Encrypted Wallet Key",id:"encoding-of-encrypted-wallet-key",level:4},{value:"Encoding",id:"encoding",level:2},{value:"Encoding of wallet",id:"encoding-of-wallet",level:3},{value:"Encoding of Curve Types",id:"encoding-of-curve-types",level:3},{value:"Encoding of Hash Types",id:"encoding-of-hash-types",level:3},{value:"Transaction representation",id:"transaction-representation",level:2},{value:"Format",id:"format",level:2},{value:"Public Key Format",id:"public-key-format",level:3},{value:"Account Address Format",id:"account-address-format",level:3}],d={toc:c},s="wrapper";function h(e){let{components:t,...n}=e;return(0,i.kt)(s,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Onchain wallet (aka ",(0,i.kt)("strong",{parentName:"p"},"Keychain"),") is a wallet stored on Archethic blockchain in encrypted form. "),(0,i.kt)("p",null,"This keychain aims to support several way to identify a user and its transaction chains.\nIt can also support multichains identification through the use of key derivation and derivation path."),(0,i.kt)("p",null,"A keychain is then a wallet which stores a main master seed, with a list of services (Archethic chains / other crypto identification) encrypted and only accessible by a list of authorized public keys"),(0,i.kt)("h2",{id:"glossary"},"Glossary"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"w_{e}")," = Encoded Onchain Archethic Wallet"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")," = AES256 CTR Key used to encrypt w_{e}"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"enc(w_{e})")," = AES256 CTR Encryption of ",(0,i.kt)("inlineCode",{parentName:"li"},"w_{e}")," using ",(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ew_{aes}")," = Encoded ",(0,i.kt)("inlineCode",{parentName:"li"},"enc(w_{e})")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"aes_key")," = AES256 CBC Key used to encrypt ",(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"enc(wk_{aes})")," = AES256 CBC Encryption of ",(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")," using ",(0,i.kt)("inlineCode",{parentName:"li"},"aes_key")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ewk_{aes}")," = Encoded ",(0,i.kt)("inlineCode",{parentName:"li"},"enc(wk_{aes})")," "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"encode(pub_key)")," = Encoded Public Key. "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"arch_address")," = Encoded Account Address. "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o_{priv}")," = Origin Device Private Key "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o_{pub}")," = Origin Device Public Key (raw 04xy) "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"encode(o_{pub})")," = Encoded Origin Device Public Key "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"e_{key}")," = Ephemeral Key Pair "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"e_{pub}")," = Ephemeral Public Key (raw 04xy) "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"e_{priv}")," = Ephemeral Private Key ")),(0,i.kt)("h2",{id:"cryptography"},"Cryptography"),(0,i.kt)("h3",{id:"derivation-path"},"Derivation path"),(0,i.kt)("p",null,"Archethic's keychain is using hierarchical derivation key scheme inspired by BIP32 to define a way\nto generate keys and addresses."),(0,i.kt)("p",null,"Because Archethic cryptography and transaction chain paradigm differs from traditional blockchain (used in BIP32/BIP44)\nwe adapted it to use specific derivation scheme (as describe in the BIP43)"),(0,i.kt)("p",null,"The main derivation path of Archethic keychain is: ",(0,i.kt)("strong",{parentName:"p"},"m/650'/account/index")," (where 650 is the Archethic transaction chain purpose - in the BIP43 terminology)"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"account")," can be anything, by default ",(0,i.kt)("inlineCode",{parentName:"p"},"0")," is the main uco transaction chain, but it could be customized to create more entropy."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"index")," is the number of transaction in the chain, used to compute the derived keys and addresses"),(0,i.kt)("h3",{id:"key-derivation"},"Key derivation"),(0,i.kt)("p",null,"In order to derive the keys using the derivation path mentioned above, we implemented our own key derivation scheme, which takes inspiration from BIP32 but simplifies it a bit."),(0,i.kt)("h4",{id:"replace-the-derivation-path-index"},"Replace the derivation path index"),(0,i.kt)("p",null,"Given the derivation path: ",(0,i.kt)("inlineCode",{parentName:"p"},"m/650'/0/0"),", we change the last number (the transaction's index in the chain) we some variable provided by the application(ie: ",(0,i.kt)("inlineCode",{parentName:"p"},"m/650'/0/1")," will give the 1st transaction's address on the chain)"),(0,i.kt)("h4",{id:"hash-of-the-derivation-path"},"Hash of the derivation path"),(0,i.kt)("p",null,"Once the derivation path index is replaced we hashed it to give a constant size through ",(0,i.kt)("inlineCode",{parentName:"p"},"SHA256")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"hashedPath = SHA256(ReplaceDerivationPath(derivationPath, index))\n")),(0,i.kt)("h4",{id:"derive-private-key"},"Derive private key"),(0,i.kt)("p",null,"Then we have to derive the private key based on the hashedPath and the master seed by using HMAC and extracting the first 32 bytes of the result"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"extendedSeed = HMAC-SHA512(Key=MasterSeed, Data=hashedPath)\nextendedPrivateKey = extendedSeed.slice(0, 32)\n")),(0,i.kt)("h4",{id:"derive-public-key"},"Derive public key"),(0,i.kt)("p",null,"Now with the given private key we can easily extract the public key for the given curve specified in the Keychain's service"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"{ publicKey, private } = generateKeyPair(extendedPrivateKey, curve)\n")),(0,i.kt)("h3",{id:"encryption"},"Encryption"),(0,i.kt)("p",null,"The keychain is using a double encryption scheme where:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"the wallet is encrypted with AES "),(0,i.kt)("li",{parentName:"ul"},"the ",(0,i.kt)("inlineCode",{parentName:"li"},"aes_key")," is encrypted with elliptic curve cryptography using ECIES (Elliptic Curve Integration Encryption Scheme): ",(0,i.kt)("inlineCode",{parentName:"li"},"wk_{aes}")," for the authorized public keys")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Ephemeral key is used to perform ECDH with authorized public key, in order to derive ",(0,i.kt)("inlineCode",{parentName:"p"},"aes_key"),". This ",(0,i.kt)("inlineCode",{parentName:"p"},"aes_key")," is then used to encrypt the ",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}"),". This is called ",(0,i.kt)("inlineCode",{parentName:"p"},"ECIESE"),"(Elliptic Curve Integration Encryption Scheme Ephemeral)")),(0,i.kt)("p",null,"Then to guarantee the security of the wallet, only the authorized public keys are able to decrypt the encrypted aes key(",(0,i.kt)("inlineCode",{parentName:"p"},"enc(aes_key)"),") to be able to decrypt the encrypted wallet (",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}"),")"),(0,i.kt)("h4",{id:"encrypting-the-onchain-wallet"},"Encrypting the Onchain Wallet"),(0,i.kt)("p",null,"The onchain encoded wallet ",(0,i.kt)("inlineCode",{parentName:"p"},"w_{e}")," is encrypted using symmetric encryption AES256 CTR key ",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}")," as follows: "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"wallet_iv [16 bytes], reserved [16 bytes] = sha256(sha256(wk_{aes})) \nenc(w_{e}) = aes256(mode=ctr, key = wk_{aes}, iv = wallet_iv, data = w_{e}) \n")),(0,i.kt)("h4",{id:"encoding-of-encrypted-wallet"},"Encoding of Encrypted Wallet"),(0,i.kt)("p",null,"The above encrypted wallet ",(0,i.kt)("inlineCode",{parentName:"p"},"enc(w_{e})")," is stored on the Archethic Blockchain with the following format. "),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"enc(w_{e}) ","[bytes]")))),(0,i.kt)("h4",{id:"encrypting-wallet-encryption-key"},"Encrypting Wallet Encryption Key"),(0,i.kt)("p",null,"The key (",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}"),") which encrypts the wallet (",(0,i.kt)("inlineCode",{parentName:"p"},"w_{e}"),") is subsequently encrypted using Elliptic Curve Integrated Encryption Scheme to support different authorized public keys and to reduce the increased space overhead of the encryptions. "),(0,i.kt)("p",null,"Algorithm$ for encrypting ",(0,i.kt)("inlineCode",{parentName:"p"},"wk_{aes}"),"= ECIES (ECDH + AES256 CBC) "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"ecdh_secret = ecdh_point_x(e_{pub}, o_{priv}) = ecdh_point_x(e_{priv}, o_{pub}) \n \naes_key [32 bytes], iv [16 bytes], auth_seed [16 bytes] = sha512(sha512(ecdh\\_secret)) \n \nenc(wk_{aes}) = aes256(mode=cbc, key = aes\\_key, iv = iv, data = wk_{aes}) \n \nauth_key = sha256(auth_seed) \n \nauth_tag [16 bytes], reserved [16 bytes] = hmac256(key = auth_key, data = enc(wk_{aes}))\n")),(0,i.kt)("h4",{id:"encoding-of-encrypted-wallet-key"},"Encoding of Encrypted Wallet Key"),(0,i.kt)("p",null,"The above encrypted key ",(0,i.kt)("inlineCode",{parentName:"p"},"enc(wk_{aes})")," is stored on the Archethic Blockchain with the following format. "),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"e_{pub} 04xy ","[bytes]"),(0,i.kt)("th",{parentName:"tr",align:null},"auth_tag ","[16 bytes]"),(0,i.kt)("th",{parentName:"tr",align:null},"enc(wk_{aes}) ","[32 bytes]")))),(0,i.kt)("h2",{id:"encoding"},"Encoding"),(0,i.kt)("p",null,"The wallet before encryption is encoding into a binary format"),(0,i.kt)("h3",{id:"encoding-of-wallet"},"Encoding of wallet"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Version"),(0,i.kt)("th",{parentName:"tr",align:null},"Seed size"),(0,i.kt)("th",{parentName:"tr",align:null},"Seed"),(0,i.kt)("th",{parentName:"tr",align:null},"Nb services"),(0,i.kt)("th",{parentName:"tr",align:null},"Service name size"),(0,i.kt)("th",{parentName:"tr",align:null},"Service name"),(0,i.kt)("th",{parentName:"tr",align:null},"Derivation path length"),(0,i.kt)("th",{parentName:"tr",align:null},"Derivation path"),(0,i.kt)("th",{parentName:"tr",align:null},"Curve type"),(0,i.kt)("th",{parentName:"tr",align:null},"Hash type"),(0,i.kt)("th",{parentName:"tr",align:null},"..."))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"4 bytes"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"...")))),(0,i.kt)("h3",{id:"encoding-of-curve-types"},"Encoding of Curve Types"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"curve_type")," is a 1 byte long field, hex encoded. Currently, following curves are supported: "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"0: ED25519 "),(0,i.kt)("li",{parentName:"ul"},"1: NISTP256 "),(0,i.kt)("li",{parentName:"ul"},"2: SECP256K1 ")),(0,i.kt)("h3",{id:"encoding-of-hash-types"},"Encoding of Hash Types"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"hash_type")," is a 1 byte long field, hex encoded. Currently, following hashes are supported: "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"0: SHA256 (sha2) "),(0,i.kt)("li",{parentName:"ul"},"1: SHA512 (sha2) "),(0,i.kt)("li",{parentName:"ul"},"2: SHA3_256 (keccak) "),(0,i.kt)("li",{parentName:"ul"},"3: SHA3_512 (keccak) "),(0,i.kt)("li",{parentName:"ul"},"4: BLAKE2B ")),(0,i.kt)("h2",{id:"transaction-representation"},"Transaction representation"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"Transaction \n- Data: \n - Ownerships: \n Secret: Encrypted Wallet, \n Authorized Keys: \n Public Key: Origin Device / Password Public Key, \n Encrypted Secret Key: Encrypted AES Key for the authorized public key \n")),(0,i.kt)("h2",{id:"format"},"Format"),(0,i.kt)("h3",{id:"public-key-format"},"Public Key Format"),(0,i.kt)("p",null,"When clients have to produce public key, an origin type identification byte have to prepend before the key material as well as the curve type."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Curve ID"),(0,i.kt)("th",{parentName:"tr",align:null},"Origin ID"),(0,i.kt)("th",{parentName:"tr",align:null},"Key material"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes")))),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"origin_type")," is a 1 byte long field, hex encoded. Currently, following origins are defined: "),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"0: Onchain Wallet"),(0,i.kt)("li",{parentName:"ul"},"1: Software Wallet (Node, Mobile App, Desktop, etc.)"),(0,i.kt)("li",{parentName:"ul"},"2: TPM (Node) "),(0,i.kt)("li",{parentName:"ul"},"3: Yubikey (Node, Hardware Wallet)"),(0,i.kt)("li",{parentName:"ul"},"4: Ledger (Hardware Wallet) ")),(0,i.kt)("h3",{id:"account-address-format"},"Account Address Format"),(0,i.kt)("p",null,"Archethic addresses following a specific format to version algorithms used helping\nto evolve easily between curves and hash algorithms."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Curve Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Hash algo"),(0,i.kt)("th",{parentName:"tr",align:null},"hash(encode(pub_key))"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"1 byte"),(0,i.kt)("td",{parentName:"tr",align:null},"N bytes")))))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/bd14bfe1.58c64338.js b/assets/js/bd14bfe1.bd6df339.js similarity index 51% rename from assets/js/bd14bfe1.58c64338.js rename to assets/js/bd14bfe1.bd6df339.js index 80c22b904..2ec50b593 100644 --- a/assets/js/bd14bfe1.58c64338.js +++ b/assets/js/bd14bfe1.bd6df339.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4060],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>y});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),s=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=s(n),u=a,y=p["".concat(o,".").concat(u)]||p[u]||h[u]||i;return n?r.createElement(y,c(c({ref:t},d),{},{components:n})):r.createElement(y,c({ref:t},d))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,c=new Array(i);c[0]=u;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[p]="string"==typeof e?e:a,c[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"wallet-access",title:"Archethic's wallet access"},c=void 0,l={unversionedId:"build/clients/wallet-access",id:"build/clients/wallet-access",title:"Archethic's wallet access",description:"Onchain wallet (aka Keychain) is a wallet stored on Archethic blockchain in encrypted form, to allow only the authorized access to read it and build transaction from it.",source:"@site/docs/build/clients/wallet-access.md",sourceDirName:"build/clients",slug:"/build/clients/wallet-access",permalink:"/build/clients/wallet-access",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"wallet-access",title:"Archethic's wallet access"},sidebar:"docs",previous:{title:"ADPU commands",permalink:"/build/clients/ledger-wallet/commands"},next:{title:"Archethic's wallet specification",permalink:"/build/clients/wallet-spec"}},o={},s=[{value:"Access enrollment",id:"access-enrollment",level:2},{value:"Keychain retrieval",id:"keychain-retrieval",level:2}],d={toc:s},p="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Onchain wallet (aka ",(0,a.kt)("strong",{parentName:"p"},"Keychain"),") is a wallet stored on Archethic blockchain in encrypted form, to allow only the authorized access to read it and build transaction from it."),(0,a.kt)("p",null,"Also to avoid disclosure of information, access and keychain are using end to end encryption with elliptic curve cryptography to secure it."),(0,a.kt)("p",null,"Hence any client which would like to support wallet access and transaction building will have to be authorized."),(0,a.kt)("h2",{id:"access-enrollment"},"Access enrollment"),(0,a.kt)("p",null,"When a device or application want to become an access to the wallet, it first have to create a transaction where the keychain transaction's address is encrypted into it.\nThis data is stored in the ",(0,a.kt)("inlineCode",{parentName:"p"},"/data/ownerships")," section of the transaction., where the authorized public key is the ",(0,a.kt)("inlineCode",{parentName:"p"},"transaction's public key")," and the secret is an aes encryption of the keychain's address."),(0,a.kt)("p",null,"Then the keychain will create a new transaction on its chain by encrypting the wallet with a new AES key itself encrypted for the list of authorized access public keys wanted. (For instance the new device or application)"),(0,a.kt)("h2",{id:"keychain-retrieval"},"Keychain retrieval"),(0,a.kt)("p",null,"In order to retrieve the keychain from a device or application perspective, the access transaction's will be generated to be retrieved from the network."),(0,a.kt)("p",null,"Then the device or application will decrypt the encrypted keychain address to be able to download the keychain transaction."),(0,a.kt)("p",null,"Once received, the device or application - as being authorized by the keychain - will be able to decrypt the AES key to decrypt the wallet and perform any key derivation and transaction building from it."),(0,a.kt)("p",null,"Then, because the key have been generated on the fly, the client will forget about the private keys and seeds decrypted."))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4060],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>y});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),s=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=s(n),u=a,y=p["".concat(o,".").concat(u)]||p[u]||h[u]||i;return n?r.createElement(y,c(c({ref:t},d),{},{components:n})):r.createElement(y,c({ref:t},d))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,c=new Array(i);c[0]=u;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[p]="string"==typeof e?e:a,c[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"wallet-access",title:"Archethic's wallet access"},c=void 0,l={unversionedId:"build/clients/wallet-access",id:"build/clients/wallet-access",title:"Archethic's wallet access",description:"Onchain wallet (aka Keychain) is a wallet stored on Archethic blockchain in encrypted form, to allow only the authorized access to read it and build transaction from it.",source:"@site/docs/build/clients/wallet-access.md",sourceDirName:"build/clients",slug:"/build/clients/wallet-access",permalink:"/build/clients/wallet-access",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"wallet-access",title:"Archethic's wallet access"},sidebar:"docs",previous:{title:"ADPU commands",permalink:"/build/clients/ledger-wallet/commands"},next:{title:"Archethic's wallet specification",permalink:"/build/clients/wallet-spec"}},o={},s=[{value:"Access enrollment",id:"access-enrollment",level:2},{value:"Keychain retrieval",id:"keychain-retrieval",level:2}],d={toc:s},p="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Onchain wallet (aka ",(0,a.kt)("strong",{parentName:"p"},"Keychain"),") is a wallet stored on Archethic blockchain in encrypted form, to allow only the authorized access to read it and build transaction from it."),(0,a.kt)("p",null,"Also to avoid disclosure of information, access and keychain are using end to end encryption with elliptic curve cryptography to secure it."),(0,a.kt)("p",null,"Hence any client which would like to support wallet access and transaction building will have to be authorized."),(0,a.kt)("h2",{id:"access-enrollment"},"Access enrollment"),(0,a.kt)("p",null,"When a device or application want to become an access to the wallet, it first have to create a transaction where the keychain transaction's address is encrypted into it.\nThis data is stored in the ",(0,a.kt)("inlineCode",{parentName:"p"},"/data/ownerships")," section of the transaction., where the authorized public key is the ",(0,a.kt)("inlineCode",{parentName:"p"},"transaction's public key")," and the secret is an aes encryption of the keychain's address."),(0,a.kt)("p",null,"Then the keychain will create a new transaction on its chain by encrypting the wallet with a new AES key itself encrypted for the list of authorized access public keys wanted. (For instance the new device or application)"),(0,a.kt)("h2",{id:"keychain-retrieval"},"Keychain retrieval"),(0,a.kt)("p",null,"In order to retrieve the keychain from a device or application perspective, the access transaction's will be generated to be retrieved from the network."),(0,a.kt)("p",null,"Then the device or application will decrypt the encrypted keychain address to be able to download the keychain transaction."),(0,a.kt)("p",null,"Once received, the device or application - as being authorized by the keychain - will be able to decrypt the AES key to decrypt the wallet and perform any key derivation and transaction building from it."),(0,a.kt)("p",null,"Then, because the key have been generated on the fly, the client will forget about the private keys and seeds decrypted."))}h.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/be94c4be.c2327485.js b/assets/js/be94c4be.c2327485.js deleted file mode 100644 index 41aefcafd..000000000 --- a/assets/js/be94c4be.c2327485.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6697],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>p});var l=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,l)}return a}function r(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var c=l.createContext({}),i=function(e){var t=l.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},s=function(e){var t=i(e.components);return l.createElement(c.Provider,{value:t},e.children)},b="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},u=l.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,c=e.parentName,s=d(e,["components","mdxType","originalType","parentName"]),b=i(a),u=o,p=b["".concat(c,".").concat(u)]||b[u]||m[u]||n;return a?l.createElement(p,r(r({ref:t},s),{},{components:a})):l.createElement(p,r({ref:t},s))}));function p(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,r=new Array(n);r[0]=u;var d={};for(var c in t)hasOwnProperty.call(t,c)&&(d[c]=t[c]);d.originalType=e,d[b]="string"==typeof e?e:o,r[1]=d;for(var i=2;i{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>b,SpecifiedBy:()=>m,assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>c,toc:()=>s});var l=a(87462),o=a(67294),n=a(3905);a(8209);const r={id:"node",title:"Node",hide_table_of_contents:!1},d=void 0,c={unversionedId:"build/api/schema/objects/node",id:"build/api/schema/objects/node",title:"Node",description:"[Node] represents a node in the network",source:"@site/docs/build/api/schema/objects/node.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/node",permalink:"/build/api/schema/objects/node",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"node",title:"Node",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Ledger",permalink:"/build/api/schema/objects/ledger"},next:{title:"OracleData",permalink:"/build/api/schema/objects/oracle-data"}},i={},s=[{value:"Fields",id:"fields",level:3},{value:'Node.authorizationDateTimestamp ',id:"code-style-fontweight-normal-nodebauthorizationdatebcodetimestamp-",level:4},{value:'Node.authorizedBoolean ',id:"code-style-fontweight-normal-nodebauthorizedbcodeboolean-",level:4},{value:'Node.availableBoolean ',id:"code-style-fontweight-normal-nodebavailablebcodeboolean-",level:4},{value:'Node.averageAvailabilityFloat ',id:"code-style-fontweight-normal-nodebaverageavailabilitybcodefloat-",level:4},{value:'Node.enrollmentDateTimestamp ',id:"code-style-fontweight-normal-nodebenrollmentdatebcodetimestamp-",level:4},{value:'Node.firstPublicKeyPublicKey ',id:"code-style-fontweight-normal-nodebfirstpublickeybcodepublickey-",level:4},{value:'Node.geoPatchString ',id:"code-style-fontweight-normal-nodebgeopatchbcodestring-",level:4},{value:'Node.ipString ',id:"code-style-fontweight-normal-nodebipbcodestring-",level:4},{value:'Node.lastPublicKeyPublicKey ',id:"code-style-fontweight-normal-nodeblastpublickeybcodepublickey-",level:4},{value:'Node.networkPatchString ',id:"code-style-fontweight-normal-nodebnetworkpatchbcodestring-",level:4},{value:'Node.originPublicKeyPublicKey ',id:"code-style-fontweight-normal-nodeboriginpublickeybcodepublickey-",level:4},{value:'Node.portInt ',id:"code-style-fontweight-normal-nodebportbcodeint-",level:4},{value:'Node.rewardAddressAddress ',id:"code-style-fontweight-normal-nodebrewardaddressbcodeaddress-",level:4},{value:"Returned by",id:"returned-by",level:3}],b=()=>(0,n.kt)(o.Fragment,null,(0,n.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,n.kt)(o.Fragment,null,"Specification",(0,n.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,n.kt)(o.Fragment,null,(0,n.kt)("span",{class:"badge badge--"+e.class},e.text)),p={toc:s,Bullet:b,SpecifiedBy:m,Badge:u},y="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(y,(0,l.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"[Node]"," represents a node in the network"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-graphql"},"type Node {\n authorizationDate: Timestamp\n authorized: Boolean\n available: Boolean\n averageAvailability: Float\n enrollmentDate: Timestamp\n firstPublicKey: PublicKey\n geoPatch: String\n ip: String\n lastPublicKey: PublicKey\n networkPatch: String\n originPublicKey: PublicKey\n port: Int\n rewardAddress: Address\n}\n")),(0,n.kt)("h3",{id:"fields"},"Fields"),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebauthorizationdatebcodetimestamp-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"authorizationDate"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,n.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebauthorizedbcodeboolean-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"authorized"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,n.kt)("inlineCode",{parentName:"a"},"Boolean"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebavailablebcodeboolean-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"available"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,n.kt)("inlineCode",{parentName:"a"},"Boolean"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebaverageavailabilitybcodefloat-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"averageAvailability"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/float"},(0,n.kt)("inlineCode",{parentName:"a"},"Float"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebenrollmentdatebcodetimestamp-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"enrollmentDate"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,n.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebfirstpublickeybcodepublickey-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"firstPublicKey"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,n.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebgeopatchbcodestring-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"geoPatch"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,n.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebipbcodestring-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"ip"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,n.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodeblastpublickeybcodepublickey-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"lastPublicKey"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,n.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebnetworkpatchbcodestring-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"networkPatch"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,n.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodeboriginpublickeybcodepublickey-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"originPublicKey"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,n.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebportbcodeint-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"port"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,n.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebrewardaddressbcodeaddress-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"rewardAddress"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,n.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h3",{id:"returned-by"},"Returned by"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/build/api/schema/queries/nodes"},(0,n.kt)("inlineCode",{parentName:"a"},"nodes"))," ",(0,n.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"})))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/be94c4be.d728e7b5.js b/assets/js/be94c4be.d728e7b5.js new file mode 100644 index 000000000..bca9d6223 --- /dev/null +++ b/assets/js/be94c4be.d728e7b5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6697],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>p});var l=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,l)}return a}function r(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var c=l.createContext({}),i=function(e){var t=l.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},s=function(e){var t=i(e.components);return l.createElement(c.Provider,{value:t},e.children)},b="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},u=l.forwardRef((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,c=e.parentName,s=d(e,["components","mdxType","originalType","parentName"]),b=i(a),u=o,p=b["".concat(c,".").concat(u)]||b[u]||m[u]||n;return a?l.createElement(p,r(r({ref:t},s),{},{components:a})):l.createElement(p,r({ref:t},s))}));function p(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,r=new Array(n);r[0]=u;var d={};for(var c in t)hasOwnProperty.call(t,c)&&(d[c]=t[c]);d.originalType=e,d[b]="string"==typeof e?e:o,r[1]=d;for(var i=2;i{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>b,SpecifiedBy:()=>m,assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>r,metadata:()=>c,toc:()=>s});var l=a(87462),o=a(67294),n=a(3905);a(8209);const r={id:"node",title:"Node",hide_table_of_contents:!1},d=void 0,c={unversionedId:"build/api/schema/objects/node",id:"build/api/schema/objects/node",title:"Node",description:"[Node] represents a node in the network",source:"@site/docs/build/api/schema/objects/node.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/node",permalink:"/build/api/schema/objects/node",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"node",title:"Node",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Ledger",permalink:"/build/api/schema/objects/ledger"},next:{title:"OracleData",permalink:"/build/api/schema/objects/oracle-data"}},i={},s=[{value:"Fields",id:"fields",level:3},{value:'Node.authorizationDateTimestamp ',id:"code-style-fontweight-normal-nodebauthorizationdatebcodetimestamp-",level:4},{value:'Node.authorizedBoolean ',id:"code-style-fontweight-normal-nodebauthorizedbcodeboolean-",level:4},{value:'Node.availableBoolean ',id:"code-style-fontweight-normal-nodebavailablebcodeboolean-",level:4},{value:'Node.averageAvailabilityFloat ',id:"code-style-fontweight-normal-nodebaverageavailabilitybcodefloat-",level:4},{value:'Node.enrollmentDateTimestamp ',id:"code-style-fontweight-normal-nodebenrollmentdatebcodetimestamp-",level:4},{value:'Node.firstPublicKeyPublicKey ',id:"code-style-fontweight-normal-nodebfirstpublickeybcodepublickey-",level:4},{value:'Node.geoPatchString ',id:"code-style-fontweight-normal-nodebgeopatchbcodestring-",level:4},{value:'Node.ipString ',id:"code-style-fontweight-normal-nodebipbcodestring-",level:4},{value:'Node.lastPublicKeyPublicKey ',id:"code-style-fontweight-normal-nodeblastpublickeybcodepublickey-",level:4},{value:'Node.networkPatchString ',id:"code-style-fontweight-normal-nodebnetworkpatchbcodestring-",level:4},{value:'Node.originPublicKeyPublicKey ',id:"code-style-fontweight-normal-nodeboriginpublickeybcodepublickey-",level:4},{value:'Node.portInt ',id:"code-style-fontweight-normal-nodebportbcodeint-",level:4},{value:'Node.rewardAddressAddress ',id:"code-style-fontweight-normal-nodebrewardaddressbcodeaddress-",level:4},{value:"Returned by",id:"returned-by",level:3}],b=()=>(0,n.kt)(o.Fragment,null,(0,n.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,n.kt)(o.Fragment,null,"Specification",(0,n.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,n.kt)(o.Fragment,null,(0,n.kt)("span",{class:"badge badge--"+e.class},e.text)),p={toc:s,Bullet:b,SpecifiedBy:m,Badge:u},y="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(y,(0,l.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"[Node]"," represents a node in the network"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-graphql"},"type Node {\n authorizationDate: Timestamp\n authorized: Boolean\n available: Boolean\n averageAvailability: Float\n enrollmentDate: Timestamp\n firstPublicKey: PublicKey\n geoPatch: String\n ip: String\n lastPublicKey: PublicKey\n networkPatch: String\n originPublicKey: PublicKey\n port: Int\n rewardAddress: Address\n}\n")),(0,n.kt)("h3",{id:"fields"},"Fields"),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebauthorizationdatebcodetimestamp-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"authorizationDate"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,n.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebauthorizedbcodeboolean-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"authorized"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,n.kt)("inlineCode",{parentName:"a"},"Boolean"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebavailablebcodeboolean-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"available"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/boolean"},(0,n.kt)("inlineCode",{parentName:"a"},"Boolean"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebaverageavailabilitybcodefloat-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"averageAvailability"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/float"},(0,n.kt)("inlineCode",{parentName:"a"},"Float"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebenrollmentdatebcodetimestamp-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"enrollmentDate"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,n.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebfirstpublickeybcodepublickey-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"firstPublicKey"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,n.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebgeopatchbcodestring-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"geoPatch"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,n.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebipbcodestring-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"ip"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,n.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodeblastpublickeybcodepublickey-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"lastPublicKey"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,n.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebnetworkpatchbcodestring-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"networkPatch"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,n.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodeboriginpublickeybcodepublickey-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"originPublicKey"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,n.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebportbcodeint-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"port"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,n.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h4",{id:"code-style-fontweight-normal-nodebrewardaddressbcodeaddress-"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"Node.",(0,n.kt)("b",null,"rewardAddress"))),(0,n.kt)(b,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,n.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,n.kt)(u,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h3",{id:"returned-by"},"Returned by"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/build/api/schema/queries/nodes"},(0,n.kt)("inlineCode",{parentName:"a"},"nodes"))," ",(0,n.kt)(u,{class:"secondary",text:"query",mdxType:"Badge"})))}h.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/bf608a00.ee94a110.js b/assets/js/bf608a00.b726c0b4.js similarity index 54% rename from assets/js/bf608a00.ee94a110.js rename to assets/js/bf608a00.b726c0b4.js index 7c6123b3a..d8ba3c837 100644 --- a/assets/js/bf608a00.ee94a110.js +++ b/assets/js/bf608a00.b726c0b4.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2052],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),s=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=s(a),m=n,f=p["".concat(i,".").concat(m)]||p[m]||u[m]||l;return a?r.createElement(f,o(o({ref:t},d),{},{components:a})):r.createElement(f,o({ref:t},d))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,o=new Array(l);o[0]=m;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[p]="string"==typeof e?e:n,o[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>c,default:()=>b,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var r=a(87462),n=a(67294),l=a(3905);a(8209);const o={id:"oracle-data",title:"oracleData",hide_table_of_contents:!1},c=void 0,i={unversionedId:"build/api/schema/queries/oracle-data",id:"build/api/schema/queries/oracle-data",title:"oracleData",description:"Query the network to get the value of an oracle at a specific time or the last value",source:"@site/docs/build/api/schema/queries/oracle-data.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/oracle-data",permalink:"/build/api/schema/queries/oracle-data",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"oracle-data",title:"oracleData",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"nodes",permalink:"/build/api/schema/queries/nodes"},next:{title:"sharedSecrets",permalink:"/build/api/schema/queries/shared-secrets"}},s={},d=[{value:"Arguments",id:"arguments",level:3},{value:'oracleData.timestampTimestamp ',id:"code-style-fontweight-normal-oracledatabtimestampbcodetimestamp-",level:4},{value:"Type",id:"type",level:3},{value:'OracleData ',id:"oracledata-",level:4}],p=()=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,l.kt)(n.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},y="wrapper";function b(e){let{components:t,...a}=e;return(0,l.kt)(y,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Query the network to get the value of an oracle at a specific time or the last value"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"oracleData(\n timestamp: Timestamp\n): OracleData\n")),(0,l.kt)("h3",{id:"arguments"},"Arguments"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-oracledatabtimestampbcodetimestamp-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"oracleData.",(0,l.kt)("b",null,"timestamp"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,l.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"type"},"Type"),(0,l.kt)("h4",{id:"oracledata-"},(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/oracle-data"},(0,l.kt)("inlineCode",{parentName:"a"},"OracleData"))," ",(0,l.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"[OracleData]"," represents an oracle data.")))}b.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2052],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),s=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=s(a),m=n,f=p["".concat(i,".").concat(m)]||p[m]||u[m]||l;return a?r.createElement(f,o(o({ref:t},d),{},{components:a})):r.createElement(f,o({ref:t},d))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,o=new Array(l);o[0]=m;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[p]="string"==typeof e?e:n,o[1]=c;for(var s=2;s{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>c,default:()=>b,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var r=a(87462),n=a(67294),l=a(3905);a(8209);const o={id:"oracle-data",title:"oracleData",hide_table_of_contents:!1},c=void 0,i={unversionedId:"build/api/schema/queries/oracle-data",id:"build/api/schema/queries/oracle-data",title:"oracleData",description:"Query the network to get the value of an oracle at a specific time or the last value",source:"@site/docs/build/api/schema/queries/oracle-data.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/oracle-data",permalink:"/build/api/schema/queries/oracle-data",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"oracle-data",title:"oracleData",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"nodes",permalink:"/build/api/schema/queries/nodes"},next:{title:"sharedSecrets",permalink:"/build/api/schema/queries/shared-secrets"}},s={},d=[{value:"Arguments",id:"arguments",level:3},{value:'oracleData.timestampTimestamp ',id:"code-style-fontweight-normal-oracledatabtimestampbcodetimestamp-",level:4},{value:"Type",id:"type",level:3},{value:'OracleData ',id:"oracledata-",level:4}],p=()=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,l.kt)(n.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,l.kt)(n.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},y="wrapper";function b(e){let{components:t,...a}=e;return(0,l.kt)(y,(0,r.Z)({},f,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Query the network to get the value of an oracle at a specific time or the last value"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"oracleData(\n timestamp: Timestamp\n): OracleData\n")),(0,l.kt)("h3",{id:"arguments"},"Arguments"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-oracledatabtimestampbcodetimestamp-"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"oracleData.",(0,l.kt)("b",null,"timestamp"))),(0,l.kt)(p,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,l.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"type"},"Type"),(0,l.kt)("h4",{id:"oracledata-"},(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/oracle-data"},(0,l.kt)("inlineCode",{parentName:"a"},"OracleData"))," ",(0,l.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"[OracleData]"," represents an oracle data.")))}b.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/bf6e295d.fec89e07.js b/assets/js/bf6e295d.f5dbc4cf.js similarity index 59% rename from assets/js/bf6e295d.fec89e07.js rename to assets/js/bf6e295d.f5dbc4cf.js index e16165604..10bb105c5 100644 --- a/assets/js/bf6e295d.fec89e07.js +++ b/assets/js/bf6e295d.f5dbc4cf.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1697],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=c(r),m=a,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||i;return r?n.createElement(f,s(s({ref:t},p),{},{components:r})):n.createElement(f,s({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,s=new Array(i);s[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[u]="string"==typeof e?e:a,s[1]=o;for(var c=2;c{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>c,contentTitle:()=>o,default:()=>b,frontMatter:()=>s,metadata:()=>l,toc:()=>p});var n=r(87462),a=r(67294),i=r(3905);r(8209);const s={id:"pos-integer",title:"PosInteger",hide_table_of_contents:!1},o=void 0,l={unversionedId:"build/api/schema/scalars/pos-integer",id:"build/api/schema/scalars/pos-integer",title:"PosInteger",description:"The [Positive Integer] scalar type represents a positive number",source:"@site/docs/build/api/schema/scalars/pos-integer.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/pos-integer",permalink:"/build/api/schema/scalars/pos-integer",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"pos-integer",title:"PosInteger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"P2pAvailabilities",permalink:"/build/api/schema/scalars/p2-p-availabilities"},next:{title:"PublicKey",permalink:"/build/api/schema/scalars/public-key"}},c={},p=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,i.kt)(a.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:u,SpecifiedBy:d,Badge:m},y="wrapper";function b(e){let{components:t,...r}=e;return(0,i.kt)(y,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[Positive Integer]"," scalar type represents a positive number"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar PosInteger\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/network-transactions"},(0,i.kt)("inlineCode",{parentName:"a"},"networkTransactions"))," ",(0,i.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"}),(0,i.kt)(u,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-inputs"},(0,i.kt)("inlineCode",{parentName:"a"},"transactionInputs"))," ",(0,i.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"}),(0,i.kt)(u,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transactions"},(0,i.kt)("inlineCode",{parentName:"a"},"transactions"))," ",(0,i.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1697],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=c(r),m=a,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||i;return r?n.createElement(f,s(s({ref:t},p),{},{components:r})):n.createElement(f,s({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,s=new Array(i);s[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[u]="string"==typeof e?e:a,s[1]=o;for(var c=2;c{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>c,contentTitle:()=>o,default:()=>b,frontMatter:()=>s,metadata:()=>l,toc:()=>p});var n=r(87462),a=r(67294),i=r(3905);r(8209);const s={id:"pos-integer",title:"PosInteger",hide_table_of_contents:!1},o=void 0,l={unversionedId:"build/api/schema/scalars/pos-integer",id:"build/api/schema/scalars/pos-integer",title:"PosInteger",description:"The [Positive Integer] scalar type represents a positive number",source:"@site/docs/build/api/schema/scalars/pos-integer.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/pos-integer",permalink:"/build/api/schema/scalars/pos-integer",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"pos-integer",title:"PosInteger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"P2pAvailabilities",permalink:"/build/api/schema/scalars/p2-p-availabilities"},next:{title:"PublicKey",permalink:"/build/api/schema/scalars/public-key"}},c={},p=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,i.kt)(a.Fragment,null,"Specification",(0,i.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,i.kt)(a.Fragment,null,(0,i.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:p,Bullet:u,SpecifiedBy:d,Badge:m},y="wrapper";function b(e){let{components:t,...r}=e;return(0,i.kt)(y,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ","[Positive Integer]"," scalar type represents a positive number"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar PosInteger\n")),(0,i.kt)("h3",{id:"member-of"},"Member of"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/network-transactions"},(0,i.kt)("inlineCode",{parentName:"a"},"networkTransactions"))," ",(0,i.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"}),(0,i.kt)(u,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-inputs"},(0,i.kt)("inlineCode",{parentName:"a"},"transactionInputs"))," ",(0,i.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"}),(0,i.kt)(u,{mdxType:"Bullet"}),(0,i.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transactions"},(0,i.kt)("inlineCode",{parentName:"a"},"transactions"))," ",(0,i.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/c204078c.4174264d.js b/assets/js/c204078c.4174264d.js new file mode 100644 index 000000000..0e13a8ef1 --- /dev/null +++ b/assets/js/c204078c.4174264d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3723],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),m=i,h=u["".concat(s,".").concat(m)]||u[m]||d[m]||a;return n?r.createElement(h,o(o({ref:t},c),{},{components:n})):r.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(87462),i=(n(67294),n(3905));n(8209);const a={id:"messaging",title:"Messaging"},o=void 0,l={unversionedId:"build/core/p2p/messaging",id:"build/core/p2p/messaging",title:"Messaging",description:"Archethic Blockchain is used a brand new P2P layer from the Supervised Multicast, but to ensure the best data transmission possible, we are using two modern approaches: Stream Multiplexer and Binary Protocol.",source:"@site/docs/build/core/p2p/messaging.md",sourceDirName:"build/core/p2p",slug:"/build/core/p2p/messaging",permalink:"/build/core/p2p/messaging",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"messaging",title:"Messaging"},sidebar:"docs",previous:{title:"P2P",permalink:"/build/core/p2p/"},next:{title:"Node",permalink:"/build/core/p2p/node"}},s={},p=[{value:"Stream Multiplexer",id:"stream-multiplexer",level:2},{value:"Binary Protocol",id:"binary-protocol",level:2},{value:"Message envelop",id:"message-envelop",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Blockchain is used a brand new P2P layer from the ",(0,i.kt)("a",{parentName:"p",href:"/learn/p2p#archethics-way"},"Supervised Multicast"),", but to ensure the best data transmission possible, we are using two modern approaches: ",(0,i.kt)("inlineCode",{parentName:"p"},"Stream Multiplexer")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"Binary Protocol"),". "),(0,i.kt)("p",null,"Those two features helps to achieve a low latency P2P messaging."),(0,i.kt)("h2",{id:"stream-multiplexer"},"Stream Multiplexer"),(0,i.kt)("p",null,"Stream Multiplexing allows multiple independent logical streams to share a common underlying transport stream and ",(0,i.kt)("br",null),"\nthere are many independent streams of communication between peers."),(0,i.kt)("p",null,"Stream Multiplexing amortizes the overhead of establishing a transport connection and helps to distinguish which messages to handle in a concurrent way."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"|---------| |---------|\n| Service | | Service |\n|---------| |---------|\n | Msg ID: 2 |------------| |\n |--------------| Connection |---------| Msg ID: 1\n | TCP |\n |--------------|------------|---------|\n | Msg ID: 1 | Msg ID: 2\n|---------| |---------|\n| Service | | Service |\n|---------| |---------|\n")),(0,i.kt)("p",null,"In the current implementation, each node connection is backed by a GenServer which serializes the call the remote endpoint, through an established connection."),(0,i.kt)("p",null,"Even if the calls are serialized, it leverages a non-blocking messaging, so multiple messages can be sent with several independant clients. However after a certain amount of time(timeout: 5s), the message is dropped to reduce the message queue."),(0,i.kt)("h2",{id:"binary-protocol"},"Binary Protocol"),(0,i.kt)("p",null,"Network latency is very important to reach an unlimited and really scalable network and using binary protocol helps to reduce bandwidth."),(0,i.kt)("p",null,"Different kind of solutions existing for binary protocol: Protobuf, Avro, Thrift, MsgPack, etc."),(0,i.kt)("p",null,"However, to support a custom and efficient binary serialization, Archethic uses it own binary protocol through the transport layer to reduce and to optimize by the message, the data to send."),(0,i.kt)("p",null,"This aspect is important, when we are dealing with bits, to reduce byte size."),(0,i.kt)("p",null,"For example, if we want to serialize this bitstring: 11100000"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"With existing solutions, we may end up with a list of 8 bytes"),(0,i.kt)("li",{parentName:"ul"},"With a custom solution, we serialize it with only 1 byte")),(0,i.kt)("h2",{id:"message-envelop"},"Message envelop"),(0,i.kt)("p",null,"To support privacy and security, each message is wrapped in a ",(0,i.kt)("inlineCode",{parentName:"p"},"MessageEnvelop")," struct within:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Message ID: used in the stream multiplexing"),(0,i.kt)("li",{parentName:"ul"},"Message to send"),(0,i.kt)("li",{parentName:"ul"},"Sender public key: used to determine the liveness of the node from the recipient P2P view")),(0,i.kt)("p",null,"The envelop is then encrypted with the recipient public key (known by the network) using ECIES cryptography protocol."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/c204078c.b2e88b2d.js b/assets/js/c204078c.b2e88b2d.js deleted file mode 100644 index 9b2b8ba7b..000000000 --- a/assets/js/c204078c.b2e88b2d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3723],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),m=i,h=u["".concat(s,".").concat(m)]||u[m]||d[m]||a;return n?r.createElement(h,o(o({ref:t},c),{},{components:n})):r.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(87462),i=(n(67294),n(3905));n(8209);const a={id:"messaging",title:"Messaging"},o=void 0,l={unversionedId:"build/core/p2p/messaging",id:"build/core/p2p/messaging",title:"Messaging",description:"Archethic Blockchain is used a brand new P2P layer from the Supervised Multicast, but to ensure the best data transmission possible, we are using two modern approaches: Stream Multiplexer and Binary Protocol.",source:"@site/docs/build/core/p2p/messaging.md",sourceDirName:"build/core/p2p",slug:"/build/core/p2p/messaging",permalink:"/build/core/p2p/messaging",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"messaging",title:"Messaging"},sidebar:"docs",previous:{title:"P2P",permalink:"/build/core/p2p/"},next:{title:"Node",permalink:"/build/core/p2p/node"}},s={},p=[{value:"Stream Multiplexer",id:"stream-multiplexer",level:2},{value:"Binary Protocol",id:"binary-protocol",level:2},{value:"Message envelop",id:"message-envelop",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Blockchain is used a brand new P2P layer from the ",(0,i.kt)("a",{parentName:"p",href:"/learn/p2p#archethics-way"},"Supervised Multicast"),", but to ensure the best data transmission possible, we are using two modern approaches: ",(0,i.kt)("inlineCode",{parentName:"p"},"Stream Multiplexer")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"Binary Protocol"),". "),(0,i.kt)("p",null,"Those two features helps to achieve a low latency P2P messaging."),(0,i.kt)("h2",{id:"stream-multiplexer"},"Stream Multiplexer"),(0,i.kt)("p",null,"Stream Multiplexing allows multiple independent logical streams to share a common underlying transport stream and ",(0,i.kt)("br",null),"\nthere are many independent streams of communication between peers."),(0,i.kt)("p",null,"Stream Multiplexing amortizes the overhead of establishing a transport connection and helps to distinguish which messages to handle in a concurrent way."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"|---------| |---------|\n| Service | | Service |\n|---------| |---------|\n | Msg ID: 2 |------------| |\n |--------------| Connection |---------| Msg ID: 1\n | TCP |\n |--------------|------------|---------|\n | Msg ID: 1 | Msg ID: 2\n|---------| |---------|\n| Service | | Service |\n|---------| |---------|\n")),(0,i.kt)("p",null,"In the current implementation, each node connection is backed by a GenServer which serializes the call the remote endpoint, through an established connection."),(0,i.kt)("p",null,"Even if the calls are serialized, it leverages a non-blocking messaging, so multiple messages can be sent with several independant clients. However after a certain amount of time(timeout: 5s), the message is dropped to reduce the message queue."),(0,i.kt)("h2",{id:"binary-protocol"},"Binary Protocol"),(0,i.kt)("p",null,"Network latency is very important to reach an unlimited and really scalable network and using binary protocol helps to reduce bandwidth."),(0,i.kt)("p",null,"Different kind of solutions existing for binary protocol: Protobuf, Avro, Thrift, MsgPack, etc."),(0,i.kt)("p",null,"However, to support a custom and efficient binary serialization, Archethic uses it own binary protocol through the transport layer to reduce and to optimize by the message, the data to send."),(0,i.kt)("p",null,"This aspect is important, when we are dealing with bits, to reduce byte size."),(0,i.kt)("p",null,"For example, if we want to serialize this bitstring: 11100000"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"With existing solutions, we may end up with a list of 8 bytes"),(0,i.kt)("li",{parentName:"ul"},"With a custom solution, we serialize it with only 1 byte")),(0,i.kt)("h2",{id:"message-envelop"},"Message envelop"),(0,i.kt)("p",null,"To support privacy and security, each message is wrapped in a ",(0,i.kt)("inlineCode",{parentName:"p"},"MessageEnvelop")," struct within:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Message ID: used in the stream multiplexing"),(0,i.kt)("li",{parentName:"ul"},"Message to send"),(0,i.kt)("li",{parentName:"ul"},"Sender public key: used to determine the liveness of the node from the recipient P2P view")),(0,i.kt)("p",null,"The envelop is then encrypted with the recipient public key (known by the network) using ECIES cryptography protocol."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/c31d0f42.f9429b28.js b/assets/js/c31d0f42.f7e7433f.js similarity index 64% rename from assets/js/c31d0f42.f9429b28.js rename to assets/js/c31d0f42.f7e7433f.js index 2a1cdefb3..3c9e4f7d0 100644 --- a/assets/js/c31d0f42.f9429b28.js +++ b/assets/js/c31d0f42.f7e7433f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7527],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>h});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=p(r),f=a,h=d["".concat(l,".").concat(f)]||d[f]||s[f]||i;return r?n.createElement(h,o(o({ref:t},u),{},{components:r})):n.createElement(h,o({ref:t},u))}));function h(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>s,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(87462),a=(r(67294),r(3905));r(8209);const i={id:"dart",title:"Dart SDK"},o=void 0,c={unversionedId:"build/sdk/dart",id:"build/sdk/dart",title:"Dart SDK",description:"Archethic Blockchain Official Dart SDK available on Github",source:"@site/docs/build/sdk/dart.md",sourceDirName:"build/sdk",slug:"/build/sdk/dart",permalink:"/build/sdk/dart",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"dart",title:"Dart SDK"},sidebar:"docs",previous:{title:"SDK",permalink:"/build/sdk/"},next:{title:"Go SDK",permalink:"/build/sdk/go"}},l={},p=[],u={toc:p},d="wrapper";function s(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic Blockchain Official Dart SDK available on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/libdart"},"Github"),"\nDart Packages published on ",(0,a.kt)("a",{parentName:"p",href:"https://pub.dev/packages/archethic_lib_dart"},"Pub.dev")),(0,a.kt)("p",null,"This SDK will help you to generate transaction on top of Archethic Blockchain."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"This SDK is mainly used in the official ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic_wallet"},"Archethic Wallet")," using Flutter. Please have a look if you are interested.")))}s.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7527],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=p(r),f=a,b=d["".concat(l,".").concat(f)]||d[f]||s[f]||i;return r?n.createElement(b,o(o({ref:t},u),{},{components:r})):n.createElement(b,o({ref:t},u))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>s,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(87462),a=(r(67294),r(3905));r(8209);const i={id:"dart",title:"Dart SDK"},o=void 0,c={unversionedId:"build/sdk/dart",id:"build/sdk/dart",title:"Dart SDK",description:"Archethic Blockchain Official Dart SDK available on Github",source:"@site/docs/build/sdk/dart.md",sourceDirName:"build/sdk",slug:"/build/sdk/dart",permalink:"/build/sdk/dart",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"dart",title:"Dart SDK"},sidebar:"docs",previous:{title:"SDK",permalink:"/build/sdk/"},next:{title:"Go SDK",permalink:"/build/sdk/go"}},l={},p=[],u={toc:p},d="wrapper";function s(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic Blockchain Official Dart SDK available on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/libdart"},"Github"),"\nDart Packages published on ",(0,a.kt)("a",{parentName:"p",href:"https://pub.dev/packages/archethic_lib_dart"},"Pub.dev")),(0,a.kt)("p",null,"This SDK will help you to generate transaction on top of Archethic Blockchain."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"This SDK is mainly used in the official ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/archethic_wallet"},"Archethic Wallet")," using Flutter. Please have a look if you are interested.")))}s.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/c325c1c7.7c3806fd.js b/assets/js/c325c1c7.7c3806fd.js deleted file mode 100644 index dc2c7d1f3..000000000 --- a/assets/js/c325c1c7.7c3806fd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8208],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>b});var r=a(67294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var u=r.createContext({}),p=function(e){var t=r.useContext(u),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},s=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var a=e.components,l=e.mdxType,n=e.originalType,u=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),d=p(a),h=l,b=d["".concat(u,".").concat(h)]||d[h]||c[h]||n;return a?r.createElement(b,i(i({ref:t},s),{},{components:a})):r.createElement(b,i({ref:t},s))}));function b(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var n=a.length,i=new Array(n);i[0]=h;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[d]="string"==typeof e?e:l,i[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>c,frontMatter:()=>n,metadata:()=>o,toc:()=>p});var r=a(87462),l=(a(67294),a(3905));a(8209);const n={id:"node",title:"Node"},i=void 0,o={unversionedId:"build/core/p2p/node",id:"build/core/p2p/node",title:"Node",description:"Data structure",source:"@site/docs/build/core/p2p/node.md",sourceDirName:"build/core/p2p",slug:"/build/core/p2p/node",permalink:"/build/core/p2p/node",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"node",title:"Node"},sidebar:"docs",previous:{title:"Messaging",permalink:"/build/core/p2p/messaging"},next:{title:"SDK",permalink:"/build/sdk/"}},u={},p=[{value:"Data structure",id:"data-structure",level:2},{value:"P2P tables view",id:"p2p-tables-view",level:2},{value:"Discovery table",id:"discovery-table",level:3},{value:"Availability lookup table",id:"availability-lookup-table",level:3},{value:"Authorized nodes table",id:"authorized-nodes-table",level:3},{value:"Nodes key lookup table",id:"nodes-key-lookup-table",level:3}],s={toc:p},d="wrapper";function c(e){let{components:t,...a}=e;return(0,l.kt)(d,(0,r.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"data-structure"},"Data structure"),(0,l.kt)("p",null,"Archethic is using a structured and open P2P network based on some properties:"),(0,l.kt)("p",null,"A node include a list P2P information such as:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"IP"),(0,l.kt)("li",{parentName:"ul"},"P2P Port"),(0,l.kt)("li",{parentName:"ul"},"HTTP Port (Web layer - Explorer)"),(0,l.kt)("li",{parentName:"ul"},"P2P Protocol (i.e TCP)"),(0,l.kt)("li",{parentName:"ul"},"First public key"),(0,l.kt)("li",{parentName:"ul"},"Last public key"),(0,l.kt)("li",{parentName:"ul"},"GeoPatch (for geographical distribution based on the GeoIP of the IP)"),(0,l.kt)("li",{parentName:"ul"},"NetworkPatch (for P2P responsiveness based on the latency to reach it)"),(0,l.kt)("li",{parentName:"ul"},"Reward address (the address where the mining rewards should be sent)"),(0,l.kt)("li",{parentName:"ul"},"Global availability (from BeaconChain qualification)"),(0,l.kt)("li",{parentName:"ul"},"Local availability (from Supervised Multicast)"),(0,l.kt)("li",{parentName:"ul"},"Average availability (from BeaconChain qualification)"),(0,l.kt)("li",{parentName:"ul"},"Authorized"),(0,l.kt)("li",{parentName:"ul"},"Authorization Date")),(0,l.kt)("h2",{id:"p2p-tables-view"},"P2P tables view"),(0,l.kt)("p",null,"The application is stored a P2P view in memory table using ETS (Erlang Term Storage) to support fast query to fetch node information."),(0,l.kt)("p",null,"When network transaction(node, node shared secrets) are loaded inside the system, ",(0,l.kt)("inlineCode",{parentName:"p"},"MemTableLoader")," module is called to populate the tables. This is also true during the bootstrap of the node to fill up the data as cache."),(0,l.kt)("h3",{id:"discovery-table"},"Discovery table"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"first public key"),(0,l.kt)("th",{parentName:"tr",align:null},"last public key"),(0,l.kt)("th",{parentName:"tr",align:null},"IP"),(0,l.kt)("th",{parentName:"tr",align:null},"P2P port"),(0,l.kt)("th",{parentName:"tr",align:null},"HTTP port"),(0,l.kt)("th",{parentName:"tr",align:null},"geo patch"),(0,l.kt)("th",{parentName:"tr",align:null},"network patch"),(0,l.kt)("th",{parentName:"tr",align:null},"average availability"),(0,l.kt)("th",{parentName:"tr",align:null},"availability history"),(0,l.kt)("th",{parentName:"tr",align:null},"enrollment date"),(0,l.kt)("th",{parentName:"tr",align:null},"transport"),(0,l.kt)("th",{parentName:"tr",align:null},"reward ddress")))),(0,l.kt)("p",null,"This table contains all the P2P information for a given node index by its first public key"),(0,l.kt)("h3",{id:"availability-lookup-table"},"Availability lookup table"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"first public key")))),(0,l.kt)("p",null,"This table indicates the node availability, if its first public key is present in the table.\nThe purpose of this short table is to provide a really fast access to determine the availability."),(0,l.kt)("h3",{id:"authorized-nodes-table"},"Authorized nodes table"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"first public key"),(0,l.kt)("th",{parentName:"tr",align:null},"authorization date")))),(0,l.kt)("p",null,"All the node public keys presents in this table will be considered at authorized nodes along with their authorization date."),(0,l.kt)("p",null,"So in order to determine if a node is authorized a fast lookup can be performed."),(0,l.kt)("p",null,"In the same order, to get the list of authorized nodes by folding this table which can then lookup data from the discovery table to fetch all the information regarding the authorized node."),(0,l.kt)("h3",{id:"nodes-key-lookup-table"},"Nodes key lookup table"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"last public key"),(0,l.kt)("th",{parentName:"tr",align:null},"first public key")))),(0,l.kt)("p",null,"This is a reverse ordered table where we can have access to the first node public key from its last public key, without traversing the entire discovery table"))}c.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/c325c1c7.d645d5eb.js b/assets/js/c325c1c7.d645d5eb.js new file mode 100644 index 000000000..985e6ecb6 --- /dev/null +++ b/assets/js/c325c1c7.d645d5eb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8208],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>b});var r=a(67294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var u=r.createContext({}),p=function(e){var t=r.useContext(u),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},s=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var a=e.components,l=e.mdxType,n=e.originalType,u=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),d=p(a),h=l,b=d["".concat(u,".").concat(h)]||d[h]||c[h]||n;return a?r.createElement(b,i(i({ref:t},s),{},{components:a})):r.createElement(b,i({ref:t},s))}));function b(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var n=a.length,i=new Array(n);i[0]=h;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[d]="string"==typeof e?e:l,i[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>c,frontMatter:()=>n,metadata:()=>o,toc:()=>p});var r=a(87462),l=(a(67294),a(3905));a(8209);const n={id:"node",title:"Node"},i=void 0,o={unversionedId:"build/core/p2p/node",id:"build/core/p2p/node",title:"Node",description:"Data structure",source:"@site/docs/build/core/p2p/node.md",sourceDirName:"build/core/p2p",slug:"/build/core/p2p/node",permalink:"/build/core/p2p/node",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"node",title:"Node"},sidebar:"docs",previous:{title:"Messaging",permalink:"/build/core/p2p/messaging"},next:{title:"SDK",permalink:"/build/sdk/"}},u={},p=[{value:"Data structure",id:"data-structure",level:2},{value:"P2P tables view",id:"p2p-tables-view",level:2},{value:"Discovery table",id:"discovery-table",level:3},{value:"Availability lookup table",id:"availability-lookup-table",level:3},{value:"Authorized nodes table",id:"authorized-nodes-table",level:3},{value:"Nodes key lookup table",id:"nodes-key-lookup-table",level:3}],s={toc:p},d="wrapper";function c(e){let{components:t,...a}=e;return(0,l.kt)(d,(0,r.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"data-structure"},"Data structure"),(0,l.kt)("p",null,"Archethic is using a structured and open P2P network based on some properties:"),(0,l.kt)("p",null,"A node include a list P2P information such as:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"IP"),(0,l.kt)("li",{parentName:"ul"},"P2P Port"),(0,l.kt)("li",{parentName:"ul"},"HTTP Port (Web layer - Explorer)"),(0,l.kt)("li",{parentName:"ul"},"P2P Protocol (i.e TCP)"),(0,l.kt)("li",{parentName:"ul"},"First public key"),(0,l.kt)("li",{parentName:"ul"},"Last public key"),(0,l.kt)("li",{parentName:"ul"},"GeoPatch (for geographical distribution based on the GeoIP of the IP)"),(0,l.kt)("li",{parentName:"ul"},"NetworkPatch (for P2P responsiveness based on the latency to reach it)"),(0,l.kt)("li",{parentName:"ul"},"Reward address (the address where the mining rewards should be sent)"),(0,l.kt)("li",{parentName:"ul"},"Global availability (from BeaconChain qualification)"),(0,l.kt)("li",{parentName:"ul"},"Local availability (from Supervised Multicast)"),(0,l.kt)("li",{parentName:"ul"},"Average availability (from BeaconChain qualification)"),(0,l.kt)("li",{parentName:"ul"},"Authorized"),(0,l.kt)("li",{parentName:"ul"},"Authorization Date")),(0,l.kt)("h2",{id:"p2p-tables-view"},"P2P tables view"),(0,l.kt)("p",null,"The application is stored a P2P view in memory table using ETS (Erlang Term Storage) to support fast query to fetch node information."),(0,l.kt)("p",null,"When network transaction(node, node shared secrets) are loaded inside the system, ",(0,l.kt)("inlineCode",{parentName:"p"},"MemTableLoader")," module is called to populate the tables. This is also true during the bootstrap of the node to fill up the data as cache."),(0,l.kt)("h3",{id:"discovery-table"},"Discovery table"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"first public key"),(0,l.kt)("th",{parentName:"tr",align:null},"last public key"),(0,l.kt)("th",{parentName:"tr",align:null},"IP"),(0,l.kt)("th",{parentName:"tr",align:null},"P2P port"),(0,l.kt)("th",{parentName:"tr",align:null},"HTTP port"),(0,l.kt)("th",{parentName:"tr",align:null},"geo patch"),(0,l.kt)("th",{parentName:"tr",align:null},"network patch"),(0,l.kt)("th",{parentName:"tr",align:null},"average availability"),(0,l.kt)("th",{parentName:"tr",align:null},"availability history"),(0,l.kt)("th",{parentName:"tr",align:null},"enrollment date"),(0,l.kt)("th",{parentName:"tr",align:null},"transport"),(0,l.kt)("th",{parentName:"tr",align:null},"reward ddress")))),(0,l.kt)("p",null,"This table contains all the P2P information for a given node index by its first public key"),(0,l.kt)("h3",{id:"availability-lookup-table"},"Availability lookup table"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"first public key")))),(0,l.kt)("p",null,"This table indicates the node availability, if its first public key is present in the table.\nThe purpose of this short table is to provide a really fast access to determine the availability."),(0,l.kt)("h3",{id:"authorized-nodes-table"},"Authorized nodes table"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"first public key"),(0,l.kt)("th",{parentName:"tr",align:null},"authorization date")))),(0,l.kt)("p",null,"All the node public keys presents in this table will be considered at authorized nodes along with their authorization date."),(0,l.kt)("p",null,"So in order to determine if a node is authorized a fast lookup can be performed."),(0,l.kt)("p",null,"In the same order, to get the list of authorized nodes by folding this table which can then lookup data from the discovery table to fetch all the information regarding the authorized node."),(0,l.kt)("h3",{id:"nodes-key-lookup-table"},"Nodes key lookup table"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"last public key"),(0,l.kt)("th",{parentName:"tr",align:null},"first public key")))),(0,l.kt)("p",null,"This is a reverse ordered table where we can have access to the first node public key from its last public key, without traversing the entire discovery table"))}c.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/c47075b4.ade6a59f.js b/assets/js/c47075b4.dd9b06a1.js similarity index 52% rename from assets/js/c47075b4.ade6a59f.js rename to assets/js/c47075b4.dd9b06a1.js index 0aa157d02..737d3c476 100644 --- a/assets/js/c47075b4.ade6a59f.js +++ b/assets/js/c47075b4.dd9b06a1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7136],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},d=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),u=l(n),m=r,f=u["".concat(c,".").concat(m)]||u[m]||p[m]||o;return n?a.createElement(f,s(s({ref:t},d),{},{components:n})):a.createElement(f,s({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:r,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>l,contentTitle:()=>i,default:()=>b,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var a=n(87462),r=n(67294),o=n(3905);n(8209);const s={id:"transaction",title:"transaction",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/queries/transaction",id:"build/api/schema/queries/transaction",title:"transaction",description:"Query the network to find a transaction",source:"@site/docs/build/api/schema/queries/transaction.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/transaction",permalink:"/build/api/schema/queries/transaction",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction",title:"transaction",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transactionInputs",permalink:"/build/api/schema/queries/transaction-inputs"},next:{title:"transactions",permalink:"/build/api/schema/queries/transactions"}},l={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transaction.addressAddress! ',id:"code-style-fontweight-normal-transactionbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],u=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},y="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(y,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to find a transaction"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transaction(\n address: Address!\n): Transaction\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transaction.",(0,o.kt)("b",null,"address"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transaction-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7136],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},d=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),u=l(n),m=r,f=u["".concat(c,".").concat(m)]||u[m]||p[m]||o;return n?a.createElement(f,s(s({ref:t},d),{},{components:n})):a.createElement(f,s({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:r,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>l,contentTitle:()=>i,default:()=>b,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var a=n(87462),r=n(67294),o=n(3905);n(8209);const s={id:"transaction",title:"transaction",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/queries/transaction",id:"build/api/schema/queries/transaction",title:"transaction",description:"Query the network to find a transaction",source:"@site/docs/build/api/schema/queries/transaction.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/transaction",permalink:"/build/api/schema/queries/transaction",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction",title:"transaction",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"transactionInputs",permalink:"/build/api/schema/queries/transaction-inputs"},next:{title:"transactions",permalink:"/build/api/schema/queries/transactions"}},l={},d=[{value:"Arguments",id:"arguments",level:3},{value:'transaction.addressAddress! ',id:"code-style-fontweight-normal-transactionbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Transaction ',id:"transaction-",level:4}],u=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},y="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(y,(0,a.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Query the network to find a transaction"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"transaction(\n address: Address!\n): Transaction\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-transactionbaddressbcodeaddress--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"transaction.",(0,o.kt)("b",null,"address"))),(0,o.kt)(u,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,o.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"type"},"Type"),(0,o.kt)("h4",{id:"transaction-"},(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},"[Transaction]"," represents a unitary transaction in the Archethic network.")))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/c4bb8d44.43811ed8.js b/assets/js/c4bb8d44.43811ed8.js deleted file mode 100644 index d1ec27f38..000000000 --- a/assets/js/c4bb8d44.43811ed8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9852],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},h=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),d=l(n),u=i,m=d["".concat(c,".").concat(u)]||d[u]||p[u]||o;return n?a.createElement(m,r(r({ref:t},h),{},{components:n})):a.createElement(m,r({ref:t},h))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:i,r[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var a=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"p2p",title:"P2P"},r=void 0,s={unversionedId:"learn/p2p/p2p",id:"learn/p2p/p2p",title:"P2P",description:"Archethic is a permissionless network where any node can participate into the network as long as they have some hardware requirements such secure element to enclave the private keys",source:"@site/docs/learn/p2p/README.md",sourceDirName:"learn/p2p",slug:"/learn/p2p/",permalink:"/learn/p2p/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"p2p",title:"P2P"},sidebar:"docs",previous:{title:"OracleChain",permalink:"/learn/oracle-chain"},next:{title:"Bootstrapping",permalink:"/learn/p2p/bootstrapping"}},c={},l=[{value:"Existing solutions",id:"existing-solutions",level:2},{value:"Gossip",id:"gossip",level:3},{value:"Broadcast",id:"broadcast",level:3},{value:"Archethic's way",id:"archethics-way",level:2},{value:"Transaction Validation Process",id:"transaction-validation-process",level:3},{value:"Network transaction chains",id:"network-transaction-chains",level:3},{value:"Beacons Chains",id:"beacons-chains",level:3},{value:"Data propagation",id:"data-propagation",level:3}],h={toc:l},d="wrapper";function p(e){let{components:t,...o}=e;return(0,i.kt)(d,(0,a.Z)({},h,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic is a permissionless network where any node can participate into the network as long as they have some hardware requirements such secure element to enclave the private keys\navoiding any disclosure of keys. (See ",(0,i.kt)("a",{parentName:"p",href:"/learn/cryptography/hardware-root-of-trust"},"Hardware Root of Trust"),")"),(0,i.kt)("p",null,"However, the network is able to detect if the new joined nodes should act as validation nodes by authorizing them to validate transactions."),(0,i.kt)("p",null,"So to achieve an unlimited permissionless network, the entire P2P layer have been redesigned from the ground to be more effective to support higher TPS and adaption."),(0,i.kt)("h2",{id:"existing-solutions"},"Existing solutions"),(0,i.kt)("p",null,"In the current P2P and distributed networks, there are two methods of communication for discovery and data propagation: "),(0,i.kt)("h3",{id:"gossip"},"Gossip"),(0,i.kt)("p",null,"Inspired from the gossip in the social network, Gossip's properties are defined by the knowledge of the outgoing neighbors, which means each node of the network will discover the properties of the other nodes by interrogating them randomly periodically."),(0,i.kt)("p",null,"While this approach is high available and fault tolerant, it's performing some unnecessary network traffic and sending data through nearest nodes for propagation. This will use most of the bandwidth and is subject to network latency. "),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"gossip",src:n(44989).Z,width:"611",height:"431"})),(0,i.kt)("h3",{id:"broadcast"},"Broadcast"),(0,i.kt)("p",null,"Classical and native communication is called Broadcast which is defined by the knowledge of the incoming neighbors dispatch the data through all the nodes."),(0,i.kt)("p",null,"This mode of communication is efficient in a small network but in a bigger network the complexity time will not scale."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"broadcast",src:n(18517).Z,width:"451",height:"451"})),(0,i.kt)("h2",{id:"archethics-way"},"Archethic's way"),(0,i.kt)("p",null,"Archethic introduces a new concept called: ",(0,i.kt)("inlineCode",{parentName:"p"},"Supervised Multicast")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"supervised_multicast",src:n(44064).Z,width:"431",height:"421"})),(0,i.kt)("p",null,"Archethic is using a hybrid communication that uses Supervised Multicast, which is closer to the properties of Multicast network.\nIt uses some kind of Multi Unicast communication protocol, where a node communicates with a group of nodes during several phases: transaction validation/replication, beacon chain, self-repair phases, while keeping the exchanging low if no activity is present. "),(0,i.kt)("h3",{id:"transaction-validation-process"},"Transaction Validation Process"),(0,i.kt)("p",null,"During transaction validation through mining and replication, nodes communicates and are able to gather information from incoming or outgoing connection."),(0,i.kt)("p",null,"When a node receives a message or send a message, it can capitalize on this information to determine if the node is available or not, in a local view.\nThen through this view, if the node is not considered as available it can pick another node to fetch an information, while data pushing will remain to check/recheck the availability over time."),(0,i.kt)("h3",{id:"network-transaction-chains"},"Network transaction chains"),(0,i.kt)("p",null,"Network transaction chains are a way to announce information to the network through consensus and replicated throw all the nodes."),(0,i.kt)("p",null,"Other networks may leverage gossip for P2P information, Archethic uses transaction based node information for P2P connectivity and cryptography.\nSo when a node joins/rejoins the network or when its IP/Port/Key changed, a new transaction is disseminated to all the nodes in the network after its validation."),(0,i.kt)("p",null,"Then each node knows the entire list of nodes allowed to participate in the network through the use of Node transaction chains.\nTo provide a high level of security and privacy, each connection is encrypted and authenticated by the first node public key known from the transaction chains."),(0,i.kt)("h3",{id:"beacons-chains"},"Beacons Chains"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/learn/sharding/beacon-chain"},"BeaconChain")," is a sharded layer able to monitor the entire network and therefore able to snapshot and sample P2P availability/latencies to produce summaries each day to maintain a qualified vision of the network."),(0,i.kt)("p",null,"The P2P availability can also be broadcasted to the network in a shorter time range (such a epoch/slot times) to provide a fresher node availability."),(0,i.kt)("h3",{id:"data-propagation"},"Data propagation"),(0,i.kt)("p",null,"Archethic uses a ",(0,i.kt)("a",{parentName:"p",href:"/learn/sharding"},"sharding")," and distributed replication.\nThis property limits the number of information and messages sent through the network to reduce bandwidth and data traffic"))}p.isMDXComponent=!0},18517:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/broadcast-c18e0f2b670f7a2d10c0b2e372e191be.svg"},44989:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/gossip-5aba8d31999ec7981edfdd3fe1b5c7ce.svg"},44064:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/supervised_multicast-928366485a4348d3539b30b60bcc06ea.svg"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/c4bb8d44.488a0812.js b/assets/js/c4bb8d44.488a0812.js new file mode 100644 index 000000000..c0b8693a4 --- /dev/null +++ b/assets/js/c4bb8d44.488a0812.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9852],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},h=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),d=l(n),u=i,m=d["".concat(c,".").concat(u)]||d[u]||p[u]||o;return n?a.createElement(m,r(r({ref:t},h),{},{components:n})):a.createElement(m,r({ref:t},h))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:i,r[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var a=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"p2p",title:"P2P"},r=void 0,s={unversionedId:"learn/p2p/p2p",id:"learn/p2p/p2p",title:"P2P",description:"Archethic is a permissionless network where any node can participate into the network as long as they have some hardware requirements such secure element to enclave the private keys",source:"@site/docs/learn/p2p/README.md",sourceDirName:"learn/p2p",slug:"/learn/p2p/",permalink:"/learn/p2p/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"p2p",title:"P2P"},sidebar:"docs",previous:{title:"OracleChain",permalink:"/learn/oracle-chain"},next:{title:"Bootstrapping",permalink:"/learn/p2p/bootstrapping"}},c={},l=[{value:"Existing solutions",id:"existing-solutions",level:2},{value:"Gossip",id:"gossip",level:3},{value:"Broadcast",id:"broadcast",level:3},{value:"Archethic's way",id:"archethics-way",level:2},{value:"Transaction Validation Process",id:"transaction-validation-process",level:3},{value:"Network transaction chains",id:"network-transaction-chains",level:3},{value:"Beacons Chains",id:"beacons-chains",level:3},{value:"Data propagation",id:"data-propagation",level:3}],h={toc:l},d="wrapper";function p(e){let{components:t,...o}=e;return(0,i.kt)(d,(0,a.Z)({},h,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic is a permissionless network where any node can participate into the network as long as they have some hardware requirements such secure element to enclave the private keys\navoiding any disclosure of keys. (See ",(0,i.kt)("a",{parentName:"p",href:"/learn/cryptography/hardware-root-of-trust"},"Hardware Root of Trust"),")"),(0,i.kt)("p",null,"However, the network is able to detect if the new joined nodes should act as validation nodes by authorizing them to validate transactions."),(0,i.kt)("p",null,"So to achieve an unlimited permissionless network, the entire P2P layer have been redesigned from the ground to be more effective to support higher TPS and adaption."),(0,i.kt)("h2",{id:"existing-solutions"},"Existing solutions"),(0,i.kt)("p",null,"In the current P2P and distributed networks, there are two methods of communication for discovery and data propagation: "),(0,i.kt)("h3",{id:"gossip"},"Gossip"),(0,i.kt)("p",null,"Inspired from the gossip in the social network, Gossip's properties are defined by the knowledge of the outgoing neighbors, which means each node of the network will discover the properties of the other nodes by interrogating them randomly periodically."),(0,i.kt)("p",null,"While this approach is high available and fault tolerant, it's performing some unnecessary network traffic and sending data through nearest nodes for propagation. This will use most of the bandwidth and is subject to network latency. "),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"gossip",src:n(44989).Z,width:"611",height:"431"})),(0,i.kt)("h3",{id:"broadcast"},"Broadcast"),(0,i.kt)("p",null,"Classical and native communication is called Broadcast which is defined by the knowledge of the incoming neighbors dispatch the data through all the nodes."),(0,i.kt)("p",null,"This mode of communication is efficient in a small network but in a bigger network the complexity time will not scale."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"broadcast",src:n(18517).Z,width:"451",height:"451"})),(0,i.kt)("h2",{id:"archethics-way"},"Archethic's way"),(0,i.kt)("p",null,"Archethic introduces a new concept called: ",(0,i.kt)("inlineCode",{parentName:"p"},"Supervised Multicast")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"supervised_multicast",src:n(44064).Z,width:"431",height:"421"})),(0,i.kt)("p",null,"Archethic is using a hybrid communication that uses Supervised Multicast, which is closer to the properties of Multicast network.\nIt uses some kind of Multi Unicast communication protocol, where a node communicates with a group of nodes during several phases: transaction validation/replication, beacon chain, self-repair phases, while keeping the exchanging low if no activity is present. "),(0,i.kt)("h3",{id:"transaction-validation-process"},"Transaction Validation Process"),(0,i.kt)("p",null,"During transaction validation through mining and replication, nodes communicates and are able to gather information from incoming or outgoing connection."),(0,i.kt)("p",null,"When a node receives a message or send a message, it can capitalize on this information to determine if the node is available or not, in a local view.\nThen through this view, if the node is not considered as available it can pick another node to fetch an information, while data pushing will remain to check/recheck the availability over time."),(0,i.kt)("h3",{id:"network-transaction-chains"},"Network transaction chains"),(0,i.kt)("p",null,"Network transaction chains are a way to announce information to the network through consensus and replicated throw all the nodes."),(0,i.kt)("p",null,"Other networks may leverage gossip for P2P information, Archethic uses transaction based node information for P2P connectivity and cryptography.\nSo when a node joins/rejoins the network or when its IP/Port/Key changed, a new transaction is disseminated to all the nodes in the network after its validation."),(0,i.kt)("p",null,"Then each node knows the entire list of nodes allowed to participate in the network through the use of Node transaction chains.\nTo provide a high level of security and privacy, each connection is encrypted and authenticated by the first node public key known from the transaction chains."),(0,i.kt)("h3",{id:"beacons-chains"},"Beacons Chains"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/learn/sharding/beacon-chain"},"BeaconChain")," is a sharded layer able to monitor the entire network and therefore able to snapshot and sample P2P availability/latencies to produce summaries each day to maintain a qualified vision of the network."),(0,i.kt)("p",null,"The P2P availability can also be broadcasted to the network in a shorter time range (such a epoch/slot times) to provide a fresher node availability."),(0,i.kt)("h3",{id:"data-propagation"},"Data propagation"),(0,i.kt)("p",null,"Archethic uses a ",(0,i.kt)("a",{parentName:"p",href:"/learn/sharding"},"sharding")," and distributed replication.\nThis property limits the number of information and messages sent through the network to reduce bandwidth and data traffic"))}p.isMDXComponent=!0},18517:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/broadcast-c18e0f2b670f7a2d10c0b2e372e191be.svg"},44989:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/gossip-5aba8d31999ec7981edfdd3fe1b5c7ce.svg"},44064:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/supervised_multicast-928366485a4348d3539b30b60bcc06ea.svg"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/c65c1395.50f97c03.js b/assets/js/c65c1395.91a53445.js similarity index 65% rename from assets/js/c65c1395.50f97c03.js rename to assets/js/c65c1395.91a53445.js index 0bc5c23a5..226a857ed 100644 --- a/assets/js/c65c1395.50f97c03.js +++ b/assets/js/c65c1395.91a53445.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5344],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=l(r),f=a,m=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var l=2;l{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>l,contentTitle:()=>c,default:()=>b,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var n=r(87462),a=r(67294),o=r(3905);r(8209);const i={id:"transaction-type",title:"TransactionType",hide_table_of_contents:!1},c=void 0,s={unversionedId:"build/api/schema/scalars/transaction-type",id:"build/api/schema/scalars/transaction-type",title:"TransactionType",description:"The [TransactionType] scalar type represents a transaction type",source:"@site/docs/build/api/schema/scalars/transaction-type.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/transaction-type",permalink:"/build/api/schema/scalars/transaction-type",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-type",title:"TransactionType",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TokenProperties",permalink:"/build/api/schema/scalars/token-properties"},next:{title:"oracleUpdate",permalink:"/build/api/schema/subscriptions/oracle-update"}},l={},p=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:u,SpecifiedBy:d,Badge:f},y="wrapper";function b(e){let{components:t,...r}=e;return(0,o.kt)(y,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ","[TransactionType]"," scalar type represents a transaction type"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar TransactionType\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/queries/network-transactions"},(0,o.kt)("inlineCode",{parentName:"a"},"networkTransactions"))," ",(0,o.kt)(f,{class:"secondary",text:"query",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5344],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=l(r),f=a,m=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var l=2;l{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>u,SpecifiedBy:()=>d,assets:()=>l,contentTitle:()=>c,default:()=>b,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var n=r(87462),a=r(67294),o=r(3905);r(8209);const i={id:"transaction-type",title:"TransactionType",hide_table_of_contents:!1},c=void 0,s={unversionedId:"build/api/schema/scalars/transaction-type",id:"build/api/schema/scalars/transaction-type",title:"TransactionType",description:"The [TransactionType] scalar type represents a transaction type",source:"@site/docs/build/api/schema/scalars/transaction-type.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/transaction-type",permalink:"/build/api/schema/scalars/transaction-type",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-type",title:"TransactionType",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TokenProperties",permalink:"/build/api/schema/scalars/token-properties"},next:{title:"oracleUpdate",permalink:"/build/api/schema/subscriptions/oracle-update"}},l={},p=[{value:"Member of",id:"member-of",level:3}],u=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:u,SpecifiedBy:d,Badge:f},y="wrapper";function b(e){let{components:t,...r}=e;return(0,o.kt)(y,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ","[TransactionType]"," scalar type represents a transaction type"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar TransactionType\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/queries/network-transactions"},(0,o.kt)("inlineCode",{parentName:"a"},"networkTransactions"))," ",(0,o.kt)(f,{class:"secondary",text:"query",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/c8c61268.291c22a2.js b/assets/js/c8c61268.28a58d03.js similarity index 57% rename from assets/js/c8c61268.291c22a2.js rename to assets/js/c8c61268.28a58d03.js index 03f685243..a2a7c0e9a 100644 --- a/assets/js/c8c61268.291c22a2.js +++ b/assets/js/c8c61268.28a58d03.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9909],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),l=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=l(e.components);return r.createElement(p.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=l(n),f=o,h=d["".concat(p,".").concat(f)]||d[f]||u[f]||i;return n?r.createElement(h,a(a({ref:t},c),{},{components:n})):r.createElement(h,a({ref:t},c))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=f;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[d]="string"==typeof e?e:o,a[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var r=n(87462),o=(n(67294),n(3905));n(8209);const i={id:"bootstrapping",title:"Bootstrapping"},a=void 0,s={unversionedId:"learn/p2p/bootstrapping",id:"learn/p2p/bootstrapping",title:"Bootstrapping",description:"Archethic Blockchain by using Network Transaction and Supervised Multicast, requires some actions to be performed",source:"@site/docs/learn/p2p/bootstrapping.md",sourceDirName:"learn/p2p",slug:"/learn/p2p/bootstrapping",permalink:"/learn/p2p/bootstrapping",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"bootstrapping",title:"Bootstrapping"},sidebar:"docs",previous:{title:"P2P",permalink:"/learn/p2p/"},next:{title:"Self Repair",permalink:"/learn/p2p/self-repair"}},p={},l=[{value:"Joining",id:"joining",level:2},{value:"Updates",id:"updates",level:2},{value:"Synchronization",id:"synchronization",level:2}],c={toc:l},d="wrapper";function u(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic Blockchain by using Network Transaction and Supervised Multicast, requires some actions to be performed\nwhen a node is bootstrapping. These operations will ensure synchronization and P2P awareness."),(0,o.kt)("h2",{id:"joining"},"Joining"),(0,o.kt)("p",null,'When a node joins the network for the first time, it will request from a list of preconfigured nodes to reach (called "bootstrapping seeds"), the closest nodes from its position.'),(0,o.kt)("p",null,"Then, it will generate a first node transaction including as data: ip, port, protocol, reward address, key certificate (to ensure the key is coming from a secure element)\nOnce the network will attest and verify its transaction, the node will be able to start a SelfRepair process"),(0,o.kt)("h2",{id:"updates"},"Updates"),(0,o.kt)("p",null,"When a node rejoins the network after some time, depending on if its previous data expired, it will generate a new transaction with the new information"),(0,o.kt)("h2",{id:"synchronization"},"Synchronization"),(0,o.kt)("p",null,"Once the transaction is validated, the node will start by requesting the list of nodes."),(0,o.kt)("p",null,"Then, it will start the ",(0,o.kt)("a",{parentName:"p",href:"/learn/p2p/self-repair"},"Self-Repair")," sequence to get and synchronize the missing transactions and publish its end of sync to the network."),(0,o.kt)("p",null,"By this way, the entire will know the existence the readiness of this node."))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9909],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),l=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=l(e.components);return r.createElement(p.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=l(n),f=o,h=d["".concat(p,".").concat(f)]||d[f]||u[f]||i;return n?r.createElement(h,a(a({ref:t},c),{},{components:n})):r.createElement(h,a({ref:t},c))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=f;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[d]="string"==typeof e?e:o,a[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var r=n(87462),o=(n(67294),n(3905));n(8209);const i={id:"bootstrapping",title:"Bootstrapping"},a=void 0,s={unversionedId:"learn/p2p/bootstrapping",id:"learn/p2p/bootstrapping",title:"Bootstrapping",description:"Archethic Blockchain by using Network Transaction and Supervised Multicast, requires some actions to be performed",source:"@site/docs/learn/p2p/bootstrapping.md",sourceDirName:"learn/p2p",slug:"/learn/p2p/bootstrapping",permalink:"/learn/p2p/bootstrapping",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"bootstrapping",title:"Bootstrapping"},sidebar:"docs",previous:{title:"P2P",permalink:"/learn/p2p/"},next:{title:"Self Repair",permalink:"/learn/p2p/self-repair"}},p={},l=[{value:"Joining",id:"joining",level:2},{value:"Updates",id:"updates",level:2},{value:"Synchronization",id:"synchronization",level:2}],c={toc:l},d="wrapper";function u(e){let{components:t,...n}=e;return(0,o.kt)(d,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic Blockchain by using Network Transaction and Supervised Multicast, requires some actions to be performed\nwhen a node is bootstrapping. These operations will ensure synchronization and P2P awareness."),(0,o.kt)("h2",{id:"joining"},"Joining"),(0,o.kt)("p",null,'When a node joins the network for the first time, it will request from a list of preconfigured nodes to reach (called "bootstrapping seeds"), the closest nodes from its position.'),(0,o.kt)("p",null,"Then, it will generate a first node transaction including as data: ip, port, protocol, reward address, key certificate (to ensure the key is coming from a secure element)\nOnce the network will attest and verify its transaction, the node will be able to start a SelfRepair process"),(0,o.kt)("h2",{id:"updates"},"Updates"),(0,o.kt)("p",null,"When a node rejoins the network after some time, depending on if its previous data expired, it will generate a new transaction with the new information"),(0,o.kt)("h2",{id:"synchronization"},"Synchronization"),(0,o.kt)("p",null,"Once the transaction is validated, the node will start by requesting the list of nodes."),(0,o.kt)("p",null,"Then, it will start the ",(0,o.kt)("a",{parentName:"p",href:"/learn/p2p/self-repair"},"Self-Repair")," sequence to get and synchronize the missing transactions and publish its end of sync to the network."),(0,o.kt)("p",null,"By this way, the entire will know the existence the readiness of this node."))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/cc668907.257ec17d.js b/assets/js/cc668907.257ec17d.js new file mode 100644 index 000000000..3e113f8c8 --- /dev/null +++ b/assets/js/cc668907.257ec17d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6753],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||u[m]||o;return a?n.createElement(b,l(l({ref:t},d),{},{components:a})):n.createElement(b,l({ref:t},d))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,l[1]=i;for(var c=2;c{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var n=a(87462),r=a(67294),o=a(3905);a(8209);const l={id:"cross-validation-stamp",title:"CrossValidationStamp",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/objects/cross-validation-stamp",id:"build/api/schema/objects/cross-validation-stamp",title:"CrossValidationStamp",description:"[CrossValidationStamp] represents the approval of the validation stamp by a cross validation node.",source:"@site/docs/build/api/schema/objects/cross-validation-stamp.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/cross-validation-stamp",permalink:"/build/api/schema/objects/cross-validation-stamp",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"cross-validation-stamp",title:"CrossValidationStamp",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"BeaconChainSummary",permalink:"/build/api/schema/objects/beacon-chain-summary"},next:{title:"Data",permalink:"/build/api/schema/objects/data"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'CrossValidationStamp.nodePublicKeyPublicKey ',id:"code-style-fontweight-normal-crossvalidationstampbnodepublickeybcodepublickey-",level:4},{value:'CrossValidationStamp.signatureHex ',id:"code-style-fontweight-normal-crossvalidationstampbsignaturebcodehex-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[CrossValidationStamp]"," represents the approval of the validation stamp by a cross validation node.\nIt includes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Signature: signature of the validation stamp"),(0,o.kt)("li",{parentName:"ul"},"Node public key: cross validation node's public key")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type CrossValidationStamp {\n nodePublicKey: PublicKey\n signature: Hex\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-crossvalidationstampbnodepublickeybcodepublickey-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"CrossValidationStamp.",(0,o.kt)("b",null,"nodePublicKey"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,o.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-crossvalidationstampbsignaturebcodehex-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"CrossValidationStamp.",(0,o.kt)("b",null,"signature"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,o.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/cc668907.a11c50ad.js b/assets/js/cc668907.a11c50ad.js deleted file mode 100644 index 7f5cd5fee..000000000 --- a/assets/js/cc668907.a11c50ad.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6753],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=c(a),m=r,b=p["".concat(s,".").concat(m)]||p[m]||u[m]||o;return a?n.createElement(b,l(l({ref:t},d),{},{components:a})):n.createElement(b,l({ref:t},d))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,l[1]=i;for(var c=2;c{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>c,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>d});var n=a(87462),r=a(67294),o=a(3905);a(8209);const l={id:"cross-validation-stamp",title:"CrossValidationStamp",hide_table_of_contents:!1},i=void 0,s={unversionedId:"build/api/schema/objects/cross-validation-stamp",id:"build/api/schema/objects/cross-validation-stamp",title:"CrossValidationStamp",description:"[CrossValidationStamp] represents the approval of the validation stamp by a cross validation node.",source:"@site/docs/build/api/schema/objects/cross-validation-stamp.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/cross-validation-stamp",permalink:"/build/api/schema/objects/cross-validation-stamp",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"cross-validation-stamp",title:"CrossValidationStamp",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"BeaconChainSummary",permalink:"/build/api/schema/objects/beacon-chain-summary"},next:{title:"Data",permalink:"/build/api/schema/objects/data"}},c={},d=[{value:"Fields",id:"fields",level:3},{value:'CrossValidationStamp.nodePublicKeyPublicKey ',id:"code-style-fontweight-normal-crossvalidationstampbnodepublickeybcodepublickey-",level:4},{value:'CrossValidationStamp.signatureHex ',id:"code-style-fontweight-normal-crossvalidationstampbsignaturebcodehex-",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(r.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,o.kt)(r.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:p,SpecifiedBy:u,Badge:m},f="wrapper";function y(e){let{components:t,...a}=e;return(0,o.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[CrossValidationStamp]"," represents the approval of the validation stamp by a cross validation node.\nIt includes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Signature: signature of the validation stamp"),(0,o.kt)("li",{parentName:"ul"},"Node public key: cross validation node's public key")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type CrossValidationStamp {\n nodePublicKey: PublicKey\n signature: Hex\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-crossvalidationstampbnodepublickeybcodepublickey-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"CrossValidationStamp.",(0,o.kt)("b",null,"nodePublicKey"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/public-key"},(0,o.kt)("inlineCode",{parentName:"a"},"PublicKey"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-crossvalidationstampbsignaturebcodehex-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"CrossValidationStamp.",(0,o.kt)("b",null,"signature"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hex"},(0,o.kt)("inlineCode",{parentName:"a"},"Hex"))," ",(0,o.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,o.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,o.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/cc71d488.3f7d8867.js b/assets/js/cc71d488.3f7d8867.js deleted file mode 100644 index d17e0580a..000000000 --- a/assets/js/cc71d488.3f7d8867.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9216],{3905:(t,e,r)=>{r.d(e,{Zo:()=>g,kt:()=>h});var a=r(67294);function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function i(t){for(var e=1;e=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var l=a.createContext({}),c=function(t){var e=a.useContext(l),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},g=function(t){var e=c(t.components);return a.createElement(l.Provider,{value:e},t.children)},d="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},p=a.forwardRef((function(t,e){var r=t.components,n=t.mdxType,o=t.originalType,l=t.parentName,g=s(t,["components","mdxType","originalType","parentName"]),d=c(r),p=n,h=d["".concat(l,".").concat(p)]||d[p]||u[p]||o;return r?a.createElement(h,i(i({ref:e},g),{},{components:r})):a.createElement(h,i({ref:e},g))}));function h(t,e){var r=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var o=r.length,i=new Array(o);i[0]=p;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[d]="string"==typeof t?t:n,i[1]=s;for(var c=2;c{r.r(e),r.d(e,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=r(87462),n=(r(67294),r(3905));r(8209);const o={id:"build",title:"Smart Contracts Playground - Build",sidebar_label:"Build",sidebar_position:1},i=void 0,s={unversionedId:"build/smart-contracts/playground/build",id:"build/smart-contracts/playground/build",title:"Smart Contracts Playground - Build",description:"Let's create a small smart contracts that reacts to two different triggers. We'll then be able to test them separately.",source:"@site/docs/build/smart-contracts/playground/build.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/build",permalink:"/build/smart-contracts/playground/build",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:1,frontMatter:{id:"build",title:"Smart Contracts Playground - Build",sidebar_label:"Build",sidebar_position:1},sidebar:"docs",previous:{title:"Playground",permalink:"/build/smart-contracts/playground/"},next:{title:"Deploy",permalink:"/build/smart-contracts/playground/deploy"}},l={},c=[{value:"I. Write the contract",id:"i-write-the-contract",level:2},{value:"II. Test the triggers",id:"ii-test-the-triggers",level:2},{value:"Test trigger 'interval'",id:"test-trigger-interval",level:3},{value:"Test trigger 'transaction'",id:"test-trigger-transaction",level:3},{value:"Test trigger 'datetime'",id:"test-trigger-datetime",level:3},{value:"Test trigger 'oracle'",id:"test-trigger-oracle",level:3}],g={toc:c},d="wrapper";function u(t){let{components:e,...o}=t;return(0,n.kt)(d,(0,a.Z)({},g,o,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Let's create a small smart contracts that reacts to two different triggers. We'll then be able to test them separately."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: interval, at: "0 * * * *" do\n Contract.set_content "Hello from interval"\nend\n\ncondition triggered_by: transaction, as: []\nactions triggered_by: transaction do\n Contract.set_content "Hello from tx"\nend\n')),(0,n.kt)("h2",{id:"i-write-the-contract"},"I. Write the contract"),(0,n.kt)("p",null,"Write the code of the smart contract in the text area:\n",(0,n.kt)("img",{alt:"the contract is written in the textarea",src:r(58933).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"As you write, you might see the console at the bottom reacting with different errors:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"a parsing error visible in the console",src:r(89566).Z,width:"3600",height:"2390"})),(0,n.kt)("h2",{id:"ii-test-the-triggers"},"II. Test the triggers"),(0,n.kt)("p",null,"To test a smart contract, you need to test all its triggers. We are going to open the trigger panel by clicking on the trigger button:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the trigger button",src:r(97624).Z,width:"90",height:"67"})),(0,n.kt)("p",null,"The trigger panel opens on the left hand side:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the trigger panel",src:r(13984).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"You are now able to select which trigger you want to test, for this contract a selector of two triggers is displayed (as per the contract):\nYou'll also see the ",(0,n.kt)("a",{parentName:"p",href:"/build/smart-contracts/playground/mock-form"},"mock form")," that is used to mock the functions that does side-effect."),(0,n.kt)("h3",{id:"test-trigger-interval"},"Test trigger 'interval'"),(0,n.kt)("p",null,"An interval trigger is a contract that triggers automatically at a specific interval. It does not require anything so it's pretty easy to test. Just click on the ",(0,n.kt)("inlineCode",{parentName:"p"},"trigger")," button."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the resulting transaction is displayed in the console",src:r(36179).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"What you see above is the JSON representation of the output transaction payload. Here we can control that my contract behaved as expected. The ",(0,n.kt)("inlineCode",{parentName:"p"},"content"),' is set to "Hello from interval" as expected.'),(0,n.kt)("p",null,"You probably saw the ",(0,n.kt)("inlineCode",{parentName:"p"},"trigger and update contract's transaction")," button. Let's click on it to see the difference:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the resulting transaction is displayed in the contract' transaction panel",src:r(31325).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"The difference is not easy to spot, but the transaction of the contract (the right panel) has been updated. This is useful to test a sequence of triggers."),(0,n.kt)("h3",{id:"test-trigger-transaction"},"Test trigger 'transaction'"),(0,n.kt)("p",null,"This trigger is more complex to test because it requires you to mock the transaction that should trigger the contract. After selecting the ",(0,n.kt)("inlineCode",{parentName:"p"},"transaction")," from the trigger selector, a form appears:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the transaction form appears in the panel",src:r(25953).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"This form is composed of two forms:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"the ",(0,n.kt)("a",{parentName:"li",href:"/build/smart-contracts/playground/transaction-form"},"transaction form")),(0,n.kt)("li",{parentName:"ol"},"the ",(0,n.kt)("a",{parentName:"li",href:"/build/smart-contracts/playground/mock-form"},"mock form"))),(0,n.kt)("p",null,"Which results in a very big form that are covered in the links above. For this contract, we'll just submit the form without changing anything."),(0,n.kt)("p",null,"I can now control that the output transaction payload is correct."),(0,n.kt)("h3",{id:"test-trigger-datetime"},"Test trigger 'datetime'"),(0,n.kt)("p",null,"Testing a 'datetime' trigger is similar to testing a trigger 'interval'."),(0,n.kt)("h3",{id:"test-trigger-oracle"},"Test trigger 'oracle'"),(0,n.kt)("p",null,"Testing an 'oracle' trigger is similar to testing a trigger 'transaction' (where the transaction is of type 'oracle')."),(0,n.kt)("admonition",{title:"That's it!",type:"success"},(0,n.kt)("p",{parentName:"admonition"},"You should now be able to build your own smart contracts and test them! The next step now is to ",(0,n.kt)("a",{parentName:"p",href:"/build/smart-contracts/playground/deploy"},"deploy them"),".")))}u.isMDXComponent=!0},58933:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_build_step1-d174efd7243f621764cf7dc42672f055.png"},36179:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_build_step2a-1b389fceb33d5b61491396bee90616f0.png"},25953:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_build_step2b-0ec2d5f241bbb36f96d1f11409ba1438.png"},31325:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_build_step2e-c1d5cb06bc75cc1e631aae66a1b3f715.png"},97624:(t,e,r)=>{r.d(e,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABDCAYAAAAccRJRAAADjklEQVR4Xu2aPWgTYRjHn065LiYuTafExUSH4lLbJdrB1qVWoR+Cn6BFEcRBRBDBSRB3P1FbwU+wH6C1i20HPxZrF62DrYvpYq6LiUsvk77PyZVrzNd7uTxX6P8gZMj7Pv+73/3zfFzSEN/e/odw1J1AA0DXnbEtANAynAFaiDNAA7QUASEd5GiAFiIgJANHA7QQASEZOBqghQgIycDRAC1EQEgGjgZoIQJCMnD0RgO9o6WFwuFNvl52NpejL/NffY3pNdi6cPTezk5qb2v1eg1l932cnaM309N1ia0TNHDQRihEFy+cpxXLoonXk2RZeZ3zL7nWMELUs6+bGg2Drl677kvMWoIEDjoei9Hxo4fpRzpNj58+r+Va/tt77Mgh2hKP06Mnzyi9tORrbN1gAK1LzON6gPYITnfbugW9e1eKOtRL53j7/gO9Uy/nQOpw0SuVoxl0285WmpqaoYXFRbLy/4rklcuX7HenwHExTSYS1NW1h2Y/zQF0KWeWA8173A4tBtqJyzemcD0cXYWjeYDJLJtkmstr7lGho50Po9Emam6K0uf5eaSOQldzauhIpchoNOyPuMUbGR1fTRPFvgWlQLvXcjoZ6O+1Wzs+rBVLDS0za26CTu73Y21gxZAdu7+n2x5UTNMkQw0WzdEo/crm6ObtOyWvrRrQ586eoUg4QhkV11LxoyouDy6vJiYDgx0Y6FODJ2yw94aGV9PDQF8vbUsm6MXomCqA34vCrgQ6mdhKB/v76NvCIo2MjdsxOK2cHjxJPzMmPRh+6IdBtWMEBroYMKelK2zT3FdVCXSpGJX2aZPT3BAY6CAczank/tAGc7STo7lQcXcRVjl1cyRM2VyWbty660uO5lSRz1urRXFD5mgmybB50OBCVc+ugwsuDz7u1k/zm1/z8sBSh3Pmuk/vdHItBhaXP3RAO8+ueXs1z5gB2iNop3Xj7eVaQCc8QHsA7Qwh7mRZabgBaA+gvVQjgAZoL76pbY9OMdRVgqNdxJxOggeXl+pX8Lzqef04Qqo3P6B+Becng9V0KH5olosReB/NJ4f/ddT7Nrvi85QYj8d8+7dSLveb0umlQKdBN7514WjB+xmYFEALoQdogBYiICQDRwO0EAEhGTgaoIUICMnA0QAtREBIBo4GaCECQjJwNEALERCSgaMBWoiAkAwcDdBCBIRk4GiAFiIgJANHA7QQASEZOFoI9F+dpylcDyuw1AAAAABJRU5ErkJggg=="},89566:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_parse_error-ed4c0a0a7c8cb31134641160c5c416fd.png"},13984:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_trigger_panel-8fdbf19ac3c721478edeccaa6aab9126.png"},8209:(t,e,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/cc71d488.5c791853.js b/assets/js/cc71d488.5c791853.js new file mode 100644 index 000000000..b947dbb6b --- /dev/null +++ b/assets/js/cc71d488.5c791853.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9216],{3905:(t,e,r)=>{r.d(e,{Zo:()=>g,kt:()=>h});var a=r(67294);function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function i(t){for(var e=1;e=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var l=a.createContext({}),c=function(t){var e=a.useContext(l),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},g=function(t){var e=c(t.components);return a.createElement(l.Provider,{value:e},t.children)},d="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},p=a.forwardRef((function(t,e){var r=t.components,n=t.mdxType,o=t.originalType,l=t.parentName,g=s(t,["components","mdxType","originalType","parentName"]),d=c(r),p=n,h=d["".concat(l,".").concat(p)]||d[p]||u[p]||o;return r?a.createElement(h,i(i({ref:e},g),{},{components:r})):a.createElement(h,i({ref:e},g))}));function h(t,e){var r=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var o=r.length,i=new Array(o);i[0]=p;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[d]="string"==typeof t?t:n,i[1]=s;for(var c=2;c{r.r(e),r.d(e,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=r(87462),n=(r(67294),r(3905));r(8209);const o={id:"build",title:"Smart Contracts Playground - Build",sidebar_label:"Build",sidebar_position:1},i=void 0,s={unversionedId:"build/smart-contracts/playground/build",id:"build/smart-contracts/playground/build",title:"Smart Contracts Playground - Build",description:"Let's create a small smart contracts that reacts to two different triggers. We'll then be able to test them separately.",source:"@site/docs/build/smart-contracts/playground/build.md",sourceDirName:"build/smart-contracts/playground",slug:"/build/smart-contracts/playground/build",permalink:"/build/smart-contracts/playground/build",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:1,frontMatter:{id:"build",title:"Smart Contracts Playground - Build",sidebar_label:"Build",sidebar_position:1},sidebar:"docs",previous:{title:"Playground",permalink:"/build/smart-contracts/playground/"},next:{title:"Deploy",permalink:"/build/smart-contracts/playground/deploy"}},l={},c=[{value:"I. Write the contract",id:"i-write-the-contract",level:2},{value:"II. Test the triggers",id:"ii-test-the-triggers",level:2},{value:"Test trigger 'interval'",id:"test-trigger-interval",level:3},{value:"Test trigger 'transaction'",id:"test-trigger-transaction",level:3},{value:"Test trigger 'datetime'",id:"test-trigger-datetime",level:3},{value:"Test trigger 'oracle'",id:"test-trigger-oracle",level:3}],g={toc:c},d="wrapper";function u(t){let{components:e,...o}=t;return(0,n.kt)(d,(0,a.Z)({},g,o,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Let's create a small smart contracts that reacts to two different triggers. We'll then be able to test them separately."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-elixir"},'@version 1\n\nactions triggered_by: interval, at: "0 * * * *" do\n Contract.set_content "Hello from interval"\nend\n\ncondition triggered_by: transaction, as: []\nactions triggered_by: transaction do\n Contract.set_content "Hello from tx"\nend\n')),(0,n.kt)("h2",{id:"i-write-the-contract"},"I. Write the contract"),(0,n.kt)("p",null,"Write the code of the smart contract in the text area:\n",(0,n.kt)("img",{alt:"the contract is written in the textarea",src:r(58933).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"As you write, you might see the console at the bottom reacting with different errors:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"a parsing error visible in the console",src:r(89566).Z,width:"3600",height:"2390"})),(0,n.kt)("h2",{id:"ii-test-the-triggers"},"II. Test the triggers"),(0,n.kt)("p",null,"To test a smart contract, you need to test all its triggers. We are going to open the trigger panel by clicking on the trigger button:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the trigger button",src:r(97624).Z,width:"90",height:"67"})),(0,n.kt)("p",null,"The trigger panel opens on the left hand side:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the trigger panel",src:r(13984).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"You are now able to select which trigger you want to test, for this contract a selector of two triggers is displayed (as per the contract):\nYou'll also see the ",(0,n.kt)("a",{parentName:"p",href:"/build/smart-contracts/playground/mock-form"},"mock form")," that is used to mock the functions that does side-effect."),(0,n.kt)("h3",{id:"test-trigger-interval"},"Test trigger 'interval'"),(0,n.kt)("p",null,"An interval trigger is a contract that triggers automatically at a specific interval. It does not require anything so it's pretty easy to test. Just click on the ",(0,n.kt)("inlineCode",{parentName:"p"},"trigger")," button."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the resulting transaction is displayed in the console",src:r(36179).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"What you see above is the JSON representation of the output transaction payload. Here we can control that my contract behaved as expected. The ",(0,n.kt)("inlineCode",{parentName:"p"},"content"),' is set to "Hello from interval" as expected.'),(0,n.kt)("p",null,"You probably saw the ",(0,n.kt)("inlineCode",{parentName:"p"},"trigger and update contract's transaction")," button. Let's click on it to see the difference:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the resulting transaction is displayed in the contract' transaction panel",src:r(31325).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"The difference is not easy to spot, but the transaction of the contract (the right panel) has been updated. This is useful to test a sequence of triggers."),(0,n.kt)("h3",{id:"test-trigger-transaction"},"Test trigger 'transaction'"),(0,n.kt)("p",null,"This trigger is more complex to test because it requires you to mock the transaction that should trigger the contract. After selecting the ",(0,n.kt)("inlineCode",{parentName:"p"},"transaction")," from the trigger selector, a form appears:"),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"the transaction form appears in the panel",src:r(25953).Z,width:"3600",height:"2390"})),(0,n.kt)("p",null,"This form is composed of two forms:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"the ",(0,n.kt)("a",{parentName:"li",href:"/build/smart-contracts/playground/transaction-form"},"transaction form")),(0,n.kt)("li",{parentName:"ol"},"the ",(0,n.kt)("a",{parentName:"li",href:"/build/smart-contracts/playground/mock-form"},"mock form"))),(0,n.kt)("p",null,"Which results in a very big form that are covered in the links above. For this contract, we'll just submit the form without changing anything."),(0,n.kt)("p",null,"I can now control that the output transaction payload is correct."),(0,n.kt)("h3",{id:"test-trigger-datetime"},"Test trigger 'datetime'"),(0,n.kt)("p",null,"Testing a 'datetime' trigger is similar to testing a trigger 'interval'."),(0,n.kt)("h3",{id:"test-trigger-oracle"},"Test trigger 'oracle'"),(0,n.kt)("p",null,"Testing an 'oracle' trigger is similar to testing a trigger 'transaction' (where the transaction is of type 'oracle')."),(0,n.kt)("admonition",{title:"That's it!",type:"success"},(0,n.kt)("p",{parentName:"admonition"},"You should now be able to build your own smart contracts and test them! The next step now is to ",(0,n.kt)("a",{parentName:"p",href:"/build/smart-contracts/playground/deploy"},"deploy them"),".")))}u.isMDXComponent=!0},58933:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_build_step1-d174efd7243f621764cf7dc42672f055.png"},36179:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_build_step2a-1b389fceb33d5b61491396bee90616f0.png"},25953:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_build_step2b-0ec2d5f241bbb36f96d1f11409ba1438.png"},31325:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_build_step2e-c1d5cb06bc75cc1e631aae66a1b3f715.png"},97624:(t,e,r)=>{r.d(e,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABDCAYAAAAccRJRAAADjklEQVR4Xu2aPWgTYRjHn065LiYuTafExUSH4lLbJdrB1qVWoR+Cn6BFEcRBRBDBSRB3P1FbwU+wH6C1i20HPxZrF62DrYvpYq6LiUsvk77PyZVrzNd7uTxX6P8gZMj7Pv+73/3zfFzSEN/e/odw1J1AA0DXnbEtANAynAFaiDNAA7QUASEd5GiAFiIgJANHA7QQASEZOBqghQgIycDRAC1EQEgGjgZoIQJCMnD0RgO9o6WFwuFNvl52NpejL/NffY3pNdi6cPTezk5qb2v1eg1l932cnaM309N1ia0TNHDQRihEFy+cpxXLoonXk2RZeZ3zL7nWMELUs6+bGg2Drl677kvMWoIEDjoei9Hxo4fpRzpNj58+r+Va/tt77Mgh2hKP06Mnzyi9tORrbN1gAK1LzON6gPYITnfbugW9e1eKOtRL53j7/gO9Uy/nQOpw0SuVoxl0285WmpqaoYXFRbLy/4rklcuX7HenwHExTSYS1NW1h2Y/zQF0KWeWA8173A4tBtqJyzemcD0cXYWjeYDJLJtkmstr7lGho50Po9Emam6K0uf5eaSOQldzauhIpchoNOyPuMUbGR1fTRPFvgWlQLvXcjoZ6O+1Wzs+rBVLDS0za26CTu73Y21gxZAdu7+n2x5UTNMkQw0WzdEo/crm6ObtOyWvrRrQ586eoUg4QhkV11LxoyouDy6vJiYDgx0Y6FODJ2yw94aGV9PDQF8vbUsm6MXomCqA34vCrgQ6mdhKB/v76NvCIo2MjdsxOK2cHjxJPzMmPRh+6IdBtWMEBroYMKelK2zT3FdVCXSpGJX2aZPT3BAY6CAczank/tAGc7STo7lQcXcRVjl1cyRM2VyWbty660uO5lSRz1urRXFD5mgmybB50OBCVc+ugwsuDz7u1k/zm1/z8sBSh3Pmuk/vdHItBhaXP3RAO8+ueXs1z5gB2iNop3Xj7eVaQCc8QHsA7Qwh7mRZabgBaA+gvVQjgAZoL76pbY9OMdRVgqNdxJxOggeXl+pX8Lzqef04Qqo3P6B+Becng9V0KH5olosReB/NJ4f/ddT7Nrvi85QYj8d8+7dSLveb0umlQKdBN7514WjB+xmYFEALoQdogBYiICQDRwO0EAEhGTgaoIUICMnA0QAtREBIBo4GaCECQjJwNEALERCSgaMBWoiAkAwcDdBCBIRk4GiAFiIgJANHA7QQASEZOFoI9F+dpylcDyuw1AAAAABJRU5ErkJggg=="},89566:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_parse_error-ed4c0a0a7c8cb31134641160c5c416fd.png"},13984:(t,e,r)=>{r.d(e,{Z:()=>a});const a=r.p+"assets/images/playground_trigger_panel-8fdbf19ac3c721478edeccaa6aab9126.png"},8209:(t,e,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/ceaeeb36.ce09e377.js b/assets/js/ceaeeb36.3258bb34.js similarity index 58% rename from assets/js/ceaeeb36.ce09e377.js rename to assets/js/ceaeeb36.3258bb34.js index 0bc90328d..a6d5f4c3e 100644 --- a/assets/js/ceaeeb36.ce09e377.js +++ b/assets/js/ceaeeb36.3258bb34.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2323],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(n),m=a,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"code-proposals-cd",title:"CD"},i=void 0,c={unversionedId:"build/core/governance/code-proposals-cd",id:"build/core/governance/code-proposals-cd",title:"CD",description:"The archethic-cd target produces an image capable of running archethic_node release.",source:"@site/docs/build/core/governance/cd.md",sourceDirName:"build/core/governance",slug:"/build/core/governance/code-proposals-cd",permalink:"/build/core/governance/code-proposals-cd",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"code-proposals-cd",title:"CD"},sidebar:"docs",previous:{title:"Election",permalink:"/build/core/election"},next:{title:"CI",permalink:"/build/core/governance/code-proposals-ci"}},l={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"archethic-cd")," target produces an image capable of running ",(0,a.kt)("inlineCode",{parentName:"p"},"archethic_node")," release.\nThe objective of cd is to test the code proposal in a testnet environment which means spawning:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"5 nodes that run the new version"),(0,a.kt)("li",{parentName:"ul"},"2 validator containers"),(0,a.kt)("li",{parentName:"ul"},"1 prometheus container"),(0,a.kt)("li",{parentName:"ul"},"1 benchmark container")),(0,a.kt)("p",null,"the cd happens in multiple steps:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"first we start by copying the upgrade release and the logs we created in the CI part to a tmp folder"),(0,a.kt)("li",{parentName:"ul"},"next we create the subnet and we start all the containers responsible for the CD"),(0,a.kt)("li",{parentName:"ul"},"The validator container ensures that every node is up and do a benchmark before we apply the upgrade"),(0,a.kt)("li",{parentName:"ul"},"We apply the upgrade"),(0,a.kt)("li",{parentName:"ul"},"we start the second round of validation which is responsible for running benchmarks again, running the playbooks and gathering metrics from prometheus."),(0,a.kt)("li",{parentName:"ul"},"we wait for the final validation message and we clean all containers and images we created.")),(0,a.kt)("p",null,"nb: the cleaning phase will happen even in the case of failure."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2323],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(n),m=a,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"code-proposals-cd",title:"CD"},i=void 0,c={unversionedId:"build/core/governance/code-proposals-cd",id:"build/core/governance/code-proposals-cd",title:"CD",description:"The archethic-cd target produces an image capable of running archethic_node release.",source:"@site/docs/build/core/governance/cd.md",sourceDirName:"build/core/governance",slug:"/build/core/governance/code-proposals-cd",permalink:"/build/core/governance/code-proposals-cd",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"code-proposals-cd",title:"CD"},sidebar:"docs",previous:{title:"Election",permalink:"/build/core/election"},next:{title:"CI",permalink:"/build/core/governance/code-proposals-ci"}},l={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"archethic-cd")," target produces an image capable of running ",(0,a.kt)("inlineCode",{parentName:"p"},"archethic_node")," release.\nThe objective of cd is to test the code proposal in a testnet environment which means spawning:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"5 nodes that run the new version"),(0,a.kt)("li",{parentName:"ul"},"2 validator containers"),(0,a.kt)("li",{parentName:"ul"},"1 prometheus container"),(0,a.kt)("li",{parentName:"ul"},"1 benchmark container")),(0,a.kt)("p",null,"the cd happens in multiple steps:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"first we start by copying the upgrade release and the logs we created in the CI part to a tmp folder"),(0,a.kt)("li",{parentName:"ul"},"next we create the subnet and we start all the containers responsible for the CD"),(0,a.kt)("li",{parentName:"ul"},"The validator container ensures that every node is up and do a benchmark before we apply the upgrade"),(0,a.kt)("li",{parentName:"ul"},"We apply the upgrade"),(0,a.kt)("li",{parentName:"ul"},"we start the second round of validation which is responsible for running benchmarks again, running the playbooks and gathering metrics from prometheus."),(0,a.kt)("li",{parentName:"ul"},"we wait for the final validation message and we clean all containers and images we created.")),(0,a.kt)("p",null,"nb: the cleaning phase will happen even in the case of failure."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/d0a652bb.53687169.js b/assets/js/d0a652bb.53687169.js deleted file mode 100644 index 69db98628..000000000 --- a/assets/js/d0a652bb.53687169.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5944],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},h=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),p=c(n),u=r,m=p["".concat(l,".").concat(u)]||p[u]||d[u]||o;return n?a.createElement(m,i(i({ref:t},h),{},{components:n})):a.createElement(m,i({ref:t},h))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"explorer",title:"Beacon Explorer"},i=void 0,s={unversionedId:"learn/sharding/beacon-chain/explorer",id:"learn/sharding/beacon-chain/explorer",title:"Beacon Explorer",description:"Archethic Blockchain leverages Sharding to outperform the exiting blockchains using shards called: subsets and BeaconChain Explorer displays the entire transactions across subsets.",source:"@site/docs/learn/sharding/beacon-chain/explorer.md",sourceDirName:"learn/sharding/beacon-chain",slug:"/learn/sharding/beacon-chain/explorer",permalink:"/learn/sharding/beacon-chain/explorer",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"explorer",title:"Beacon Explorer"},sidebar:"docs",previous:{title:"Beacon Chain",permalink:"/learn/sharding/beacon-chain/"},next:{title:"Replication attestation",permalink:"/learn/sharding/replication-attestation"}},l={},c=[{value:"Concepts",id:"concepts",level:2},{value:"Slot",id:"slot",level:3},{value:"Epoch",id:"epoch",level:3},{value:"Subset",id:"subset",level:3},{value:"Process to get transaction notifications",id:"process-to-get-transaction-notifications",level:2},{value:"How to get transactions in realtime",id:"how-to-get-transactions-in-realtime",level:2}],h={toc:c},p="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Archethic")," Blockchain leverages ",(0,r.kt)("inlineCode",{parentName:"p"},"Sharding")," to outperform the exiting blockchains using shards called: ",(0,r.kt)("inlineCode",{parentName:"p"},"subsets")," and BeaconChain Explorer displays the entire transactions across subsets.\nSo, users can overcome the overhead of searching in each shard."),(0,r.kt)("h2",{id:"concepts"},"Concepts"),(0,r.kt)("p",null,"To better understand about Beacon Chain Explorer one need to first have overview the some basic concepts below: "),(0,r.kt)("h3",{id:"slot"},"Slot"),(0,r.kt)("p",null,"It is the time interval for a slot. We can explicitly give any time interval based on our testnet/mainnet environmnent."),(0,r.kt)("p",null,"A slot is responsible for transaction being added to the Beacon Chain and shards. ",(0,r.kt)("a",{parentName:"p",href:"/learn/sharding/beacon-chain#slot"},"See Slot")),(0,r.kt)("h3",{id:"epoch"},"Epoch"),(0,r.kt)("p",null,"It is an time interval within Archethic network for the Beacon chain subsets.\nOne epoch may have many slots based on the slot timer interval.\nAt each epoch a new transaction is emitted to have a summary of the entire epoch."),(0,r.kt)("p",null,"Epoch interval may differ between mainnet, testnet or development. For instance mainnet epoch interval is daily while for testnet it is currently every minute, to ease integration and simulation of the network."),(0,r.kt)("p",null,"So in this time interval beacon transactions are sealing the transaction in the current beacon summary transaction and replicates the transactions to other nodes."),(0,r.kt)("h3",{id:"subset"},"Subset"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Archethic")," Blockchain have 256 subsets, from 00 to FF ","[0-255]"," (two nibbles) as the byte capacity and the first byte of the transaction."),(0,r.kt)("h2",{id:"process-to-get-transaction-notifications"},"Process to get transaction notifications"),(0,r.kt)("p",null,"Beacon Chain will store the transactions in slots and at the beacon summary time all those transactions are summarized and will be replicated among the beacon storage nodes which are elected as storage nodes."),(0,r.kt)("p",null,"The day 1 will be the next beacon summary date from the first node enrollment date, which means, if the first node joins on ",(0,r.kt)("inlineCode",{parentName:"p"},"02/11/2021 10:00:00"),", the beacon chain date to pull will be ",(0,r.kt)("inlineCode",{parentName:"p"},"03/11/2021 00:00:00")),(0,r.kt)("p",null,"The explorer then exposes a pagination based on date, since we can easily reproduce the addresses through a deterministic\naddress generation based on date."),(0,r.kt)("p",null,"So from the ",(0,r.kt)("inlineCode",{parentName:"p"},"day 1")," until now, we can offer pagination over the beacon summaries."),(0,r.kt)("p",null,"Because we are able to have a reproducible storage node election algorithm we can fetch data for a given date\nfor the right nodes."),(0,r.kt)("h2",{id:"how-to-get-transactions-in-realtime"},"How to get transactions in realtime"),(0,r.kt)("p",null,"When a client is displaying the beacon chain explorer, a request is sent to the BeaconChain subset in charge of the current slot, to subscribe notifications about transactions replications."),(0,r.kt)("p",null,"On the BeaconChain, once a transaction is replicated a subset will enlist it for the next slot to be persisted."),(0,r.kt)("p",null,"Then we have the capability to notify subscribed clients (aka explorer nodes) the transaction completion."),(0,r.kt)("p",null,"But because Archethic is using a rotating sharding implementation, the nodes involved for a given slot will change over the time, therefore behind the scenes the explorer will subscribe for each new slot to have the latest transactions in a soft real time fashion."),(0,r.kt)("mermaid",{value:"graph TD\n A[Explorer] --\x3e|Subscribe to updates| B{BeaconChains}\n B --\x3eD[Subset 0]\n B --\x3eE[Subset 1]\n B --\x3eF[Subset 2]\n F --\x3e|Notify new transaction|A\n \n X[Transaction Validator] --\x3e|Attest transaction|F"}))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/d0a652bb.e08a2288.js b/assets/js/d0a652bb.e08a2288.js new file mode 100644 index 000000000..dccac9da3 --- /dev/null +++ b/assets/js/d0a652bb.e08a2288.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5944],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},h=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),p=c(n),u=r,m=p["".concat(l,".").concat(u)]||p[u]||d[u]||o;return n?a.createElement(m,i(i({ref:t},h),{},{components:n})):a.createElement(m,i({ref:t},h))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"explorer",title:"Beacon Explorer"},i=void 0,s={unversionedId:"learn/sharding/beacon-chain/explorer",id:"learn/sharding/beacon-chain/explorer",title:"Beacon Explorer",description:"Archethic Blockchain leverages Sharding to outperform the exiting blockchains using shards called: subsets and BeaconChain Explorer displays the entire transactions across subsets.",source:"@site/docs/learn/sharding/beacon-chain/explorer.md",sourceDirName:"learn/sharding/beacon-chain",slug:"/learn/sharding/beacon-chain/explorer",permalink:"/learn/sharding/beacon-chain/explorer",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"explorer",title:"Beacon Explorer"},sidebar:"docs",previous:{title:"Beacon Chain",permalink:"/learn/sharding/beacon-chain/"},next:{title:"Replication attestation",permalink:"/learn/sharding/replication-attestation"}},l={},c=[{value:"Concepts",id:"concepts",level:2},{value:"Slot",id:"slot",level:3},{value:"Epoch",id:"epoch",level:3},{value:"Subset",id:"subset",level:3},{value:"Process to get transaction notifications",id:"process-to-get-transaction-notifications",level:2},{value:"How to get transactions in realtime",id:"how-to-get-transactions-in-realtime",level:2}],h={toc:c},p="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Archethic")," Blockchain leverages ",(0,r.kt)("inlineCode",{parentName:"p"},"Sharding")," to outperform the exiting blockchains using shards called: ",(0,r.kt)("inlineCode",{parentName:"p"},"subsets")," and BeaconChain Explorer displays the entire transactions across subsets.\nSo, users can overcome the overhead of searching in each shard."),(0,r.kt)("h2",{id:"concepts"},"Concepts"),(0,r.kt)("p",null,"To better understand about Beacon Chain Explorer one need to first have overview the some basic concepts below: "),(0,r.kt)("h3",{id:"slot"},"Slot"),(0,r.kt)("p",null,"It is the time interval for a slot. We can explicitly give any time interval based on our testnet/mainnet environmnent."),(0,r.kt)("p",null,"A slot is responsible for transaction being added to the Beacon Chain and shards. ",(0,r.kt)("a",{parentName:"p",href:"/learn/sharding/beacon-chain#slot"},"See Slot")),(0,r.kt)("h3",{id:"epoch"},"Epoch"),(0,r.kt)("p",null,"It is an time interval within Archethic network for the Beacon chain subsets.\nOne epoch may have many slots based on the slot timer interval.\nAt each epoch a new transaction is emitted to have a summary of the entire epoch."),(0,r.kt)("p",null,"Epoch interval may differ between mainnet, testnet or development. For instance mainnet epoch interval is daily while for testnet it is currently every minute, to ease integration and simulation of the network."),(0,r.kt)("p",null,"So in this time interval beacon transactions are sealing the transaction in the current beacon summary transaction and replicates the transactions to other nodes."),(0,r.kt)("h3",{id:"subset"},"Subset"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Archethic")," Blockchain have 256 subsets, from 00 to FF ","[0-255]"," (two nibbles) as the byte capacity and the first byte of the transaction."),(0,r.kt)("h2",{id:"process-to-get-transaction-notifications"},"Process to get transaction notifications"),(0,r.kt)("p",null,"Beacon Chain will store the transactions in slots and at the beacon summary time all those transactions are summarized and will be replicated among the beacon storage nodes which are elected as storage nodes."),(0,r.kt)("p",null,"The day 1 will be the next beacon summary date from the first node enrollment date, which means, if the first node joins on ",(0,r.kt)("inlineCode",{parentName:"p"},"02/11/2021 10:00:00"),", the beacon chain date to pull will be ",(0,r.kt)("inlineCode",{parentName:"p"},"03/11/2021 00:00:00")),(0,r.kt)("p",null,"The explorer then exposes a pagination based on date, since we can easily reproduce the addresses through a deterministic\naddress generation based on date."),(0,r.kt)("p",null,"So from the ",(0,r.kt)("inlineCode",{parentName:"p"},"day 1")," until now, we can offer pagination over the beacon summaries."),(0,r.kt)("p",null,"Because we are able to have a reproducible storage node election algorithm we can fetch data for a given date\nfor the right nodes."),(0,r.kt)("h2",{id:"how-to-get-transactions-in-realtime"},"How to get transactions in realtime"),(0,r.kt)("p",null,"When a client is displaying the beacon chain explorer, a request is sent to the BeaconChain subset in charge of the current slot, to subscribe notifications about transactions replications."),(0,r.kt)("p",null,"On the BeaconChain, once a transaction is replicated a subset will enlist it for the next slot to be persisted."),(0,r.kt)("p",null,"Then we have the capability to notify subscribed clients (aka explorer nodes) the transaction completion."),(0,r.kt)("p",null,"But because Archethic is using a rotating sharding implementation, the nodes involved for a given slot will change over the time, therefore behind the scenes the explorer will subscribe for each new slot to have the latest transactions in a soft real time fashion."),(0,r.kt)("mermaid",{value:"graph TD\n A[Explorer] --\x3e|Subscribe to updates| B{BeaconChains}\n B --\x3eD[Subset 0]\n B --\x3eE[Subset 1]\n B --\x3eF[Subset 2]\n F --\x3e|Notify new transaction|A\n \n X[Transaction Validator] --\x3e|Attest transaction|F"}))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/d2674f84.57966c18.js b/assets/js/d2674f84.57966c18.js new file mode 100644 index 000000000..64288cdb9 --- /dev/null +++ b/assets/js/d2674f84.57966c18.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[669],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),u=r,h=p["".concat(l,".").concat(u)]||p[u]||m[u]||o;return n?a.createElement(h,i(i({ref:t},d),{},{components:n})):a.createElement(h,i({ref:t},d))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"actions",title:"Smart Contracts - Actions block",sidebar_label:"Actions",sidebar_position:3},i=void 0,s={unversionedId:"build/smart-contracts/language/actions",id:"build/smart-contracts/language/actions",title:"Smart Contracts - Actions block",description:"The actions block is the code executed when the associated trigger is triggered.",source:"@site/docs/build/smart-contracts/language/actions.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/actions",permalink:"/build/smart-contracts/language/actions",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:3,frontMatter:{id:"actions",title:"Smart Contracts - Actions block",sidebar_label:"Actions",sidebar_position:3},sidebar:"docs",previous:{title:"Condition",permalink:"/build/smart-contracts/language/condition"},next:{title:"Library",permalink:"/build/smart-contracts/language/library"}},l={},c=[{value:"Global variables",id:"global-variables",level:2},{value:"contract",id:"contract",level:4},{value:"transaction",id:"transaction",level:4},{value:"Named action arguments",id:"named-action-arguments",level:2},{value:"Generating the next transaction",id:"generating-the-next-transaction",level:2},{value:"Appendix 1: The transaction map",id:"appendix-1-the-transaction-map",level:2}],d={toc:c},p="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"actions")," block is the code executed when the associated ",(0,r.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/triggers"},"trigger")," is triggered."),(0,r.kt)("h2",{id:"global-variables"},"Global variables"),(0,r.kt)("p",null,"Depending on the trigger, there are different global variables accessible."),(0,r.kt)("h4",{id:"contract"},"contract"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"contract")," variable is a map of the current contract's transaction. See ",(0,r.kt)("a",{parentName:"p",href:"#appendix-1-the-transaction-map"},"Appendix 1"),"."),(0,r.kt)("h4",{id:"transaction"},"transaction"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"transaction")," variable is a map of the transaction that triggered the ",(0,r.kt)("inlineCode",{parentName:"p"},"actions")," block. See ",(0,r.kt)("a",{parentName:"p",href:"#appendix-1-the-transaction-map"},"Appendix 1"),". ",(0,r.kt)("strong",{parentName:"p"},"It is only available when the trigger is a transaction or an oracle"),"."),(0,r.kt)("h2",{id:"named-action-arguments"},"Named action arguments"),(0,r.kt)("p",null,"In the case of named action trigger, arguments sent by the callers are provided to the action block as variables.\nBe careful not to rebind them inadvertedly. Do not use any of the ",(0,r.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/#reserved-keywords"},"reserved keywords")," as parameter."),(0,r.kt)("admonition",{title:"Argument VS Parameter",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"A parameter is a variable in a function definition. It is a placeholder and hence does not have a concrete value. An argument is a value passed during function invocation. In a way, arguments fill in the place the parameters have held for them.\nSource: ",(0,r.kt)("a",{parentName:"p",href:"https://www.educative.io/answers/parameter-vs-argument"},"https://www.educative.io/answers/parameter-vs-argument"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'actions trigger_by: transaction, on: vote(firstname, lastname) do\n full_name = String.to_lowercase("#{firstname} #{lastname}")\n ...\nend\n')),(0,r.kt)("h2",{id:"generating-the-next-transaction"},"Generating the next transaction"),(0,r.kt)("p",null,"The main goal of the action block is to generate a new transaction in the smart contract chain.\nTo do so, you can use the ",(0,r.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library#contract"},"Contract")," module that allows to set the transaction field value."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'# Set uco ATH in content\nactions triggered_by: oracle do\n current_ath = String.to_number(contract.content)\n new_price = Json.path_extract(transaction.content, "$.uco.usd")\n\n if new_price > current_ath do\n Contract.set_content(new_price)\n end\nend\n')),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Note that there are 3 fields that are preset before executing the action code."),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},'type: set to "contract" by default'),(0,r.kt)("li",{parentName:"ul"},"code: set with the previous contract code"),(0,r.kt)("li",{parentName:"ul"},"ownerships: set with the previous contract ownerships")),(0,r.kt)("p",{parentName:"admonition"},"So you don't need to set the type, the code and the ownerships each time you generate a new transaction.")),(0,r.kt)("h2",{id:"appendix-1-the-transaction-map"},"Appendix 1: The transaction map"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"address")," is the transaction's address."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"type")," is the transaction's type."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"content")," is the transaction's content (it's a string that can contain anything, for example a smart contract state)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"code")," is the transaction's code"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"timestamp")," is the transaction's validation timestamp"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uco_movements")," is a map of UCO transfers grouped by ",(0,r.kt)("em",{parentName:"li"},"resolved")," address of the transaction.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'["00001ab...": 1, "00001bc...": 2]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token_movements")," is a map of list of token transfers grouped by ",(0,r.kt)("em",{parentName:"li"},"resolved")," address of the transaction")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'["00001ab...":\n [\n [amount: 1, token_address: "0000ab12..." , token_id: 1],\n [amount: 1, token_address: "0000ab12..." , token_id: 4],\n ]\n]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uco_transfers")," is a map of UCO transfers grouped by address of the transaction.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'["00001ab...": 1, "00001bc...": 2]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token_transfers")," is a map of list of token transfers grouped by address of the transaction")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'["00001ab...":\n [\n [amount: 1, token_address: "0000ab12..." , token_id: 1],\n [amount: 1, token_address: "0000ab12..." , token_id: 4],\n ]\n]\n')),(0,r.kt)("admonition",{title:"Difference between transfers and movements",type:"info"},(0,r.kt)("p",{parentName:"admonition"},'The transfers and movements are almost the same thing. The difference is in the addresses.\nThe addresses of the transfers are "raw" whereas the addresses of the movements are "resolved".'),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"raw address"),": address that was specified on a transfer (usually the genesis but not mandatory)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"resolved address"),": address of the latest transaction of the chain (the chain that contains ",(0,r.kt)("inlineCode",{parentName:"li"},"raw address"),")")),(0,r.kt)("p",{parentName:"admonition"},"Here's an example to understand the difference:"),(0,r.kt)("p",{parentName:"admonition"},"This is a UCO transfer to MyAmazingContract. The transfer is usually done on the genesis address (here: ",(0,r.kt)("inlineCode",{parentName:"p"},"0x00abc"),"). But the transfer is actually creating an UTXO on the latest transaction of the chain (here: ",(0,r.kt)("inlineCode",{parentName:"p"},"0x00def"),")."),(0,r.kt)("mermaid",{parentName:"admonition",value:"flowchart LR\n subgraph MyAmazingContract\n Tx1((genesis 0x00abc)) --\x3e Tx2[transaction 0x00bcd]\n Tx2 --\x3e Tx3[transaction 0x00cde]\n Tx3 --\x3e Tx4[transaction 0x00def]\n end\n Transfer-.->|raw|Tx1\n Transfer-.->|resolved|Tx4"}),(0,r.kt)("p",{parentName:"admonition"},"Thus ",(0,r.kt)("inlineCode",{parentName:"p"},"contract.uco_transfers == [0x00abc: 1]")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"contract.uco_movements == [0x00def: 1]"),"."),(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("strong",{parentName:"p"},"In most cases, you'll want to use ",(0,r.kt)("inlineCode",{parentName:"strong"},"movements")," instead of ",(0,r.kt)("inlineCode",{parentName:"strong"},"transfers"),"."))))}m.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/d2674f84.95544d4d.js b/assets/js/d2674f84.95544d4d.js deleted file mode 100644 index 06f2f4bae..000000000 --- a/assets/js/d2674f84.95544d4d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[669],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),u=r,h=p["".concat(l,".").concat(u)]||p[u]||m[u]||o;return n?a.createElement(h,i(i({ref:t},d),{},{components:n})):a.createElement(h,i({ref:t},d))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"actions",title:"Smart Contracts - Actions block",sidebar_label:"Actions",sidebar_position:3},i=void 0,s={unversionedId:"build/smart-contracts/language/actions",id:"build/smart-contracts/language/actions",title:"Smart Contracts - Actions block",description:"The actions block is the code executed when the associated trigger is triggered.",source:"@site/docs/build/smart-contracts/language/actions.md",sourceDirName:"build/smart-contracts/language",slug:"/build/smart-contracts/language/actions",permalink:"/build/smart-contracts/language/actions",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:3,frontMatter:{id:"actions",title:"Smart Contracts - Actions block",sidebar_label:"Actions",sidebar_position:3},sidebar:"docs",previous:{title:"Condition",permalink:"/build/smart-contracts/language/condition"},next:{title:"Library",permalink:"/build/smart-contracts/language/library"}},l={},c=[{value:"Global variables",id:"global-variables",level:2},{value:"contract",id:"contract",level:4},{value:"transaction",id:"transaction",level:4},{value:"Named action arguments",id:"named-action-arguments",level:2},{value:"Generating the next transaction",id:"generating-the-next-transaction",level:2},{value:"Appendix 1: The transaction map",id:"appendix-1-the-transaction-map",level:2}],d={toc:c},p="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"actions")," block is the code executed when the associated ",(0,r.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/triggers"},"trigger")," is triggered."),(0,r.kt)("h2",{id:"global-variables"},"Global variables"),(0,r.kt)("p",null,"Depending on the trigger, there are different global variables accessible."),(0,r.kt)("h4",{id:"contract"},"contract"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"contract")," variable is a map of the current contract's transaction. See ",(0,r.kt)("a",{parentName:"p",href:"#appendix-1-the-transaction-map"},"Appendix 1"),"."),(0,r.kt)("h4",{id:"transaction"},"transaction"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"transaction")," variable is a map of the transaction that triggered the ",(0,r.kt)("inlineCode",{parentName:"p"},"actions")," block. See ",(0,r.kt)("a",{parentName:"p",href:"#appendix-1-the-transaction-map"},"Appendix 1"),". ",(0,r.kt)("strong",{parentName:"p"},"It is only available when the trigger is a transaction or an oracle"),"."),(0,r.kt)("h2",{id:"named-action-arguments"},"Named action arguments"),(0,r.kt)("p",null,"In the case of named action trigger, arguments sent by the callers are provided to the action block as variables.\nBe careful not to rebind them inadvertedly. Do not use any of the ",(0,r.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/#reserved-keywords"},"reserved keywords")," as parameter."),(0,r.kt)("admonition",{title:"Argument VS Parameter",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"A parameter is a variable in a function definition. It is a placeholder and hence does not have a concrete value. An argument is a value passed during function invocation. In a way, arguments fill in the place the parameters have held for them.\nSource: ",(0,r.kt)("a",{parentName:"p",href:"https://www.educative.io/answers/parameter-vs-argument"},"https://www.educative.io/answers/parameter-vs-argument"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'actions trigger_by: transaction, on: vote(firstname, lastname) do\n full_name = String.to_lowercase("#{firstname} #{lastname}")\n ...\nend\n')),(0,r.kt)("h2",{id:"generating-the-next-transaction"},"Generating the next transaction"),(0,r.kt)("p",null,"The main goal of the action block is to generate a new transaction in the smart contract chain.\nTo do so, you can use the ",(0,r.kt)("a",{parentName:"p",href:"/build/smart-contracts/language/library#contract"},"Contract")," module that allows to set the transaction field value."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-elixir"},'# Set uco ATH in content\nactions triggered_by: oracle do\n current_ath = String.to_number(contract.content)\n new_price = Json.path_extract(transaction.content, "$.uco.usd")\n\n if new_price > current_ath do\n Contract.set_content(new_price)\n end\nend\n')),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Note that there are 3 fields that are preset before executing the action code."),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},'type: set to "contract" by default'),(0,r.kt)("li",{parentName:"ul"},"code: set with the previous contract code"),(0,r.kt)("li",{parentName:"ul"},"ownerships: set with the previous contract ownerships")),(0,r.kt)("p",{parentName:"admonition"},"So you don't need to set the type, the code and the ownerships each time you generate a new transaction.")),(0,r.kt)("h2",{id:"appendix-1-the-transaction-map"},"Appendix 1: The transaction map"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"address")," is the transaction's address."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"type")," is the transaction's type."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"content")," is the transaction's content (it's a string that can contain anything, for example a smart contract state)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"code")," is the transaction's code"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"timestamp")," is the transaction's validation timestamp"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uco_movements")," is a map of UCO transfers grouped by ",(0,r.kt)("em",{parentName:"li"},"resolved")," address of the transaction.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'["00001ab...": 1, "00001bc...": 2]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token_movements")," is a map of list of token transfers grouped by ",(0,r.kt)("em",{parentName:"li"},"resolved")," address of the transaction")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'["00001ab...":\n [\n [amount: 1, token_address: "0000ab12..." , token_id: 1],\n [amount: 1, token_address: "0000ab12..." , token_id: 4],\n ]\n]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uco_transfers")," is a map of UCO transfers grouped by address of the transaction.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'["00001ab...": 1, "00001bc...": 2]\n')),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"token_transfers")," is a map of list of token transfers grouped by address of the transaction")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'["00001ab...":\n [\n [amount: 1, token_address: "0000ab12..." , token_id: 1],\n [amount: 1, token_address: "0000ab12..." , token_id: 4],\n ]\n]\n')),(0,r.kt)("admonition",{title:"Difference between transfers and movements",type:"info"},(0,r.kt)("p",{parentName:"admonition"},'The transfers and movements are almost the same thing. The difference is in the addresses.\nThe addresses of the transfers are "raw" whereas the addresses of the movements are "resolved".'),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"raw address"),": address that was specified on a transfer (usually the genesis but not mandatory)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"resolved address"),": address of the latest transaction of the chain (the chain that contains ",(0,r.kt)("inlineCode",{parentName:"li"},"raw address"),")")),(0,r.kt)("p",{parentName:"admonition"},"Here's an example to understand the difference:"),(0,r.kt)("p",{parentName:"admonition"},"This is a UCO transfer to MyAmazingContract. The transfer is usually done on the genesis address (here: ",(0,r.kt)("inlineCode",{parentName:"p"},"0x00abc"),"). But the transfer is actually creating an UTXO on the latest transaction of the chain (here: ",(0,r.kt)("inlineCode",{parentName:"p"},"0x00def"),")."),(0,r.kt)("mermaid",{parentName:"admonition",value:"flowchart LR\n subgraph MyAmazingContract\n Tx1((genesis 0x00abc)) --\x3e Tx2[transaction 0x00bcd]\n Tx2 --\x3e Tx3[transaction 0x00cde]\n Tx3 --\x3e Tx4[transaction 0x00def]\n end\n Transfer-.->|raw|Tx1\n Transfer-.->|resolved|Tx4"}),(0,r.kt)("p",{parentName:"admonition"},"Thus ",(0,r.kt)("inlineCode",{parentName:"p"},"contract.uco_transfers == [0x00abc: 1]")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"contract.uco_movements == [0x00def: 1]"),"."),(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("strong",{parentName:"p"},"In most cases, you'll want to use ",(0,r.kt)("inlineCode",{parentName:"strong"},"movements")," instead of ",(0,r.kt)("inlineCode",{parentName:"strong"},"transfers"),"."))))}m.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/d409b53d.389044f6.js b/assets/js/d409b53d.389044f6.js new file mode 100644 index 000000000..b62c175d0 --- /dev/null +++ b/assets/js/d409b53d.389044f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6907],{3905:(e,t,a)=>{a.d(t,{Zo:()=>h,kt:()=>p});var n=a(67294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function d(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var o=n.createContext({}),r=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):d(d({},t),e)),a},h=function(e){var t=r(e.components);return n.createElement(o.Provider,{value:t},e.children)},c="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},T=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,i=e.originalType,o=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),c=r(a),T=l,p=c["".concat(o,".").concat(T)]||c[T]||k[T]||i;return a?n.createElement(p,d(d({ref:t},h),{},{components:a})):n.createElement(p,d({ref:t},h))}));function p(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=a.length,d=new Array(i);d[0]=T;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[c]="string"==typeof e?e:l,d[1]=s;for(var r=2;r{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>d,default:()=>k,frontMatter:()=>i,metadata:()=>s,toc:()=>r});var n=a(87462),l=(a(67294),a(3905));a(8209);const i={id:"database",title:"Archethic's database"},d=void 0,s={unversionedId:"build/core/database",id:"build/core/database",title:"Archethic's database",description:"Archethic is shipped with a custom database engine built from scratch to support an efficient data storage to support",source:"@site/docs/build/core/database.md",sourceDirName:"build/core",slug:"/build/core/database",permalink:"/build/core/database",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"database",title:"Archethic's database"},sidebar:"docs",previous:{title:"Yubikey implementation",permalink:"/build/core/cryptography/yubikey"},next:{title:"Election",permalink:"/build/core/election"}},o={},r=[{value:"Rationale",id:"rationale",level:2},{value:"Log Structured Merge",id:"log-structured-merge",level:3},{value:"Log Structured Hash Tables",id:"log-structured-hash-tables",level:3},{value:"Our approach",id:"our-approach",level:3},{value:"Design",id:"design",level:2},{value:"Chains storage",id:"chains-storage",level:3},{value:"Chain indexing",id:"chain-indexing",level:3},{value:"File indexes",id:"file-indexes",level:4},{value:"Summary",id:"summary",level:5},{value:"Addresses",id:"addresses",level:5},{value:"Keys",id:"keys",level:5},{value:"Types",id:"types",level:5},{value:"Memory indexes",id:"memory-indexes",level:4},{value:"Transaction index",id:"transaction-index",level:5},{value:"Chain stats",id:"chain-stats",level:5},{value:"Last index",id:"last-index",level:5},{value:"Type index",id:"type-index",level:5},{value:"Chain reader",id:"chain-reader",level:3},{value:"Write path",id:"write-path",level:3},{value:"Read path",id:"read-path",level:3},{value:"Additional of-chain storage",id:"additional-of-chain-storage",level:2}],h={toc:r},c="wrapper";function k(e){let{components:t,...i}=e;return(0,l.kt)(c,(0,n.Z)({},h,i,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Archethic is shipped with a custom database engine built from scratch to support an efficient data storage to support\nconcurrent writes and reads while avoiding much as I/O as possible."),(0,l.kt)("h2",{id:"rationale"},"Rationale"),(0,l.kt)("p",null,"Several solutions have been analyzed and uses from benchmarks, to implementation until the need to implement a solution which will fit the needs and requirements. (ie. LevelDB, RocksDB, Cassandra, ScyllaDB, Aerospike, Redis, etc.)"),(0,l.kt)("p",null,"There are multiple database engines which provides different needs, but we wanted to focus on NoSQL and efficient disk amangement and writes."),(0,l.kt)("p",null,"Our choice ended with log structued family storages (instead of B-tree which are more read efficient, but suffer for random writes)"),(0,l.kt)("h3",{id:"log-structured-merge"},"Log Structured Merge"),(0,l.kt)("p",null,"LSM (Log Structured Merge) comes with the immutable datastructures and append only writes."),(0,l.kt)("p",null,"Append only writes are really efficient in term of disk I/O as a single seek in the file is needed to be placed at the end of the file, and write the new data."),(0,l.kt)("p",null,"There are also shipped with inmemory structure which is flush over time while keeping this append-only log on disk for backup and safety measure. So those dumps are immutable and provided the database view at certain time."),(0,l.kt)("p",null,"But because most of the KeyValue database using LSM, involving updates of keys, they must manage the redundancy of the data and provide cleanup (deleted or updates entries).\nTo support this clean, they are using ",(0,l.kt)("inlineCode",{parentName:"p"},"compaction")," which is a merge operation which take only the last data information from multiple immutable dumps."),(0,l.kt)("h3",{id:"log-structured-hash-tables"},"Log Structured Hash Tables"),(0,l.kt)("p",null,"Log Structured Hash Tables as Bitcask are really interesting as the writing and the reading are efficient because it's using immutable data and key indexing in memory for a predictable and fast reading."),(0,l.kt)("p",null,"Its main requirement is to hold all the key of the value into the memory otherwise"),(0,l.kt)("p",null,"This approach also invovles a ",(0,l.kt)("inlineCode",{parentName:"p"},"compaction")," as data blocks are appended with immutability but needs to be merged after some time to avoid filesystem exhaustion."),(0,l.kt)("h3",{id:"our-approach"},"Our approach"),(0,l.kt)("p",null,"All those database Key-value, Wide column storage, etc.. which are using LSM are considered as global database to support different kind of use cases. However in our case, we have a specific need and requirements: ",(0,l.kt)("strong",{parentName:"p"},"we are only dealing with immutable data at all"),". The data stored in the transaction will never changed, and the mutation and views are managed from an application perspective but not from the disk itself."),(0,l.kt)("p",null,"Then we can reduce a lot of effort and I/O which are heavy in term of computations as compaction/merges, dump of memory structures"),(0,l.kt)("p",null,"In additional to it, we can keep some indexing in memory while providing file backup to avoid memory exhaustion and be able to scale more.\nEvenif we might the indexing on file not efficient, because we are using append only strategy for everything, the indexing is better as the last index bring the last update."),(0,l.kt)("h2",{id:"design"},"Design"),(0,l.kt)("p",null,"So in order to fullfill all those requirements and optimize performances for our needs, we create a new data layer from scratch.\nNevertheless, we took concepts interesting from log structured and wide column storages to support efficient writes/reads with the support of nested column filtering."),(0,l.kt)("h3",{id:"chains-storage"},"Chains storage"),(0,l.kt)("p",null,"The main concept is simple: ",(0,l.kt)("strong",{parentName:"p"},"each chain has its own file"),"."),(0,l.kt)("p",null,"Each chain is uniquely identified by its ",(0,l.kt)("inlineCode",{parentName:"p"},"genesis address"),": which is the address of the first's previous public key, aka the 0th address."),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(77635).Z,width:"513",height:"231"})),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"The append-only strategy is straighforward, each time a new transaction in a chain is persisted, the transaction is added at the end of the file of a chain. So in term of disk access and I/O, it requires a simple seek at the end of the file and dumps of the transaction serialized."),(0,l.kt)("p",{parentName:"admonition"},"This concept led to the streaming capability of the writes to avoid exhaustion of the system (as a backpressure mechanism)")),(0,l.kt)("p",null,"So in order to be able to read specific columns from the transaction, the transaction is serialized in a specific format before to be written to disk.\nThis encoding wraps each key value of the transaction into self-descriptive and schema less write.\nEach key/value pair is encoded in that way:"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Column name size (1 byte)"),(0,l.kt)("th",{parentName:"tr",align:null},"Value size (32 byte)"),(0,l.kt)("th",{parentName:"tr",align:null},"Column name (binary)"),(0,l.kt)("th",{parentName:"tr",align:null},"Value (binary)"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"7"),(0,l.kt)("td",{parentName:"tr",align:null},"33"),(0,l.kt)("td",{parentName:"tr",align:null},"Address"),(0,l.kt)("td",{parentName:"tr",align:null},"00743B809ADDE7E1E3E9B5AFB704813D06155958FBBB78CD052CC45A1B19F976BE")))),(0,l.kt)("p",null,"However, because we are using a schemaless approach letting the code defining the encoding and decoding, each transaction is prepended by its size length (4 bytes) and its version."),(0,l.kt)("p",null,"So by this way, we know the boundaries of the transaction within a file and the way to decode it."),(0,l.kt)("h3",{id:"chain-indexing"},"Chain indexing"),(0,l.kt)("p",null,"Because each chain has its own file, we need also a mechanism to identify a transaction without a chain, or identify a transaction amongs the chains."),(0,l.kt)("p",null,"Different kind of indexing are performed some completly both in memory and disks for backup and long term storage."),(0,l.kt)("h4",{id:"file-indexes"},"File indexes"),(0,l.kt)("h5",{id:"summary"},"Summary"),(0,l.kt)("p",null,"To provide a way to find a transaction without knowing its genesis address, we implemented a summary index (as there are in other solutions) to help the identify the location of the data.\nThen, as the ",(0,l.kt)("a",{parentName:"p",href:"/learn/sharding/beacon-chain"},"BeaconChain")," used this concept, we also applied the address's subset identification here.\nSo each address contains a subset which is the first byte of the digest (exluding the metadata to identify curve and hash algorithm)."),(0,l.kt)("p",null,"So each subset has its own index, with a list of transaction, genesis addresses, the transaction size and its offset (location in the chain's genesis file)"),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(34662).Z,width:"641",height:"31"})),(0,l.kt)("h5",{id:"addresses"},"Addresses"),(0,l.kt)("p",null,"One principle of the transaction chain is to able to target any address of a chain as recipient.\nSo during the transaction validation, nodes are able to resolve recipient last address and then target the right shard of the chain. They are doing this resolution by asking the recipient shard about the last transaction address."),(0,l.kt)("p",null,"But in order to make this possible, previous nodes of a given chain need to keep a track of the last transaction of the chain."),(0,l.kt)("p",null,"Then a specific index file is provided (",(0,l.kt)("inlineCode",{parentName:"p"},'"Genesis-address"-addresses'),") for this purpose which contains a given chain (genesis file), a list of timestamps and addresses for this chain."),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(71624).Z,width:"321",height:"31"})),(0,l.kt)("p",null,"The timestamp is useful during replication and validation to be sure to get the last chain address at the time of the validation, so we can reproduce the validation later without problem."),(0,l.kt)("p",null,"However during the transaction validation we keep the latest one."),(0,l.kt)("h5",{id:"keys"},"Keys"),(0,l.kt)("p",null,"Sometimes we also want to identify the genesis address or first public key of a chain.\nBut we need to track it as well."),(0,l.kt)("p",null,"For instance, in smart contract code, we want to do some actions depending if a transaction's coming from a specific person, but how to identify it, as its transaction chain evolves and we don't keep a track of all the transactions."),(0,l.kt)("p",null,"Then being able to identify the first transaction of a chain is important."),(0,l.kt)("p",null,"So we are adding a new chain index file (",(0,l.kt)("inlineCode",{parentName:"p"},'"Genesis address"-key'),") to support this feature."),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(68825).Z,width:"321",height:"31"})),(0,l.kt)("h5",{id:"types"},"Types"),(0,l.kt)("p",null,"We also want to be able to list of the transactions of a given type, this is useful when the starts and fill memory tables but also to list transactions in UI or API for network transactions."),(0,l.kt)("p",null,"Then a index is given by type for this purpose where the addresses are appended"),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(81613).Z,width:"411",height:"137"})),(0,l.kt)("h4",{id:"memory-indexes"},"Memory indexes"),(0,l.kt)("p",null,"Among the files indexes for backup or long term storage, we are proving some in memory indexes (a bit like Log structured Hash tables) to read data with predictable latency.\nThis make reads fast."),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(58321).Z,width:"482",height:"95"})),(0,l.kt)("h5",{id:"transaction-index"},"Transaction index"),(0,l.kt)("p",null,"This index works a bit like a chache and is identified by a transaction address with the following information:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"genesis address"),(0,l.kt)("li",{parentName:"ul"},"offset"),(0,l.kt)("li",{parentName:"ul"},"size")),(0,l.kt)("p",null,"So once the a transaction is present in this cache, we can easily read transaction give information about the position of the file, and read it really quickly."),(0,l.kt)("p",null,"But if the transaction is not present, we can easily use the index summary as fallback, to identify the file and the offset."),(0,l.kt)("h5",{id:"chain-stats"},"Chain stats"),(0,l.kt)("p",null,"This index is built from the genesis chain files and contains information about the number of transactions within and the last offset.\nSo during the write, the transaction index/summary is notified about the last offset of the chain, and help to move forward in the location of new transaction."),(0,l.kt)("h5",{id:"last-index"},"Last index"),(0,l.kt)("p",null,"As we mentioned in the last addresses chain index file, we need to quickly know what is the last address of a chain, so here we a cache, we says for a given genesis address what is the latest."),(0,l.kt)("p",null,"So this table is filled every time a node receives a last address notification."),(0,l.kt)("h5",{id:"type-index"},"Type index"),(0,l.kt)("p",null,"Because we have type index file, we can also leverages a memory index to know how many transactions for a given type exists.\nThis is useful for key derivation for network transactions.\nSo we can easily and quickly get the size of a chain."),(0,l.kt)("h3",{id:"chain-reader"},"Chain reader"),(0,l.kt)("p",null,"Wide column storages provides the capability to extract sub columns information to avoid the load of an entire row in the memory to let the application filter the data.\nThe filtering can be done on the disk, while make it efficients."),(0,l.kt)("p",null,"The behaviour like is a two dimensional key-value pair, where the 1st dimension targets the partition key and the 2nd targets the columns of the row."),(0,l.kt)("p",null,"So we achieve a similar approach here, by eing the 1st dimension as the chain file and the 2nd as the list of columns names encoded during the transaction write."),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"After being able to get the lookup informations from the chain indexes to identify the file and offset in the file of a given transaction, we ",(0,l.kt)("inlineCode",{parentName:"li"},"seek")," (put the cursor) at the offset position."),(0,l.kt)("li",{parentName:"ol"},"Then we can sequentially read columns and values and pick the ones we want"),(0,l.kt)("li",{parentName:"ol"},"When we reached the end of the transaction (thanks to the size information from the indexes) or the enf of file, we convert those values into a transaction where the values retrieved will be filled in to the structure.")),(0,l.kt)("h3",{id:"write-path"},"Write path"),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(79525).Z,width:"811",height:"481"})),(0,l.kt)("p",null,"So in order to be written, a transaction follows a write path to make reads efficient."),(0,l.kt)("p",null,"After a transaction is written to disk in the genesis chain file, several disks and memory writes are performed to help the indexing of this transaction."),(0,l.kt)("p",null,"Transaction's address is written to:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"the summary index from the subset of the transaction (file)"),(0,l.kt)("li",{parentName:"ul"},"the last addresses index of the chain (in memory and file)"),(0,l.kt)("li",{parentName:"ul"},"the transaction's type index (in memory)"),(0,l.kt)("li",{parentName:"ul"},"the bloom filters (in memory)"),(0,l.kt)("li",{parentName:"ul"},"transaction index (in memory)")),(0,l.kt)("p",null,"Its public key is also written to the chain's public key index. (file)"),(0,l.kt)("p",null,"Then transaction's type in memory index number incremented, as well as the chain stats in memory index."),(0,l.kt)("h3",{id:"read-path"},"Read path"),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(30401).Z,width:"505",height:"441"})),(0,l.kt)("p",null,"To make read efficients, when a transaction wants to be retrieved, it goes to the read path:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Check if the transaction index is present, if yes we have information about the file and position"),(0,l.kt)("li",{parentName:"ul"},"Otherwise we check the bloom filter, if yes, we read the subset summary to identify the position of the transaction, otherwise you inform the transaction does not exists"),(0,l.kt)("li",{parentName:"ul"},"Then a reader is able to perform reads according to the fields requested and the position retrieved.")),(0,l.kt)("h2",{id:"additional-of-chain-storage"},"Additional of-chain storage"),(0,l.kt)("p",null,"For now, we have covered the scope of chain storage and retrieval, however we also need to persist some data which are not really inserted into a chain and are important for well-being of the node execution."),(0,l.kt)("p",null,"So we have to leverage others kind of storages and indexes as simple key-value in memory loaded from disk."),(0,l.kt)("p",null,"The scope of those storages are:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Bootstrapping information (last P2P bootstrapping seeds, storage nonce, last sync date)"),(0,l.kt)("li",{parentName:"ul"},"Network statistics (aggregated TPS and nb of transactions)"),(0,l.kt)("li",{parentName:"ul"},"P2P view (aggregated node availability from the beacon chain)")))}k.isMDXComponent=!0},68825:(e,t,a)=>{a.d(t,{Z:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUEAAAAfCAYAAAB5/X8CAAAPe3RFWHRteGZpbGUAJTNDbXhmaWxlJTIwaG9zdCUzRCUyMkVsZWN0cm9uJTIyJTIwbW9kaWZpZWQlM0QlMjIyMDIyLTA0LTA3VDE1JTNBNDElM0E1OS43ODBaJTIyJTIwYWdlbnQlM0QlMjI1LjAlMjAoTWFjaW50b3NoJTNCJTIwSW50ZWwlMjBNYWMlMjBPUyUyMFglMjAxMl8yXzEpJTIwQXBwbGVXZWJLaXQlMkY1MzcuMzYlMjAoS0hUTUwlMkMlMjBsaWtlJTIwR2Vja28pJTIwZHJhdy5pbyUyRjE0LjQuMiUyMENocm9tZSUyRjg3LjAuNDI4MC4xNDElMjBFbGVjdHJvbiUyRjExLjMuMCUyMFNhZmFyaSUyRjUzNy4zNiUyMiUyMGV0YWclM0QlMjJYZGR3Z1V6WG9rZngyd3l3NXNRaCUyMiUyMHZlcnNpb24lM0QlMjIxNC40LjIlMjIlMjB0eXBlJTNEJTIyZGV2aWNlJTIyJTIwcGFnZXMlM0QlMjI0JTIyJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIyS3ZUeTZfRm4xUEd2SXVrR0dCOG8lMjIlMjBuYW1lJTNEJTIyUGFnZS0xJTIyJTNFNVZuWmNwc3dGUDBhVDUlMkZxQWNsZ2VNelNKVE5kTXBPMFNSOWxKSU5xR1htRUhKdDhmU1VRWmhGSm5NU3VNODZUMFJYYXpybjM2SEk5Z0dmejlSZUJGc2wzamdrYkFBZXZCJTJGQjhBSURyT3I3NjBaYTh0SVRodURURWdtTHpVbTI0b3ZmRUdCMWpYVkpNc3RhTGtuTW02YUp0akhpYWtraTJiRWdJdm1xJTJGTnVXc3Zlb0N4Y1F5WEVXSTJkWWJpbVZTbmNzUDY0NnZoTWFKV1RvQTVueHpWTDFzVHBJbENQTlZ3d1ElMkZEZUNaNEZ5V1QlMkZQMUdXRWF2QXFYY3R6bkIzbzNHeE1rbGRzTVdGNndrNyUyQjM5NU5mRnhlJTJGNVk4JTJGbDluNk92Z1ltTDNKdkRxdzRNc1VFejNHR2NCVExtVENZNTRpOW8zemhUSzZ5dmlYU0prYnF0QlNjbVZLNUp5WlhyVWRrZCUyQmE4VVhqajI0TXZhcDV2bTUybnVmTjFpVVJkRTRrRWNaWWJvOWdpNlQ2MUpWWElCRVQlMkJjaFJ4eHZNbGJNU3JsWVJ1Um9uQ0VPUzNyWG5SOFpyNHMxN202R1huS3FWZ1dNOEhIamUwUFZkRURwUVBRZk9HSll6R0hkM2ZhYzlZOGFYSWlKbWtwb3Q5ZERZVlcwcU9Id0duOGI1N2hCYm1oTlpCQ3MlMkZYT2pIbEV2MWM3cEtxQ1JYQ3hScDIwb0ZjWnZOQ1lwbWNlRVRQNWVTMFpRWU8wWmk5bE9Ob3JMZ2IlMkJob2VxZVVzVFBPdUNoV2d0Z2pBUjRwZXlZRm41RkdUd0FtMFBjMyUyRk40UkljbjZjWVp0NXN3QVdFRnNJQWNqMDE3VjhWcTlralFpTlhRZTVycEZ5M001Q0olMkZtZ0tUNFJJdFRRWVBHVk9HWkpVWFV1VzM4dGYwU1NSVVJhV0VCRHR3QVdna1NzS0dmVHFjZ2l2cWd4JTJGN0U5JTJGeG5oSllOZkFOWXJ3Zll5dmJLeUhLZERxJTJGdWRxRmtUZVElMkZOVkVwSFh1THlXcTVoa09jTUJxUkQ1bSUyQnR4SkVVOHMlMkZWRFRJdGglMkIwZVRSTzB5VGRtQkNqc2ZhVVNKR29WZlJVeHhaVjk5bUo2WmhUak5sRGdkOFclMkYxMEVwOWZHSHZZRTU0Ym9waE9CZlVXbk83TFl1QkVLQ1gyRkNKUm1LSktVSHpFamJqaFdWM0hyam5JT3pvbG5jWEpPczlueGtoQjJGQWtlbkFIZll1QTdtWE16ODN2Z3dBME96UUdBZHA2Z2J1Y3IwelFvdmpvJTJGMyUyRmJlVnhzcEx0akh2TWFrbTAlMkZtM21VSzlJcmslMkIzWE9iV2ZGMTQ5SWZaVWdMd1NQU0phOVBFZnVwc09JQk5QZW5NeVBBaktaN2tqZmc0NWY5MmtMOUd5JTJGaG52VGxzQ0MlMkY4Z3doJTJCT09udmRveWFoSFNycUo2TzRnMyUyQkliNU1nZ0R3OE1lWVh3TnBCSHVZSVBFd0czQUwyVSUyQjIlMkJUcDFqSVNyMTN2ZDNnTzRJZEdRRTJ2bjFmMWQ3ZThMWHo5aXBEY1RTWWE1ckd4NXVzak1DYnkxYmVZYWxwMUxsYkQxNXFBdmJWYXBVV0hJU3hVQUpQc2lNT2owNE5zTGZNMEhjZDdDMDhLdm5jYVdWOVRXVlJXQjk2SVRSdFhWdDNodzZzMm5WeFhUZnlSdVBscGZVdHZ3TjJYMXYzTzdYMXRnU09POXh0V3c4Y2RWT0g3cDIxNTNvZ2ROJTJCZmN2cndqU2tudE5NMVd6bG5KRDlpMGZUZCUyRnllYXFsbiUyRjAxa0dVdjElMkZNZnowRHclM0QlM0QlM0MlMkZkaWFncmFtJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIycks0NDJQRWN6SENtODBLaHBXWl8lMjIlMjBuYW1lJTNEJTIyUGFnZS0yJTIyJTNFNVZkTmI2TXdFUDAxSEN1QlRSeHkzSkp1VjZ1MnFwUkR0MGNYRDhHcVlTTEhLV1IlMkYlMkZacGdBcFJXVmFWMGhWSTRZTCUyRjVNUFBteVpZOUd1ZlZ0ZWFiN0JZRktJJTJGNG92TG8waU1rQ0h4bVB6V3liNURGWXQ0QWF5MkZjJTJCcUFsZndMRHZRZHVwTUN0Z05IZzZpTTNBekJCSXNDRWpQQXVOWllEdDFTVk1OVk4zd05JMkNWY0RWR0g2UXdXVnNYVzNTR1h5RFhtVnM2SXE2JTJCbkxmT3JwSnR4Z1dXUFloZWVUVFdpS1laNVZVTXFpYXY1ZVVtZTBhMXFuN2ZjWHdReFRKJTJCTkglMkZ1TDVwa1B6OFRjaXhCUTJGT201bzBxViUyQjQyam0lMkJ2TkQlMkZvV1FDYmRGbTN6S3BjVmNJcUxQNUhyMHNNMmxndGVGSmJTMnRkaXlXbVZ6WldXQ0hxVlFxUm9YNkVFc0ZoeWhOTEw0MUdwJTJCaFoyRkpCRSUyQnB0YmclMkZBVzJnZXRXNkQlMkJvT2pzMndLZ2JNd2VpOWpXdXpNRmVLRXpEeDNienM1QkE1S09zSmdUcU1Pd0d1ajVrN2t1M0E4ZndKenVtN25BY241VHhOVTVLOHlibGdUMnpHdnBCekVrNk04M0RFZWVDZlZ1SHBySDdmVlBqaHFTT3dNRDI4ZWI2d0M1Uk1yQXV6VVJmT3ZnZWhQN0Vlc1BQZjhjTm9ZcHpQMyUyQldjbk11T1A1dmFLUnVOT0NmbnYlMkJPenFaMjdpJTJCOTQ3czclMkYzN2xycDkwRjVHRHJYZVBvMVQ4JTNEJTNDJTJGZGlhZ3JhbSUzRSUzQ2RpYWdyYW0lMjBpZCUzRCUyMnZETHdETjlxQkZkTHVKRlhfNzB2JTIyJTIwbmFtZSUzRCUyMlBhZ2UtMyUyMiUzRTNaVmJUOEl3R0laJTJGelM1TmVzQzVYU0o0VEV3MFN5UmUxdllycTNZcmxvNkJ2OTRDSFdPQ01ScFA4V3J0JTJCeDI2NyUyQm1iTktLRFluNW0yU1MlMkZNZ0owUkpDWVIzUVlFWUl4aXYxbnFTeldTcG9lcllXeFZTSWt0VUttbmlHSUtLaVZFakR0SkRwanRGT1Ryc2hOV1FKM0hZMVphJTJCcHVtalM2ZSUyQnFFaldGSHlEalR1JTJCcElDWmMzYzhWcEd6Z0hOYzdEMFFrSjh4V3NTUTZUVEhNbVRMMGwwWk9JRHF3eGJyMHE1Z1BRUzNnTkZ6NFRmWFZIMDRkS1A1ME5ieDl2YmxKNnNHNTIlMkJwR1N6UWdXU3ZmcDFyMVptYkclMkJ1cjAlMkJ5QzR2Sk1aeVZEVWxhTVowRlhoRlBkVFhpa000ZE9vV0RVbHJxbExBc2h1SzZIR2RLd2ZaaFBGbHRQYmU4VnJ1Q3UxMzJDJTJCbDBucGd0TEdyV2lvWUpKSjdmZXFzZVlTdFNNd1R1SmMlMkJFdjRFcklQNXE2dDdaMjY4dVF6dllqQUZPTHZ3ZFUyWE9Bd1pERXhRMk5ldEhaSWc1VnRHb0VGandZRGpUZWNXc2w4RXpoOWdqbmVZWTRRUjZxWGtTNUZMS1FuZmkxekU5JTJGRmglMkZJM0lrejlHbkx6cDhxOUYlMkZvc3VwJTJCU1BNYWY3WFg2WTB2JTJGaWN0TDdNZVIlMkIyNzR6cTlqV2EwMVBYZ0ElM0QlM0MlMkZkaWFncmFtJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIyVExmNkd1azZJZjQ2bExsQ2dRbW8lMjIlMjBuYW1lJTNEJTIyUGFnZS00JTIyJTNFM1pWQlQ0TXdGTWMlMkZEVWNUYUFmQ2NVNTBCNDJISFRUZU92cUF4a0pKS1lQdDAxdEdHZUNXbUNWVEYwJTJCMCUyRiUyRmY2SHUlMkZYZjFJTEw3TG1VWklpZlJZVXVJVnMybGo0M2tMSWNXeFBmMXBsMnlsQmNOc0ppV1RVSkEzQ2l1M0FpTFpSSzBhaG5DUXFJYmhpeFZTTVJKNURwQ1lha1ZMVTA3Ulk4R25YZ2lSd0pLd2l3byUyRlZWMFpWMnMlMkZsQlVOZ0NTeEpUV3NmbWZreTBpZWJTY3FVVUZHUEpCeGFlQ0dGVU4wcWF4YkFXM2c5bCUyRnBwOTE2R2ViVlpydWN2YndLRjBwM2ZkTVVlempseUdFRkNyaTViR25XbE40UlhodGVjc3doTXgxSnRlNHhTVkRtRnRwUnQ0YnM2WlFwV0JZbmFhSzJObzdWVVpWenZITDJNR2VjTHdZWGNuOFdVZ0I5SFdpJTJCVkZCOHdpbmlSRCUyQnRZUjh4dmdGVFFmTG0zYjRaMkRqZWhMUXdpQXlXMyUyQmx4ZnhUT1haOXlMYkxPdkJ5JTJGNFJrcEhMc0JHSThaOXlhSHlRRmd2RE9RemdPTWo0STd0MlBZc1FCZEZIc2N4aWs0aXA5N2FjNzBmUk81ZkdmSFphWXRmbHZjZldoeWpLd1B1bnJhNEclMkJEJTJGWW5FMCUyQnpYa2VqdThNUHZZNkozRzRTYyUzRCUzQyUyRmRpYWdyYW0lM0UlM0MlMkZteGZpbGUlM0VhM/nOAAAMbUlEQVR4Xu2ceTzVWR/HPy2mZaJNPcXTQuuYpFE9TwvTtExUypQGLWYmTetUk9LqSTRCiSihbG1C0UbElD0mRRKRJSVpkbVmEsm8zjH3PjQ07j1dY3TOf67zPb/z+/jc9znn+z0vrW4H6VaDNyYFnNJXMMV/yMErhzp/yK//Xt6d+49NxlYEgp+obWQb5QOOTovZjbaqJz5gBVhevRqvExeA+098Dbn/xNeORO47EQ0OQTYNwU3IIiCHIIt6JJb7j01BDkE2/Wg0NyGLiByCLOpx/7Gqx3eC7ApyCDJqyCHIKCBfhBkF5DtBRgH5SswqIIcgq4L8JMKmIIcgm378OMysH4cgq4QcgmwKcgiy6cchyKwfhyCrhByCbApyCLLpxyHIrB+HIKuEHIJsCnIIsunHIcisH4cgq4QcgmwKcgiy6cchyKwfhyCrhByCbAq+FwjuP+iLjh3aY/E32sLZ3Mm8D9fDZ5B19wEmqI3E6mV6aNu2jfD3TwuK8N1yM/gd242OHdvTz4tLyuDi7o+4+FtQGqoA4zUGkO3ehf7ur8YjfU6duQS/c5fhe9iKxty99xC79h7B/dxHGPMfZTqH7t06098l3kyHk+sp5D18Cu0ZEzD3q8noIdtVLDWbyoSFz55i7DA5TJqqBZejZ4VzdXGwQnZmOnbYOENFQQY/x6Wjn8JAsd6FBJHnbPrREPvdTqJDh45ij9O4QHYI/p3+e/26CsvXWtZ51dkzJ2KGhto7/Rca9guOeAXiVUUFNKeMg+6cLyEj/XHjJHurV0vyX3CAH0IC/FH1pgpas/UxYfI0tG/fQSxdGhvEBEECkpBLcdhqfgCbjL6FtflqIcyGj9XHJ0MUsGyRDiz3eEBt7Ag47DbGb7+V43RAGI56X8DPYVdRkheBzjKdUF1dDZ2FG3HzVgbMTZYhODQWKWnZSIz2QtnzF2hoPMGL5tzPh6LyLAwe2Bd3Ek/Tj4eozsGI4UMwV3syjvkEoai4FJHBriAAlhusCWLWeXM14Hn8PJ4VliA+4mhjdavTr6lM6HXYGXsstuLXF8/xS+ojdOveg87D2d4SWRlpsHE8goT4KximMlIseL18+RtCL5zB2VPHcCXyEhIyCiEtU7NoSK6JD8Hm4D+y0I4YNw97dq4VSjRKVQmqKkMb9F9ySiZU1RdgzXJ9+r0wszoEvTlfwnTzErFkbin+i7gUhKULZ8FwuRGUlD+Dw24zzPhKD+u2/CSWLo0NYoKg46GTiI69gYjoBCxaOFMIQQKcreaOeJAWROdxPigK2vrr8OvjGJSUPofRFju666sNQWKmAcO1cS81AP369EZhUSlk+09GdIgbCOAaGo/sIslq/MX0pZDr3YNClEDwxs071GilDyPpCiuAZNbNsyAmNDaxR3byOTo/8rPKuHnITDqDgYp9GqudsF9TmXD21NH4esFi7LfZgbWbzKFnUPOlEUDQyt4N3+lqwM75OHr1/jcuBvpjr9U2lJWWYLq2LjaaWqNdu/ZIvnEN1uYbkJOVAfWJU7F1hy26dO2Op4/zYWm6HqWlxf8ICDYH/8XFJ8Pc2hVRF13r+OZd/iPfh/Co6zjva0djrGw94eMfipux3iJ7jwS0FP8R71VWVmC71X6qg5enExxtLRCXki+WLo0NYoKg4CG6326GYn95IQTJypaZlQsvdwvaJeV2NpTH6NWBzK3ULLq7E+wEL0fEY/Z8Y5TlRwnnLiP3OfbZbMC93EfvHM9itzvS7uRAR3sStpg5UggSOH+uuQTlBbFo1+4jeiwfNGI2gvz3QWXYIBQVl2GY0gD6LPej52C02RaF98MgJdW2sdo1KQSzM9MwTV2Z7gDdneyQcO0KfM7XaCWAoIXtQXocDo1NQ0VFBbS+UMG2nfbopzgIO/9nhJVGJhg/YQrGKcvDYPEqaM7UgaujDV68KMOJsxHC98lIS4HWxBHNfifYHPxHYLZjlytduFu3bo0V38+FzqxJuHo9pUH/aUweg+pqoOBZMZJTM2GwxBTLDOdgh8lykb3XVBBsCv+R00wnaWm6gJO2YdW3qHj1Cg6uPmLp0tggiUDwm6Wm6Ny5E/bb1PxnGrLr69Z3EpKunICK8mD62dsQJEdSa7vDwqMs6TNSfSEMDWZRQzU03svyV9DWX4/b104hMiZBCMGqqjf0yGugP53m+xycveHjFwpvT0vo60ylcyB9nN39sNp4N/Zar8PalfMbq1udfk2xEpOjQVpKEs0FJiVche6M8Qi/lgX5Pv3rhaC/92EKSgHcYqMuI/9hLl48L4OH815EJuagVatWyMm+A43xnyI2OQ+yPXvR9/qnQ7Ap/eftFwLP4wGwtVyLh/kF2GnjTkFouX3VX/rvkOdpLPuxJp9Y25eimrCl+Y941Gq7MU6d8IBPQDRUR48VVRKR+ksEgiuMrOhx9uQRazqZ/EcFkB8yDcUPwtGls3S9ECTHgaWrLersBElOz85qHQIvRtc7XlFuGEZ9boAZmmqYrTURUbGJcHL1g4+nJc21kOTzmg02NEE9/2tNBARHISL4EM3XEDDP1DVCZvYDuB/YBi1NdZGEq91Z0iasqqqCmkoflJe/pHnAyooKPH6Uh02mu7B45fp6IWhvbYpusj1haulQ5712bP0Rxz0O/OldAyNuYvDQT1sEBJvKf8TPH0lJUc0ExT2SHycniyfZobgQEtOg/wR/AJIj37nHg+bNSbpIMI4oZmxJ/rt9KwmL501HLzl52Dodg+LAoaJIIVZfiUCQ/EH9z4UhIfo4nVRMXBItehBjCNrbO0HSR13jexCwde0iQwsoH/dSA8nh+fqH1jtefsZFeqQWNFLcIEUPpaGKuOBnjwd5T6A+7jNadHn8pJCuzCRHSNqUmSug0F8eh/aZ0MIMS5O0Ca/GRsJgzmR4+ASjbdua43rAaW/cuP4LgqKS64Vg4Blf3L6VCKfDNUWiW0nX8Tg/D6m3biA6PATHz4TRz19XViIzPRXKn42ClNRHLQKCTeU/4uczAeE0rTJoQF+q3UGP03ByO4XI4EP0tFOf/8wsD0JerifWr15IY1LT7mLYf3WRk3Ie/fvKiWzFluK/e3ez6Annh3UmWLTMCG3a/P82iciiiBAgEQgKCg0hZx2hNEQRhj+Yo0f3rsIcIf1SvpUTrKx8je79JsFo1QJ6NYYY5bhvMAjoUtOyaeHiXeNRMARH0YIHyQkKjuAkBzhhvCotxjzMf4rAU/bwOhmMFWutaKW49srbv29vmj8UtUnahCbrlqKsrIReWRE0ArPZX45GYHgSLoecp9Xh2jlBcqQw0JkC9xMXoDhoCBbpadI8YM9/ycFQfxq8zoZDecQouB2wpQnomKRctPkDsP/043BT+o/47efwq4gPP0Jz1/MNTWj6ZfliHZoCqs9/pHBI/E1y5mTB3vaTM+ITUhF32VNU69H+LcV/2zevwt2sdOy0PSjUoXXrNkzXvRoj6HuBoN53W2hhxMpslfCZJL9HihSkkWsrMaHude7hCYolguot6UeSzJO0apLD0p06UgORYy1pfzXe2xAkP/+0yw02DjXXXnr3kkVYoAtdgddstMF+F98/6UOqc8OHDWqMbnX6SNKE5NoKKXbsc/OFppaO8LlkdztBVQFfLzCElJTUn+4J9umniK1GS3Da9wiNIXcLSYKZVIetzTbAw2Uv/by7bE/sdfHCGLWJwrEz0lNpUSUxswidpGVE1kO0APGvyAie83f6j9wznbPAGNcSb9PpjFZVwjkfO+q3hvxHFmiNr1YJY8aPUYHFtpX4Qn2kaNL90bul+E9jvBJysjPqaPBxJ2ncyCoWS5fGBr0XCDb0sNKyF7QCJsq1k4qKSprDIzG1L1eTZ4gzXnl5BfLyn4g0h8aKJ+gnSROKOpe3+5cUF4KspjKday6dC1pRYQGeFTxFP4UBFIx/X2OHYHPwH8l7k0ITgV/t1pD/3rx5g9y8xzSnSK52sTTuPxb1+D9VZVOvCVbi9zLBZj2I5CDYrF/7PU6uOUPwPb6mxIaS6E5QYrNuZgNzE7L8QTgEWdQjsdx/bApyCLLpR6O5CVlE5BBkUY/7j1U9fhxmV5BDkFFDDkFGAfkizCgg3wkyCshXYlYBOQRZFeQnETYFOQTZ9OPHYWb9OARZJeQQZFOQQ5BNPw5BZv04BFkl5BBkU5BDkE0/DkFm/TgEWSXkEGRTkEOQTT8OQWb9OARZJeQQZFNQCEG2YXi0U/oKLoKYCqwc6ixmJA8TKMD9x+aF3wGLGd3vdPqULgAAAABJRU5ErkJggg=="},71624:(e,t,a)=>{a.d(t,{Z:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUEAAAAfCAYAAAB5/X8CAAAM+nRFWHRteGZpbGUAJTNDbXhmaWxlJTIwaG9zdCUzRCUyMkVsZWN0cm9uJTIyJTIwbW9kaWZpZWQlM0QlMjIyMDIyLTA0LTA3VDE1JTNBMzUlM0E0Ny4zMDlaJTIyJTIwYWdlbnQlM0QlMjI1LjAlMjAoTWFjaW50b3NoJTNCJTIwSW50ZWwlMjBNYWMlMjBPUyUyMFglMjAxMl8yXzEpJTIwQXBwbGVXZWJLaXQlMkY1MzcuMzYlMjAoS0hUTUwlMkMlMjBsaWtlJTIwR2Vja28pJTIwZHJhdy5pbyUyRjE0LjQuMiUyMENocm9tZSUyRjg3LjAuNDI4MC4xNDElMjBFbGVjdHJvbiUyRjExLjMuMCUyMFNhZmFyaSUyRjUzNy4zNiUyMiUyMGV0YWclM0QlMjJsZV9hWU5weHdJRG03ajQ0ZTFyLSUyMiUyMHZlcnNpb24lM0QlMjIxNC40LjIlMjIlMjB0eXBlJTNEJTIyZGV2aWNlJTIyJTIwcGFnZXMlM0QlMjIzJTIyJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIyS3ZUeTZfRm4xUEd2SXVrR0dCOG8lMjIlMjBuYW1lJTNEJTIyUGFnZS0xJTIyJTNFNVZuWmNwc3dGUDBhVDUlMkZxQWNsZ2VNelNKVE5kTXBPMFNSOWxKSU5xR1htRUhKdDhmU1VRWmhGSm5NU3VNODZUMFJYYXpybjM2SEk5Z0dmejlSZUJGc2wzamdrYkFBZXZCJTJGQjhBSURyT3I3NjBaYTh0SVRodURURWdtTHpVbTI0b3ZmRUdCMWpYVkpNc3RhTGtuTW02YUp0akhpYWtraTJiRWdJdm1xJTJGTnVXc3Zlb0N4Y1F5WEVXSTJkWWJpbVZTbmNzUDY0NnZoTWFKV1RvQTVueHpWTDFzVHBJbENQTlZ3d1ElMkZEZUNaNEZ5V1QlMkZQMUdXRWF2QXFYY3R6bkIzbzNHeE1rbGRzTVdGNndrNyUyQjM5NU5mRnhlJTJGNVk4JTJGbDluNk92Z1ltTDNKdkRxdzRNc1VFejNHR2NCVExtVENZNTRpOW8zemhUSzZ5dmlYU0prYnF0QlNjbVZLNUp5WlhyVWRrZCUyQmE4VVhqajI0TXZhcDV2bTUybnVmTjFpVVJkRTRrRWNaWWJvOWdpNlQ2MUpWWElCRVQlMkJjaFJ4eHZNbGJNU3JsWVJ1Um9uQ0VPUzNyWG5SOFpyNHMxN202R1huS3FWZ1dNOEhIamUwUFZkRURwUVBRZk9HSll6R0hkM2ZhYzlZOGFYSWlKbWtwb3Q5ZERZVlcwcU9Id0duOGI1N2hCYm1oTlpCQ3MlMkZYT2pIbEV2MWM3cEtxQ1JYQ3hScDIwb0ZjWnZOQ1lwbWNlRVRQNWVTMFpRWU8wWmk5bE9Ob3JMZ2IlMkJob2VxZVVzVFBPdUNoV2d0Z2pBUjRwZXlZRm41RkdUd0FtMFBjMyUyRk40UkljbjZjWVp0NXN3QVdFRnNJQWNqMDE3VjhWcTlralFpTlhRZTVycEZ5M001Q0olMkZtZ0tUNFJJdFRRWVBHVk9HWkpVWFV1VzM4dGYwU1NSVVJhV0VCRHR3QVdna1NzS0dmVHFjZ2l2cWd4JTJGN0U5JTJGeG5oSllOZkFOWXJ3Zll5dmJLeUhLZERxJTJGdWRxRmtUZVElMkZOVkVwSFh1THlXcTVoa09jTUJxUkQ1bSUyQnR4SkVVOHMlMkZWRFRJdGglMkIwZVRSTzB5VGRtQkNqc2ZhVVNKR29WZlJVeHhaVjk5bUo2WmhUak5sRGdkOFclMkYxMEVwOWZHSHZZRTU0Ym9waE9CZlVXbk83TFl1QkVLQ1gyRkNKUm1LSktVSHpFamJqaFdWM0hyam5JT3pvbG5jWEpPczlueGtoQjJGQWtlbkFIZll1QTdtWE16ODN2Z3dBME96UUdBZHA2Z2J1Y3IwelFvdmpvJTJGMyUyRmJlVnhzcEx0akh2TWFrbTAlMkZtM21VSzlJcmslMkIzWE9iV2ZGMTQ5SWZaVWdMd1NQU0phOVBFZnVwc09JQk5QZW5NeVBBaktaN2tqZmc0NWY5MmtMOUd5JTJGaG52VGxzQ0MlMkY4Z3doJTJCT09udmRveWFoSFNycUo2TzRnMyUyQkliNU1nZ0R3OE1lWVh3TnBCSHVZSVBFd0czQUwyVSUyQjIlMkJUcDFqSVNyMTN2ZDNnTzRJZEdRRTJ2bjFmMWQ3ZThMWHo5aXBEY1RTWWE1ckd4NXVzak1DYnkxYmVZYWxwMUxsYkQxNXFBdmJWYXBVV0hJU3hVQUpQc2lNT2owNE5zTGZNMEhjZDdDMDhLdm5jYVdWOVRXVlJXQjk2SVRSdFhWdDNodzZzMm5WeFhUZnlSdVBscGZVdHZ3TjJYMXYzTzdYMXRnU09POXh0V3c4Y2RWT0g3cDIxNTNvZ2ROJTJCZmN2cndqU2tudE5NMVd6bG5KRDlpMGZUZCUyRnllYXFsbiUyRjAxa0dVdjElMkZNZnowRHclM0QlM0QlM0MlMkZkaWFncmFtJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIycks0NDJQRWN6SENtODBLaHBXWl8lMjIlMjBuYW1lJTNEJTIyUGFnZS0yJTIyJTNFNVZkTmI2TXdFUDAxSEN1QlRSeHkzSkp1VjZ1MnFwUkR0MGNYRDhHcVlTTEhLV1IlMkYlMkZacGdBcFJXVmFWMGhWSTRZTCUyRjVNUFBteVpZOUd1ZlZ0ZWFiN0JZRktJJTJGNG92TG8waU1rQ0h4bVB6V3liNURGWXQ0QWF5MkZjJTJCcUFsZndMRHZRZHVwTUN0Z05IZzZpTTNBekJCSXNDRWpQQXVOWllEdDFTVk1OVk4zd05JMkNWY0RWR0g2UXdXVnNYVzNTR1h5RFhtVnM2SXE2JTJCbkxmT3JwSnR4Z1dXUFloZWVUVFdpS1laNVZVTXFpYXY1ZVVtZTBhMXFuN2ZjWHdReFRKJTJCTkglMkZ1TDVwa1B6OFRjaXhCUTJGT201bzBxViUyQjQyam0lMkJ2TkQlMkZvV1FDYmRGbTN6S3BjVmNJcUxQNUhyMHNNMmxndGVGSmJTMnRkaXlXbVZ6WldXQ0hxVlFxUm9YNkVFc0ZoeWhOTEw0MUdwJTJCaFoyRkpCRSUyQnB0YmclMkZBVzJnZXRXNkQlMkJvT2pzMndLZ2JNd2VpOWpXdXpNRmVLRXpEeDNienM1QkE1S09zSmdUcU1Pd0d1ajVrN2t1M0E4ZndKenVtN25BY241VHhOVTVLOHlibGdUMnpHdnBCekVrNk04M0RFZWVDZlZ1SHBySDdmVlBqaHFTT3dNRDI4ZWI2d0M1Uk1yQXV6VVJmT3ZnZWhQN0Vlc1BQZjhjTm9ZcHpQMyUyQldjbk11T1A1dmFLUnVOT0NmbnYlMkJPenFaMjdpJTJCOTQ3czclMkYzN2xycDkwRjVHRHJYZVBvMVQ4JTNEJTNDJTJGZGlhZ3JhbSUzRSUzQ2RpYWdyYW0lMjBpZCUzRCUyMnZETHdETjlxQkZkTHVKRlhfNzB2JTIyJTIwbmFtZSUzRCUyMlBhZ2UtMyUyMiUzRTNaVmJUOEl3R0laJTJGelM1TmVzQzVYU0o0VEV3MFN5UmUxdllycTNZcmxvNkJ2OTRDSFdPQ01ScFA4V3J0JTJCeDI2NyUyQm1iTktLRFluNW0yU1MlMkZNZ0owUkpDWVIzUVlFWUl4aXYxbnFTeldTcG9lcllXeFZTSWt0VUttbmlHSUtLaVZFakR0SkRwanRGT1Ryc2hOV1FKM0hZMVphJTJCcHVtalM2ZSUyQnFFaldGSHlEalR1JTJCcElDWmMzYzhWcEd6Z0hOYzdEMFFrSjh4V3NTUTZUVEhNbVRMMGwwWk9JRHF3eGJyMHE1Z1BRUzNnTkZ6NFRmWFZIMDRkS1A1ME5ieDl2YmxKNnNHNTIlMkJwR1N6UWdXU3ZmcDFyMVptYkclMkJ1cjAlMkJ5QzR2Sk1aeVZEVWxhTVowRlhoRlBkVFhpa000ZE9vV0RVbHJxbExBc2h1SzZIR2RLd2ZaaFBGbHRQYmU4VnJ1Q3UxMzJDJTJCbDBucGd0TEdyV2lvWUpKSjdmZXFzZVlTdFNNd1R1SmMlMkJFdjRFcklQNXE2dDdaMjY4dVF6dllqQUZPTHZ3ZFUyWE9Bd1pERXhRMk5ldEhaSWc1VnRHb0VGandZRGpUZWNXc2w4RXpoOWdqbmVZWTRRUjZxWGtTNUZMS1FuZmkxekU5JTJGRmglMkZJM0lrejlHbkx6cDhxOUYlMkZvc3VwJTJCU1BNYWY3WFg2WTB2JTJGaWN0TDdNZVIlMkIyNzR6cTlqV2EwMVBYZ0ElM0QlM0MlMkZkaWFncmFtJTNFJTNDJTJGbXhmaWxlJTNFuJ3r+wAADZVJREFUeF7tnHk81Vkfxz8V00oLbTwttCiTlKl5WmifUimVQotpYkp7aS+TaEFJWoQS2oRopcRkCaNdEpElLWiRNdNC6nmdY+59KJq591yNcs5/fvd3zu/8Pvdz3+d7vt9Tde6e1/8A3pgUcEqax9S/Nnee3825Nr++RN6d+49NxjoEgt01V7GNUot7J0Ztg5TGsVqsAMurf8C7mOng/hNfQ+4/8bUjPXcfiwSHIJuG4CZkEZBDkEU90pf7j01BDkE2/WhvbkIWETkEWdTj/mNVj0eC7ApyCDJqyCHIKCBfhBkF5JEgo4B8JWYVkEOQVUG+E2FTkEOQTT++HWbWj0OQVUIOQTYFOQTZ9OMQZNaPQ5BVQg5BNgU5BNn04xBk1o9DkFVCDkE2BTkE2fTjEGTWj0OQVUIOQTYFOQTZ9KtWCJa+e4fMjIf0GQqK7SElLS2B2da0ITgEWb+R6oJg7fCfhI7I7Nnng0YNG8DkZ13h93kv5SFcD55C6v3HGKz5AxaZGkBKqp7w8+fZufhlriX8jmxDo0YN6PW8/EK4uJ3A5Wt3oNpNCSsWG0Ferhn97O/GI/f4nroIvzMh8DloQ/vcf5CJrQ6H8PDRE/T7UY3OQa5FU/pZzO0kOLn6IiPzOXTHDsbkCcPRUr65WH6UtAmzMh9hy/plyMp4iA4dO6Poz5eICLmAqTNNsWSVJVrItawwz5wXz9G/hwKGjdSBy+HTws9cdtkgLSUJdo6HYDh+EPSnm2CSwUyx3pF0Is9ZvcQYew4cR8OGjcQep2JHdgj+m/57964Uc5daV3ilieOGYuwozc/6Lzj0Cg55BuBtcTG0RwyA/qSfICvTWCxNa4P/Av39EOR/AqXvS6Ez0RCDh49GgwYNxdLr405MkSABSdDFy1hntRerzWbC1mqREGY9+xuiu4oSTGfpwXq7OzT798KubSvw6tUbnPQPxWGvc/g99CryM8LRVLYJPnz4AL0Zq3D7TjKszE0RGByN+MQ0xER6ovBlEaoaT/BC6Q+zoKw2Hl07t8e9mJP0sorGJPTqqYLJusNxxPs8cvMKcCnQFQTACl21Qcw6dfIoeBw9ixc5+bgWflgsUSVpwtTkRCyYpYcNNnvQt78WkhLi0EGpM169KqIg9PPygOfpMEhLfyecq+dBZ2zfvA5/Fr3ElYQnQkg677QGGc/e6Qju3olFy1at0bJ1W5Hf8fXrVwg+dwqnfY/gj0sXcTM5BzKyZYsJexMfgjXBf2Sh7TVgKrZvWSqUoo+GKjTUu1Xpv7j4FGhoTcfiuYb0d2Fpsx8Gk36CxZrZYsn5rfsv/OJ5zJkxHsZzzaCq1hu7tlli7AQDLFu7SSy9JApBx/3HERl9C+GRNzFrxjghBAlw1lk54nHiefq8s+cjoGu4DH8+jUJ+wUuYrd1Bo77yECRm6tRTFw8S/NGhXVvk5BZAvuNwRAYdAAFcVeORKJKsxkPGzIFC25YUogSCt27fo0YryLxEV1gBJFNvnwYx4QrznUiLO0PnR/5WHzAVKbGn0Fm5ncjCStKE+mMHwmzNJmj8OABGk4ZDqZMK8nJfUBge9L0AB1sLzDI1g0bf/sJ5ThzZF1Omm2CP3UYsXW0FA6OyH1N5CFqtXURXzyEjxuBCwAk42KxHYUE+xujqY5WFLerXb4C4W9dha7US6anJ0Bo6Eus22qNZczk8f5oFa4vlKCjIq1EQrAn+u3wtDla2roi44FrBN5/zH/k9hEXcwFmfHbSPjb0HvE8E43a0l8jeIx2+df8R75WUFNPAgDRPDyc42m/G5fgssfSSKAQFg+nPXAPljopCCJKVLSX1ETzdNtNb4u+mQa2fQQXI3ElIpdGdIBIMCb+GidNWoDArQjhHWYVB2G23Eg8ePfnseJu3uSHxXjr0dIdhraUjhSCB8yDt2XiTHY369b+j2/IuvSbi/IndUO/RBbl5heih2ok+y+3wGZitsUfOw1BIS0uJLKykTEggM25Ib0TceoDQ4AB4uDjgyMkQGoVt/s2MXieGIIDU1tGj80xLScRoLTUaAbo57cDN63/A+2yZhuUhSLbDU6YZQ61XX+gMUcf6LTvRQbkLtvxmhvlm5hg4eAQGqCnCyGQhtMfpwdXRDkVFhTh2OlyoR3JiPHSG9qoxkWBN8B+B2catrnThrlu3Lub9Ohl644fh6o34Kv03ang/fPgAZL/IQ1xCCoxmW8DUeBI2ms8V2XuShGBN9R/ZzTSRkUGbtv+h+qxcOBPFb99il6u3WHp9EQj+PMcCTZs2wR67sv+ZhkR9LdoPQ+wfx6Cu1pVe+xiCZEtqu+OgcCtL7vlBawaMjcZTQ1U13us3b6FruBx3r/viUtRNIQRLS9/TLa+R4Ria79vl7AVvv2B4eVjDUG8knQO5x9nND4tWbIOD7TIsnT9NLFElBcGEO7ewzWoVDvn9Tr/onr37UiiR8J9EbQRc44Zp4LBfMJq3kKdzJZ8lxsfSXGDszasgkWTY9VQotutYKQQfpKVQUArgFh0RApKDLHpZCHdnB1yKSUedOnWQnnYPowZ+j+i4DMi3akOf9bVA8Ev6z8svCB5H/WFvvRSZWdnYYudGQWi9YeHf+m+/x0mYLinLJ5b3pagmrC3+Ix612bACvsfc4e0fWWE3JKpm5e9nyglWtRLPM7Oh29njh2zpLVlPsqGoMhp5j8PQrKlMpRAk24E5izZXiARJTm+HzTIEXIisdLzcR6HoM8gIY7U1MVFnKCKiY+Dk6gdvD2uaayHJ58Ur7WiCetoUbfgHRiA8cD/N1xAwj9M3Q0raY7jtXQ8dbS2xdZSUCbOfPYHh+MEIuZqMjeuWoFGjxjAyWQBtrR6Yb7YOUlLSiAoPhptXWZqhtLQUmurt8ObNa5oHLCkuxtMnGVhtsRUm85dXCsHI0CC0kG8FC+tdFd6XPO+o+95PNAgIv42u3b7/qiD4pfxH/PzdXxV7QXGP5MfJzuJZWjDOBUVV6T+B0CRHvmW7O82bk3SRYBxRzFgb/Edy2iZTx6CNgiLNcSt37iaKRJ+9t1ogSL7QE2dCcTPyKH141OVYWvQgxhC0jyNBco/WqF9BwNa8mSwtoDRuowmSw/M5EVzpeFnJF+iWWtBIcYMUPVS7KeOc3048zngGrQG9adHl6bMcujKTHCFpI8bNg1JHRezfbU4LMyxNUiYkcyCRnpWtI5rLycFy9UI6LQI0Ui0mBZJNds5o3VaRXr8afYnmDd29AyElVbaN9z/phVs3ruB8RFylEHySmYG7d2LgdLCseHQn9gaeZmWARKGRYUE4eiqUXn9XUoKUpASo9e4jLMJ8LZHgl/If8fMp/zCaVunSqT3VbZ/7STgd8MWlwP10t1OZ/yyt90FRoRWWL5pB+yQk3keP/+ojPf4sOrZXENmK37r/HtxPpTucBcvMaT68Xr3/nzIRWaxKOlQLBAWFhqDTjlBVUYbxAiu0lGsuzBHSH99HOcGSkneQ6zAMZgun06MxxChHfQJBQJeQmEYLF58bjwIgMIIWPEhOULAFJznAwQM1aDEmM+s5Anx3wvN4IOYttaGV4vIrb8f2bWn+UNQmSRNevxKJNUtM6LGW8sUPcmbLx/MAjfgE+UDzZXNQWJhPj6wIGoHZxJ/6IiAsFiFBZ4XVYUFOUKW7Goz0RsDt2Dkod1HBLANtuuVu1VoBxoajaeVZrVcfHNhrTxPQUbGPUO8vwH4tEPyS/iN++z3sKq6FHaK562nG5jT9MtdEj6aAKvMfKRwSf5OcOVmw129yxrWbCbgc4iGq9ej937r/NqxZiPupSdhiv0+oT9269WhQIIkmEQga/LKWFkZsLMsiF9JIfo8UKUgjx1aigt0qnMMTFEsE1VtyH0kyD9MpSw7LNGlEDUS2tf9kvI8hSP7etPUA7HaVHXtp20YeoQEudAVevMoOe1x8PtGPVOd69ugisq6SNCF5OKkErzUzoRFY1+5qKMjPRVpyEq3Ymi5eTUFIjq2oK8li9wEfIRRJXxL1DtZQwpTpxpCWlv7knOCEKUZYZzYbJ30O0fckZwtJgplUh20tV8LdxYFel5NvBQcXT/TTHCrUIzkpgRZVYlJy0URGVmSdKu8g/hEZwXj/pv/IOdNJ01fgesxdOp2+Gqo4472D+q0q/5EFetSEhcI+A/upY/P6+Rii9YNYmn7r/hs1UBXpackVtGncRAa3UvPE0uvjThKBYFUzKSgsohUwUY6dFBeX0Bwe6VP+cDV5hjjjvXlTjIysZyLNQVRlJW1CwfPJub/HD9PRQk4erdqIvk363Hvk5+WArKayTcsOowtabk42XmQ/RwelThSM1d/YIVgT/Efy3qSgROBXvlXlv/fv3+NRxlOaUyRHu1ga9x+LehL6FyNsU/j6e1eXCb9+Zf7JG1QfBP/J07+Fe7j/2L7Fao0E2ab29fTmJmT5rjgEWdQjfbn/2BTkEGTTj/bmJmQRkUOQRT3uP1b1+HaYXUEOQUYNOQQZBeSLMKOAPBJkFJCvxKwCcgiyKsh3ImwKcgiy6ce3w8z6cQiySsghyKYghyCbfhyCzPpxCLJKyCHIpiCHIJt+HILM+nEIskrIIcimIIcgm34cgsz6cQiySsghyKagEIJsw/DeTknzuAhiKjC/m7OYPXk3gQLcf2xe+B/AQvf+6fgbTAAAAABJRU5ErkJggg=="},58321:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/memory_index-8b745de23265c24b29a6b68889747e0f.png"},30401:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/read_path-9a620d8ec68c3034fe7524efe7409647.png"},34662:(e,t,a)=>{a.d(t,{Z:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoEAAAAfCAYAAACYoBeiAAAKW3RFWHRteGZpbGUAJTNDbXhmaWxlJTIwaG9zdCUzRCUyMkVsZWN0cm9uJTIyJTIwbW9kaWZpZWQlM0QlMjIyMDIyLTA0LTA3VDE1JTNBMjklM0ExMC4xNjlaJTIyJTIwYWdlbnQlM0QlMjI1LjAlMjAoTWFjaW50b3NoJTNCJTIwSW50ZWwlMjBNYWMlMjBPUyUyMFglMjAxMl8yXzEpJTIwQXBwbGVXZWJLaXQlMkY1MzcuMzYlMjAoS0hUTUwlMkMlMjBsaWtlJTIwR2Vja28pJTIwZHJhdy5pbyUyRjE0LjQuMiUyMENocm9tZSUyRjg3LjAuNDI4MC4xNDElMjBFbGVjdHJvbiUyRjExLjMuMCUyMFNhZmFyaSUyRjUzNy4zNiUyMiUyMGV0YWclM0QlMjJFMzJvY2hNWnNQcTB0U09JbEtHQiUyMiUyMHZlcnNpb24lM0QlMjIxNC40LjIlMjIlMjB0eXBlJTNEJTIyZGV2aWNlJTIyJTIwcGFnZXMlM0QlMjIyJTIyJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIyS3ZUeTZfRm4xUEd2SXVrR0dCOG8lMjIlMjBuYW1lJTNEJTIyUGFnZS0xJTIyJTNFNVZuWmNwc3dGUDBhVDUlMkZxQWNsZ2VNelNKVE5kTXBPMFNSOWxKSU5xR1htRUhKdDhmU1VRWmhGSm5NU3VNODZUMFJYYXpybjM2SEk5Z0dmejlSZUJGc2wzamdrYkFBZXZCJTJGQjhBSURyT3I3NjBaYTh0SVRodURURWdtTHpVbTI0b3ZmRUdCMWpYVkpNc3RhTGtuTW02YUp0akhpYWtraTJiRWdJdm1xJTJGTnVXc3Zlb0N4Y1F5WEVXSTJkWWJpbVZTbmNzUDY0NnZoTWFKV1RvQTVueHpWTDFzVHBJbENQTlZ3d1ElMkZEZUNaNEZ5V1QlMkZQMUdXRWF2QXFYY3R6bkIzbzNHeE1rbGRzTVdGNndrNyUyQjM5NU5mRnhlJTJGNVk4JTJGbDluNk92Z1ltTDNKdkRxdzRNc1VFejNHR2NCVExtVENZNTRpOW8zemhUSzZ5dmlYU0prYnF0QlNjbVZLNUp5WlhyVWRrZCUyQmE4VVhqajI0TXZhcDV2bTUybnVmTjFpVVJkRTRrRWNaWWJvOWdpNlQ2MUpWWElCRVQlMkJjaFJ4eHZNbGJNU3JsWVJ1Um9uQ0VPUzNyWG5SOFpyNHMxN202R1huS3FWZ1dNOEhIamUwUFZkRURwUVBRZk9HSll6R0hkM2ZhYzlZOGFYSWlKbWtwb3Q5ZERZVlcwcU9Id0duOGI1N2hCYm1oTlpCQ3MlMkZYT2pIbEV2MWM3cEtxQ1JYQ3hScDIwb0ZjWnZOQ1lwbWNlRVRQNWVTMFpRWU8wWmk5bE9Ob3JMZ2IlMkJob2VxZVVzVFBPdUNoV2d0Z2pBUjRwZXlZRm41RkdUd0FtMFBjMyUyRk40UkljbjZjWVp0NXN3QVdFRnNJQWNqMDE3VjhWcTlralFpTlhRZTVycEZ5M001Q0olMkZtZ0tUNFJJdFRRWVBHVk9HWkpVWFV1VzM4dGYwU1NSVVJhV0VCRHR3QVdna1NzS0dmVHFjZ2l2cWd4JTJGN0U5JTJGeG5oSllOZkFOWXJ3Zll5dmJLeUhLZERxJTJGdWRxRmtUZVElMkZOVkVwSFh1THlXcTVoa09jTUJxUkQ1bSUyQnR4SkVVOHMlMkZWRFRJdGglMkIwZVRSTzB5VGRtQkNqc2ZhVVNKR29WZlJVeHhaVjk5bUo2WmhUak5sRGdkOFclMkYxMEVwOWZHSHZZRTU0Ym9waE9CZlVXbk83TFl1QkVLQ1gyRkNKUm1LSktVSHpFamJqaFdWM0hyam5JT3pvbG5jWEpPczlueGtoQjJGQWtlbkFIZll1QTdtWE16ODN2Z3dBME96UUdBZHA2Z2J1Y3IwelFvdmpvJTJGMyUyRmJlVnhzcEx0akh2TWFrbTAlMkZtM21VSzlJcmslMkIzWE9iV2ZGMTQ5SWZaVWdMd1NQU0phOVBFZnVwc09JQk5QZW5NeVBBaktaN2tqZmc0NWY5MmtMOUd5JTJGaG52VGxzQ0MlMkY4Z3doJTJCT09udmRveWFoSFNycUo2TzRnMyUyQkliNU1nZ0R3OE1lWVh3TnBCSHVZSVBFd0czQUwyVSUyQjIlMkJUcDFqSVNyMTN2ZDNnTzRJZEdRRTJ2bjFmMWQ3ZThMWHo5aXBEY1RTWWE1ckd4NXVzak1DYnkxYmVZYWxwMUxsYkQxNXFBdmJWYXBVV0hJU3hVQUpQc2lNT2owNE5zTGZNMEhjZDdDMDhLdm5jYVdWOVRXVlJXQjk2SVRSdFhWdDNodzZzMm5WeFhUZnlSdVBscGZVdHZ3TjJYMXYzTzdYMXRnU09POXh0V3c4Y2RWT0g3cDIxNTNvZ2ROJTJCZmN2cndqU2tudE5NMVd6bG5KRDlpMGZUZCUyRnllYXFsbiUyRjAxa0dVdjElMkZNZnowRHclM0QlM0QlM0MlMkZkaWFncmFtJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIycks0NDJQRWN6SENtODBLaHBXWl8lMjIlMjBuYW1lJTNEJTIyUGFnZS0yJTIyJTNFNVZkTmI2TXdFUDAxSEN1QlRSeHkzSkp1VjZ1MnFwUkR0MGNYRDhHcVlTTEhLV1IlMkYlMkZacGdBcFJXVmFWMGhWSTRZTCUyRjVNUFBteVpZOUd1ZlZ0ZWFiN0JZRktJJTJGNG92TG8waU1rQ0h4bVB6V3liNURGWXQ0QWF5MkZjJTJCcUFsZndMRHZRZHVwTUN0Z05IZzZpTTNBekJCSXNDRWpQQXVOWllEdDFTVk1OVk4zd05JMkNWY0RWR0g2UXdXVnNYVzNTR1h5RFhtVnM2SXE2JTJCbkxmT3JwSnR4Z1dXUFloZWVUVFdpS1laNVZVTXFpYXY1ZVVtZTBhMXFuN2ZjWHdReFRKJTJCTkglMkZ1TDVwa1B6OFRjaXhCUTJGT201bzBxViUyQjQyam0lMkJ2TkQlMkZvV1FDYmRGbTN6S3BjVmNJcUxQNUhyMHNNMmxndGVGSmJTMnRkaXlXbVZ6WldXQ0hxVlFxUm9YNkVFc0ZoeWhOTEw0MUdwJTJCaFoyRkpCRSUyQnB0YmclMkZBVzJnZXRXNkQlMkJvT2pzMndLZ2JNd2VpOWpXdXpNRmVLRXpEeDNienM1QkE1S09zSmdUcU1Pd0d1ajVrN2t1M0E4ZndKenVtN25BY241VHhOVTVLOHlibGdUMnpHdnBCekVrNk04M0RFZWVDZlZ1SHBySDdmVlBqaHFTT3dNRDI4ZWI2d0M1Uk1yQXV6VVJmT3ZnZWhQN0Vlc1BQZjhjTm9ZcHpQMyUyQldjbk11T1A1dmFLUnVOT0NmbnYlMkJPenFaMjdpJTJCOTQ3czclMkYzN2xycDkwRjVHRHJYZVBvMVQ4JTNEJTNDJTJGZGlhZ3JhbSUzRSUzQyUyRm14ZmlsZSUzRYZV1hcAABGnSURBVHhe7Z15XE/Z/8dflphh7CSMbTAyxjJG32/INs0kk31LjDGpoVFJpcVS9kGpJJJSljTZZS2FTNbB2BJpmSyRJaSy/JTxfZzTfD409HvknsvnVu/zePTP53PPufc8z73vz/OerXI23rEvQUkygYm6KyTnpYzAkoiahIEIaIxAJV0zjZ27NJyY4p9YK1L8E+NHuYUJvCzHJHDSqO7CJZXVAvLPjEIbA+eyWn3hek+YEghvb2/hcspqAQ4ODsRPoPFdA0+B4p90gBT/pLN7+RKwcqL4J5Xgy5cv4ejoSPFPKkAA7PeDJFAAIMtKQVAMIJNAHx8fsULKcG57e3viJ9D+LitPkgQK8KP4Jx2eSgIp/klj+Pfff3MJJH7S+LFc7PeDJFA6P56TgqAYQJJAMX4kgWL8SALF+FH8k86PJFA6O5aTJFCMH0mgOD+SQBkYkgSKQSQJFONHEijGjyRQOj+SQOnsSALF2KlyU0+gDBwpCIpBJAkU40cSKMaPJFCMH8U/6fxIAqWzIwkUY0cSKA8/6gmUgSNJoBhEkkAxfiSBYvxIAqXzIwmUzo4kUIwdSaA8/EgCZeBIEigGkSRQjB9JoBg/kkDp/EgCpbMjCRRjRxIoDz+SQBk4kgSKQSQJFONHEijGjyRQOj+SQOnsSALF2JEEysOPJFAGjiSBYhBJAsX4kQSK8SMJlM6PJFA6O5JAMXYfRAJf5OfjZvo1fq6GjZqgopaWPFetsFLeVxDMz3+BazcyeG2bfKoDLa2KCqu5PJdDEijGkSRQjN/7kkCKf2LtUhbiH0mg2D1CW8SI8WO538vq4Fs3r2O+mwNupV9D02Ytkfs4B3EHomA2dgLsnGehdp16ha78fuZddPmyIb4x6oeAdRHq7wJ8FyA1ORGey9Zi5IAeGDHaAkNMx0qq9bG4A9i59Tfk5T2Hcb+h+O77QZLKeVsmuSXwevptTHbxwrXrGWjZojFych4jMuYYrCyGYs50K9SrW6vQZdy99wD1Wxihf98e2Lnx1X/e+HVxCC5fuYrQoDkwMLKA5dhB+Gl0f8n1Zuf5yWoWtoR6oEqVjySX8++MmpZAtuu8h4cHBgwYgDZt2qgv7/Tp04iJiUFeXh569eqFHj168O9ycnKwY8cOJCQkoFmzZhg5ciRq1KghG493LUipElgUv3et3/s+Xm4JpPgn1mJKjH+bt+/Hlh0H8OLFC5gNM8b3Rt3w8ceVxSoKQNMSmJSUhO3bt+PevXswMDDgca5mzYJ/41kS4p8SJLA0/H7Iull0StJlWJsPxcwFftDr0h2JCRfQtHlLPHmSy0VwS/hqhEXEQkurkvoBCluzAovnTcPj3BycSMhQS+KKJb+CleflH4pL8edQT7s+6tVv8M4PXvy50xhqrI8fxlmj49f/xUwXayz0DUYfkyHvXNb7lsBLiX9h8KgpWO7lih7dvsL5i8lo1aIxcnOfIjLmKEJCd+L3yEBUqvSqV9U/aDNcZ/ohJ/cJ7v4Vo5bE+Z4hYOWFBc/D2fNXoFO/Dhro1H3nOj958gzbdh3EuvA9iDn4B7LSD6FG9U/euZyiMmhSAo8fP45jx45xqWMiqK+vzy8zMTER48ePx5AhQ9C2bVt4eXlh6tSpXATd3NyQkpKCcePG4cSJE0hLS0NwcDDKly8vG5N3KUiJElgUv549e75L1T7IsXJKIMU/sSZTYvzbs+8I+g2fDAeb0ejUURfu8wIwclgfzHefKFZZDUvg/fv3MXjwYB7TDA0NERkZiaysLAQGBpaY+KdpCSwtvx+ySuAIk26wd52LTv/pijFDDNG8RWs8fJDJZXDN5ij4LHSH+QR7dNLron6ABhvpYfhoC/h5zsFkl9kwHfMz/+51CZw91RY9Dfui17ffI2r3VvgscEP2oyx8P3AEnN0XonLlj3Dh7CksnO2EtJQkdO9thGlzvFCzVh1Ms/8Z5StUwLzFAbzchbOccPniOazdEiP8ELMC5OwJ7GJojnluv6Cbfkf0NpmA1q2aIvN+Fs5fTELMDn/MmOsPB5sf0PW/7dXX/nX3H3gv36wFgZg7wwrjzQvk9nUJtHZcxN9eTfoYYEvEAUyfsxxZj3JhOvQ7eMyxw0cfVcLJPxMwZfoSXEm+hj6G+vBZ6Ig6tWvgVsY92E/1xsOs7FIngZ6ensjNzUVsbGwhCVy0aBGXOicnJ85y+fLlSE5OhrOzM+/527RpE3R0dJCdnY1+/fph2bJlaN/+VZvIcmMVsxAlSmBR/JYsWVLMWn24w+SUQIp/Yu2mxPhn7+qN53l5WO7lUhALAjdhzqJVuJMaLVZZDUtgXFwc/P39sWHDBl6P1NRUmJubIzw8HOvXry8R8U/TElhafj9kk8BHjx6if6+vEHf2Kg5G78bqAB+EbjuA6D3bMW+GPf/8V3dHLohsSJbfeMmX0bd7O94DGOzvjT9PHcWGnXFvSCAbDh4+ahzaddRDv14d4DZ/CZp+1grzZ9hjov10dOv5Lbq2a4QxFjYw7j8UQcvYj3s2fos4xIeSh5qO5aLJUvjalVjqORvHL94SfojllEAmWe27jMSNy3uxKzIO3svCELtnJbbtPAg7l8X8cxaQuul3wLBBhvzaL19Jwxd6w3kP4OKloTh64jyORAe/IYFsONjix4HQ69QW7fRNsdTTifcw2jkvhpuLJb7rrQ+dlkawtTLFsIGG8FiyDtk5jxEXFaRmFJ+Qwq+vNPUEqipnbGyMWbNmqXsCra2t0bdvXy54LLGewpCQELi7u2P69OmIiopSc2F57ezs+PGaSEqUwKL4MY5KS3JJIMU/sZZVavxjvZPVq32CTxtp8wqO+dkd//f8OTatXShWYQ1LYGZmJp/a0rx5c16PPXv2wM/PD7t371bHM6XHP01LYGn5/ZBNAhPiz8JjtjPvYXOyGYv2X+lxKfP1mMV77Zi49f+mE9ZtiUat2gXDkuw71ivH5gKe+/MPsDfp2FMpaNS4WaGeQJUEXk1N5qLI5I4lNtePzcHJzclGyAof/H4mDeXKlUNa6hX06dYWxy6k83O6L1iKvv2H8TyH9u/F+B8GIOl2vvBDLKcEnjmfCKcZvjiwawUPNP/p3Ba2E0zhPj8AWY9ysNTDCR26mvHv69YpmLfBvjt3IYnPBTxxKh7sTTrt4k40a9KwUE+gSgKTUq5zUVTJ3f7Yk2BzcLJzcuHltx7XL+3h/FhvoO7XQ5GRvI8PI7NUliRw4MCBmDx5Mnr37s3rzrr9XVxc4OrqirCwMP6nSpaWljAxMeFDK5pISpTAovix3gelJbkkkOKfWMsqPf6xl2KHqd4IXrcDR2NCCo3GSK25pucEsutmIhUREQHWS29ra4vhw4ejpMQ/pUpgSeHH2l/WhSH37mRg5ICeOPBHEuZMs0OVKlUxxsIaxt2/xET7aahYUQtHDkUjOHwvf2bYJFuDDo3x7NlTPg8w7/lz3M5Ih4v7IlhMdHyrBB4+uA+162rD/VffQs8dO9/6kOVvPIu7D53HL2MHw2KiA0aNteLfR+7agkC/RdgefUrqs1son1zDwRm3M/kCjtQLO2Dr5IGqVT7mEtim8zDMcLbkq4P37T+OqO1+//D7Gw0/N8bTp8/4PEA2ZJF+8y4859lhyqQxb5XAqP3HoV2vFvw8nQvVgZ1v2cpNb/CIP7ERX37RosxJIBvyZX+DBhUsIGLDxUz8zMzMwIYAXu8JHD16NGxsbNCly6spDrLcWMUsRIkSWBS/VatWFbNWH+4wuSSQ4p9Ymyk5/rE51cZDbPFpQ20+x1r382Zilf0nt6YlkPUEshfb9PR0/pLbtWtXfmUlJf4pVQJLCj/ZJZAVyHrdZi9chlp16mCWiw2/oZjQsdXCbIHIXM8VqN+gEf/8j2O/83mDIRsiUbFiwfYnu7aF4+zpE9gbd+GtEphxMx2X4s/Af822AjE5dxq3b6WDvYUfjt2H9dsP8s/z8/KQnJiAdl91hqWZCb7s0BlObgv4d2zV8dW/UvjiEDmSXBLIroX19Pl7u/KevokOBcMNTOgmuyxGqxZNsNJ3Gho1LBiWOHT4Tz5vcF/EMlSsUIF/9tvmKBw/GY+Ek5veKoE30u+AvXFHhHvx40+duYT0mwWfMcE8tDeQf56Xn4+Ll1Kh1+kL9SKUstQTyHoBdXV1YWVV8OIQGhrKAyXr8WPCx4ZOqlWrhmfPnsHIyIjPo2nUqOC+/tBJiRJYFD+2uEZpSS4JZPWi+CfWukqMf8mpN9DF8Cc+bYbNx65QQb4FYJqUwMePH/NeoAYNGvC5zlWrVlU3XkmJf0qVwJLCjzW4rD2BXCpOHIarnQXf1uX1xR9sz6yNYat4j59qPuB0h/HIzs6C36pXPVBM5gZ/p4fdsedwYN9O9epg1XBw6zbtMGbotwj+bQ8+a9Ua5qbGfMhZu35DjBvZl688btexM1Yt90LYan8cOXcdG0IDsXj+dEQejsftWzcxydIUtlPc1HMExcKWvAtD4o6egfkvsxEaNLfQcAPbMytozXbe46eaD2hpM5cPE7MtW1SJyRxbKHLh+Abs3BunXh2sGg5u17YlvjGxQuQ2P/42azTQms8DbNigHvoMsuErj9m8QU/fdVgetBk3rzBBLxDMsiSBbNuElStXcvm7e/cunwvIJk2z+X9snsyIESP42/Lq1asRHR3Nt1mg1cGvnqSi+KnmGIk+c3Lml1MCKf6JtYwS4x97GU9MuoogvxnqyjERbPlZY7HKanhOINv+iu16wOYBVq78arsbJoVsXmBJiH9KlcCS9vsh25xA1RPBVgJPtbfg28B83qYdHmU9QGpSIl+xO2GSCxfBp0+foEPz6li6aqNaCll+tudOz07NMXz0OGhpab2xT+Cg4WP4at9tG9fy07G9BX2DNvDVwWzVb0iAD/+8Tl1t+ASEQd+gN+8VnPSzKfZH7eTfsbmB3gFhqPBP75nokyxnTyC7lvPxSRg3cQ7vgWPS9uDhI77fH1uxO9XRnIsg27alqo4BNq9bpJZCFb8mX5jA4sdBqKRV8Y19An80M4GF9VysCdvFq832FmQTnNnqYMdpPnwxCkva9WojPGQ+vumpp8bDegbZopJHN39H9Wqv3hpF+WlyixjVtf97YUh+fj4XvyNHjvBD2NzAmTNnctE7e/YsnzjNUpUqVfiqYk2tDGbXoMSewP+Pn+j9Ind+OSWQXRvFP7EWUlr8a91pCNhc6tdTtU+qIPuW+PxWTfYE+vr6YuvWrW80Fnuxbdq0aYmIf0qVwJL2+yG7BKruKrbv341raahdpy60dRqKRYZ/5c56eB/ly1dA9RoFCyRU6cH9e8i8dxdNm7fgYvh6upNxk4tfXW0dWa9FbglUXRzb9++vtHQufaynTs50/8EjPqxRs0a1QsXey3yIO3cf8LdcJoYfIilBAouqJ9tEld0ztWvXLnQI20A6IyODDwHL9TIhlbUSJVBVl6L4Sa3r+8gntwRS/JOnlcpC/NOkBBanlZQe/5QigSX99+O9SWBxbrLScMz7ksDSwKY4dVCyBBbn+jV9jJIlUNNsinP+9yWBxTl3aTiG4p/0VlS6BEqv2YfJqXQJ/DAUxM4i+5xAscspmbkpCIq1G0mgGD+SQDF+JIFi/Cj+SedHEiidHctJEijGj+UmCRRnKOt/DJHhckpcESSBYk1GEijGjyRQjB9JoHR+JIHS2ZEEirFT5SYJlIEjBUExiCSBYvxIAsX4kQSK8aP4J50fSaB0diSBYuxIAuXhx0uhICgGkyRQjB9JoBg/kkAxfhT/pPMjCZTOjiRQjB1JoDz8SAJl4EgSKAaRJFCMH0mgGD+SQOn8SAKlsyMJFGNHEigPP5JAGTiSBIpBJAkU40cSKMaPJFA6P5JA6exIAsXYkQTKw48kUAaOJIFiEEkCxfiRBIrxIwmUzo8kUDo7kkAxdiSB8vAjCZSBI0mgGESSQDF+JIFi/EgCpfMjCZTOjiRQjN0bEihPcWWzlIm6K8pmxWWq9ZKIwv/1RaZiqRgiUCwClXTNinUcHfR2AhT/xO4Min9i/Ci3OIH/AQbituCsIrsLAAAAAElFTkSuQmCC"},81613:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/type_index-7d73c323ed94d760c7913a71bb3752be.png"},79525:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/write_path-4491f189ec9042b252c1b632b86d4336.png"},77635:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/write_transaction-6f6c3844fe612478890f193c06d1af99.png"},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/d409b53d.c644976a.js b/assets/js/d409b53d.c644976a.js deleted file mode 100644 index 9ddc92eb2..000000000 --- a/assets/js/d409b53d.c644976a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6907],{3905:(e,t,a)=>{a.d(t,{Zo:()=>h,kt:()=>p});var n=a(67294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function d(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var o=n.createContext({}),r=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):d(d({},t),e)),a},h=function(e){var t=r(e.components);return n.createElement(o.Provider,{value:t},e.children)},c="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},T=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,i=e.originalType,o=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),c=r(a),T=l,p=c["".concat(o,".").concat(T)]||c[T]||k[T]||i;return a?n.createElement(p,d(d({ref:t},h),{},{components:a})):n.createElement(p,d({ref:t},h))}));function p(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=a.length,d=new Array(i);d[0]=T;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[c]="string"==typeof e?e:l,d[1]=s;for(var r=2;r{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>d,default:()=>k,frontMatter:()=>i,metadata:()=>s,toc:()=>r});var n=a(87462),l=(a(67294),a(3905));a(8209);const i={id:"database",title:"Archethic's database"},d=void 0,s={unversionedId:"build/core/database",id:"build/core/database",title:"Archethic's database",description:"Archethic is shipped with a custom database engine built from scratch to support an efficient data storage to support",source:"@site/docs/build/core/database.md",sourceDirName:"build/core",slug:"/build/core/database",permalink:"/build/core/database",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"database",title:"Archethic's database"},sidebar:"docs",previous:{title:"Yubikey implementation",permalink:"/build/core/cryptography/yubikey"},next:{title:"Election",permalink:"/build/core/election"}},o={},r=[{value:"Rationale",id:"rationale",level:2},{value:"Log Structured Merge",id:"log-structured-merge",level:3},{value:"Log Structured Hash Tables",id:"log-structured-hash-tables",level:3},{value:"Our approach",id:"our-approach",level:3},{value:"Design",id:"design",level:2},{value:"Chains storage",id:"chains-storage",level:3},{value:"Chain indexing",id:"chain-indexing",level:3},{value:"File indexes",id:"file-indexes",level:4},{value:"Summary",id:"summary",level:5},{value:"Addresses",id:"addresses",level:5},{value:"Keys",id:"keys",level:5},{value:"Types",id:"types",level:5},{value:"Memory indexes",id:"memory-indexes",level:4},{value:"Transaction index",id:"transaction-index",level:5},{value:"Chain stats",id:"chain-stats",level:5},{value:"Last index",id:"last-index",level:5},{value:"Type index",id:"type-index",level:5},{value:"Chain reader",id:"chain-reader",level:3},{value:"Write path",id:"write-path",level:3},{value:"Read path",id:"read-path",level:3},{value:"Additional of-chain storage",id:"additional-of-chain-storage",level:2}],h={toc:r},c="wrapper";function k(e){let{components:t,...i}=e;return(0,l.kt)(c,(0,n.Z)({},h,i,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Archethic is shipped with a custom database engine built from scratch to support an efficient data storage to support\nconcurrent writes and reads while avoiding much as I/O as possible."),(0,l.kt)("h2",{id:"rationale"},"Rationale"),(0,l.kt)("p",null,"Several solutions have been analyzed and uses from benchmarks, to implementation until the need to implement a solution which will fit the needs and requirements. (ie. LevelDB, RocksDB, Cassandra, ScyllaDB, Aerospike, Redis, etc.)"),(0,l.kt)("p",null,"There are multiple database engines which provides different needs, but we wanted to focus on NoSQL and efficient disk amangement and writes."),(0,l.kt)("p",null,"Our choice ended with log structued family storages (instead of B-tree which are more read efficient, but suffer for random writes)"),(0,l.kt)("h3",{id:"log-structured-merge"},"Log Structured Merge"),(0,l.kt)("p",null,"LSM (Log Structured Merge) comes with the immutable datastructures and append only writes."),(0,l.kt)("p",null,"Append only writes are really efficient in term of disk I/O as a single seek in the file is needed to be placed at the end of the file, and write the new data."),(0,l.kt)("p",null,"There are also shipped with inmemory structure which is flush over time while keeping this append-only log on disk for backup and safety measure. So those dumps are immutable and provided the database view at certain time."),(0,l.kt)("p",null,"But because most of the KeyValue database using LSM, involving updates of keys, they must manage the redundancy of the data and provide cleanup (deleted or updates entries).\nTo support this clean, they are using ",(0,l.kt)("inlineCode",{parentName:"p"},"compaction")," which is a merge operation which take only the last data information from multiple immutable dumps."),(0,l.kt)("h3",{id:"log-structured-hash-tables"},"Log Structured Hash Tables"),(0,l.kt)("p",null,"Log Structured Hash Tables as Bitcask are really interesting as the writing and the reading are efficient because it's using immutable data and key indexing in memory for a predictable and fast reading."),(0,l.kt)("p",null,"Its main requirement is to hold all the key of the value into the memory otherwise"),(0,l.kt)("p",null,"This approach also invovles a ",(0,l.kt)("inlineCode",{parentName:"p"},"compaction")," as data blocks are appended with immutability but needs to be merged after some time to avoid filesystem exhaustion."),(0,l.kt)("h3",{id:"our-approach"},"Our approach"),(0,l.kt)("p",null,"All those database Key-value, Wide column storage, etc.. which are using LSM are considered as global database to support different kind of use cases. However in our case, we have a specific need and requirements: ",(0,l.kt)("strong",{parentName:"p"},"we are only dealing with immutable data at all"),". The data stored in the transaction will never changed, and the mutation and views are managed from an application perspective but not from the disk itself."),(0,l.kt)("p",null,"Then we can reduce a lot of effort and I/O which are heavy in term of computations as compaction/merges, dump of memory structures"),(0,l.kt)("p",null,"In additional to it, we can keep some indexing in memory while providing file backup to avoid memory exhaustion and be able to scale more.\nEvenif we might the indexing on file not efficient, because we are using append only strategy for everything, the indexing is better as the last index bring the last update."),(0,l.kt)("h2",{id:"design"},"Design"),(0,l.kt)("p",null,"So in order to fullfill all those requirements and optimize performances for our needs, we create a new data layer from scratch.\nNevertheless, we took concepts interesting from log structured and wide column storages to support efficient writes/reads with the support of nested column filtering."),(0,l.kt)("h3",{id:"chains-storage"},"Chains storage"),(0,l.kt)("p",null,"The main concept is simple: ",(0,l.kt)("strong",{parentName:"p"},"each chain has its own file"),"."),(0,l.kt)("p",null,"Each chain is uniquely identified by its ",(0,l.kt)("inlineCode",{parentName:"p"},"genesis address"),": which is the address of the first's previous public key, aka the 0th address."),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(77635).Z,width:"513",height:"231"})),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"The append-only strategy is straighforward, each time a new transaction in a chain is persisted, the transaction is added at the end of the file of a chain. So in term of disk access and I/O, it requires a simple seek at the end of the file and dumps of the transaction serialized."),(0,l.kt)("p",{parentName:"admonition"},"This concept led to the streaming capability of the writes to avoid exhaustion of the system (as a backpressure mechanism)")),(0,l.kt)("p",null,"So in order to be able to read specific columns from the transaction, the transaction is serialized in a specific format before to be written to disk.\nThis encoding wraps each key value of the transaction into self-descriptive and schema less write.\nEach key/value pair is encoded in that way:"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Column name size (1 byte)"),(0,l.kt)("th",{parentName:"tr",align:null},"Value size (32 byte)"),(0,l.kt)("th",{parentName:"tr",align:null},"Column name (binary)"),(0,l.kt)("th",{parentName:"tr",align:null},"Value (binary)"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"7"),(0,l.kt)("td",{parentName:"tr",align:null},"33"),(0,l.kt)("td",{parentName:"tr",align:null},"Address"),(0,l.kt)("td",{parentName:"tr",align:null},"00743B809ADDE7E1E3E9B5AFB704813D06155958FBBB78CD052CC45A1B19F976BE")))),(0,l.kt)("p",null,"However, because we are using a schemaless approach letting the code defining the encoding and decoding, each transaction is prepended by its size length (4 bytes) and its version."),(0,l.kt)("p",null,"So by this way, we know the boundaries of the transaction within a file and the way to decode it."),(0,l.kt)("h3",{id:"chain-indexing"},"Chain indexing"),(0,l.kt)("p",null,"Because each chain has its own file, we need also a mechanism to identify a transaction without a chain, or identify a transaction amongs the chains."),(0,l.kt)("p",null,"Different kind of indexing are performed some completly both in memory and disks for backup and long term storage."),(0,l.kt)("h4",{id:"file-indexes"},"File indexes"),(0,l.kt)("h5",{id:"summary"},"Summary"),(0,l.kt)("p",null,"To provide a way to find a transaction without knowing its genesis address, we implemented a summary index (as there are in other solutions) to help the identify the location of the data.\nThen, as the ",(0,l.kt)("a",{parentName:"p",href:"/learn/sharding/beacon-chain"},"BeaconChain")," used this concept, we also applied the address's subset identification here.\nSo each address contains a subset which is the first byte of the digest (exluding the metadata to identify curve and hash algorithm)."),(0,l.kt)("p",null,"So each subset has its own index, with a list of transaction, genesis addresses, the transaction size and its offset (location in the chain's genesis file)"),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(34662).Z,width:"641",height:"31"})),(0,l.kt)("h5",{id:"addresses"},"Addresses"),(0,l.kt)("p",null,"One principle of the transaction chain is to able to target any address of a chain as recipient.\nSo during the transaction validation, nodes are able to resolve recipient last address and then target the right shard of the chain. They are doing this resolution by asking the recipient shard about the last transaction address."),(0,l.kt)("p",null,"But in order to make this possible, previous nodes of a given chain need to keep a track of the last transaction of the chain."),(0,l.kt)("p",null,"Then a specific index file is provided (",(0,l.kt)("inlineCode",{parentName:"p"},'"Genesis-address"-addresses'),") for this purpose which contains a given chain (genesis file), a list of timestamps and addresses for this chain."),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(71624).Z,width:"321",height:"31"})),(0,l.kt)("p",null,"The timestamp is useful during replication and validation to be sure to get the last chain address at the time of the validation, so we can reproduce the validation later without problem."),(0,l.kt)("p",null,"However during the transaction validation we keep the latest one."),(0,l.kt)("h5",{id:"keys"},"Keys"),(0,l.kt)("p",null,"Sometimes we also want to identify the genesis address or first public key of a chain.\nBut we need to track it as well."),(0,l.kt)("p",null,"For instance, in smart contract code, we want to do some actions depending if a transaction's coming from a specific person, but how to identify it, as its transaction chain evolves and we don't keep a track of all the transactions."),(0,l.kt)("p",null,"Then being able to identify the first transaction of a chain is important."),(0,l.kt)("p",null,"So we are adding a new chain index file (",(0,l.kt)("inlineCode",{parentName:"p"},'"Genesis address"-key'),") to support this feature."),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(68825).Z,width:"321",height:"31"})),(0,l.kt)("h5",{id:"types"},"Types"),(0,l.kt)("p",null,"We also want to be able to list of the transactions of a given type, this is useful when the starts and fill memory tables but also to list transactions in UI or API for network transactions."),(0,l.kt)("p",null,"Then a index is given by type for this purpose where the addresses are appended"),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(81613).Z,width:"411",height:"137"})),(0,l.kt)("h4",{id:"memory-indexes"},"Memory indexes"),(0,l.kt)("p",null,"Among the files indexes for backup or long term storage, we are proving some in memory indexes (a bit like Log structured Hash tables) to read data with predictable latency.\nThis make reads fast."),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(58321).Z,width:"482",height:"95"})),(0,l.kt)("h5",{id:"transaction-index"},"Transaction index"),(0,l.kt)("p",null,"This index works a bit like a chache and is identified by a transaction address with the following information:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"genesis address"),(0,l.kt)("li",{parentName:"ul"},"offset"),(0,l.kt)("li",{parentName:"ul"},"size")),(0,l.kt)("p",null,"So once the a transaction is present in this cache, we can easily read transaction give information about the position of the file, and read it really quickly."),(0,l.kt)("p",null,"But if the transaction is not present, we can easily use the index summary as fallback, to identify the file and the offset."),(0,l.kt)("h5",{id:"chain-stats"},"Chain stats"),(0,l.kt)("p",null,"This index is built from the genesis chain files and contains information about the number of transactions within and the last offset.\nSo during the write, the transaction index/summary is notified about the last offset of the chain, and help to move forward in the location of new transaction."),(0,l.kt)("h5",{id:"last-index"},"Last index"),(0,l.kt)("p",null,"As we mentioned in the last addresses chain index file, we need to quickly know what is the last address of a chain, so here we a cache, we says for a given genesis address what is the latest."),(0,l.kt)("p",null,"So this table is filled every time a node receives a last address notification."),(0,l.kt)("h5",{id:"type-index"},"Type index"),(0,l.kt)("p",null,"Because we have type index file, we can also leverages a memory index to know how many transactions for a given type exists.\nThis is useful for key derivation for network transactions.\nSo we can easily and quickly get the size of a chain."),(0,l.kt)("h3",{id:"chain-reader"},"Chain reader"),(0,l.kt)("p",null,"Wide column storages provides the capability to extract sub columns information to avoid the load of an entire row in the memory to let the application filter the data.\nThe filtering can be done on the disk, while make it efficients."),(0,l.kt)("p",null,"The behaviour like is a two dimensional key-value pair, where the 1st dimension targets the partition key and the 2nd targets the columns of the row."),(0,l.kt)("p",null,"So we achieve a similar approach here, by eing the 1st dimension as the chain file and the 2nd as the list of columns names encoded during the transaction write."),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"After being able to get the lookup informations from the chain indexes to identify the file and offset in the file of a given transaction, we ",(0,l.kt)("inlineCode",{parentName:"li"},"seek")," (put the cursor) at the offset position."),(0,l.kt)("li",{parentName:"ol"},"Then we can sequentially read columns and values and pick the ones we want"),(0,l.kt)("li",{parentName:"ol"},"When we reached the end of the transaction (thanks to the size information from the indexes) or the enf of file, we convert those values into a transaction where the values retrieved will be filled in to the structure.")),(0,l.kt)("h3",{id:"write-path"},"Write path"),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(79525).Z,width:"811",height:"481"})),(0,l.kt)("p",null,"So in order to be written, a transaction follows a write path to make reads efficient."),(0,l.kt)("p",null,"After a transaction is written to disk in the genesis chain file, several disks and memory writes are performed to help the indexing of this transaction."),(0,l.kt)("p",null,"Transaction's address is written to:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"the summary index from the subset of the transaction (file)"),(0,l.kt)("li",{parentName:"ul"},"the last addresses index of the chain (in memory and file)"),(0,l.kt)("li",{parentName:"ul"},"the transaction's type index (in memory)"),(0,l.kt)("li",{parentName:"ul"},"the bloom filters (in memory)"),(0,l.kt)("li",{parentName:"ul"},"transaction index (in memory)")),(0,l.kt)("p",null,"Its public key is also written to the chain's public key index. (file)"),(0,l.kt)("p",null,"Then transaction's type in memory index number incremented, as well as the chain stats in memory index."),(0,l.kt)("h3",{id:"read-path"},"Read path"),(0,l.kt)("p",null,(0,l.kt)("img",{src:a(30401).Z,width:"505",height:"441"})),(0,l.kt)("p",null,"To make read efficients, when a transaction wants to be retrieved, it goes to the read path:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Check if the transaction index is present, if yes we have information about the file and position"),(0,l.kt)("li",{parentName:"ul"},"Otherwise we check the bloom filter, if yes, we read the subset summary to identify the position of the transaction, otherwise you inform the transaction does not exists"),(0,l.kt)("li",{parentName:"ul"},"Then a reader is able to perform reads according to the fields requested and the position retrieved.")),(0,l.kt)("h2",{id:"additional-of-chain-storage"},"Additional of-chain storage"),(0,l.kt)("p",null,"For now, we have covered the scope of chain storage and retrieval, however we also need to persist some data which are not really inserted into a chain and are important for well-being of the node execution."),(0,l.kt)("p",null,"So we have to leverage others kind of storages and indexes as simple key-value in memory loaded from disk."),(0,l.kt)("p",null,"The scope of those storages are:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Bootstrapping information (last P2P bootstrapping seeds, storage nonce, last sync date)"),(0,l.kt)("li",{parentName:"ul"},"Network statistics (aggregated TPS and nb of transactions)"),(0,l.kt)("li",{parentName:"ul"},"P2P view (aggregated node availability from the beacon chain)")))}k.isMDXComponent=!0},68825:(e,t,a)=>{a.d(t,{Z:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUEAAAAfCAYAAAB5/X8CAAAPe3RFWHRteGZpbGUAJTNDbXhmaWxlJTIwaG9zdCUzRCUyMkVsZWN0cm9uJTIyJTIwbW9kaWZpZWQlM0QlMjIyMDIyLTA0LTA3VDE1JTNBNDElM0E1OS43ODBaJTIyJTIwYWdlbnQlM0QlMjI1LjAlMjAoTWFjaW50b3NoJTNCJTIwSW50ZWwlMjBNYWMlMjBPUyUyMFglMjAxMl8yXzEpJTIwQXBwbGVXZWJLaXQlMkY1MzcuMzYlMjAoS0hUTUwlMkMlMjBsaWtlJTIwR2Vja28pJTIwZHJhdy5pbyUyRjE0LjQuMiUyMENocm9tZSUyRjg3LjAuNDI4MC4xNDElMjBFbGVjdHJvbiUyRjExLjMuMCUyMFNhZmFyaSUyRjUzNy4zNiUyMiUyMGV0YWclM0QlMjJYZGR3Z1V6WG9rZngyd3l3NXNRaCUyMiUyMHZlcnNpb24lM0QlMjIxNC40LjIlMjIlMjB0eXBlJTNEJTIyZGV2aWNlJTIyJTIwcGFnZXMlM0QlMjI0JTIyJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIyS3ZUeTZfRm4xUEd2SXVrR0dCOG8lMjIlMjBuYW1lJTNEJTIyUGFnZS0xJTIyJTNFNVZuWmNwc3dGUDBhVDUlMkZxQWNsZ2VNelNKVE5kTXBPMFNSOWxKSU5xR1htRUhKdDhmU1VRWmhGSm5NU3VNODZUMFJYYXpybjM2SEk5Z0dmejlSZUJGc2wzamdrYkFBZXZCJTJGQjhBSURyT3I3NjBaYTh0SVRodURURWdtTHpVbTI0b3ZmRUdCMWpYVkpNc3RhTGtuTW02YUp0akhpYWtraTJiRWdJdm1xJTJGTnVXc3Zlb0N4Y1F5WEVXSTJkWWJpbVZTbmNzUDY0NnZoTWFKV1RvQTVueHpWTDFzVHBJbENQTlZ3d1ElMkZEZUNaNEZ5V1QlMkZQMUdXRWF2QXFYY3R6bkIzbzNHeE1rbGRzTVdGNndrNyUyQjM5NU5mRnhlJTJGNVk4JTJGbDluNk92Z1ltTDNKdkRxdzRNc1VFejNHR2NCVExtVENZNTRpOW8zemhUSzZ5dmlYU0prYnF0QlNjbVZLNUp5WlhyVWRrZCUyQmE4VVhqajI0TXZhcDV2bTUybnVmTjFpVVJkRTRrRWNaWWJvOWdpNlQ2MUpWWElCRVQlMkJjaFJ4eHZNbGJNU3JsWVJ1Um9uQ0VPUzNyWG5SOFpyNHMxN202R1huS3FWZ1dNOEhIamUwUFZkRURwUVBRZk9HSll6R0hkM2ZhYzlZOGFYSWlKbWtwb3Q5ZERZVlcwcU9Id0duOGI1N2hCYm1oTlpCQ3MlMkZYT2pIbEV2MWM3cEtxQ1JYQ3hScDIwb0ZjWnZOQ1lwbWNlRVRQNWVTMFpRWU8wWmk5bE9Ob3JMZ2IlMkJob2VxZVVzVFBPdUNoV2d0Z2pBUjRwZXlZRm41RkdUd0FtMFBjMyUyRk40UkljbjZjWVp0NXN3QVdFRnNJQWNqMDE3VjhWcTlralFpTlhRZTVycEZ5M001Q0olMkZtZ0tUNFJJdFRRWVBHVk9HWkpVWFV1VzM4dGYwU1NSVVJhV0VCRHR3QVdna1NzS0dmVHFjZ2l2cWd4JTJGN0U5JTJGeG5oSllOZkFOWXJ3Zll5dmJLeUhLZERxJTJGdWRxRmtUZVElMkZOVkVwSFh1THlXcTVoa09jTUJxUkQ1bSUyQnR4SkVVOHMlMkZWRFRJdGglMkIwZVRSTzB5VGRtQkNqc2ZhVVNKR29WZlJVeHhaVjk5bUo2WmhUak5sRGdkOFclMkYxMEVwOWZHSHZZRTU0Ym9waE9CZlVXbk83TFl1QkVLQ1gyRkNKUm1LSktVSHpFamJqaFdWM0hyam5JT3pvbG5jWEpPczlueGtoQjJGQWtlbkFIZll1QTdtWE16ODN2Z3dBME96UUdBZHA2Z2J1Y3IwelFvdmpvJTJGMyUyRmJlVnhzcEx0akh2TWFrbTAlMkZtM21VSzlJcmslMkIzWE9iV2ZGMTQ5SWZaVWdMd1NQU0phOVBFZnVwc09JQk5QZW5NeVBBaktaN2tqZmc0NWY5MmtMOUd5JTJGaG52VGxzQ0MlMkY4Z3doJTJCT09udmRveWFoSFNycUo2TzRnMyUyQkliNU1nZ0R3OE1lWVh3TnBCSHVZSVBFd0czQUwyVSUyQjIlMkJUcDFqSVNyMTN2ZDNnTzRJZEdRRTJ2bjFmMWQ3ZThMWHo5aXBEY1RTWWE1ckd4NXVzak1DYnkxYmVZYWxwMUxsYkQxNXFBdmJWYXBVV0hJU3hVQUpQc2lNT2owNE5zTGZNMEhjZDdDMDhLdm5jYVdWOVRXVlJXQjk2SVRSdFhWdDNodzZzMm5WeFhUZnlSdVBscGZVdHZ3TjJYMXYzTzdYMXRnU09POXh0V3c4Y2RWT0g3cDIxNTNvZ2ROJTJCZmN2cndqU2tudE5NMVd6bG5KRDlpMGZUZCUyRnllYXFsbiUyRjAxa0dVdjElMkZNZnowRHclM0QlM0QlM0MlMkZkaWFncmFtJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIycks0NDJQRWN6SENtODBLaHBXWl8lMjIlMjBuYW1lJTNEJTIyUGFnZS0yJTIyJTNFNVZkTmI2TXdFUDAxSEN1QlRSeHkzSkp1VjZ1MnFwUkR0MGNYRDhHcVlTTEhLV1IlMkYlMkZacGdBcFJXVmFWMGhWSTRZTCUyRjVNUFBteVpZOUd1ZlZ0ZWFiN0JZRktJJTJGNG92TG8waU1rQ0h4bVB6V3liNURGWXQ0QWF5MkZjJTJCcUFsZndMRHZRZHVwTUN0Z05IZzZpTTNBekJCSXNDRWpQQXVOWllEdDFTVk1OVk4zd05JMkNWY0RWR0g2UXdXVnNYVzNTR1h5RFhtVnM2SXE2JTJCbkxmT3JwSnR4Z1dXUFloZWVUVFdpS1laNVZVTXFpYXY1ZVVtZTBhMXFuN2ZjWHdReFRKJTJCTkglMkZ1TDVwa1B6OFRjaXhCUTJGT201bzBxViUyQjQyam0lMkJ2TkQlMkZvV1FDYmRGbTN6S3BjVmNJcUxQNUhyMHNNMmxndGVGSmJTMnRkaXlXbVZ6WldXQ0hxVlFxUm9YNkVFc0ZoeWhOTEw0MUdwJTJCaFoyRkpCRSUyQnB0YmclMkZBVzJnZXRXNkQlMkJvT2pzMndLZ2JNd2VpOWpXdXpNRmVLRXpEeDNienM1QkE1S09zSmdUcU1Pd0d1ajVrN2t1M0E4ZndKenVtN25BY241VHhOVTVLOHlibGdUMnpHdnBCekVrNk04M0RFZWVDZlZ1SHBySDdmVlBqaHFTT3dNRDI4ZWI2d0M1Uk1yQXV6VVJmT3ZnZWhQN0Vlc1BQZjhjTm9ZcHpQMyUyQldjbk11T1A1dmFLUnVOT0NmbnYlMkJPenFaMjdpJTJCOTQ3czclMkYzN2xycDkwRjVHRHJYZVBvMVQ4JTNEJTNDJTJGZGlhZ3JhbSUzRSUzQ2RpYWdyYW0lMjBpZCUzRCUyMnZETHdETjlxQkZkTHVKRlhfNzB2JTIyJTIwbmFtZSUzRCUyMlBhZ2UtMyUyMiUzRTNaVmJUOEl3R0laJTJGelM1TmVzQzVYU0o0VEV3MFN5UmUxdllycTNZcmxvNkJ2OTRDSFdPQ01ScFA4V3J0JTJCeDI2NyUyQm1iTktLRFluNW0yU1MlMkZNZ0owUkpDWVIzUVlFWUl4aXYxbnFTeldTcG9lcllXeFZTSWt0VUttbmlHSUtLaVZFakR0SkRwanRGT1Ryc2hOV1FKM0hZMVphJTJCcHVtalM2ZSUyQnFFaldGSHlEalR1JTJCcElDWmMzYzhWcEd6Z0hOYzdEMFFrSjh4V3NTUTZUVEhNbVRMMGwwWk9JRHF3eGJyMHE1Z1BRUzNnTkZ6NFRmWFZIMDRkS1A1ME5ieDl2YmxKNnNHNTIlMkJwR1N6UWdXU3ZmcDFyMVptYkclMkJ1cjAlMkJ5QzR2Sk1aeVZEVWxhTVowRlhoRlBkVFhpa000ZE9vV0RVbHJxbExBc2h1SzZIR2RLd2ZaaFBGbHRQYmU4VnJ1Q3UxMzJDJTJCbDBucGd0TEdyV2lvWUpKSjdmZXFzZVlTdFNNd1R1SmMlMkJFdjRFcklQNXE2dDdaMjY4dVF6dllqQUZPTHZ3ZFUyWE9Bd1pERXhRMk5ldEhaSWc1VnRHb0VGandZRGpUZWNXc2w4RXpoOWdqbmVZWTRRUjZxWGtTNUZMS1FuZmkxekU5JTJGRmglMkZJM0lrejlHbkx6cDhxOUYlMkZvc3VwJTJCU1BNYWY3WFg2WTB2JTJGaWN0TDdNZVIlMkIyNzR6cTlqV2EwMVBYZ0ElM0QlM0MlMkZkaWFncmFtJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIyVExmNkd1azZJZjQ2bExsQ2dRbW8lMjIlMjBuYW1lJTNEJTIyUGFnZS00JTIyJTNFM1pWQlQ0TXdGTWMlMkZEVWNUYUFmQ2NVNTBCNDJISFRUZU92cUF4a0pKS1lQdDAxdEdHZUNXbUNWVEYwJTJCMCUyRiUyRmY2SHUlMkZYZjFJTEw3TG1VWklpZlJZVXVJVnMybGo0M2tMSWNXeFBmMXBsMnlsQmNOc0ppV1RVSkEzQ2l1M0FpTFpSSzBhaG5DUXFJYmhpeFZTTVJKNURwQ1lha1ZMVTA3Ulk4R25YZ2lSd0pLd2l3byUyRlZWMFpWMnMlMkZsQlVOZ0NTeEpUV3NmbWZreTBpZWJTY3FVVUZHUEpCeGFlQ0dGVU4wcWF4YkFXM2c5bCUyRnBwOTE2R2ViVlpydWN2YndLRjBwM2ZkTVVlempseUdFRkNyaTViR25XbE40UlhodGVjc3doTXgxSnRlNHhTVkRtRnRwUnQ0YnM2WlFwV0JZbmFhSzJObzdWVVpWenZITDJNR2VjTHdZWGNuOFdVZ0I5SFdpJTJCVkZCOHdpbmlSRCUyQnRZUjh4dmdGVFFmTG0zYjRaMkRqZWhMUXdpQXlXMyUyQmx4ZnhUT1haOXlMYkxPdkJ5JTJGNFJrcEhMc0JHSThaOXlhSHlRRmd2RE9RemdPTWo0STd0MlBZc1FCZEZIc2N4aWs0aXA5N2FjNzBmUk81ZkdmSFphWXRmbHZjZldoeWpLd1B1bnJhNEclMkJEJTJGWW5FMCUyQnpYa2VqdThNUHZZNkozRzRTYyUzRCUzQyUyRmRpYWdyYW0lM0UlM0MlMkZteGZpbGUlM0VhM/nOAAAMbUlEQVR4Xu2ceTzVWR/HPy2mZaJNPcXTQuuYpFE9TwvTtExUypQGLWYmTetUk9LqSTRCiSihbG1C0UbElD0mRRKRJSVpkbVmEsm8zjH3PjQ07j1dY3TOf67zPb/z+/jc9znn+z0vrW4H6VaDNyYFnNJXMMV/yMErhzp/yK//Xt6d+49NxlYEgp+obWQb5QOOTovZjbaqJz5gBVhevRqvExeA+098Dbn/xNeORO47EQ0OQTYNwU3IIiCHIIt6JJb7j01BDkE2/Wg0NyGLiByCLOpx/7Gqx3eC7ApyCDJqyCHIKCBfhBkF5DtBRgH5SswqIIcgq4L8JMKmIIcgm378OMysH4cgq4QcgmwKcgiy6cchyKwfhyCrhByCbApyCLLpxyHIrB+HIKuEHIJsCnIIsunHIcisH4cgq4QcgmwKcgiy6cchyKwfhyCrhByCbAq+FwjuP+iLjh3aY/E32sLZ3Mm8D9fDZ5B19wEmqI3E6mV6aNu2jfD3TwuK8N1yM/gd242OHdvTz4tLyuDi7o+4+FtQGqoA4zUGkO3ehf7ur8YjfU6duQS/c5fhe9iKxty99xC79h7B/dxHGPMfZTqH7t06098l3kyHk+sp5D18Cu0ZEzD3q8noIdtVLDWbyoSFz55i7DA5TJqqBZejZ4VzdXGwQnZmOnbYOENFQQY/x6Wjn8JAsd6FBJHnbPrREPvdTqJDh45ij9O4QHYI/p3+e/26CsvXWtZ51dkzJ2KGhto7/Rca9guOeAXiVUUFNKeMg+6cLyEj/XHjJHurV0vyX3CAH0IC/FH1pgpas/UxYfI0tG/fQSxdGhvEBEECkpBLcdhqfgCbjL6FtflqIcyGj9XHJ0MUsGyRDiz3eEBt7Ag47DbGb7+V43RAGI56X8DPYVdRkheBzjKdUF1dDZ2FG3HzVgbMTZYhODQWKWnZSIz2QtnzF2hoPMGL5tzPh6LyLAwe2Bd3Ek/Tj4eozsGI4UMwV3syjvkEoai4FJHBriAAlhusCWLWeXM14Hn8PJ4VliA+4mhjdavTr6lM6HXYGXsstuLXF8/xS+ojdOveg87D2d4SWRlpsHE8goT4KximMlIseL18+RtCL5zB2VPHcCXyEhIyCiEtU7NoSK6JD8Hm4D+y0I4YNw97dq4VSjRKVQmqKkMb9F9ySiZU1RdgzXJ9+r0wszoEvTlfwnTzErFkbin+i7gUhKULZ8FwuRGUlD+Dw24zzPhKD+u2/CSWLo0NYoKg46GTiI69gYjoBCxaOFMIQQKcreaOeJAWROdxPigK2vrr8OvjGJSUPofRFju666sNQWKmAcO1cS81AP369EZhUSlk+09GdIgbCOAaGo/sIslq/MX0pZDr3YNClEDwxs071GilDyPpCiuAZNbNsyAmNDaxR3byOTo/8rPKuHnITDqDgYp9GqudsF9TmXD21NH4esFi7LfZgbWbzKFnUPOlEUDQyt4N3+lqwM75OHr1/jcuBvpjr9U2lJWWYLq2LjaaWqNdu/ZIvnEN1uYbkJOVAfWJU7F1hy26dO2Op4/zYWm6HqWlxf8ICDYH/8XFJ8Pc2hVRF13r+OZd/iPfh/Co6zjva0djrGw94eMfipux3iJ7jwS0FP8R71VWVmC71X6qg5enExxtLRCXki+WLo0NYoKg4CG6326GYn95IQTJypaZlQsvdwvaJeV2NpTH6NWBzK3ULLq7E+wEL0fEY/Z8Y5TlRwnnLiP3OfbZbMC93EfvHM9itzvS7uRAR3sStpg5UggSOH+uuQTlBbFo1+4jeiwfNGI2gvz3QWXYIBQVl2GY0gD6LPej52C02RaF98MgJdW2sdo1KQSzM9MwTV2Z7gDdneyQcO0KfM7XaCWAoIXtQXocDo1NQ0VFBbS+UMG2nfbopzgIO/9nhJVGJhg/YQrGKcvDYPEqaM7UgaujDV68KMOJsxHC98lIS4HWxBHNfifYHPxHYLZjlytduFu3bo0V38+FzqxJuHo9pUH/aUweg+pqoOBZMZJTM2GwxBTLDOdgh8lykb3XVBBsCv+R00wnaWm6gJO2YdW3qHj1Cg6uPmLp0tggiUDwm6Wm6Ny5E/bb1PxnGrLr69Z3EpKunICK8mD62dsQJEdSa7vDwqMs6TNSfSEMDWZRQzU03svyV9DWX4/b104hMiZBCMGqqjf0yGugP53m+xycveHjFwpvT0vo60ylcyB9nN39sNp4N/Zar8PalfMbq1udfk2xEpOjQVpKEs0FJiVche6M8Qi/lgX5Pv3rhaC/92EKSgHcYqMuI/9hLl48L4OH815EJuagVatWyMm+A43xnyI2OQ+yPXvR9/qnQ7Ap/eftFwLP4wGwtVyLh/kF2GnjTkFouX3VX/rvkOdpLPuxJp9Y25eimrCl+Y941Gq7MU6d8IBPQDRUR48VVRKR+ksEgiuMrOhx9uQRazqZ/EcFkB8yDcUPwtGls3S9ECTHgaWrLersBElOz85qHQIvRtc7XlFuGEZ9boAZmmqYrTURUbGJcHL1g4+nJc21kOTzmg02NEE9/2tNBARHISL4EM3XEDDP1DVCZvYDuB/YBi1NdZGEq91Z0iasqqqCmkoflJe/pHnAyooKPH6Uh02mu7B45fp6IWhvbYpusj1haulQ5712bP0Rxz0O/OldAyNuYvDQT1sEBJvKf8TPH0lJUc0ExT2SHycniyfZobgQEtOg/wR/AJIj37nHg+bNSbpIMI4oZmxJ/rt9KwmL501HLzl52Dodg+LAoaJIIVZfiUCQ/EH9z4UhIfo4nVRMXBItehBjCNrbO0HSR13jexCwde0iQwsoH/dSA8nh+fqH1jtefsZFeqQWNFLcIEUPpaGKuOBnjwd5T6A+7jNadHn8pJCuzCRHSNqUmSug0F8eh/aZ0MIMS5O0Ca/GRsJgzmR4+ASjbdua43rAaW/cuP4LgqKS64Vg4Blf3L6VCKfDNUWiW0nX8Tg/D6m3biA6PATHz4TRz19XViIzPRXKn42ClNRHLQKCTeU/4uczAeE0rTJoQF+q3UGP03ByO4XI4EP0tFOf/8wsD0JerifWr15IY1LT7mLYf3WRk3Ie/fvKiWzFluK/e3ez6Annh3UmWLTMCG3a/P82iciiiBAgEQgKCg0hZx2hNEQRhj+Yo0f3rsIcIf1SvpUTrKx8je79JsFo1QJ6NYYY5bhvMAjoUtOyaeHiXeNRMARH0YIHyQkKjuAkBzhhvCotxjzMf4rAU/bwOhmMFWutaKW49srbv29vmj8UtUnahCbrlqKsrIReWRE0ArPZX45GYHgSLoecp9Xh2jlBcqQw0JkC9xMXoDhoCBbpadI8YM9/ycFQfxq8zoZDecQouB2wpQnomKRctPkDsP/043BT+o/47efwq4gPP0Jz1/MNTWj6ZfliHZoCqs9/pHBI/E1y5mTB3vaTM+ITUhF32VNU69H+LcV/2zevwt2sdOy0PSjUoXXrNkzXvRoj6HuBoN53W2hhxMpslfCZJL9HihSkkWsrMaHude7hCYolguot6UeSzJO0apLD0p06UgORYy1pfzXe2xAkP/+0yw02DjXXXnr3kkVYoAtdgddstMF+F98/6UOqc8OHDWqMbnX6SNKE5NoKKXbsc/OFppaO8LlkdztBVQFfLzCElJTUn+4J9umniK1GS3Da9wiNIXcLSYKZVIetzTbAw2Uv/by7bE/sdfHCGLWJwrEz0lNpUSUxswidpGVE1kO0APGvyAie83f6j9wznbPAGNcSb9PpjFZVwjkfO+q3hvxHFmiNr1YJY8aPUYHFtpX4Qn2kaNL90bul+E9jvBJysjPqaPBxJ2ncyCoWS5fGBr0XCDb0sNKyF7QCJsq1k4qKSprDIzG1L1eTZ4gzXnl5BfLyn4g0h8aKJ+gnSROKOpe3+5cUF4KspjKday6dC1pRYQGeFTxFP4UBFIx/X2OHYHPwH8l7k0ITgV/t1pD/3rx5g9y8xzSnSK52sTTuPxb1+D9VZVOvCVbi9zLBZj2I5CDYrF/7PU6uOUPwPb6mxIaS6E5QYrNuZgNzE7L8QTgEWdQjsdx/bApyCLLpR6O5CVlE5BBkUY/7j1U9fhxmV5BDkFFDDkFGAfkizCgg3wkyCshXYlYBOQRZFeQnETYFOQTZ9OPHYWb9OARZJeQQZFOQQ5BNPw5BZv04BFkl5BBkU5BDkE0/DkFm/TgEWSXkEGRTkEOQTT8OQWb9OARZJeQQZFNQCEG2YXi0U/oKLoKYCqwc6ixmJA8TKMD9x+aF3wGLGd3vdPqULgAAAABJRU5ErkJggg=="},71624:(e,t,a)=>{a.d(t,{Z:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUEAAAAfCAYAAAB5/X8CAAAM+nRFWHRteGZpbGUAJTNDbXhmaWxlJTIwaG9zdCUzRCUyMkVsZWN0cm9uJTIyJTIwbW9kaWZpZWQlM0QlMjIyMDIyLTA0LTA3VDE1JTNBMzUlM0E0Ny4zMDlaJTIyJTIwYWdlbnQlM0QlMjI1LjAlMjAoTWFjaW50b3NoJTNCJTIwSW50ZWwlMjBNYWMlMjBPUyUyMFglMjAxMl8yXzEpJTIwQXBwbGVXZWJLaXQlMkY1MzcuMzYlMjAoS0hUTUwlMkMlMjBsaWtlJTIwR2Vja28pJTIwZHJhdy5pbyUyRjE0LjQuMiUyMENocm9tZSUyRjg3LjAuNDI4MC4xNDElMjBFbGVjdHJvbiUyRjExLjMuMCUyMFNhZmFyaSUyRjUzNy4zNiUyMiUyMGV0YWclM0QlMjJsZV9hWU5weHdJRG03ajQ0ZTFyLSUyMiUyMHZlcnNpb24lM0QlMjIxNC40LjIlMjIlMjB0eXBlJTNEJTIyZGV2aWNlJTIyJTIwcGFnZXMlM0QlMjIzJTIyJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIyS3ZUeTZfRm4xUEd2SXVrR0dCOG8lMjIlMjBuYW1lJTNEJTIyUGFnZS0xJTIyJTNFNVZuWmNwc3dGUDBhVDUlMkZxQWNsZ2VNelNKVE5kTXBPMFNSOWxKSU5xR1htRUhKdDhmU1VRWmhGSm5NU3VNODZUMFJYYXpybjM2SEk5Z0dmejlSZUJGc2wzamdrYkFBZXZCJTJGQjhBSURyT3I3NjBaYTh0SVRodURURWdtTHpVbTI0b3ZmRUdCMWpYVkpNc3RhTGtuTW02YUp0akhpYWtraTJiRWdJdm1xJTJGTnVXc3Zlb0N4Y1F5WEVXSTJkWWJpbVZTbmNzUDY0NnZoTWFKV1RvQTVueHpWTDFzVHBJbENQTlZ3d1ElMkZEZUNaNEZ5V1QlMkZQMUdXRWF2QXFYY3R6bkIzbzNHeE1rbGRzTVdGNndrNyUyQjM5NU5mRnhlJTJGNVk4JTJGbDluNk92Z1ltTDNKdkRxdzRNc1VFejNHR2NCVExtVENZNTRpOW8zemhUSzZ5dmlYU0prYnF0QlNjbVZLNUp5WlhyVWRrZCUyQmE4VVhqajI0TXZhcDV2bTUybnVmTjFpVVJkRTRrRWNaWWJvOWdpNlQ2MUpWWElCRVQlMkJjaFJ4eHZNbGJNU3JsWVJ1Um9uQ0VPUzNyWG5SOFpyNHMxN202R1huS3FWZ1dNOEhIamUwUFZkRURwUVBRZk9HSll6R0hkM2ZhYzlZOGFYSWlKbWtwb3Q5ZERZVlcwcU9Id0duOGI1N2hCYm1oTlpCQ3MlMkZYT2pIbEV2MWM3cEtxQ1JYQ3hScDIwb0ZjWnZOQ1lwbWNlRVRQNWVTMFpRWU8wWmk5bE9Ob3JMZ2IlMkJob2VxZVVzVFBPdUNoV2d0Z2pBUjRwZXlZRm41RkdUd0FtMFBjMyUyRk40UkljbjZjWVp0NXN3QVdFRnNJQWNqMDE3VjhWcTlralFpTlhRZTVycEZ5M001Q0olMkZtZ0tUNFJJdFRRWVBHVk9HWkpVWFV1VzM4dGYwU1NSVVJhV0VCRHR3QVdna1NzS0dmVHFjZ2l2cWd4JTJGN0U5JTJGeG5oSllOZkFOWXJ3Zll5dmJLeUhLZERxJTJGdWRxRmtUZVElMkZOVkVwSFh1THlXcTVoa09jTUJxUkQ1bSUyQnR4SkVVOHMlMkZWRFRJdGglMkIwZVRSTzB5VGRtQkNqc2ZhVVNKR29WZlJVeHhaVjk5bUo2WmhUak5sRGdkOFclMkYxMEVwOWZHSHZZRTU0Ym9waE9CZlVXbk83TFl1QkVLQ1gyRkNKUm1LSktVSHpFamJqaFdWM0hyam5JT3pvbG5jWEpPczlueGtoQjJGQWtlbkFIZll1QTdtWE16ODN2Z3dBME96UUdBZHA2Z2J1Y3IwelFvdmpvJTJGMyUyRmJlVnhzcEx0akh2TWFrbTAlMkZtM21VSzlJcmslMkIzWE9iV2ZGMTQ5SWZaVWdMd1NQU0phOVBFZnVwc09JQk5QZW5NeVBBaktaN2tqZmc0NWY5MmtMOUd5JTJGaG52VGxzQ0MlMkY4Z3doJTJCT09udmRveWFoSFNycUo2TzRnMyUyQkliNU1nZ0R3OE1lWVh3TnBCSHVZSVBFd0czQUwyVSUyQjIlMkJUcDFqSVNyMTN2ZDNnTzRJZEdRRTJ2bjFmMWQ3ZThMWHo5aXBEY1RTWWE1ckd4NXVzak1DYnkxYmVZYWxwMUxsYkQxNXFBdmJWYXBVV0hJU3hVQUpQc2lNT2owNE5zTGZNMEhjZDdDMDhLdm5jYVdWOVRXVlJXQjk2SVRSdFhWdDNodzZzMm5WeFhUZnlSdVBscGZVdHZ3TjJYMXYzTzdYMXRnU09POXh0V3c4Y2RWT0g3cDIxNTNvZ2ROJTJCZmN2cndqU2tudE5NMVd6bG5KRDlpMGZUZCUyRnllYXFsbiUyRjAxa0dVdjElMkZNZnowRHclM0QlM0QlM0MlMkZkaWFncmFtJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIycks0NDJQRWN6SENtODBLaHBXWl8lMjIlMjBuYW1lJTNEJTIyUGFnZS0yJTIyJTNFNVZkTmI2TXdFUDAxSEN1QlRSeHkzSkp1VjZ1MnFwUkR0MGNYRDhHcVlTTEhLV1IlMkYlMkZacGdBcFJXVmFWMGhWSTRZTCUyRjVNUFBteVpZOUd1ZlZ0ZWFiN0JZRktJJTJGNG92TG8waU1rQ0h4bVB6V3liNURGWXQ0QWF5MkZjJTJCcUFsZndMRHZRZHVwTUN0Z05IZzZpTTNBekJCSXNDRWpQQXVOWllEdDFTVk1OVk4zd05JMkNWY0RWR0g2UXdXVnNYVzNTR1h5RFhtVnM2SXE2JTJCbkxmT3JwSnR4Z1dXUFloZWVUVFdpS1laNVZVTXFpYXY1ZVVtZTBhMXFuN2ZjWHdReFRKJTJCTkglMkZ1TDVwa1B6OFRjaXhCUTJGT201bzBxViUyQjQyam0lMkJ2TkQlMkZvV1FDYmRGbTN6S3BjVmNJcUxQNUhyMHNNMmxndGVGSmJTMnRkaXlXbVZ6WldXQ0hxVlFxUm9YNkVFc0ZoeWhOTEw0MUdwJTJCaFoyRkpCRSUyQnB0YmclMkZBVzJnZXRXNkQlMkJvT2pzMndLZ2JNd2VpOWpXdXpNRmVLRXpEeDNienM1QkE1S09zSmdUcU1Pd0d1ajVrN2t1M0E4ZndKenVtN25BY241VHhOVTVLOHlibGdUMnpHdnBCekVrNk04M0RFZWVDZlZ1SHBySDdmVlBqaHFTT3dNRDI4ZWI2d0M1Uk1yQXV6VVJmT3ZnZWhQN0Vlc1BQZjhjTm9ZcHpQMyUyQldjbk11T1A1dmFLUnVOT0NmbnYlMkJPenFaMjdpJTJCOTQ3czclMkYzN2xycDkwRjVHRHJYZVBvMVQ4JTNEJTNDJTJGZGlhZ3JhbSUzRSUzQ2RpYWdyYW0lMjBpZCUzRCUyMnZETHdETjlxQkZkTHVKRlhfNzB2JTIyJTIwbmFtZSUzRCUyMlBhZ2UtMyUyMiUzRTNaVmJUOEl3R0laJTJGelM1TmVzQzVYU0o0VEV3MFN5UmUxdllycTNZcmxvNkJ2OTRDSFdPQ01ScFA4V3J0JTJCeDI2NyUyQm1iTktLRFluNW0yU1MlMkZNZ0owUkpDWVIzUVlFWUl4aXYxbnFTeldTcG9lcllXeFZTSWt0VUttbmlHSUtLaVZFakR0SkRwanRGT1Ryc2hOV1FKM0hZMVphJTJCcHVtalM2ZSUyQnFFaldGSHlEalR1JTJCcElDWmMzYzhWcEd6Z0hOYzdEMFFrSjh4V3NTUTZUVEhNbVRMMGwwWk9JRHF3eGJyMHE1Z1BRUzNnTkZ6NFRmWFZIMDRkS1A1ME5ieDl2YmxKNnNHNTIlMkJwR1N6UWdXU3ZmcDFyMVptYkclMkJ1cjAlMkJ5QzR2Sk1aeVZEVWxhTVowRlhoRlBkVFhpa000ZE9vV0RVbHJxbExBc2h1SzZIR2RLd2ZaaFBGbHRQYmU4VnJ1Q3UxMzJDJTJCbDBucGd0TEdyV2lvWUpKSjdmZXFzZVlTdFNNd1R1SmMlMkJFdjRFcklQNXE2dDdaMjY4dVF6dllqQUZPTHZ3ZFUyWE9Bd1pERXhRMk5ldEhaSWc1VnRHb0VGandZRGpUZWNXc2w4RXpoOWdqbmVZWTRRUjZxWGtTNUZMS1FuZmkxekU5JTJGRmglMkZJM0lrejlHbkx6cDhxOUYlMkZvc3VwJTJCU1BNYWY3WFg2WTB2JTJGaWN0TDdNZVIlMkIyNzR6cTlqV2EwMVBYZ0ElM0QlM0MlMkZkaWFncmFtJTNFJTNDJTJGbXhmaWxlJTNFuJ3r+wAADZVJREFUeF7tnHk81Vkfxz8V00oLbTwttCiTlKl5WmifUimVQotpYkp7aS+TaEFJWoQS2oRopcRkCaNdEpElLWiRNdNC6nmdY+59KJq591yNcs5/fvd3zu/8Pvdz3+d7vt9Tde6e1/8A3pgUcEqax9S/Nnee3825Nr++RN6d+49NxjoEgt01V7GNUot7J0Ztg5TGsVqsAMurf8C7mOng/hNfQ+4/8bUjPXcfiwSHIJuG4CZkEZBDkEU90pf7j01BDkE2/WhvbkIWETkEWdTj/mNVj0eC7ApyCDJqyCHIKCBfhBkF5JEgo4B8JWYVkEOQVUG+E2FTkEOQTT++HWbWj0OQVUIOQTYFOQTZ9OMQZNaPQ5BVQg5BNgU5BNn04xBk1o9DkFVCDkE2BTkE2fTjEGTWj0OQVUIOQTYFOQTZ9KtWCJa+e4fMjIf0GQqK7SElLS2B2da0ITgEWb+R6oJg7fCfhI7I7Nnng0YNG8DkZ13h93kv5SFcD55C6v3HGKz5AxaZGkBKqp7w8+fZufhlriX8jmxDo0YN6PW8/EK4uJ3A5Wt3oNpNCSsWG0Ferhn97O/GI/f4nroIvzMh8DloQ/vcf5CJrQ6H8PDRE/T7UY3OQa5FU/pZzO0kOLn6IiPzOXTHDsbkCcPRUr65WH6UtAmzMh9hy/plyMp4iA4dO6Poz5eICLmAqTNNsWSVJVrItawwz5wXz9G/hwKGjdSBy+HTws9cdtkgLSUJdo6HYDh+EPSnm2CSwUyx3pF0Is9ZvcQYew4cR8OGjcQep2JHdgj+m/57964Uc5daV3ilieOGYuwozc/6Lzj0Cg55BuBtcTG0RwyA/qSfICvTWCxNa4P/Av39EOR/AqXvS6Ez0RCDh49GgwYNxdLr405MkSABSdDFy1hntRerzWbC1mqREGY9+xuiu4oSTGfpwXq7OzT798KubSvw6tUbnPQPxWGvc/g99CryM8LRVLYJPnz4AL0Zq3D7TjKszE0RGByN+MQ0xER6ovBlEaoaT/BC6Q+zoKw2Hl07t8e9mJP0sorGJPTqqYLJusNxxPs8cvMKcCnQFQTACl21Qcw6dfIoeBw9ixc5+bgWflgsUSVpwtTkRCyYpYcNNnvQt78WkhLi0EGpM169KqIg9PPygOfpMEhLfyecq+dBZ2zfvA5/Fr3ElYQnQkg677QGGc/e6Qju3olFy1at0bJ1W5Hf8fXrVwg+dwqnfY/gj0sXcTM5BzKyZYsJexMfgjXBf2Sh7TVgKrZvWSqUoo+GKjTUu1Xpv7j4FGhoTcfiuYb0d2Fpsx8Gk36CxZrZYsn5rfsv/OJ5zJkxHsZzzaCq1hu7tlli7AQDLFu7SSy9JApBx/3HERl9C+GRNzFrxjghBAlw1lk54nHiefq8s+cjoGu4DH8+jUJ+wUuYrd1Bo77yECRm6tRTFw8S/NGhXVvk5BZAvuNwRAYdAAFcVeORKJKsxkPGzIFC25YUogSCt27fo0YryLxEV1gBJFNvnwYx4QrznUiLO0PnR/5WHzAVKbGn0Fm5ncjCStKE+mMHwmzNJmj8OABGk4ZDqZMK8nJfUBge9L0AB1sLzDI1g0bf/sJ5ThzZF1Omm2CP3UYsXW0FA6OyH1N5CFqtXURXzyEjxuBCwAk42KxHYUE+xujqY5WFLerXb4C4W9dha7US6anJ0Bo6Eus22qNZczk8f5oFa4vlKCjIq1EQrAn+u3wtDla2roi44FrBN5/zH/k9hEXcwFmfHbSPjb0HvE8E43a0l8jeIx2+df8R75WUFNPAgDRPDyc42m/G5fgssfSSKAQFg+nPXAPljopCCJKVLSX1ETzdNtNb4u+mQa2fQQXI3ElIpdGdIBIMCb+GidNWoDArQjhHWYVB2G23Eg8ePfnseJu3uSHxXjr0dIdhraUjhSCB8yDt2XiTHY369b+j2/IuvSbi/IndUO/RBbl5heih2ok+y+3wGZitsUfOw1BIS0uJLKykTEggM25Ib0TceoDQ4AB4uDjgyMkQGoVt/s2MXieGIIDU1tGj80xLScRoLTUaAbo57cDN63/A+2yZhuUhSLbDU6YZQ61XX+gMUcf6LTvRQbkLtvxmhvlm5hg4eAQGqCnCyGQhtMfpwdXRDkVFhTh2OlyoR3JiPHSG9qoxkWBN8B+B2catrnThrlu3Lub9Ohl644fh6o34Kv03ang/fPgAZL/IQ1xCCoxmW8DUeBI2ms8V2XuShGBN9R/ZzTSRkUGbtv+h+qxcOBPFb99il6u3WHp9EQj+PMcCTZs2wR67sv+ZhkR9LdoPQ+wfx6Cu1pVe+xiCZEtqu+OgcCtL7vlBawaMjcZTQ1U13us3b6FruBx3r/viUtRNIQRLS9/TLa+R4Ria79vl7AVvv2B4eVjDUG8knQO5x9nND4tWbIOD7TIsnT9NLFElBcGEO7ewzWoVDvn9Tr/onr37UiiR8J9EbQRc44Zp4LBfMJq3kKdzJZ8lxsfSXGDszasgkWTY9VQotutYKQQfpKVQUArgFh0RApKDLHpZCHdnB1yKSUedOnWQnnYPowZ+j+i4DMi3akOf9bVA8Ev6z8svCB5H/WFvvRSZWdnYYudGQWi9YeHf+m+/x0mYLinLJ5b3pagmrC3+Ix612bACvsfc4e0fWWE3JKpm5e9nyglWtRLPM7Oh29njh2zpLVlPsqGoMhp5j8PQrKlMpRAk24E5izZXiARJTm+HzTIEXIisdLzcR6HoM8gIY7U1MVFnKCKiY+Dk6gdvD2uaayHJ58Ur7WiCetoUbfgHRiA8cD/N1xAwj9M3Q0raY7jtXQ8dbS2xdZSUCbOfPYHh+MEIuZqMjeuWoFGjxjAyWQBtrR6Yb7YOUlLSiAoPhptXWZqhtLQUmurt8ObNa5oHLCkuxtMnGVhtsRUm85dXCsHI0CC0kG8FC+tdFd6XPO+o+95PNAgIv42u3b7/qiD4pfxH/PzdXxV7QXGP5MfJzuJZWjDOBUVV6T+B0CRHvmW7O82bk3SRYBxRzFgb/Edy2iZTx6CNgiLNcSt37iaKRJ+9t1ogSL7QE2dCcTPyKH141OVYWvQgxhC0jyNBco/WqF9BwNa8mSwtoDRuowmSw/M5EVzpeFnJF+iWWtBIcYMUPVS7KeOc3048zngGrQG9adHl6bMcujKTHCFpI8bNg1JHRezfbU4LMyxNUiYkcyCRnpWtI5rLycFy9UI6LQI0Ui0mBZJNds5o3VaRXr8afYnmDd29AyElVbaN9z/phVs3ruB8RFylEHySmYG7d2LgdLCseHQn9gaeZmWARKGRYUE4eiqUXn9XUoKUpASo9e4jLMJ8LZHgl/If8fMp/zCaVunSqT3VbZ/7STgd8MWlwP10t1OZ/yyt90FRoRWWL5pB+yQk3keP/+ojPf4sOrZXENmK37r/HtxPpTucBcvMaT68Xr3/nzIRWaxKOlQLBAWFhqDTjlBVUYbxAiu0lGsuzBHSH99HOcGSkneQ6zAMZgun06MxxChHfQJBQJeQmEYLF58bjwIgMIIWPEhOULAFJznAwQM1aDEmM+s5Anx3wvN4IOYttaGV4vIrb8f2bWn+UNQmSRNevxKJNUtM6LGW8sUPcmbLx/MAjfgE+UDzZXNQWJhPj6wIGoHZxJ/6IiAsFiFBZ4XVYUFOUKW7Goz0RsDt2Dkod1HBLANtuuVu1VoBxoajaeVZrVcfHNhrTxPQUbGPUO8vwH4tEPyS/iN++z3sKq6FHaK562nG5jT9MtdEj6aAKvMfKRwSf5OcOVmw129yxrWbCbgc4iGq9ej937r/NqxZiPupSdhiv0+oT9269WhQIIkmEQga/LKWFkZsLMsiF9JIfo8UKUgjx1aigt0qnMMTFEsE1VtyH0kyD9MpSw7LNGlEDUS2tf9kvI8hSP7etPUA7HaVHXtp20YeoQEudAVevMoOe1x8PtGPVOd69ugisq6SNCF5OKkErzUzoRFY1+5qKMjPRVpyEq3Ymi5eTUFIjq2oK8li9wEfIRRJXxL1DtZQwpTpxpCWlv7knOCEKUZYZzYbJ30O0fckZwtJgplUh20tV8LdxYFel5NvBQcXT/TTHCrUIzkpgRZVYlJy0URGVmSdKu8g/hEZwXj/pv/IOdNJ01fgesxdOp2+Gqo4472D+q0q/5EFetSEhcI+A/upY/P6+Rii9YNYmn7r/hs1UBXpackVtGncRAa3UvPE0uvjThKBYFUzKSgsohUwUY6dFBeX0Bwe6VP+cDV5hjjjvXlTjIysZyLNQVRlJW1CwfPJub/HD9PRQk4erdqIvk363Hvk5+WArKayTcsOowtabk42XmQ/RwelThSM1d/YIVgT/Efy3qSgROBXvlXlv/fv3+NRxlOaUyRHu1ga9x+LehL6FyNsU/j6e1eXCb9+Zf7JG1QfBP/J07+Fe7j/2L7Fao0E2ab29fTmJmT5rjgEWdQjfbn/2BTkEGTTj/bmJmQRkUOQRT3uP1b1+HaYXUEOQUYNOQQZBeSLMKOAPBJkFJCvxKwCcgiyKsh3ImwKcgiy6ce3w8z6cQiySsghyKYghyCbfhyCzPpxCLJKyCHIpiCHIJt+HILM+nEIskrIIcimIIcgm34cgsz6cQiySsghyKagEIJsw/DeTknzuAhiKjC/m7OYPXk3gQLcf2xe+B/AQvf+6fgbTAAAAABJRU5ErkJggg=="},58321:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/memory_index-8b745de23265c24b29a6b68889747e0f.png"},30401:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/read_path-9a620d8ec68c3034fe7524efe7409647.png"},34662:(e,t,a)=>{a.d(t,{Z:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoEAAAAfCAYAAACYoBeiAAAKW3RFWHRteGZpbGUAJTNDbXhmaWxlJTIwaG9zdCUzRCUyMkVsZWN0cm9uJTIyJTIwbW9kaWZpZWQlM0QlMjIyMDIyLTA0LTA3VDE1JTNBMjklM0ExMC4xNjlaJTIyJTIwYWdlbnQlM0QlMjI1LjAlMjAoTWFjaW50b3NoJTNCJTIwSW50ZWwlMjBNYWMlMjBPUyUyMFglMjAxMl8yXzEpJTIwQXBwbGVXZWJLaXQlMkY1MzcuMzYlMjAoS0hUTUwlMkMlMjBsaWtlJTIwR2Vja28pJTIwZHJhdy5pbyUyRjE0LjQuMiUyMENocm9tZSUyRjg3LjAuNDI4MC4xNDElMjBFbGVjdHJvbiUyRjExLjMuMCUyMFNhZmFyaSUyRjUzNy4zNiUyMiUyMGV0YWclM0QlMjJFMzJvY2hNWnNQcTB0U09JbEtHQiUyMiUyMHZlcnNpb24lM0QlMjIxNC40LjIlMjIlMjB0eXBlJTNEJTIyZGV2aWNlJTIyJTIwcGFnZXMlM0QlMjIyJTIyJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIyS3ZUeTZfRm4xUEd2SXVrR0dCOG8lMjIlMjBuYW1lJTNEJTIyUGFnZS0xJTIyJTNFNVZuWmNwc3dGUDBhVDUlMkZxQWNsZ2VNelNKVE5kTXBPMFNSOWxKSU5xR1htRUhKdDhmU1VRWmhGSm5NU3VNODZUMFJYYXpybjM2SEk5Z0dmejlSZUJGc2wzamdrYkFBZXZCJTJGQjhBSURyT3I3NjBaYTh0SVRodURURWdtTHpVbTI0b3ZmRUdCMWpYVkpNc3RhTGtuTW02YUp0akhpYWtraTJiRWdJdm1xJTJGTnVXc3Zlb0N4Y1F5WEVXSTJkWWJpbVZTbmNzUDY0NnZoTWFKV1RvQTVueHpWTDFzVHBJbENQTlZ3d1ElMkZEZUNaNEZ5V1QlMkZQMUdXRWF2QXFYY3R6bkIzbzNHeE1rbGRzTVdGNndrNyUyQjM5NU5mRnhlJTJGNVk4JTJGbDluNk92Z1ltTDNKdkRxdzRNc1VFejNHR2NCVExtVENZNTRpOW8zemhUSzZ5dmlYU0prYnF0QlNjbVZLNUp5WlhyVWRrZCUyQmE4VVhqajI0TXZhcDV2bTUybnVmTjFpVVJkRTRrRWNaWWJvOWdpNlQ2MUpWWElCRVQlMkJjaFJ4eHZNbGJNU3JsWVJ1Um9uQ0VPUzNyWG5SOFpyNHMxN202R1huS3FWZ1dNOEhIamUwUFZkRURwUVBRZk9HSll6R0hkM2ZhYzlZOGFYSWlKbWtwb3Q5ZERZVlcwcU9Id0duOGI1N2hCYm1oTlpCQ3MlMkZYT2pIbEV2MWM3cEtxQ1JYQ3hScDIwb0ZjWnZOQ1lwbWNlRVRQNWVTMFpRWU8wWmk5bE9Ob3JMZ2IlMkJob2VxZVVzVFBPdUNoV2d0Z2pBUjRwZXlZRm41RkdUd0FtMFBjMyUyRk40UkljbjZjWVp0NXN3QVdFRnNJQWNqMDE3VjhWcTlralFpTlhRZTVycEZ5M001Q0olMkZtZ0tUNFJJdFRRWVBHVk9HWkpVWFV1VzM4dGYwU1NSVVJhV0VCRHR3QVdna1NzS0dmVHFjZ2l2cWd4JTJGN0U5JTJGeG5oSllOZkFOWXJ3Zll5dmJLeUhLZERxJTJGdWRxRmtUZVElMkZOVkVwSFh1THlXcTVoa09jTUJxUkQ1bSUyQnR4SkVVOHMlMkZWRFRJdGglMkIwZVRSTzB5VGRtQkNqc2ZhVVNKR29WZlJVeHhaVjk5bUo2WmhUak5sRGdkOFclMkYxMEVwOWZHSHZZRTU0Ym9waE9CZlVXbk83TFl1QkVLQ1gyRkNKUm1LSktVSHpFamJqaFdWM0hyam5JT3pvbG5jWEpPczlueGtoQjJGQWtlbkFIZll1QTdtWE16ODN2Z3dBME96UUdBZHA2Z2J1Y3IwelFvdmpvJTJGMyUyRmJlVnhzcEx0akh2TWFrbTAlMkZtM21VSzlJcmslMkIzWE9iV2ZGMTQ5SWZaVWdMd1NQU0phOVBFZnVwc09JQk5QZW5NeVBBaktaN2tqZmc0NWY5MmtMOUd5JTJGaG52VGxzQ0MlMkY4Z3doJTJCT09udmRveWFoSFNycUo2TzRnMyUyQkliNU1nZ0R3OE1lWVh3TnBCSHVZSVBFd0czQUwyVSUyQjIlMkJUcDFqSVNyMTN2ZDNnTzRJZEdRRTJ2bjFmMWQ3ZThMWHo5aXBEY1RTWWE1ckd4NXVzak1DYnkxYmVZYWxwMUxsYkQxNXFBdmJWYXBVV0hJU3hVQUpQc2lNT2owNE5zTGZNMEhjZDdDMDhLdm5jYVdWOVRXVlJXQjk2SVRSdFhWdDNodzZzMm5WeFhUZnlSdVBscGZVdHZ3TjJYMXYzTzdYMXRnU09POXh0V3c4Y2RWT0g3cDIxNTNvZ2ROJTJCZmN2cndqU2tudE5NMVd6bG5KRDlpMGZUZCUyRnllYXFsbiUyRjAxa0dVdjElMkZNZnowRHclM0QlM0QlM0MlMkZkaWFncmFtJTNFJTNDZGlhZ3JhbSUyMGlkJTNEJTIycks0NDJQRWN6SENtODBLaHBXWl8lMjIlMjBuYW1lJTNEJTIyUGFnZS0yJTIyJTNFNVZkTmI2TXdFUDAxSEN1QlRSeHkzSkp1VjZ1MnFwUkR0MGNYRDhHcVlTTEhLV1IlMkYlMkZacGdBcFJXVmFWMGhWSTRZTCUyRjVNUFBteVpZOUd1ZlZ0ZWFiN0JZRktJJTJGNG92TG8waU1rQ0h4bVB6V3liNURGWXQ0QWF5MkZjJTJCcUFsZndMRHZRZHVwTUN0Z05IZzZpTTNBekJCSXNDRWpQQXVOWllEdDFTVk1OVk4zd05JMkNWY0RWR0g2UXdXVnNYVzNTR1h5RFhtVnM2SXE2JTJCbkxmT3JwSnR4Z1dXUFloZWVUVFdpS1laNVZVTXFpYXY1ZVVtZTBhMXFuN2ZjWHdReFRKJTJCTkglMkZ1TDVwa1B6OFRjaXhCUTJGT201bzBxViUyQjQyam0lMkJ2TkQlMkZvV1FDYmRGbTN6S3BjVmNJcUxQNUhyMHNNMmxndGVGSmJTMnRkaXlXbVZ6WldXQ0hxVlFxUm9YNkVFc0ZoeWhOTEw0MUdwJTJCaFoyRkpCRSUyQnB0YmclMkZBVzJnZXRXNkQlMkJvT2pzMndLZ2JNd2VpOWpXdXpNRmVLRXpEeDNienM1QkE1S09zSmdUcU1Pd0d1ajVrN2t1M0E4ZndKenVtN25BY241VHhOVTVLOHlibGdUMnpHdnBCekVrNk04M0RFZWVDZlZ1SHBySDdmVlBqaHFTT3dNRDI4ZWI2d0M1Uk1yQXV6VVJmT3ZnZWhQN0Vlc1BQZjhjTm9ZcHpQMyUyQldjbk11T1A1dmFLUnVOT0NmbnYlMkJPenFaMjdpJTJCOTQ3czclMkYzN2xycDkwRjVHRHJYZVBvMVQ4JTNEJTNDJTJGZGlhZ3JhbSUzRSUzQyUyRm14ZmlsZSUzRYZV1hcAABGnSURBVHhe7Z15XE/Z/8dflphh7CSMbTAyxjJG32/INs0kk31LjDGpoVFJpcVS9kGpJJJSljTZZS2FTNbB2BJpmSyRJaSy/JTxfZzTfD409HvknsvnVu/zePTP53PPufc8z73vz/OerXI23rEvQUkygYm6KyTnpYzAkoiahIEIaIxAJV0zjZ27NJyY4p9YK1L8E+NHuYUJvCzHJHDSqO7CJZXVAvLPjEIbA+eyWn3hek+YEghvb2/hcspqAQ4ODsRPoPFdA0+B4p90gBT/pLN7+RKwcqL4J5Xgy5cv4ejoSPFPKkAA7PeDJFAAIMtKQVAMIJNAHx8fsULKcG57e3viJ9D+LitPkgQK8KP4Jx2eSgIp/klj+Pfff3MJJH7S+LFc7PeDJFA6P56TgqAYQJJAMX4kgWL8SALF+FH8k86PJFA6O5aTJFCMH0mgOD+SQBkYkgSKQSQJFONHEijGjyRQOj+SQOnsSALF2KlyU0+gDBwpCIpBJAkU40cSKMaPJFCMH8U/6fxIAqWzIwkUY0cSKA8/6gmUgSNJoBhEkkAxfiSBYvxIAqXzIwmUzo4kUIwdSaA8/EgCZeBIEigGkSRQjB9JoBg/kkDp/EgCpbMjCRRjRxIoDz+SQBk4kgSKQSQJFONHEijGjyRQOj+SQOnsSALF2JEEysOPJFAGjiSBYhBJAsX4kQSK8SMJlM6PJFA6O5JAMXYfRAJf5OfjZvo1fq6GjZqgopaWPFetsFLeVxDMz3+BazcyeG2bfKoDLa2KCqu5PJdDEijGkSRQjN/7kkCKf2LtUhbiH0mg2D1CW8SI8WO538vq4Fs3r2O+mwNupV9D02Ytkfs4B3EHomA2dgLsnGehdp16ha78fuZddPmyIb4x6oeAdRHq7wJ8FyA1ORGey9Zi5IAeGDHaAkNMx0qq9bG4A9i59Tfk5T2Hcb+h+O77QZLKeVsmuSXwevptTHbxwrXrGWjZojFych4jMuYYrCyGYs50K9SrW6vQZdy99wD1Wxihf98e2Lnx1X/e+HVxCC5fuYrQoDkwMLKA5dhB+Gl0f8n1Zuf5yWoWtoR6oEqVjySX8++MmpZAtuu8h4cHBgwYgDZt2qgv7/Tp04iJiUFeXh569eqFHj168O9ycnKwY8cOJCQkoFmzZhg5ciRq1KghG493LUipElgUv3et3/s+Xm4JpPgn1mJKjH+bt+/Hlh0H8OLFC5gNM8b3Rt3w8ceVxSoKQNMSmJSUhO3bt+PevXswMDDgca5mzYJ/41kS4p8SJLA0/H7Iull0StJlWJsPxcwFftDr0h2JCRfQtHlLPHmSy0VwS/hqhEXEQkurkvoBCluzAovnTcPj3BycSMhQS+KKJb+CleflH4pL8edQT7s+6tVv8M4PXvy50xhqrI8fxlmj49f/xUwXayz0DUYfkyHvXNb7lsBLiX9h8KgpWO7lih7dvsL5i8lo1aIxcnOfIjLmKEJCd+L3yEBUqvSqV9U/aDNcZ/ohJ/cJ7v4Vo5bE+Z4hYOWFBc/D2fNXoFO/Dhro1H3nOj958gzbdh3EuvA9iDn4B7LSD6FG9U/euZyiMmhSAo8fP45jx45xqWMiqK+vzy8zMTER48ePx5AhQ9C2bVt4eXlh6tSpXATd3NyQkpKCcePG4cSJE0hLS0NwcDDKly8vG5N3KUiJElgUv549e75L1T7IsXJKIMU/sSZTYvzbs+8I+g2fDAeb0ejUURfu8wIwclgfzHefKFZZDUvg/fv3MXjwYB7TDA0NERkZiaysLAQGBpaY+KdpCSwtvx+ySuAIk26wd52LTv/pijFDDNG8RWs8fJDJZXDN5ij4LHSH+QR7dNLron6ABhvpYfhoC/h5zsFkl9kwHfMz/+51CZw91RY9Dfui17ffI2r3VvgscEP2oyx8P3AEnN0XonLlj3Dh7CksnO2EtJQkdO9thGlzvFCzVh1Ms/8Z5StUwLzFAbzchbOccPniOazdEiP8ELMC5OwJ7GJojnluv6Cbfkf0NpmA1q2aIvN+Fs5fTELMDn/MmOsPB5sf0PW/7dXX/nX3H3gv36wFgZg7wwrjzQvk9nUJtHZcxN9eTfoYYEvEAUyfsxxZj3JhOvQ7eMyxw0cfVcLJPxMwZfoSXEm+hj6G+vBZ6Ig6tWvgVsY92E/1xsOs7FIngZ6ensjNzUVsbGwhCVy0aBGXOicnJ85y+fLlSE5OhrOzM+/527RpE3R0dJCdnY1+/fph2bJlaN/+VZvIcmMVsxAlSmBR/JYsWVLMWn24w+SUQIp/Yu2mxPhn7+qN53l5WO7lUhALAjdhzqJVuJMaLVZZDUtgXFwc/P39sWHDBl6P1NRUmJubIzw8HOvXry8R8U/TElhafj9kk8BHjx6if6+vEHf2Kg5G78bqAB+EbjuA6D3bMW+GPf/8V3dHLohsSJbfeMmX0bd7O94DGOzvjT9PHcWGnXFvSCAbDh4+ahzaddRDv14d4DZ/CZp+1grzZ9hjov10dOv5Lbq2a4QxFjYw7j8UQcvYj3s2fos4xIeSh5qO5aLJUvjalVjqORvHL94SfojllEAmWe27jMSNy3uxKzIO3svCELtnJbbtPAg7l8X8cxaQuul3wLBBhvzaL19Jwxd6w3kP4OKloTh64jyORAe/IYFsONjix4HQ69QW7fRNsdTTifcw2jkvhpuLJb7rrQ+dlkawtTLFsIGG8FiyDtk5jxEXFaRmFJ+Qwq+vNPUEqipnbGyMWbNmqXsCra2t0bdvXy54LLGewpCQELi7u2P69OmIiopSc2F57ezs+PGaSEqUwKL4MY5KS3JJIMU/sZZVavxjvZPVq32CTxtp8wqO+dkd//f8OTatXShWYQ1LYGZmJp/a0rx5c16PPXv2wM/PD7t371bHM6XHP01LYGn5/ZBNAhPiz8JjtjPvYXOyGYv2X+lxKfP1mMV77Zi49f+mE9ZtiUat2gXDkuw71ivH5gKe+/MPsDfp2FMpaNS4WaGeQJUEXk1N5qLI5I4lNtePzcHJzclGyAof/H4mDeXKlUNa6hX06dYWxy6k83O6L1iKvv2H8TyH9u/F+B8GIOl2vvBDLKcEnjmfCKcZvjiwawUPNP/p3Ba2E0zhPj8AWY9ysNTDCR26mvHv69YpmLfBvjt3IYnPBTxxKh7sTTrt4k40a9KwUE+gSgKTUq5zUVTJ3f7Yk2BzcLJzcuHltx7XL+3h/FhvoO7XQ5GRvI8PI7NUliRw4MCBmDx5Mnr37s3rzrr9XVxc4OrqirCwMP6nSpaWljAxMeFDK5pISpTAovix3gelJbkkkOKfWMsqPf6xl2KHqd4IXrcDR2NCCo3GSK25pucEsutmIhUREQHWS29ra4vhw4ejpMQ/pUpgSeHH2l/WhSH37mRg5ICeOPBHEuZMs0OVKlUxxsIaxt2/xET7aahYUQtHDkUjOHwvf2bYJFuDDo3x7NlTPg8w7/lz3M5Ih4v7IlhMdHyrBB4+uA+162rD/VffQs8dO9/6kOVvPIu7D53HL2MHw2KiA0aNteLfR+7agkC/RdgefUrqs1son1zDwRm3M/kCjtQLO2Dr5IGqVT7mEtim8zDMcLbkq4P37T+OqO1+//D7Gw0/N8bTp8/4PEA2ZJF+8y4859lhyqQxb5XAqP3HoV2vFvw8nQvVgZ1v2cpNb/CIP7ERX37RosxJIBvyZX+DBhUsIGLDxUz8zMzMwIYAXu8JHD16NGxsbNCly6spDrLcWMUsRIkSWBS/VatWFbNWH+4wuSSQ4p9Ymyk5/rE51cZDbPFpQ20+x1r382Zilf0nt6YlkPUEshfb9PR0/pLbtWtXfmUlJf4pVQJLCj/ZJZAVyHrdZi9chlp16mCWiw2/oZjQsdXCbIHIXM8VqN+gEf/8j2O/83mDIRsiUbFiwfYnu7aF4+zpE9gbd+GtEphxMx2X4s/Af822AjE5dxq3b6WDvYUfjt2H9dsP8s/z8/KQnJiAdl91hqWZCb7s0BlObgv4d2zV8dW/UvjiEDmSXBLIroX19Pl7u/KevokOBcMNTOgmuyxGqxZNsNJ3Gho1LBiWOHT4Tz5vcF/EMlSsUIF/9tvmKBw/GY+Ek5veKoE30u+AvXFHhHvx40+duYT0mwWfMcE8tDeQf56Xn4+Ll1Kh1+kL9SKUstQTyHoBdXV1YWVV8OIQGhrKAyXr8WPCx4ZOqlWrhmfPnsHIyIjPo2nUqOC+/tBJiRJYFD+2uEZpSS4JZPWi+CfWukqMf8mpN9DF8Cc+bYbNx65QQb4FYJqUwMePH/NeoAYNGvC5zlWrVlU3XkmJf0qVwJLCjzW4rD2BXCpOHIarnQXf1uX1xR9sz6yNYat4j59qPuB0h/HIzs6C36pXPVBM5gZ/p4fdsedwYN9O9epg1XBw6zbtMGbotwj+bQ8+a9Ua5qbGfMhZu35DjBvZl688btexM1Yt90LYan8cOXcdG0IDsXj+dEQejsftWzcxydIUtlPc1HMExcKWvAtD4o6egfkvsxEaNLfQcAPbMytozXbe46eaD2hpM5cPE7MtW1SJyRxbKHLh+Abs3BunXh2sGg5u17YlvjGxQuQ2P/42azTQms8DbNigHvoMsuErj9m8QU/fdVgetBk3rzBBLxDMsiSBbNuElStXcvm7e/cunwvIJk2z+X9snsyIESP42/Lq1asRHR3Nt1mg1cGvnqSi+KnmGIk+c3Lml1MCKf6JtYwS4x97GU9MuoogvxnqyjERbPlZY7HKanhOINv+iu16wOYBVq78arsbJoVsXmBJiH9KlcCS9vsh25xA1RPBVgJPtbfg28B83qYdHmU9QGpSIl+xO2GSCxfBp0+foEPz6li6aqNaCll+tudOz07NMXz0OGhpab2xT+Cg4WP4at9tG9fy07G9BX2DNvDVwWzVb0iAD/+8Tl1t+ASEQd+gN+8VnPSzKfZH7eTfsbmB3gFhqPBP75nokyxnTyC7lvPxSRg3cQ7vgWPS9uDhI77fH1uxO9XRnIsg27alqo4BNq9bpJZCFb8mX5jA4sdBqKRV8Y19An80M4GF9VysCdvFq832FmQTnNnqYMdpPnwxCkva9WojPGQ+vumpp8bDegbZopJHN39H9Wqv3hpF+WlyixjVtf97YUh+fj4XvyNHjvBD2NzAmTNnctE7e/YsnzjNUpUqVfiqYk2tDGbXoMSewP+Pn+j9Ind+OSWQXRvFP7EWUlr8a91pCNhc6tdTtU+qIPuW+PxWTfYE+vr6YuvWrW80Fnuxbdq0aYmIf0qVwJL2+yG7BKruKrbv341raahdpy60dRqKRYZ/5c56eB/ly1dA9RoFCyRU6cH9e8i8dxdNm7fgYvh6upNxk4tfXW0dWa9FbglUXRzb9++vtHQufaynTs50/8EjPqxRs0a1QsXey3yIO3cf8LdcJoYfIilBAouqJ9tEld0ztWvXLnQI20A6IyODDwHL9TIhlbUSJVBVl6L4Sa3r+8gntwRS/JOnlcpC/NOkBBanlZQe/5QigSX99+O9SWBxbrLScMz7ksDSwKY4dVCyBBbn+jV9jJIlUNNsinP+9yWBxTl3aTiG4p/0VlS6BEqv2YfJqXQJ/DAUxM4i+5xAscspmbkpCIq1G0mgGD+SQDF+JIFi/Cj+SedHEiidHctJEijGj+UmCRRnKOt/DJHhckpcESSBYk1GEijGjyRQjB9JoHR+JIHS2ZEEirFT5SYJlIEjBUExiCSBYvxIAsX4kQSK8aP4J50fSaB0diSBYuxIAuXhx0uhICgGkyRQjB9JoBg/kkAxfhT/pPMjCZTOjiRQjB1JoDz8SAJl4EgSKAaRJFCMH0mgGD+SQOn8SAKlsyMJFGNHEigPP5JAGTiSBIpBJAkU40cSKMaPJFA6P5JA6exIAsXYkQTKw48kUAaOJIFiEEkCxfiRBIrxIwmUzo8kUDo7kkAxdiSB8vAjCZSBI0mgGESSQDF+JIFi/EgCpfMjCZTOjiRQjN0bEihPcWWzlIm6K8pmxWWq9ZKIwv/1RaZiqRgiUCwClXTNinUcHfR2AhT/xO4Min9i/Ci3OIH/AQbituCsIrsLAAAAAElFTkSuQmCC"},81613:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/type_index-7d73c323ed94d760c7913a71bb3752be.png"},79525:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/write_path-4491f189ec9042b252c1b632b86d4336.png"},77635:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/write_transaction-6f6c3844fe612478890f193c06d1af99.png"},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/d54033d7.c48d9f51.js b/assets/js/d54033d7.35e84140.js similarity index 65% rename from assets/js/d54033d7.c48d9f51.js rename to assets/js/d54033d7.35e84140.js index 3821849a1..e7aff0abf 100644 --- a/assets/js/d54033d7.c48d9f51.js +++ b/assets/js/d54033d7.35e84140.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9855],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),s=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(n),f=a,m=d["".concat(i,".").concat(f)]||d[f]||u[f]||o;return n?r.createElement(m,l(l({ref:t},p),{},{components:n})):r.createElement(m,l({ref:t},p))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=f;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[d]="string"==typeof e?e:a,l[1]=c;for(var s=2;s{n.r(t),n.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>c,default:()=>y,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"content",title:"Content",hide_table_of_contents:!1},c=void 0,i={unversionedId:"build/api/schema/scalars/content",id:"build/api/schema/scalars/content",title:"Content",description:"The [Content] scalar type represents transaction content. Depending if the content can displayed",source:"@site/docs/build/api/schema/scalars/content.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/content",permalink:"/build/api/schema/scalars/content",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"content",title:"Content",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Boolean",permalink:"/build/api/schema/scalars/boolean"},next:{title:"Float",permalink:"/build/api/schema/scalars/float"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},b="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ","[Content]"," scalar type represents transaction content. Depending if the content can displayed\nit will be rendered as plain text otherwise in hexadecimal"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Content\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,o.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9855],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),s=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(n),f=a,m=d["".concat(i,".").concat(f)]||d[f]||u[f]||o;return n?r.createElement(m,l(l({ref:t},p),{},{components:n})):r.createElement(m,l({ref:t},p))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=f;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[d]="string"==typeof e?e:a,l[1]=c;for(var s=2;s{n.r(t),n.d(t,{Badge:()=>f,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>s,contentTitle:()=>c,default:()=>y,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"content",title:"Content",hide_table_of_contents:!1},c=void 0,i={unversionedId:"build/api/schema/scalars/content",id:"build/api/schema/scalars/content",title:"Content",description:"The [Content] scalar type represents transaction content. Depending if the content can displayed",source:"@site/docs/build/api/schema/scalars/content.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/content",permalink:"/build/api/schema/scalars/content",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"content",title:"Content",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Boolean",permalink:"/build/api/schema/scalars/boolean"},next:{title:"Float",permalink:"/build/api/schema/scalars/float"}},s={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:p,Bullet:d,SpecifiedBy:u,Badge:f},b="wrapper";function y(e){let{components:t,...n}=e;return(0,o.kt)(b,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ","[Content]"," scalar type represents transaction content. Depending if the content can displayed\nit will be rendered as plain text otherwise in hexadecimal"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar Content\n")),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,o.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/d5f21d1f.b0a9b54e.js b/assets/js/d5f21d1f.564ce54c.js similarity index 71% rename from assets/js/d5f21d1f.b0a9b54e.js rename to assets/js/d5f21d1f.564ce54c.js index 7f4cebf32..97d398689 100644 --- a/assets/js/d5f21d1f.b0a9b54e.js +++ b/assets/js/d5f21d1f.564ce54c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8544],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(r),f=a,b=u["".concat(l,".").concat(f)]||u[f]||d[f]||o;return r?n.createElement(b,i(i({ref:t},p),{},{components:r})):n.createElement(b,i({ref:t},p))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));r(8209);const o={id:"js",title:"Javascript SDK"},i=void 0,c={unversionedId:"build/sdk/js",id:"build/sdk/js",title:"Javascript SDK",description:"Archethic Blockchain Official Javascript SDK is available on Github",source:"@site/docs/build/sdk/js.md",sourceDirName:"build/sdk",slug:"/build/sdk/js",permalink:"/build/sdk/js",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"js",title:"Javascript SDK"},sidebar:"docs",previous:{title:"Go SDK",permalink:"/build/sdk/go"},next:{title:"Smart Contracts",permalink:"/build/smart-contracts/"}},l={},s=[],p={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic Blockchain Official Javascript SDK is available on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/libjs"},"Github")),(0,a.kt)("hr",null),(0,a.kt)("p",null,"This SDK will help you to generate transaction on top of Archethic Blockchain."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"The ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb-cli"},"AEWeb")," product is using this SDK to build transaction to deploy web hosting assets in the Archethic Blockchain. Please have a look")))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8544],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(r),f=a,b=u["".concat(l,".").concat(f)]||u[f]||d[f]||o;return r?n.createElement(b,i(i({ref:t},p),{},{components:r})):n.createElement(b,i({ref:t},p))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));r(8209);const o={id:"js",title:"Javascript SDK"},i=void 0,c={unversionedId:"build/sdk/js",id:"build/sdk/js",title:"Javascript SDK",description:"Archethic Blockchain Official Javascript SDK is available on Github",source:"@site/docs/build/sdk/js.md",sourceDirName:"build/sdk",slug:"/build/sdk/js",permalink:"/build/sdk/js",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"js",title:"Javascript SDK"},sidebar:"docs",previous:{title:"Go SDK",permalink:"/build/sdk/go"},next:{title:"Smart Contracts",permalink:"/build/smart-contracts/"}},l={},s=[],p={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Archethic Blockchain Official Javascript SDK is available on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/libjs"},"Github")),(0,a.kt)("hr",null),(0,a.kt)("p",null,"This SDK will help you to generate transaction on top of Archethic Blockchain."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"The ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeweb-cli"},"AEWeb")," product is using this SDK to build transaction to deploy web hosting assets in the Archethic Blockchain. Please have a look")))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/d781e8a6.12606073.js b/assets/js/d781e8a6.4cf755b3.js similarity index 56% rename from assets/js/d781e8a6.12606073.js rename to assets/js/d781e8a6.4cf755b3.js index 3b9912677..de1e231b3 100644 --- a/assets/js/d781e8a6.12606073.js +++ b/assets/js/d781e8a6.4cf755b3.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4552],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),l=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(i.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=l(n),f=a,m=u["".concat(i,".").concat(f)]||u[f]||p[f]||o;return n?r.createElement(m,c(c({ref:t},d),{},{components:n})):r.createElement(m,c({ref:t},d))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[u]="string"==typeof e?e:a,c[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"examples",title:"Smart Contract examples",sidebar_label:"Examples"},c=void 0,s={unversionedId:"build/smart-contracts/language/legacy/examples",id:"build/smart-contracts/language/legacy/examples",title:"Smart Contract examples",description:"Recurrent transfer",source:"@site/docs/build/smart-contracts/language/legacy/examples.md",sourceDirName:"build/smart-contracts/language/legacy",slug:"/build/smart-contracts/language/legacy/examples",permalink:"/build/smart-contracts/language/legacy/examples",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"examples",title:"Smart Contract examples",sidebar_label:"Examples"},sidebar:"docs",previous:{title:"Legacy",permalink:"/build/smart-contracts/language/legacy/"},next:{title:"Language",permalink:"/build/smart-contracts/language/legacy/language"}},i={},l=[{value:"Recurrent transfer",id:"recurrent-transfer",level:2},{value:"ICO / Crowdfunding",id:"ico--crowdfunding",level:2}],d={toc:l},u="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"recurrent-transfer"},"Recurrent transfer"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'# Send 1.0 each to the given address each month\n\ncondition inherit: [\n type: transfer,\n uco_transfers: %{\n "0000D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CCA" => 100000000\n }\n]\n\nactions triggered_by: interval, at: "0 0 1 * *" do\n set_type transfer\n add_uco_transfer to: "0000D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CCA", amount: 100000000\nend\n')),(0,a.kt)("h2",{id:"ico--crowdfunding"},"ICO / Crowdfunding"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"\n# Ensure the next transaction will be a transfer\ncondition inherit: [\n type: transfer,\n token_transfers: size() == 1\n # TODO: to provide more security, we should check the destination address is within the previous transaction inputs\n]\n\n# Define conditions to accept incoming transactions\ncondition transaction: [\n type: transfer,\n uco_transfers: size() > 0\n]\n\nactions triggered_by: transaction do\n # Get the amount of uco send to this contract\n amount_send = transaction.uco_transfers[contract.address]\n\n if amount_send > 0 do\n # Convert UCO to the number of tokens to credit. Each UCO worth 10000 token\n token_to_credit = amount_send * 10000\n\n # Send the new transaction\n set_type transfer\n add_token_transfer to: transaction.address, token_address: contract.address, amount: token_to_credit\n end\nend\n")))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4552],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),l=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(i.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=l(n),f=a,m=u["".concat(i,".").concat(f)]||u[f]||p[f]||o;return n?r.createElement(m,c(c({ref:t},d),{},{components:n})):r.createElement(m,c({ref:t},d))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[u]="string"==typeof e?e:a,c[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var r=n(87462),a=(n(67294),n(3905));n(8209);const o={id:"examples",title:"Smart Contract examples",sidebar_label:"Examples"},c=void 0,s={unversionedId:"build/smart-contracts/language/legacy/examples",id:"build/smart-contracts/language/legacy/examples",title:"Smart Contract examples",description:"Recurrent transfer",source:"@site/docs/build/smart-contracts/language/legacy/examples.md",sourceDirName:"build/smart-contracts/language/legacy",slug:"/build/smart-contracts/language/legacy/examples",permalink:"/build/smart-contracts/language/legacy/examples",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"examples",title:"Smart Contract examples",sidebar_label:"Examples"},sidebar:"docs",previous:{title:"Legacy",permalink:"/build/smart-contracts/language/legacy/"},next:{title:"Language",permalink:"/build/smart-contracts/language/legacy/language"}},i={},l=[{value:"Recurrent transfer",id:"recurrent-transfer",level:2},{value:"ICO / Crowdfunding",id:"ico--crowdfunding",level:2}],d={toc:l},u="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"recurrent-transfer"},"Recurrent transfer"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'# Send 1.0 each to the given address each month\n\ncondition inherit: [\n type: transfer,\n uco_transfers: %{\n "0000D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CCA" => 100000000\n }\n]\n\nactions triggered_by: interval, at: "0 0 1 * *" do\n set_type transfer\n add_uco_transfer to: "0000D574D171A484F8DEAC2D61FC3F7CC984BEB52465D69B3B5F670090742CBF5CCA", amount: 100000000\nend\n')),(0,a.kt)("h2",{id:"ico--crowdfunding"},"ICO / Crowdfunding"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"\n# Ensure the next transaction will be a transfer\ncondition inherit: [\n type: transfer,\n token_transfers: size() == 1\n # TODO: to provide more security, we should check the destination address is within the previous transaction inputs\n]\n\n# Define conditions to accept incoming transactions\ncondition transaction: [\n type: transfer,\n uco_transfers: size() > 0\n]\n\nactions triggered_by: transaction do\n # Get the amount of uco send to this contract\n amount_send = transaction.uco_transfers[contract.address]\n\n if amount_send > 0 do\n # Convert UCO to the number of tokens to credit. Each UCO worth 10000 token\n token_to_credit = amount_send * 10000\n\n # Send the new transaction\n set_type transfer\n add_token_transfer to: transaction.address, token_address: contract.address, amount: token_to_credit\n end\nend\n")))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/dae7efd3.87de938f.js b/assets/js/dae7efd3.87de938f.js deleted file mode 100644 index 35f14765e..000000000 --- a/assets/js/dae7efd3.87de938f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8682],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var i=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),c=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},d=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},g=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=c(n),g=a,m=p["".concat(l,".").concat(g)]||p[g]||u[g]||r;return n?i.createElement(m,s(s({ref:t},d),{},{components:n})):i.createElement(m,s({ref:t},d))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,s=new Array(r);s[0]=g;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:a,s[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var i=n(87462),a=(n(67294),n(3905));n(8209);const r={id:"bridge-front",title:"Bridge - Application Front End",sidebar_label:"Bridge Front End",sidebar_position:4},s="Bridge Front end - Tutorial",o={unversionedId:"participate/bridge/usage/bridge-front",id:"participate/bridge/usage/bridge-front",title:"Bridge - Application Front End",description:"Currently, the two-way bridge is available exclusively on the testnet.",source:"@site/docs/participate/bridge/usage/bridge-front.md",sourceDirName:"participate/bridge/usage",slug:"/participate/bridge/usage/bridge-front",permalink:"/participate/bridge/usage/bridge-front",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:4,frontMatter:{id:"bridge-front",title:"Bridge - Application Front End",sidebar_label:"Bridge Front End",sidebar_position:4},sidebar:"docs",previous:{title:"Usage",permalink:"/category/usage-1"},next:{title:"Archethic's CLI",permalink:"/participate/cli/"}},l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Welcome Screen",id:"welcome-screen",level:2},{value:"Application Menu",id:"application-menu",level:3},{value:"Feature Access",id:"feature-access",level:3},{value:"Bridging Your Assets",id:"bridging-your-assets",level:2},{value:"Step 1: Initiating Transfer",id:"step-1-initiating-transfer",level:3},{value:"Step 2: Confirming Details",id:"step-2-confirming-details",level:3},{value:"Step 3: Executing Transfer",id:"step-3-executing-transfer",level:3},{value:"Local History and Management",id:"local-history-and-management",level:2},{value:"Options Include:",id:"options-include",level:3},{value:"Transfer Status Actions:",id:"transfer-status-actions",level:3},{value:"Refund Process",id:"refund-process",level:2}],d={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,i.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"bridge-front-end---tutorial"},"Bridge Front end - Tutorial"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Currently, the two-way bridge is available exclusively on the testnet.")),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"The Archethic Bridge application is exclusively available as a web application accessible through internet browsers.")),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"The application is compatible only with the desktop versions of the Archethic wallet, which include macOS, Linux, and Windows platforms.")),(0,a.kt)("p",null,"Ensure that you have the appropriate desktop version of the Archethic wallet installed on your system to interact with the application effectively. The Archethic wallet can be downloaded from ",(0,a.kt)("a",{parentName:"p",href:"https://www.archethic.net/wallet/"},"here"),"."),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"For optimal performance, it is recommended to use the latest version of your internet browser and keep your desktop wallet updated.")),(0,a.kt)("p",null,"Access: ",(0,a.kt)("a",{parentName:"p",href:"https://bridge.testnet.archethic.net"},"https://bridge.testnet.archethic.net"),(0,a.kt)("br",null),"\nSource code: ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/bridge"},"https://github.com/archethic-foundation/bridge")),(0,a.kt)("p",null,"This Flutter-built web application enables seamless asset deposits and withdrawals."),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Before proceeding, familiarize yourself with ",(0,a.kt)("a",{parentName:"p",href:"/participate/bridge/"},"Archethic's Bridge Key Concepts"),".")),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"To bridge, you must first configure your EVM wallet for the testnet networks with which you wish to interact, as well as obtain funds.\nWe recommend consulting the testnet-related information in the ",(0,a.kt)("a",{parentName:"p",href:"/FAQ/bridge-2-ways#testnet"},"dedicated FAQ section"),"."),(0,a.kt)("h2",{id:"welcome-screen"},"Welcome Screen"),(0,a.kt)("p",null,"Upon accessing the Archethic Bridge application, you are greeted with a welcome screen. To begin, click on the 'Bridge' button."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Welcome Screen",src:n(11126).Z,width:"1626",height:"1014"}),(0,a.kt)("br",{parentName:"p"}),"\n",(0,a.kt)("img",{alt:"Bridge Button",src:n(87785).Z,width:"1624",height:"1010"})),(0,a.kt)("h3",{id:"application-menu"},"Application Menu"),(0,a.kt)("p",null,"A right-hand header menu provides links to essential information and application documentation. It includes an option to send logs to Archethic for troubleshooting purposes."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Menu",src:n(55273).Z,width:"374",height:"343"})),(0,a.kt)("h3",{id:"feature-access"},"Feature Access"),(0,a.kt)("p",null,"The left-side menu grants access to various bridge functionalities:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Bridging between Archethic and EVM blockchains"),(0,a.kt)("li",{parentName:"ul"},"Viewing local history, resume or refund options, and transaction logs"),(0,a.kt)("li",{parentName:"ul"},"Refunding")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Menu Features",src:n(14136).Z,width:"338",height:"300"})),(0,a.kt)("h2",{id:"bridging-your-assets"},"Bridging Your Assets"),(0,a.kt)("p",null,"The bridge process involves multiple steps:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Inputting information to initiate the transfer"),(0,a.kt)("li",{parentName:"ol"},"Confirming the entered details"),(0,a.kt)("li",{parentName:"ol"},"Executing the transfer, with progress tracking and transaction signing in both EVM and Archethic wallets")),(0,a.kt)("h3",{id:"step-1-initiating-transfer"},"Step 1: Initiating Transfer"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Transfer steps remain consistent across all blockchain types and directions.")),(0,a.kt)("p",null,"Firstly, select the originating and target blockchains."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Blockchain Selection",src:n(71353).Z,width:"712",height:"451"})),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"Ensure both Archethic and your chosen EVM wallets are connected before blockchain selection. Refer to the ",(0,a.kt)("a",{parentName:"p",href:"/category/faq"},"FAQ")," for connectivity issues.")),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"Choose a testnet blockchain for testing purposes.")),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"Select an EVM blockchain as the source automatically sets Archethic as the target.")),(0,a.kt)("p",null,"Post-selection, a field appears for token selection from available options."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Token Selection",src:n(18962).Z,width:"652",height:"285"})),(0,a.kt)("h3",{id:"step-2-confirming-details"},"Step 2: Confirming Details"),(0,a.kt)("p",null,"On the confirmation screen, review:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Entered information summary"),(0,a.kt)("li",{parentName:"ul"},"Fee details"),(0,a.kt)("li",{parentName:"ul"},"Post-fee token quantity")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Confirmation Screen",src:n(17337).Z,width:"679",height:"629"})),(0,a.kt)("h3",{id:"step-3-executing-transfer"},"Step 3: Executing Transfer"),(0,a.kt)("p",null,"A transfer tracking popup guides you through the process, prompting for transaction confirmations in your wallets."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Transfer Tracking",src:n(83513).Z,width:"641",height:"448"})),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Transaction signing methods vary per EVM wallet.")),(0,a.kt)("p",null,"In the Archethic wallet, confirmation prompts automatically appear when necessary."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Archethic Wallet Confirmation",src:n(87310).Z,width:"381",height:"807"})),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"The transfer process halts if a transaction is declined or due to insufficient funds. However, it can be resumed later.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Transfer Resumption",src:n(59686).Z,width:"650",height:"453"})),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"HTLC contract addresses are provided for ongoing process tracking.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"HTLC Information",src:n(36064).Z,width:"589",height:"109"})),(0,a.kt)("h2",{id:"local-history-and-management"},"Local History and Management"),(0,a.kt)("p",null,"View transfer history, successful or otherwise, through the application's local history feature."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"This history is local to your device. Access is not available on other devices.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"History List",src:n(31411).Z,width:"1360",height:"581"})),(0,a.kt)("h3",{id:"options-include"},"Options Include:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Deleting local history"),(0,a.kt)("li",{parentName:"ul"},"Filtering history entries")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"History Filters",src:n(49751).Z,width:"1391",height:"178"})),(0,a.kt)("h3",{id:"transfer-status-actions"},"Transfer Status Actions:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Remove transfers from local history"),(0,a.kt)("li",{parentName:"ul"},"Resume interrupted transfers"),(0,a.kt)("li",{parentName:"ul"},"Refund for interrupted transfers"),(0,a.kt)("li",{parentName:"ul"},"Access transfer technical details for Archethic team analysis")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"History Options",src:n(81914).Z,width:"137",height:"50"})),(0,a.kt)("h2",{id:"refund-process"},"Refund Process"),(0,a.kt)("p",null,"Retrieve your funds through the refund feature."),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Manual refunding is unavailable for Archethic-blocked funds, as it is automatic.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Refund Form",src:n(98545).Z,width:"678",height:"621"})),(0,a.kt)("p",null,"Upon wallet connection and address confirmation, refund eligibility and amount are displayed. Validate the refund to receive your funds, minus transaction fees."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Refund Process",src:n(62779).Z,width:"673",height:"206"})),(0,a.kt)("hr",null))}u.isMDXComponent=!0},87310:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-AEWallet-confirm-d858839f2ee6615e3afdb6ad71db00ad.png"},71353:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-BC-Selection-d7d9ff6f3b9f87fd39c406ad28c5ce97.png"},87785:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Bridge-3c59e46488ee3fbc820c4377cb94b03d.png"},17337:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Confirmation-e8df6d18d609d2d5ceea7c58edfb47b1.png"},49751:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Filters-2f3b307bf3d8271e9e5e84b7a7fe95ae.png"},36064:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-HTLC-infos-59f9d07b6fd6d7fefb2eb74d772575ba.png"},81914:(e,t,n)=>{n.d(t,{Z:()=>i});const i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIkAAAAyCAYAAABoKfh/AAAAAXNSR0IArs4c6QAAAGJlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAABJKGAAcAAAASAAAAUKABAAMAAAABAAEAAKACAAQAAAABAAAAiaADAAQAAAABAAAAMgAAAABBU0NJSQAAAFNjcmVlbnNob3TsLabyAAAB1WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj41MDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMzc8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpVc2VyQ29tbWVudD5TY3JlZW5zaG90PC9leGlmOlVzZXJDb21tZW50PgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4K0pIUWgAAFFtJREFUeAHtXHm0VsWRrwc89k12RAQEBVQWl0FxQyAbqCQ6LiFRYxxl4jEJSZjEzMQYj8YsGuNxjIOOJgoRNYaYo3HUIy5kNBGVCagsAQVEZFEE2Xd4U7+6/etb9777vfe9h//M+PXh3a6u+lV136q6fbv7flo1etD0GpEqsVKjZCyBZ5XyvcjwgWFyvVizJsKqwKcOacOGDrwMLLaDmCyqeLHxgk3yrb+g62/D881mUCjFd91/osmNu16W1dt+L62b9ZVmMUEQJXjOnIhL8CYqRgpus+C4ZACPUVFZVVAz9bwesCwqMzXFRxgI6isZ+aCJh76ngwxslkwC0J43BiD4sEMadaVED3RqOVJaNu0pq7b+VpqYlxCt6C0jIjiJlHoTTjZHJ7Q1rZ1CExsmSbEwR5OeDua8CeYaLVLN2tog1nBseHDOfuxXMfmEzNimjUqd8UDr6r7Sr8NVmiQZTzpMiHXKyTHscc1HStE5WKpfB+XN5PTzwfTQkhZ9sqhCTVCiLc40TJySdioCad60iyYJPGZ/9Ehos2l1cK85n7TWfPQRBP1LJAYK2gHrWsYJbATPI2DGSmDGYIIZ+kBt/AIMWLTnaVMNxpkwtG39VS51ekBnEpYqF2TwgldNHGguOBgJyBgNrb2GiXI4ysmGOeNpDR75noYdK8DgLzShR12wLM+VYcE3QQA6Y0wu5nZARF22K3XWAy5JgtO9gy0MZDA8WQNBK2XmYVCnCU/mcamFJNCuDZJw5mlGTGGGWX7Dku8gbZTf2/89ZCZJso+h91qgPQv3mkuAePsBV2pKz/BdAkV9mA58L/Z07JtMNzbOFGZD5RCRV6sP6ntBhc54QLfAvqg7zdnqOXjYaL3AkUYHrHdskfdp0uuQh9rxoW7BJA817StNtmOlzGCTstBMhg5d/YNtyjlUa8MwBVSs1IUeCFtglTEaBoOHHd7Txq7Hu0GcVVMm+FR1NIPneoykg6W6UeoI2nUskLCNcXAseVi+nVOvNNUDYQvs3Ui/KM88WMqNgV9KHMwwODE5wHc6Nouwy5zMsyPNbrUGac3Ai5gSRMQSHwZXawwl9D+p7GbJXJ+/fSZIDHEKMAcrnyK06XSgwMef8iLbCD2lpQ5wodjrQOWUWU1d6FHHbOSSIvBoy2rFRxWV067JPJ4yBVeSJOPBWo0wkzi+ORIedDwjlWfeBAB0UiVEwFIHMhTW4CMYxkwvMTh5Ge2k0GywwQ82a4/TKeVIJAz/IGL/mUTK6VSaeN1knF0QHUaWNbxWC6ZC8jyuwMMIDCBFsCKe766sYNII64IxeBYTxfMqdNYDYXcTImyVXuBgBh34jMMd1vhog/BKVEg/BMIMICbRiwXc9wEx5MoDu1RCkJ8JrrcDG9YJOkyLsQr4QABPu6lGhaIHQpI47/nTKpxhm8jCluhYQMB3kfEeNnaQAWb67K52nRGrmrOadJ1T8fIIViMcAux5murQ8zLyK3X9HkhnkhhNc2VOM/B8hDydQ/fs3VZuuONMOaxve2naDLoi+/YekIXz18t3L382h9ZmgXmAGFivwNEhERLLaVJc8e3j5MRTekr3Q9tIqzbVprZj+15Z9942eeXF1TL9V294Ux87fcFlg+WMzxwufQd0lN2798vvfrNIfn/foo+1n3H/OEDGntVXDj+ig7TWe2zRsmnqCPakvtm9a7/g3t9dvlme/dMKefqPyyhtcF2V/OiIetHtSYQQhsgKWYF2IKkVMWCo7NvXnyTjLzhSZj22XHbt3Gew9oe0kDHj+8q9v5wnD96zIGtDbfLpp02+Ati99cF+HR7yUeP6yKQpx0uPXm1l7aqtslIds/HDXTaLde7aSvr072CyVSu2yNSfz5U5f17NbjJ1fgwZYYnG8BHd5fMTB8qQE7pJ526ttN+dsvj1Dy2I7Tu2kC+MfKSEZsPZU244WT53bn/ZumWPrFi6yfravm2v1BygYxKbVU2qpE3baunUpZUccVRHadu+uSXJrdfNaXinqqEzCTwOXVzwB7fjL9uxMpLi2YBZIZEIMYNs2bRbHnt4iTRv3lRnkyayXW/s5FG9pP+gTmaaZjiBWVLAFgVKmsy1bahoO96lXx8qX/ynY2Sb2v/3G1+Vxx5aAiuxMPATrzxGLrzsaLn2F6fLA3e9KQ//emFMTI4hKpVBfEX7Pf1TOmsc2dFmyWVLPpKZ0xfLw/cuNO3LJw+XS64aIoOGdJa/v7mhDIt1Q86+8Ej53Hn95Y3XPpAffn22zRJ1ayRSzDY/vvNMS66F89Y3akZJXjeWEyHQMd6BQEDIi6NSRuAd1red/OCW06SDzhQtWzXT6a+ZtGqdmJ36yPioQWL0+D5y0qgv2nS4a8c+2bJ5t1z3jdmyft2OTPCJj7VLDPLG6LSLBMEMceOUF+W9d7YkooIxP3TPQpk3Z518/2enysVfGyIrl22Wv77wXkk8+yiqb753rJx46qGybvU2eUZny5nTFstyTRJf+HQ3b6Gvg4+hYBbetnlPgxIE3eKVc+3Vs2XGM1+QT53Tr7FJEjwaEyFEwx5tRiYKY3L4+96j77+1q7bJ9q17ZIcGfpvWeLIP6DR4YL/+aV1d3dSSp7m+Q5Hd7XQKbNOuWmeLKmlWrTtxdhUMo21DCG03gtj1ld85zvr50eQ/y1pdd2QwsKcMP0ss0Sf6Z9//i/z07jFy1TUnpEkSLdZPYLpHgjz+8FJ5+tG3ZeCQLoJXDv586dWnnTWHj+ghAwZ3ko3rd8rsp1d6SIPo3v3ay3J9xSDoDS3QgS7WMY0pzZKpO0QIXmaw/O4lMilP8Xh6J1/yTOibyrkmo0ex74cmtc7DYMWCXKD3te+dIN17tpHb9RWDBKUygn/qmN6ySxP3v59ZKdPCYpUJh6l/5v2L5QpNsK9cPVSm/0eymM0nKfouKoOGdlEf1cjAYzvLOfoKaNKUoy5Ci3z1m8OiYPKGXfLHGUtin1FQBoEHa8N6nW1DOfb4brLgbx+wWW+NtRLG3JiSrEliEugNxwAyMjBb5AiVR0iNOR3vzPNPn1l7HMDlTMx86Xx9EpfZQpYKBbDYh3UV+xM5/uQesvrdrboGWWrqyGnsLM67ZLCt6Js3b6JJMEzO+PTh8pCuE557YkW8txn/uUAmTDxKRpzRywJWboKgo2a6vsLCsN+RHXTNtVTXCO/LXt25FZVqHcPePYkMO64JFx1l65RNG3fZTFSkU4qH19aO7ckmAJhbfj3WXnd3/mSuzP3r2lJqkY8Fru2EIqd8Qr/dKNh+0+cikAuomcvzcjrI9EM6tUyCSqzZLh4MsC3D2oVPuSVdHTq0BHyPXm3kdQ2QzTQQ6PCHn9TDIFO+Oks26e7m8m8Nl/HnD5BrfnKKDD2xm9x2/SsxWbEm6T/okPQ1V0a/MN6leyvr40Fd40y/s2Fb6ueffEfuefQsW0TiddWgouPjOgd6WHxfdPnR8i8/HinXTHpOVr69uU5zpot7bERJF65UtlzRS8YgmJ4BOdr4MwXZqgtQPGGcBk8d21uOGHgIrVr9xtz3Zf6r78tQ3S4Ci3ULzZp1vfCptsRxw0h7SjA4B/nw/Z1mFzqQV+tOCucxSBCU39w+33YbN00dLePOG6CLzBWyYN4Hht2gawRsW1HYlzXquXTt3toQTJAb7hhV6z4BwFrsET0jeeKRt6LFTfq6WaWv50N7J+uVKGgEMePuBTqTbJfvapJcetVQW7g3wkxZKpokSZATdPA2WMZW18P7RYXRhEwxW3TljdLzsLb2rsRT3E+3h77Mf2WdJsksO7MAf8tHu5N+XB8grXvrP2gHJmEQYcHLklLkhFqBmGYX/G29DPuH7sksoDxvOqdRb3Ozbu19wa4M5xD5giTBYhXl818aKN+6bkQGgi05dlwHU2p8DA7GUD26YU0ClHNdCIrpgu3bYOajohguqjp21leOlimXzRKsyH15c27yFHfEa0kLnuZ6C/tyYwC5Y9se6aKHVxw2hgmnNcEPMoMO+vnmD0fIKaMPsy3q7KdWxu5w0MSdQkN8/dQfliUzYLB0x02vRZulCCYIXgn79h0QnEiPHtf3oJLky5OOlQv1dbP5o10yfWry2sOZjJ+9sS3/OM5okteN3R2jEDyMlaB5L7QZDXoiw67SxeJWk7TrkDxVmFqxQIsFUQwFJ5EoON+oq3CyMFW9WDvYWbdmux1kQZ+mcW6BVw52OC1aNLOFLLbZr7y4Rn75ozmJfugQp7CYrms9AHUNSGWzHl9uW/rfvXCe3K87p6f+8HY9Gon4g7Xb5bKzH7fGXTPH2zjLUiQI96+vaJaL9aAO94uFK9cj/3bzaZkHE/69dNxjpmK6dBSNlFnrFjinmdn6worKc5BabWUsX7JR9usUa1Ov3kvXHm3kvj+dIzgXQcHUe9HoR41u277asMuX6gEU7tvbz7U5PJ8gMDLv5XWCbyUTvnSUPK47HODwnj5Ft78X6Mkqpvu3Fm+UGdcvkJeefdf65WXilcfa951yA0w91tf+4jQjkYyTdCuNgkPBe2+bLy/OyvZlQr100+36tCcn2G4Hr2TszBpS9ui3oNZt0mf6X//5eVvfeRs4A8IJMMs7b20iacf0+J7TmJL2Wp82osSIlcDu3bNf2uiCEkFfv3aHPPrA36Vtu2RmWb9On9pQsBPCTVtRLHIEuZEvsbsC4dSb/0fO+Ozh8uVJQ+S1l9bIGpyVqKGrL3rKXi840MPrzWwHfdjDlIzkwvnOtAbuTjg+rEO69mgtazTQWLCjDB7aVc69eGBhktxy7cu2wPSHWQ09WMOrEa9IFmwA8mWRfjPCX1Hxr9cieV28sAUOEHMmIwL3umJNyHJ8QIIKAs8jeeCwu4hwmlU4ju8tSZwpkHy9wCSLU6s169yjHwu/d9NIuf72UXLjd9JjeR63UxfJAdtIEBzL43sSkoyljPwn1OpX9fWFgoeAx/H3PzHBPkmYIHd5cubbgj+U26Z/xmaxB/WspiEFrw6sN/CAcS1Vrj50+umHPo61XD3isMxLnE+PWlRD9CIPIPDgbeKVgHddZHfqkXxc6Wd0s6o4krevw8FWqBSU4pJGuGq3NqugTiA2jOf/6x07KOutHxRvve/TekA20HBxWBie4vE38Ypj5Kd3jbEZYMbdb8rL/G4TunC3ETilq7Fn99XX5YHodJyqLlm4od71CZK0/8CO9tOF0taLJThjwXoPW24EvdwC7I2/OtM+gzyn/mpMSY7l4UW40h65PO3MGo5thIsM1DX2mX7wsK5y7a2n21dgEwPmCm508LAusmh+Mi1a8FVulnJYqpHNGnzSOHZ/Vw/GrtSfCkzWnQxeJWhv1IUzQNgB9RmQ/FTgvZVb5W79XP6X51ZZhz4xOA72WVeNWRDfanDqiXL8yT3teL6pHtFjuj9LD/CauEUmMFisH6enxHio8DuThhactwzS70SfPfcIeUA/1mFWwFE7TmH9IRvsYpGK9Uvnrq2Tnwqoz3G63dg1WNXogeF/YmNxhusZeIYh3A7ZoZlWFNTI0Rr8b/xghP3YqK4fw2A9gK3jIv0Rku/FLOmFAbMgBkAG5zFhIJDje8yJI/VHR3oa26p18rTt1Hf5Wt0FYN1y/x2vp9nFYVPfd5DeXCGF367gazY+WqLgdyQoWKO8oB/xLtRE9TsRyPARFD8AmqbfiubMLv49C3D1FfxkAF+EcbyAWcK+MufuBU5FIuO1hNcUZiF/qFdfH3m5/ujot8E9qHK9WbSUZ2yVB2QWRh1nJt9LaEf1nIrZi8I0SaDmn3YzU4Cjucy4Sg1HwcAzEc3mQV4wnWOc+CT//7GEJKHncYvR5WlSeLZB9UKY/4YTeSVcRbmKGSTHSm06uVlSEHDQMbxTqmVHZRke2mYkuVCVGCeqkCU8oAtX70Kg0A48ehRtwshjOwpcD8SQhXaeRxnrnDwzg7juY7dBj7g838TBJrv3XURaCdrgUCp11gPZ/+4GnuZfreCroDAS3qB6POor37yf8PDkRnUlINJ/SYmENp1+BgOdAM/PApEP9TpwmTGoUsZ+sF2pansg/XZjnlYPI0hWvOvJq6fOR8+1aT6aZj/shqa1bWpBDnEeYlDIg4CmaIJtJIHZ0hpQtFnA923yK3VtDyQnrnQevetxkEU+CII9KLApjvgcpsym79KbsqAGhlVeWIdt+9Lghs3cZV2HakWkHkjWJOYt53FzKNvacA5OM0aZtmiFHwEgLtBg5wos0mpGVCCAlXJLXdg4W4SOmRiRX24nn2Cc/hZP7948pgQ9Zw6l67XBNuWmo8yoqzaIsTrYVDmaFEWLxKgsMRJwgU8dMw+EEvhjgE0tXGxIQR75rg2d2J0SKoq3ydsxPQgqpdADOpME70RPmhtTcHQyABEU5Pk22AEXquj7AI3tYIEmI19xkQYmNIoSJJqg7YCt9SFbgQFiKpY4OZ0MgIYrtXkg+XZjDqPXlF8UJcC9p009MIE3HQ9I6Yw56kVm2q9/sr2YCQI5/2iGtWHUlNeDzNuEMB1VSmcwNFipowfcwhXu9S4EBlHBP8iKSsAzioAYVC8myttL5EXWaAIBI+17zAfS2wCNnvAXcZGR8rxd9lMwQt9thVYP5H5P4l2fc1+uGbKgthMNh4u3lcAo8hIiPc8CSMumpA3W5LNWvhf5RADE27WGAzNRaKpSF3sgnLjCczlvAx8dGuTGIF1sMOVG5ZRVispEMgGBVcBOLdQpTGGeKlQpZHqtCp3MJDGeSoCG44zn2qV8FbEB4J1uNoK9tEqAJtMXmeG1QT2nk5kVKA/dUAZ2YiMItKIs5dSmgMnr1UZVOPBA+M88lYK3ce4RtwYhKqEKWQOdbHFBNYFvm03lkkdN8E2mAicjyS4ZRAS0vqAyMajDrlCbXRp3AuqkD4UTVsjogWR3Y00NjUUHlxCmUCVo13CQiKWNBJxenVrKrIcKOqWCW6jNfgqSgSLoIYlqJVKBTmEfn1Dm/wIpd1VxcqbcqAAAAABJRU5ErkJggg=="},31411:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-History-list-b30840e2cdc37f910c5cbbc5f063051f.png"},14136:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Menu-features-950301f0a668b45e178757af22380df3.png"},55273:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Menu-cb08d9811c1b3f02a454d3409b8dd393.png"},98545:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Refund-Form-8345e3dff73524df2bcde310366efb27.png"},62779:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Refund-Wait-1d068a9b278567c3a4ad26859e969a55.png"},59686:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Resume-ff1b77fe887026e5bdf119c7493e8fbb.png"},11126:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Welcome-682effc97c60adb2d91b2594efec9179.png"},83513:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-status-confirm-wallet-b443dd740dd1002f8e73edc1e60d901b.png"},18962:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-token-Selection-9ffa553da5cca58043c8a14fa7d83b32.png"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/dae7efd3.dac93827.js b/assets/js/dae7efd3.dac93827.js new file mode 100644 index 000000000..aa9315563 --- /dev/null +++ b/assets/js/dae7efd3.dac93827.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8682],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var i=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),c=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},d=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},g=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=c(n),g=a,m=p["".concat(l,".").concat(g)]||p[g]||u[g]||r;return n?i.createElement(m,s(s({ref:t},d),{},{components:n})):i.createElement(m,s({ref:t},d))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,s=new Array(r);s[0]=g;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:a,s[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var i=n(87462),a=(n(67294),n(3905));n(8209);const r={id:"bridge-front",title:"Bridge - Application Front End",sidebar_label:"Bridge Front End",sidebar_position:4},s="Bridge Front end - Tutorial",o={unversionedId:"participate/bridge/usage/bridge-front",id:"participate/bridge/usage/bridge-front",title:"Bridge - Application Front End",description:"Currently, the two-way bridge is available exclusively on the testnet.",source:"@site/docs/participate/bridge/usage/bridge-front.md",sourceDirName:"participate/bridge/usage",slug:"/participate/bridge/usage/bridge-front",permalink:"/participate/bridge/usage/bridge-front",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:4,frontMatter:{id:"bridge-front",title:"Bridge - Application Front End",sidebar_label:"Bridge Front End",sidebar_position:4},sidebar:"docs",previous:{title:"Usage",permalink:"/category/usage-1"},next:{title:"Archethic's CLI",permalink:"/participate/cli/"}},l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Welcome Screen",id:"welcome-screen",level:2},{value:"Application Menu",id:"application-menu",level:3},{value:"Feature Access",id:"feature-access",level:3},{value:"Bridging Your Assets",id:"bridging-your-assets",level:2},{value:"Step 1: Initiating Transfer",id:"step-1-initiating-transfer",level:3},{value:"Step 2: Confirming Details",id:"step-2-confirming-details",level:3},{value:"Step 3: Executing Transfer",id:"step-3-executing-transfer",level:3},{value:"Local History and Management",id:"local-history-and-management",level:2},{value:"Options Include:",id:"options-include",level:3},{value:"Transfer Status Actions:",id:"transfer-status-actions",level:3},{value:"Refund Process",id:"refund-process",level:2}],d={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,i.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"bridge-front-end---tutorial"},"Bridge Front end - Tutorial"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Currently, the two-way bridge is available exclusively on the testnet.")),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"The Archethic Bridge application is exclusively available as a web application accessible through internet browsers.")),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"The application is compatible only with the desktop versions of the Archethic wallet, which include macOS, Linux, and Windows platforms.")),(0,a.kt)("p",null,"Ensure that you have the appropriate desktop version of the Archethic wallet installed on your system to interact with the application effectively. The Archethic wallet can be downloaded from ",(0,a.kt)("a",{parentName:"p",href:"https://www.archethic.net/wallet/"},"here"),"."),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"For optimal performance, it is recommended to use the latest version of your internet browser and keep your desktop wallet updated.")),(0,a.kt)("p",null,"Access: ",(0,a.kt)("a",{parentName:"p",href:"https://bridge.testnet.archethic.net"},"https://bridge.testnet.archethic.net"),(0,a.kt)("br",null),"\nSource code: ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/bridge"},"https://github.com/archethic-foundation/bridge")),(0,a.kt)("p",null,"This Flutter-built web application enables seamless asset deposits and withdrawals."),(0,a.kt)("admonition",{type:"success"},(0,a.kt)("p",{parentName:"admonition"},"Before proceeding, familiarize yourself with ",(0,a.kt)("a",{parentName:"p",href:"/participate/bridge/"},"Archethic's Bridge Key Concepts"),".")),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"To bridge, you must first configure your EVM wallet for the testnet networks with which you wish to interact, as well as obtain funds.\nWe recommend consulting the testnet-related information in the ",(0,a.kt)("a",{parentName:"p",href:"/FAQ/bridge-2-ways#testnet"},"dedicated FAQ section"),"."),(0,a.kt)("h2",{id:"welcome-screen"},"Welcome Screen"),(0,a.kt)("p",null,"Upon accessing the Archethic Bridge application, you are greeted with a welcome screen. To begin, click on the 'Bridge' button."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Welcome Screen",src:n(11126).Z,width:"1626",height:"1014"}),(0,a.kt)("br",{parentName:"p"}),"\n",(0,a.kt)("img",{alt:"Bridge Button",src:n(87785).Z,width:"1624",height:"1010"})),(0,a.kt)("h3",{id:"application-menu"},"Application Menu"),(0,a.kt)("p",null,"A right-hand header menu provides links to essential information and application documentation. It includes an option to send logs to Archethic for troubleshooting purposes."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Menu",src:n(55273).Z,width:"374",height:"343"})),(0,a.kt)("h3",{id:"feature-access"},"Feature Access"),(0,a.kt)("p",null,"The left-side menu grants access to various bridge functionalities:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Bridging between Archethic and EVM blockchains"),(0,a.kt)("li",{parentName:"ul"},"Viewing local history, resume or refund options, and transaction logs"),(0,a.kt)("li",{parentName:"ul"},"Refunding")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Menu Features",src:n(14136).Z,width:"338",height:"300"})),(0,a.kt)("h2",{id:"bridging-your-assets"},"Bridging Your Assets"),(0,a.kt)("p",null,"The bridge process involves multiple steps:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Inputting information to initiate the transfer"),(0,a.kt)("li",{parentName:"ol"},"Confirming the entered details"),(0,a.kt)("li",{parentName:"ol"},"Executing the transfer, with progress tracking and transaction signing in both EVM and Archethic wallets")),(0,a.kt)("h3",{id:"step-1-initiating-transfer"},"Step 1: Initiating Transfer"),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Transfer steps remain consistent across all blockchain types and directions.")),(0,a.kt)("p",null,"Firstly, select the originating and target blockchains."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Blockchain Selection",src:n(71353).Z,width:"712",height:"451"})),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"Ensure both Archethic and your chosen EVM wallets are connected before blockchain selection. Refer to the ",(0,a.kt)("a",{parentName:"p",href:"/category/faq"},"FAQ")," for connectivity issues.")),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"Choose a testnet blockchain for testing purposes.")),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"Select an EVM blockchain as the source automatically sets Archethic as the target.")),(0,a.kt)("p",null,"Post-selection, a field appears for token selection from available options."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Token Selection",src:n(18962).Z,width:"652",height:"285"})),(0,a.kt)("h3",{id:"step-2-confirming-details"},"Step 2: Confirming Details"),(0,a.kt)("p",null,"On the confirmation screen, review:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Entered information summary"),(0,a.kt)("li",{parentName:"ul"},"Fee details"),(0,a.kt)("li",{parentName:"ul"},"Post-fee token quantity")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Confirmation Screen",src:n(17337).Z,width:"679",height:"629"})),(0,a.kt)("h3",{id:"step-3-executing-transfer"},"Step 3: Executing Transfer"),(0,a.kt)("p",null,"A transfer tracking popup guides you through the process, prompting for transaction confirmations in your wallets."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Transfer Tracking",src:n(83513).Z,width:"641",height:"448"})),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Transaction signing methods vary per EVM wallet.")),(0,a.kt)("p",null,"In the Archethic wallet, confirmation prompts automatically appear when necessary."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Archethic Wallet Confirmation",src:n(87310).Z,width:"381",height:"807"})),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"The transfer process halts if a transaction is declined or due to insufficient funds. However, it can be resumed later.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Transfer Resumption",src:n(59686).Z,width:"650",height:"453"})),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"HTLC contract addresses are provided for ongoing process tracking.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"HTLC Information",src:n(36064).Z,width:"589",height:"109"})),(0,a.kt)("h2",{id:"local-history-and-management"},"Local History and Management"),(0,a.kt)("p",null,"View transfer history, successful or otherwise, through the application's local history feature."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"This history is local to your device. Access is not available on other devices.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"History List",src:n(31411).Z,width:"1360",height:"581"})),(0,a.kt)("h3",{id:"options-include"},"Options Include:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Deleting local history"),(0,a.kt)("li",{parentName:"ul"},"Filtering history entries")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"History Filters",src:n(49751).Z,width:"1391",height:"178"})),(0,a.kt)("h3",{id:"transfer-status-actions"},"Transfer Status Actions:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Remove transfers from local history"),(0,a.kt)("li",{parentName:"ul"},"Resume interrupted transfers"),(0,a.kt)("li",{parentName:"ul"},"Refund for interrupted transfers"),(0,a.kt)("li",{parentName:"ul"},"Access transfer technical details for Archethic team analysis")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"History Options",src:n(81914).Z,width:"137",height:"50"})),(0,a.kt)("h2",{id:"refund-process"},"Refund Process"),(0,a.kt)("p",null,"Retrieve your funds through the refund feature."),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Manual refunding is unavailable for Archethic-blocked funds, as it is automatic.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Refund Form",src:n(98545).Z,width:"678",height:"621"})),(0,a.kt)("p",null,"Upon wallet connection and address confirmation, refund eligibility and amount are displayed. Validate the refund to receive your funds, minus transaction fees."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Refund Process",src:n(62779).Z,width:"673",height:"206"})),(0,a.kt)("hr",null))}u.isMDXComponent=!0},87310:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-AEWallet-confirm-d858839f2ee6615e3afdb6ad71db00ad.png"},71353:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-BC-Selection-d7d9ff6f3b9f87fd39c406ad28c5ce97.png"},87785:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Bridge-3c59e46488ee3fbc820c4377cb94b03d.png"},17337:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Confirmation-e8df6d18d609d2d5ceea7c58edfb47b1.png"},49751:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Filters-2f3b307bf3d8271e9e5e84b7a7fe95ae.png"},36064:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-HTLC-infos-59f9d07b6fd6d7fefb2eb74d772575ba.png"},81914:(e,t,n)=>{n.d(t,{Z:()=>i});const i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIkAAAAyCAYAAABoKfh/AAAAAXNSR0IArs4c6QAAAGJlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAABJKGAAcAAAASAAAAUKABAAMAAAABAAEAAKACAAQAAAABAAAAiaADAAQAAAABAAAAMgAAAABBU0NJSQAAAFNjcmVlbnNob3TsLabyAAAB1WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj41MDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMzc8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpVc2VyQ29tbWVudD5TY3JlZW5zaG90PC9leGlmOlVzZXJDb21tZW50PgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4K0pIUWgAAFFtJREFUeAHtXHm0VsWRrwc89k12RAQEBVQWl0FxQyAbqCQ6LiFRYxxl4jEJSZjEzMQYj8YsGuNxjIOOJgoRNYaYo3HUIy5kNBGVCagsAQVEZFEE2Xd4U7+6/etb9777vfe9h//M+PXh3a6u+lV136q6fbv7flo1etD0GpEqsVKjZCyBZ5XyvcjwgWFyvVizJsKqwKcOacOGDrwMLLaDmCyqeLHxgk3yrb+g62/D881mUCjFd91/osmNu16W1dt+L62b9ZVmMUEQJXjOnIhL8CYqRgpus+C4ZACPUVFZVVAz9bwesCwqMzXFRxgI6isZ+aCJh76ngwxslkwC0J43BiD4sEMadaVED3RqOVJaNu0pq7b+VpqYlxCt6C0jIjiJlHoTTjZHJ7Q1rZ1CExsmSbEwR5OeDua8CeYaLVLN2tog1nBseHDOfuxXMfmEzNimjUqd8UDr6r7Sr8NVmiQZTzpMiHXKyTHscc1HStE5WKpfB+XN5PTzwfTQkhZ9sqhCTVCiLc40TJySdioCad60iyYJPGZ/9Ehos2l1cK85n7TWfPQRBP1LJAYK2gHrWsYJbATPI2DGSmDGYIIZ+kBt/AIMWLTnaVMNxpkwtG39VS51ekBnEpYqF2TwgldNHGguOBgJyBgNrb2GiXI4ysmGOeNpDR75noYdK8DgLzShR12wLM+VYcE3QQA6Y0wu5nZARF22K3XWAy5JgtO9gy0MZDA8WQNBK2XmYVCnCU/mcamFJNCuDZJw5mlGTGGGWX7Dku8gbZTf2/89ZCZJso+h91qgPQv3mkuAePsBV2pKz/BdAkV9mA58L/Z07JtMNzbOFGZD5RCRV6sP6ntBhc54QLfAvqg7zdnqOXjYaL3AkUYHrHdskfdp0uuQh9rxoW7BJA817StNtmOlzGCTstBMhg5d/YNtyjlUa8MwBVSs1IUeCFtglTEaBoOHHd7Txq7Hu0GcVVMm+FR1NIPneoykg6W6UeoI2nUskLCNcXAseVi+nVOvNNUDYQvs3Ui/KM88WMqNgV9KHMwwODE5wHc6Nouwy5zMsyPNbrUGac3Ai5gSRMQSHwZXawwl9D+p7GbJXJ+/fSZIDHEKMAcrnyK06XSgwMef8iLbCD2lpQ5wodjrQOWUWU1d6FHHbOSSIvBoy2rFRxWV067JPJ4yBVeSJOPBWo0wkzi+ORIedDwjlWfeBAB0UiVEwFIHMhTW4CMYxkwvMTh5Ge2k0GywwQ82a4/TKeVIJAz/IGL/mUTK6VSaeN1knF0QHUaWNbxWC6ZC8jyuwMMIDCBFsCKe766sYNII64IxeBYTxfMqdNYDYXcTImyVXuBgBh34jMMd1vhog/BKVEg/BMIMICbRiwXc9wEx5MoDu1RCkJ8JrrcDG9YJOkyLsQr4QABPu6lGhaIHQpI47/nTKpxhm8jCluhYQMB3kfEeNnaQAWb67K52nRGrmrOadJ1T8fIIViMcAux5murQ8zLyK3X9HkhnkhhNc2VOM/B8hDydQ/fs3VZuuONMOaxve2naDLoi+/YekIXz18t3L382h9ZmgXmAGFivwNEhERLLaVJc8e3j5MRTekr3Q9tIqzbVprZj+15Z9942eeXF1TL9V294Ux87fcFlg+WMzxwufQd0lN2798vvfrNIfn/foo+1n3H/OEDGntVXDj+ig7TWe2zRsmnqCPakvtm9a7/g3t9dvlme/dMKefqPyyhtcF2V/OiIetHtSYQQhsgKWYF2IKkVMWCo7NvXnyTjLzhSZj22XHbt3Gew9oe0kDHj+8q9v5wnD96zIGtDbfLpp02+Ati99cF+HR7yUeP6yKQpx0uPXm1l7aqtslIds/HDXTaLde7aSvr072CyVSu2yNSfz5U5f17NbjJ1fgwZYYnG8BHd5fMTB8qQE7pJ526ttN+dsvj1Dy2I7Tu2kC+MfKSEZsPZU244WT53bn/ZumWPrFi6yfravm2v1BygYxKbVU2qpE3baunUpZUccVRHadu+uSXJrdfNaXinqqEzCTwOXVzwB7fjL9uxMpLi2YBZIZEIMYNs2bRbHnt4iTRv3lRnkyayXW/s5FG9pP+gTmaaZjiBWVLAFgVKmsy1bahoO96lXx8qX/ynY2Sb2v/3G1+Vxx5aAiuxMPATrzxGLrzsaLn2F6fLA3e9KQ//emFMTI4hKpVBfEX7Pf1TOmsc2dFmyWVLPpKZ0xfLw/cuNO3LJw+XS64aIoOGdJa/v7mhDIt1Q86+8Ej53Hn95Y3XPpAffn22zRJ1ayRSzDY/vvNMS66F89Y3akZJXjeWEyHQMd6BQEDIi6NSRuAd1red/OCW06SDzhQtWzXT6a+ZtGqdmJ36yPioQWL0+D5y0qgv2nS4a8c+2bJ5t1z3jdmyft2OTPCJj7VLDPLG6LSLBMEMceOUF+W9d7YkooIxP3TPQpk3Z518/2enysVfGyIrl22Wv77wXkk8+yiqb753rJx46qGybvU2eUZny5nTFstyTRJf+HQ3b6Gvg4+hYBbetnlPgxIE3eKVc+3Vs2XGM1+QT53Tr7FJEjwaEyFEwx5tRiYKY3L4+96j77+1q7bJ9q17ZIcGfpvWeLIP6DR4YL/+aV1d3dSSp7m+Q5Hd7XQKbNOuWmeLKmlWrTtxdhUMo21DCG03gtj1ld85zvr50eQ/y1pdd2QwsKcMP0ss0Sf6Z9//i/z07jFy1TUnpEkSLdZPYLpHgjz+8FJ5+tG3ZeCQLoJXDv586dWnnTWHj+ghAwZ3ko3rd8rsp1d6SIPo3v3ay3J9xSDoDS3QgS7WMY0pzZKpO0QIXmaw/O4lMilP8Xh6J1/yTOibyrkmo0ex74cmtc7DYMWCXKD3te+dIN17tpHb9RWDBKUygn/qmN6ySxP3v59ZKdPCYpUJh6l/5v2L5QpNsK9cPVSm/0eymM0nKfouKoOGdlEf1cjAYzvLOfoKaNKUoy5Ci3z1m8OiYPKGXfLHGUtin1FQBoEHa8N6nW1DOfb4brLgbx+wWW+NtRLG3JiSrEliEugNxwAyMjBb5AiVR0iNOR3vzPNPn1l7HMDlTMx86Xx9EpfZQpYKBbDYh3UV+xM5/uQesvrdrboGWWrqyGnsLM67ZLCt6Js3b6JJMEzO+PTh8pCuE557YkW8txn/uUAmTDxKRpzRywJWboKgo2a6vsLCsN+RHXTNtVTXCO/LXt25FZVqHcPePYkMO64JFx1l65RNG3fZTFSkU4qH19aO7ckmAJhbfj3WXnd3/mSuzP3r2lJqkY8Fru2EIqd8Qr/dKNh+0+cikAuomcvzcjrI9EM6tUyCSqzZLh4MsC3D2oVPuSVdHTq0BHyPXm3kdQ2QzTQQ6PCHn9TDIFO+Oks26e7m8m8Nl/HnD5BrfnKKDD2xm9x2/SsxWbEm6T/okPQ1V0a/MN6leyvr40Fd40y/s2Fb6ueffEfuefQsW0TiddWgouPjOgd6WHxfdPnR8i8/HinXTHpOVr69uU5zpot7bERJF65UtlzRS8YgmJ4BOdr4MwXZqgtQPGGcBk8d21uOGHgIrVr9xtz3Zf6r78tQ3S4Ci3ULzZp1vfCptsRxw0h7SjA4B/nw/Z1mFzqQV+tOCucxSBCU39w+33YbN00dLePOG6CLzBWyYN4Hht2gawRsW1HYlzXquXTt3toQTJAb7hhV6z4BwFrsET0jeeKRt6LFTfq6WaWv50N7J+uVKGgEMePuBTqTbJfvapJcetVQW7g3wkxZKpokSZATdPA2WMZW18P7RYXRhEwxW3TljdLzsLb2rsRT3E+3h77Mf2WdJsksO7MAf8tHu5N+XB8grXvrP2gHJmEQYcHLklLkhFqBmGYX/G29DPuH7sksoDxvOqdRb3Ozbu19wa4M5xD5giTBYhXl818aKN+6bkQGgi05dlwHU2p8DA7GUD26YU0ClHNdCIrpgu3bYOajohguqjp21leOlimXzRKsyH15c27yFHfEa0kLnuZ6C/tyYwC5Y9se6aKHVxw2hgmnNcEPMoMO+vnmD0fIKaMPsy3q7KdWxu5w0MSdQkN8/dQfliUzYLB0x02vRZulCCYIXgn79h0QnEiPHtf3oJLky5OOlQv1dbP5o10yfWry2sOZjJ+9sS3/OM5okteN3R2jEDyMlaB5L7QZDXoiw67SxeJWk7TrkDxVmFqxQIsFUQwFJ5EoON+oq3CyMFW9WDvYWbdmux1kQZ+mcW6BVw52OC1aNLOFLLbZr7y4Rn75ozmJfugQp7CYrms9AHUNSGWzHl9uW/rfvXCe3K87p6f+8HY9Gon4g7Xb5bKzH7fGXTPH2zjLUiQI96+vaJaL9aAO94uFK9cj/3bzaZkHE/69dNxjpmK6dBSNlFnrFjinmdn6worKc5BabWUsX7JR9usUa1Ov3kvXHm3kvj+dIzgXQcHUe9HoR41u277asMuX6gEU7tvbz7U5PJ8gMDLv5XWCbyUTvnSUPK47HODwnj5Ft78X6Mkqpvu3Fm+UGdcvkJeefdf65WXilcfa951yA0w91tf+4jQjkYyTdCuNgkPBe2+bLy/OyvZlQr100+36tCcn2G4Hr2TszBpS9ui3oNZt0mf6X//5eVvfeRs4A8IJMMs7b20iacf0+J7TmJL2Wp82osSIlcDu3bNf2uiCEkFfv3aHPPrA36Vtu2RmWb9On9pQsBPCTVtRLHIEuZEvsbsC4dSb/0fO+Ozh8uVJQ+S1l9bIGpyVqKGrL3rKXi840MPrzWwHfdjDlIzkwvnOtAbuTjg+rEO69mgtazTQWLCjDB7aVc69eGBhktxy7cu2wPSHWQ09WMOrEa9IFmwA8mWRfjPCX1Hxr9cieV28sAUOEHMmIwL3umJNyHJ8QIIKAs8jeeCwu4hwmlU4ju8tSZwpkHy9wCSLU6s169yjHwu/d9NIuf72UXLjd9JjeR63UxfJAdtIEBzL43sSkoyljPwn1OpX9fWFgoeAx/H3PzHBPkmYIHd5cubbgj+U26Z/xmaxB/WspiEFrw6sN/CAcS1Vrj50+umHPo61XD3isMxLnE+PWlRD9CIPIPDgbeKVgHddZHfqkXxc6Wd0s6o4krevw8FWqBSU4pJGuGq3NqugTiA2jOf/6x07KOutHxRvve/TekA20HBxWBie4vE38Ypj5Kd3jbEZYMbdb8rL/G4TunC3ETilq7Fn99XX5YHodJyqLlm4od71CZK0/8CO9tOF0taLJThjwXoPW24EvdwC7I2/OtM+gzyn/mpMSY7l4UW40h65PO3MGo5thIsM1DX2mX7wsK5y7a2n21dgEwPmCm508LAusmh+Mi1a8FVulnJYqpHNGnzSOHZ/Vw/GrtSfCkzWnQxeJWhv1IUzQNgB9RmQ/FTgvZVb5W79XP6X51ZZhz4xOA72WVeNWRDfanDqiXL8yT3teL6pHtFjuj9LD/CauEUmMFisH6enxHio8DuThhactwzS70SfPfcIeUA/1mFWwFE7TmH9IRvsYpGK9Uvnrq2Tnwqoz3G63dg1WNXogeF/YmNxhusZeIYh3A7ZoZlWFNTI0Rr8b/xghP3YqK4fw2A9gK3jIv0Rku/FLOmFAbMgBkAG5zFhIJDje8yJI/VHR3oa26p18rTt1Hf5Wt0FYN1y/x2vp9nFYVPfd5DeXCGF367gazY+WqLgdyQoWKO8oB/xLtRE9TsRyPARFD8AmqbfiubMLv49C3D1FfxkAF+EcbyAWcK+MufuBU5FIuO1hNcUZiF/qFdfH3m5/ujot8E9qHK9WbSUZ2yVB2QWRh1nJt9LaEf1nIrZi8I0SaDmn3YzU4Cjucy4Sg1HwcAzEc3mQV4wnWOc+CT//7GEJKHncYvR5WlSeLZB9UKY/4YTeSVcRbmKGSTHSm06uVlSEHDQMbxTqmVHZRke2mYkuVCVGCeqkCU8oAtX70Kg0A48ehRtwshjOwpcD8SQhXaeRxnrnDwzg7juY7dBj7g838TBJrv3XURaCdrgUCp11gPZ/+4GnuZfreCroDAS3qB6POor37yf8PDkRnUlINJ/SYmENp1+BgOdAM/PApEP9TpwmTGoUsZ+sF2pansg/XZjnlYPI0hWvOvJq6fOR8+1aT6aZj/shqa1bWpBDnEeYlDIg4CmaIJtJIHZ0hpQtFnA923yK3VtDyQnrnQevetxkEU+CII9KLApjvgcpsym79KbsqAGhlVeWIdt+9Lghs3cZV2HakWkHkjWJOYt53FzKNvacA5OM0aZtmiFHwEgLtBg5wos0mpGVCCAlXJLXdg4W4SOmRiRX24nn2Cc/hZP7948pgQ9Zw6l67XBNuWmo8yoqzaIsTrYVDmaFEWLxKgsMRJwgU8dMw+EEvhjgE0tXGxIQR75rg2d2J0SKoq3ydsxPQgqpdADOpME70RPmhtTcHQyABEU5Pk22AEXquj7AI3tYIEmI19xkQYmNIoSJJqg7YCt9SFbgQFiKpY4OZ0MgIYrtXkg+XZjDqPXlF8UJcC9p009MIE3HQ9I6Yw56kVm2q9/sr2YCQI5/2iGtWHUlNeDzNuEMB1VSmcwNFipowfcwhXu9S4EBlHBP8iKSsAzioAYVC8myttL5EXWaAIBI+17zAfS2wCNnvAXcZGR8rxd9lMwQt9thVYP5H5P4l2fc1+uGbKgthMNh4u3lcAo8hIiPc8CSMumpA3W5LNWvhf5RADE27WGAzNRaKpSF3sgnLjCczlvAx8dGuTGIF1sMOVG5ZRVispEMgGBVcBOLdQpTGGeKlQpZHqtCp3MJDGeSoCG44zn2qV8FbEB4J1uNoK9tEqAJtMXmeG1QT2nk5kVKA/dUAZ2YiMItKIs5dSmgMnr1UZVOPBA+M88lYK3ce4RtwYhKqEKWQOdbHFBNYFvm03lkkdN8E2mAicjyS4ZRAS0vqAyMajDrlCbXRp3AuqkD4UTVsjogWR3Y00NjUUHlxCmUCVo13CQiKWNBJxenVrKrIcKOqWCW6jNfgqSgSLoIYlqJVKBTmEfn1Dm/wIpd1VxcqbcqAAAAABJRU5ErkJggg=="},31411:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-History-list-b30840e2cdc37f910c5cbbc5f063051f.png"},14136:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Menu-features-950301f0a668b45e178757af22380df3.png"},55273:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Menu-cb08d9811c1b3f02a454d3409b8dd393.png"},98545:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Refund-Form-8345e3dff73524df2bcde310366efb27.png"},62779:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Refund-Wait-1d068a9b278567c3a4ad26859e969a55.png"},59686:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Resume-ff1b77fe887026e5bdf119c7493e8fbb.png"},11126:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-Welcome-682effc97c60adb2d91b2594efec9179.png"},83513:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-status-confirm-wallet-b443dd740dd1002f8e73edc1e60d901b.png"},18962:(e,t,n)=>{n.d(t,{Z:()=>i});const i=n.p+"assets/images/Bridge-2-token-Selection-9ffa553da5cca58043c8a14fa7d83b32.png"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/daff3ff4.0bfc33f1.js b/assets/js/daff3ff4.f9ab1c95.js similarity index 63% rename from assets/js/daff3ff4.0bfc33f1.js rename to assets/js/daff3ff4.f9ab1c95.js index 16d600de9..5a35a8565 100644 --- a/assets/js/daff3ff4.0bfc33f1.js +++ b/assets/js/daff3ff4.f9ab1c95.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1718],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),l=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=l(e.components);return r.createElement(s.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=l(t),f=o,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||i;return t?r.createElement(m,a(a({ref:n},u),{},{components:t})):r.createElement(m,a({ref:n},u))}));function m(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=f;var c={};for(var s in n)hasOwnProperty.call(n,s)&&(c[s]=n[s]);c.originalType=e,c[d]="string"==typeof e?e:o,a[1]=c;for(var l=2;l{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var r=t(87462),o=(t(67294),t(3905));t(8209);const i={id:"uco",title:"UCO token",sidebar_position:2},a=void 0,c={unversionedId:"learn/uco",id:"learn/uco",title:"UCO token",description:"Archethic, an open-source public blockchain is an infrastructure that is fuelled by its native cryptocurrency and should ideally scale to the sum of its individual nodes\u2019 performance. It needs to be designed in such a way that it is a self-sustaining economy run by the people, for the people.",source:"@site/docs/learn/uco.md",sourceDirName:"learn",slug:"/learn/uco",permalink:"/learn/uco",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:2,frontMatter:{id:"uco",title:"UCO token",sidebar_position:2},sidebar:"docs",previous:{title:"Learn",permalink:"/learn/"},next:{title:"Ecosystem",permalink:"/learn/ecosystem"}},s={},l=[{value:"Fibonacci Golden Token Economics",id:"fibonacci-golden-token-economics",level:2}],u={toc:l},d="wrapper";function p(e){let{components:n,...t}=e;return(0,o.kt)(d,(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic, an open-source public blockchain is an infrastructure that is fuelled by its native cryptocurrency and should ideally scale to the sum of its individual nodes\u2019 performance. It needs to be designed in such a way that it is a self-sustaining economy run by the people, for the people."),(0,o.kt)("p",null,"UCO is based on the principle of controlled supply and creating demand."),(0,o.kt)("h2",{id:"fibonacci-golden-token-economics"},"Fibonacci Golden Token Economics"),(0,o.kt)("p",null,"To achieve the objective of a self-sustaining crypto economy, the token distribution has been redefined. The transactions growth, users growth ans developers growth based on the set of commissioned applications has been analysed. The cost of running the nodes has been calculated and the adoption and incentivization has been designed to ensure the sustenance of nodes."),(0,o.kt)("br",null),(0,o.kt)("mermaid",{value:'pie\n "Network Funding": 38.2\n "Adoption Rewards": 23.6\n "Team & Advisors": 14.5\n "Staking Rewards": 9\n "Exchange Liquidity": 5.57\n "Dynamic Mminers Rewards": 3.34\n "Gamification & Geo incentives": 3.44\n "Foundation": 2.13'}))}p.isMDXComponent=!0},8209:(e,n,t)=>{t(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1718],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),l=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=l(e.components);return r.createElement(s.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=l(t),f=o,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||i;return t?r.createElement(m,a(a({ref:n},u),{},{components:t})):r.createElement(m,a({ref:n},u))}));function m(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=f;var c={};for(var s in n)hasOwnProperty.call(n,s)&&(c[s]=n[s]);c.originalType=e,c[d]="string"==typeof e?e:o,a[1]=c;for(var l=2;l{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var r=t(87462),o=(t(67294),t(3905));t(8209);const i={id:"uco",title:"UCO token",sidebar_position:2},a=void 0,c={unversionedId:"learn/uco",id:"learn/uco",title:"UCO token",description:"Archethic, an open-source public blockchain is an infrastructure that is fuelled by its native cryptocurrency and should ideally scale to the sum of its individual nodes\u2019 performance. It needs to be designed in such a way that it is a self-sustaining economy run by the people, for the people.",source:"@site/docs/learn/uco.md",sourceDirName:"learn",slug:"/learn/uco",permalink:"/learn/uco",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:2,frontMatter:{id:"uco",title:"UCO token",sidebar_position:2},sidebar:"docs",previous:{title:"Learn",permalink:"/learn/"},next:{title:"Ecosystem",permalink:"/learn/ecosystem"}},s={},l=[{value:"Fibonacci Golden Token Economics",id:"fibonacci-golden-token-economics",level:2}],u={toc:l},d="wrapper";function p(e){let{components:n,...t}=e;return(0,o.kt)(d,(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Archethic, an open-source public blockchain is an infrastructure that is fuelled by its native cryptocurrency and should ideally scale to the sum of its individual nodes\u2019 performance. It needs to be designed in such a way that it is a self-sustaining economy run by the people, for the people."),(0,o.kt)("p",null,"UCO is based on the principle of controlled supply and creating demand."),(0,o.kt)("h2",{id:"fibonacci-golden-token-economics"},"Fibonacci Golden Token Economics"),(0,o.kt)("p",null,"To achieve the objective of a self-sustaining crypto economy, the token distribution has been redefined. The transactions growth, users growth ans developers growth based on the set of commissioned applications has been analysed. The cost of running the nodes has been calculated and the adoption and incentivization has been designed to ensure the sustenance of nodes."),(0,o.kt)("br",null),(0,o.kt)("mermaid",{value:'pie\n "Network Funding": 38.2\n "Adoption Rewards": 23.6\n "Team & Advisors": 14.5\n "Staking Rewards": 9\n "Exchange Liquidity": 5.57\n "Dynamic Mminers Rewards": 3.34\n "Gamification & Geo incentives": 3.44\n "Foundation": 2.13'}))}p.isMDXComponent=!0},8209:(e,n,t)=>{t(67294)}}]); \ No newline at end of file diff --git a/assets/js/db2ee795.74f429a4.js b/assets/js/db2ee795.74f429a4.js new file mode 100644 index 000000000..56d34c291 --- /dev/null +++ b/assets/js/db2ee795.74f429a4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1950],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),m=i,h=d["".concat(s,".").concat(m)]||d[m]||u[m]||o;return n?a.createElement(h,r(r({ref:t},p),{},{components:n})):a.createElement(h,r({ref:t},p))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:i,r[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"ecosystem",title:"Ecosystem",sidebar_position:3},r=void 0,l={unversionedId:"learn/ecosystem",id:"learn/ecosystem",title:"Ecosystem",description:"The technical and functional parameters that make Archethic unique and ready for global adoption:",source:"@site/docs/learn/ecosystem.md",sourceDirName:"learn",slug:"/learn/ecosystem",permalink:"/learn/ecosystem",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:3,frontMatter:{id:"ecosystem",title:"Ecosystem",sidebar_position:3},sidebar:"docs",previous:{title:"UCO token",permalink:"/learn/uco"},next:{title:"Patents",permalink:"/learn/patents"}},s={},c=[{value:"Limitless network",id:"limitless-network",level:2},{value:"Unlimited applications",id:"unlimited-applications",level:2},{value:"Decentralized Identity",id:"decentralized-identity",level:2},{value:"Governance",id:"governance",level:2},{value:"Open enhancements",id:"open-enhancements",level:3}],p={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The technical and functional parameters that make Archethic unique and ready for global adoption:"),(0,i.kt)("h2",{id:"limitless-network"},"Limitless network"),(0,i.kt)("p",null,"Archethic is outperforming the market standards with some key indicators:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"a scalability >1 Million TPS"),(0,i.kt)("li",{parentName:"ul"},"a validation time < 5 sec"),(0,i.kt)("li",{parentName:"ul"},"capability to handle up to 90% maliciousness"),(0,i.kt)("li",{parentName:"ul"},"3.6 billion times less energy consumption than Bitcoin and 0.1% transaction fee")),(0,i.kt)("admonition",{title:"Super Fast & Limitless",type:"success"},(0,i.kt)("p",{parentName:"admonition"},"Without impacting the global validation, the heuristic polymorphic replication provides a linear increase of the capacity (in storage and number of validations) allowing us to reach 1 MILLION TPS transactions per second.")),(0,i.kt)("admonition",{title:"Safest",type:"success"},(0,i.kt)("p",{parentName:"admonition"},"Beyond just PoW (51%) or dBFT (66%), Archethic implements a consensus that can handle 90% of malicious miners and decentralized security based on the standards of aviation safety (fraud risk less than 10-9).")),(0,i.kt)("admonition",{title:"Earth Friendly",type:"success"},(0,i.kt)("p",{parentName:"admonition"},"3.6 Billion times less energy consumption than Bitcoin by using the ARCH consensus based on heuristic miners' election and a polymorphic worldwide replication. Each transaction only needs 0.42w of energy.")),(0,i.kt)("h2",{id:"unlimited-applications"},"Unlimited applications"),(0,i.kt)("p",null,"Our blockchain platform aims to replace and to improve all current applications with a comprehensive and open ecosystem, allowing people to move from the trust imposed by centralized to a decentralized system."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"AEWeb"),": One app for website maintenance, security, handling and costing on the blockchain at a fraction of the current hosting costs!"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"AEMail"),": Email Redefined! An all-in-one email, messaging, wallet and payments app that provides the full suite for a user. Coming soon"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"AENFT"),": Archethic embeds in its transaction structure NFTs and are therefore native to the network. However a decentralized marketplace reimagined in collaboration with artists will come soon !"),(0,i.kt)("li",{parentName:"ul"},"And so more...")),(0,i.kt)("h2",{id:"decentralized-identity"},"Decentralized Identity"),(0,i.kt)("p",null,"Your identity is your right. The security and threat issues that centralized systems pose helped us realize that self-sovereign identity is needed now more than ever."),(0,i.kt)("p",null,"With Archethic, you can access your identity but no one owns it.\nHave you ever wondered how many times your identity is exploited without your knowledge by centralized monopolies or even your favorite merchant site?"),(0,i.kt)("p",null,"The world wants you to believe that ownership doesn\u2019t matter. We are here to change that narrative."),(0,i.kt)("p",null,"Identity is not just about ownership but control and freedom."),(0,i.kt)("p",null,"Archethic provides interoperable ",(0,i.kt)("a",{parentName:"p",href:"/learn/decentralized-id"},"decentralized identity management")," using both the traditional key management as well as our crypto-biometrics key management solution."),(0,i.kt)("p",null,"Enter the era of innovation and decentralized identity that is yours to own and control."),(0,i.kt)("h2",{id:"governance"},"Governance"),(0,i.kt)("p",null,"Archethic Foundation is a non-profit organization whose vision is the promotion of the Archethic Public Blockchain Protocol."),(0,i.kt)("p",null,"It considers Archethic as a project \u2013 where a solid technical foundation is a key to winning the marathon race to global adoption. Its role is to sustainably deploy resources that are under control to support the long-term success of Archethic. This long-term success will only be possible with a vibrant decentralized ecosystem."),(0,i.kt)("p",null,"To provide an inclusive, generously incentivized, and on-chain Governance, Archethic is based on those four pillars:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Decentralized Identity & Proof of Identity"),": An essential prerequisite for a human-inclusive governance in blockchain is the ability of the ecosystem to uniquely identify a person and to integrate that person into a relevant group.")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Modifiable"),": Each algorithm can be updated through transactions allowing the network to version (git...) all updates, and also to force each update according to a specific governance (voting quorum, veto right...).")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"On-Chain Governance"),": The code used by the nodes is hosted by the Blockchain itself, so the network is certain that all the nodes will immediately apply the decided updates along with the ability to test the impact of a new feature in real-time.")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Generous Incentives"),": Financing the work associated with updates, new features, and contributions is an essential element. The network has a reserve of one-third of the tokens for this purpose."))),(0,i.kt)("h3",{id:"open-enhancements"},"Open enhancements"),(0,i.kt)("p",null,"We are an open-source and decentralized protocol which decision involves community votes and suggestions."),(0,i.kt)("p",null,"In that sense, we have created ",(0,i.kt)("strong",{parentName:"p"},"Archethic Improvement Proposals (AEIPs)")," to offer opportunity to contribute in the project by proposing technical, informational and process-based enhancements."),(0,i.kt)("p",null,"If you are interested, please take on the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeip"},"AEIP repository")))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/db2ee795.c6e9fa66.js b/assets/js/db2ee795.c6e9fa66.js deleted file mode 100644 index 6b331634b..000000000 --- a/assets/js/db2ee795.c6e9fa66.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1950],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),m=i,h=d["".concat(s,".").concat(m)]||d[m]||u[m]||o;return n?a.createElement(h,r(r({ref:t},p),{},{components:n})):a.createElement(h,r({ref:t},p))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:i,r[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"ecosystem",title:"Ecosystem",sidebar_position:3},r=void 0,l={unversionedId:"learn/ecosystem",id:"learn/ecosystem",title:"Ecosystem",description:"The technical and functional parameters that make Archethic unique and ready for global adoption:",source:"@site/docs/learn/ecosystem.md",sourceDirName:"learn",slug:"/learn/ecosystem",permalink:"/learn/ecosystem",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:3,frontMatter:{id:"ecosystem",title:"Ecosystem",sidebar_position:3},sidebar:"docs",previous:{title:"UCO token",permalink:"/learn/uco"},next:{title:"Patents",permalink:"/learn/patents"}},s={},c=[{value:"Limitless network",id:"limitless-network",level:2},{value:"Unlimited applications",id:"unlimited-applications",level:2},{value:"Decentralized Identity",id:"decentralized-identity",level:2},{value:"Governance",id:"governance",level:2},{value:"Open enhancements",id:"open-enhancements",level:3}],p={toc:c},d="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The technical and functional parameters that make Archethic unique and ready for global adoption:"),(0,i.kt)("h2",{id:"limitless-network"},"Limitless network"),(0,i.kt)("p",null,"Archethic is outperforming the market standards with some key indicators:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"a scalability >1 Million TPS"),(0,i.kt)("li",{parentName:"ul"},"a validation time < 5 sec"),(0,i.kt)("li",{parentName:"ul"},"capability to handle up to 90% maliciousness"),(0,i.kt)("li",{parentName:"ul"},"3.6 billion times less energy consumption than Bitcoin and 0.1% transaction fee")),(0,i.kt)("admonition",{title:"Super Fast & Limitless",type:"success"},(0,i.kt)("p",{parentName:"admonition"},"Without impacting the global validation, the heuristic polymorphic replication provides a linear increase of the capacity (in storage and number of validations) allowing us to reach 1 MILLION TPS transactions per second.")),(0,i.kt)("admonition",{title:"Safest",type:"success"},(0,i.kt)("p",{parentName:"admonition"},"Beyond just PoW (51%) or dBFT (66%), Archethic implements a consensus that can handle 90% of malicious miners and decentralized security based on the standards of aviation safety (fraud risk less than 10-9).")),(0,i.kt)("admonition",{title:"Earth Friendly",type:"success"},(0,i.kt)("p",{parentName:"admonition"},"3.6 Billion times less energy consumption than Bitcoin by using the ARCH consensus based on heuristic miners' election and a polymorphic worldwide replication. Each transaction only needs 0.42w of energy.")),(0,i.kt)("h2",{id:"unlimited-applications"},"Unlimited applications"),(0,i.kt)("p",null,"Our blockchain platform aims to replace and to improve all current applications with a comprehensive and open ecosystem, allowing people to move from the trust imposed by centralized to a decentralized system."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"AEWeb"),": One app for website maintenance, security, handling and costing on the blockchain at a fraction of the current hosting costs!"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"AEMail"),": Email Redefined! An all-in-one email, messaging, wallet and payments app that provides the full suite for a user. Coming soon"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"AENFT"),": Archethic embeds in its transaction structure NFTs and are therefore native to the network. However a decentralized marketplace reimagined in collaboration with artists will come soon !"),(0,i.kt)("li",{parentName:"ul"},"And so more...")),(0,i.kt)("h2",{id:"decentralized-identity"},"Decentralized Identity"),(0,i.kt)("p",null,"Your identity is your right. The security and threat issues that centralized systems pose helped us realize that self-sovereign identity is needed now more than ever."),(0,i.kt)("p",null,"With Archethic, you can access your identity but no one owns it.\nHave you ever wondered how many times your identity is exploited without your knowledge by centralized monopolies or even your favorite merchant site?"),(0,i.kt)("p",null,"The world wants you to believe that ownership doesn\u2019t matter. We are here to change that narrative."),(0,i.kt)("p",null,"Identity is not just about ownership but control and freedom."),(0,i.kt)("p",null,"Archethic provides interoperable ",(0,i.kt)("a",{parentName:"p",href:"/learn/decentralized-id"},"decentralized identity management")," using both the traditional key management as well as our crypto-biometrics key management solution."),(0,i.kt)("p",null,"Enter the era of innovation and decentralized identity that is yours to own and control."),(0,i.kt)("h2",{id:"governance"},"Governance"),(0,i.kt)("p",null,"Archethic Foundation is a non-profit organization whose vision is the promotion of the Archethic Public Blockchain Protocol."),(0,i.kt)("p",null,"It considers Archethic as a project \u2013 where a solid technical foundation is a key to winning the marathon race to global adoption. Its role is to sustainably deploy resources that are under control to support the long-term success of Archethic. This long-term success will only be possible with a vibrant decentralized ecosystem."),(0,i.kt)("p",null,"To provide an inclusive, generously incentivized, and on-chain Governance, Archethic is based on those four pillars:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Decentralized Identity & Proof of Identity"),": An essential prerequisite for a human-inclusive governance in blockchain is the ability of the ecosystem to uniquely identify a person and to integrate that person into a relevant group.")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Modifiable"),": Each algorithm can be updated through transactions allowing the network to version (git...) all updates, and also to force each update according to a specific governance (voting quorum, veto right...).")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"On-Chain Governance"),": The code used by the nodes is hosted by the Blockchain itself, so the network is certain that all the nodes will immediately apply the decided updates along with the ability to test the impact of a new feature in real-time.")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Generous Incentives"),": Financing the work associated with updates, new features, and contributions is an essential element. The network has a reserve of one-third of the tokens for this purpose."))),(0,i.kt)("h3",{id:"open-enhancements"},"Open enhancements"),(0,i.kt)("p",null,"We are an open-source and decentralized protocol which decision involves community votes and suggestions."),(0,i.kt)("p",null,"In that sense, we have created ",(0,i.kt)("strong",{parentName:"p"},"Archethic Improvement Proposals (AEIPs)")," to offer opportunity to contribute in the project by proposing technical, informational and process-based enhancements."),(0,i.kt)("p",null,"If you are interested, please take on the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/archethic-foundation/aeip"},"AEIP repository")))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/dd15e14a.6a078ec6.js b/assets/js/dd15e14a.6a078ec6.js deleted file mode 100644 index 3847deb65..000000000 --- a/assets/js/dd15e14a.6a078ec6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[681],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=c(n),u=i,h=p["".concat(s,".").concat(u)]||p[u]||m[u]||o;return n?a.createElement(h,r(r({ref:t},d),{},{components:n})):a.createElement(h,r({ref:t},d))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:i,r[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"arch-consensus",title:"ARCH consensus"},r=void 0,l={unversionedId:"learn/arch-consensus/arch-consensus",id:"learn/arch-consensus/arch-consensus",title:"ARCH consensus",description:"Archethic Blockchain is using a new consensus called ARCH (Atomic Rotating Commitment Heuristic) for an uncompromising consensus to support high scalability and high throughput.",source:"@site/docs/learn/arch-consensus/README.md",sourceDirName:"learn/arch-consensus",slug:"/learn/arch-consensus/",permalink:"/learn/arch-consensus/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"arch-consensus",title:"ARCH consensus"},sidebar:"docs",previous:{title:"Transaction types",permalink:"/learn/transaction-types"},next:{title:"Proof of Work",permalink:"/learn/arch-consensus/proof-of-work"}},s={},c=[{value:"Atomic Commitment",id:"atomic-commitment",level:2},{value:"Rotating Election",id:"rotating-election",level:2},{value:"Workflow",id:"workflow",level:2}],d={toc:c},p="wrapper";function m(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Blockchain is using a new consensus called ",(0,i.kt)("inlineCode",{parentName:"p"},"ARCH")," (Atomic Rotating Commitment Heuristic) for an uncompromising consensus to support high scalability and high throughput."),(0,i.kt)("p",null,"Archethic Blockchain is based on three properties:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Security: Each transaction is validated atomically"),(0,i.kt)("li",{parentName:"ul"},"Data consistency: Algorithms ensure to access the latest write and maximum availability"),(0,i.kt)("li",{parentName:"ul"},"Fault tolerance: Allow nodes to operate independently even in case of disaster")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"ARCH")," consensus is defined by three concepts:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Atomic Commitment"),": The most absolute form a consensus which implies 100% of concordant responses for the acceptance or refusal of the transaction validation"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Heuristic"),": Set of algorithms which manages the entire network, allowing to elect in a decentralized and coordinated way the nodes in charge to validate or store the transaction chains"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Rotating"),": Node election is constantly changing. No nodes can predict which nodes will validate the transaction before its arrives.")),(0,i.kt)("h2",{id:"atomic-commitment"},"Atomic Commitment"),(0,i.kt)("p",null,"Archethic Blockchain is based on ",(0,i.kt)("inlineCode",{parentName:"p"},"Hypergeometric distribution")," laws which from an unpredictable election and formal consensus make it possible to obtain with certainty (99.99999999%) the same answer by querying 197 nodes as would be obtained by querying 100 000 nodes."),(0,i.kt)("p",null,"Therefore, it makes possible the consensus establishment with a small part of nodes and can resist to attacks of 90% of malicious nodes. "),(0,i.kt)("p",null,"The risk of related availability is ensured by a strict management of the disruptive nodes, which are banished after investigation of the origin of the disagreement."),(0,i.kt)("p",null,"By supporting more 90% of malicious nodes into its network, ",(0,i.kt)("inlineCode",{parentName:"p"},"ARCH")," consensus is above aeronautical or nuclear standard, thanks to the ",(0,i.kt)("inlineCode",{parentName:"p"},"Atomic Commitment")," which request the total agreement of the validation nodes and from a ",(0,i.kt)("inlineCode",{parentName:"p"},"Malicious Detection")," algorithm to detect the malicious nodes."),(0,i.kt)("h2",{id:"rotating-election"},"Rotating Election"),(0,i.kt)("p",null,"Each rotating election is unpredictable, but still verifiable and reproducible.\nThe rotating algorithm sort a list of nodes based on:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Hash of transaction"),": Unpredictable until the transaction arrives"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Daily nonce"),": Secret shared between the authorized nodes and renewed daily"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Node public key"),": Last node public key")),(0,i.kt)("p",null,"The rotating election produces a proof, named: ",(0,i.kt)("inlineCode",{parentName:"p"},"Proof of Election")," which can be verified by any other nodes to ensure the right election of nodes."),(0,i.kt)("p",null,"From this algorithm, we get a list of nodes which can be filtered according to the constraints of the validation of the transaction."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"P2P availability"),(0,i.kt)("li",{parentName:"ul"},"Geographical distribution")),(0,i.kt)("h2",{id:"workflow"},"Workflow"),(0,i.kt)("p",null,"When a transaction is willing to be validated, its follows the given workflow:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"The transaction is received by any node (aka ",(0,i.kt)("inlineCode",{parentName:"li"},"Welcome node"),")"),(0,i.kt)("li",{parentName:"ol"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Welcome Node")," determines the validation nodes from the ",(0,i.kt)("inlineCode",{parentName:"li"},"Rotating Election")," algorithm and forward the transaction"),(0,i.kt)("li",{parentName:"ol"},"The validation nodes after receiving the transaction start some preliminary job to gather the context of the transaction:",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Previous transaction"),(0,i.kt)("li",{parentName:"ul"},"List of unspent outputs"))),(0,i.kt)("li",{parentName:"ol"},"After the context building, the ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Nodes")," communicate to the ",(0,i.kt)("inlineCode",{parentName:"li"},"Coordinator Node")," the list of storage nodes involved to gather this information."),(0,i.kt)("li",{parentName:"ol"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Coordinator Node")," can build the ",(0,i.kt)("inlineCode",{parentName:"li"},"Validation Stamp")," and compute the replication tree. Then it transmits them to the ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Nodes"),"."),(0,i.kt)("li",{parentName:"ol"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Nodes")," verify the content of the ",(0,i.kt)("inlineCode",{parentName:"li"},"Validation Stamp"),", sign with or without inconsistencies, and send the ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamp")," to all the validation nodes involved."),(0,i.kt)("li",{parentName:"ol"},"Once all the ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamps")," are received and if the ",(0,i.kt)("inlineCode",{parentName:"li"},"Atomic Commitment")," is reached, the replication phase starts."),(0,i.kt)("li",{parentName:"ol"},"Validation nodes send the transaction to the respective storage nodes:")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Storage nodes responsible for the new transaction chain"),(0,i.kt)("li",{parentName:"ul"},"Storage nodes responsible for the outputs of the transactions (transaction's movements addresses, recipients)"),(0,i.kt)("li",{parentName:"ul"},"Storage nodes responsible for the ",(0,i.kt)("a",{parentName:"li",href:"/learn/sharding/beacon-chain"},"Beacon Chain"))),(0,i.kt)("ol",{start:9},(0,i.kt)("li",{parentName:"ol"},"The storage for the new transaction chain will notify the validation nodes and the ",(0,i.kt)("inlineCode",{parentName:"li"},"Welcome Node")," about the replication, and the ",(0,i.kt)("inlineCode",{parentName:"li"},"Welcome Node")," will notify the client about it.")))}m.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/dd15e14a.e8cdfc33.js b/assets/js/dd15e14a.e8cdfc33.js new file mode 100644 index 000000000..ca5c3a366 --- /dev/null +++ b/assets/js/dd15e14a.e8cdfc33.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[681],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=c(n),u=i,h=p["".concat(s,".").concat(u)]||p[u]||m[u]||o;return n?a.createElement(h,r(r({ref:t},d),{},{components:n})):a.createElement(h,r({ref:t},d))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:i,r[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const o={id:"arch-consensus",title:"ARCH consensus"},r=void 0,l={unversionedId:"learn/arch-consensus/arch-consensus",id:"learn/arch-consensus/arch-consensus",title:"ARCH consensus",description:"Archethic Blockchain is using a new consensus called ARCH (Atomic Rotating Commitment Heuristic) for an uncompromising consensus to support high scalability and high throughput.",source:"@site/docs/learn/arch-consensus/README.md",sourceDirName:"learn/arch-consensus",slug:"/learn/arch-consensus/",permalink:"/learn/arch-consensus/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"arch-consensus",title:"ARCH consensus"},sidebar:"docs",previous:{title:"Transaction types",permalink:"/learn/transaction-types"},next:{title:"Proof of Work",permalink:"/learn/arch-consensus/proof-of-work"}},s={},c=[{value:"Atomic Commitment",id:"atomic-commitment",level:2},{value:"Rotating Election",id:"rotating-election",level:2},{value:"Workflow",id:"workflow",level:2}],d={toc:c},p="wrapper";function m(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Blockchain is using a new consensus called ",(0,i.kt)("inlineCode",{parentName:"p"},"ARCH")," (Atomic Rotating Commitment Heuristic) for an uncompromising consensus to support high scalability and high throughput."),(0,i.kt)("p",null,"Archethic Blockchain is based on three properties:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Security: Each transaction is validated atomically"),(0,i.kt)("li",{parentName:"ul"},"Data consistency: Algorithms ensure to access the latest write and maximum availability"),(0,i.kt)("li",{parentName:"ul"},"Fault tolerance: Allow nodes to operate independently even in case of disaster")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"ARCH")," consensus is defined by three concepts:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Atomic Commitment"),": The most absolute form a consensus which implies 100% of concordant responses for the acceptance or refusal of the transaction validation"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Heuristic"),": Set of algorithms which manages the entire network, allowing to elect in a decentralized and coordinated way the nodes in charge to validate or store the transaction chains"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Rotating"),": Node election is constantly changing. No nodes can predict which nodes will validate the transaction before its arrives.")),(0,i.kt)("h2",{id:"atomic-commitment"},"Atomic Commitment"),(0,i.kt)("p",null,"Archethic Blockchain is based on ",(0,i.kt)("inlineCode",{parentName:"p"},"Hypergeometric distribution")," laws which from an unpredictable election and formal consensus make it possible to obtain with certainty (99.99999999%) the same answer by querying 197 nodes as would be obtained by querying 100 000 nodes."),(0,i.kt)("p",null,"Therefore, it makes possible the consensus establishment with a small part of nodes and can resist to attacks of 90% of malicious nodes. "),(0,i.kt)("p",null,"The risk of related availability is ensured by a strict management of the disruptive nodes, which are banished after investigation of the origin of the disagreement."),(0,i.kt)("p",null,"By supporting more 90% of malicious nodes into its network, ",(0,i.kt)("inlineCode",{parentName:"p"},"ARCH")," consensus is above aeronautical or nuclear standard, thanks to the ",(0,i.kt)("inlineCode",{parentName:"p"},"Atomic Commitment")," which request the total agreement of the validation nodes and from a ",(0,i.kt)("inlineCode",{parentName:"p"},"Malicious Detection")," algorithm to detect the malicious nodes."),(0,i.kt)("h2",{id:"rotating-election"},"Rotating Election"),(0,i.kt)("p",null,"Each rotating election is unpredictable, but still verifiable and reproducible.\nThe rotating algorithm sort a list of nodes based on:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Hash of transaction"),": Unpredictable until the transaction arrives"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Daily nonce"),": Secret shared between the authorized nodes and renewed daily"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Node public key"),": Last node public key")),(0,i.kt)("p",null,"The rotating election produces a proof, named: ",(0,i.kt)("inlineCode",{parentName:"p"},"Proof of Election")," which can be verified by any other nodes to ensure the right election of nodes."),(0,i.kt)("p",null,"From this algorithm, we get a list of nodes which can be filtered according to the constraints of the validation of the transaction."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"P2P availability"),(0,i.kt)("li",{parentName:"ul"},"Geographical distribution")),(0,i.kt)("h2",{id:"workflow"},"Workflow"),(0,i.kt)("p",null,"When a transaction is willing to be validated, its follows the given workflow:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"The transaction is received by any node (aka ",(0,i.kt)("inlineCode",{parentName:"li"},"Welcome node"),")"),(0,i.kt)("li",{parentName:"ol"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Welcome Node")," determines the validation nodes from the ",(0,i.kt)("inlineCode",{parentName:"li"},"Rotating Election")," algorithm and forward the transaction"),(0,i.kt)("li",{parentName:"ol"},"The validation nodes after receiving the transaction start some preliminary job to gather the context of the transaction:",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"Previous transaction"),(0,i.kt)("li",{parentName:"ul"},"List of unspent outputs"))),(0,i.kt)("li",{parentName:"ol"},"After the context building, the ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Nodes")," communicate to the ",(0,i.kt)("inlineCode",{parentName:"li"},"Coordinator Node")," the list of storage nodes involved to gather this information."),(0,i.kt)("li",{parentName:"ol"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Coordinator Node")," can build the ",(0,i.kt)("inlineCode",{parentName:"li"},"Validation Stamp")," and compute the replication tree. Then it transmits them to the ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Nodes"),"."),(0,i.kt)("li",{parentName:"ol"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Nodes")," verify the content of the ",(0,i.kt)("inlineCode",{parentName:"li"},"Validation Stamp"),", sign with or without inconsistencies, and send the ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamp")," to all the validation nodes involved."),(0,i.kt)("li",{parentName:"ol"},"Once all the ",(0,i.kt)("inlineCode",{parentName:"li"},"Cross Validation Stamps")," are received and if the ",(0,i.kt)("inlineCode",{parentName:"li"},"Atomic Commitment")," is reached, the replication phase starts."),(0,i.kt)("li",{parentName:"ol"},"Validation nodes send the transaction to the respective storage nodes:")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Storage nodes responsible for the new transaction chain"),(0,i.kt)("li",{parentName:"ul"},"Storage nodes responsible for the outputs of the transactions (transaction's movements addresses, recipients)"),(0,i.kt)("li",{parentName:"ul"},"Storage nodes responsible for the ",(0,i.kt)("a",{parentName:"li",href:"/learn/sharding/beacon-chain"},"Beacon Chain"))),(0,i.kt)("ol",{start:9},(0,i.kt)("li",{parentName:"ol"},"The storage for the new transaction chain will notify the validation nodes and the ",(0,i.kt)("inlineCode",{parentName:"li"},"Welcome Node")," about the replication, and the ",(0,i.kt)("inlineCode",{parentName:"li"},"Welcome Node")," will notify the client about it.")))}m.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/e0b1087e.5c098c48.js b/assets/js/e0b1087e.5c098c48.js deleted file mode 100644 index 8723efc02..000000000 --- a/assets/js/e0b1087e.5c098c48.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4898],{3905:(e,t,n)=>{n.d(t,{Zo:()=>i,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d=r.createContext({}),c=function(e){var t=r.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},i=function(e){var t=c(e.components);return r.createElement(d.Provider,{value:t},e.children)},f="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,d=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),f=c(n),k=a,m=f["".concat(d,".").concat(k)]||f[k]||p[k]||o;return n?r.createElement(m,l(l({ref:t},i),{},{components:n})):r.createElement(m,l({ref:t},i))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=k;var s={};for(var d in t)hasOwnProperty.call(t,d)&&(s[d]=t[d]);s.originalType=e,s[f]="string"==typeof e?e:a,l[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>k,Bullet:()=>f,SpecifiedBy:()=>p,assets:()=>c,contentTitle:()=>s,default:()=>b,frontMatter:()=>l,metadata:()=>d,toc:()=>i});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"token-transfer",title:"TokenTransfer",hide_table_of_contents:!1},s=void 0,d={unversionedId:"build/api/schema/objects/token-transfer",id:"build/api/schema/objects/token-transfer",title:"TokenTransfer",description:"[TokenTransfer] represents the an asset transfer",source:"@site/docs/build/api/schema/objects/token-transfer.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/token-transfer",permalink:"/build/api/schema/objects/token-transfer",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"token-transfer",title:"TokenTransfer",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TokenLedger",permalink:"/build/api/schema/objects/token-ledger"},next:{title:"Token",permalink:"/build/api/schema/objects/token"}},c={},i=[{value:"Fields",id:"fields",level:3},{value:'TokenTransfer.amountInt ',id:"code-style-fontweight-normal-tokentransferbamountbcodeint-",level:4},{value:'TokenTransfer.toAddress ',id:"code-style-fontweight-normal-tokentransferbtobcodeaddress-",level:4},{value:'TokenTransfer.tokenAddressAddress ',id:"code-style-fontweight-normal-tokentransferbtokenaddressbcodeaddress-",level:4},{value:'TokenTransfer.tokenIdInt ',id:"code-style-fontweight-normal-tokentransferbtokenidbcodeint-",level:4},{value:"Member of",id:"member-of",level:3}],f=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),k=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:i,Bullet:f,SpecifiedBy:p,Badge:k},u="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(u,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TokenTransfer]"," represents the an asset transfer"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TokenTransfer {\n amount: Int\n to: Address\n tokenAddress: Address\n tokenId: Int\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokentransferbamountbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenTransfer.",(0,o.kt)("b",null,"amount"))),(0,o.kt)(f,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(k,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokentransferbtobcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenTransfer.",(0,o.kt)("b",null,"to"))),(0,o.kt)(f,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(k,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokentransferbtokenaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenTransfer.",(0,o.kt)("b",null,"tokenAddress"))),(0,o.kt)(f,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(k,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokentransferbtokenidbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenTransfer.",(0,o.kt)("b",null,"tokenId"))),(0,o.kt)(f,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(k,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"TokenLedger"))," ",(0,o.kt)(k,{class:"secondary",text:"object",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/e0b1087e.9a184ce3.js b/assets/js/e0b1087e.9a184ce3.js new file mode 100644 index 000000000..8bffa7690 --- /dev/null +++ b/assets/js/e0b1087e.9a184ce3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4898],{3905:(e,t,n)=>{n.d(t,{Zo:()=>i,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d=r.createContext({}),c=function(e){var t=r.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},i=function(e){var t=c(e.components);return r.createElement(d.Provider,{value:t},e.children)},f="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,d=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),f=c(n),k=a,m=f["".concat(d,".").concat(k)]||f[k]||p[k]||o;return n?r.createElement(m,l(l({ref:t},i),{},{components:n})):r.createElement(m,l({ref:t},i))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=k;var s={};for(var d in t)hasOwnProperty.call(t,d)&&(s[d]=t[d]);s.originalType=e,s[f]="string"==typeof e?e:a,l[1]=s;for(var c=2;c{n.r(t),n.d(t,{Badge:()=>k,Bullet:()=>f,SpecifiedBy:()=>p,assets:()=>c,contentTitle:()=>s,default:()=>b,frontMatter:()=>l,metadata:()=>d,toc:()=>i});var r=n(87462),a=n(67294),o=n(3905);n(8209);const l={id:"token-transfer",title:"TokenTransfer",hide_table_of_contents:!1},s=void 0,d={unversionedId:"build/api/schema/objects/token-transfer",id:"build/api/schema/objects/token-transfer",title:"TokenTransfer",description:"[TokenTransfer] represents the an asset transfer",source:"@site/docs/build/api/schema/objects/token-transfer.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/token-transfer",permalink:"/build/api/schema/objects/token-transfer",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"token-transfer",title:"TokenTransfer",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TokenLedger",permalink:"/build/api/schema/objects/token-ledger"},next:{title:"Token",permalink:"/build/api/schema/objects/token"}},c={},i=[{value:"Fields",id:"fields",level:3},{value:'TokenTransfer.amountInt ',id:"code-style-fontweight-normal-tokentransferbamountbcodeint-",level:4},{value:'TokenTransfer.toAddress ',id:"code-style-fontweight-normal-tokentransferbtobcodeaddress-",level:4},{value:'TokenTransfer.tokenAddressAddress ',id:"code-style-fontweight-normal-tokentransferbtokenaddressbcodeaddress-",level:4},{value:'TokenTransfer.tokenIdInt ',id:"code-style-fontweight-normal-tokentransferbtokenidbcodeint-",level:4},{value:"Member of",id:"member-of",level:3}],f=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),k=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:i,Bullet:f,SpecifiedBy:p,Badge:k},u="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(u,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[TokenTransfer]"," represents the an asset transfer"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type TokenTransfer {\n amount: Int\n to: Address\n tokenAddress: Address\n tokenId: Int\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokentransferbamountbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenTransfer.",(0,o.kt)("b",null,"amount"))),(0,o.kt)(f,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(k,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokentransferbtobcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenTransfer.",(0,o.kt)("b",null,"to"))),(0,o.kt)(f,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(k,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokentransferbtokenaddressbcodeaddress-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenTransfer.",(0,o.kt)("b",null,"tokenAddress"))),(0,o.kt)(f,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,o.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,o.kt)(k,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h4",{id:"code-style-fontweight-normal-tokentransferbtokenidbcodeint-"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"TokenTransfer.",(0,o.kt)("b",null,"tokenId"))),(0,o.kt)(f,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,o.kt)(k,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token-ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"TokenLedger"))," ",(0,o.kt)(k,{class:"secondary",text:"object",mdxType:"Badge"})))}b.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/e2b19375.0581b3be.js b/assets/js/e2b19375.0581b3be.js new file mode 100644 index 000000000..c24e990fc --- /dev/null +++ b/assets/js/e2b19375.0581b3be.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4338],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),l=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=l(e.components);return o.createElement(s.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=l(n),d=r,h=u["".concat(s,".").concat(d)]||u[d]||f[d]||i;return n?o.createElement(h,a(a({ref:t},p),{},{components:n})):o.createElement(h,a({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[u]="string"==typeof e?e:r,a[1]=c;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var o=n(87462),r=(n(67294),n(3905));n(8209);const i={id:"proof-of-work",title:"Proof of Work"},a=void 0,c={unversionedId:"learn/arch-consensus/proof-of-work",id:"learn/arch-consensus/proof-of-work",title:"Proof of Work",description:"Others blockchains are using the concept of Proof of Work to ensure an unpredictable and pseudo random election of block validation (mining).",source:"@site/docs/learn/arch-consensus/proof-of-work.md",sourceDirName:"learn/arch-consensus",slug:"/learn/arch-consensus/proof-of-work",permalink:"/learn/arch-consensus/proof-of-work",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"proof-of-work",title:"Proof of Work"},sidebar:"docs",previous:{title:"ARCH consensus",permalink:"/learn/arch-consensus/"},next:{title:"Cryptography",permalink:"/learn/cryptography/"}},s={},l=[],p={toc:l},u="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,o.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Others blockchains are using the concept of ",(0,r.kt)("inlineCode",{parentName:"p"},"Proof of Work")," to ensure an unpredictable and pseudo random election of block validation (mining).\nBut this technique requires a lot of energy consumption and can still be subject to exploit by HashRate control."),(0,r.kt)("p",null,"Archethic Blockchain is using a new kind of ",(0,r.kt)("inlineCode",{parentName:"p"},"Proof of Work")," to ensure the authenticity of the transaction origination devices.\nThis allows the additional security requirements on transaction validation like:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"prohibit any transaction even in case of key theft"),(0,r.kt)("li",{parentName:"ul"},"allow user to consult their balance on any smartphone, but generate a transaction only on a trusted device"),(0,r.kt)("li",{parentName:"ul"},"enable the organizers of an election to ensure biometric identity of a voter")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Proof Of Work")," consists of finding the right public key associated to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Origin Signature")," of the transaction\nfrom a list of public keys known by the network."),(0,r.kt)("p",null,"This verification is performed during the ",(0,r.kt)("inlineCode",{parentName:"p"},"Validation Stamp")," creation by the ",(0,r.kt)("inlineCode",{parentName:"p"},"Coordinator Node")," and ensure the device is authorized to generate the transaction"),(0,r.kt)("p",null,"Just like any other actor into the system, devices will have their own transaction chain allowing them to update their keys. "),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Each origin device public keys are grouped by family which helps nodes to determine which set of keys, must be played to produce the Proof of Work. (i.e: software, usb, biometric).")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Each origin device public key is encrypted and renewed by the network ensuring confidentiality and authenticity of devices.")))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/e2b19375.0854b6f2.js b/assets/js/e2b19375.0854b6f2.js deleted file mode 100644 index 2109536b8..000000000 --- a/assets/js/e2b19375.0854b6f2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4338],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),l=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=l(e.components);return o.createElement(s.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=l(n),d=r,h=u["".concat(s,".").concat(d)]||u[d]||f[d]||a;return n?o.createElement(h,i(i({ref:t},p),{},{components:n})):o.createElement(h,i({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[u]="string"==typeof e?e:r,i[1]=c;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var o=n(87462),r=(n(67294),n(3905));n(8209);const a={id:"proof-of-work",title:"Proof of Work"},i=void 0,c={unversionedId:"learn/arch-consensus/proof-of-work",id:"learn/arch-consensus/proof-of-work",title:"Proof of Work",description:"Others blockchains are using the concept of Proof of Work to ensure an unpredictable and pseudo random election of block validation (mining).",source:"@site/docs/learn/arch-consensus/proof-of-work.md",sourceDirName:"learn/arch-consensus",slug:"/learn/arch-consensus/proof-of-work",permalink:"/learn/arch-consensus/proof-of-work",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"proof-of-work",title:"Proof of Work"},sidebar:"docs",previous:{title:"ARCH consensus",permalink:"/learn/arch-consensus/"},next:{title:"Cryptography",permalink:"/learn/cryptography/"}},s={},l=[],p={toc:l},u="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,o.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Others blockchains are using the concept of ",(0,r.kt)("inlineCode",{parentName:"p"},"Proof of Work")," to ensure an unpredictable and pseudo random election of block validation (mining).\nBut this technique requires a lot of energy consumption and can still be subject to exploit by HashRate control."),(0,r.kt)("p",null,"Archethic Blockchain is using a new kind of ",(0,r.kt)("inlineCode",{parentName:"p"},"Proof of Work")," to ensure the authenticity of the transaction origination devices.\nThis allows the additional security requirements on transaction validation like:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"prohibit any transaction even in case of key theft"),(0,r.kt)("li",{parentName:"ul"},"allow user to consult their balance on any smartphone, but generate a transaction only on a trusted device"),(0,r.kt)("li",{parentName:"ul"},"enable the organizers of an election to ensure biometric identity of a voter")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Proof Of Work")," consists of finding the right public key associated to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Origin Signature")," of the transaction\nfrom a list of public keys known by the network."),(0,r.kt)("p",null,"This verification is performed during the ",(0,r.kt)("inlineCode",{parentName:"p"},"Validation Stamp")," creation by the ",(0,r.kt)("inlineCode",{parentName:"p"},"Coordinator Node")," and ensure the device is authorized to generate the transaction"),(0,r.kt)("p",null,"Just like any other actor into the system, devices will have their own transaction chain allowing them to update their keys. "),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Each origin device public keys are grouped by family which helps nodes to determine which set of keys, must be played to produce the Proof of Work. (i.e: software, usb, biometric).")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Each origin device public key is encrypted and renewed by the network ensuring confidentiality and authenticity of devices.")))}f.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/e2f82150.55f933f9.js b/assets/js/e2f82150.8a8bcbdf.js similarity index 50% rename from assets/js/e2f82150.55f933f9.js rename to assets/js/e2f82150.8a8bcbdf.js index 7427a98d2..720ea92ed 100644 --- a/assets/js/e2f82150.55f933f9.js +++ b/assets/js/e2f82150.8a8bcbdf.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5510],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var a=r(67294);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function d(e){for(var t=1;t=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var l=a.createContext({}),o=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):d(d({},t),e)),r},c=function(e){var t=o(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,s=e.mdxType,n=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=o(r),m=s,f=p["".concat(l,".").concat(m)]||p[m]||u[m]||n;return r?a.createElement(f,d(d({ref:t},c),{},{components:r})):a.createElement(f,d({ref:t},c))}));function f(e,t){var r=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var n=r.length,d=new Array(n);d[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[p]="string"==typeof e?e:s,d[1]=i;for(var o=2;o{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>o,contentTitle:()=>i,default:()=>y,frontMatter:()=>d,metadata:()=>l,toc:()=>c});var a=r(87462),s=r(67294),n=r(3905);r(8209);const d={id:"genesis-address",title:"genesisAddress",hide_table_of_contents:!1},i=void 0,l={unversionedId:"build/api/schema/queries/genesis-address",id:"build/api/schema/queries/genesis-address",title:"genesisAddress",description:"Query the network to find the genesis address of a transaction",source:"@site/docs/build/api/schema/queries/genesis-address.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/genesis-address",permalink:"/build/api/schema/queries/genesis-address",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"genesis-address",title:"genesisAddress",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"beaconChainSummary",permalink:"/build/api/schema/queries/beacon-chain-summary"},next:{title:"lastTransaction",permalink:"/build/api/schema/queries/last-transaction"}},o={},c=[{value:"Arguments",id:"arguments",level:3},{value:'genesisAddress.addressAddress! ',id:"code-style-fontweight-normal-genesisaddressbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Address ',id:"address-",level:4}],p=()=>(0,n.kt)(s.Fragment,null,(0,n.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,n.kt)(s.Fragment,null,"Specification",(0,n.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,n.kt)(s.Fragment,null,(0,n.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:c,Bullet:p,SpecifiedBy:u,Badge:m},g="wrapper";function y(e){let{components:t,...r}=e;return(0,n.kt)(g,(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Query the network to find the genesis address of a transaction"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-graphql"},"genesisAddress(\n address: Address!\n): Address\n")),(0,n.kt)("h3",{id:"arguments"},"Arguments"),(0,n.kt)("h4",{id:"code-style-fontweight-normal-genesisaddressbaddressbcodeaddress--"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"genesisAddress.",(0,n.kt)("b",null,"address"))),(0,n.kt)(p,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,n.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,n.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,n.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h3",{id:"type"},"Type"),(0,n.kt)("h4",{id:"address-"},(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,n.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,n.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null,(0,n.kt)("p",{parentName:"blockquote"},"The ","[Address]"," scalar type represents a transaction's address.\nThe Address appears in a JSON response as Base16 formatted string. The parsed address will\nbe converted to a binary and any invalid address with an invalid algorithm or invalid size will be rejected")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5510],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var a=r(67294);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function d(e){for(var t=1;t=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var l=a.createContext({}),o=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):d(d({},t),e)),r},c=function(e){var t=o(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,s=e.mdxType,n=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=o(r),m=s,f=p["".concat(l,".").concat(m)]||p[m]||u[m]||n;return r?a.createElement(f,d(d({ref:t},c),{},{components:r})):a.createElement(f,d({ref:t},c))}));function f(e,t){var r=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var n=r.length,d=new Array(n);d[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[p]="string"==typeof e?e:s,d[1]=i;for(var o=2;o{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>o,contentTitle:()=>i,default:()=>y,frontMatter:()=>d,metadata:()=>l,toc:()=>c});var a=r(87462),s=r(67294),n=r(3905);r(8209);const d={id:"genesis-address",title:"genesisAddress",hide_table_of_contents:!1},i=void 0,l={unversionedId:"build/api/schema/queries/genesis-address",id:"build/api/schema/queries/genesis-address",title:"genesisAddress",description:"Query the network to find the genesis address of a transaction",source:"@site/docs/build/api/schema/queries/genesis-address.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/genesis-address",permalink:"/build/api/schema/queries/genesis-address",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"genesis-address",title:"genesisAddress",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"beaconChainSummary",permalink:"/build/api/schema/queries/beacon-chain-summary"},next:{title:"lastTransaction",permalink:"/build/api/schema/queries/last-transaction"}},o={},c=[{value:"Arguments",id:"arguments",level:3},{value:'genesisAddress.addressAddress! ',id:"code-style-fontweight-normal-genesisaddressbaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Address ',id:"address-",level:4}],p=()=>(0,n.kt)(s.Fragment,null,(0,n.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,n.kt)(s.Fragment,null,"Specification",(0,n.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,n.kt)(s.Fragment,null,(0,n.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:c,Bullet:p,SpecifiedBy:u,Badge:m},g="wrapper";function y(e){let{components:t,...r}=e;return(0,n.kt)(g,(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Query the network to find the genesis address of a transaction"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-graphql"},"genesisAddress(\n address: Address!\n): Address\n")),(0,n.kt)("h3",{id:"arguments"},"Arguments"),(0,n.kt)("h4",{id:"code-style-fontweight-normal-genesisaddressbaddressbcodeaddress--"},(0,n.kt)("a",{parentName:"h4",href:"#"},(0,n.kt)("code",{style:{fontWeight:"normal"}},"genesisAddress.",(0,n.kt)("b",null,"address"))),(0,n.kt)(p,{mdxType:"Bullet"}),(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,n.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,n.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,n.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null),(0,n.kt)("h3",{id:"type"},"Type"),(0,n.kt)("h4",{id:"address-"},(0,n.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,n.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,n.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,n.kt)("blockquote",null,(0,n.kt)("p",{parentName:"blockquote"},"The ","[Address]"," scalar type represents a transaction's address.\nThe Address appears in a JSON response as Base16 formatted string. The parsed address will\nbe converted to a binary and any invalid address with an invalid algorithm or invalid size will be rejected")))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/e49ee1a9.21452b4d.js b/assets/js/e49ee1a9.d10bee7c.js similarity index 50% rename from assets/js/e49ee1a9.21452b4d.js rename to assets/js/e49ee1a9.d10bee7c.js index 2849ab077..e5eb10eaf 100644 --- a/assets/js/e49ee1a9.21452b4d.js +++ b/assets/js/e49ee1a9.d10bee7c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6509],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),i=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),u=i(a),m=r,b=u["".concat(s,".").concat(m)]||u[m]||p[m]||l;return a?n.createElement(b,c(c({ref:t},d),{},{components:a})):n.createElement(b,c({ref:t},d))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,c=new Array(l);c[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:r,c[1]=o;for(var i=2;i{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>i,contentTitle:()=>o,default:()=>y,frontMatter:()=>c,metadata:()=>s,toc:()=>d});var n=a(87462),r=a(67294),l=a(3905);a(8209);const c={id:"balance",title:"balance",hide_table_of_contents:!1},o=void 0,s={unversionedId:"build/api/schema/queries/balance",id:"build/api/schema/queries/balance",title:"balance",description:"Query the network to find a balance from an address coming from the latest transaction on the chain",source:"@site/docs/build/api/schema/queries/balance.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/balance",permalink:"/build/api/schema/queries/balance",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"balance",title:"balance",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Version",permalink:"/build/api/schema/objects/version"},next:{title:"beaconChainSummary",permalink:"/build/api/schema/queries/beacon-chain-summary"}},i={},d=[{value:"Arguments",id:"arguments",level:3},{value:'balance.addressAddress! ',id:"code-style-fontweight-normal-balancebaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Balance ',id:"balance-",level:4}],u=()=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,l.kt)(r.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},f="wrapper";function y(e){let{components:t,...a}=e;return(0,l.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Query the network to find a balance from an address coming from the latest transaction on the chain"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"balance(\n address: Address!\n): Balance\n")),(0,l.kt)("h3",{id:"arguments"},"Arguments"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-balancebaddressbcodeaddress--"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"balance.",(0,l.kt)("b",null,"address"))),(0,l.kt)(u,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,l.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,l.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"type"},"Type"),(0,l.kt)("h4",{id:"balance-"},(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/balance"},(0,l.kt)("inlineCode",{parentName:"a"},"Balance"))," ",(0,l.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"[Balance]"," represents a ledger balance.\nIt includes:"),(0,l.kt)("ul",{parentName:"blockquote"},(0,l.kt)("li",{parentName:"ul"},"UCO: uco balance"),(0,l.kt)("li",{parentName:"ul"},"token: token balances"))))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6509],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),i=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),u=i(a),m=r,b=u["".concat(s,".").concat(m)]||u[m]||p[m]||l;return a?n.createElement(b,c(c({ref:t},d),{},{components:a})):n.createElement(b,c({ref:t},d))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,c=new Array(l);c[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:r,c[1]=o;for(var i=2;i{a.r(t),a.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>i,contentTitle:()=>o,default:()=>y,frontMatter:()=>c,metadata:()=>s,toc:()=>d});var n=a(87462),r=a(67294),l=a(3905);a(8209);const c={id:"balance",title:"balance",hide_table_of_contents:!1},o=void 0,s={unversionedId:"build/api/schema/queries/balance",id:"build/api/schema/queries/balance",title:"balance",description:"Query the network to find a balance from an address coming from the latest transaction on the chain",source:"@site/docs/build/api/schema/queries/balance.mdx",sourceDirName:"build/api/schema/queries",slug:"/build/api/schema/queries/balance",permalink:"/build/api/schema/queries/balance",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"balance",title:"balance",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"Version",permalink:"/build/api/schema/objects/version"},next:{title:"beaconChainSummary",permalink:"/build/api/schema/queries/beacon-chain-summary"}},i={},d=[{value:"Arguments",id:"arguments",level:3},{value:'balance.addressAddress! ',id:"code-style-fontweight-normal-balancebaddressbcodeaddress--",level:4},{value:"Type",id:"type",level:3},{value:'Balance ',id:"balance-",level:4}],u=()=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,l.kt)(r.Fragment,null,"Specification",(0,l.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,l.kt)(r.Fragment,null,(0,l.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},f="wrapper";function y(e){let{components:t,...a}=e;return(0,l.kt)(f,(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Query the network to find a balance from an address coming from the latest transaction on the chain"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-graphql"},"balance(\n address: Address!\n): Balance\n")),(0,l.kt)("h3",{id:"arguments"},"Arguments"),(0,l.kt)("h4",{id:"code-style-fontweight-normal-balancebaddressbcodeaddress--"},(0,l.kt)("a",{parentName:"h4",href:"#"},(0,l.kt)("code",{style:{fontWeight:"normal"}},"balance.",(0,l.kt)("b",null,"address"))),(0,l.kt)(u,{mdxType:"Bullet"}),(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,l.kt)("inlineCode",{parentName:"a"},"Address!"))," ",(0,l.kt)(m,{class:"secondary",text:"non-null",mdxType:"Badge"})," ",(0,l.kt)(m,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,l.kt)("blockquote",null),(0,l.kt)("h3",{id:"type"},"Type"),(0,l.kt)("h4",{id:"balance-"},(0,l.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/balance"},(0,l.kt)("inlineCode",{parentName:"a"},"Balance"))," ",(0,l.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"[Balance]"," represents a ledger balance.\nIt includes:"),(0,l.kt)("ul",{parentName:"blockquote"},(0,l.kt)("li",{parentName:"ul"},"UCO: uco balance"),(0,l.kt)("li",{parentName:"ul"},"token: token balances"))))}y.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/e98eede6.61a2bca1.js b/assets/js/e98eede6.61a2bca1.js deleted file mode 100644 index ff39b2f7b..000000000 --- a/assets/js/e98eede6.61a2bca1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9185],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=l(n),h=i,m=u["".concat(c,".").concat(h)]||u[h]||d[h]||r;return n?a.createElement(m,s(s({ref:t},p),{},{components:n})):a.createElement(m,s({ref:t},p))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,s=new Array(r);s[0]=h;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[u]="string"==typeof e?e:i,s[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"dapps-communication",title:"Communication with DApps",sidebar_label:"Communication with DApps",sidebar_position:1},s=void 0,o={unversionedId:"participate/wallet/dapps-communication",id:"participate/wallet/dapps-communication",title:"Communication with DApps",description:"In the blockchain ecosystem, decentralized applications (dApps) are becoming increasingly popular. To enable reliable and secure communication between these applications and the blockchain, Archethic has developed a communication protocol with its Archethic Wallet application. This protocol allows dApps to delegate secure communication with the blockchain to the wallet and to protect private information within the wallet (seed, private keys) without exposing it to the dApps.",source:"@site/docs/participate/wallet/dapps-communication.md",sourceDirName:"participate/wallet",slug:"/participate/wallet/dapps-communication",permalink:"/participate/wallet/dapps-communication",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",sidebarPosition:1,frontMatter:{id:"dapps-communication",title:"Communication with DApps",sidebar_label:"Communication with DApps",sidebar_position:1},sidebar:"docs",previous:{title:"Archethic Wallet",permalink:"/participate/wallet/"},next:{title:"Build",permalink:"/category/build"}},c={},l=[{value:"get_endpoint",id:"get_endpoint",level:2},{value:"Request",id:"request",level:3},{value:"Success Response",id:"success-response",level:3},{value:"refresh_current_account",id:"refresh_current_account",level:2},{value:"Request",id:"request-1",level:3},{value:"Success Response",id:"success-response-1",level:3},{value:"get_accounts",id:"get_accounts",level:2},{value:"Request",id:"request-2",level:3},{value:"Success Response",id:"success-response-2",level:3},{value:"send_transaction",id:"send_transaction",level:2},{value:"Request",id:"request-3",level:3},{value:"Success Response",id:"success-response-3",level:3},{value:"add_service",id:"add_service",level:2},{value:"Request",id:"request-4",level:3},{value:"Success Response",id:"success-response-4",level:3},{value:"get_services_from_keychain",id:"get_services_from_keychain",level:2},{value:"Request",id:"request-5",level:3},{value:"Success Response",id:"success-response-5",level:3},{value:"keychain_derive_keypair",id:"keychain_derive_keypair",level:2},{value:"Request",id:"request-6",level:3},{value:"Success Response",id:"success-response-6",level:3},{value:"keychain_derive_address",id:"keychain_derive_address",level:2},{value:"Request",id:"request-7",level:3},{value:"Success Response",id:"success-response-7",level:3},{value:"get_current_account",id:"get_current_account",level:2},{value:"Request",id:"request-8",level:3},{value:"Success Response",id:"success-response-8",level:3},{value:"sign_transactions",id:"sign_transactions",level:2},{value:"Request",id:"request-9",level:3},{value:"Success Response",id:"success-response-9",level:3}],p={toc:l},u="wrapper";function d(e){let{components:t,...r}=e;return(0,i.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"In the blockchain ecosystem, decentralized applications (dApps) are becoming increasingly popular. To enable reliable and secure communication between these applications and the blockchain, Archethic has developed a communication protocol with its Archethic Wallet application. This protocol allows dApps to delegate secure communication with the blockchain to the wallet and to protect private information within the wallet (seed, private keys) without exposing it to the dApps."),(0,i.kt)("h1",{id:"point-of-view-on-usage"},"Point of view on usage"),(0,i.kt)("p",null,"When a dApp wants to perform a transaction that requires the use of private keys, it must call on the user\u2019s wallet to protect this information and avoid unauthorized exposure. There are several ways to do this:"),(0,i.kt)("p",null,"The dApp can solicit the wallet in a \u201ccovert\u201d manner without requiring the user\u2019s intervention. For example, it can retrieve information about the current account or services available in the decentralized wallet."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"1",src:n(53148).Z,width:"815",height:"158"})),(0,i.kt)("p",null,"The dApp can also listen to the wallet and adapt itself according to the actions performed in it. For example, a change in the current account in the wallet may result in a change in the current account in the dApp."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"2",src:n(13886).Z,width:"1004",height:"295"})),(0,i.kt)("p",null,"Finally, the dApp can solicit the wallet and ask the user to confirm an action. For example, this could be the signing of a transaction."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"3",src:n(61079).Z,width:"1262",height:"420"})),(0,i.kt)("h1",{id:"technical-point-of-view"},"Technical point of view"),(0,i.kt)("p",null,"In order not to limit the platforms, Archethic has implemented two protocols to allow an easy integration of its wallet with dApps:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"For Desktop and Web Client platforms, Archethic uses the Local RPC server protocol. A WebSocket server is provided by Archethic Wallet, using the JSON-RPC 2.0 protocol. DApp developers can use the Dart or JS coded communication libraries provided by Archethic to easily integrate this functionality into their dApp."),(0,i.kt)("li",{parentName:"ul"},"For Mobile platforms, Archethic uses DeepLinks via an HTTPS URL to enable communication between the dApp and the Archethic wallet.")),(0,i.kt)("p",null,"For the Dart and Flutter part, these protocols have been implemented within the \u201cArchethic Wallet Client\u201d (AWC) communication library, which therefore allows Dapps to communicate with the Archethic wallet through a unified interface."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"4",src:n(88268).Z,width:"1321",height:"685"})),(0,i.kt)("p",null,"AWC supports several API methods, including signing and sending transactions to the Archethic blockchain, retrieving the wallet\u2019s endpoint URL, retrieving accounts available on the wallet, adding services to the keychain, and more."),(0,i.kt)("p",null,"Using AWC allows Dapps developers to focus on developing their application rather than managing communication with the wallet and blockchain. The solution is also cross-platform (macOS, iOS, Android, Web, Windows, Linux), which facilitates the interaction between users and the blockchain and avoids forcing developers to develop their Dapps on a specific platform."),(0,i.kt)("p",null,"It is worth noting that for the JS part, developers can find the interfaces directly in the \u201clibjs\u201d library of Archethic. This greatly facilitates the integration of the wallet with dApps written in JavaScript."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"5",src:n(4389).Z,width:"1321",height:"684"})),(0,i.kt)("h1",{id:"available-commands"},"Available commands"),(0,i.kt)("p",null,"The wallet context related commands that do not require user confirmation in the wallet are:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Endpoint retrieval,"),(0,i.kt)("li",{parentName:"ul"},"Recovery of user accounts,"),(0,i.kt)("li",{parentName:"ul"},"Recovery of the current account,"),(0,i.kt)("li",{parentName:"ul"},"Recovery of the services contained in the decentralized wallet,"),(0,i.kt)("li",{parentName:"ul"},"Derivation of a key pair for a given service and index and recovery of the public key,"),(0,i.kt)("li",{parentName:"ul"},"Deriving an address for a given service and index.")),(0,i.kt)("p",null,"The information that can be listened to is:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"The change of balance or last address of the current account,"),(0,i.kt)("li",{parentName:"ul"},"The change of the current account.")),(0,i.kt)("p",null,"The commands related to the wallet context requiring the user\u2019s confirmation in the wallet are:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Signing and sending a transaction to the blockchain,"),(0,i.kt)("li",{parentName:"ul"},"Signature of a list of transactions,"),(0,i.kt)("li",{parentName:"ul"},"Adding a service in the decentralized wallet.")),(0,i.kt)("h1",{id:"rpc-methods"},"RPC Methods"),(0,i.kt)("p",null,"There are two kinds of methods :"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"one time call"),(0,i.kt)("li",{parentName:"ul"},"subscriptions.")),(0,i.kt)("p",null,"Subscriptions won't be available on Deeplink channel because of technical limitations."),(0,i.kt)("h2",{id:"get_endpoint"},"get_endpoint"),(0,i.kt)("p",null,"Gets the endpoint URL used on AEWallet."),(0,i.kt)("h3",{id:"request"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// no payload in request\n")),(0,i.kt)("h3",{id:"success-response"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "endpointUrl": String // Endpoint URL\n}\n')),(0,i.kt)("h2",{id:"refresh_current_account"},"refresh_current_account"),(0,i.kt)("p",null,"Request the wallet to refresh current account info"),(0,i.kt)("h3",{id:"request-1"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// no payload in request\n")),(0,i.kt)("h3",{id:"success-response-1"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// no response\n")),(0,i.kt)("h2",{id:"get_accounts"},"get_accounts"),(0,i.kt)("p",null,"Gets the accounts avalaible on AEWallet."),(0,i.kt)("h3",{id:"request-2"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// No payload\n")),(0,i.kt)("h3",{id:"success-response-2"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "accounts": [\n {\n "shortName": String, // Account name\n "serviceName": String, // Service name\n "genesisAddress": String, // Genesis address\n }\n ]\n}\n')),(0,i.kt)("h2",{id:"send_transaction"},"send_transaction"),(0,i.kt)("p",null,"Signs and sends a transaction."),(0,i.kt)("h3",{id:"request-3"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "type": String, // Type of transaction\n "version": Number, // Version of the transaction (used for backward compatiblity)\n "data": Object, // Transaction data zone (identity, keychain, smart contract, etc.)\n "generateEncryptedSeedSC": bool // (Optional) : if true, add a encrypted (by storage nonce public key) seed in the transaction\'s ownerships to allow nodes to manage smart contract\n}\n')),(0,i.kt)("h3",{id:"success-response-3"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "transactionAddress": String, // Sent transaction address.\n "nbConfirmations": Number, // Number of received confirmations.\n "maxConfirmations": Number, // Max number of confirmations.\n}\n')),(0,i.kt)("h2",{id:"add_service"},"add_service"),(0,i.kt)("p",null,"Add a service in the keychain"),(0,i.kt)("h3",{id:"request-4"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "name": String, // Name of the service\n}\n')),(0,i.kt)("h3",{id:"success-response-4"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "transactionAddress": String, // Transaction address.\n "nbConfirmations": Number, // Number of received confirmations.\n "maxConfirmations": Number, // Max number of confirmations.\n}\n')),(0,i.kt)("h2",{id:"get_services_from_keychain"},"get_services_from_keychain"),(0,i.kt)("p",null,"Gets keychain's services from the keychain connected to AEWallet."),(0,i.kt)("h3",{id:"request-5"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// No payload\n")),(0,i.kt)("h3",{id:"success-response-5"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "services": [\n {\n "derivationPath": String, // Derivation path\n "curve": String, // Curve\n "hashAlgo": String // Hash Algo\n }\n ]\n}\n')),(0,i.kt)("h2",{id:"keychain_derive_keypair"},"keychain_derive_keypair"),(0,i.kt)("p",null,"Derive a keypair for the given service at the index given and get the public key"),(0,i.kt)("h3",{id:"request-6"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "serviceName": String, // Service name to identify the derivation path to use\n "index": Number, // Chain index to derive (optional - default to 0)\n "pathSuffix": String // Additional information to add to a service derivation path (optional - default to empty)\n}\n')),(0,i.kt)("h3",{id:"success-response-6"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "publicKey": String // Public key of the service at the index given\n}\n')),(0,i.kt)("h2",{id:"keychain_derive_address"},"keychain_derive_address"),(0,i.kt)("p",null,"Derive an address for the given service at the index given"),(0,i.kt)("h3",{id:"request-7"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "serviceName": String, // Service name to identify the derivation path to use\n "index": Number, // Chain index to derive (optional - default to 0)\n "pathSuffix": String // Additional information to add to a service derivation path (optional - default to empty)\n}\n')),(0,i.kt)("h3",{id:"success-response-7"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "address": String // Address derived\n}\n')),(0,i.kt)("h2",{id:"get_current_account"},"get_current_account"),(0,i.kt)("p",null,"Gets the current account selected on AEWallet."),(0,i.kt)("h3",{id:"request-8"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// No payload\n")),(0,i.kt)("h3",{id:"success-response-8"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "shortName": String, // Account name\n "serviceName": String, // Service name\n "genesisAddress": String, // Genesis address\n}\n')),(0,i.kt)("h2",{id:"sign_transactions"},"sign_transactions"),(0,i.kt)("p",null,"Signs many transactions."),(0,i.kt)("h3",{id:"request-9"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "serviceName": String, // Service name to use to sign the tx\n "pathSuffix": String, // Additional information to add to a service derivation path (optional)\n "transactions": [\n {\n "type": String, // Type of transaction\n "version": Number, // Version of the transaction (used for backward compatiblity)\n "data": Object // Transaction data zone (identity, keychain, smart contract, etc.)\n }\n ]\n}\n')),(0,i.kt)("h3",{id:"success-response-9"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "signedTxs": [\n {\n "address": String, // Address: hash of the new generated public key for the given transaction\n "previousPublicKey": String, // Previous generated public key matching the previous signature\n "previousSignature": String, // Signature from the previous public key\n "originSignature": String // Signature from the device which originated the transaction (used in the Proof of work)\n }\n ]\n}\n')),(0,i.kt)("h1",{id:"in-conclusion"},"In conclusion"),(0,i.kt)("p",null,"The communication protocol developed by Archethic allows an easy and secure interaction between dApps and the blockchain by delegating the communication to the user\u2019s wallet. The integration methods proposed are simple and efficient, especially thanks to the \u201cArchethic Wallet Client\u201d (AWC) communication library which facilitates the use of the API. Developers can focus on developing their application without having to manage communication with the wallet and the blockchain. This cross-platform solution is therefore a wise choice for developers who want to write dApps that are compatible with different platforms. Finally, the availability of interfaces in the \u201clibjs\u201d library also facilitates integration for developers of applications written in JavaScript."),(0,i.kt)("p",null,"Find more information at the following links."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"AEIP 4 / Specifications: ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-4.md"},"https://github.com/archethic-foundation/aeip/blob/main/AEIP-4.md")),(0,i.kt)("li",{parentName:"ul"},"AWC Dart lib: ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/archethic-wallet-client-dart"},"https://github.com/archethic-foundation/archethic-wallet-client-dart")),(0,i.kt)("li",{parentName:"ul"},"AWC JS lib (into archethic JS lib): ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/libjs"},"https://github.com/archethic-foundation/libjs"))))}d.isMDXComponent=!0},53148:(e,t,n)=>{n.d(t,{Z:()=>a});const a="data:image/webp;base64,UklGRhwXAABXRUJQVlA4WAoAAAAIAAAALgMAnQAAVlA4IDwWAABQdwCdASovA54APm0ylUkkIqGhIZC7SIANiWlu57MuFrbcRNq5pZHm/+zeE/+F/wv5DedP4j8v/ZfyC/JT8Wrh/zf9L/wPQv+Y/Yn79/Yv3M+Nn3XeCvwB/ivtm+QL8e/k39j/LT+68VvrvmEeo/zj/Nf3r95/818q3xv+79EPq9/nfcA/kn9H/yP5mfv/76fhF/af9F7AH8v/qn+g/xH5JfHj/2f5j8p/db+hf4z/nf5/4Cv5N/U/9r/f/8r+0nzmewb93PZe/cMdOs2kPrMLhxROXvHDkDVVmgzr7WcOKJy1cTHpq54JBmEF2pDdBru9hTI473fMiYA38fmMZIP5z0sbjh2dx7uEHgiivIrqUffhAZtbVfwgM2tqv4QHIdE2Es48Q473d8I7/UGW/j8ysoyRx3u+ZEvvrhkIQe/j71zNxVaC9NxoJlO09uO60sx9eI7yGLReT3WoyRx3u7i+xMjjvd8yJgDfx+ZWT8GU5l/upXT9c2C+5Ley5xBTkpXzI2nsyhzkNcvkKZ8jequCexdsYiYA38eqjp4Q6PdGkY+0+XPq1HNGtFdf1ii5pveYbxEJZF5Xk3pEw910fMKqxyF2yEH1PDgPCG1mrj1k2RkHrE3zgnnFugzynJ84Fp1FTipAJe9WiZYRQBDmiNiciLjRQl8fTJOVBdr9KcbK4Z6ACn826g8bGipGiHtQj8oBzQK78jAZtaTk5uBEILX0BTiejhtprytxwPlFMt34bHZ4vby0x2ZvWi8B7Qy9BS6csfZtS6NRx4nw3/x+ZWUI3uRXL5kS+4wG1RuYdAOTi2FNnIooOimEX4hzKr8xbIbDtodrliwrTN2wGhG6bObBYne/iNVVA1WyMNbB54LxErWZgjv/8ewcWHenap9kgHpyUYHp7dUlxIY6HksPDJoJyC5+YhazJi/G58ikB+eOBsuLyWdlJ96wPDoJ3qQCH2O8RPpFNf7Creu4Oy9gF8X+ZwmU3CpG4Ua0YecFjnWFIw69SMuQiS004AnAOgqTBH4G/4l2GkF0yt9+24caJYj02BaBbbwq7erTTeaJPqIV1eglHnkLniKZExk/8N231HN7sL2FMjjmiD0/WiasDfx+ZWWcUcd7vmJkaRKdQKZHHd8iZVkwbVGiVB3Z3bOBRBIELJo7SFksKawSPzKyjJHHe75kTAG/hylZqWoyRx3u7pLVdp7Qtsh4i3FLr8R1MeKX8PEy1wFEwBv4/MrKMkcd7vmQysVykuKGdN5Q4U2gzYyC21F0XvXkXIu800U1ukHgWAAA/vhdg/m8/mLYO03jNpSueHiiOQIggnsvHGXPLsogeY9WhcsaGqrgXOAKeyBdnhynUN/ijUQlXXgwASOX049LJqTtsJHNtkvBVzMark35Su3J/0ZrGHtQVrFenXxbOp4DA73mEG9dhUBO5xwCcKFT2GV6le4LYlgxD0zuJ98/ZKCoO1n8FO9OVUXbpdYRtvJH4AGtrTf743ZyfgLj6+kg58PV8Zk7WoKUasC2RTxB+swR16PCDZOtKlKRxSXC5y7jXsFwjXtMWoU5guiGyCvAekbNpM0+WvcJLzCGu1Ak7FCBGS/wn0JmSsg6TWPLzDHCJEk7hfnQZ3hN8x1vnQTBQ3uT0+NnolBhx9A4/9M7JCnj1yr8hUtPMCdcSaGPZnctugHhDFO4J5EYCXWQ3YGfr/i5MYyoiunPfIDhAP1Om30NrB2p9vWBerJI4Z9gskve9WggNCfg9+eJZ1hhivfrgKaOolQe/HmOBHUkGFYGLfxaIOx+mHegohR2dRVcFnGYvtSq0Hn34PfcmUkwILSUNY02bCW6Ujr/QbHpep+yoseo7evzPKUbDMaqfpYXW5mn03QX/KdJ3h7dunHSNuqgJn+xXCmI6D2+97zd5AoW8s2XyAHTslfOy3lP+33PJisTNBFsyClhAoDaYTbI3T2CtCMYvQ2+qqTunIKfkJUsrZBq6ozoal/OuWF1O5ZapeLBxSUrlV9uwF0efcvTd9LTGSR35Lmnv/1oLeEPZorP4+FqI1Xz4SD5uPmkEux+VxzmPIWce7X8oFTygCmf9AlElEUzF1GxPK9GdfJV+eAPXNQ/v0Nlg8iP5jKhT/T/pSntRTXnwYUYqeCabj6SEQQLad6xa1dvIE11m1fspGrM2cd3QpYy6M9jRrnveGAa7U/7LNs1f6AQqPyHLRKh6m/c1/uxtPp/Ltv7ZzW4bR5kTz/AtUZetGYj1Muq/JM9KKJd+VY/v7Hz3On3kEXx7f8521HSdYZOc7/aSP+42TZ+bX4gZXYmxcb+W7yMPugDYlzIZoFgHsZEw2R1tZ0WkzSaN8eP7PaR+EyStWYIBsDeSdNCbJANGsr4Sls3FQEg52pSJfb5Kf/RsBAULqZRQQAFjgblpaEgpS3KUVGoOmysoih9af3+AOplCNpS5Dw5zxtgGd3aCIlNJ4dWOAVuVNGS7JouDcsMP33BkKARdcXejTw8C+etJMmbFEL2q1CpKRdt8jHrqSDBMLDtfzMj6lIw3IIKhEqXVrrLol9fGhudb3co8zj3PcRTSm4YlpeMcg7Ttyb/0NLWyMC3qkV3LRi36Zj6LVW1hObnZai/3KMcbfmFhp+J9SIB657dKOivZjJoYWEDclHLvSAT5ZrKcJ1PzwjifELiojZoJLJ+iVej+uaDBsWD3hqkeLWL8p46tLQfwU17ZXlPVpvmzC1tS8zV+vYo5pwDps/oqA7KszY9OMwmkWjsSh+kY+4zU4yCFIwLRq8OI6O5WrxxL59hWUa09nglJtu9aCGda13iSBCSPLT+tjP/0t227UOQ+y9hz3v0KyzQGDwJ6q2RIIsnmd+rvx6nVXgjg4ovfCH/MGCnItWJpDRr4hIGtyP0aWBNrTPauvJsNvpYWmFTnABFrhNHt/ep0VguNdp/+wOKfVqNQEo97z4P2BJrygrn8cKzepNbGbbFaPRtCS65zjMIWiFjZBjsG4w0HspZ/j/y68t8b3QbUO3OqP6m/Xju93r54l/58LWp+D6ssn3Gx5mkcH7YXBRvPwm643dT+0E5fazTRFS3K4CW052HBWl5Y3nEZqdEOv3z4wPRvERoYhZu0coWlsfzS3fxvBj+hKQGG9OxtawE9tV4ZUKfK/DVmFigoPojOXv37/lst/ZokufD8ZcgG/yqhtPNmyEFH6OTnCTjC3ryCry1VWiz9AYKuu72qaEuKbZHcMvMjCvLDqlaLxP71uEgq/rbOCk5MV4PWH9/PAyxit+H++H9V1dvwc3U9N1flz7TQ4v/cyOa0GF0KoQvneQzGKhzysgn/jzUq/mUZhMoPkFy3qaNOXUNdyVvmkd2i0Ayb0KPHT38edNhw63FzePlUndQ1cKgAsyrO3leSdyF8Mskc9U2sx6P//5Qtd7cKS3F8mCuvspq2ozBgtSsWgvAXND4/Ed/oZHM92SS2f3gL95HuTx8mnOXx125vETwbFWJ7YhvYOdoQRiCiiBUyeCrRYX1Mkog/UXyhM6IPPv13C9nYwdVwmBH4KkYmZBKfe6OEdvUmkOGYJXPobXTbSf27n4ijMmCK42qUBK262gyaEtcdFeafEkIwqLMqh+2zu7tuCZSSKtdDe6f3O5dDDcuub2XhvZmPfDIlXBMMBBZ1AfHHsXL9/kdHPHCrRpE/ppb74oNOzDUqz05Cum9ZHGRD/ZIdM8RUus8jJ5x2nil08pjdF5yHB9IRGSf3eDTtOtEZgOpHbHGs+mtjiGjVK2K0+lZsb9EdD/0DY/fdnBk9EbyL4ynCoAIXkDQGitB91DxsPfsMIHBPM3M93+hR0sW3vYkyQhAskSkA+f7J26WpA1um7pOmk3S+l1E/zNDdaomjvFb5gIEugVpWvd1hVjch/O1yAZb1Lbu6j4CLvAk8FoNY4zgdNReX7BUZz5x7rv1N2VT4h6udRjtlR0UIWiyuefdDG0tKERk1Oc6UDaXqy2RXvrM+1a+QW3X3lGTNhJPmBbjppcOcYFrYg76TUqcmswRnkJO/3dEWmTHmZ+mj8QkD6Ynk12bFGYDmm4zo4RvC3PdnvOB+2AulTWPeKTpin1zBhgcQLmtcnHjdXtNjvc1nsi8MARwEd0SKhffEP9aVhaS063uZ29cwJuWJwAwic+mbp+8goNmQBTm9qscxTUzIxp3dhNoYe2CBnQ4rxo357oBdqdhyky8Bl/0HjJgi7AoEy7/EodlOsBDUZaa3k2Bk4eopn078qGKMx/fgv4a/PgHSaJmqtM3iwt3AaN/B2XMnltopoa8zeMeIu63k4jBAPh6+/hQ2yuaXc4f75dJkB7Gkts9Y1s5LNzf7dc18xD6aefse9YlRGt8Wt4ezhsgCRTpMXr6phncT3RAepd6wEHxeYo7KmKvyfv9VX2g53KqoFfs9gPZEI2xkHgIMXYr4Y2AByV8V/XQbKsMZQk7ukYTawpwGxeQato8hN39bQ2h3w/sIc1NSHKqyKZ5LGHRKcKCXY+kaL90SOEPyRM6WI4A9ni65k/8ZFf87WPyKgrNiIOc/wMFfYsnMbupIgcyizLqm1i/60xKkP7AZ6MlIzQ8jDrRZc0zh5GsgawqycGjkOZmjCB60Ycqy/CsK9R6LxoRZX0e46V/P2c1lyYQeKLMnrz7mFzkgk48z4Awn5odqrHGB/aEYuGhm3exfP1rPVbtdrnntnqHFxIMCZP0sMawpdWUi5o8gByndt1v2nqGaeKAFlrTAcZABjcLlN9pKL+WL/BcnTQAQA/CkmlSwH5nmp1IK1ZYVK/H8uhW/DjMuMFqQ6VwZm2uBy6eBR/OFq6pjdAuiwWdDePSYIDNdbb0dsJRWsVUsRJf7e2tDnhhGmLYfqpRYQT1LSao3YWwdYhxIetaGOnpZeX/95F50s0Ki3yCmwBdlXwAMx1rF2T37vZ0k7C8rz5SOefqPG9qjyEfA3Ss3X40pueeKnv5n0vM8Yz/aLnFX9HDLRL0xmxS8Hh3TmUyDLedlL/BU4b+y07bkQuc6MZotRauyrh0mojzSeGQjSHHvi7TRCeAKLhIoiw6xnEusX7B7yVVjWcxnDtNPG/yo7ERnHEIKE9NxrkPylIwIy3Ftni9ji/xRPTt1ozBvPg5CYW/M10nWj8y2K8PE9Su0tX4pA6t2TI+9p3bNjeQcofie39WIt3rU62AE5tHhi1NStrlqyYumd/eIcFwCuEqqHCj7tC4dPVRIUSYg5lthCskwPJgmsoVGGXSvev4pMNE/NeJ5M4Wq7m85JijTa3EeSMzNILg/v15d3fDPtYYAZmHEWfdJ8Rq561HfS1e28HnFSNpV5wsq8FqqnsxIlHlG1mNj+j/mKeQsaMBSGcivn3SRO6UeJarQQ0Letgfg6wJioaZVYfajwU6uL5iasBJanexrlNwyHZQx497ZcSJN7DTbvDkf9ovvRWqyyvwlZvfj0B2hR+IM0kA/OvJF/IcL0CMone/0eIf6a29hhln/3gptOSKlhiVQWUJ+q99vaTrGQvv07XWvJcY7je27Cddv1//3+db8Tgc337wuLRPsw25Ql5uQmor4tZ3i8dRdLNpmSSN2VUhymBz/ALLAPKJuz5mT1DAlWxPTi2WPJjKEOpbUHVZ6+cb0pXTd8HBaNFc7YPiD1QxmMX7qQqbXwL099DxcNxXD9GwViIshy1vzKOUuonZgCJ2sAWZiaRZUAyOwb3WjsLH/ETVN0MofjDJym5qBdUzuLgJjRM846zFcrPfq3/O/8z3rZbdp+T+XOzirMHnMr1PHkNUmQhfpDBiwH89cdrd+sCbhzvpOokH3QB+5iNoAXSqNFKb9TPcGTn85eZngzToZB1gxk5xJ3/ip6yby/hg/1CBwm8pzclhqHdegjAOzJNBMHabspBNr9kUh9alRTTjihh0xUzihpMh1cd8FJIqsDbWrzuRIg7zL02NyAQRFrwmj4nIY8bd3NC6iNNV6lfGaf7y1ic4caVTjQu1E6O2TDVUL7/DQq1pyilULk5o2tr2BQY5NFvf55viOinfh15FHEOkyQ2Ydu3ofpmRfzMBf7nKl5T+Y2No/uHNz7YokGTuf8NXi5NomVUogR4DItY4luy13jNtksNGDaSFXGdG+eS6Qb62xtv7iq0rjo+FEvT+2U0ing/u7796OGbzMHpGrXJyTm3leyUucpA00nmlJquTx4/RsmC5Bb2gwWfr+f4hPDq/JqceNUcpu0/3V6GGZC1vtpDFvMjNoNuEBASzrZYDUhMOd4OXEqMYRZo7FTpxOdAEU442spUvcCtifiijDGq/lKXdWjf1my6VnMlXywVMTKsvQeh9Ymb7Vsk8od3Wi/1spmRIxUyFeqq53zDinuKzP7rgQ/GF7gdwxAyXVWMoH/masCujUqH6cFYL9Rg4IeMgwBwmIxUpjboAdQcnPmSmoEGjcS488U5PyJrNgraIPmqFblPmtVBbp0VeLPLy6YOLTMg2bVXW7Guzs8eoJvTuZDUAR7up1j6O90/YdCs01Jqd1vtKoebkz4PN8n7TrF4JZB3R6x+ZWSQz6n8NECCXiyf+fHNbLwmn2uc4Omy5Qfo5DEfUqvjL4EQiGhHvkfsfGv20xRQ3WaTAchJK50hf4FXUviVyYg+79dQgbx22TVnv7kLktSULFfXYzavUtizpGQaNM2h7PX70WnFhGOFt5HQMVI0dERWcbvU9FgmZv08uKAAjTT63ySTZ4NeJBYQC+jXvkyE+F7Y+E3hSs085PGYA+/LQXqAtPUgNh10VBRXHIb1YsCNyzxEWJ87NH1juWH/6Bh0e91AEjfyP1aSnugjMpEDFvAZ+oUVTK//1VCth0i8UZBtCoEUzMqLBYAtHF3vr2PIf8/+Cest6Zp3JFIJMiZ+UNMt3AJrcUWqeA9mV14mvTK7vAjpQs7Nu2yrgCvvGDXCtYvAk2tNzRDdCmrlJL4N3RUAaYsw2MYrDXLpKdOjssWopI7yc7Uoi+TGstJmLkAgTh11VNhyR+hkF8mP2hJPEblEWcXyiQVPU6z34oz7inOQhSzcPaAhlex3gJZWrlorlRfXrUQK6aI5k+lcAAUEdtRxefYCDhvC/gUYFp04k1LToAQoZuE/VJSVz6gLIxLq/VN5PfMbA+KyMLq4get6B9o//zGkn/AU4F10I9nkiGo4fmmM61ZT0WL3S6GA2ZLKK688wdfKvc/iuBau4WHQq2WzaBApOx5eCYwuRUwwW1O+N5rIKDymflv8QOPojX6QPR8Iepof7hTcirYmenQ5UC+4Y0z/XBCf6goOkxHNRTN7OeViTtRN2fgrQUTx2fHn8Oq+oe37O66zhDQYVW6oWJwxpvFEOA+vGWxnB3IqZRIYuSL4+n8D3DS7A9c+qii0HkDtZ18G0LmTPzS/yD4AZJNhY7W69WTdC7g8sf8JG05ZCQAIdDfctu4E/9TsXvA0cvi20qT1KyjtuuiGAHO2697jni/PkY/c6XMTYaNdIM3V7JOLbCY61Gvx9uKteHFqJZuvBqv+lo2RyUYLRujwnYABoU62w9+uXHJSejenONHe1nHK7v1/ycY4xIQKrcUg6xzUzMV4DgtaSoazm5sVxEC4HdZmdZXoPLraKsGatvWPd580t/jS2flQwJgAARVhJRroAAABFeGlmAABJSSoACAAAAAYAEgEDAAEAAAABAAAAGgEFAAEAAABWAAAAGwEFAAEAAABeAAAAKAEDAAEAAAACAAAAEwIDAAEAAAABAAAAaYcEAAEAAABmAAAAAAAAAEgAAAABAAAASAAAAAEAAAAGAACQBwAEAAAAMDIxMAGRBwAEAAAAAQIDAACgBwAEAAAAMDEwMAGgAwABAAAA//8AAAKgBAABAAAALwMAAAOgBAABAAAAngAAAAAAAAA="},13886:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/2-5d6085ceb76c0bd0ffdb9a438a83d08d.webp"},61079:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-3258cf4b259426fbb84541316eca5d55.webp"},88268:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2fb8682543e15e738aacb6684b57b221.webp"},4389:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-997d8657ade91f1c2a419d5187b3de61.webp"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/e98eede6.a0308bf7.js b/assets/js/e98eede6.a0308bf7.js new file mode 100644 index 000000000..301878fe6 --- /dev/null +++ b/assets/js/e98eede6.a0308bf7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9185],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=l(n),h=i,m=u["".concat(c,".").concat(h)]||u[h]||d[h]||r;return n?a.createElement(m,s(s({ref:t},p),{},{components:n})):a.createElement(m,s({ref:t},p))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,s=new Array(r);s[0]=h;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[u]="string"==typeof e?e:i,s[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"dapps-communication",title:"Communication with DApps",sidebar_label:"Communication with DApps",sidebar_position:1},s=void 0,o={unversionedId:"participate/wallet/dapps-communication",id:"participate/wallet/dapps-communication",title:"Communication with DApps",description:"In the blockchain ecosystem, decentralized applications (dApps) are becoming increasingly popular. To enable reliable and secure communication between these applications and the blockchain, Archethic has developed a communication protocol with its Archethic Wallet application. This protocol allows dApps to delegate secure communication with the blockchain to the wallet and to protect private information within the wallet (seed, private keys) without exposing it to the dApps.",source:"@site/docs/participate/wallet/dapps-communication.md",sourceDirName:"participate/wallet",slug:"/participate/wallet/dapps-communication",permalink:"/participate/wallet/dapps-communication",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",sidebarPosition:1,frontMatter:{id:"dapps-communication",title:"Communication with DApps",sidebar_label:"Communication with DApps",sidebar_position:1},sidebar:"docs",previous:{title:"Archethic Wallet",permalink:"/participate/wallet/"},next:{title:"Build",permalink:"/category/build"}},c={},l=[{value:"get_endpoint",id:"get_endpoint",level:2},{value:"Request",id:"request",level:3},{value:"Success Response",id:"success-response",level:3},{value:"refresh_current_account",id:"refresh_current_account",level:2},{value:"Request",id:"request-1",level:3},{value:"Success Response",id:"success-response-1",level:3},{value:"get_accounts",id:"get_accounts",level:2},{value:"Request",id:"request-2",level:3},{value:"Success Response",id:"success-response-2",level:3},{value:"send_transaction",id:"send_transaction",level:2},{value:"Request",id:"request-3",level:3},{value:"Success Response",id:"success-response-3",level:3},{value:"add_service",id:"add_service",level:2},{value:"Request",id:"request-4",level:3},{value:"Success Response",id:"success-response-4",level:3},{value:"get_services_from_keychain",id:"get_services_from_keychain",level:2},{value:"Request",id:"request-5",level:3},{value:"Success Response",id:"success-response-5",level:3},{value:"keychain_derive_keypair",id:"keychain_derive_keypair",level:2},{value:"Request",id:"request-6",level:3},{value:"Success Response",id:"success-response-6",level:3},{value:"keychain_derive_address",id:"keychain_derive_address",level:2},{value:"Request",id:"request-7",level:3},{value:"Success Response",id:"success-response-7",level:3},{value:"get_current_account",id:"get_current_account",level:2},{value:"Request",id:"request-8",level:3},{value:"Success Response",id:"success-response-8",level:3},{value:"sign_transactions",id:"sign_transactions",level:2},{value:"Request",id:"request-9",level:3},{value:"Success Response",id:"success-response-9",level:3}],p={toc:l},u="wrapper";function d(e){let{components:t,...r}=e;return(0,i.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"In the blockchain ecosystem, decentralized applications (dApps) are becoming increasingly popular. To enable reliable and secure communication between these applications and the blockchain, Archethic has developed a communication protocol with its Archethic Wallet application. This protocol allows dApps to delegate secure communication with the blockchain to the wallet and to protect private information within the wallet (seed, private keys) without exposing it to the dApps."),(0,i.kt)("h1",{id:"point-of-view-on-usage"},"Point of view on usage"),(0,i.kt)("p",null,"When a dApp wants to perform a transaction that requires the use of private keys, it must call on the user\u2019s wallet to protect this information and avoid unauthorized exposure. There are several ways to do this:"),(0,i.kt)("p",null,"The dApp can solicit the wallet in a \u201ccovert\u201d manner without requiring the user\u2019s intervention. For example, it can retrieve information about the current account or services available in the decentralized wallet."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"1",src:n(53148).Z,width:"815",height:"158"})),(0,i.kt)("p",null,"The dApp can also listen to the wallet and adapt itself according to the actions performed in it. For example, a change in the current account in the wallet may result in a change in the current account in the dApp."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"2",src:n(13886).Z,width:"1004",height:"295"})),(0,i.kt)("p",null,"Finally, the dApp can solicit the wallet and ask the user to confirm an action. For example, this could be the signing of a transaction."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"3",src:n(61079).Z,width:"1262",height:"420"})),(0,i.kt)("h1",{id:"technical-point-of-view"},"Technical point of view"),(0,i.kt)("p",null,"In order not to limit the platforms, Archethic has implemented two protocols to allow an easy integration of its wallet with dApps:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"For Desktop and Web Client platforms, Archethic uses the Local RPC server protocol. A WebSocket server is provided by Archethic Wallet, using the JSON-RPC 2.0 protocol. DApp developers can use the Dart or JS coded communication libraries provided by Archethic to easily integrate this functionality into their dApp."),(0,i.kt)("li",{parentName:"ul"},"For Mobile platforms, Archethic uses DeepLinks via an HTTPS URL to enable communication between the dApp and the Archethic wallet.")),(0,i.kt)("p",null,"For the Dart and Flutter part, these protocols have been implemented within the \u201cArchethic Wallet Client\u201d (AWC) communication library, which therefore allows Dapps to communicate with the Archethic wallet through a unified interface."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"4",src:n(88268).Z,width:"1321",height:"685"})),(0,i.kt)("p",null,"AWC supports several API methods, including signing and sending transactions to the Archethic blockchain, retrieving the wallet\u2019s endpoint URL, retrieving accounts available on the wallet, adding services to the keychain, and more."),(0,i.kt)("p",null,"Using AWC allows Dapps developers to focus on developing their application rather than managing communication with the wallet and blockchain. The solution is also cross-platform (macOS, iOS, Android, Web, Windows, Linux), which facilitates the interaction between users and the blockchain and avoids forcing developers to develop their Dapps on a specific platform."),(0,i.kt)("p",null,"It is worth noting that for the JS part, developers can find the interfaces directly in the \u201clibjs\u201d library of Archethic. This greatly facilitates the integration of the wallet with dApps written in JavaScript."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"5",src:n(4389).Z,width:"1321",height:"684"})),(0,i.kt)("h1",{id:"available-commands"},"Available commands"),(0,i.kt)("p",null,"The wallet context related commands that do not require user confirmation in the wallet are:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Endpoint retrieval,"),(0,i.kt)("li",{parentName:"ul"},"Recovery of user accounts,"),(0,i.kt)("li",{parentName:"ul"},"Recovery of the current account,"),(0,i.kt)("li",{parentName:"ul"},"Recovery of the services contained in the decentralized wallet,"),(0,i.kt)("li",{parentName:"ul"},"Derivation of a key pair for a given service and index and recovery of the public key,"),(0,i.kt)("li",{parentName:"ul"},"Deriving an address for a given service and index.")),(0,i.kt)("p",null,"The information that can be listened to is:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"The change of balance or last address of the current account,"),(0,i.kt)("li",{parentName:"ul"},"The change of the current account.")),(0,i.kt)("p",null,"The commands related to the wallet context requiring the user\u2019s confirmation in the wallet are:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Signing and sending a transaction to the blockchain,"),(0,i.kt)("li",{parentName:"ul"},"Signature of a list of transactions,"),(0,i.kt)("li",{parentName:"ul"},"Adding a service in the decentralized wallet.")),(0,i.kt)("h1",{id:"rpc-methods"},"RPC Methods"),(0,i.kt)("p",null,"There are two kinds of methods :"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"one time call"),(0,i.kt)("li",{parentName:"ul"},"subscriptions.")),(0,i.kt)("p",null,"Subscriptions won't be available on Deeplink channel because of technical limitations."),(0,i.kt)("h2",{id:"get_endpoint"},"get_endpoint"),(0,i.kt)("p",null,"Gets the endpoint URL used on AEWallet."),(0,i.kt)("h3",{id:"request"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// no payload in request\n")),(0,i.kt)("h3",{id:"success-response"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "endpointUrl": String // Endpoint URL\n}\n')),(0,i.kt)("h2",{id:"refresh_current_account"},"refresh_current_account"),(0,i.kt)("p",null,"Request the wallet to refresh current account info"),(0,i.kt)("h3",{id:"request-1"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// no payload in request\n")),(0,i.kt)("h3",{id:"success-response-1"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// no response\n")),(0,i.kt)("h2",{id:"get_accounts"},"get_accounts"),(0,i.kt)("p",null,"Gets the accounts avalaible on AEWallet."),(0,i.kt)("h3",{id:"request-2"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// No payload\n")),(0,i.kt)("h3",{id:"success-response-2"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "accounts": [\n {\n "shortName": String, // Account name\n "serviceName": String, // Service name\n "genesisAddress": String, // Genesis address\n }\n ]\n}\n')),(0,i.kt)("h2",{id:"send_transaction"},"send_transaction"),(0,i.kt)("p",null,"Signs and sends a transaction."),(0,i.kt)("h3",{id:"request-3"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "type": String, // Type of transaction\n "version": Number, // Version of the transaction (used for backward compatiblity)\n "data": Object, // Transaction data zone (identity, keychain, smart contract, etc.)\n "generateEncryptedSeedSC": bool // (Optional) : if true, add a encrypted (by storage nonce public key) seed in the transaction\'s ownerships to allow nodes to manage smart contract\n}\n')),(0,i.kt)("h3",{id:"success-response-3"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "transactionAddress": String, // Sent transaction address.\n "nbConfirmations": Number, // Number of received confirmations.\n "maxConfirmations": Number, // Max number of confirmations.\n}\n')),(0,i.kt)("h2",{id:"add_service"},"add_service"),(0,i.kt)("p",null,"Add a service in the keychain"),(0,i.kt)("h3",{id:"request-4"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "name": String, // Name of the service\n}\n')),(0,i.kt)("h3",{id:"success-response-4"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "transactionAddress": String, // Transaction address.\n "nbConfirmations": Number, // Number of received confirmations.\n "maxConfirmations": Number, // Max number of confirmations.\n}\n')),(0,i.kt)("h2",{id:"get_services_from_keychain"},"get_services_from_keychain"),(0,i.kt)("p",null,"Gets keychain's services from the keychain connected to AEWallet."),(0,i.kt)("h3",{id:"request-5"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// No payload\n")),(0,i.kt)("h3",{id:"success-response-5"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "services": [\n {\n "derivationPath": String, // Derivation path\n "curve": String, // Curve\n "hashAlgo": String // Hash Algo\n }\n ]\n}\n')),(0,i.kt)("h2",{id:"keychain_derive_keypair"},"keychain_derive_keypair"),(0,i.kt)("p",null,"Derive a keypair for the given service at the index given and get the public key"),(0,i.kt)("h3",{id:"request-6"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "serviceName": String, // Service name to identify the derivation path to use\n "index": Number, // Chain index to derive (optional - default to 0)\n "pathSuffix": String // Additional information to add to a service derivation path (optional - default to empty)\n}\n')),(0,i.kt)("h3",{id:"success-response-6"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "publicKey": String // Public key of the service at the index given\n}\n')),(0,i.kt)("h2",{id:"keychain_derive_address"},"keychain_derive_address"),(0,i.kt)("p",null,"Derive an address for the given service at the index given"),(0,i.kt)("h3",{id:"request-7"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "serviceName": String, // Service name to identify the derivation path to use\n "index": Number, // Chain index to derive (optional - default to 0)\n "pathSuffix": String // Additional information to add to a service derivation path (optional - default to empty)\n}\n')),(0,i.kt)("h3",{id:"success-response-7"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "address": String // Address derived\n}\n')),(0,i.kt)("h2",{id:"get_current_account"},"get_current_account"),(0,i.kt)("p",null,"Gets the current account selected on AEWallet."),(0,i.kt)("h3",{id:"request-8"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"// No payload\n")),(0,i.kt)("h3",{id:"success-response-8"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "shortName": String, // Account name\n "serviceName": String, // Service name\n "genesisAddress": String, // Genesis address\n}\n')),(0,i.kt)("h2",{id:"sign_transactions"},"sign_transactions"),(0,i.kt)("p",null,"Signs many transactions."),(0,i.kt)("h3",{id:"request-9"},"Request"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "serviceName": String, // Service name to use to sign the tx\n "pathSuffix": String, // Additional information to add to a service derivation path (optional)\n "transactions": [\n {\n "type": String, // Type of transaction\n "version": Number, // Version of the transaction (used for backward compatiblity)\n "data": Object // Transaction data zone (identity, keychain, smart contract, etc.)\n }\n ]\n}\n')),(0,i.kt)("h3",{id:"success-response-9"},"Success Response"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},'{\n "signedTxs": [\n {\n "address": String, // Address: hash of the new generated public key for the given transaction\n "previousPublicKey": String, // Previous generated public key matching the previous signature\n "previousSignature": String, // Signature from the previous public key\n "originSignature": String // Signature from the device which originated the transaction (used in the Proof of work)\n }\n ]\n}\n')),(0,i.kt)("h1",{id:"in-conclusion"},"In conclusion"),(0,i.kt)("p",null,"The communication protocol developed by Archethic allows an easy and secure interaction between dApps and the blockchain by delegating the communication to the user\u2019s wallet. The integration methods proposed are simple and efficient, especially thanks to the \u201cArchethic Wallet Client\u201d (AWC) communication library which facilitates the use of the API. Developers can focus on developing their application without having to manage communication with the wallet and the blockchain. This cross-platform solution is therefore a wise choice for developers who want to write dApps that are compatible with different platforms. Finally, the availability of interfaces in the \u201clibjs\u201d library also facilitates integration for developers of applications written in JavaScript."),(0,i.kt)("p",null,"Find more information at the following links."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"AEIP 4 / Specifications: ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/aeip/blob/main/AEIP-4.md"},"https://github.com/archethic-foundation/aeip/blob/main/AEIP-4.md")),(0,i.kt)("li",{parentName:"ul"},"AWC Dart lib: ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/archethic-wallet-client-dart"},"https://github.com/archethic-foundation/archethic-wallet-client-dart")),(0,i.kt)("li",{parentName:"ul"},"AWC JS lib (into archethic JS lib): ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/archethic-foundation/libjs"},"https://github.com/archethic-foundation/libjs"))))}d.isMDXComponent=!0},53148:(e,t,n)=>{n.d(t,{Z:()=>a});const a="data:image/webp;base64,UklGRhwXAABXRUJQVlA4WAoAAAAIAAAALgMAnQAAVlA4IDwWAABQdwCdASovA54APm0ylUkkIqGhIZC7SIANiWlu57MuFrbcRNq5pZHm/+zeE/+F/wv5DedP4j8v/ZfyC/JT8Wrh/zf9L/wPQv+Y/Yn79/Yv3M+Nn3XeCvwB/ivtm+QL8e/k39j/LT+68VvrvmEeo/zj/Nf3r95/818q3xv+79EPq9/nfcA/kn9H/yP5mfv/76fhF/af9F7AH8v/qn+g/xH5JfHj/2f5j8p/db+hf4z/nf5/4Cv5N/U/9r/f/8r+0nzmewb93PZe/cMdOs2kPrMLhxROXvHDkDVVmgzr7WcOKJy1cTHpq54JBmEF2pDdBru9hTI473fMiYA38fmMZIP5z0sbjh2dx7uEHgiivIrqUffhAZtbVfwgM2tqv4QHIdE2Es48Q473d8I7/UGW/j8ysoyRx3u+ZEvvrhkIQe/j71zNxVaC9NxoJlO09uO60sx9eI7yGLReT3WoyRx3u7i+xMjjvd8yJgDfx+ZWT8GU5l/upXT9c2C+5Ley5xBTkpXzI2nsyhzkNcvkKZ8jequCexdsYiYA38eqjp4Q6PdGkY+0+XPq1HNGtFdf1ii5pveYbxEJZF5Xk3pEw910fMKqxyF2yEH1PDgPCG1mrj1k2RkHrE3zgnnFugzynJ84Fp1FTipAJe9WiZYRQBDmiNiciLjRQl8fTJOVBdr9KcbK4Z6ACn826g8bGipGiHtQj8oBzQK78jAZtaTk5uBEILX0BTiejhtprytxwPlFMt34bHZ4vby0x2ZvWi8B7Qy9BS6csfZtS6NRx4nw3/x+ZWUI3uRXL5kS+4wG1RuYdAOTi2FNnIooOimEX4hzKr8xbIbDtodrliwrTN2wGhG6bObBYne/iNVVA1WyMNbB54LxErWZgjv/8ewcWHenap9kgHpyUYHp7dUlxIY6HksPDJoJyC5+YhazJi/G58ikB+eOBsuLyWdlJ96wPDoJ3qQCH2O8RPpFNf7Creu4Oy9gF8X+ZwmU3CpG4Ua0YecFjnWFIw69SMuQiS004AnAOgqTBH4G/4l2GkF0yt9+24caJYj02BaBbbwq7erTTeaJPqIV1eglHnkLniKZExk/8N231HN7sL2FMjjmiD0/WiasDfx+ZWWcUcd7vmJkaRKdQKZHHd8iZVkwbVGiVB3Z3bOBRBIELJo7SFksKawSPzKyjJHHe75kTAG/hylZqWoyRx3u7pLVdp7Qtsh4i3FLr8R1MeKX8PEy1wFEwBv4/MrKMkcd7vmQysVykuKGdN5Q4U2gzYyC21F0XvXkXIu800U1ukHgWAAA/vhdg/m8/mLYO03jNpSueHiiOQIggnsvHGXPLsogeY9WhcsaGqrgXOAKeyBdnhynUN/ijUQlXXgwASOX049LJqTtsJHNtkvBVzMark35Su3J/0ZrGHtQVrFenXxbOp4DA73mEG9dhUBO5xwCcKFT2GV6le4LYlgxD0zuJ98/ZKCoO1n8FO9OVUXbpdYRtvJH4AGtrTf743ZyfgLj6+kg58PV8Zk7WoKUasC2RTxB+swR16PCDZOtKlKRxSXC5y7jXsFwjXtMWoU5guiGyCvAekbNpM0+WvcJLzCGu1Ak7FCBGS/wn0JmSsg6TWPLzDHCJEk7hfnQZ3hN8x1vnQTBQ3uT0+NnolBhx9A4/9M7JCnj1yr8hUtPMCdcSaGPZnctugHhDFO4J5EYCXWQ3YGfr/i5MYyoiunPfIDhAP1Om30NrB2p9vWBerJI4Z9gskve9WggNCfg9+eJZ1hhivfrgKaOolQe/HmOBHUkGFYGLfxaIOx+mHegohR2dRVcFnGYvtSq0Hn34PfcmUkwILSUNY02bCW6Ujr/QbHpep+yoseo7evzPKUbDMaqfpYXW5mn03QX/KdJ3h7dunHSNuqgJn+xXCmI6D2+97zd5AoW8s2XyAHTslfOy3lP+33PJisTNBFsyClhAoDaYTbI3T2CtCMYvQ2+qqTunIKfkJUsrZBq6ozoal/OuWF1O5ZapeLBxSUrlV9uwF0efcvTd9LTGSR35Lmnv/1oLeEPZorP4+FqI1Xz4SD5uPmkEux+VxzmPIWce7X8oFTygCmf9AlElEUzF1GxPK9GdfJV+eAPXNQ/v0Nlg8iP5jKhT/T/pSntRTXnwYUYqeCabj6SEQQLad6xa1dvIE11m1fspGrM2cd3QpYy6M9jRrnveGAa7U/7LNs1f6AQqPyHLRKh6m/c1/uxtPp/Ltv7ZzW4bR5kTz/AtUZetGYj1Muq/JM9KKJd+VY/v7Hz3On3kEXx7f8521HSdYZOc7/aSP+42TZ+bX4gZXYmxcb+W7yMPugDYlzIZoFgHsZEw2R1tZ0WkzSaN8eP7PaR+EyStWYIBsDeSdNCbJANGsr4Sls3FQEg52pSJfb5Kf/RsBAULqZRQQAFjgblpaEgpS3KUVGoOmysoih9af3+AOplCNpS5Dw5zxtgGd3aCIlNJ4dWOAVuVNGS7JouDcsMP33BkKARdcXejTw8C+etJMmbFEL2q1CpKRdt8jHrqSDBMLDtfzMj6lIw3IIKhEqXVrrLol9fGhudb3co8zj3PcRTSm4YlpeMcg7Ttyb/0NLWyMC3qkV3LRi36Zj6LVW1hObnZai/3KMcbfmFhp+J9SIB657dKOivZjJoYWEDclHLvSAT5ZrKcJ1PzwjifELiojZoJLJ+iVej+uaDBsWD3hqkeLWL8p46tLQfwU17ZXlPVpvmzC1tS8zV+vYo5pwDps/oqA7KszY9OMwmkWjsSh+kY+4zU4yCFIwLRq8OI6O5WrxxL59hWUa09nglJtu9aCGda13iSBCSPLT+tjP/0t227UOQ+y9hz3v0KyzQGDwJ6q2RIIsnmd+rvx6nVXgjg4ovfCH/MGCnItWJpDRr4hIGtyP0aWBNrTPauvJsNvpYWmFTnABFrhNHt/ep0VguNdp/+wOKfVqNQEo97z4P2BJrygrn8cKzepNbGbbFaPRtCS65zjMIWiFjZBjsG4w0HspZ/j/y68t8b3QbUO3OqP6m/Xju93r54l/58LWp+D6ssn3Gx5mkcH7YXBRvPwm643dT+0E5fazTRFS3K4CW052HBWl5Y3nEZqdEOv3z4wPRvERoYhZu0coWlsfzS3fxvBj+hKQGG9OxtawE9tV4ZUKfK/DVmFigoPojOXv37/lst/ZokufD8ZcgG/yqhtPNmyEFH6OTnCTjC3ryCry1VWiz9AYKuu72qaEuKbZHcMvMjCvLDqlaLxP71uEgq/rbOCk5MV4PWH9/PAyxit+H++H9V1dvwc3U9N1flz7TQ4v/cyOa0GF0KoQvneQzGKhzysgn/jzUq/mUZhMoPkFy3qaNOXUNdyVvmkd2i0Ayb0KPHT38edNhw63FzePlUndQ1cKgAsyrO3leSdyF8Mskc9U2sx6P//5Qtd7cKS3F8mCuvspq2ozBgtSsWgvAXND4/Ed/oZHM92SS2f3gL95HuTx8mnOXx125vETwbFWJ7YhvYOdoQRiCiiBUyeCrRYX1Mkog/UXyhM6IPPv13C9nYwdVwmBH4KkYmZBKfe6OEdvUmkOGYJXPobXTbSf27n4ijMmCK42qUBK262gyaEtcdFeafEkIwqLMqh+2zu7tuCZSSKtdDe6f3O5dDDcuub2XhvZmPfDIlXBMMBBZ1AfHHsXL9/kdHPHCrRpE/ppb74oNOzDUqz05Cum9ZHGRD/ZIdM8RUus8jJ5x2nil08pjdF5yHB9IRGSf3eDTtOtEZgOpHbHGs+mtjiGjVK2K0+lZsb9EdD/0DY/fdnBk9EbyL4ynCoAIXkDQGitB91DxsPfsMIHBPM3M93+hR0sW3vYkyQhAskSkA+f7J26WpA1um7pOmk3S+l1E/zNDdaomjvFb5gIEugVpWvd1hVjch/O1yAZb1Lbu6j4CLvAk8FoNY4zgdNReX7BUZz5x7rv1N2VT4h6udRjtlR0UIWiyuefdDG0tKERk1Oc6UDaXqy2RXvrM+1a+QW3X3lGTNhJPmBbjppcOcYFrYg76TUqcmswRnkJO/3dEWmTHmZ+mj8QkD6Ynk12bFGYDmm4zo4RvC3PdnvOB+2AulTWPeKTpin1zBhgcQLmtcnHjdXtNjvc1nsi8MARwEd0SKhffEP9aVhaS063uZ29cwJuWJwAwic+mbp+8goNmQBTm9qscxTUzIxp3dhNoYe2CBnQ4rxo357oBdqdhyky8Bl/0HjJgi7AoEy7/EodlOsBDUZaa3k2Bk4eopn078qGKMx/fgv4a/PgHSaJmqtM3iwt3AaN/B2XMnltopoa8zeMeIu63k4jBAPh6+/hQ2yuaXc4f75dJkB7Gkts9Y1s5LNzf7dc18xD6aefse9YlRGt8Wt4ezhsgCRTpMXr6phncT3RAepd6wEHxeYo7KmKvyfv9VX2g53KqoFfs9gPZEI2xkHgIMXYr4Y2AByV8V/XQbKsMZQk7ukYTawpwGxeQato8hN39bQ2h3w/sIc1NSHKqyKZ5LGHRKcKCXY+kaL90SOEPyRM6WI4A9ni65k/8ZFf87WPyKgrNiIOc/wMFfYsnMbupIgcyizLqm1i/60xKkP7AZ6MlIzQ8jDrRZc0zh5GsgawqycGjkOZmjCB60Ycqy/CsK9R6LxoRZX0e46V/P2c1lyYQeKLMnrz7mFzkgk48z4Awn5odqrHGB/aEYuGhm3exfP1rPVbtdrnntnqHFxIMCZP0sMawpdWUi5o8gByndt1v2nqGaeKAFlrTAcZABjcLlN9pKL+WL/BcnTQAQA/CkmlSwH5nmp1IK1ZYVK/H8uhW/DjMuMFqQ6VwZm2uBy6eBR/OFq6pjdAuiwWdDePSYIDNdbb0dsJRWsVUsRJf7e2tDnhhGmLYfqpRYQT1LSao3YWwdYhxIetaGOnpZeX/95F50s0Ki3yCmwBdlXwAMx1rF2T37vZ0k7C8rz5SOefqPG9qjyEfA3Ss3X40pueeKnv5n0vM8Yz/aLnFX9HDLRL0xmxS8Hh3TmUyDLedlL/BU4b+y07bkQuc6MZotRauyrh0mojzSeGQjSHHvi7TRCeAKLhIoiw6xnEusX7B7yVVjWcxnDtNPG/yo7ERnHEIKE9NxrkPylIwIy3Ftni9ji/xRPTt1ozBvPg5CYW/M10nWj8y2K8PE9Su0tX4pA6t2TI+9p3bNjeQcofie39WIt3rU62AE5tHhi1NStrlqyYumd/eIcFwCuEqqHCj7tC4dPVRIUSYg5lthCskwPJgmsoVGGXSvev4pMNE/NeJ5M4Wq7m85JijTa3EeSMzNILg/v15d3fDPtYYAZmHEWfdJ8Rq561HfS1e28HnFSNpV5wsq8FqqnsxIlHlG1mNj+j/mKeQsaMBSGcivn3SRO6UeJarQQ0Letgfg6wJioaZVYfajwU6uL5iasBJanexrlNwyHZQx497ZcSJN7DTbvDkf9ovvRWqyyvwlZvfj0B2hR+IM0kA/OvJF/IcL0CMone/0eIf6a29hhln/3gptOSKlhiVQWUJ+q99vaTrGQvv07XWvJcY7je27Cddv1//3+db8Tgc337wuLRPsw25Ql5uQmor4tZ3i8dRdLNpmSSN2VUhymBz/ALLAPKJuz5mT1DAlWxPTi2WPJjKEOpbUHVZ6+cb0pXTd8HBaNFc7YPiD1QxmMX7qQqbXwL099DxcNxXD9GwViIshy1vzKOUuonZgCJ2sAWZiaRZUAyOwb3WjsLH/ETVN0MofjDJym5qBdUzuLgJjRM846zFcrPfq3/O/8z3rZbdp+T+XOzirMHnMr1PHkNUmQhfpDBiwH89cdrd+sCbhzvpOokH3QB+5iNoAXSqNFKb9TPcGTn85eZngzToZB1gxk5xJ3/ip6yby/hg/1CBwm8pzclhqHdegjAOzJNBMHabspBNr9kUh9alRTTjihh0xUzihpMh1cd8FJIqsDbWrzuRIg7zL02NyAQRFrwmj4nIY8bd3NC6iNNV6lfGaf7y1ic4caVTjQu1E6O2TDVUL7/DQq1pyilULk5o2tr2BQY5NFvf55viOinfh15FHEOkyQ2Ydu3ofpmRfzMBf7nKl5T+Y2No/uHNz7YokGTuf8NXi5NomVUogR4DItY4luy13jNtksNGDaSFXGdG+eS6Qb62xtv7iq0rjo+FEvT+2U0ing/u7796OGbzMHpGrXJyTm3leyUucpA00nmlJquTx4/RsmC5Bb2gwWfr+f4hPDq/JqceNUcpu0/3V6GGZC1vtpDFvMjNoNuEBASzrZYDUhMOd4OXEqMYRZo7FTpxOdAEU442spUvcCtifiijDGq/lKXdWjf1my6VnMlXywVMTKsvQeh9Ymb7Vsk8od3Wi/1spmRIxUyFeqq53zDinuKzP7rgQ/GF7gdwxAyXVWMoH/masCujUqH6cFYL9Rg4IeMgwBwmIxUpjboAdQcnPmSmoEGjcS488U5PyJrNgraIPmqFblPmtVBbp0VeLPLy6YOLTMg2bVXW7Guzs8eoJvTuZDUAR7up1j6O90/YdCs01Jqd1vtKoebkz4PN8n7TrF4JZB3R6x+ZWSQz6n8NECCXiyf+fHNbLwmn2uc4Omy5Qfo5DEfUqvjL4EQiGhHvkfsfGv20xRQ3WaTAchJK50hf4FXUviVyYg+79dQgbx22TVnv7kLktSULFfXYzavUtizpGQaNM2h7PX70WnFhGOFt5HQMVI0dERWcbvU9FgmZv08uKAAjTT63ySTZ4NeJBYQC+jXvkyE+F7Y+E3hSs085PGYA+/LQXqAtPUgNh10VBRXHIb1YsCNyzxEWJ87NH1juWH/6Bh0e91AEjfyP1aSnugjMpEDFvAZ+oUVTK//1VCth0i8UZBtCoEUzMqLBYAtHF3vr2PIf8/+Cest6Zp3JFIJMiZ+UNMt3AJrcUWqeA9mV14mvTK7vAjpQs7Nu2yrgCvvGDXCtYvAk2tNzRDdCmrlJL4N3RUAaYsw2MYrDXLpKdOjssWopI7yc7Uoi+TGstJmLkAgTh11VNhyR+hkF8mP2hJPEblEWcXyiQVPU6z34oz7inOQhSzcPaAhlex3gJZWrlorlRfXrUQK6aI5k+lcAAUEdtRxefYCDhvC/gUYFp04k1LToAQoZuE/VJSVz6gLIxLq/VN5PfMbA+KyMLq4get6B9o//zGkn/AU4F10I9nkiGo4fmmM61ZT0WL3S6GA2ZLKK688wdfKvc/iuBau4WHQq2WzaBApOx5eCYwuRUwwW1O+N5rIKDymflv8QOPojX6QPR8Iepof7hTcirYmenQ5UC+4Y0z/XBCf6goOkxHNRTN7OeViTtRN2fgrQUTx2fHn8Oq+oe37O66zhDQYVW6oWJwxpvFEOA+vGWxnB3IqZRIYuSL4+n8D3DS7A9c+qii0HkDtZ18G0LmTPzS/yD4AZJNhY7W69WTdC7g8sf8JG05ZCQAIdDfctu4E/9TsXvA0cvi20qT1KyjtuuiGAHO2697jni/PkY/c6XMTYaNdIM3V7JOLbCY61Gvx9uKteHFqJZuvBqv+lo2RyUYLRujwnYABoU62w9+uXHJSejenONHe1nHK7v1/ycY4xIQKrcUg6xzUzMV4DgtaSoazm5sVxEC4HdZmdZXoPLraKsGatvWPd580t/jS2flQwJgAARVhJRroAAABFeGlmAABJSSoACAAAAAYAEgEDAAEAAAABAAAAGgEFAAEAAABWAAAAGwEFAAEAAABeAAAAKAEDAAEAAAACAAAAEwIDAAEAAAABAAAAaYcEAAEAAABmAAAAAAAAAEgAAAABAAAASAAAAAEAAAAGAACQBwAEAAAAMDIxMAGRBwAEAAAAAQIDAACgBwAEAAAAMDEwMAGgAwABAAAA//8AAAKgBAABAAAALwMAAAOgBAABAAAAngAAAAAAAAA="},13886:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/2-5d6085ceb76c0bd0ffdb9a438a83d08d.webp"},61079:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-3258cf4b259426fbb84541316eca5d55.webp"},88268:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2fb8682543e15e738aacb6684b57b221.webp"},4389:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-997d8657ade91f1c2a419d5187b3de61.webp"},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/ecdd1e85.0ac65515.js b/assets/js/ecdd1e85.0ac65515.js deleted file mode 100644 index 6b438c33a..000000000 --- a/assets/js/ecdd1e85.0ac65515.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1696],{3905:(e,t,r)=>{r.d(t,{Zo:()=>h,kt:()=>f});var o=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=o.createContext({}),l=function(e){var t=o.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},h=function(e){var t=l(e.components);return o.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,n=e.originalType,c=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),u=l(r),d=a,f=u["".concat(c,".").concat(d)]||u[d]||p[d]||n;return r?o.createElement(f,i(i({ref:t},h),{},{components:r})):o.createElement(f,i({ref:t},h))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=r.length,i=new Array(n);i[0]=d;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>n,metadata:()=>s,toc:()=>l});var o=r(87462),a=(r(67294),r(3905));r(8209);const n={id:"hardware-root-of-trust",title:"Hardware Root of Trust"},i=void 0,s={unversionedId:"learn/cryptography/hardware-root-of-trust",id:"learn/cryptography/hardware-root-of-trust",title:"Hardware Root of Trust",description:"What is hardware root of trust?",source:"@site/docs/learn/cryptography/hardware-root-of-trust.md",sourceDirName:"learn/cryptography",slug:"/learn/cryptography/hardware-root-of-trust",permalink:"/learn/cryptography/hardware-root-of-trust",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"hardware-root-of-trust",title:"Hardware Root of Trust"},sidebar:"docs",previous:{title:"Cryptography",permalink:"/learn/cryptography/"},next:{title:"Decentralized Identity",permalink:"/learn/decentralized-id/"}},c={},l=[{value:"What is hardware root of trust?",id:"what-is-hardware-root-of-trust",level:2},{value:"Why hardware root of trust for Archethic?",id:"why-hardware-root-of-trust-for-archethic",level:2},{value:"Implementation of Hardware Root of Trust (HRT)",id:"implementation-of-hardware-root-of-trust-hrt",level:2},{value:"Placement of HRT in Archethic Blockchain/Ecosystem",id:"placement-of-hrt-in-archethic-blockchainecosystem",level:2}],h={toc:l},u="wrapper";function p(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,o.Z)({},h,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"what-is-hardware-root-of-trust"},"What is hardware root of trust?"),(0,a.kt)("p",null,"A hardware root of trust is the foundation on which all secure operations of a computing system depend. It contains the keys used for cryptographic functions and enables a secure boot process. It is inherently trusted, and therefore must be secure by design. The most secure implementation of a root of trust is in hardware making it immune from malware attacks. As such, it can be a stand-alone security module or implemented as security module within a processor or system on chip (SoC) (",(0,a.kt)("a",{parentName:"p",href:"https://www.rambus.com/blogs/hardware-root-of-trust/#:~:text=for%20my%20application%3F-,What%20is%20hardware%20root%20of%20trust%3F,must%20be%20secure%20by%20design."},"source"),")."),(0,a.kt)("h2",{id:"why-hardware-root-of-trust-for-archethic"},"Why hardware root of trust for Archethic?"),(0,a.kt)("p",null,"The ability to sustain the network even with more than 90% of malicious nodes effectively comes from 2 very important steps."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Identifying the malcious nodes effectively and preemptively."),(0,a.kt)("li",{parentName:"ul"},"Banish and effectively ban the malicious nodes.")),(0,a.kt)("p",null,"While the first part involves complex alogrithms implemented in the software layer, the second part involves uniquely tying node's identity to its hardware. This way, the malicious node, once identified and banished, cannot rejoin the network by changing its representive identity."),(0,a.kt)("p",null,"This second part can be effectively achieved using the concept of hardware root of trust. With hardware root of trust, a unique keypair is injected in the into the wafer at the time of fabrication, thus tying the identity with this keypair. Once, this keypair is certified, the node cannot effectively use another keypair, once banished, thus eliminating identity forgery. This is, in principle, possible due to fact once a key-pair is injected, it cannot be changed for that particular hardware."),(0,a.kt)("p",null,"Further, with this hardware root of trust, we can also ensure that no two nodes have the same public key tied to their identity. Thus, using hardware root of trust, contributes significantly to the increased miner security and makes the Archethic blockchain more resilient against bad actors."),(0,a.kt)("h2",{id:"implementation-of-hardware-root-of-trust-hrt"},"Implementation of Hardware Root of Trust (HRT)"),(0,a.kt)("p",null,"To implement hardware root of Trust, within Archethic ecosystem, two technologies have been used."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Trusted Platform Module (TPM 2.O)"),(0,a.kt)("li",{parentName:"ul"},"Yubico Yubikey (PIV)")),(0,a.kt)("p",null,"Both of these technologies are based on Secure Element (SE) which are certified under Common Criteria (CC)."),(0,a.kt)("h2",{id:"placement-of-hrt-in-archethic-blockchainecosystem"},"Placement of HRT in Archethic Blockchain/Ecosystem"),(0,a.kt)("p",null,"Along with the initial software crypto library, the HRT is now the de-facto crypto engine for all the cryptographic operations carried out by Archethic miners. This includes signature (ECC), verification (ECC), encryption (AES), decryption (AES), hashing (SHA2/SHA3), etc."),(0,a.kt)("p",null,"The Archethic node software delegates all the cryptography operations to the HRT libraries of TPM and Yubikey, which are specially developed for this purpose by Uniris."),(0,a.kt)("p",null,"Given the latency constraints, a new hybrid mechanism have been developed involving usage of software crypto library and the HRT libraries (TPM/Yubikey). In this approach, the root of trust - crypto operation are still HRT based while the stem and branches will be software crypto library based."),(0,a.kt)("p",null,"The advantages of this mechanism over pure HRT based mechanism is:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Possiblity of key aggregation"),(0,a.kt)("li",{parentName:"ul"},"Freedom of using newer elliptic curves that are not yet supported by TPM/Yubikey."),(0,a.kt)("li",{parentName:"ul"},"Scalability without impacting security and performance.")))}p.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/ecdd1e85.9123d8d6.js b/assets/js/ecdd1e85.9123d8d6.js new file mode 100644 index 000000000..fcd8e5561 --- /dev/null +++ b/assets/js/ecdd1e85.9123d8d6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1696],{3905:(e,t,r)=>{r.d(t,{Zo:()=>h,kt:()=>f});var o=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=o.createContext({}),l=function(e){var t=o.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},h=function(e){var t=l(e.components);return o.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,n=e.originalType,c=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),u=l(r),d=a,f=u["".concat(c,".").concat(d)]||u[d]||p[d]||n;return r?o.createElement(f,i(i({ref:t},h),{},{components:r})):o.createElement(f,i({ref:t},h))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=r.length,i=new Array(n);i[0]=d;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>n,metadata:()=>s,toc:()=>l});var o=r(87462),a=(r(67294),r(3905));r(8209);const n={id:"hardware-root-of-trust",title:"Hardware Root of Trust"},i=void 0,s={unversionedId:"learn/cryptography/hardware-root-of-trust",id:"learn/cryptography/hardware-root-of-trust",title:"Hardware Root of Trust",description:"What is hardware root of trust?",source:"@site/docs/learn/cryptography/hardware-root-of-trust.md",sourceDirName:"learn/cryptography",slug:"/learn/cryptography/hardware-root-of-trust",permalink:"/learn/cryptography/hardware-root-of-trust",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"hardware-root-of-trust",title:"Hardware Root of Trust"},sidebar:"docs",previous:{title:"Cryptography",permalink:"/learn/cryptography/"},next:{title:"Decentralized Identity",permalink:"/learn/decentralized-id/"}},c={},l=[{value:"What is hardware root of trust?",id:"what-is-hardware-root-of-trust",level:2},{value:"Why hardware root of trust for Archethic?",id:"why-hardware-root-of-trust-for-archethic",level:2},{value:"Implementation of Hardware Root of Trust (HRT)",id:"implementation-of-hardware-root-of-trust-hrt",level:2},{value:"Placement of HRT in Archethic Blockchain/Ecosystem",id:"placement-of-hrt-in-archethic-blockchainecosystem",level:2}],h={toc:l},u="wrapper";function p(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,o.Z)({},h,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"what-is-hardware-root-of-trust"},"What is hardware root of trust?"),(0,a.kt)("p",null,"A hardware root of trust is the foundation on which all secure operations of a computing system depend. It contains the keys used for cryptographic functions and enables a secure boot process. It is inherently trusted, and therefore must be secure by design. The most secure implementation of a root of trust is in hardware making it immune from malware attacks. As such, it can be a stand-alone security module or implemented as security module within a processor or system on chip (SoC) (",(0,a.kt)("a",{parentName:"p",href:"https://www.rambus.com/blogs/hardware-root-of-trust/#:~:text=for%20my%20application%3F-,What%20is%20hardware%20root%20of%20trust%3F,must%20be%20secure%20by%20design."},"source"),")."),(0,a.kt)("h2",{id:"why-hardware-root-of-trust-for-archethic"},"Why hardware root of trust for Archethic?"),(0,a.kt)("p",null,"The ability to sustain the network even with more than 90% of malicious nodes effectively comes from 2 very important steps."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Identifying the malcious nodes effectively and preemptively."),(0,a.kt)("li",{parentName:"ul"},"Banish and effectively ban the malicious nodes.")),(0,a.kt)("p",null,"While the first part involves complex alogrithms implemented in the software layer, the second part involves uniquely tying node's identity to its hardware. This way, the malicious node, once identified and banished, cannot rejoin the network by changing its representive identity."),(0,a.kt)("p",null,"This second part can be effectively achieved using the concept of hardware root of trust. With hardware root of trust, a unique keypair is injected in the into the wafer at the time of fabrication, thus tying the identity with this keypair. Once, this keypair is certified, the node cannot effectively use another keypair, once banished, thus eliminating identity forgery. This is, in principle, possible due to fact once a key-pair is injected, it cannot be changed for that particular hardware."),(0,a.kt)("p",null,"Further, with this hardware root of trust, we can also ensure that no two nodes have the same public key tied to their identity. Thus, using hardware root of trust, contributes significantly to the increased miner security and makes the Archethic blockchain more resilient against bad actors."),(0,a.kt)("h2",{id:"implementation-of-hardware-root-of-trust-hrt"},"Implementation of Hardware Root of Trust (HRT)"),(0,a.kt)("p",null,"To implement hardware root of Trust, within Archethic ecosystem, two technologies have been used."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Trusted Platform Module (TPM 2.O)"),(0,a.kt)("li",{parentName:"ul"},"Yubico Yubikey (PIV)")),(0,a.kt)("p",null,"Both of these technologies are based on Secure Element (SE) which are certified under Common Criteria (CC)."),(0,a.kt)("h2",{id:"placement-of-hrt-in-archethic-blockchainecosystem"},"Placement of HRT in Archethic Blockchain/Ecosystem"),(0,a.kt)("p",null,"Along with the initial software crypto library, the HRT is now the de-facto crypto engine for all the cryptographic operations carried out by Archethic miners. This includes signature (ECC), verification (ECC), encryption (AES), decryption (AES), hashing (SHA2/SHA3), etc."),(0,a.kt)("p",null,"The Archethic node software delegates all the cryptography operations to the HRT libraries of TPM and Yubikey, which are specially developed for this purpose by Uniris."),(0,a.kt)("p",null,"Given the latency constraints, a new hybrid mechanism have been developed involving usage of software crypto library and the HRT libraries (TPM/Yubikey). In this approach, the root of trust - crypto operation are still HRT based while the stem and branches will be software crypto library based."),(0,a.kt)("p",null,"The advantages of this mechanism over pure HRT based mechanism is:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Possiblity of key aggregation"),(0,a.kt)("li",{parentName:"ul"},"Freedom of using newer elliptic curves that are not yet supported by TPM/Yubikey."),(0,a.kt)("li",{parentName:"ul"},"Scalability without impacting security and performance.")))}p.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/ee388bf8.eab4860b.js b/assets/js/ee388bf8.888cfab0.js similarity index 54% rename from assets/js/ee388bf8.eab4860b.js rename to assets/js/ee388bf8.888cfab0.js index 5f9c3669a..3f4e394a3 100644 --- a/assets/js/ee388bf8.eab4860b.js +++ b/assets/js/ee388bf8.888cfab0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7701],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=s(r),m=o,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||a;return r?n.createElement(f,l(l({ref:t},u),{},{components:r})):n.createElement(f,l({ref:t},u))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[p]="string"==typeof e?e:o,l[1]=i;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>d,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var n=r(87462),o=r(67294),a=r(3905);r(8209);const l={id:"error-context",title:"ErrorContext",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/enums/error-context",id:"build/api/schema/enums/error-context",title:"ErrorContext",description:"Transaction error context",source:"@site/docs/build/api/schema/enums/error-context.mdx",sourceDirName:"build/api/schema/enums",slug:"/build/api/schema/enums/error-context",permalink:"/build/api/schema/enums/error-context",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"error-context",title:"ErrorContext",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"skip",permalink:"/build/api/schema/directives/skip"},next:{title:"SortOrder",permalink:"/build/api/schema/enums/sort-order"}},s={},u=[{value:"Values",id:"values",level:3},{value:"ErrorContext.INVALID_TRANSACTION",id:"code-style-fontweight-normal-errorcontextbinvalid_transactionbcode",level:4},{value:"ErrorContext.NETWORK_ISSUE",id:"code-style-fontweight-normal-errorcontextbnetwork_issuebcode",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,a.kt)(o.Fragment,null,"Specification",(0,a.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:u,Bullet:p,SpecifiedBy:d,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,a.kt)(b,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Transaction error context"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-graphql"},"enum ErrorContext {\n INVALID_TRANSACTION\n NETWORK_ISSUE\n}\n")),(0,a.kt)("h3",{id:"values"},"Values"),(0,a.kt)("h4",{id:"code-style-fontweight-normal-errorcontextbinvalid_transactionbcode"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"ErrorContext.",(0,a.kt)("b",null,"INVALID_TRANSACTION")))),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Transaction is invalid")),(0,a.kt)("h4",{id:"code-style-fontweight-normal-errorcontextbnetwork_issuebcode"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"ErrorContext.",(0,a.kt)("b",null,"NETWORK_ISSUE")))),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Network problem")),(0,a.kt)("h3",{id:"member-of"},"Member of"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-error"},(0,a.kt)("inlineCode",{parentName:"a"},"TransactionError"))," ",(0,a.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7701],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=s(r),m=o,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||a;return r?n.createElement(f,l(l({ref:t},u),{},{components:r})):n.createElement(f,l({ref:t},u))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[p]="string"==typeof e?e:o,l[1]=i;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>p,SpecifiedBy:()=>d,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var n=r(87462),o=r(67294),a=r(3905);r(8209);const l={id:"error-context",title:"ErrorContext",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/enums/error-context",id:"build/api/schema/enums/error-context",title:"ErrorContext",description:"Transaction error context",source:"@site/docs/build/api/schema/enums/error-context.mdx",sourceDirName:"build/api/schema/enums",slug:"/build/api/schema/enums/error-context",permalink:"/build/api/schema/enums/error-context",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"error-context",title:"ErrorContext",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"skip",permalink:"/build/api/schema/directives/skip"},next:{title:"SortOrder",permalink:"/build/api/schema/enums/sort-order"}},s={},u=[{value:"Values",id:"values",level:3},{value:"ErrorContext.INVALID_TRANSACTION",id:"code-style-fontweight-normal-errorcontextbinvalid_transactionbcode",level:4},{value:"ErrorContext.NETWORK_ISSUE",id:"code-style-fontweight-normal-errorcontextbnetwork_issuebcode",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),d=e=>(0,a.kt)(o.Fragment,null,"Specification",(0,a.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:u,Bullet:p,SpecifiedBy:d,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,a.kt)(b,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Transaction error context"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-graphql"},"enum ErrorContext {\n INVALID_TRANSACTION\n NETWORK_ISSUE\n}\n")),(0,a.kt)("h3",{id:"values"},"Values"),(0,a.kt)("h4",{id:"code-style-fontweight-normal-errorcontextbinvalid_transactionbcode"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"ErrorContext.",(0,a.kt)("b",null,"INVALID_TRANSACTION")))),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Transaction is invalid")),(0,a.kt)("h4",{id:"code-style-fontweight-normal-errorcontextbnetwork_issuebcode"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"ErrorContext.",(0,a.kt)("b",null,"NETWORK_ISSUE")))),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Network problem")),(0,a.kt)("h3",{id:"member-of"},"Member of"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-error"},(0,a.kt)("inlineCode",{parentName:"a"},"TransactionError"))," ",(0,a.kt)(m,{class:"secondary",text:"object",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/eeb513bd.06945faf.js b/assets/js/eeb513bd.06945faf.js new file mode 100644 index 000000000..0b1150792 --- /dev/null +++ b/assets/js/eeb513bd.06945faf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5371],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),h=i,m=p["".concat(l,".").concat(h)]||p[h]||u[h]||r;return n?a.createElement(m,o(o({ref:t},d),{},{components:n})):a.createElement(m,o({ref:t},d))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:i,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"beacon-chain",title:"Beacon Chain"},o=void 0,s={unversionedId:"learn/sharding/beacon-chain/beacon-chain",id:"learn/sharding/beacon-chain/beacon-chain",title:"Beacon Chain",description:"Archethic Blockchain is using Sharding mechanism to ensure scalability in terms of storage and validation.",source:"@site/docs/learn/sharding/beacon-chain/README.md",sourceDirName:"learn/sharding/beacon-chain",slug:"/learn/sharding/beacon-chain/",permalink:"/learn/sharding/beacon-chain/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"beacon-chain",title:"Beacon Chain"},sidebar:"docs",previous:{title:"Sharding",permalink:"/learn/sharding/"},next:{title:"Beacon Explorer",permalink:"/learn/sharding/beacon-chain/explorer"}},l={},c=[{value:"Concepts",id:"concepts",level:2},{value:"Transaction tracking and timestamping",id:"transaction-tracking-and-timestamping",level:2},{value:"Status and Network Coordinates of nodes",id:"status-and-network-coordinates-of-nodes",level:2},{value:"Slot",id:"slot",level:2}],d={toc:c},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Blockchain is using ",(0,i.kt)("inlineCode",{parentName:"p"},"Sharding")," mechanism to ensure scalability in terms of storage and validation."),(0,i.kt)("p",null,"But since there is no way in a well sharded and distributed network to know all the transaction in the system,\na ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain")," is used to keep a global synchronization and reference."),(0,i.kt)("h2",{id:"concepts"},"Concepts"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain")," is used as tracer/marker of a global state but to face some scalability issue, Archethic Blockchain is using ",(0,i.kt)("inlineCode",{parentName:"p"},"Sharding")," also for the ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain"),"."),(0,i.kt)("p",null,"Which means that the ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain")," is sharded and divided into ",(0,i.kt)("inlineCode",{parentName:"p"},"subset")," defined by the transaction's address and a given date."),(0,i.kt)("p",null,"For example: a transaction's address starting by ",(0,i.kt)("inlineCode",{parentName:"p"},"0F")," for a given day, will not be stored on the same subset as a transaction's address starting by ",(0,i.kt)("inlineCode",{parentName:"p"},"9F")," for the same day."),(0,i.kt)("h2",{id:"transaction-tracking-and-timestamping"},"Transaction tracking and timestamping"),(0,i.kt)("p",null,"Each time a transaction is validated, the validation nodes will send the transaction to the right Beacon Chain storage nodes, to transmit the address of the transaction and its timestamp."),(0,i.kt)("p",null,"For each Beacon Chain interval, a new slot is generated referencing all the transaction during this interval."),(0,i.kt)("p",null,"At the end of the day, a transaction chain is formed, and a last transaction is computed to generate a summary of the current day for a given subset."),(0,i.kt)("p",null,"Because each transaction has its own storage nodes, ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chains")," are balanced between the storage nodes to ensure a better scalability and distribution."),(0,i.kt)("h2",{id:"status-and-network-coordinates-of-nodes"},"Status and Network Coordinates of nodes"),(0,i.kt)("p",null,"Beacon Chains also contains network status of the nodes where the public key starts by the Beacon Chain subset."),(0,i.kt)("p",null,"The storage nodes in each subset is in charge of:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"checking the node availabilities"),(0,i.kt)("li",{parentName:"ul"},"gathering networking information such as latency, bandwidth")),(0,i.kt)("p",null,"At the end of the day, a transaction is formed as well and a last transaction is computed to generate a summary of node availability and network coordinates"),(0,i.kt)("h2",{id:"slot"},"Slot"),(0,i.kt)("p",null,"Each ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain")," is divided during the day into multiple slots, defined by interval (for instance every 10 min)."),(0,i.kt)("p",null,"Those slot contains the following information:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Transaction summaries: timestamping of the validated transactions",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"address: Transaction's address"),(0,i.kt)("li",{parentName:"ul"},"timestamp: Transaction validation time"),(0,i.kt)("li",{parentName:"ul"},"movements addresses: List of outputs addresses of the transaction"))),(0,i.kt)("li",{parentName:"ul"},"End of node synchronization: timestamping when a node finished its synchronization",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"node public key: Node's first public key"),(0,i.kt)("li",{parentName:"ul"},"timestamp: Time when the node synchronization ended"))),(0,i.kt)("li",{parentName:"ul"},"P2P view:",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"availabilities: binary form of the availability of the sampled nodes for the given subset"),(0,i.kt)("li",{parentName:"ul"},"network statistics: latency and bandwidth of the sampled nodes for the given subset")))))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/eeb513bd.f92b779f.js b/assets/js/eeb513bd.f92b779f.js deleted file mode 100644 index e744ec019..000000000 --- a/assets/js/eeb513bd.f92b779f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5371],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=c(n),h=i,m=p["".concat(l,".").concat(h)]||p[h]||u[h]||r;return n?a.createElement(m,o(o({ref:t},d),{},{components:n})):a.createElement(m,o({ref:t},d))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:i,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));n(8209);const r={id:"beacon-chain",title:"Beacon Chain"},o=void 0,s={unversionedId:"learn/sharding/beacon-chain/beacon-chain",id:"learn/sharding/beacon-chain/beacon-chain",title:"Beacon Chain",description:"Archethic Blockchain is using Sharding mechanism to ensure scalability in terms of storage and validation.",source:"@site/docs/learn/sharding/beacon-chain/README.md",sourceDirName:"learn/sharding/beacon-chain",slug:"/learn/sharding/beacon-chain/",permalink:"/learn/sharding/beacon-chain/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"beacon-chain",title:"Beacon Chain"},sidebar:"docs",previous:{title:"Sharding",permalink:"/learn/sharding/"},next:{title:"Beacon Explorer",permalink:"/learn/sharding/beacon-chain/explorer"}},l={},c=[{value:"Concepts",id:"concepts",level:2},{value:"Transaction tracking and timestamping",id:"transaction-tracking-and-timestamping",level:2},{value:"Status and Network Coordinates of nodes",id:"status-and-network-coordinates-of-nodes",level:2},{value:"Slot",id:"slot",level:2}],d={toc:c},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Archethic Blockchain is using ",(0,i.kt)("inlineCode",{parentName:"p"},"Sharding")," mechanism to ensure scalability in terms of storage and validation."),(0,i.kt)("p",null,"But since there is no way in a well sharded and distributed network to know all the transaction in the system,\na ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain")," is used to keep a global synchronization and reference."),(0,i.kt)("h2",{id:"concepts"},"Concepts"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain")," is used as tracer/marker of a global state but to face some scalability issue, Archethic Blockchain is using ",(0,i.kt)("inlineCode",{parentName:"p"},"Sharding")," also for the ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain"),"."),(0,i.kt)("p",null,"Which means that the ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain")," is sharded and divided into ",(0,i.kt)("inlineCode",{parentName:"p"},"subset")," defined by the transaction's address and a given date."),(0,i.kt)("p",null,"For example: a transaction's address starting by ",(0,i.kt)("inlineCode",{parentName:"p"},"0F")," for a given day, will not be stored on the same subset as a transaction's address starting by ",(0,i.kt)("inlineCode",{parentName:"p"},"9F")," for the same day."),(0,i.kt)("h2",{id:"transaction-tracking-and-timestamping"},"Transaction tracking and timestamping"),(0,i.kt)("p",null,"Each time a transaction is validated, the validation nodes will send the transaction to the right Beacon Chain storage nodes, to transmit the address of the transaction and its timestamp."),(0,i.kt)("p",null,"For each Beacon Chain interval, a new slot is generated referencing all the transaction during this interval."),(0,i.kt)("p",null,"At the end of the day, a transaction chain is formed, and a last transaction is computed to generate a summary of the current day for a given subset."),(0,i.kt)("p",null,"Because each transaction has its own storage nodes, ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chains")," are balanced between the storage nodes to ensure a better scalability and distribution."),(0,i.kt)("h2",{id:"status-and-network-coordinates-of-nodes"},"Status and Network Coordinates of nodes"),(0,i.kt)("p",null,"Beacon Chains also contains network status of the nodes where the public key starts by the Beacon Chain subset."),(0,i.kt)("p",null,"The storage nodes in each subset is in charge of:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"checking the node availabilities"),(0,i.kt)("li",{parentName:"ul"},"gathering networking information such as latency, bandwidth")),(0,i.kt)("p",null,"At the end of the day, a transaction is formed as well and a last transaction is computed to generate a summary of node availability and network coordinates"),(0,i.kt)("h2",{id:"slot"},"Slot"),(0,i.kt)("p",null,"Each ",(0,i.kt)("inlineCode",{parentName:"p"},"Beacon Chain")," is divided during the day into multiple slots, defined by interval (for instance every 10 min)."),(0,i.kt)("p",null,"Those slot contains the following information:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Transaction summaries: timestamping of the validated transactions",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"address: Transaction's address"),(0,i.kt)("li",{parentName:"ul"},"timestamp: Transaction validation time"),(0,i.kt)("li",{parentName:"ul"},"movements addresses: List of outputs addresses of the transaction"))),(0,i.kt)("li",{parentName:"ul"},"End of node synchronization: timestamping when a node finished its synchronization",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"node public key: Node's first public key"),(0,i.kt)("li",{parentName:"ul"},"timestamp: Time when the node synchronization ended"))),(0,i.kt)("li",{parentName:"ul"},"P2P view:",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"availabilities: binary form of the availability of the sampled nodes for the given subset"),(0,i.kt)("li",{parentName:"ul"},"network statistics: latency and bandwidth of the sampled nodes for the given subset")))))}u.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/f2faff8f.95f5712c.js b/assets/js/f2faff8f.95f5712c.js new file mode 100644 index 000000000..bb3807607 --- /dev/null +++ b/assets/js/f2faff8f.95f5712c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4106],{3905:(e,t,n)=>{n.d(t,{Zo:()=>h,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},h=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,h=c(e,["components","mdxType","originalType","parentName"]),d=s(n),u=a,m=d["".concat(l,".").concat(u)]||d[u]||p[u]||i;return n?r.createElement(m,o(o({ref:t},h),{},{components:n})):r.createElement(m,o({ref:t},h))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));n(8209);const i={id:"dex",title:"Archethic aeSwap"},o=void 0,c={unversionedId:"FAQ/dex",id:"FAQ/dex",title:"Archethic aeSwap",description:"General",source:"@site/docs/FAQ/dex.md",sourceDirName:"FAQ",slug:"/FAQ/dex",permalink:"/FAQ/dex",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"dex",title:"Archethic aeSwap"},sidebar:"docs",previous:{title:"Archethic Bridge $UCO one-way",permalink:"/FAQ/bridge"},next:{title:"Wallet",permalink:"/FAQ/wallet"}},l={},s=[{value:"General",id:"general",level:2},{value:"How to access the Archethic DEX named aeSwap ?",id:"how-to-access-the-archethic-dex-named-aeswap-",level:3},{value:"Is the Archethic DEX available on mobile devices?",id:"is-the-archethic-dex-available-on-mobile-devices",level:3},{value:"How is the price of $UCO estimated?",id:"how-is-the-price-of-uco-estimated",level:3},{value:"Wallet",id:"wallet",level:2},{value:"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?",id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet",level:3},{value:"Why can't I connect to the Archethic wallet with my Brave browser?",id:"why-cant-i-connect-to-the-archethic-wallet-with-my-brave-browser",level:3}],h={toc:s},d="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"general"},"General"),(0,a.kt)("h3",{id:"how-to-access-the-archethic-dex-named-aeswap-"},"How to access the Archethic DEX named aeSwap ?"),(0,a.kt)("p",null,"You can access the DEX in testnet at : ",(0,a.kt)("a",{parentName:"p",href:"https://dex.testnet.archethic.net"},"https://dex.testnet.archethic.net")),(0,a.kt)("h3",{id:"is-the-archethic-dex-available-on-mobile-devices"},"Is the Archethic DEX available on mobile devices?"),(0,a.kt)("p",null,"No, the Archethic DEX application is designed exclusively for the moment for desktop use and is compatible with macOS, Linux, and Windows operating systems."),(0,a.kt)("h3",{id:"how-is-the-price-of-uco-estimated"},"How is the price of $UCO estimated?"),(0,a.kt)("p",null,"The price of $UCO is determined using an Archethic Oracle that consolidates information from various sources, including Coingecko and CoinMarketCap."),(0,a.kt)("h2",{id:"wallet"},"Wallet"),(0,a.kt)("h3",{id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet"},"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?"),(0,a.kt)("p",null,"The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don\u2019t forget the 24 words) and create/import a wallet on the Testnet network."),(0,a.kt)("h3",{id:"why-cant-i-connect-to-the-archethic-wallet-with-my-brave-browser"},"Why can't I connect to the Archethic wallet with my Brave browser?"),(0,a.kt)("p",null,"Brave includes a shield feature that might block certain local connections.\nTo successfully connect to the Archethic wallet, you'll need to modify the Brave browser\u2019s shield settings as per its documentation"),(0,a.kt)("hr",null))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/f3ebdb21.6dfdb3dc.js b/assets/js/f3ebdb21.6dfdb3dc.js new file mode 100644 index 000000000..96345e30c --- /dev/null +++ b/assets/js/f3ebdb21.6dfdb3dc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9333],{3905:(e,t,i)=>{i.d(t,{Zo:()=>h,kt:()=>u});var a=i(67294);function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function s(e){for(var t=1;t=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var o=a.createContext({}),M=function(e){var t=a.useContext(o),i=t;return e&&(i="function"==typeof e?e(t):s(s({},t),e)),i},h=function(e){var t=M(e.components);return a.createElement(o.Provider,{value:t},e.children)},l="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},I=a.forwardRef((function(e,t){var i=e.components,n=e.mdxType,r=e.originalType,o=e.parentName,h=c(e,["components","mdxType","originalType","parentName"]),l=M(i),I=n,u=l["".concat(o,".").concat(I)]||l[I]||g[I]||r;return i?a.createElement(u,s(s({ref:t},h),{},{components:i})):a.createElement(u,s({ref:t},h))}));function u(e,t){var i=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=i.length,s=new Array(r);s[0]=I;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c[l]="string"==typeof e?e:n,s[1]=c;for(var M=2;M{i.r(t),i.d(t,{assets:()=>o,contentTitle:()=>s,default:()=>g,frontMatter:()=>r,metadata:()=>c,toc:()=>M});var a=i(87462),n=(i(67294),i(3905));i(8209);const r={id:"bridge-2-ways",title:"Archethic Bridge 2-ways"},s=void 0,c={unversionedId:"FAQ/bridge-2-ways",id:"FAQ/bridge-2-ways",title:"Archethic Bridge 2-ways",description:"General",source:"@site/docs/FAQ/bridge-2-ways.md",sourceDirName:"FAQ",slug:"/FAQ/bridge-2-ways",permalink:"/FAQ/bridge-2-ways",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"bridge-2-ways",title:"Archethic Bridge 2-ways"},sidebar:"docs",previous:{title:"AEWeb",permalink:"/FAQ/aeweb"},next:{title:"Archethic Bridge $UCO one-way",permalink:"/FAQ/bridge"}},o={},M=[{value:"General",id:"general",level:2},{value:"What is Archethic Bridge two-ways?",id:"what-is-archethic-bridge-two-ways",level:3},{value:"How to access the Archethic Bridge ?",id:"how-to-access-the-archethic-bridge-",level:3},{value:"Which blockchain is better to bridge my UCOs?",id:"which-blockchain-is-better-to-bridge-my-ucos",level:3},{value:"What blockchains does the Archethic Bridge support?",id:"what-blockchains-does-the-archethic-bridge-support",level:3},{value:"Is the Archethic Bridge available on mobile devices?",id:"is-the-archethic-bridge-available-on-mobile-devices",level:3},{value:"What is an EVM wallet?",id:"what-is-an-evm-wallet",level:3},{value:"How is the price of $UCO estimated?",id:"how-is-the-price-of-uco-estimated",level:3},{value:"How long is the predetermined time?",id:"how-long-is-the-predetermined-time",level:3},{value:"Key Concepts",id:"key-concepts",level:2},{value:"What is an HTLC (Hash Time Lock Contract) in the context of Archethic's bridge?",id:"what-is-an-htlc-hash-time-lock-contract-in-the-context-of-archethics-bridge",level:3},{value:"How does Archethic's cross-chain verification work?",id:"how-does-archethics-cross-chain-verification-work",level:3},{value:"What is the Safety Module in Archethic's bridge?",id:"what-is-the-safety-module-in-archethics-bridge",level:3},{value:"Specifics of Bridging",id:"specifics-of-bridging",level:2},{value:"How does the process of bridging from EVM to Archethic work?",id:"how-does-the-process-of-bridging-from-evm-to-archethic-work",level:3},{value:"What is the process for bridging from Archethic to EVM?",id:"what-is-the-process-for-bridging-from-archethic-to-evm",level:3},{value:"Wallet",id:"wallet",level:2},{value:"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?",id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet",level:3},{value:"Why can't I connect to the Archethic wallet with my Brave browser?",id:"why-cant-i-connect-to-the-archethic-wallet-with-my-brave-browser",level:3},{value:"Testnet",id:"testnet",level:2},{value:"How do I set up Ethereum Sepolia, Binance Testnet and Polygon Mumbai in my EVM Wallet?",id:"how-do-i-set-up-ethereum-sepolia-binance-testnet-and-polygon-mumbai-in-my-evm-wallet",level:3},{value:"How can I buy $UCO after receiving $ETH, $MATIC, or $BNB?",id:"how-can-i-buy-uco-after-receiving-eth-matic-or-bnb",level:3},{value:"Issues management",id:"issues-management",level:2},{value:"What happens if a problem occurs, or I refuse a transaction during the transfer?",id:"what-happens-if-a-problem-occurs-or-i-refuse-a-transaction-during-the-transfer",level:3},{value:"If I sent the tokens to a wrong Mainnet address, what to do?",id:"if-i-sent-the-tokens-to-a-wrong-mainnet-address-what-to-do",level:3},{value:"Can I help the developers analyze the problems?",id:"can-i-help-the-developers-analyze-the-problems",level:3}],h={toc:M},l="wrapper";function g(e){let{components:t,...r}=e;return(0,n.kt)(l,(0,a.Z)({},h,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"general"},"General"),(0,n.kt)("h3",{id:"what-is-archethic-bridge-two-ways"},"What is Archethic Bridge two-ways?"),(0,n.kt)("p",null,"The Archethic Bridge two-ways is a decentralized, peer-to-peer bridge that enables the seamless exchange of UCO ERC20 tokens and other major cryptocurrencies like ETH, MATIC, and BNB between the Archethic blockchain and various other blockchains, including Ethereum, Polygon, and BSC. This functionality allows for the transfer of these assets into their equivalent forms on Archethic, such as aeETH, aeMATIC, and aeBNB, providing a secure and straightforward method for exchanging assets. The bridge utilizes atomic swap technology, specifically Hash Time Lock Contracts (HTLC), to facilitate secure and intermediary-free transactions. Moreover, it incorporates Archethic's unique cross-chain verification technique, enhancing the security and decentralization of these exchanges. This two-way bridge significantly expands the interoperability between Archethic and other blockchain networks, allowing for greater flexibility and integration within the broader blockchain ecosystem."),(0,n.kt)("h3",{id:"how-to-access-the-archethic-bridge-"},"How to access the Archethic Bridge ?"),(0,n.kt)("p",null,"You can access the bridge at : ",(0,n.kt)("a",{parentName:"p",href:"https://bridge.testnet.archethic.net"},"https://bridge.testnet.archethic.net")),(0,n.kt)("h3",{id:"which-blockchain-is-better-to-bridge-my-ucos"},"Which blockchain is better to bridge my UCOs?"),(0,n.kt)("p",null,"Using the 3 blockchains, the result will be the same, but fees are not the same between ETH/MATIC/BSC.\nMATIC has the lowest fees."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"bridge-blockchains",src:i(32909).Z,width:"111",height:"102"})),(0,n.kt)("h3",{id:"what-blockchains-does-the-archethic-bridge-support"},"What blockchains does the Archethic Bridge support?"),(0,n.kt)("p",null,"The Archethic Bridge currently supports bridging between the Archethic blockchain and various EVM (Ethereum Virtual Machine) compatible blockchains."),(0,n.kt)("h3",{id:"is-the-archethic-bridge-available-on-mobile-devices"},"Is the Archethic Bridge available on mobile devices?"),(0,n.kt)("p",null,"No, the Archethic Bridge application is designed exclusively for desktop use and is compatible with macOS, Linux, and Windows operating systems."),(0,n.kt)("h3",{id:"what-is-an-evm-wallet"},"What is an EVM wallet?"),(0,n.kt)("p",null,"An EVM (Ethereum Virtual Machine) wallet is a digital wallet designed to interact with blockchains that are compatible with the Ethereum Virtual Machine. EVM wallets can store, send, and receive Ether (ETH) and other EVM-compatible tokens, execute smart contracts, and interact with decentralized applications (dApps) on EVM-compatible networks."),(0,n.kt)("h3",{id:"how-is-the-price-of-uco-estimated"},"How is the price of $UCO estimated?"),(0,n.kt)("p",null,"The price of $UCO is determined using an Archethic Oracle that consolidates information from various sources, including Coingecko and CoinMarketCap."),(0,n.kt)("h3",{id:"how-long-is-the-predetermined-time"},"How long is the predetermined time?"),(0,n.kt)("p",null,"The timelock lasts 2 hours."),(0,n.kt)("h2",{id:"key-concepts"},"Key Concepts"),(0,n.kt)("h3",{id:"what-is-an-htlc-hash-time-lock-contract-in-the-context-of-archethics-bridge"},"What is an HTLC (Hash Time Lock Contract) in the context of Archethic's bridge?"),(0,n.kt)("p",null,"HTLC stands for Hash Time Lock Contract. In Archethic's bridge, it is a type of contract used in atomic swaps to securely exchange assets in a peer-to-peer manner without intermediaries. These contracts lock funds until a secret is revealed or a specified time period elapses, ensuring a secure and reversible asset exchange."),(0,n.kt)("h3",{id:"how-does-archethics-cross-chain-verification-work"},"How does Archethic's cross-chain verification work?"),(0,n.kt)("p",null,"Archethic's cross-chain verification enhances atomic swaps by allowing data retrieval outside of the blockchain. This makes the process fully decentralized and strengthens the security model. Archethic's nodes can verify transaction status on other chains, like EVM blockchains, establishing a strong consensus on the status of a swap."),(0,n.kt)("h3",{id:"what-is-the-safety-module-in-archethics-bridge"},"What is the Safety Module in Archethic's bridge?"),(0,n.kt)("p",null,"The Safety Module in Archethic's bridge is a reserve of tokens designed to mitigate risks associated with asset bridging. It addresses potential deficiencies and disruptions in bridge operations by providing a token reserve that matches the amount in each pool at launch. This module is funded by fees from transfers and is managed by a multisignature wallet governed by the bridge's governance."),(0,n.kt)("h2",{id:"specifics-of-bridging"},"Specifics of Bridging"),(0,n.kt)("h3",{id:"how-does-the-process-of-bridging-from-evm-to-archethic-work"},"How does the process of bridging from EVM to Archethic work?"),(0,n.kt)("p",null,"To bridge from EVM to Archethic, a user deploys an HTLC smart contract on both blockchains. The process involves locking funds using a secret and its hash, verifying the transaction across chains, minting new tokens on Archethic, and transferring funds to respective recipient wallets. The entire process is secured by atomic swaps and Archethic's cross-chain verification."),(0,n.kt)("h3",{id:"what-is-the-process-for-bridging-from-archethic-to-evm"},"What is the process for bridging from Archethic to EVM?"),(0,n.kt)("p",null,"Bridging from Archethic to EVM follows a similar pattern but in reverse. It introduces an additional step where EVM cannot directly request information from the blockchain. Instead, cryptography is used to assert actions through signatures, ensuring non-repudiation. This involves creating and funding HTLC contracts on both blockchains, revealing secrets, and transferring funds securely."),(0,n.kt)("h2",{id:"wallet"},"Wallet"),(0,n.kt)("h3",{id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet"},"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?"),(0,n.kt)("p",null,"The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don\u2019t forget the 24 words) and create/import a wallet on the Testnet network."),(0,n.kt)("h3",{id:"why-cant-i-connect-to-the-archethic-wallet-with-my-brave-browser"},"Why can't I connect to the Archethic wallet with my Brave browser?"),(0,n.kt)("p",null,"Brave includes a shield feature that might block certain local connections.\nTo successfully connect to the Archethic wallet, you'll need to modify the Brave browser\u2019s shield settings as per its documentation"),(0,n.kt)("h2",{id:"testnet"},"Testnet"),(0,n.kt)("h3",{id:"how-do-i-set-up-ethereum-sepolia-binance-testnet-and-polygon-mumbai-in-my-evm-wallet"},"How do I set up Ethereum Sepolia, Binance Testnet and Polygon Mumbai in my EVM Wallet?"),(0,n.kt)("p",null,"To configure these networks in your EVM Wallet, you'll need to go to the wallet's settings and manually add each network using the Chain ID and Explorer URL provided above."),(0,n.kt)("p",null,"Ethereum Sepolia Testnet:",(0,n.kt)("br",null),"\nURL RPC: Choose a RPC server address: ",(0,n.kt)("a",{parentName:"p",href:"https://chainlist.org/chain/11155111"},"https://chainlist.org/chain/11155111"),(0,n.kt)("br",null),"\nChain ID: 11155111",(0,n.kt)("br",null),"\nSymbol: ETH",(0,n.kt)("br",null),"\nExplorer URL: ",(0,n.kt)("a",{parentName:"p",href:"https://sepolia.etherscan.io/"},"https://sepolia.etherscan.io/"),(0,n.kt)("br",null)),(0,n.kt)("p",null,"Binance Smart Chain Testnet:",(0,n.kt)("br",null),"\nURL RPC: Choose a RPC server address: ",(0,n.kt)("a",{parentName:"p",href:"https://chainlist.org/chain/97"},"https://chainlist.org/chain/97"),(0,n.kt)("br",null),"\nChain ID: 97",(0,n.kt)("br",null),"\nSymbol: tBNB",(0,n.kt)("br",null),"\nExplorer URL: ",(0,n.kt)("a",{parentName:"p",href:"https://testnet.bscscan.com/"},"https://testnet.bscscan.com/"),(0,n.kt)("br",null)),(0,n.kt)("p",null,"Polygon Mumbai Testnet:",(0,n.kt)("br",null),"\nURL RPC: Choose a RPC server address: ",(0,n.kt)("a",{parentName:"p",href:"https://chainlist.org/chain/80001"},"https://chainlist.org/chain/80001"),(0,n.kt)("br",null),"\nChain ID: 80001",(0,n.kt)("br",null),"\nSymbol: MATIC",(0,n.kt)("br",null),"\nExplorer URL: ",(0,n.kt)("a",{parentName:"p",href:"https://mumbai.polygonscan.com/"},"https://mumbai.polygonscan.com/"),(0,n.kt)("br",null)),(0,n.kt)("h3",{id:"how-can-i-buy-uco-after-receiving-eth-matic-or-bnb"},"How can I buy $UCO after receiving $ETH, $MATIC, or $BNB?"),(0,n.kt)("p",null,"You will be able to buy some $UCO with $ETH / $MATIC or $BNB using the appropriate decentralized exchange (DEX) for your network.\nRemember to set the slippage according to the amount's impact on liquidity.\nHere's how you can do it for each network:"),(0,n.kt)("p",null,"ETH : ",(0,n.kt)("a",{parentName:"p",href:"https://app.uniswap.org/"},"https://app.uniswap.org/"),(0,n.kt)("br",null),"\n$UCO contract address: 0x8a3d77e9d6968b780564936d15B09805827C21fa",(0,n.kt)("br",null)),(0,n.kt)("p",null,"Polygon: ",(0,n.kt)("a",{parentName:"p",href:"https://app.uniswap.org/"},"https://app.uniswap.org/"),(0,n.kt)("br",null),"\n$UCO contract address: 0x3c720206bfacb2d16fa3ac0ed87d2048dbc401fc",(0,n.kt)("br",null)),(0,n.kt)("p",null,"BSC: ",(0,n.kt)("a",{parentName:"p",href:"https://pancakeswap.finance/liquidity?chain=bscTestnet"},"https://pancakeswap.finance/liquidity?chain=bscTestnet"),(0,n.kt)("br",null),"\n$UCO contract address: 0xb001f1e7c8bda414ac7cf7ecba5469fe8d24b6de",(0,n.kt)("br",null)),(0,n.kt)("p",null,"Ensure that you connect your wallet to the respective DEX platform and follow the instructions to make the swap."),(0,n.kt)("h2",{id:"issues-management"},"Issues management"),(0,n.kt)("h3",{id:"what-happens-if-a-problem-occurs-or-i-refuse-a-transaction-during-the-transfer"},"What happens if a problem occurs, or I refuse a transaction during the transfer?"),(0,n.kt)("p",null,'During the delay of the acknowledgment, you should wait for the end of the duration, and you can tell the refund of your ERC20 Wallet with the "Refund" button available on your Archethic Bridge application.'),(0,n.kt)("h3",{id:"if-i-sent-the-tokens-to-a-wrong-mainnet-address-what-to-do"},"If I sent the tokens to a wrong Mainnet address, what to do?"),(0,n.kt)("p",null,"You lose the tokens if the Mainnet address is not your address. Same thing if you do an error in the address (for example a 0 instead of 1)."),(0,n.kt)("h3",{id:"can-i-help-the-developers-analyze-the-problems"},"Can I help the developers analyze the problems?"),(0,n.kt)("p",null,"You can help developers improve the application by submitting information that describes the state of the application.\nTo do this, you can copy/paste your transaction from your local history in the application."),(0,n.kt)("hr",null))}g.isMDXComponent=!0},32909:(e,t,i)=>{i.d(t,{Z:()=>a});const a="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTExcHgiIGhlaWdodD0iMTAycHgiIHZpZXdCb3g9IjAgMCAxMTEgMTAyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPkJsb2NrY2hhbjwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8cmVjdCBpZD0icGF0aC0xIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzIiIGhlaWdodD0iMjgiPjwvcmVjdD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJCcmlkZ2UiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJCbG9ja2NoYW4iPgogICAgICAgICAgICA8ZyBpZD0iQlNDIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyOS4wMDAwMDAsIDAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsPSIjRjNCQTJGIiBjeD0iMjQiIGN5PSIyNCIgcj0iMjQiPjwvY2lyY2xlPgogICAgICAgICAgICAgICAgPGcgaWQ9Ikljb25zX3gyRl9pY29uLTI0X3gyRl9uZXR3b3Jrc194MkZfYmluYW5jZV94NUZfc21hcnRfeDVGX2NoYWluIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4LjAwMDAwMCwgOC4wMDAwMDApIiBmaWxsPSIjMTMxNDE1Ij4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjIuMjIxMDY2MywxOC41NTQ3OTY3IEwyNS44NDEzNTI0LDIyLjE2NTg1MzcgTDE2LDMyIEw2LjE2OTA1MDcyLDIyLjE2NTg1MzcgTDkuNzg5MzM2OCwxOC41NTQ3OTY3IEwxNiwyNC43Njc0Nzk3IEwyMi4yMjEwNjYzLDE4LjU1NDc5NjcgWiBNMTYsMTIuMzMxNzA3MyBMMTkuNjcyMzAxNywxNi4wMDUyMDMzIEwxOS42NzIzMDE3LDE2LjAwNTIwMzMgTDE5LjY3MjMwMTcsMTYuMDA1MjAzMyBMMTYsMTkuNjc4Njk5MiBMMTIuMzM4MTAxNCwxNi4wMTU2MDk4IEwxMi4zMzgxMDE0LDE2LjAwNTIwMzMgTDEyLjMzODEwMTQsMTYuMDA1MjAzMyBMMTIuOTgzMDk0OSwxNS4zNiBMMTMuMjk1MTg4NiwxNS4wNDc4MDQ5IEwxNiwxMi4zMzE3MDczIFogTTMuNjIwMjg2MDksMTIuMzgzNzM5OCBMNy4yNDA1NzIxNywxNi4wMDUyMDMzIEwzLjYyMDI4NjA5LDE5LjYxNjI2MDIgTDAsMTUuOTk0Nzk2NyBMMy42MjAyODYwOSwxMi4zODM3Mzk4IFogTTI4LjM3OTcxMzksMTIuMzgzNzM5OCBMMzIsMTYuMDA1MjAzMyBMMjguMzc5NzEzOSwxOS42MTYyNjAyIEwyNC43NTk0Mjc4LDE1Ljk5NDc5NjcgTDI4LjM3OTcxMzksMTIuMzgzNzM5OCBaIE0xNiwwIEwyNS44MzA5NDkzLDkuODM0MTQ2MzQgTDIyLjIxMDY2MzIsMTMuNDU1NjA5OCBMMTYsNy4yMzI1MjAzMyBMOS43ODkzMzY4LDEzLjQ0NTIwMzMgTDYuMTY5MDUwNzIsOS44MzQxNDYzNCBMMTYsMCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8ZyBpZD0iUG9seWdvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjMuMDAwMDAwLCA1NC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMy45OTA1NTgsMCBMMjMuOTkwNTU4LDAgQzM3LjI1MTQ3NzIsMCA0OCwxMC43NDY0MDk2IDQ4LDI0LjAwNDcyMTYgTDQ4LDI0LjAwNDcyMTYgQzQ4LDM3LjI2MzAzMzYgMzcuMjUxNDc3Miw0OCAyNCw0OCBMMjQsNDggQzEwLjczOTA4MzksNDggMCwzNy4yNTM1OTA0IDAsMjQuMDA0NzIxNiBMMCwyNC4wMDQ3MjE2IEMtMC4wMDk0Mzg4NzkxLDEwLjc0NjQwOTYgMTAuNzM5MDgzOSwwIDIzLjk5MDU1OCwwIFoiIGlkPSJQYXRoIiBmaWxsPSIjODI0N0U1IiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxnIGlkPSJDbGlwcGVkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4LjAwMDAwMCwgMTAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPG1hc2sgaWQ9Im1hc2stMiIgZmlsbD0id2hpdGUiPgogICAgICAgICAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICAgICAgICAgIDwvbWFzaz4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iU1ZHSURfMV8iPjwvZz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjQuMTcwNTE5NCw4LjUyNzU3Nzk0IEMyMy41ODQ1MDkyLDguMTkxODQ2NTIgMjIuODM1MTg0Niw4LjE5MTg0NjUyIDIyLjE3MjMyMDYsOC41Mjc1Nzc5NCBMMTcuNTAzNDUyNCwxMS4yOTAxNjc5IEwxNC4zMzMyMzMzLDEzLjA0NTU2MzUgTDkuNzUwODI1NTgsMTUuNzk4NTYxMiBDOS4xNjQ4MTUzNywxNi4xMzQyOTI2IDguNDE1NDkwODQsMTYuMTM0MjkyNiA3Ljc1MjYyNjg0LDE1Ljc5ODU2MTIgTDQuMTY5MzE4NTIsMTMuNjIxMTAzMSBDMy41ODMzMDgzMiwxMy4yODUzNzE3IDMuMTcwMjE5MTUsMTIuNjEzOTA4OSAzLjE3MDIxOTE1LDExLjg2NTcwNzQgTDMuMTcwMjE5MTUsNy42ODM0NTMyNCBDMy4xNzAyMTkxNSw3LjAxMTk5MDQxIDMuNTA2NDU0NTIsNi4zNTAxMTk5IDQuMTY5MzE4NTIsNS45MjgwNTc1NSBMNy43NTI2MjY4NCwzLjgzNjkzMDQ2IEM4LjMzODYzNzA1LDMuNTAxMTk5MDQgOS4wODc5NjE1NywzLjUwMTE5OTA0IDkuNzUwODI1NTgsMy44MzY5MzA0NiBMMTMuMzM0MTMzOSw2LjAxNDM4ODQ5IEMxMy45MjAxNDQxLDYuMzUwMTE5OSAxNC4zMzMyMzMzLDcuMDIxNTgyNzMgMTQuMzMzMjMzMyw3Ljc2OTc4NDE3IEwxNC4zMzMyMzMzLDEwLjUzMjM3NDEgTDE3LjUwMzQ1MjQsOC42OTA2NDc0OCBMMTcuNTAzNDUyNCw1Ljg1MTMxODk0IEMxNy41MDM0NTI0LDUuMTc5ODU2MTIgMTcuMTY3MjE3MSw0LjUxNzk4NTYxIDE2LjUwNDM1Myw0LjA5NTkyMzI2IEw5LjgzNzI4NjEsMC4xNjMwNjk1NDQgQzkuMjUxMjc1ODksLTAuMTcyNjYxODcxIDguNTAxOTUxMzcsLTAuMTcyNjYxODcxIDcuODM5MDg3MzYsMC4xNjMwNjk1NDQgTDEuMDA4NzA2MDksNC4xODIyNTQyIEMwLjM0NTg0MjA4OSw0LjUxNzk4NTYxIDAuMDA5NjA2NzI0NzEsNS4xODk0NDg0NCAwLjAwOTYwNjcyNDcxLDUuODUxMzE4OTQgTDAuMDA5NjA2NzI0NzEsMTMuNzA3NDM0MSBDMC4wMDk2MDY3MjQ3MSwxNC4zNzg4OTY5IDAuMzQ1ODQyMDg5LDE1LjA0MDc2NzQgMS4wMDg3MDYwOSwxNS40NjI4Mjk3IEw3Ljc2MjIzMzU2LDE5LjM5NTY4MzUgQzguMzQ4MjQzNzcsMTkuNzMxNDE0OSA5LjA5NzU2ODMsMTkuNzMxNDE0OSA5Ljc2MDQzMjMsMTkuMzk1NjgzNSBMMTQuMzQyODQsMTYuNzE5NDI0NSBMMTcuNTEzMDU5MSwxNC44Nzc2OTc4IEwyMi4wOTU0NjY4LDEyLjIwMTQzODggQzIyLjY4MTQ3NywxMS44NjU3MDc0IDIzLjQzMDgwMTYsMTEuODY1NzA3NCAyNC4wOTM2NjU2LDEyLjIwMTQzODggTDI3LjY3Njk3MzksMTQuMjkyNTY1OSBDMjguMjYyOTg0MSwxNC42MjgyOTc0IDI4LjY3NjA3MzMsMTUuMjk5NzYwMiAyOC42NzYwNzMzLDE2LjA0Nzk2MTYgTDI4LjY3NjA3MzMsMjAuMjMwMjE1OCBDMjguNjc2MDczMywyMC45MDE2Nzg3IDI4LjMzOTgzNzksMjEuNTYzNTQ5MiAyNy42NzY5NzM5LDIxLjk4NTYxMTUgTDI0LjE4MDEyNjEsMjQuMDc2NzM4NiBDMjMuNTk0MTE1OSwyNC40MTI0NyAyMi44NDQ3OTE0LDI0LjQxMjQ3IDIyLjE4MTkyNzMsMjQuMDc2NzM4NiBMMTguNTg5MDEyMywyMS45ODU2MTE1IEMxOC4wMDMwMDIxLDIxLjY0OTg4MDEgMTcuNTg5OTEyOSwyMC45Nzg0MTczIDE3LjU4OTkxMjksMjAuMjMwMjE1OCBMMTcuNTg5OTEyOSwxNy41NTM5NTY4IEwxNC40MTk2OTM4LDE5LjM5NTY4MzUgTDE0LjQxOTY5MzgsMjIuMTU4MjczNCBDMTQuNDE5NjkzOCwyMi44Mjk3MzYyIDE0Ljc1NTkyOTIsMjMuNDkxNjA2NyAxNS40MTg3OTMyLDIzLjkxMzY2OTEgTDIyLjE3MjMyMDYsMjcuODQ2NTIyOCBDMjIuNzU4MzMwOCwyOC4xODIyNTQyIDIzLjUwNzY1NTQsMjguMTgyMjU0MiAyNC4xNzA1MTk0LDI3Ljg0NjUyMjggTDMwLjkyNDA0NjgsMjMuOTEzNjY5MSBDMzEuNTEwMDU3LDIzLjU3NzkzNzYgMzEuOTIzMTQ2MiwyMi45MDY0NzQ4IDMxLjkyMzE0NjIsMjIuMTU4MjczNCBMMzEuOTIzMTQ2MiwxNC4yMTU4MjczIEMzMS45MjMxNDYyLDEzLjU0NDM2NDUgMzEuNTg2OTEwOCwxMi44ODI0OTQgMzAuOTI0MDQ2OCwxMi40NjA0MzE3IEwyNC4xNzA1MTk0LDguNTI3NTc3OTQgWiIgaWQ9IlBhdGgiIGZpbGw9IiNGRkZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNtYXNrLTIpIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPGcgaWQ9IkV0aGVyZXVtIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgNTQuMDAwMDAwKSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC00NSI+CiAgICAgICAgICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbCIgZmlsbD0iIzYyN0VFQSIgY3g9IjI0IiBjeT0iMjQiIHI9IjI0Ij48L2NpcmNsZT4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aCIgZmlsbC1vcGFjaXR5PSIwLjYwMiIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIyNC43NDc5NDk3IDUuOTk2NzE5NTIgMjQuNzQ3OTQ5NyAxOS4zMDIzNTEgMzUuOTkzNDM5IDI0LjMyODA0ODEiPjwvcG9seWdvbj4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF8xXyIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIyNC43NDc5NDk3IDUuOTk2NzE5NTIgMTMuNTAyNDYwNCAyNC4zMjgwNDgxIDI0Ljc0Nzk0OTcgMTkuMzAyMzUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGhfMl8iIGZpbGwtb3BhY2l0eT0iMC42MDIiIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyAzMi45NDkxNTI1IDI0Ljc0Nzk0OTcgNDEuOTkwMTU4NiAzNiAyNi40MjA5OTUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGhfM18iIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyA0MS45OTAxNTg2IDI0Ljc0Nzk0OTcgMzIuOTQ5MTUyNSAxMy41MDI0NjA0IDI2LjQyMDk5NTEiPjwvcG9seWdvbj4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF80XyIgZmlsbC1vcGFjaXR5PSIwLjIiIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyAzMC44NTYyMDU2IDM1Ljk5MzQzOSAyNC4zMjgwNDgxIDI0Ljc0Nzk0OTcgMTkuMzAyMzUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF81XyIgZmlsbC1vcGFjaXR5PSIwLjYwMiIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIxNCAyNC4yMTk3NjE1IDI1IDMxIDI1IDE5Ij48L3BvbHlnb24+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/f3ebdb21.d15182dd.js b/assets/js/f3ebdb21.d15182dd.js deleted file mode 100644 index 4127f70cf..000000000 --- a/assets/js/f3ebdb21.d15182dd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9333],{3905:(e,t,i)=>{i.d(t,{Zo:()=>h,kt:()=>u});var a=i(67294);function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function s(e){for(var t=1;t=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var o=a.createContext({}),M=function(e){var t=a.useContext(o),i=t;return e&&(i="function"==typeof e?e(t):s(s({},t),e)),i},h=function(e){var t=M(e.components);return a.createElement(o.Provider,{value:t},e.children)},l="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},I=a.forwardRef((function(e,t){var i=e.components,n=e.mdxType,r=e.originalType,o=e.parentName,h=c(e,["components","mdxType","originalType","parentName"]),l=M(i),I=n,u=l["".concat(o,".").concat(I)]||l[I]||g[I]||r;return i?a.createElement(u,s(s({ref:t},h),{},{components:i})):a.createElement(u,s({ref:t},h))}));function u(e,t){var i=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=i.length,s=new Array(r);s[0]=I;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c[l]="string"==typeof e?e:n,s[1]=c;for(var M=2;M{i.r(t),i.d(t,{assets:()=>o,contentTitle:()=>s,default:()=>g,frontMatter:()=>r,metadata:()=>c,toc:()=>M});var a=i(87462),n=(i(67294),i(3905));i(8209);const r={id:"bridge-2-ways",title:"Archethic Bridge 2-ways"},s=void 0,c={unversionedId:"FAQ/bridge-2-ways",id:"FAQ/bridge-2-ways",title:"Archethic Bridge 2-ways",description:"General",source:"@site/docs/FAQ/bridge-2-ways.md",sourceDirName:"FAQ",slug:"/FAQ/bridge-2-ways",permalink:"/FAQ/bridge-2-ways",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"bridge-2-ways",title:"Archethic Bridge 2-ways"},sidebar:"docs",previous:{title:"AEWeb",permalink:"/FAQ/aeweb"},next:{title:"Archethic Bridge $UCO one-way",permalink:"/FAQ/bridge"}},o={},M=[{value:"General",id:"general",level:2},{value:"What is Archethic Bridge two-ways?",id:"what-is-archethic-bridge-two-ways",level:3},{value:"How to access the Archethic Bridge ?",id:"how-to-access-the-archethic-bridge-",level:3},{value:"Which blockchain is better to bridge my UCOs?",id:"which-blockchain-is-better-to-bridge-my-ucos",level:3},{value:"What blockchains does the Archethic Bridge support?",id:"what-blockchains-does-the-archethic-bridge-support",level:3},{value:"Is the Archethic Bridge available on mobile devices?",id:"is-the-archethic-bridge-available-on-mobile-devices",level:3},{value:"What is an EVM wallet?",id:"what-is-an-evm-wallet",level:3},{value:"How is the price of $UCO estimated?",id:"how-is-the-price-of-uco-estimated",level:3},{value:"How long is the predetermined time?",id:"how-long-is-the-predetermined-time",level:3},{value:"Key Concepts",id:"key-concepts",level:2},{value:"What is an HTLC (Hash Time Lock Contract) in the context of Archethic's bridge?",id:"what-is-an-htlc-hash-time-lock-contract-in-the-context-of-archethics-bridge",level:3},{value:"How does Archethic's cross-chain verification work?",id:"how-does-archethics-cross-chain-verification-work",level:3},{value:"What is the Safety Module in Archethic's bridge?",id:"what-is-the-safety-module-in-archethics-bridge",level:3},{value:"Specifics of Bridging",id:"specifics-of-bridging",level:2},{value:"How does the process of bridging from EVM to Archethic work?",id:"how-does-the-process-of-bridging-from-evm-to-archethic-work",level:3},{value:"What is the process for bridging from Archethic to EVM?",id:"what-is-the-process-for-bridging-from-archethic-to-evm",level:3},{value:"Wallet",id:"wallet",level:2},{value:"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?",id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet",level:3},{value:"Why can't I connect to the Archethic wallet with my Brave browser?",id:"why-cant-i-connect-to-the-archethic-wallet-with-my-brave-browser",level:3},{value:"Testnet",id:"testnet",level:2},{value:"How do I set up Ethereum Sepolia, Binance Testnet and Polygon Mumbai in my EVM Wallet?",id:"how-do-i-set-up-ethereum-sepolia-binance-testnet-and-polygon-mumbai-in-my-evm-wallet",level:3},{value:"How can I buy $UCO after receiving $ETH, $MATIC, or $BNB?",id:"how-can-i-buy-uco-after-receiving-eth-matic-or-bnb",level:3},{value:"Issues management",id:"issues-management",level:2},{value:"What happens if a problem occurs, or I refuse a transaction during the transfer?",id:"what-happens-if-a-problem-occurs-or-i-refuse-a-transaction-during-the-transfer",level:3},{value:"If I sent the tokens to a wrong Mainnet address, what to do?",id:"if-i-sent-the-tokens-to-a-wrong-mainnet-address-what-to-do",level:3},{value:"Can I help the developers analyze the problems?",id:"can-i-help-the-developers-analyze-the-problems",level:3}],h={toc:M},l="wrapper";function g(e){let{components:t,...r}=e;return(0,n.kt)(l,(0,a.Z)({},h,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"general"},"General"),(0,n.kt)("h3",{id:"what-is-archethic-bridge-two-ways"},"What is Archethic Bridge two-ways?"),(0,n.kt)("p",null,"The Archethic Bridge two-ways is a decentralized, peer-to-peer bridge that enables the seamless exchange of UCO ERC20 tokens and other major cryptocurrencies like ETH, MATIC, and BNB between the Archethic blockchain and various other blockchains, including Ethereum, Polygon, and BSC. This functionality allows for the transfer of these assets into their equivalent forms on Archethic, such as aeETH, aeMATIC, and aeBNB, providing a secure and straightforward method for exchanging assets. The bridge utilizes atomic swap technology, specifically Hash Time Lock Contracts (HTLC), to facilitate secure and intermediary-free transactions. Moreover, it incorporates Archethic's unique cross-chain verification technique, enhancing the security and decentralization of these exchanges. This two-way bridge significantly expands the interoperability between Archethic and other blockchain networks, allowing for greater flexibility and integration within the broader blockchain ecosystem."),(0,n.kt)("h3",{id:"how-to-access-the-archethic-bridge-"},"How to access the Archethic Bridge ?"),(0,n.kt)("p",null,"You can access the bridge at : ",(0,n.kt)("a",{parentName:"p",href:"https://bridge.testnet.archethic.net"},"https://bridge.testnet.archethic.net")),(0,n.kt)("h3",{id:"which-blockchain-is-better-to-bridge-my-ucos"},"Which blockchain is better to bridge my UCOs?"),(0,n.kt)("p",null,"Using the 3 blockchains, the result will be the same, but fees are not the same between ETH/MATIC/BSC.\nMATIC has the lowest fees."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"bridge-blockchains",src:i(32909).Z,width:"111",height:"102"})),(0,n.kt)("h3",{id:"what-blockchains-does-the-archethic-bridge-support"},"What blockchains does the Archethic Bridge support?"),(0,n.kt)("p",null,"The Archethic Bridge currently supports bridging between the Archethic blockchain and various EVM (Ethereum Virtual Machine) compatible blockchains."),(0,n.kt)("h3",{id:"is-the-archethic-bridge-available-on-mobile-devices"},"Is the Archethic Bridge available on mobile devices?"),(0,n.kt)("p",null,"No, the Archethic Bridge application is designed exclusively for desktop use and is compatible with macOS, Linux, and Windows operating systems."),(0,n.kt)("h3",{id:"what-is-an-evm-wallet"},"What is an EVM wallet?"),(0,n.kt)("p",null,"An EVM (Ethereum Virtual Machine) wallet is a digital wallet designed to interact with blockchains that are compatible with the Ethereum Virtual Machine. EVM wallets can store, send, and receive Ether (ETH) and other EVM-compatible tokens, execute smart contracts, and interact with decentralized applications (dApps) on EVM-compatible networks."),(0,n.kt)("h3",{id:"how-is-the-price-of-uco-estimated"},"How is the price of $UCO estimated?"),(0,n.kt)("p",null,"The price of $UCO is determined using an Archethic Oracle that consolidates information from various sources, including Coingecko and CoinMarketCap."),(0,n.kt)("h3",{id:"how-long-is-the-predetermined-time"},"How long is the predetermined time?"),(0,n.kt)("p",null,"The timelock lasts 2 hours."),(0,n.kt)("h2",{id:"key-concepts"},"Key Concepts"),(0,n.kt)("h3",{id:"what-is-an-htlc-hash-time-lock-contract-in-the-context-of-archethics-bridge"},"What is an HTLC (Hash Time Lock Contract) in the context of Archethic's bridge?"),(0,n.kt)("p",null,"HTLC stands for Hash Time Lock Contract. In Archethic's bridge, it is a type of contract used in atomic swaps to securely exchange assets in a peer-to-peer manner without intermediaries. These contracts lock funds until a secret is revealed or a specified time period elapses, ensuring a secure and reversible asset exchange."),(0,n.kt)("h3",{id:"how-does-archethics-cross-chain-verification-work"},"How does Archethic's cross-chain verification work?"),(0,n.kt)("p",null,"Archethic's cross-chain verification enhances atomic swaps by allowing data retrieval outside of the blockchain. This makes the process fully decentralized and strengthens the security model. Archethic's nodes can verify transaction status on other chains, like EVM blockchains, establishing a strong consensus on the status of a swap."),(0,n.kt)("h3",{id:"what-is-the-safety-module-in-archethics-bridge"},"What is the Safety Module in Archethic's bridge?"),(0,n.kt)("p",null,"The Safety Module in Archethic's bridge is a reserve of tokens designed to mitigate risks associated with asset bridging. It addresses potential deficiencies and disruptions in bridge operations by providing a token reserve that matches the amount in each pool at launch. This module is funded by fees from transfers and is managed by a multisignature wallet governed by the bridge's governance."),(0,n.kt)("h2",{id:"specifics-of-bridging"},"Specifics of Bridging"),(0,n.kt)("h3",{id:"how-does-the-process-of-bridging-from-evm-to-archethic-work"},"How does the process of bridging from EVM to Archethic work?"),(0,n.kt)("p",null,"To bridge from EVM to Archethic, a user deploys an HTLC smart contract on both blockchains. The process involves locking funds using a secret and its hash, verifying the transaction across chains, minting new tokens on Archethic, and transferring funds to respective recipient wallets. The entire process is secured by atomic swaps and Archethic's cross-chain verification."),(0,n.kt)("h3",{id:"what-is-the-process-for-bridging-from-archethic-to-evm"},"What is the process for bridging from Archethic to EVM?"),(0,n.kt)("p",null,"Bridging from Archethic to EVM follows a similar pattern but in reverse. It introduces an additional step where EVM cannot directly request information from the blockchain. Instead, cryptography is used to assert actions through signatures, ensuring non-repudiation. This involves creating and funding HTLC contracts on both blockchains, revealing secrets, and transferring funds securely."),(0,n.kt)("h2",{id:"wallet"},"Wallet"),(0,n.kt)("h3",{id:"im-using-the-mainnet-network-in-the-wallet-how-can-i-switch-on-the-testnet"},"I\u2019m using the Mainnet network in the Wallet, how can I switch on the Testnet?"),(0,n.kt)("p",null,"The switch is not possible because the seed is not shared between Mainnet and Testnet. Later, the wallet will be multiseeds, but not for the moment. The only way for the moment is to remove the Wallet (don\u2019t forget the 24 words) and create/import a wallet on the Testnet network."),(0,n.kt)("h3",{id:"why-cant-i-connect-to-the-archethic-wallet-with-my-brave-browser"},"Why can't I connect to the Archethic wallet with my Brave browser?"),(0,n.kt)("p",null,"Brave includes a shield feature that might block certain local connections.\nTo successfully connect to the Archethic wallet, you'll need to modify the Brave browser\u2019s shield settings as per its documentation"),(0,n.kt)("h2",{id:"testnet"},"Testnet"),(0,n.kt)("h3",{id:"how-do-i-set-up-ethereum-sepolia-binance-testnet-and-polygon-mumbai-in-my-evm-wallet"},"How do I set up Ethereum Sepolia, Binance Testnet and Polygon Mumbai in my EVM Wallet?"),(0,n.kt)("p",null,"To configure these networks in your EVM Wallet, you'll need to go to the wallet's settings and manually add each network using the Chain ID and Explorer URL provided above."),(0,n.kt)("p",null,"Ethereum Sepolia Testnet:",(0,n.kt)("br",null),"\nURL RPC: Choose a RPC server address: ",(0,n.kt)("a",{parentName:"p",href:"https://chainlist.org/chain/11155111"},"https://chainlist.org/chain/11155111"),(0,n.kt)("br",null),"\nChain ID: 11155111",(0,n.kt)("br",null),"\nSymbol: ETH",(0,n.kt)("br",null),"\nExplorer URL: ",(0,n.kt)("a",{parentName:"p",href:"https://sepolia.etherscan.io/"},"https://sepolia.etherscan.io/"),(0,n.kt)("br",null)),(0,n.kt)("p",null,"Binance Smart Chain Testnet:",(0,n.kt)("br",null),"\nURL RPC: Choose a RPC server address: ",(0,n.kt)("a",{parentName:"p",href:"https://chainlist.org/chain/97"},"https://chainlist.org/chain/97"),(0,n.kt)("br",null),"\nChain ID: 97",(0,n.kt)("br",null),"\nSymbol: tBNB",(0,n.kt)("br",null),"\nExplorer URL: ",(0,n.kt)("a",{parentName:"p",href:"https://testnet.bscscan.com/"},"https://testnet.bscscan.com/"),(0,n.kt)("br",null)),(0,n.kt)("p",null,"Polygon Mumbai Testnet:",(0,n.kt)("br",null),"\nURL RPC: Choose a RPC server address: ",(0,n.kt)("a",{parentName:"p",href:"https://chainlist.org/chain/80001"},"https://chainlist.org/chain/80001"),(0,n.kt)("br",null),"\nChain ID: 80001",(0,n.kt)("br",null),"\nSymbol: MATIC",(0,n.kt)("br",null),"\nExplorer URL: ",(0,n.kt)("a",{parentName:"p",href:"https://mumbai.polygonscan.com/"},"https://mumbai.polygonscan.com/"),(0,n.kt)("br",null)),(0,n.kt)("h3",{id:"how-can-i-buy-uco-after-receiving-eth-matic-or-bnb"},"How can I buy $UCO after receiving $ETH, $MATIC, or $BNB?"),(0,n.kt)("p",null,"You will be able to buy some $UCO with $ETH / $MATIC or $BNB using the appropriate decentralized exchange (DEX) for your network.\nRemember to set the slippage according to the amount's impact on liquidity.\nHere's how you can do it for each network:"),(0,n.kt)("p",null,"ETH : ",(0,n.kt)("a",{parentName:"p",href:"https://app.uniswap.org/"},"https://app.uniswap.org/"),(0,n.kt)("br",null),"\n$UCO contract address: 0x8a3d77e9d6968b780564936d15B09805827C21fa",(0,n.kt)("br",null)),(0,n.kt)("p",null,"Polygon: ",(0,n.kt)("a",{parentName:"p",href:"https://app.uniswap.org/"},"https://app.uniswap.org/"),(0,n.kt)("br",null),"\n$UCO contract address: 0x3c720206bfacb2d16fa3ac0ed87d2048dbc401fc",(0,n.kt)("br",null)),(0,n.kt)("p",null,"BSC: ",(0,n.kt)("a",{parentName:"p",href:"https://pancakeswap.finance/liquidity?chain=bscTestnet"},"https://pancakeswap.finance/liquidity?chain=bscTestnet"),(0,n.kt)("br",null),"\n$UCO contract address: 0xb001f1e7c8bda414ac7cf7ecba5469fe8d24b6de",(0,n.kt)("br",null)),(0,n.kt)("p",null,"Ensure that you connect your wallet to the respective DEX platform and follow the instructions to make the swap."),(0,n.kt)("h2",{id:"issues-management"},"Issues management"),(0,n.kt)("h3",{id:"what-happens-if-a-problem-occurs-or-i-refuse-a-transaction-during-the-transfer"},"What happens if a problem occurs, or I refuse a transaction during the transfer?"),(0,n.kt)("p",null,'During the delay of the acknowledgment, you should wait for the end of the duration, and you can tell the refund of your ERC20 Wallet with the "Refund" button available on your Archethic Bridge application.'),(0,n.kt)("h3",{id:"if-i-sent-the-tokens-to-a-wrong-mainnet-address-what-to-do"},"If I sent the tokens to a wrong Mainnet address, what to do?"),(0,n.kt)("p",null,"You lose the tokens if the Mainnet address is not your address. Same thing if you do an error in the address (for example a 0 instead of 1)."),(0,n.kt)("h3",{id:"can-i-help-the-developers-analyze-the-problems"},"Can I help the developers analyze the problems?"),(0,n.kt)("p",null,"You can help developers improve the application by submitting information that describes the state of the application.\nTo do this, you can copy/paste your transaction from your local history in the application."),(0,n.kt)("hr",null))}g.isMDXComponent=!0},32909:(e,t,i)=>{i.d(t,{Z:()=>a});const a="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTExcHgiIGhlaWdodD0iMTAycHgiIHZpZXdCb3g9IjAgMCAxMTEgMTAyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPkJsb2NrY2hhbjwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8cmVjdCBpZD0icGF0aC0xIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzIiIGhlaWdodD0iMjgiPjwvcmVjdD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJCcmlkZ2UiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJCbG9ja2NoYW4iPgogICAgICAgICAgICA8ZyBpZD0iQlNDIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyOS4wMDAwMDAsIDAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsPSIjRjNCQTJGIiBjeD0iMjQiIGN5PSIyNCIgcj0iMjQiPjwvY2lyY2xlPgogICAgICAgICAgICAgICAgPGcgaWQ9Ikljb25zX3gyRl9pY29uLTI0X3gyRl9uZXR3b3Jrc194MkZfYmluYW5jZV94NUZfc21hcnRfeDVGX2NoYWluIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4LjAwMDAwMCwgOC4wMDAwMDApIiBmaWxsPSIjMTMxNDE1Ij4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjIuMjIxMDY2MywxOC41NTQ3OTY3IEwyNS44NDEzNTI0LDIyLjE2NTg1MzcgTDE2LDMyIEw2LjE2OTA1MDcyLDIyLjE2NTg1MzcgTDkuNzg5MzM2OCwxOC41NTQ3OTY3IEwxNiwyNC43Njc0Nzk3IEwyMi4yMjEwNjYzLDE4LjU1NDc5NjcgWiBNMTYsMTIuMzMxNzA3MyBMMTkuNjcyMzAxNywxNi4wMDUyMDMzIEwxOS42NzIzMDE3LDE2LjAwNTIwMzMgTDE5LjY3MjMwMTcsMTYuMDA1MjAzMyBMMTYsMTkuNjc4Njk5MiBMMTIuMzM4MTAxNCwxNi4wMTU2MDk4IEwxMi4zMzgxMDE0LDE2LjAwNTIwMzMgTDEyLjMzODEwMTQsMTYuMDA1MjAzMyBMMTIuOTgzMDk0OSwxNS4zNiBMMTMuMjk1MTg4NiwxNS4wNDc4MDQ5IEwxNiwxMi4zMzE3MDczIFogTTMuNjIwMjg2MDksMTIuMzgzNzM5OCBMNy4yNDA1NzIxNywxNi4wMDUyMDMzIEwzLjYyMDI4NjA5LDE5LjYxNjI2MDIgTDAsMTUuOTk0Nzk2NyBMMy42MjAyODYwOSwxMi4zODM3Mzk4IFogTTI4LjM3OTcxMzksMTIuMzgzNzM5OCBMMzIsMTYuMDA1MjAzMyBMMjguMzc5NzEzOSwxOS42MTYyNjAyIEwyNC43NTk0Mjc4LDE1Ljk5NDc5NjcgTDI4LjM3OTcxMzksMTIuMzgzNzM5OCBaIE0xNiwwIEwyNS44MzA5NDkzLDkuODM0MTQ2MzQgTDIyLjIxMDY2MzIsMTMuNDU1NjA5OCBMMTYsNy4yMzI1MjAzMyBMOS43ODkzMzY4LDEzLjQ0NTIwMzMgTDYuMTY5MDUwNzIsOS44MzQxNDYzNCBMMTYsMCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8ZyBpZD0iUG9seWdvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjMuMDAwMDAwLCA1NC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMy45OTA1NTgsMCBMMjMuOTkwNTU4LDAgQzM3LjI1MTQ3NzIsMCA0OCwxMC43NDY0MDk2IDQ4LDI0LjAwNDcyMTYgTDQ4LDI0LjAwNDcyMTYgQzQ4LDM3LjI2MzAzMzYgMzcuMjUxNDc3Miw0OCAyNCw0OCBMMjQsNDggQzEwLjczOTA4MzksNDggMCwzNy4yNTM1OTA0IDAsMjQuMDA0NzIxNiBMMCwyNC4wMDQ3MjE2IEMtMC4wMDk0Mzg4NzkxLDEwLjc0NjQwOTYgMTAuNzM5MDgzOSwwIDIzLjk5MDU1OCwwIFoiIGlkPSJQYXRoIiBmaWxsPSIjODI0N0U1IiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxnIGlkPSJDbGlwcGVkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4LjAwMDAwMCwgMTAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPG1hc2sgaWQ9Im1hc2stMiIgZmlsbD0id2hpdGUiPgogICAgICAgICAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICAgICAgICAgIDwvbWFzaz4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iU1ZHSURfMV8iPjwvZz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjQuMTcwNTE5NCw4LjUyNzU3Nzk0IEMyMy41ODQ1MDkyLDguMTkxODQ2NTIgMjIuODM1MTg0Niw4LjE5MTg0NjUyIDIyLjE3MjMyMDYsOC41Mjc1Nzc5NCBMMTcuNTAzNDUyNCwxMS4yOTAxNjc5IEwxNC4zMzMyMzMzLDEzLjA0NTU2MzUgTDkuNzUwODI1NTgsMTUuNzk4NTYxMiBDOS4xNjQ4MTUzNywxNi4xMzQyOTI2IDguNDE1NDkwODQsMTYuMTM0MjkyNiA3Ljc1MjYyNjg0LDE1Ljc5ODU2MTIgTDQuMTY5MzE4NTIsMTMuNjIxMTAzMSBDMy41ODMzMDgzMiwxMy4yODUzNzE3IDMuMTcwMjE5MTUsMTIuNjEzOTA4OSAzLjE3MDIxOTE1LDExLjg2NTcwNzQgTDMuMTcwMjE5MTUsNy42ODM0NTMyNCBDMy4xNzAyMTkxNSw3LjAxMTk5MDQxIDMuNTA2NDU0NTIsNi4zNTAxMTk5IDQuMTY5MzE4NTIsNS45MjgwNTc1NSBMNy43NTI2MjY4NCwzLjgzNjkzMDQ2IEM4LjMzODYzNzA1LDMuNTAxMTk5MDQgOS4wODc5NjE1NywzLjUwMTE5OTA0IDkuNzUwODI1NTgsMy44MzY5MzA0NiBMMTMuMzM0MTMzOSw2LjAxNDM4ODQ5IEMxMy45MjAxNDQxLDYuMzUwMTE5OSAxNC4zMzMyMzMzLDcuMDIxNTgyNzMgMTQuMzMzMjMzMyw3Ljc2OTc4NDE3IEwxNC4zMzMyMzMzLDEwLjUzMjM3NDEgTDE3LjUwMzQ1MjQsOC42OTA2NDc0OCBMMTcuNTAzNDUyNCw1Ljg1MTMxODk0IEMxNy41MDM0NTI0LDUuMTc5ODU2MTIgMTcuMTY3MjE3MSw0LjUxNzk4NTYxIDE2LjUwNDM1Myw0LjA5NTkyMzI2IEw5LjgzNzI4NjEsMC4xNjMwNjk1NDQgQzkuMjUxMjc1ODksLTAuMTcyNjYxODcxIDguNTAxOTUxMzcsLTAuMTcyNjYxODcxIDcuODM5MDg3MzYsMC4xNjMwNjk1NDQgTDEuMDA4NzA2MDksNC4xODIyNTQyIEMwLjM0NTg0MjA4OSw0LjUxNzk4NTYxIDAuMDA5NjA2NzI0NzEsNS4xODk0NDg0NCAwLjAwOTYwNjcyNDcxLDUuODUxMzE4OTQgTDAuMDA5NjA2NzI0NzEsMTMuNzA3NDM0MSBDMC4wMDk2MDY3MjQ3MSwxNC4zNzg4OTY5IDAuMzQ1ODQyMDg5LDE1LjA0MDc2NzQgMS4wMDg3MDYwOSwxNS40NjI4Mjk3IEw3Ljc2MjIzMzU2LDE5LjM5NTY4MzUgQzguMzQ4MjQzNzcsMTkuNzMxNDE0OSA5LjA5NzU2ODMsMTkuNzMxNDE0OSA5Ljc2MDQzMjMsMTkuMzk1NjgzNSBMMTQuMzQyODQsMTYuNzE5NDI0NSBMMTcuNTEzMDU5MSwxNC44Nzc2OTc4IEwyMi4wOTU0NjY4LDEyLjIwMTQzODggQzIyLjY4MTQ3NywxMS44NjU3MDc0IDIzLjQzMDgwMTYsMTEuODY1NzA3NCAyNC4wOTM2NjU2LDEyLjIwMTQzODggTDI3LjY3Njk3MzksMTQuMjkyNTY1OSBDMjguMjYyOTg0MSwxNC42MjgyOTc0IDI4LjY3NjA3MzMsMTUuMjk5NzYwMiAyOC42NzYwNzMzLDE2LjA0Nzk2MTYgTDI4LjY3NjA3MzMsMjAuMjMwMjE1OCBDMjguNjc2MDczMywyMC45MDE2Nzg3IDI4LjMzOTgzNzksMjEuNTYzNTQ5MiAyNy42NzY5NzM5LDIxLjk4NTYxMTUgTDI0LjE4MDEyNjEsMjQuMDc2NzM4NiBDMjMuNTk0MTE1OSwyNC40MTI0NyAyMi44NDQ3OTE0LDI0LjQxMjQ3IDIyLjE4MTkyNzMsMjQuMDc2NzM4NiBMMTguNTg5MDEyMywyMS45ODU2MTE1IEMxOC4wMDMwMDIxLDIxLjY0OTg4MDEgMTcuNTg5OTEyOSwyMC45Nzg0MTczIDE3LjU4OTkxMjksMjAuMjMwMjE1OCBMMTcuNTg5OTEyOSwxNy41NTM5NTY4IEwxNC40MTk2OTM4LDE5LjM5NTY4MzUgTDE0LjQxOTY5MzgsMjIuMTU4MjczNCBDMTQuNDE5NjkzOCwyMi44Mjk3MzYyIDE0Ljc1NTkyOTIsMjMuNDkxNjA2NyAxNS40MTg3OTMyLDIzLjkxMzY2OTEgTDIyLjE3MjMyMDYsMjcuODQ2NTIyOCBDMjIuNzU4MzMwOCwyOC4xODIyNTQyIDIzLjUwNzY1NTQsMjguMTgyMjU0MiAyNC4xNzA1MTk0LDI3Ljg0NjUyMjggTDMwLjkyNDA0NjgsMjMuOTEzNjY5MSBDMzEuNTEwMDU3LDIzLjU3NzkzNzYgMzEuOTIzMTQ2MiwyMi45MDY0NzQ4IDMxLjkyMzE0NjIsMjIuMTU4MjczNCBMMzEuOTIzMTQ2MiwxNC4yMTU4MjczIEMzMS45MjMxNDYyLDEzLjU0NDM2NDUgMzEuNTg2OTEwOCwxMi44ODI0OTQgMzAuOTI0MDQ2OCwxMi40NjA0MzE3IEwyNC4xNzA1MTk0LDguNTI3NTc3OTQgWiIgaWQ9IlBhdGgiIGZpbGw9IiNGRkZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNtYXNrLTIpIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPGcgaWQ9IkV0aGVyZXVtIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgNTQuMDAwMDAwKSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC00NSI+CiAgICAgICAgICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbCIgZmlsbD0iIzYyN0VFQSIgY3g9IjI0IiBjeT0iMjQiIHI9IjI0Ij48L2NpcmNsZT4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aCIgZmlsbC1vcGFjaXR5PSIwLjYwMiIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIyNC43NDc5NDk3IDUuOTk2NzE5NTIgMjQuNzQ3OTQ5NyAxOS4zMDIzNTEgMzUuOTkzNDM5IDI0LjMyODA0ODEiPjwvcG9seWdvbj4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF8xXyIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIyNC43NDc5NDk3IDUuOTk2NzE5NTIgMTMuNTAyNDYwNCAyNC4zMjgwNDgxIDI0Ljc0Nzk0OTcgMTkuMzAyMzUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGhfMl8iIGZpbGwtb3BhY2l0eT0iMC42MDIiIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyAzMi45NDkxNTI1IDI0Ljc0Nzk0OTcgNDEuOTkwMTU4NiAzNiAyNi40MjA5OTUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGhfM18iIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyA0MS45OTAxNTg2IDI0Ljc0Nzk0OTcgMzIuOTQ5MTUyNSAxMy41MDI0NjA0IDI2LjQyMDk5NTEiPjwvcG9seWdvbj4KICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF80XyIgZmlsbC1vcGFjaXR5PSIwLjIiIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iMjQuNzQ3OTQ5NyAzMC44NTYyMDU2IDM1Ljk5MzQzOSAyNC4zMjgwNDgxIDI0Ljc0Nzk0OTcgMTkuMzAyMzUxIj48L3BvbHlnb24+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aF81XyIgZmlsbC1vcGFjaXR5PSIwLjYwMiIgZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIxNCAyNC4yMTk3NjE1IDI1IDMxIDI1IDE5Ij48L3BvbHlnb24+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/f5288705.9a47960d.js b/assets/js/f5288705.9a47960d.js deleted file mode 100644 index 1023e7c97..000000000 --- a/assets/js/f5288705.9a47960d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6087],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>y});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),i=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},m=function(e){var t=i(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,c=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=i(a),p=r,y=d["".concat(c,".").concat(p)]||d[p]||u[p]||s;return a?n.createElement(y,o(o({ref:t},m),{},{components:a})):n.createElement(y,o({ref:t},m))}));function y(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,o=new Array(s);o[0]=p;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[d]="string"==typeof e?e:r,o[1]=l;for(var i=2;i{a.r(t),a.d(t,{Badge:()=>p,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>c,toc:()=>m});var n=a(87462),r=a(67294),s=a(3905);a(8209);const o={id:"transaction-summary",title:"TransactionSummary",hide_table_of_contents:!1},l=void 0,c={unversionedId:"build/api/schema/objects/transaction-summary",id:"build/api/schema/objects/transaction-summary",title:"TransactionSummary",description:"[Transaction Summary] Represents transaction header or extract to summarize it",source:"@site/docs/build/api/schema/objects/transaction-summary.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-summary",permalink:"/build/api/schema/objects/transaction-summary",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"transaction-summary",title:"TransactionSummary",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionMovement",permalink:"/build/api/schema/objects/transaction-movement"},next:{title:"Transaction",permalink:"/build/api/schema/objects/transaction"}},i={},m=[{value:"Fields",id:"fields",level:3},{value:'TransactionSummary.addressAddress ',id:"code-style-fontweight-normal-transactionsummarybaddressbcodeaddress-",level:4},{value:'TransactionSummary.feeInt ',id:"code-style-fontweight-normal-transactionsummarybfeebcodeint-",level:4},{value:'TransactionSummary.movementsAddresses[Address] ',id:"code-style-fontweight-normal-transactionsummarybmovementsaddressesbcodeaddress--",level:4},{value:'TransactionSummary.timestampTimestamp ',id:"code-style-fontweight-normal-transactionsummarybtimestampbcodetimestamp-",level:4},{value:'TransactionSummary.typeString ',id:"code-style-fontweight-normal-transactionsummarybtypebcodestring-",level:4},{value:'TransactionSummary.validationStampChecksumHash ',id:"code-style-fontweight-normal-transactionsummarybvalidationstampchecksumbcodehash-",level:4},{value:"Member of",id:"member-of",level:3}],d=()=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,s.kt)(r.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),p=e=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:m,Bullet:d,SpecifiedBy:u,Badge:p},b="wrapper";function f(e){let{components:t,...a}=e;return(0,s.kt)(b,(0,n.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"[Transaction Summary]"," Represents transaction header or extract to summarize it"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionSummary {\n address: Address\n fee: Int\n movementsAddresses: [Address]\n timestamp: Timestamp\n type: String\n validationStampChecksum: Hash\n}\n")),(0,s.kt)("h3",{id:"fields"},"Fields"),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybaddressbcodeaddress-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"address"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,s.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybfeebcodeint-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"fee"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,s.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybmovementsaddressesbcodeaddress--"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"movementsAddresses"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,s.kt)("inlineCode",{parentName:"a"},"[Address]"))," ",(0,s.kt)(p,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybtimestampbcodetimestamp-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"timestamp"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,s.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybtypebcodestring-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"type"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,s.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybvalidationstampchecksumbcodehash-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"validationStampChecksum"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hash"},(0,s.kt)("inlineCode",{parentName:"a"},"Hash"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h3",{id:"member-of"},"Member of"),(0,s.kt)("p",null,(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/beacon-chain-summary"},(0,s.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,s.kt)(p,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/f5288705.e726989a.js b/assets/js/f5288705.e726989a.js new file mode 100644 index 000000000..054b65ea4 --- /dev/null +++ b/assets/js/f5288705.e726989a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6087],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>y});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),i=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},m=function(e){var t=i(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,c=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=i(a),p=r,y=d["".concat(c,".").concat(p)]||d[p]||u[p]||s;return a?n.createElement(y,o(o({ref:t},m),{},{components:a})):n.createElement(y,o({ref:t},m))}));function y(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,o=new Array(s);o[0]=p;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[d]="string"==typeof e?e:r,o[1]=l;for(var i=2;i{a.r(t),a.d(t,{Badge:()=>p,Bullet:()=>d,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>c,toc:()=>m});var n=a(87462),r=a(67294),s=a(3905);a(8209);const o={id:"transaction-summary",title:"TransactionSummary",hide_table_of_contents:!1},l=void 0,c={unversionedId:"build/api/schema/objects/transaction-summary",id:"build/api/schema/objects/transaction-summary",title:"TransactionSummary",description:"[Transaction Summary] Represents transaction header or extract to summarize it",source:"@site/docs/build/api/schema/objects/transaction-summary.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/transaction-summary",permalink:"/build/api/schema/objects/transaction-summary",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"transaction-summary",title:"TransactionSummary",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"TransactionMovement",permalink:"/build/api/schema/objects/transaction-movement"},next:{title:"Transaction",permalink:"/build/api/schema/objects/transaction"}},i={},m=[{value:"Fields",id:"fields",level:3},{value:'TransactionSummary.addressAddress ',id:"code-style-fontweight-normal-transactionsummarybaddressbcodeaddress-",level:4},{value:'TransactionSummary.feeInt ',id:"code-style-fontweight-normal-transactionsummarybfeebcodeint-",level:4},{value:'TransactionSummary.movementsAddresses[Address] ',id:"code-style-fontweight-normal-transactionsummarybmovementsaddressesbcodeaddress--",level:4},{value:'TransactionSummary.timestampTimestamp ',id:"code-style-fontweight-normal-transactionsummarybtimestampbcodetimestamp-",level:4},{value:'TransactionSummary.typeString ',id:"code-style-fontweight-normal-transactionsummarybtypebcodestring-",level:4},{value:'TransactionSummary.validationStampChecksumHash ',id:"code-style-fontweight-normal-transactionsummarybvalidationstampchecksumbcodehash-",level:4},{value:"Member of",id:"member-of",level:3}],d=()=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,s.kt)(r.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),p=e=>(0,s.kt)(r.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),y={toc:m,Bullet:d,SpecifiedBy:u,Badge:p},b="wrapper";function f(e){let{components:t,...a}=e;return(0,s.kt)(b,(0,n.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"[Transaction Summary]"," Represents transaction header or extract to summarize it"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"type TransactionSummary {\n address: Address\n fee: Int\n movementsAddresses: [Address]\n timestamp: Timestamp\n type: String\n validationStampChecksum: Hash\n}\n")),(0,s.kt)("h3",{id:"fields"},"Fields"),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybaddressbcodeaddress-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"address"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,s.kt)("inlineCode",{parentName:"a"},"Address"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybfeebcodeint-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"fee"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/int"},(0,s.kt)("inlineCode",{parentName:"a"},"Int"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybmovementsaddressesbcodeaddress--"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"movementsAddresses"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/address"},(0,s.kt)("inlineCode",{parentName:"a"},"[Address]"))," ",(0,s.kt)(p,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybtimestampbcodetimestamp-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"timestamp"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/timestamp"},(0,s.kt)("inlineCode",{parentName:"a"},"Timestamp"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybtypebcodestring-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"type"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/string"},(0,s.kt)("inlineCode",{parentName:"a"},"String"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h4",{id:"code-style-fontweight-normal-transactionsummarybvalidationstampchecksumbcodehash-"},(0,s.kt)("a",{parentName:"h4",href:"#"},(0,s.kt)("code",{style:{fontWeight:"normal"}},"TransactionSummary.",(0,s.kt)("b",null,"validationStampChecksum"))),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"h4",href:"/build/api/schema/scalars/hash"},(0,s.kt)("inlineCode",{parentName:"a"},"Hash"))," ",(0,s.kt)(p,{class:"secondary",text:"scalar",mdxType:"Badge"})),(0,s.kt)("blockquote",null),(0,s.kt)("h3",{id:"member-of"},"Member of"),(0,s.kt)("p",null,(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/beacon-chain-summary"},(0,s.kt)("inlineCode",{parentName:"a"},"BeaconChainSummary"))," ",(0,s.kt)(p,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/f57a1375.6b0f3760.js b/assets/js/f57a1375.6b0f3760.js deleted file mode 100644 index 659db128e..000000000 --- a/assets/js/f57a1375.6b0f3760.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[330],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>h});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=p(r),m=o,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||a;return r?n.createElement(h,i(i({ref:t},s),{},{components:r})):n.createElement(h,i({ref:t},s))}));function h(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:o,i[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"code-proposals-ci",title:"CI"},i=void 0,c={unversionedId:"build/core/governance/code-proposals-ci",id:"build/core/governance/code-proposals-ci",title:"CI",description:"After a code proposal is received by a node in the network and passes initial validation, the next step in the process is the CI.",source:"@site/docs/build/core/governance/ci.md",sourceDirName:"build/core/governance",slug:"/build/core/governance/code-proposals-ci",permalink:"/build/core/governance/code-proposals-ci",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"code-proposals-ci",title:"CI"},sidebar:"docs",previous:{title:"CD",permalink:"/build/core/governance/code-proposals-cd"},next:{title:"Code Proposals",permalink:"/build/core/governance/code-proposals"}},l={},p=[],s={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"After a code proposal is received by a node in the network and passes initial validation, the next step in the process is the CI."),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"archethic-ci")," target produces an image with build tools.\nIts goal is to compile the source code into ",(0,o.kt)("inlineCode",{parentName:"p"},"archethic_node")," release.\nThe CI part is powered by ",(0,o.kt)("inlineCode",{parentName:"p"},"scripts/proposal_ci_job.sh"),".\nThe script runs in a container named ",(0,o.kt)("inlineCode",{parentName:"p"},"archethic-prop-{address}"),", it produces: release upgrade of ",(0,o.kt)("inlineCode",{parentName:"p"},"archethic_node")," and combined log of application of a code proposal to the source code, execution of unit tests, and log from linter. The log can be obtained with ",(0,o.kt)("inlineCode",{parentName:"p"},"docker logs"),", the release upgrade and the validator with ",(0,o.kt)("inlineCode",{parentName:"p"},"docker cp"),", after that the container can be disposed."),(0,o.kt)("p",null,"the logs are collected in ",(0,o.kt)("inlineCode",{parentName:"p"},"ci_logfile.txt")," and this file is copied at the end to tmp directory created in filesystem."),(0,o.kt)("p",null,"the script runs multiple commands:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Creates a branch prop_{proposal_address}"),(0,o.kt)("li",{parentName:"ul"},"Apply the changes to the branch"),(0,o.kt)("li",{parentName:"ul"},"Add the changes and commit"),(0,o.kt)("li",{parentName:"ul"},"Checking if the project is formatted correctly"),(0,o.kt)("li",{parentName:"ul"},"Check if the project compiles without warning"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/rrrene/credo"},"Credo")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/nccgroup/sobelow"},"Sobelow")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/sascha-wolf/knigge"},"Knigge")),(0,o.kt)("li",{parentName:"ul"},"Runs the test suite"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/jeremyjh/dialyxir"},"Dialyzer")),(0,o.kt)("li",{parentName:"ul"},"Checks if dependencies are outdated"),(0,o.kt)("li",{parentName:"ul"},"And Finally it creates an upgrade release with ",(0,o.kt)("a",{parentName:"li",href:"https://github.com/bitwalker/distillery"},"Distillery"))))}u.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/f57a1375.90a8acd6.js b/assets/js/f57a1375.90a8acd6.js new file mode 100644 index 000000000..2e0536696 --- /dev/null +++ b/assets/js/f57a1375.90a8acd6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[330],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>h});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=p(r),m=o,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||a;return r?n.createElement(h,i(i({ref:t},s),{},{components:r})):n.createElement(h,i({ref:t},s))}));function h(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:o,i[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));r(8209);const a={id:"code-proposals-ci",title:"CI"},i=void 0,c={unversionedId:"build/core/governance/code-proposals-ci",id:"build/core/governance/code-proposals-ci",title:"CI",description:"After a code proposal is received by a node in the network and passes initial validation, the next step in the process is the CI.",source:"@site/docs/build/core/governance/ci.md",sourceDirName:"build/core/governance",slug:"/build/core/governance/code-proposals-ci",permalink:"/build/core/governance/code-proposals-ci",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"code-proposals-ci",title:"CI"},sidebar:"docs",previous:{title:"CD",permalink:"/build/core/governance/code-proposals-cd"},next:{title:"Code Proposals",permalink:"/build/core/governance/code-proposals"}},l={},p=[],s={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"After a code proposal is received by a node in the network and passes initial validation, the next step in the process is the CI."),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"archethic-ci")," target produces an image with build tools.\nIts goal is to compile the source code into ",(0,o.kt)("inlineCode",{parentName:"p"},"archethic_node")," release.\nThe CI part is powered by ",(0,o.kt)("inlineCode",{parentName:"p"},"scripts/proposal_ci_job.sh"),".\nThe script runs in a container named ",(0,o.kt)("inlineCode",{parentName:"p"},"archethic-prop-{address}"),", it produces: release upgrade of ",(0,o.kt)("inlineCode",{parentName:"p"},"archethic_node")," and combined log of application of a code proposal to the source code, execution of unit tests, and log from linter. The log can be obtained with ",(0,o.kt)("inlineCode",{parentName:"p"},"docker logs"),", the release upgrade and the validator with ",(0,o.kt)("inlineCode",{parentName:"p"},"docker cp"),", after that the container can be disposed."),(0,o.kt)("p",null,"the logs are collected in ",(0,o.kt)("inlineCode",{parentName:"p"},"ci_logfile.txt")," and this file is copied at the end to tmp directory created in filesystem."),(0,o.kt)("p",null,"the script runs multiple commands:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Creates a branch prop_{proposal_address}"),(0,o.kt)("li",{parentName:"ul"},"Apply the changes to the branch"),(0,o.kt)("li",{parentName:"ul"},"Add the changes and commit"),(0,o.kt)("li",{parentName:"ul"},"Checking if the project is formatted correctly"),(0,o.kt)("li",{parentName:"ul"},"Check if the project compiles without warning"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/rrrene/credo"},"Credo")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/nccgroup/sobelow"},"Sobelow")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/sascha-wolf/knigge"},"Knigge")),(0,o.kt)("li",{parentName:"ul"},"Runs the test suite"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/jeremyjh/dialyxir"},"Dialyzer")),(0,o.kt)("li",{parentName:"ul"},"Checks if dependencies are outdated"),(0,o.kt)("li",{parentName:"ul"},"And Finally it creates an upgrade release with ",(0,o.kt)("a",{parentName:"li",href:"https://github.com/bitwalker/distillery"},"Distillery"))))}u.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/f63a5cf4.4b6ffe4f.js b/assets/js/f63a5cf4.818ca636.js similarity index 59% rename from assets/js/f63a5cf4.4b6ffe4f.js rename to assets/js/f63a5cf4.818ca636.js index de2ec3439..0317071e3 100644 --- a/assets/js/f63a5cf4.4b6ffe4f.js +++ b/assets/js/f63a5cf4.818ca636.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3446],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var o=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=o.createContext({}),p=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},s=function(e){var t=p(e.components);return o.createElement(i.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},f=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(r),f=n,m=u["".concat(i,".").concat(f)]||u[f]||d[f]||a;return r?o.createElement(m,l(l({ref:t},s),{},{components:r})):o.createElement(m,l({ref:t},s))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,l=new Array(a);l[0]=f;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[u]="string"==typeof e?e:n,l[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var o=r(87462),n=(r(67294),r(3905));r(8209);const a={id:"code-proposals",title:"Code Proposals"},l=void 0,c={unversionedId:"build/core/governance/code-proposals",id:"build/core/governance/code-proposals",title:"Code Proposals",description:"Archethic Blockchain is using code proposals to have a way to upgrade current blockchain",source:"@site/docs/build/core/governance/code-proposals.md",sourceDirName:"build/core/governance",slug:"/build/core/governance/code-proposals",permalink:"/build/core/governance/code-proposals",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"code-proposals",title:"Code Proposals"},sidebar:"docs",previous:{title:"CI",permalink:"/build/core/governance/code-proposals-ci"},next:{title:"Mining",permalink:"/build/core/mining/"}},i={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,o.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Archethic Blockchain is using code proposals to have a way to upgrade current blockchain\ncode in a automated and tested way."),(0,n.kt)("p",null,"A pending code proposal contains the following fields:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Address: Address of the code proposal"),(0,n.kt)("li",{parentName:"ul"},"Approvals: Approvals signed by the users"),(0,n.kt)("li",{parentName:"ul"},"Changes: Diff between current version and code proposal"),(0,n.kt)("li",{parentName:"ul"},"Description: Description of the code proposal"),(0,n.kt)("li",{parentName:"ul"},"Files: Files changed in code proposal"),(0,n.kt)("li",{parentName:"ul"},"Previous Public Key"),(0,n.kt)("li",{parentName:"ul"},"Timestamp"),(0,n.kt)("li",{parentName:"ul"},"Version: target version")),(0,n.kt)("p",null,"For a code proposal to be valid it needs to validate 3 conditions:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"The version in code proposal needs to be a successor version of the current one"),(0,n.kt)("li",{parentName:"ul"},"The changes need to contain a valid ",(0,n.kt)("a",{parentName:"li",href:"https://www.erlang.org/doc/man/appup.html"},"appup file")),(0,n.kt)("li",{parentName:"ul"},"the code proposal is applicable on the current branch")),(0,n.kt)("p",null,"Code proposals can be visualised in the governance section of the UI."),(0,n.kt)("p",null,"when a code proposal get enough approvals from members of technical council (more than the threshhold), it automatically launchs the CI/CD process."))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3446],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var o=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=o.createContext({}),p=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},s=function(e){var t=p(e.components);return o.createElement(i.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},f=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(r),f=n,m=u["".concat(i,".").concat(f)]||u[f]||d[f]||a;return r?o.createElement(m,l(l({ref:t},s),{},{components:r})):o.createElement(m,l({ref:t},s))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,l=new Array(a);l[0]=f;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[u]="string"==typeof e?e:n,l[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var o=r(87462),n=(r(67294),r(3905));r(8209);const a={id:"code-proposals",title:"Code Proposals"},l=void 0,c={unversionedId:"build/core/governance/code-proposals",id:"build/core/governance/code-proposals",title:"Code Proposals",description:"Archethic Blockchain is using code proposals to have a way to upgrade current blockchain",source:"@site/docs/build/core/governance/code-proposals.md",sourceDirName:"build/core/governance",slug:"/build/core/governance/code-proposals",permalink:"/build/core/governance/code-proposals",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"code-proposals",title:"Code Proposals"},sidebar:"docs",previous:{title:"CI",permalink:"/build/core/governance/code-proposals-ci"},next:{title:"Mining",permalink:"/build/core/mining/"}},i={},p=[],s={toc:p},u="wrapper";function d(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,o.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Archethic Blockchain is using code proposals to have a way to upgrade current blockchain\ncode in a automated and tested way."),(0,n.kt)("p",null,"A pending code proposal contains the following fields:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Address: Address of the code proposal"),(0,n.kt)("li",{parentName:"ul"},"Approvals: Approvals signed by the users"),(0,n.kt)("li",{parentName:"ul"},"Changes: Diff between current version and code proposal"),(0,n.kt)("li",{parentName:"ul"},"Description: Description of the code proposal"),(0,n.kt)("li",{parentName:"ul"},"Files: Files changed in code proposal"),(0,n.kt)("li",{parentName:"ul"},"Previous Public Key"),(0,n.kt)("li",{parentName:"ul"},"Timestamp"),(0,n.kt)("li",{parentName:"ul"},"Version: target version")),(0,n.kt)("p",null,"For a code proposal to be valid it needs to validate 3 conditions:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"The version in code proposal needs to be a successor version of the current one"),(0,n.kt)("li",{parentName:"ul"},"The changes need to contain a valid ",(0,n.kt)("a",{parentName:"li",href:"https://www.erlang.org/doc/man/appup.html"},"appup file")),(0,n.kt)("li",{parentName:"ul"},"the code proposal is applicable on the current branch")),(0,n.kt)("p",null,"Code proposals can be visualised in the governance section of the UI."),(0,n.kt)("p",null,"when a code proposal get enough approvals from members of technical council (more than the threshhold), it automatically launchs the CI/CD process."))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/fa629964.0e0ccc4f.js b/assets/js/fa629964.0e0ccc4f.js new file mode 100644 index 000000000..d92f7987e --- /dev/null +++ b/assets/js/fa629964.0e0ccc4f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8607],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(n),h=r,m=u["".concat(l,".").concat(h)]||u[h]||p[h]||o;return n?a.createElement(m,i(i({ref:t},d),{},{components:n})):a.createElement(m,i({ref:t},d))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"sharding",title:"Sharding"},i=void 0,s={unversionedId:"learn/sharding/sharding",id:"learn/sharding/sharding",title:"Sharding",description:"To become an unlimited decentralized network, Archethic Blockchain is using a feature called Sharding, used to split processing and storage power to ensure a scalable system.",source:"@site/docs/learn/sharding/README.md",sourceDirName:"learn/sharding",slug:"/learn/sharding/",permalink:"/learn/sharding/",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"sharding",title:"Sharding"},sidebar:"docs",previous:{title:"Self Repair",permalink:"/learn/p2p/self-repair"},next:{title:"Beacon Chain",permalink:"/learn/sharding/beacon-chain/"}},l={},c=[{value:"Validation",id:"validation",level:2},{value:"Storage",id:"storage",level:2},{value:"Rotating Election",id:"rotating-election",level:2}],d={toc:c},u="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"To become an unlimited decentralized network, Archethic Blockchain is using a feature called ",(0,r.kt)("inlineCode",{parentName:"p"},"Sharding"),", used to split processing and storage power to ensure a scalable system."),(0,r.kt)("p",null,"Thanks to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Transaction Chain")," paradigm, transactions can be divided into chains, to ensure a concurrent processing\nas the opposite of traditional blockchains."),(0,r.kt)("p",null,"Other new blockchain networks start to use ",(0,r.kt)("inlineCode",{parentName:"p"},"Sharding")," but sometimes not in a complete form: "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"either storage"),(0,r.kt)("li",{parentName:"ul"},"either validation")),(0,r.kt)("p",null,"Archethic Blockchain supports a complete sharding scheme for validation and for storage."),(0,r.kt)("h2",{id:"validation"},"Validation"),(0,r.kt)("p",null,"Each transaction is validated by a new set of rotating nodes."),(0,r.kt)("p",null,"This ensures the distribution of validation and processing, to achieve a linear scalability and a high TPS."),(0,r.kt)("p",null,"Because transaction are using the UTXO model,\nthere is no reality out of the transaction, so the network is not subject to issues like:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"cross shards synchronization"),(0,r.kt)("li",{parentName:"ul"},"state channels communication")),(0,r.kt)("p",null,"To get the state of a transaction, only the transaction and the transaction inputs will be taken into consideration"),(0,r.kt)("h2",{id:"storage"},"Storage"),(0,r.kt)("p",null,"After the validation of the transaction, validation nodes will be in charge to send the transaction to several pools of nodes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Transaction Chain Storage Pool: All the transaction associated with the same chain must be replicated on the storage nodes associated with the new transaction's address."),(0,r.kt)("li",{parentName:"ul"},"I/O Storage Pool: Each validated transaction is replicated on the storage nodes associated with the addresses of the transaction input/outputs:",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Transaction movements addresses storage pools"),(0,r.kt)("li",{parentName:"ul"},"Node movements public key storage pools"),(0,r.kt)("li",{parentName:"ul"},"Recipients addresses storage pools"))),(0,r.kt)("li",{parentName:"ul"},"Beacon Storage Pool: Each transaction address must be replicated on the storage nodes of the associated address subset ",(0,r.kt)("a",{parentName:"li",href:"/learn/sharding/beacon-chain"},"See BeaconChain"))),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"For each transaction, the Transaction Chain Storage Pool will change, assuring a completed distribution of nodes and the data replication. Nevertheless, nothing prevents the storage nodes to overlap within the chain.")),(0,r.kt)("h2",{id:"rotating-election"},"Rotating Election"),(0,r.kt)("p",null,"Like the validation nodes election, the storage nodes election is subject to a rotating election.\nIn other terms, each transaction will have its own shard and storage nodes."),(0,r.kt)("p",null,"The storage node election is based on:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"the address of the transaction"),(0,r.kt)("li",{parentName:"ul"},"the storage nonce: a stable secret known by the network"),(0,r.kt)("li",{parentName:"ul"},"the list of nodes")),(0,r.kt)("p",null,"This permits any node to perform this computation autonomously to reproduce this list and to request a transaction from the closest node."),(0,r.kt)("p",null,"To ensure the best availability of the data, this list is refined by some criteria, such as:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"P2P availability"),(0,r.kt)("li",{parentName:"ul"},"Geographical distribution")))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/fa629964.be24d3c2.js b/assets/js/fa629964.be24d3c2.js deleted file mode 100644 index 00cab76d9..000000000 --- a/assets/js/fa629964.be24d3c2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8607],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(n),h=r,m=u["".concat(l,".").concat(h)]||u[h]||p[h]||o;return n?a.createElement(m,i(i({ref:t},d),{},{components:n})):a.createElement(m,i({ref:t},d))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));n(8209);const o={id:"sharding",title:"Sharding"},i=void 0,s={unversionedId:"learn/sharding/sharding",id:"learn/sharding/sharding",title:"Sharding",description:"To become an unlimited decentralized network, Archethic Blockchain is using a feature called Sharding, used to split processing and storage power to ensure a scalable system.",source:"@site/docs/learn/sharding/README.md",sourceDirName:"learn/sharding",slug:"/learn/sharding/",permalink:"/learn/sharding/",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"sharding",title:"Sharding"},sidebar:"docs",previous:{title:"Self Repair",permalink:"/learn/p2p/self-repair"},next:{title:"Beacon Chain",permalink:"/learn/sharding/beacon-chain/"}},l={},c=[{value:"Validation",id:"validation",level:2},{value:"Storage",id:"storage",level:2},{value:"Rotating Election",id:"rotating-election",level:2}],d={toc:c},u="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"To become an unlimited decentralized network, Archethic Blockchain is using a feature called ",(0,r.kt)("inlineCode",{parentName:"p"},"Sharding"),", used to split processing and storage power to ensure a scalable system."),(0,r.kt)("p",null,"Thanks to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Transaction Chain")," paradigm, transactions can be divided into chains, to ensure a concurrent processing\nas the opposite of traditional blockchains."),(0,r.kt)("p",null,"Other new blockchain networks start to use ",(0,r.kt)("inlineCode",{parentName:"p"},"Sharding")," but sometimes not in a complete form: "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"either storage"),(0,r.kt)("li",{parentName:"ul"},"either validation")),(0,r.kt)("p",null,"Archethic Blockchain supports a complete sharding scheme for validation and for storage."),(0,r.kt)("h2",{id:"validation"},"Validation"),(0,r.kt)("p",null,"Each transaction is validated by a new set of rotating nodes."),(0,r.kt)("p",null,"This ensures the distribution of validation and processing, to achieve a linear scalability and a high TPS."),(0,r.kt)("p",null,"Because transaction are using the UTXO model,\nthere is no reality out of the transaction, so the network is not subject to issues like:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"cross shards synchronization"),(0,r.kt)("li",{parentName:"ul"},"state channels communication")),(0,r.kt)("p",null,"To get the state of a transaction, only the transaction and the transaction inputs will be taken into consideration"),(0,r.kt)("h2",{id:"storage"},"Storage"),(0,r.kt)("p",null,"After the validation of the transaction, validation nodes will be in charge to send the transaction to several pools of nodes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Transaction Chain Storage Pool: All the transaction associated with the same chain must be replicated on the storage nodes associated with the new transaction's address."),(0,r.kt)("li",{parentName:"ul"},"I/O Storage Pool: Each validated transaction is replicated on the storage nodes associated with the addresses of the transaction input/outputs:",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Transaction movements addresses storage pools"),(0,r.kt)("li",{parentName:"ul"},"Node movements public key storage pools"),(0,r.kt)("li",{parentName:"ul"},"Recipients addresses storage pools"))),(0,r.kt)("li",{parentName:"ul"},"Beacon Storage Pool: Each transaction address must be replicated on the storage nodes of the associated address subset ",(0,r.kt)("a",{parentName:"li",href:"/learn/sharding/beacon-chain"},"See BeaconChain"))),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"For each transaction, the Transaction Chain Storage Pool will change, assuring a completed distribution of nodes and the data replication. Nevertheless, nothing prevents the storage nodes to overlap within the chain.")),(0,r.kt)("h2",{id:"rotating-election"},"Rotating Election"),(0,r.kt)("p",null,"Like the validation nodes election, the storage nodes election is subject to a rotating election.\nIn other terms, each transaction will have its own shard and storage nodes."),(0,r.kt)("p",null,"The storage node election is based on:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"the address of the transaction"),(0,r.kt)("li",{parentName:"ul"},"the storage nonce: a stable secret known by the network"),(0,r.kt)("li",{parentName:"ul"},"the list of nodes")),(0,r.kt)("p",null,"This permits any node to perform this computation autonomously to reproduce this list and to request a transaction from the closest node."),(0,r.kt)("p",null,"To ensure the best availability of the data, this list is refined by some criteria, such as:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"P2P availability"),(0,r.kt)("li",{parentName:"ul"},"Geographical distribution")))}p.isMDXComponent=!0},8209:(e,t,n)=>{n(67294)}}]); \ No newline at end of file diff --git a/assets/js/fb57a917.503e337f.js b/assets/js/fb57a917.503e337f.js new file mode 100644 index 000000000..f9d3c6a80 --- /dev/null +++ b/assets/js/fb57a917.503e337f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4875],{3905:(e,t,i)=>{i.d(t,{Zo:()=>h,kt:()=>k});var n=i(67294);function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function a(e){for(var t=1;t=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}var o=n.createContext({}),d=function(e){var t=n.useContext(o),i=t;return e&&(i="function"==typeof e?e(t):a(a({},t),e)),i},h=function(e){var t=d(e.components);return n.createElement(o.Provider,{value:t},e.children)},l="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var i=e.components,r=e.mdxType,c=e.originalType,o=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),l=d(i),u=r,k=l["".concat(o,".").concat(u)]||l[u]||y[u]||c;return i?n.createElement(k,a(a({ref:t},h),{},{components:i})):n.createElement(k,a({ref:t},h))}));function k(e,t){var i=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var c=i.length,a=new Array(c);a[0]=u;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[l]="string"==typeof e?e:r,a[1]=s;for(var d=2;d{i.r(t),i.d(t,{assets:()=>o,contentTitle:()=>a,default:()=>y,frontMatter:()=>c,metadata:()=>s,toc:()=>d});var n=i(87462),r=(i(67294),i(3905));i(8209);const c={id:"yubikey",title:"Yubikey implementation"},a=void 0,s={unversionedId:"build/core/cryptography/yubikey",id:"build/core/cryptography/yubikey",title:"Yubikey implementation",description:"This section explains the HRT Yubikey Library implementation.",source:"@site/docs/build/core/cryptography/yubikey.md",sourceDirName:"build/core/cryptography",slug:"/build/core/cryptography/yubikey",permalink:"/build/core/cryptography/yubikey",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"yubikey",title:"Yubikey implementation"},sidebar:"docs",previous:{title:"TPM Implementation",permalink:"/build/core/cryptography/tpm"},next:{title:"Archethic's database",permalink:"/build/core/database"}},o={},d=[{value:"initializeYK() :",id:"initializeyk-",level:2},{value:"bool checkYK():",id:"bool-checkyk",level:2},{value:"verifyPinYK():",id:"verifypinyk",level:2},{value:"authenticateYK():",id:"authenticateyk",level:2},{value:"fetchKey(keyIndex):",id:"fetchkeykeyindex",level:2},{value:"generateKey(ykIndex):",id:"generatekeyykindex",level:2},{value:"generateCertificate(ykIndex):",id:"generatecertificateykindex",level:2},{value:"getYKIndex():",id:"getykindex",level:2},{value:"saveIndex(ykIndex, archethicIndex):",id:"saveindexykindex-archethicindex",level:2},{value:"signECDSA(hashtoSign, ykIndex):",id:"signecdsahashtosign-ykindex",level:2},{value:"getECDHPoint(ykIndex, euphermerakley) :",id:"getecdhpointykindex-euphermerakley-",level:2},{value:"getArchEthicIndex():",id:"getarchethicindex",level:2},{value:"incrementIndex():",id:"incrementindex",level:2},{value:"getRootKey():",id:"getrootkey",level:2},{value:"getCurrentKey(publicKeySize):",id:"getcurrentkeypublickeysize",level:2},{value:"getNextKey( publicKeySize):",id:"getnextkey-publickeysize",level:2},{value:"getPastKey(archEthicIndex, publicKeySize):",id:"getpastkeyarchethicindex-publickeysize",level:2},{value:"getRootCertificate( certificateSize):",id:"getrootcertificate-certificatesize",level:2},{value:"getCurrentCertificate(certificateSize):",id:"getcurrentcertificatecertificatesize",level:2},{value:"getNextCertificate(certificateSize):",id:"getnextcertificatecertificatesize",level:2},{value:"getPastCertificate(archEthicIndex, certificateSize):",id:"getpastcertificatearchethicindex-certificatesize",level:2},{value:"signCurrentKey(hashToSign, eccSignSize):",id:"signcurrentkeyhashtosign-eccsignsize",level:2},{value:"signPastKey(archEthicIndex, hashToSign, eccSignSize):",id:"signpastkeyarchethicindex-hashtosign-eccsignsize",level:2},{value:"ecdhCurrentKey(euphemeralKey, eccPointSize):",id:"ecdhcurrentkeyeuphemeralkey-eccpointsize",level:2},{value:"ecdhPastKey( archEthicIndex, euphemeralKey, eccPointSize):",id:"ecdhpastkey-archethicindex-euphemeralkey-eccpointsize",level:2}],h={toc:d},l="wrapper";function y(e){let{components:t,...i}=e;return(0,r.kt)(l,(0,n.Z)({},h,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This section explains the HRT Yubikey Library implementation."),(0,r.kt)("admonition",{type:"success"},(0,r.kt)("p",{parentName:"admonition"},"Reference Files:\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/UNIRIS/yubikey-core/blob/main/uniris-yubikey.c"},"uniris-yubikey.c"),"\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/UNIRIS/yubikey-core/blob/main/uniris-yubikey.h"},"uniris-yubikey.h"))),(0,r.kt)("h2",{id:"initializeyk-"},"initializeYK() :"),(0,r.kt)("p",null,"Initializes the context of the yubikey application in the variable g_state and connects to the hardware device. If successful, then gets the key index of Archethic as well as key index of the yubikey device."),(0,r.kt)("h2",{id:"bool-checkyk"},"bool checkYK():"),(0,r.kt)("p",null,'displays the model of yubikey device used returns true if the device list contains "Yubico Yubikey".'),(0,r.kt)("h2",{id:"verifypinyk"},"verifyPinYK():"),(0,r.kt)("p",null,"verifies the pin code using ykpiv_verify() required to access PIV interface."),(0,r.kt)("h2",{id:"authenticateyk"},"authenticateYK():"),(0,r.kt)("p",null,"Management key is required to do administrative actions. First it does hex decoding of the management key and authenticates if ykpiv_authenticate() returns 0."),(0,r.kt)("h2",{id:"fetchkeykeyindex"},"fetchKey(keyIndex):"),(0,r.kt)("p",null,"A PIV card contains some interoperable seven mandatory and twenty optional data objects. These objects are identified with their respective ids. We use these twenty optional data objects to store the key certificates. fetchKey index takes the yubikey key index ykindex as input and fetches the certificate at the key_certificates","[ykindex]",". This X509 certificate is decoded and public key is extracted from it using X509_get0_pubkey_bitstr and copied to ecc_public_key."),(0,r.kt)("h2",{id:"generatekeyykindex"},"generateKey(ykIndex):"),(0,r.kt)("p",null,"It takes the ykIndex and generates an ECC key using ykpiv_util_generate_key(). It generates key at one of the slots {0x82.. 0x95} pointed by ykindex - key_slots","[ykIndex]"),(0,r.kt)("h2",{id:"generatecertificateykindex"},"generateCertificate(ykIndex):"),(0,r.kt)("p",null,"The keys in the slot are attested through ykpiv_attest() by taking the slot on the index as input. It returns attested key and its length which is then saved into an object pointed by ykIndex using ykpiv_save_object()."),(0,r.kt)("h2",{id:"getykindex"},"getYKIndex():"),(0,r.kt)("p",null,"The YKPIV_OBJ_KEY_HISTORY keeps the count of the keys generated in the yubikey. This fucntion fetches the YKPIV_OBJ_KEY_HISTORY using ykpiv_fetch_object() to get the index_yk and returns it."),(0,r.kt)("h2",{id:"saveindexykindex-archethicindex"},"saveIndex(ykIndex, archethicIndex):"),(0,r.kt)("p",null,"It takes ykindex and archethicIndex as input and generates index by combining ykindex and archethic index and keeps it in YKPIV_OBJ_HISTORY."),(0,r.kt)("h2",{id:"signecdsahashtosign-ykindex"},"signECDSA(hashtoSign, ykIndex):"),(0,r.kt)("p",null,"It uses ykpiv_sign_data() to sign hashToSign using YKPIV_ALGO_ECCP256 through the key pointed by ykindex - key_slots","[ykindex]","."),(0,r.kt)("h2",{id:"getecdhpointykindex-euphermerakley-"},"getECDHPoint(ykIndex, euphermerakley) :"),(0,r.kt)("p",null,"It generated an ecdh point using ykpiv_decipher_data() for the slot pointed by ykindex key_slots","[ykIndex]","."),(0,r.kt)("h2",{id:"getarchethicindex"},"getArchEthicIndex():"),(0,r.kt)("p",null,"Fetches the YKPIV_OBJ_KEY_HISTORY and derives the archethicindex from index_yk saved in key history object."),(0,r.kt)("h2",{id:"incrementindex"},"incrementIndex():"),(0,r.kt)("p",null,"We use the 20 data objects to store 20 keys certificates at once. The 21st key generated on the yubikey is stored in newYKIndex = ykindex % 20. The archethic index is incremented and a new key is generated using newYKindex .A certificate is generated and saved in the slot pointed by newYKindex. Finally it returns true if the current YK index is equal to newYKindex and current archethicindex is equal to newarchethic index ."),(0,r.kt)("h2",{id:"getrootkey"},"getRootKey():"),(0,r.kt)("p",null,"Reads the root key certificate from f9 slot and fetches public key from the certificate. Finally it copies the key into rsa_root_key and returns it."),(0,r.kt)("h2",{id:"getcurrentkeypublickeysize"},"getCurrentKey(publicKeySize):"),(0,r.kt)("p",null,"Generates the previous key index by and fetches the key behind previous key index and returns the ecc key."),(0,r.kt)("h2",{id:"getnextkey-publickeysize"},"getNextKey( publicKeySize):"),(0,r.kt)("p",null,"It fetches the key from the ykIndex and returns the ecc_public_key behind the index."),(0,r.kt)("h2",{id:"getpastkeyarchethicindex-publickeysize"},"getPastKey(archEthicIndex, publicKeySize):"),(0,r.kt)("p",null,"It fetches the keys stored previously in the slot. It first calculates the slot position and then fetches the key at the slot position and return it."),(0,r.kt)("h2",{id:"getrootcertificate-certificatesize"},"getRootCertificate( certificateSize):"),(0,r.kt)("p",null,"Reads the certificate of the rootkey from 0xf9 slot, copies it ykcertificate and returns it."),(0,r.kt)("h2",{id:"getcurrentcertificatecertificatesize"},"getCurrentCertificate(certificateSize):"),(0,r.kt)("p",null,"Calculates the curent key index and fetches the certificate from the object pointed by the current key index."),(0,r.kt)("h2",{id:"getnextcertificatecertificatesize"},"getNextCertificate(certificateSize):"),(0,r.kt)("p",null,"fetches the certificate of the key pointed by ykindex and returns it."),(0,r.kt)("h2",{id:"getpastcertificatearchethicindex-certificatesize"},"getPastCertificate(archEthicIndex, certificateSize):"),(0,r.kt)("p",null,"calculates the slot posistion according to the offset using archethicindex then fetches the object at the slot position which is a certificate amd returns it."),(0,r.kt)("h2",{id:"signcurrentkeyhashtosign-eccsignsize"},"signCurrentKey(hashToSign, eccSignSize):"),(0,r.kt)("p",null,"Calculates the current key index then verifies the Yubikey pin using verifyPinYK() and then signs hashToSign using signECDSA(). The signECDSA() signs the key at the currentkeyindex."),(0,r.kt)("h2",{id:"signpastkeyarchethicindex-hashtosign-eccsignsize"},"signPastKey(archEthicIndex, hashToSign, eccSignSize):"),(0,r.kt)("p",null,"Calculates the slot position by first calculating the offset by using archethicindex. Then it verifies the yubikey pin and signs the key pointed at the slotPosition."),(0,r.kt)("h2",{id:"ecdhcurrentkeyeuphemeralkey-eccpointsize"},"ecdhCurrentKey(euphemeralKey, eccPointSize):"),(0,r.kt)("p",null,"Calculates the current key index, verifies the yubikey pin to get the ECDH point through getECDHPoint() fucntion and finally returns it."),(0,r.kt)("h2",{id:"ecdhpastkey-archethicindex-euphemeralkey-eccpointsize"},"ecdhPastKey( archEthicIndex, euphemeralKey, eccPointSize):"),(0,r.kt)("p",null,"Calculates the offset and slotPosition using archEthicIndex., verifies Yubikey PIN and gets the ECDH point for the key pointed by slotPosiotion and returns it."))}y.isMDXComponent=!0},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/fb57a917.c6c4a01f.js b/assets/js/fb57a917.c6c4a01f.js deleted file mode 100644 index 31bf2a970..000000000 --- a/assets/js/fb57a917.c6c4a01f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4875],{3905:(e,t,i)=>{i.d(t,{Zo:()=>h,kt:()=>k});var n=i(67294);function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function a(e){for(var t=1;t=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}var o=n.createContext({}),d=function(e){var t=n.useContext(o),i=t;return e&&(i="function"==typeof e?e(t):a(a({},t),e)),i},h=function(e){var t=d(e.components);return n.createElement(o.Provider,{value:t},e.children)},l="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var i=e.components,r=e.mdxType,c=e.originalType,o=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),l=d(i),u=r,k=l["".concat(o,".").concat(u)]||l[u]||y[u]||c;return i?n.createElement(k,a(a({ref:t},h),{},{components:i})):n.createElement(k,a({ref:t},h))}));function k(e,t){var i=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var c=i.length,a=new Array(c);a[0]=u;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[l]="string"==typeof e?e:r,a[1]=s;for(var d=2;d{i.r(t),i.d(t,{assets:()=>o,contentTitle:()=>a,default:()=>y,frontMatter:()=>c,metadata:()=>s,toc:()=>d});var n=i(87462),r=(i(67294),i(3905));i(8209);const c={id:"yubikey",title:"Yubikey implementation"},a=void 0,s={unversionedId:"build/core/cryptography/yubikey",id:"build/core/cryptography/yubikey",title:"Yubikey implementation",description:"This section explains the HRT Yubikey Library implementation.",source:"@site/docs/build/core/cryptography/yubikey.md",sourceDirName:"build/core/cryptography",slug:"/build/core/cryptography/yubikey",permalink:"/build/core/cryptography/yubikey",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"yubikey",title:"Yubikey implementation"},sidebar:"docs",previous:{title:"TPM Implementation",permalink:"/build/core/cryptography/tpm"},next:{title:"Archethic's database",permalink:"/build/core/database"}},o={},d=[{value:"initializeYK() :",id:"initializeyk-",level:2},{value:"bool checkYK():",id:"bool-checkyk",level:2},{value:"verifyPinYK():",id:"verifypinyk",level:2},{value:"authenticateYK():",id:"authenticateyk",level:2},{value:"fetchKey(keyIndex):",id:"fetchkeykeyindex",level:2},{value:"generateKey(ykIndex):",id:"generatekeyykindex",level:2},{value:"generateCertificate(ykIndex):",id:"generatecertificateykindex",level:2},{value:"getYKIndex():",id:"getykindex",level:2},{value:"saveIndex(ykIndex, archethicIndex):",id:"saveindexykindex-archethicindex",level:2},{value:"signECDSA(hashtoSign, ykIndex):",id:"signecdsahashtosign-ykindex",level:2},{value:"getECDHPoint(ykIndex, euphermerakley) :",id:"getecdhpointykindex-euphermerakley-",level:2},{value:"getArchEthicIndex():",id:"getarchethicindex",level:2},{value:"incrementIndex():",id:"incrementindex",level:2},{value:"getRootKey():",id:"getrootkey",level:2},{value:"getCurrentKey(publicKeySize):",id:"getcurrentkeypublickeysize",level:2},{value:"getNextKey( publicKeySize):",id:"getnextkey-publickeysize",level:2},{value:"getPastKey(archEthicIndex, publicKeySize):",id:"getpastkeyarchethicindex-publickeysize",level:2},{value:"getRootCertificate( certificateSize):",id:"getrootcertificate-certificatesize",level:2},{value:"getCurrentCertificate(certificateSize):",id:"getcurrentcertificatecertificatesize",level:2},{value:"getNextCertificate(certificateSize):",id:"getnextcertificatecertificatesize",level:2},{value:"getPastCertificate(archEthicIndex, certificateSize):",id:"getpastcertificatearchethicindex-certificatesize",level:2},{value:"signCurrentKey(hashToSign, eccSignSize):",id:"signcurrentkeyhashtosign-eccsignsize",level:2},{value:"signPastKey(archEthicIndex, hashToSign, eccSignSize):",id:"signpastkeyarchethicindex-hashtosign-eccsignsize",level:2},{value:"ecdhCurrentKey(euphemeralKey, eccPointSize):",id:"ecdhcurrentkeyeuphemeralkey-eccpointsize",level:2},{value:"ecdhPastKey( archEthicIndex, euphemeralKey, eccPointSize):",id:"ecdhpastkey-archethicindex-euphemeralkey-eccpointsize",level:2}],h={toc:d},l="wrapper";function y(e){let{components:t,...i}=e;return(0,r.kt)(l,(0,n.Z)({},h,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This section explains the HRT Yubikey Library implementation."),(0,r.kt)("admonition",{type:"success"},(0,r.kt)("p",{parentName:"admonition"},"Reference Files:\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/UNIRIS/yubikey-core/blob/main/uniris-yubikey.c"},"uniris-yubikey.c"),"\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/UNIRIS/yubikey-core/blob/main/uniris-yubikey.h"},"uniris-yubikey.h"))),(0,r.kt)("h2",{id:"initializeyk-"},"initializeYK() :"),(0,r.kt)("p",null,"Initializes the context of the yubikey application in the variable g_state and connects to the hardware device. If successful, then gets the key index of Archethic as well as key index of the yubikey device."),(0,r.kt)("h2",{id:"bool-checkyk"},"bool checkYK():"),(0,r.kt)("p",null,'displays the model of yubikey device used returns true if the device list contains "Yubico Yubikey".'),(0,r.kt)("h2",{id:"verifypinyk"},"verifyPinYK():"),(0,r.kt)("p",null,"verifies the pin code using ykpiv_verify() required to access PIV interface."),(0,r.kt)("h2",{id:"authenticateyk"},"authenticateYK():"),(0,r.kt)("p",null,"Management key is required to do administrative actions. First it does hex decoding of the management key and authenticates if ykpiv_authenticate() returns 0."),(0,r.kt)("h2",{id:"fetchkeykeyindex"},"fetchKey(keyIndex):"),(0,r.kt)("p",null,"A PIV card contains some interoperable seven mandatory and twenty optional data objects. These objects are identified with their respective ids. We use these twenty optional data objects to store the key certificates. fetchKey index takes the yubikey key index ykindex as input and fetches the certificate at the key_certificates","[ykindex]",". This X509 certificate is decoded and public key is extracted from it using X509_get0_pubkey_bitstr and copied to ecc_public_key."),(0,r.kt)("h2",{id:"generatekeyykindex"},"generateKey(ykIndex):"),(0,r.kt)("p",null,"It takes the ykIndex and generates an ECC key using ykpiv_util_generate_key(). It generates key at one of the slots {0x82.. 0x95} pointed by ykindex - key_slots","[ykIndex]"),(0,r.kt)("h2",{id:"generatecertificateykindex"},"generateCertificate(ykIndex):"),(0,r.kt)("p",null,"The keys in the slot are attested through ykpiv_attest() by taking the slot on the index as input. It returns attested key and its length which is then saved into an object pointed by ykIndex using ykpiv_save_object()."),(0,r.kt)("h2",{id:"getykindex"},"getYKIndex():"),(0,r.kt)("p",null,"The YKPIV_OBJ_KEY_HISTORY keeps the count of the keys generated in the yubikey. This fucntion fetches the YKPIV_OBJ_KEY_HISTORY using ykpiv_fetch_object() to get the index_yk and returns it."),(0,r.kt)("h2",{id:"saveindexykindex-archethicindex"},"saveIndex(ykIndex, archethicIndex):"),(0,r.kt)("p",null,"It takes ykindex and archethicIndex as input and generates index by combining ykindex and archethic index and keeps it in YKPIV_OBJ_HISTORY."),(0,r.kt)("h2",{id:"signecdsahashtosign-ykindex"},"signECDSA(hashtoSign, ykIndex):"),(0,r.kt)("p",null,"It uses ykpiv_sign_data() to sign hashToSign using YKPIV_ALGO_ECCP256 through the key pointed by ykindex - key_slots","[ykindex]","."),(0,r.kt)("h2",{id:"getecdhpointykindex-euphermerakley-"},"getECDHPoint(ykIndex, euphermerakley) :"),(0,r.kt)("p",null,"It generated an ecdh point using ykpiv_decipher_data() for the slot pointed by ykindex key_slots","[ykIndex]","."),(0,r.kt)("h2",{id:"getarchethicindex"},"getArchEthicIndex():"),(0,r.kt)("p",null,"Fetches the YKPIV_OBJ_KEY_HISTORY and derives the archethicindex from index_yk saved in key history object."),(0,r.kt)("h2",{id:"incrementindex"},"incrementIndex():"),(0,r.kt)("p",null,"We use the 20 data objects to store 20 keys certificates at once. The 21st key generated on the yubikey is stored in newYKIndex = ykindex % 20. The archethic index is incremented and a new key is generated using newYKindex .A certificate is generated and saved in the slot pointed by newYKindex. Finally it returns true if the current YK index is equal to newYKindex and current archethicindex is equal to newarchethic index ."),(0,r.kt)("h2",{id:"getrootkey"},"getRootKey():"),(0,r.kt)("p",null,"Reads the root key certificate from f9 slot and fetches public key from the certificate. Finally it copies the key into rsa_root_key and returns it."),(0,r.kt)("h2",{id:"getcurrentkeypublickeysize"},"getCurrentKey(publicKeySize):"),(0,r.kt)("p",null,"Generates the previous key index by and fetches the key behind previous key index and returns the ecc key."),(0,r.kt)("h2",{id:"getnextkey-publickeysize"},"getNextKey( publicKeySize):"),(0,r.kt)("p",null,"It fetches the key from the ykIndex and returns the ecc_public_key behind the index."),(0,r.kt)("h2",{id:"getpastkeyarchethicindex-publickeysize"},"getPastKey(archEthicIndex, publicKeySize):"),(0,r.kt)("p",null,"It fetches the keys stored previously in the slot. It first calculates the slot position and then fetches the key at the slot position and return it."),(0,r.kt)("h2",{id:"getrootcertificate-certificatesize"},"getRootCertificate( certificateSize):"),(0,r.kt)("p",null,"Reads the certificate of the rootkey from 0xf9 slot, copies it ykcertificate and returns it."),(0,r.kt)("h2",{id:"getcurrentcertificatecertificatesize"},"getCurrentCertificate(certificateSize):"),(0,r.kt)("p",null,"Calculates the curent key index and fetches the certificate from the object pointed by the current key index."),(0,r.kt)("h2",{id:"getnextcertificatecertificatesize"},"getNextCertificate(certificateSize):"),(0,r.kt)("p",null,"fetches the certificate of the key pointed by ykindex and returns it."),(0,r.kt)("h2",{id:"getpastcertificatearchethicindex-certificatesize"},"getPastCertificate(archEthicIndex, certificateSize):"),(0,r.kt)("p",null,"calculates the slot posistion according to the offset using archethicindex then fetches the object at the slot position which is a certificate amd returns it."),(0,r.kt)("h2",{id:"signcurrentkeyhashtosign-eccsignsize"},"signCurrentKey(hashToSign, eccSignSize):"),(0,r.kt)("p",null,"Calculates the current key index then verifies the Yubikey pin using verifyPinYK() and then signs hashToSign using signECDSA(). The signECDSA() signs the key at the currentkeyindex."),(0,r.kt)("h2",{id:"signpastkeyarchethicindex-hashtosign-eccsignsize"},"signPastKey(archEthicIndex, hashToSign, eccSignSize):"),(0,r.kt)("p",null,"Calculates the slot position by first calculating the offset by using archethicindex. Then it verifies the yubikey pin and signs the key pointed at the slotPosition."),(0,r.kt)("h2",{id:"ecdhcurrentkeyeuphemeralkey-eccpointsize"},"ecdhCurrentKey(euphemeralKey, eccPointSize):"),(0,r.kt)("p",null,"Calculates the current key index, verifies the yubikey pin to get the ECDH point through getECDHPoint() fucntion and finally returns it."),(0,r.kt)("h2",{id:"ecdhpastkey-archethicindex-euphemeralkey-eccpointsize"},"ecdhPastKey( archEthicIndex, euphemeralKey, eccPointSize):"),(0,r.kt)("p",null,"Calculates the offset and slotPosition using archEthicIndex., verifies Yubikey PIN and gets the ECDH point for the key pointed by slotPosiotion and returns it."))}y.isMDXComponent=!0},8209:(e,t,i)=>{i(67294)}}]); \ No newline at end of file diff --git a/assets/js/fbab86a0.8aff7d14.js b/assets/js/fbab86a0.ce3cd80c.js similarity index 54% rename from assets/js/fbab86a0.8aff7d14.js rename to assets/js/fbab86a0.ce3cd80c.js index 8c859577e..0b91a2ab1 100644 --- a/assets/js/fbab86a0.8aff7d14.js +++ b/assets/js/fbab86a0.ce3cd80c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7007],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,f=u["".concat(c,".").concat(m)]||u[m]||p[m]||a;return r?n.createElement(f,l(l({ref:t},d),{},{components:r})):n.createElement(f,l({ref:t},d))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:o,l[1]=i;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var n=r(87462),o=r(67294),a=r(3905);r(8209);const l={id:"sort-order",title:"SortOrder",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/enums/sort-order",id:"build/api/schema/enums/sort-order",title:"SortOrder",description:"SortOrder represents the order of the result",source:"@site/docs/build/api/schema/enums/sort-order.mdx",sourceDirName:"build/api/schema/enums",slug:"/build/api/schema/enums/sort-order",permalink:"/build/api/schema/enums/sort-order",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"sort-order",title:"SortOrder",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"ErrorContext",permalink:"/build/api/schema/enums/error-context"},next:{title:"AuthorizedKey",permalink:"/build/api/schema/objects/authorized-key"}},s={},d=[{value:"Values",id:"values",level:3},{value:"SortOrder.ASC",id:"code-style-fontweight-normal-sortorderbascbcode",level:4},{value:"SortOrder.DESC",id:"code-style-fontweight-normal-sortorderbdescbcode",level:4},{value:"Member of",id:"member-of",level:3}],u=()=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,a.kt)(o.Fragment,null,"Specification",(0,a.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,a.kt)(b,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"SortOrder represents the order of the result\npossible values are ASC or DESC"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-graphql"},"enum SortOrder {\n ASC\n DESC\n}\n")),(0,a.kt)("h3",{id:"values"},"Values"),(0,a.kt)("h4",{id:"code-style-fontweight-normal-sortorderbascbcode"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"SortOrder.",(0,a.kt)("b",null,"ASC")))),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Ascending order")),(0,a.kt)("h4",{id:"code-style-fontweight-normal-sortorderbdescbcode"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"SortOrder.",(0,a.kt)("b",null,"DESC")))),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Descending order")),(0,a.kt)("h3",{id:"member-of"},"Member of"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-chain"},(0,a.kt)("inlineCode",{parentName:"a"},"transactionChain"))," ",(0,a.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7007],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,f=u["".concat(c,".").concat(m)]||u[m]||p[m]||a;return r?n.createElement(f,l(l({ref:t},d),{},{components:r})):n.createElement(f,l({ref:t},d))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:o,l[1]=i;for(var s=2;s{r.r(t),r.d(t,{Badge:()=>m,Bullet:()=>u,SpecifiedBy:()=>p,assets:()=>s,contentTitle:()=>i,default:()=>y,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var n=r(87462),o=r(67294),a=r(3905);r(8209);const l={id:"sort-order",title:"SortOrder",hide_table_of_contents:!1},i=void 0,c={unversionedId:"build/api/schema/enums/sort-order",id:"build/api/schema/enums/sort-order",title:"SortOrder",description:"SortOrder represents the order of the result",source:"@site/docs/build/api/schema/enums/sort-order.mdx",sourceDirName:"build/api/schema/enums",slug:"/build/api/schema/enums/sort-order",permalink:"/build/api/schema/enums/sort-order",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"sort-order",title:"SortOrder",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"ErrorContext",permalink:"/build/api/schema/enums/error-context"},next:{title:"AuthorizedKey",permalink:"/build/api/schema/objects/authorized-key"}},s={},d=[{value:"Values",id:"values",level:3},{value:"SortOrder.ASC",id:"code-style-fontweight-normal-sortorderbascbcode",level:4},{value:"SortOrder.DESC",id:"code-style-fontweight-normal-sortorderbdescbcode",level:4},{value:"Member of",id:"member-of",level:3}],u=()=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),p=e=>(0,a.kt)(o.Fragment,null,"Specification",(0,a.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),m=e=>(0,a.kt)(o.Fragment,null,(0,a.kt)("span",{class:"badge badge--"+e.class},e.text)),f={toc:d,Bullet:u,SpecifiedBy:p,Badge:m},b="wrapper";function y(e){let{components:t,...r}=e;return(0,a.kt)(b,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"SortOrder represents the order of the result\npossible values are ASC or DESC"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-graphql"},"enum SortOrder {\n ASC\n DESC\n}\n")),(0,a.kt)("h3",{id:"values"},"Values"),(0,a.kt)("h4",{id:"code-style-fontweight-normal-sortorderbascbcode"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"SortOrder.",(0,a.kt)("b",null,"ASC")))),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Ascending order")),(0,a.kt)("h4",{id:"code-style-fontweight-normal-sortorderbdescbcode"},(0,a.kt)("a",{parentName:"h4",href:"#"},(0,a.kt)("code",{style:{fontWeight:"normal"}},"SortOrder.",(0,a.kt)("b",null,"DESC")))),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Descending order")),(0,a.kt)("h3",{id:"member-of"},"Member of"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/build/api/schema/queries/transaction-chain"},(0,a.kt)("inlineCode",{parentName:"a"},"transactionChain"))," ",(0,a.kt)(m,{class:"secondary",text:"query",mdxType:"Badge"})))}y.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/fe068327.65d739e5.js b/assets/js/fe068327.0d21306d.js similarity index 54% rename from assets/js/fe068327.65d739e5.js rename to assets/js/fe068327.0d21306d.js index aae445d79..1e46592eb 100644 --- a/assets/js/fe068327.65d739e5.js +++ b/assets/js/fe068327.0d21306d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8568],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=i(r),f=a,m=p["".concat(s,".").concat(f)]||p[f]||u[f]||o;return r?n.createElement(m,c(c({ref:t},d),{},{components:r})):n.createElement(m,c({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,c=new Array(o);c[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,c[1]=l;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>l,default:()=>g,frontMatter:()=>c,metadata:()=>s,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const c={id:"uco-ledger",title:"UcoLedger",hide_table_of_contents:!1},l=void 0,s={unversionedId:"build/api/schema/objects/uco-ledger",id:"build/api/schema/objects/uco-ledger",title:"UcoLedger",description:"[UCOLedger] represents the transfers to perform on the UCO ledger",source:"@site/docs/build/api/schema/objects/uco-ledger.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/uco-ledger",permalink:"/build/api/schema/objects/uco-ledger",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"uco-ledger",title:"UcoLedger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"UcoData",permalink:"/build/api/schema/objects/uco-data"},next:{title:"UcoTransfer",permalink:"/build/api/schema/objects/uco-transfer"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'UcoLedger.transfers[UcoTransfer] ',id:"code-style-fontweight-normal-ucoledgerbtransfersbcodeucotransfer--",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:p,SpecifiedBy:u,Badge:f},b="wrapper";function g(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[UCOLedger]"," represents the transfers to perform on the UCO ledger"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type UcoLedger {\n transfers: [UcoTransfer]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ucoledgerbtransfersbcodeucotransfer--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"UcoLedger.",(0,o.kt)("b",null,"transfers"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/uco-transfer"},(0,o.kt)("inlineCode",{parentName:"a"},"[UcoTransfer]"))," ",(0,o.kt)(f,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"Ledger"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}g.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8568],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=i(r),f=a,m=p["".concat(s,".").concat(f)]||p[f]||u[f]||o;return r?n.createElement(m,c(c({ref:t},d),{},{components:r})):n.createElement(m,c({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,c=new Array(o);c[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,c[1]=l;for(var i=2;i{r.r(t),r.d(t,{Badge:()=>f,Bullet:()=>p,SpecifiedBy:()=>u,assets:()=>i,contentTitle:()=>l,default:()=>g,frontMatter:()=>c,metadata:()=>s,toc:()=>d});var n=r(87462),a=r(67294),o=r(3905);r(8209);const c={id:"uco-ledger",title:"UcoLedger",hide_table_of_contents:!1},l=void 0,s={unversionedId:"build/api/schema/objects/uco-ledger",id:"build/api/schema/objects/uco-ledger",title:"UcoLedger",description:"[UCOLedger] represents the transfers to perform on the UCO ledger",source:"@site/docs/build/api/schema/objects/uco-ledger.mdx",sourceDirName:"build/api/schema/objects",slug:"/build/api/schema/objects/uco-ledger",permalink:"/build/api/schema/objects/uco-ledger",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"uco-ledger",title:"UcoLedger",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"UcoData",permalink:"/build/api/schema/objects/uco-data"},next:{title:"UcoTransfer",permalink:"/build/api/schema/objects/uco-transfer"}},i={},d=[{value:"Fields",id:"fields",level:3},{value:'UcoLedger.transfers[UcoTransfer] ',id:"code-style-fontweight-normal-ucoledgerbtransfersbcodeucotransfer--",level:4},{value:"Member of",id:"member-of",level:3}],p=()=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),u=e=>(0,o.kt)(a.Fragment,null,"Specification",(0,o.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),f=e=>(0,o.kt)(a.Fragment,null,(0,o.kt)("span",{class:"badge badge--"+e.class},e.text)),m={toc:d,Bullet:p,SpecifiedBy:u,Badge:f},b="wrapper";function g(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"[UCOLedger]"," represents the transfers to perform on the UCO ledger"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type UcoLedger {\n transfers: [UcoTransfer]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"code-style-fontweight-normal-ucoledgerbtransfersbcodeucotransfer--"},(0,o.kt)("a",{parentName:"h4",href:"#"},(0,o.kt)("code",{style:{fontWeight:"normal"}},"UcoLedger.",(0,o.kt)("b",null,"transfers"))),(0,o.kt)(p,{mdxType:"Bullet"}),(0,o.kt)("a",{parentName:"h4",href:"/build/api/schema/objects/uco-transfer"},(0,o.kt)("inlineCode",{parentName:"a"},"[UcoTransfer]"))," ",(0,o.kt)(f,{class:"secondary",text:"list",mdxType:"Badge"})," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})),(0,o.kt)("blockquote",null),(0,o.kt)("h3",{id:"member-of"},"Member of"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/build/api/schema/objects/ledger"},(0,o.kt)("inlineCode",{parentName:"a"},"Ledger"))," ",(0,o.kt)(f,{class:"secondary",text:"object",mdxType:"Badge"})))}g.isMDXComponent=!0},8209:(e,t,r)=>{r(67294)}}]); \ No newline at end of file diff --git a/assets/js/fe684f20.af3d8b65.js b/assets/js/fe684f20.af3d8b65.js deleted file mode 100644 index c94687764..000000000 --- a/assets/js/fe684f20.af3d8b65.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5412],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>b});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),l=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,s=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=l(a),u=n,b=d["".concat(c,".").concat(u)]||d[u]||m[u]||s;return a?r.createElement(b,i(i({ref:t},p),{},{components:a})):r.createElement(b,i({ref:t},p))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=a.length,i=new Array(s);i[0]=u;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[d]="string"==typeof e?e:n,i[1]=o;for(var l=2;l{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>d,SpecifiedBy:()=>m,assets:()=>l,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),s=a(3905);a(8209);const i={id:"string",title:"String",hide_table_of_contents:!1},o=void 0,c={unversionedId:"build/api/schema/scalars/string",id:"build/api/schema/scalars/string",title:"String",description:"The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",source:"@site/docs/build/api/schema/scalars/string.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/string",permalink:"/build/api/schema/scalars/string",draft:!1,tags:[],version:"current",lastUpdatedAt:1706652265,formattedLastUpdatedAt:"Jan 30, 2024",frontMatter:{id:"string",title:"String",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"PublicKey",permalink:"/build/api/schema/scalars/public-key"},next:{title:"Timestamp",permalink:"/build/api/schema/scalars/timestamp"}},l={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,s.kt)(n.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,s.kt)(n.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,s.kt)(n.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:p,Bullet:d,SpecifiedBy:m,Badge:u},y="wrapper";function f(e){let{components:t,...a}=e;return(0,s.kt)(y,(0,r.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"The ",(0,s.kt)("inlineCode",{parentName:"p"},"String")," scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text."),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar String\n")),(0,s.kt)("h3",{id:"member-of"},"Member of"),(0,s.kt)("p",null,(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,s.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/endpoint"},(0,s.kt)("inlineCode",{parentName:"a"},"Endpoint"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,s.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,s.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-error"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionError"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-movement"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionMovement"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/unspent-output"},(0,s.kt)("inlineCode",{parentName:"a"},"UnspentOutput"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/version"},(0,s.kt)("inlineCode",{parentName:"a"},"Version"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/fe684f20.f908e2f4.js b/assets/js/fe684f20.f908e2f4.js new file mode 100644 index 000000000..5f31e4731 --- /dev/null +++ b/assets/js/fe684f20.f908e2f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5412],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>b});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var c=r.createContext({}),l=function(e){var t=r.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,s=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=l(a),u=n,b=d["".concat(c,".").concat(u)]||d[u]||m[u]||s;return a?r.createElement(b,i(i({ref:t},p),{},{components:a})):r.createElement(b,i({ref:t},p))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=a.length,i=new Array(s);i[0]=u;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[d]="string"==typeof e?e:n,i[1]=o;for(var l=2;l{a.r(t),a.d(t,{Badge:()=>u,Bullet:()=>d,SpecifiedBy:()=>m,assets:()=>l,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var r=a(87462),n=a(67294),s=a(3905);a(8209);const i={id:"string",title:"String",hide_table_of_contents:!1},o=void 0,c={unversionedId:"build/api/schema/scalars/string",id:"build/api/schema/scalars/string",title:"String",description:"The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",source:"@site/docs/build/api/schema/scalars/string.mdx",sourceDirName:"build/api/schema/scalars",slug:"/build/api/schema/scalars/string",permalink:"/build/api/schema/scalars/string",draft:!1,tags:[],version:"current",lastUpdatedAt:1707240146,formattedLastUpdatedAt:"Feb 6, 2024",frontMatter:{id:"string",title:"String",hide_table_of_contents:!1},sidebar:"docs",previous:{title:"PublicKey",permalink:"/build/api/schema/scalars/public-key"},next:{title:"Timestamp",permalink:"/build/api/schema/scalars/timestamp"}},l={},p=[{value:"Member of",id:"member-of",level:3}],d=()=>(0,s.kt)(n.Fragment,null,(0,s.kt)("span",{style:{fontWeight:"normal",fontSize:".5em",color:"var(--ifm-color-secondary-darkest)"}},"\xa0\u25cf\xa0")),m=e=>(0,s.kt)(n.Fragment,null,"Specification",(0,s.kt)("a",{className:"link",style:{fontSize:"1.5em",paddingLeft:"4px"},target:"_blank",href:e.url,title:"Specified by "+e.url},"\u2398")),u=e=>(0,s.kt)(n.Fragment,null,(0,s.kt)("span",{class:"badge badge--"+e.class},e.text)),b={toc:p,Bullet:d,SpecifiedBy:m,Badge:u},y="wrapper";function f(e){let{components:t,...a}=e;return(0,s.kt)(y,(0,r.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"The ",(0,s.kt)("inlineCode",{parentName:"p"},"String")," scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text."),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-graphql"},"scalar String\n")),(0,s.kt)("h3",{id:"member-of"},"Member of"),(0,s.kt)("p",null,(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/data"},(0,s.kt)("inlineCode",{parentName:"a"},"Data"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/endpoint"},(0,s.kt)("inlineCode",{parentName:"a"},"Endpoint"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/node"},(0,s.kt)("inlineCode",{parentName:"a"},"Node"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/token"},(0,s.kt)("inlineCode",{parentName:"a"},"Token"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction"},(0,s.kt)("inlineCode",{parentName:"a"},"Transaction"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-error"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionError"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-input"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionInput"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-movement"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionMovement"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/transaction-summary"},(0,s.kt)("inlineCode",{parentName:"a"},"TransactionSummary"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/unspent-output"},(0,s.kt)("inlineCode",{parentName:"a"},"UnspentOutput"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"}),(0,s.kt)(d,{mdxType:"Bullet"}),(0,s.kt)("a",{parentName:"p",href:"/build/api/schema/objects/version"},(0,s.kt)("inlineCode",{parentName:"a"},"Version"))," ",(0,s.kt)(u,{class:"secondary",text:"object",mdxType:"Badge"})))}f.isMDXComponent=!0},8209:(e,t,a)=>{a(67294)}}]); \ No newline at end of file diff --git a/assets/js/main.68a2b771.js b/assets/js/main.68a2b771.js deleted file mode 100644 index 1beb956db..000000000 --- a/assets/js/main.68a2b771.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.68a2b771.js.LICENSE.txt */ -(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[179],{723:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(67294),a=n(87462),o=n(68356),i=n.n(o),s=n(16887);const c={"009f927a":[()=>n.e(7265).then(n.bind(n,38968)),"@site/docs/learn/sharding/replication-attestation.md",38968],"0126df03":[()=>n.e(5295).then(n.bind(n,67822)),"@site/docs/build/api/schema/objects/oracle-data.mdx",67822],"02486155":[()=>n.e(6716).then(n.bind(n,1168)),"@site/docs/build/api/schema/queries/beacon-chain-summary.mdx",1168],"05fd4dd8":[()=>n.e(9174).then(n.bind(n,53735)),"@site/docs/build/core/bootstrap.md",53735],"0607e0c5":[()=>n.e(6894).then(n.bind(n,90759)),"@site/docs/build/api/schema/objects/version.mdx",90759],"0666b85a":[()=>n.e(3633).then(n.bind(n,17726)),"@site/docs/build/testnet.md",17726],"07620fdf":[()=>n.e(3812).then(n.bind(n,12253)),"@site/docs/participate/aeweb/usage/cli.md",12253],"07f0fc78":[()=>n.e(2491).then(n.bind(n,6944)),"@site/docs/build/api/schema/objects/validation-stamp.mdx",6944],"08912224":[()=>n.e(8610).then(n.bind(n,60103)),"@site/docs/build/api/schema/scalars/token-properties.mdx",60103],"0945e04b":[()=>n.e(7611).then(n.bind(n,65484)),"@site/docs/build/clients/ledger-wallet/api.md",65484],"0946372c":[()=>n.e(7790).then(n.bind(n,43631)),"@site/docs/build/core/account.md",43631],"0c928027":[()=>n.e(7157).then(n.bind(n,82726)),"@site/docs/learn/token.md",82726],"11838df3":[()=>n.e(3042).then(n.bind(n,2226)),"@site/docs/build/api/schema/objects/uco-data.mdx",2226],12706266:[()=>n.e(1137).then(n.bind(n,56136)),"@site/docs/build/smart-contracts/language/legacy/language.md",56136],"145f3c45":[()=>n.e(8268).then(n.bind(n,31962)),"@site/docs/build/api/schema/objects/transaction-input.mdx",31962],"147d0e4e":[()=>n.e(1166).then(n.bind(n,7428)),"@site/docs/learn/oracle-chain.md",7428],"14d826f7":[()=>n.e(7870).then(n.bind(n,77984)),"@site/docs/FAQ/wallet.md",77984],"14eb3368":[()=>Promise.all([n.e(532),n.e(9817)]).then(n.bind(n,34228)),"@theme/DocCategoryGeneratedIndexPage",34228],"16aa5868":[()=>n.e(3559).then(n.bind(n,42209)),"@site/docs/build/api/schema/objects/shared-secrets.mdx",42209],"16c17b5d":[()=>n.e(7741).then(n.bind(n,76563)),"@site/docs/learn/transaction-chain.md",76563],"16e43f8e":[()=>n.e(2282).then(n.bind(n,72058)),"@site/docs/build/api/schema/queries/transaction-inputs.mdx",72058],"1735c347":[()=>n.e(8087).then(n.bind(n,29778)),"@site/docs/learn/README.md",29778],17896441:[()=>Promise.all([n.e(532),n.e(2784),n.e(7918)]).then(n.bind(n,30230)),"@theme/DocItem",30230],"17dede69":[()=>n.e(9091).then(n.bind(n,94814)),"@site/docs/build/api/schema/objects/token-balance.mdx",94814],"1872c6b8":[()=>n.e(3747).then(n.bind(n,68389)),"@site/docs/participate/bridge/README.md",68389],"190711b6":[()=>n.e(6112).then(n.t.bind(n,95901,19)),"~docs/default/category-docs-category-usage-1-0a4.json",95901],"193cb586":[()=>n.e(6289).then(n.bind(n,1194)),"@site/docs/build/smart-contracts/language/triggers.md",1194],"199f22fd":[()=>n.e(1263).then(n.bind(n,42790)),"@site/docs/build/api/schema/queries/nearest-endpoints.mdx",42790],"1b311f41":[()=>n.e(3355).then(n.bind(n,32474)),"@site/docs/build/api/schema/queries/transaction-chain.mdx",32474],"1be78505":[()=>Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,19963)),"@theme/DocPage",19963],"1f391b9e":[()=>Promise.all([n.e(532),n.e(2784),n.e(3085)]).then(n.bind(n,14247)),"@theme/MDXPage",14247],"2159a0a5":[()=>n.e(7766).then(n.bind(n,20268)),"@site/docs/learn/transaction-fees.md",20268],"21e44e7e":[()=>n.e(6605).then(n.bind(n,10884)),"@site/docs/build/api/schema/objects/transaction-error.mdx",10884],"244870c6":[()=>n.e(6484).then(n.bind(n,777)),"@site/docs/build/smart-contracts/playground/deploy.md",777],"24510ea8":[()=>n.e(1340).then(n.bind(n,48789)),"@site/docs/build/core/oracle-chain/service.md",48789],"27ab3fd0":[()=>n.e(3382).then(n.bind(n,49374)),"@site/docs/build/api/schema/queries/shared-secrets.mdx",49374],"2ab0cde1":[()=>n.e(5400).then(n.bind(n,62421)),"@site/docs/participate/aeweb/usage/aeweb-front.md",62421],"2bbc5cd2":[()=>n.e(1710).then(n.bind(n,33966)),"@site/docs/build/smart-contracts/language/legacy/README.md",33966],"2bc40b18":[()=>n.e(6631).then(n.bind(n,24993)),"@site/docs/learn/governance/governance.md",24993],"2c3d8110":[()=>n.e(4732).then(n.bind(n,27376)),"@site/docs/build/core/oracle-chain/scheduler.md",27376],"2d63ea61":[()=>n.e(2971).then(n.bind(n,39870)),"@site/docs/build/api/schema/objects/authorized-key.mdx",39870],"2f55ba46":[()=>n.e(6898).then(n.bind(n,25841)),"@site/docs/build/api/schema/queries/version.mdx",25841],"2fdf8aec":[()=>n.e(1328).then(n.bind(n,3630)),"@site/docs/build/core/oracle-chain/README.md",3630],"300a963c":[()=>n.e(5254).then(n.bind(n,80525)),"@site/docs/build/api/schema/objects/uco-transfer.mdx",80525],"310207c7":[()=>n.e(5986).then(n.bind(n,7452)),"@site/docs/build/smart-contracts/fees.md",7452],"3247e900":[()=>n.e(8992).then(n.bind(n,49012)),"@site/docs/build/api/schema/objects/transaction-movement.mdx",49012],"32bd85cf":[()=>n.e(8227).then(n.bind(n,9517)),"@site/docs/build/api/schema/scalars/boolean.mdx",9517],36739131:[()=>n.e(5888).then(n.bind(n,34337)),"@site/docs/learn/patents.md",34337],"368a7f2c":[()=>n.e(48).then(n.bind(n,61945)),"@site/docs/participate/dex/usage/aeSwap.md",61945],"378b5e98":[()=>n.e(7482).then(n.bind(n,12507)),"@site/docs/build/api/schema/objects/transaction.mdx",12507],"393be207":[()=>n.e(7414).then(n.bind(n,79286)),"@site/src/pages/markdown-page.md",79286],"410469d2":[()=>n.e(6328).then(n.bind(n,25386)),"@site/docs/build/core/beacon-chain/p2p-sampling.md",25386],"41e024b6":[()=>n.e(7793).then(n.bind(n,92915)),"@site/docs/participate/aeweb/automation.md",92915],"441b3d3d":[()=>n.e(2488).then(n.bind(n,81429)),"@site/docs/build/clients/ledger-wallet/README.md",81429],"44c96576":[()=>n.e(5352).then(n.bind(n,24110)),"@site/docs/build/smart-contracts/playground/function.md",24110],"45e94216":[()=>n.e(4439).then(n.bind(n,22811)),"@site/docs/build/api/schema/scalars/non-neg-integer.mdx",22811],"484af1f2":[()=>n.e(3305).then(n.bind(n,79126)),"@site/docs/FAQ/bridge.md",79126],"4ad6f564":[()=>n.e(932).then(n.bind(n,92852)),"@site/docs/build/api/schema/objects/oracle-services.mdx",92852],"4bf323b4":[()=>n.e(1601).then(n.bind(n,61544)),"@site/docs/build/smart-contracts/language/README.md",61544],"4c0f205c":[()=>n.e(2217).then(n.bind(n,2399)),"@site/docs/build/api/schema/queries/token.mdx",2399],"4d54d076":[()=>n.e(7080).then(n.bind(n,11933)),"@site/docs/contributing.md",11933],"4eef9a57":[()=>n.e(1172).then(n.t.bind(n,61253,19)),"~docs/default/category-docs-category-usage-305.json",61253],"5037eb2b":[()=>n.e(246).then(n.bind(n,19461)),"@site/docs/build/core/election.md",19461],55620597:[()=>n.e(8342).then(n.bind(n,63318)),"@site/docs/build/api/schema/subscriptions/oracle-update.mdx",63318],"56f0859a":[()=>n.e(5050).then(n.bind(n,88764)),"@site/docs/build/api/schema/objects/transaction-attestation.mdx",88764],"57fb9911":[()=>n.e(4889).then(n.bind(n,84112)),"@site/docs/build/api/schema/objects/ledger-operations.mdx",84112],"59ac5e04":[()=>n.e(9199).then(n.bind(n,87759)),"@site/docs/build/clients/ledger-wallet/commands.md",87759],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,36809)),"@generated/docusaurus.config",36809],"5eea7269":[()=>n.e(6748).then(n.bind(n,29323)),"@site/docs/build/api/schema/objects/unspent-output.mdx",29323],"5fe1ab02":[()=>n.e(2926).then(n.bind(n,68712)),"@site/docs/build/core/mining/README.md",68712],"61e43ac9":[()=>n.e(81).then(n.bind(n,47181)),"@site/docs/build/api/schema/scalars/float.mdx",47181],"65c808a4":[()=>n.e(5630).then(n.bind(n,39639)),"@site/docs/build/api/schema/queries/transactions.mdx",39639],66076425:[()=>n.e(3168).then(n.bind(n,5712)),"@site/docs/build/api/schema/scalars/timestamp.mdx",5712],"6638f55a":[()=>n.e(7486).then(n.bind(n,909)),"@site/docs/build/api/schema/directives/include.mdx",909],"66545c3d":[()=>n.e(7045).then(n.bind(n,83321)),"@site/docs/build/api/schema/objects/token.mdx",83321],"66dc3ce4":[()=>n.e(2849).then(n.t.bind(n,6014,19)),"~docs/default/category-docs-category-build-cbf.json",6014],"6aade8bf":[()=>n.e(6518).then(n.bind(n,82658)),"@site/docs/build/core/oracle-chain/mem_table.md",82658],"6efc9e6d":[()=>n.e(844).then(n.bind(n,51135)),"@site/docs/build/api/schema/scalars/public-key.mdx",51135],"6fa4dae1":[()=>n.e(9255).then(n.bind(n,94392)),"@site/docs/build/core/mining/pending-transaction-validation.md",94392],"70e1f15f":[()=>n.e(1592).then(n.bind(n,27598)),"@site/docs/build/api/schema/objects/ledger.mdx",27598],"710ae1bb":[()=>n.e(847).then(n.bind(n,18504)),"@site/docs/learn/cryptography/README.md",18504],"72ec880a":[()=>n.e(420).then(n.bind(n,18292)),"@site/docs/build/smart-contracts/playground/mock-form.md",18292],"749f8745":[()=>n.e(9712).then(n.bind(n,82762)),"@site/docs/build/core/mining/proof_of_work.md",82762],"764c3c46":[()=>n.e(1484).then(n.bind(n,72410)),"@site/docs/participate/aeweb/README.md",72410],"76b1eb51":[()=>n.e(5258).then(n.bind(n,68942)),"@site/docs/build/api/schema/objects/ownership.mdx",68942],"7746a795":[()=>n.e(5935).then(n.bind(n,48353)),"@site/docs/participate/wallet/README.md",48353],"7764509b":[()=>n.e(1996).then(n.bind(n,97051)),"@site/docs/build/api/schema/objects/beacon-chain-summary.mdx",97051],"777b0dfa":[()=>n.e(7849).then(n.bind(n,63)),"@site/docs/learn/decentralized-id/README.md",63],"77c64564":[()=>n.e(4560).then(n.t.bind(n,59222,19)),"~docs/default/category-docs-category-participate-b3b.json",59222],79891879:[()=>n.e(1260).then(n.bind(n,48421)),"@site/docs/build/core/cryptography/README.md",48421],"7bfcff53":[()=>n.e(3592).then(n.bind(n,57736)),"@site/docs/learn/p2p/self-repair.md",57736],"7d24ac82":[()=>n.e(6691).then(n.bind(n,23387)),"@site/docs/build/core/cryptography/tpm.md",23387],"7e96883b":[()=>n.e(7655).then(n.bind(n,82292)),"@site/docs/participate/aeweb/how-it-works.md",82292],"8153e280":[()=>n.e(711).then(n.bind(n,34774)),"@site/docs/build/api/schema/queries/last-transaction.mdx",34774],"840f9766":[()=>n.e(2502).then(n.t.bind(n,15745,19)),"/home/runner/work/archethic-docs/archethic-docs/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",15745],"851bf865":[()=>n.e(827).then(n.bind(n,81140)),"@site/docs/build/api/schema/generated.md",81140],"87dfbf5d":[()=>n.e(1171).then(n.bind(n,74464)),"@site/docs/build/api/schema/scalars/hash.mdx",74464],"89af9b08":[()=>n.e(4230).then(n.bind(n,77985)),"@site/docs/build/api/schema/objects/balance.mdx",77985],"8a7bb9f4":[()=>n.e(8731).then(n.t.bind(n,99185,19)),"~docs/default/category-docs-category-api-6aa.json",99185],"8a9337ba":[()=>n.e(1113).then(n.bind(n,6585)),"@site/docs/build/core/beacon-chain/README.md",6585],"8b5bd275":[()=>n.e(6451).then(n.bind(n,8635)),"@site/docs/build/api/schema/subscriptions/transaction-error.mdx",8635],"8d60aa1f":[()=>n.e(2614).then(n.bind(n,77691)),"@site/docs/build/api/schema/scalars/p2-p-availabilities.mdx",77691],"8dbf302e":[()=>n.e(9254).then(n.bind(n,8616)),"@site/docs/learn/decentralized-id/keychain.md",8616],"9280a2e5":[()=>n.e(2814).then(n.bind(n,47562)),"@site/docs/build/api/schema/scalars/hex.mdx",47562],"9327017b":[()=>n.e(8016).then(n.bind(n,75085)),"@site/docs/build/api/schema/objects/data.mdx",75085],"935f2afb":[()=>n.e(53).then(n.t.bind(n,1109,19)),"~docs/default/version-current-metadata-prop-751.json",1109],"93c272fe":[()=>n.e(5896).then(n.bind(n,11338)),"@site/docs/build/smart-contracts/README.md",11338],"954979f8":[()=>n.e(9707).then(n.bind(n,84261)),"@site/docs/build/smart-contracts/language/examples.md",84261],"9bb63452":[()=>n.e(974).then(n.bind(n,62778)),"@site/docs/build/core/p2p/README.md",62778],"9c94cf05":[()=>n.e(9559).then(n.bind(n,58235)),"@site/docs/build/api/schema/directives/skip.mdx",58235],"9c964f59":[()=>n.e(8715).then(n.bind(n,55416)),"@site/docs/build/api/schema/scalars/int.mdx",55416],"9d5784d1":[()=>n.e(7028).then(n.bind(n,53187)),"@site/docs/build/sdk/go.md",53187],"9de09737":[()=>n.e(6783).then(n.bind(n,73641)),"@site/docs/learn/transaction-types.md",73641],"9e3de0ed":[()=>n.e(4435).then(n.bind(n,36109)),"@site/docs/participate/dex/README.md",36109],a0393694:[()=>n.e(1248).then(n.bind(n,37577)),"@site/docs/participate/cli/README.md",37577],a1844ead:[()=>n.e(1778).then(n.bind(n,56941)),"@site/docs/build/smart-contracts/playground/transaction-form.md",56941],a18b1795:[()=>n.e(3890).then(n.bind(n,4614)),"@site/docs/build/api/schema/queries/network-transactions.mdx",4614],a22626c5:[()=>n.e(9286).then(n.bind(n,15536)),"@site/docs/build/core/README.md",15536],a90ecf70:[()=>n.e(9056).then(n.bind(n,74844)),"@site/docs/FAQ/aeweb.md",74844],aa1914e6:[()=>n.e(6694).then(n.bind(n,58954)),"@site/docs/build/sdk/README.md",58954],ac1890eb:[()=>n.e(1719).then(n.bind(n,61060)),"@site/docs/build/api/schema/scalars/address.mdx",61060],ae218501:[()=>n.e(7443).then(n.bind(n,38289)),"@site/docs/build/api/schema/objects/token-ledger.mdx",38289],aef11b3c:[()=>n.e(9573).then(n.bind(n,63363)),"@site/docs/build/api/schema/subscriptions/transaction-confirmed.mdx",63363],b17a2c3b:[()=>n.e(4099).then(n.bind(n,36709)),"@site/docs/build/api/schema/queries/nodes.mdx",36709],b2e52e63:[()=>n.e(1938).then(n.bind(n,57751)),"@site/docs/build/smart-contracts/language/condition.md",57751],b434a052:[()=>n.e(7866).then(n.t.bind(n,21917,19)),"~docs/default/category-docs-category-clients-434.json",21917],b4914bc5:[()=>n.e(8959).then(n.bind(n,42938)),"@site/docs/build/core/mining/transaction-context.md",42938],b5651cae:[()=>n.e(1855).then(n.bind(n,83313)),"@site/docs/build/smart-contracts/language/library.md",83313],b684cce9:[()=>Promise.all([n.e(532),n.e(6829)]).then(n.bind(n,57255)),"@site/docs/participate/aeweb/dns.md",57255],b95a0862:[()=>n.e(3218).then(n.t.bind(n,2841,19)),"~docs/default/category-docs-category-usage-2-6f3.json",2841],bb9d9339:[()=>n.e(4398).then(n.bind(n,41046)),"@site/docs/build/smart-contracts/playground/README.md",41046],bbc3785e:[()=>n.e(1690).then(n.bind(n,75453)),"@site/docs/build/api/schema/objects/endpoint.mdx",75453],bd1424fb:[()=>n.e(9036).then(n.bind(n,9145)),"@site/docs/build/clients/wallet-specification.md",9145],bd14bfe1:[()=>n.e(4060).then(n.bind(n,47990)),"@site/docs/build/clients/wallet-access.md",47990],be94c4be:[()=>n.e(6697).then(n.bind(n,66705)),"@site/docs/build/api/schema/objects/node.mdx",66705],bf608a00:[()=>n.e(2052).then(n.bind(n,11602)),"@site/docs/build/api/schema/queries/oracle-data.mdx",11602],bf6e295d:[()=>n.e(1697).then(n.bind(n,91934)),"@site/docs/build/api/schema/scalars/pos-integer.mdx",91934],c1d281e2:[()=>n.e(8370).then(n.t.bind(n,5992,19)),"~docs/default/category-docs-category-faq-3ae.json",5992],c204078c:[()=>n.e(3723).then(n.bind(n,3686)),"@site/docs/build/core/p2p/messaging.md",3686],c31d0f42:[()=>n.e(7527).then(n.bind(n,50773)),"@site/docs/build/sdk/dart.md",50773],c325c1c7:[()=>n.e(8208).then(n.bind(n,92349)),"@site/docs/build/core/p2p/node.md",92349],c47075b4:[()=>n.e(7136).then(n.bind(n,2747)),"@site/docs/build/api/schema/queries/transaction.mdx",2747],c4bb8d44:[()=>n.e(9852).then(n.bind(n,80228)),"@site/docs/learn/p2p/README.md",80228],c4f5d8e4:[()=>Promise.all([n.e(532),n.e(4195)]).then(n.bind(n,59335)),"@site/src/pages/index.js",59335],c505f0d9:[()=>n.e(9740).then(n.t.bind(n,82062,19)),"~docs/default/category-docs-category-graphql-d94.json",82062],c65c1395:[()=>n.e(5344).then(n.bind(n,45341)),"@site/docs/build/api/schema/scalars/transaction-type.mdx",45341],c8c61268:[()=>n.e(9909).then(n.bind(n,76047)),"@site/docs/learn/p2p/bootstrapping.md",76047],cc668907:[()=>n.e(6753).then(n.bind(n,86387)),"@site/docs/build/api/schema/objects/cross-validation-stamp.mdx",86387],cc71d488:[()=>n.e(9216).then(n.bind(n,98520)),"@site/docs/build/smart-contracts/playground/build.md",98520],ceaeeb36:[()=>n.e(2323).then(n.bind(n,50472)),"@site/docs/build/core/governance/cd.md",50472],d0a652bb:[()=>n.e(5944).then(n.bind(n,49182)),"@site/docs/learn/sharding/beacon-chain/explorer.md",49182],d2674f84:[()=>n.e(669).then(n.bind(n,54340)),"@site/docs/build/smart-contracts/language/actions.md",54340],d409b53d:[()=>n.e(6907).then(n.bind(n,1163)),"@site/docs/build/core/database.md",1163],d54033d7:[()=>n.e(9855).then(n.bind(n,52719)),"@site/docs/build/api/schema/scalars/content.mdx",52719],d5f21d1f:[()=>n.e(8544).then(n.bind(n,57781)),"@site/docs/build/sdk/js.md",57781],d781e8a6:[()=>n.e(4552).then(n.bind(n,61240)),"@site/docs/build/smart-contracts/language/legacy/examples.md",61240],dae7efd3:[()=>n.e(8682).then(n.bind(n,20454)),"@site/docs/participate/bridge/usage/bridge-front.md",20454],daff3ff4:[()=>n.e(1718).then(n.bind(n,14253)),"@site/docs/learn/uco.md",14253],db2ee795:[()=>n.e(1950).then(n.bind(n,61340)),"@site/docs/learn/ecosystem.md",61340],dd15e14a:[()=>n.e(681).then(n.bind(n,23580)),"@site/docs/learn/arch-consensus/README.md",23580],e0b1087e:[()=>n.e(4898).then(n.bind(n,33783)),"@site/docs/build/api/schema/objects/token-transfer.mdx",33783],e2b19375:[()=>n.e(4338).then(n.bind(n,73101)),"@site/docs/learn/arch-consensus/proof-of-work.md",73101],e2f82150:[()=>n.e(5510).then(n.bind(n,61313)),"@site/docs/build/api/schema/queries/genesis-address.mdx",61313],e49ee1a9:[()=>n.e(6509).then(n.bind(n,6331)),"@site/docs/build/api/schema/queries/balance.mdx",6331],e98eede6:[()=>n.e(9185).then(n.bind(n,55096)),"@site/docs/participate/wallet/dapps-communication.md",55096],ecdd1e85:[()=>n.e(1696).then(n.bind(n,2768)),"@site/docs/learn/cryptography/hardware-root-of-trust.md",2768],ee388bf8:[()=>n.e(7701).then(n.bind(n,18734)),"@site/docs/build/api/schema/enums/error-context.mdx",18734],eeb513bd:[()=>n.e(5371).then(n.bind(n,43022)),"@site/docs/learn/sharding/beacon-chain/README.md",43022],f3ebdb21:[()=>n.e(9333).then(n.bind(n,17229)),"@site/docs/FAQ/bridge-2-ways.md",17229],f43cc2fc:[()=>n.e(5682).then(n.t.bind(n,83769,19)),"/home/runner/work/archethic-docs/archethic-docs/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",83769],f5288705:[()=>n.e(6087).then(n.bind(n,62977)),"@site/docs/build/api/schema/objects/transaction-summary.mdx",62977],f57a1375:[()=>n.e(330).then(n.bind(n,74301)),"@site/docs/build/core/governance/ci.md",74301],f63a5cf4:[()=>n.e(3446).then(n.bind(n,20363)),"@site/docs/build/core/governance/code-proposals.md",20363],fa629964:[()=>n.e(8607).then(n.bind(n,32020)),"@site/docs/learn/sharding/README.md",32020],fb57a917:[()=>n.e(4875).then(n.bind(n,92347)),"@site/docs/build/core/cryptography/yubikey.md",92347],fbab86a0:[()=>n.e(7007).then(n.bind(n,5840)),"@site/docs/build/api/schema/enums/sort-order.mdx",5840],fe068327:[()=>n.e(8568).then(n.bind(n,18576)),"@site/docs/build/api/schema/objects/uco-ledger.mdx",18576],fe684f20:[()=>n.e(5412).then(n.bind(n,31040)),"@site/docs/build/api/schema/scalars/string.mdx",31040]};function l(e){let{error:t,retry:n,pastDelay:a}=e;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var u=n(99670),d=n(30226);function p(e,t){if("*"===e)return i()({loading:l,loader:()=>n.e(4972).then(n.bind(n,4972)),modules:["@theme/NotFound"],webpack:()=>[4972],render(e,t){const n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});const o=s[`${e}-${t}`],p={},f=[],m=[],h=(0,u.Z)(o);return Object.entries(h).forEach((e=>{let[t,n]=e;const r=c[n];r&&(p[t]=r[0],f.push(r[1]),m.push(r[2]))})),i().Map({loading:l,loader:p,modules:f,webpack:()=>m,render(t,n){const i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let o=i;const s=n.split(".");s.slice(0,-1).forEach((e=>{o=o[e]})),o[s[s.length-1]]=a}));const s=i.__comp;delete i.__comp;const c=i.__context;return delete i.__context,r.createElement(d.z,{value:c},r.createElement(s,(0,a.Z)({},i,n)))}})}const f=[{path:"/markdown-page",component:p("/markdown-page","dea"),exact:!0},{path:"/",component:p("/","c73"),exact:!0},{path:"/",component:p("/","360"),routes:[{path:"/build/api/schema/directives/include",component:p("/build/api/schema/directives/include","fc7"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/directives/skip",component:p("/build/api/schema/directives/skip","ccf"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/enums/error-context",component:p("/build/api/schema/enums/error-context","1f6"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/enums/sort-order",component:p("/build/api/schema/enums/sort-order","3ab"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/authorized-key",component:p("/build/api/schema/objects/authorized-key","40f"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/balance",component:p("/build/api/schema/objects/balance","94a"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/beacon-chain-summary",component:p("/build/api/schema/objects/beacon-chain-summary","fb8"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/cross-validation-stamp",component:p("/build/api/schema/objects/cross-validation-stamp","230"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/data",component:p("/build/api/schema/objects/data","d11"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/endpoint",component:p("/build/api/schema/objects/endpoint","c24"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/ledger",component:p("/build/api/schema/objects/ledger","dbc"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/ledger-operations",component:p("/build/api/schema/objects/ledger-operations","e8f"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/node",component:p("/build/api/schema/objects/node","d47"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/oracle-data",component:p("/build/api/schema/objects/oracle-data","b22"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/oracle-services",component:p("/build/api/schema/objects/oracle-services","fc4"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/ownership",component:p("/build/api/schema/objects/ownership","98c"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/shared-secrets",component:p("/build/api/schema/objects/shared-secrets","2f6"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/token",component:p("/build/api/schema/objects/token","315"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/token-balance",component:p("/build/api/schema/objects/token-balance","a6f"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/token-ledger",component:p("/build/api/schema/objects/token-ledger","022"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/token-transfer",component:p("/build/api/schema/objects/token-transfer","5a1"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/transaction",component:p("/build/api/schema/objects/transaction","620"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/transaction-attestation",component:p("/build/api/schema/objects/transaction-attestation","526"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/transaction-error",component:p("/build/api/schema/objects/transaction-error","fc3"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/transaction-input",component:p("/build/api/schema/objects/transaction-input","801"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/transaction-movement",component:p("/build/api/schema/objects/transaction-movement","da0"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/transaction-summary",component:p("/build/api/schema/objects/transaction-summary","eab"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/uco-data",component:p("/build/api/schema/objects/uco-data","c8c"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/uco-ledger",component:p("/build/api/schema/objects/uco-ledger","475"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/uco-transfer",component:p("/build/api/schema/objects/uco-transfer","5fb"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/unspent-output",component:p("/build/api/schema/objects/unspent-output","3b8"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/validation-stamp",component:p("/build/api/schema/objects/validation-stamp","303"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/objects/version",component:p("/build/api/schema/objects/version","a3f"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/balance",component:p("/build/api/schema/queries/balance","899"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/beacon-chain-summary",component:p("/build/api/schema/queries/beacon-chain-summary","d4e"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/genesis-address",component:p("/build/api/schema/queries/genesis-address","491"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/last-transaction",component:p("/build/api/schema/queries/last-transaction","86e"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/nearest-endpoints",component:p("/build/api/schema/queries/nearest-endpoints","8a7"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/network-transactions",component:p("/build/api/schema/queries/network-transactions","1ae"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/nodes",component:p("/build/api/schema/queries/nodes","5bf"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/oracle-data",component:p("/build/api/schema/queries/oracle-data","11c"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/shared-secrets",component:p("/build/api/schema/queries/shared-secrets","ca4"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/token",component:p("/build/api/schema/queries/token","f6b"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/transaction",component:p("/build/api/schema/queries/transaction","35f"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/transaction-chain",component:p("/build/api/schema/queries/transaction-chain","4ef"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/transaction-inputs",component:p("/build/api/schema/queries/transaction-inputs","31f"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/transactions",component:p("/build/api/schema/queries/transactions","e92"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/queries/version",component:p("/build/api/schema/queries/version","c87"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/address",component:p("/build/api/schema/scalars/address","627"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/boolean",component:p("/build/api/schema/scalars/boolean","35e"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/content",component:p("/build/api/schema/scalars/content","a52"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/float",component:p("/build/api/schema/scalars/float","1ce"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/hash",component:p("/build/api/schema/scalars/hash","77f"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/hex",component:p("/build/api/schema/scalars/hex","15e"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/int",component:p("/build/api/schema/scalars/int","95c"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/non-neg-integer",component:p("/build/api/schema/scalars/non-neg-integer","dca"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/p2-p-availabilities",component:p("/build/api/schema/scalars/p2-p-availabilities","567"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/pos-integer",component:p("/build/api/schema/scalars/pos-integer","902"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/public-key",component:p("/build/api/schema/scalars/public-key","ec2"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/string",component:p("/build/api/schema/scalars/string","93e"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/timestamp",component:p("/build/api/schema/scalars/timestamp","78e"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/token-properties",component:p("/build/api/schema/scalars/token-properties","9d4"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/scalars/transaction-type",component:p("/build/api/schema/scalars/transaction-type","f1b"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/subscriptions/oracle-update",component:p("/build/api/schema/subscriptions/oracle-update","376"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/subscriptions/transaction-confirmed",component:p("/build/api/schema/subscriptions/transaction-confirmed","921"),exact:!0,sidebar:"docs"},{path:"/build/api/schema/subscriptions/transaction-error",component:p("/build/api/schema/subscriptions/transaction-error","f9b"),exact:!0,sidebar:"docs"},{path:"/build/clients/ledger-wallet/",component:p("/build/clients/ledger-wallet/","63b"),exact:!0,sidebar:"docs"},{path:"/build/clients/ledger-wallet/api",component:p("/build/clients/ledger-wallet/api","4d3"),exact:!0,sidebar:"docs"},{path:"/build/clients/ledger-wallet/commands",component:p("/build/clients/ledger-wallet/commands","326"),exact:!0,sidebar:"docs"},{path:"/build/clients/wallet-access",component:p("/build/clients/wallet-access","534"),exact:!0,sidebar:"docs"},{path:"/build/clients/wallet-spec",component:p("/build/clients/wallet-spec","8e9"),exact:!0,sidebar:"docs"},{path:"/build/core/",component:p("/build/core/","e16"),exact:!0,sidebar:"docs"},{path:"/build/core/account",component:p("/build/core/account","ec7"),exact:!0,sidebar:"docs"},{path:"/build/core/beacon-chain/",component:p("/build/core/beacon-chain/","c6f"),exact:!0,sidebar:"docs"},{path:"/build/core/beacon-chain/p2p-sampling",component:p("/build/core/beacon-chain/p2p-sampling","910"),exact:!0,sidebar:"docs"},{path:"/build/core/bootstrap",component:p("/build/core/bootstrap","cbe"),exact:!0,sidebar:"docs"},{path:"/build/core/cryptography/",component:p("/build/core/cryptography/","dfc"),exact:!0,sidebar:"docs"},{path:"/build/core/cryptography/tpm",component:p("/build/core/cryptography/tpm","054"),exact:!0,sidebar:"docs"},{path:"/build/core/cryptography/yubikey",component:p("/build/core/cryptography/yubikey","ede"),exact:!0,sidebar:"docs"},{path:"/build/core/database",component:p("/build/core/database","187"),exact:!0,sidebar:"docs"},{path:"/build/core/election",component:p("/build/core/election","00b"),exact:!0,sidebar:"docs"},{path:"/build/core/governance/code-proposals",component:p("/build/core/governance/code-proposals","546"),exact:!0,sidebar:"docs"},{path:"/build/core/governance/code-proposals-cd",component:p("/build/core/governance/code-proposals-cd","cd9"),exact:!0,sidebar:"docs"},{path:"/build/core/governance/code-proposals-ci",component:p("/build/core/governance/code-proposals-ci","f0b"),exact:!0,sidebar:"docs"},{path:"/build/core/mining/",component:p("/build/core/mining/","614"),exact:!0,sidebar:"docs"},{path:"/build/core/mining/proof-of-work",component:p("/build/core/mining/proof-of-work","a9d"),exact:!0,sidebar:"docs"},{path:"/build/core/mining/transaction-context",component:p("/build/core/mining/transaction-context","184"),exact:!0,sidebar:"docs"},{path:"/build/core/mining/transaction-validation",component:p("/build/core/mining/transaction-validation","039"),exact:!0,sidebar:"docs"},{path:"/build/core/oracle-chain/",component:p("/build/core/oracle-chain/","216"),exact:!0,sidebar:"docs"},{path:"/build/core/oracle-chain/memory-table",component:p("/build/core/oracle-chain/memory-table","9c8"),exact:!0,sidebar:"docs"},{path:"/build/core/oracle-chain/scheduler",component:p("/build/core/oracle-chain/scheduler","d4a"),exact:!0,sidebar:"docs"},{path:"/build/core/oracle-chain/service",component:p("/build/core/oracle-chain/service","948"),exact:!0,sidebar:"docs"},{path:"/build/core/p2p/",component:p("/build/core/p2p/","13b"),exact:!0,sidebar:"docs"},{path:"/build/core/p2p/messaging",component:p("/build/core/p2p/messaging","298"),exact:!0,sidebar:"docs"},{path:"/build/core/p2p/node",component:p("/build/core/p2p/node","0d4"),exact:!0,sidebar:"docs"},{path:"/build/sdk/",component:p("/build/sdk/","757"),exact:!0,sidebar:"docs"},{path:"/build/sdk/dart",component:p("/build/sdk/dart","760"),exact:!0,sidebar:"docs"},{path:"/build/sdk/go",component:p("/build/sdk/go","904"),exact:!0,sidebar:"docs"},{path:"/build/sdk/js",component:p("/build/sdk/js","634"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/",component:p("/build/smart-contracts/","0a7"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/fees",component:p("/build/smart-contracts/fees","bbf"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/",component:p("/build/smart-contracts/language/","a0f"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/actions",component:p("/build/smart-contracts/language/actions","274"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/condition",component:p("/build/smart-contracts/language/condition","4f4"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/examples",component:p("/build/smart-contracts/language/examples","80a"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/legacy/",component:p("/build/smart-contracts/language/legacy/","f6f"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/legacy/examples",component:p("/build/smart-contracts/language/legacy/examples","f05"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/legacy/language",component:p("/build/smart-contracts/language/legacy/language","743"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/library",component:p("/build/smart-contracts/language/library","63b"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/language/triggers",component:p("/build/smart-contracts/language/triggers","1df"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/playground/",component:p("/build/smart-contracts/playground/","566"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/playground/build",component:p("/build/smart-contracts/playground/build","090"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/playground/deploy",component:p("/build/smart-contracts/playground/deploy","f94"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/playground/functions",component:p("/build/smart-contracts/playground/functions","611"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/playground/mock-form",component:p("/build/smart-contracts/playground/mock-form","ef9"),exact:!0,sidebar:"docs"},{path:"/build/smart-contracts/playground/transaction-form",component:p("/build/smart-contracts/playground/transaction-form","e6f"),exact:!0,sidebar:"docs"},{path:"/build/testnet",component:p("/build/testnet","9a8"),exact:!0,sidebar:"docs"},{path:"/category/api",component:p("/category/api","0a1"),exact:!0,sidebar:"docs"},{path:"/category/build",component:p("/category/build","8d2"),exact:!0,sidebar:"docs"},{path:"/category/clients",component:p("/category/clients","bea"),exact:!0,sidebar:"docs"},{path:"/category/faq",component:p("/category/faq","5ef"),exact:!0,sidebar:"docs"},{path:"/category/graphql",component:p("/category/graphql","fe7"),exact:!0,sidebar:"docs"},{path:"/category/participate",component:p("/category/participate","28f"),exact:!0,sidebar:"docs"},{path:"/category/usage",component:p("/category/usage","73d"),exact:!0,sidebar:"docs"},{path:"/category/usage-1",component:p("/category/usage-1","a62"),exact:!0,sidebar:"docs"},{path:"/category/usage-2",component:p("/category/usage-2","10c"),exact:!0,sidebar:"docs"},{path:"/contributing",component:p("/contributing","2d1"),exact:!0,sidebar:"docs"},{path:"/FAQ/aeweb",component:p("/FAQ/aeweb","ccd"),exact:!0,sidebar:"docs"},{path:"/FAQ/bridge",component:p("/FAQ/bridge","ab0"),exact:!0,sidebar:"docs"},{path:"/FAQ/bridge-2-ways",component:p("/FAQ/bridge-2-ways","20d"),exact:!0,sidebar:"docs"},{path:"/FAQ/wallet",component:p("/FAQ/wallet","498"),exact:!0,sidebar:"docs"},{path:"/learn/",component:p("/learn/","6e4"),exact:!0,sidebar:"docs"},{path:"/learn/arch-consensus/",component:p("/learn/arch-consensus/","cca"),exact:!0,sidebar:"docs"},{path:"/learn/arch-consensus/proof-of-work",component:p("/learn/arch-consensus/proof-of-work","2df"),exact:!0,sidebar:"docs"},{path:"/learn/cryptography/",component:p("/learn/cryptography/","0fa"),exact:!0,sidebar:"docs"},{path:"/learn/cryptography/hardware-root-of-trust",component:p("/learn/cryptography/hardware-root-of-trust","902"),exact:!0,sidebar:"docs"},{path:"/learn/decentralized-id/",component:p("/learn/decentralized-id/","560"),exact:!0,sidebar:"docs"},{path:"/learn/decentralized-id/keychain",component:p("/learn/decentralized-id/keychain","4df"),exact:!0,sidebar:"docs"},{path:"/learn/ecosystem",component:p("/learn/ecosystem","a84"),exact:!0,sidebar:"docs"},{path:"/learn/fee",component:p("/learn/fee","a36"),exact:!0,sidebar:"docs"},{path:"/learn/governance/",component:p("/learn/governance/","ac5"),exact:!0,sidebar:"docs"},{path:"/learn/oracle-chain",component:p("/learn/oracle-chain","165"),exact:!0,sidebar:"docs"},{path:"/learn/p2p/",component:p("/learn/p2p/","1fd"),exact:!0,sidebar:"docs"},{path:"/learn/p2p/bootstrapping",component:p("/learn/p2p/bootstrapping","bea"),exact:!0,sidebar:"docs"},{path:"/learn/p2p/self-repair",component:p("/learn/p2p/self-repair","923"),exact:!0,sidebar:"docs"},{path:"/learn/patents",component:p("/learn/patents","22e"),exact:!0,sidebar:"docs"},{path:"/learn/sharding/",component:p("/learn/sharding/","6e4"),exact:!0,sidebar:"docs"},{path:"/learn/sharding/beacon-chain/",component:p("/learn/sharding/beacon-chain/","9a1"),exact:!0,sidebar:"docs"},{path:"/learn/sharding/beacon-chain/explorer",component:p("/learn/sharding/beacon-chain/explorer","523"),exact:!0,sidebar:"docs"},{path:"/learn/sharding/replication-attestation",component:p("/learn/sharding/replication-attestation","12d"),exact:!0,sidebar:"docs"},{path:"/learn/token",component:p("/learn/token","30c"),exact:!0,sidebar:"docs"},{path:"/learn/transaction-chain",component:p("/learn/transaction-chain","b5a"),exact:!0,sidebar:"docs"},{path:"/learn/transaction-types",component:p("/learn/transaction-types","1f6"),exact:!0,sidebar:"docs"},{path:"/learn/uco",component:p("/learn/uco","794"),exact:!0,sidebar:"docs"},{path:"/participate/aeweb/",component:p("/participate/aeweb/","428"),exact:!0,sidebar:"docs"},{path:"/participate/aeweb/automation",component:p("/participate/aeweb/automation","9da"),exact:!0,sidebar:"docs"},{path:"/participate/aeweb/dns",component:p("/participate/aeweb/dns","f8b"),exact:!0,sidebar:"docs"},{path:"/participate/aeweb/how-it-works",component:p("/participate/aeweb/how-it-works","103"),exact:!0,sidebar:"docs"},{path:"/participate/aeweb/usage/aeweb-front",component:p("/participate/aeweb/usage/aeweb-front","4b3"),exact:!0,sidebar:"docs"},{path:"/participate/aeweb/usage/cli",component:p("/participate/aeweb/usage/cli","0c1"),exact:!0,sidebar:"docs"},{path:"/participate/bridge/",component:p("/participate/bridge/","11b"),exact:!0,sidebar:"docs"},{path:"/participate/bridge/usage/bridge-front",component:p("/participate/bridge/usage/bridge-front","d4f"),exact:!0,sidebar:"docs"},{path:"/participate/cli/",component:p("/participate/cli/","d21"),exact:!0,sidebar:"docs"},{path:"/participate/dex/",component:p("/participate/dex/","dee"),exact:!0,sidebar:"docs"},{path:"/participate/dex/usage/aeSwap",component:p("/participate/dex/usage/aeSwap","380"),exact:!0,sidebar:"docs"},{path:"/participate/wallet/",component:p("/participate/wallet/","8b1"),exact:!0,sidebar:"docs"},{path:"/participate/wallet/dapps-communication",component:p("/participate/wallet/dapps-communication","156"),exact:!0,sidebar:"docs"},{path:"/schema",component:p("/schema","4d2"),exact:!0,sidebar:"docs"}]},{path:"*",component:p("*")}]},68965:(e,t,n)=>{var r,a;!function(){var o,i,s,c,l,u,d,p,f,m,h,b,g,y,v,w,E,k,S,_,x,O,P,C,T,I,A,j,N,L,R=function(e){var t=new R.Builder;return t.pipeline.add(R.trimmer,R.stopWordFilter,R.stemmer),t.searchPipeline.add(R.stemmer),e.call(t,t),t.build()};R.version="2.3.9",R.utils={},R.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var c=R.utils.clone(t)||{};c.position=[i,s],c.index=a.length,a.push(new R.Token(n.slice(i,o),c))}i=o+1}}return a},R.tokenizer.separator=/[\s\-]+/,R.Pipeline=function(){this._stack=[]},R.Pipeline.registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach((function(e){var n=R.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},R.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(oe&&(n=a),o!=e);)r=n-t,a=t+Math.floor(r/2),o=this.elements[2*a];return o==e||o>e?2*a:os?l+=2:i==s&&(t+=n[c+1]*r[l+1],c+=2,l+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var o,i=a.str.charAt(0);i in a.node.edges?o=a.node.edges[i]:(o=new R.TokenSet,a.node.edges[i]=o),1==a.str.length&&(o.final=!0),r.push({node:o,editsRemaining:a.editsRemaining,str:a.str.slice(1)})}if(0!=a.editsRemaining){if("*"in a.node.edges)var s=a.node.edges["*"];else{s=new R.TokenSet;a.node.edges["*"]=s}if(0==a.str.length&&(s.final=!0),r.push({node:s,editsRemaining:a.editsRemaining-1,str:a.str}),a.str.length>1&&r.push({node:a.node,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)}),1==a.str.length&&(a.node.final=!0),a.str.length>=1){if("*"in a.node.edges)var c=a.node.edges["*"];else{c=new R.TokenSet;a.node.edges["*"]=c}1==a.str.length&&(c.final=!0),r.push({node:c,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)})}if(a.str.length>1){var l,u=a.str.charAt(0),d=a.str.charAt(1);d in a.node.edges?l=a.node.edges[d]:(l=new R.TokenSet,a.node.edges[d]=l),1==a.str.length&&(l.final=!0),r.push({node:l,editsRemaining:a.editsRemaining-1,str:u+a.str.slice(2)})}}}return n},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,n=t,r=0,a=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},R.Index.prototype.search=function(e){return this.query((function(t){new R.QueryParser(e,t).parse()}))},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),n=Object.create(null),r=Object.create(null),a=Object.create(null),o=Object.create(null),i=Object.create(null),s=0;s1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var a=0;a=this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},R.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new R.QueryParseError(n,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new R.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new R.QueryParseError(n,t.start,t.end)}switch(r.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new R.QueryParseError(n,r.start,r.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var a=e.peekLexeme();if(null==a){r="expecting term, found nothing";throw new R.QueryParseError(r,t.start,t.end)}if(a.type===R.QueryLexer.TERM)return R.QueryParser.parseTerm;r="expecting term, found '"+a.type+"'";throw new R.QueryParseError(r,a.start,a.end)}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new R.QueryParseError(r,n.start,n.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new R.QueryParseError(r,a.start,a.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new R.QueryParseError(r,a.start,a.end)}else e.nextClause()}},void 0===(a="function"==typeof(r=function(){return R})?r.call(t,n,t,e):r)||(e.exports=a)}()},98934:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,t:()=>o});var r=n(67294);const a=r.createContext(!1);function o(e){let{children:t}=e;const[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{o(!0)}),[]),r.createElement(a.Provider,{value:n},t)}},49383:(e,t,n)=>{"use strict";var r=n(67294),a=n(73935),o=n(73727),i=n(70405),s=n(10412);const c=[n(32497),n(3310),n(18320),n(52295),n(98269)];var l=n(723),u=n(16550),d=n(18790);function p(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)}var f=n(87462),m=n(35742),h=n(52263),b=n(44996),g=n(86668),y=n(1944),v=n(94711),w=n(19727),E=n(43320),k=n(90197);function S(){const{i18n:{defaultLocale:e,localeConfigs:t}}=(0,h.Z)(),n=(0,v.l)();return r.createElement(m.Z,null,Object.entries(t).map((e=>{let[t,{htmlLang:a}]=e;return r.createElement("link",{key:t,rel:"alternate",href:n.createUrl({locale:t,fullyQualified:!0}),hrefLang:a})})),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function _(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,h.Z)(),a=function(){const{siteConfig:{url:e}}=(0,h.Z)(),{pathname:t}=(0,u.TH)();return e+(0,b.Z)(t)}(),o=t?`${n}${t}`:a;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function x(){const{i18n:{currentLocale:e}}=(0,h.Z)(),{metadata:t,image:n}=(0,g.L)();return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:w.h})),n&&r.createElement(y.d,{image:n}),r.createElement(_,null),r.createElement(S,null),r.createElement(k.Z,{tag:E.HX,locale:e}),r.createElement(m.Z,null,t.map(((e,t)=>r.createElement("meta",(0,f.Z)({key:t},e))))))}const O=new Map;function P(e){if(O.has(e.pathname))return{...e,pathname:O.get(e.pathname)};if((0,d.f)(l.Z,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return O.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return O.set(e.pathname,t),{...e,pathname:t}}var C=n(98934),T=n(58940);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const A=function(e){let{children:t,location:n,previousLocation:a}=e;return(0,r.useLayoutEffect)((()=>{a!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,a=t.hash===n.hash,o=t.search===n.search;if(r&&a&&!o)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:a}),I("onRouteDidUpdate",{previousLocation:a,location:n}))}),[a,n]),t};function j(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.f)(l.Z,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class N extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.Z.canUseDOM?I("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=I("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),j(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return r.createElement(A,{previousLocation:this.previousLocation,location:t},r.createElement(u.AW,{location:t,render:()=>e}))}}const L=N,R="__docusaurus-base-url-issue-banner-container",D="__docusaurus-base-url-issue-banner",M="__docusaurus-base-url-issue-banner-suggestion-container",F="__DOCUSAURUS_INSERT_BASEURL_BANNER";function B(e){return`\nwindow['${F}'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['${F}'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('${R}');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{window[F]=!1}),[]),r.createElement(r.Fragment,null,!s.Z.canUseDOM&&r.createElement(m.Z,null,r.createElement("script",null,B(e))),r.createElement("div",{id:R}))}function U(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,h.Z)(),{pathname:n}=(0,u.TH)();return t&&n===e?r.createElement(z,null):null}function $(){const{siteConfig:{favicon:e,title:t,noIndex:n},i18n:{currentLocale:a,localeConfigs:o}}=(0,h.Z)(),i=(0,b.Z)(e),{htmlLang:s,direction:c}=o[a];return r.createElement(m.Z,null,r.createElement("html",{lang:s,dir:c}),r.createElement("title",null,t),r.createElement("meta",{property:"og:title",content:t}),r.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),n&&r.createElement("meta",{name:"robots",content:"noindex, nofollow"}),e&&r.createElement("link",{rel:"icon",href:i}))}var q=n(44763);function H(){const e=(0,d.H)(l.Z),t=(0,u.TH)();return r.createElement(q.Z,null,r.createElement(T.M,null,r.createElement(C.t,null,r.createElement(p,null,r.createElement($,null),r.createElement(x,null),r.createElement(U,null),r.createElement(L,{location:P(t)},e)))))}var Q=n(16887);const Z=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var V=n(99670);const W=new Set,G=new Set,Y=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,K={prefetch(e){if(!(e=>!Y()&&!G.has(e)&&!W.has(e))(e))return!1;W.add(e);const t=(0,d.f)(l.Z,e).flatMap((e=>{return t=e.route.path,Object.entries(Q).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,V.Z)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Z(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!Y()&&!G.has(e))(e)&&(G.add(e),j(e))},X=Object.freeze(K);if(s.Z.canUseDOM){window.docusaurus=X;const e=a.hydrate;j(window.location.pathname).then((()=>{e(r.createElement(i.B6,null,r.createElement(o.VK,null,r.createElement(H,null))),document.getElementById("__docusaurus"))}))}},58940:(e,t,n)=>{"use strict";n.d(t,{_:()=>u,M:()=>d});var r=n(67294),a=n(36809);const o=JSON.parse('{"@cmfcmf/docusaurus-search-local":{"default":{"titleBoost":5,"contentBoost":1,"parentCategoriesBoost":2,"indexDocSidebarParentCategories":0}},"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"learn/archethic-intro","docs":[{"id":"build/api/schema/directives/include","path":"/build/api/schema/directives/include","sidebar":"docs"},{"id":"build/api/schema/directives/skip","path":"/build/api/schema/directives/skip","sidebar":"docs"},{"id":"build/api/schema/enums/error-context","path":"/build/api/schema/enums/error-context","sidebar":"docs"},{"id":"build/api/schema/enums/sort-order","path":"/build/api/schema/enums/sort-order","sidebar":"docs"},{"id":"build/api/schema/objects/authorized-key","path":"/build/api/schema/objects/authorized-key","sidebar":"docs"},{"id":"build/api/schema/objects/balance","path":"/build/api/schema/objects/balance","sidebar":"docs"},{"id":"build/api/schema/objects/beacon-chain-summary","path":"/build/api/schema/objects/beacon-chain-summary","sidebar":"docs"},{"id":"build/api/schema/objects/cross-validation-stamp","path":"/build/api/schema/objects/cross-validation-stamp","sidebar":"docs"},{"id":"build/api/schema/objects/data","path":"/build/api/schema/objects/data","sidebar":"docs"},{"id":"build/api/schema/objects/endpoint","path":"/build/api/schema/objects/endpoint","sidebar":"docs"},{"id":"build/api/schema/objects/ledger","path":"/build/api/schema/objects/ledger","sidebar":"docs"},{"id":"build/api/schema/objects/ledger-operations","path":"/build/api/schema/objects/ledger-operations","sidebar":"docs"},{"id":"build/api/schema/objects/node","path":"/build/api/schema/objects/node","sidebar":"docs"},{"id":"build/api/schema/objects/oracle-data","path":"/build/api/schema/objects/oracle-data","sidebar":"docs"},{"id":"build/api/schema/objects/oracle-services","path":"/build/api/schema/objects/oracle-services","sidebar":"docs"},{"id":"build/api/schema/objects/ownership","path":"/build/api/schema/objects/ownership","sidebar":"docs"},{"id":"build/api/schema/objects/shared-secrets","path":"/build/api/schema/objects/shared-secrets","sidebar":"docs"},{"id":"build/api/schema/objects/token","path":"/build/api/schema/objects/token","sidebar":"docs"},{"id":"build/api/schema/objects/token-balance","path":"/build/api/schema/objects/token-balance","sidebar":"docs"},{"id":"build/api/schema/objects/token-ledger","path":"/build/api/schema/objects/token-ledger","sidebar":"docs"},{"id":"build/api/schema/objects/token-transfer","path":"/build/api/schema/objects/token-transfer","sidebar":"docs"},{"id":"build/api/schema/objects/transaction","path":"/build/api/schema/objects/transaction","sidebar":"docs"},{"id":"build/api/schema/objects/transaction-attestation","path":"/build/api/schema/objects/transaction-attestation","sidebar":"docs"},{"id":"build/api/schema/objects/transaction-error","path":"/build/api/schema/objects/transaction-error","sidebar":"docs"},{"id":"build/api/schema/objects/transaction-input","path":"/build/api/schema/objects/transaction-input","sidebar":"docs"},{"id":"build/api/schema/objects/transaction-movement","path":"/build/api/schema/objects/transaction-movement","sidebar":"docs"},{"id":"build/api/schema/objects/transaction-summary","path":"/build/api/schema/objects/transaction-summary","sidebar":"docs"},{"id":"build/api/schema/objects/uco-data","path":"/build/api/schema/objects/uco-data","sidebar":"docs"},{"id":"build/api/schema/objects/uco-ledger","path":"/build/api/schema/objects/uco-ledger","sidebar":"docs"},{"id":"build/api/schema/objects/uco-transfer","path":"/build/api/schema/objects/uco-transfer","sidebar":"docs"},{"id":"build/api/schema/objects/unspent-output","path":"/build/api/schema/objects/unspent-output","sidebar":"docs"},{"id":"build/api/schema/objects/validation-stamp","path":"/build/api/schema/objects/validation-stamp","sidebar":"docs"},{"id":"build/api/schema/objects/version","path":"/build/api/schema/objects/version","sidebar":"docs"},{"id":"build/api/schema/queries/balance","path":"/build/api/schema/queries/balance","sidebar":"docs"},{"id":"build/api/schema/queries/beacon-chain-summary","path":"/build/api/schema/queries/beacon-chain-summary","sidebar":"docs"},{"id":"build/api/schema/queries/genesis-address","path":"/build/api/schema/queries/genesis-address","sidebar":"docs"},{"id":"build/api/schema/queries/last-transaction","path":"/build/api/schema/queries/last-transaction","sidebar":"docs"},{"id":"build/api/schema/queries/nearest-endpoints","path":"/build/api/schema/queries/nearest-endpoints","sidebar":"docs"},{"id":"build/api/schema/queries/network-transactions","path":"/build/api/schema/queries/network-transactions","sidebar":"docs"},{"id":"build/api/schema/queries/nodes","path":"/build/api/schema/queries/nodes","sidebar":"docs"},{"id":"build/api/schema/queries/oracle-data","path":"/build/api/schema/queries/oracle-data","sidebar":"docs"},{"id":"build/api/schema/queries/shared-secrets","path":"/build/api/schema/queries/shared-secrets","sidebar":"docs"},{"id":"build/api/schema/queries/token","path":"/build/api/schema/queries/token","sidebar":"docs"},{"id":"build/api/schema/queries/transaction","path":"/build/api/schema/queries/transaction","sidebar":"docs"},{"id":"build/api/schema/queries/transaction-chain","path":"/build/api/schema/queries/transaction-chain","sidebar":"docs"},{"id":"build/api/schema/queries/transaction-inputs","path":"/build/api/schema/queries/transaction-inputs","sidebar":"docs"},{"id":"build/api/schema/queries/transactions","path":"/build/api/schema/queries/transactions","sidebar":"docs"},{"id":"build/api/schema/queries/version","path":"/build/api/schema/queries/version","sidebar":"docs"},{"id":"build/api/schema/scalars/address","path":"/build/api/schema/scalars/address","sidebar":"docs"},{"id":"build/api/schema/scalars/boolean","path":"/build/api/schema/scalars/boolean","sidebar":"docs"},{"id":"build/api/schema/scalars/content","path":"/build/api/schema/scalars/content","sidebar":"docs"},{"id":"build/api/schema/scalars/float","path":"/build/api/schema/scalars/float","sidebar":"docs"},{"id":"build/api/schema/scalars/hash","path":"/build/api/schema/scalars/hash","sidebar":"docs"},{"id":"build/api/schema/scalars/hex","path":"/build/api/schema/scalars/hex","sidebar":"docs"},{"id":"build/api/schema/scalars/int","path":"/build/api/schema/scalars/int","sidebar":"docs"},{"id":"build/api/schema/scalars/non-neg-integer","path":"/build/api/schema/scalars/non-neg-integer","sidebar":"docs"},{"id":"build/api/schema/scalars/p2-p-availabilities","path":"/build/api/schema/scalars/p2-p-availabilities","sidebar":"docs"},{"id":"build/api/schema/scalars/pos-integer","path":"/build/api/schema/scalars/pos-integer","sidebar":"docs"},{"id":"build/api/schema/scalars/public-key","path":"/build/api/schema/scalars/public-key","sidebar":"docs"},{"id":"build/api/schema/scalars/string","path":"/build/api/schema/scalars/string","sidebar":"docs"},{"id":"build/api/schema/scalars/timestamp","path":"/build/api/schema/scalars/timestamp","sidebar":"docs"},{"id":"build/api/schema/scalars/token-properties","path":"/build/api/schema/scalars/token-properties","sidebar":"docs"},{"id":"build/api/schema/scalars/transaction-type","path":"/build/api/schema/scalars/transaction-type","sidebar":"docs"},{"id":"build/api/schema/schema","path":"/schema","sidebar":"docs"},{"id":"build/api/schema/subscriptions/oracle-update","path":"/build/api/schema/subscriptions/oracle-update","sidebar":"docs"},{"id":"build/api/schema/subscriptions/transaction-confirmed","path":"/build/api/schema/subscriptions/transaction-confirmed","sidebar":"docs"},{"id":"build/api/schema/subscriptions/transaction-error","path":"/build/api/schema/subscriptions/transaction-error","sidebar":"docs"},{"id":"build/clients/ledger-wallet/api","path":"/build/clients/ledger-wallet/api","sidebar":"docs"},{"id":"build/clients/ledger-wallet/commands","path":"/build/clients/ledger-wallet/commands","sidebar":"docs"},{"id":"build/clients/ledger-wallet/ledger-wallet","path":"/build/clients/ledger-wallet/","sidebar":"docs"},{"id":"build/clients/wallet-access","path":"/build/clients/wallet-access","sidebar":"docs"},{"id":"build/clients/wallet-spec","path":"/build/clients/wallet-spec","sidebar":"docs"},{"id":"build/core/account","path":"/build/core/account","sidebar":"docs"},{"id":"build/core/beacon-chain/beacon-chain","path":"/build/core/beacon-chain/","sidebar":"docs"},{"id":"build/core/beacon-chain/p2p-sampling","path":"/build/core/beacon-chain/p2p-sampling","sidebar":"docs"},{"id":"build/core/bootstrap","path":"/build/core/bootstrap","sidebar":"docs"},{"id":"build/core/core","path":"/build/core/","sidebar":"docs"},{"id":"build/core/cryptography/cryptography","path":"/build/core/cryptography/","sidebar":"docs"},{"id":"build/core/cryptography/tpm","path":"/build/core/cryptography/tpm","sidebar":"docs"},{"id":"build/core/cryptography/yubikey","path":"/build/core/cryptography/yubikey","sidebar":"docs"},{"id":"build/core/database","path":"/build/core/database","sidebar":"docs"},{"id":"build/core/election","path":"/build/core/election","sidebar":"docs"},{"id":"build/core/governance/code-proposals","path":"/build/core/governance/code-proposals","sidebar":"docs"},{"id":"build/core/governance/code-proposals-cd","path":"/build/core/governance/code-proposals-cd","sidebar":"docs"},{"id":"build/core/governance/code-proposals-ci","path":"/build/core/governance/code-proposals-ci","sidebar":"docs"},{"id":"build/core/mining/mining","path":"/build/core/mining/","sidebar":"docs"},{"id":"build/core/mining/proof-of-work","path":"/build/core/mining/proof-of-work","sidebar":"docs"},{"id":"build/core/mining/transaction-context","path":"/build/core/mining/transaction-context","sidebar":"docs"},{"id":"build/core/mining/transaction-validation","path":"/build/core/mining/transaction-validation","sidebar":"docs"},{"id":"build/core/oracle-chain/memory-table","path":"/build/core/oracle-chain/memory-table","sidebar":"docs"},{"id":"build/core/oracle-chain/oracle-chain","path":"/build/core/oracle-chain/","sidebar":"docs"},{"id":"build/core/oracle-chain/scheduler","path":"/build/core/oracle-chain/scheduler","sidebar":"docs"},{"id":"build/core/oracle-chain/service","path":"/build/core/oracle-chain/service","sidebar":"docs"},{"id":"build/core/p2p/messaging","path":"/build/core/p2p/messaging","sidebar":"docs"},{"id":"build/core/p2p/node","path":"/build/core/p2p/node","sidebar":"docs"},{"id":"build/core/p2p/p2p","path":"/build/core/p2p/","sidebar":"docs"},{"id":"build/sdk/dart","path":"/build/sdk/dart","sidebar":"docs"},{"id":"build/sdk/go","path":"/build/sdk/go","sidebar":"docs"},{"id":"build/sdk/js","path":"/build/sdk/js","sidebar":"docs"},{"id":"build/sdk/sdk","path":"/build/sdk/","sidebar":"docs"},{"id":"build/smart-contracts/fees","path":"/build/smart-contracts/fees","sidebar":"docs"},{"id":"build/smart-contracts/language/actions","path":"/build/smart-contracts/language/actions","sidebar":"docs"},{"id":"build/smart-contracts/language/condition","path":"/build/smart-contracts/language/condition","sidebar":"docs"},{"id":"build/smart-contracts/language/examples","path":"/build/smart-contracts/language/examples","sidebar":"docs"},{"id":"build/smart-contracts/language/language","path":"/build/smart-contracts/language/","sidebar":"docs"},{"id":"build/smart-contracts/language/legacy/examples","path":"/build/smart-contracts/language/legacy/examples","sidebar":"docs"},{"id":"build/smart-contracts/language/legacy/language","path":"/build/smart-contracts/language/legacy/language","sidebar":"docs"},{"id":"build/smart-contracts/language/legacy/smart-contracts","path":"/build/smart-contracts/language/legacy/","sidebar":"docs"},{"id":"build/smart-contracts/language/library","path":"/build/smart-contracts/language/library","sidebar":"docs"},{"id":"build/smart-contracts/language/triggers","path":"/build/smart-contracts/language/triggers","sidebar":"docs"},{"id":"build/smart-contracts/playground/build","path":"/build/smart-contracts/playground/build","sidebar":"docs"},{"id":"build/smart-contracts/playground/deploy","path":"/build/smart-contracts/playground/deploy","sidebar":"docs"},{"id":"build/smart-contracts/playground/functions","path":"/build/smart-contracts/playground/functions","sidebar":"docs"},{"id":"build/smart-contracts/playground/mock-form","path":"/build/smart-contracts/playground/mock-form","sidebar":"docs"},{"id":"build/smart-contracts/playground/sc-playground","path":"/build/smart-contracts/playground/","sidebar":"docs"},{"id":"build/smart-contracts/playground/transaction-form","path":"/build/smart-contracts/playground/transaction-form","sidebar":"docs"},{"id":"build/smart-contracts/smart-contracts","path":"/build/smart-contracts/","sidebar":"docs"},{"id":"build/testnet","path":"/build/testnet","sidebar":"docs"},{"id":"contributing","path":"/contributing","sidebar":"docs"},{"id":"FAQ/aeweb","path":"/FAQ/aeweb","sidebar":"docs"},{"id":"FAQ/bridge","path":"/FAQ/bridge","sidebar":"docs"},{"id":"FAQ/bridge-2-ways","path":"/FAQ/bridge-2-ways","sidebar":"docs"},{"id":"FAQ/wallet","path":"/FAQ/wallet","sidebar":"docs"},{"id":"learn/arch-consensus/arch-consensus","path":"/learn/arch-consensus/","sidebar":"docs"},{"id":"learn/arch-consensus/proof-of-work","path":"/learn/arch-consensus/proof-of-work","sidebar":"docs"},{"id":"learn/archethic-intro","path":"/learn/","sidebar":"docs"},{"id":"learn/cryptography/cryptography","path":"/learn/cryptography/","sidebar":"docs"},{"id":"learn/cryptography/hardware-root-of-trust","path":"/learn/cryptography/hardware-root-of-trust","sidebar":"docs"},{"id":"learn/decentralized-id/decentralized-id","path":"/learn/decentralized-id/","sidebar":"docs"},{"id":"learn/decentralized-id/keychain","path":"/learn/decentralized-id/keychain","sidebar":"docs"},{"id":"learn/ecosystem","path":"/learn/ecosystem","sidebar":"docs"},{"id":"learn/fee","path":"/learn/fee","sidebar":"docs"},{"id":"learn/governance/governance","path":"/learn/governance/","sidebar":"docs"},{"id":"learn/oracle-chain","path":"/learn/oracle-chain","sidebar":"docs"},{"id":"learn/p2p/bootstrapping","path":"/learn/p2p/bootstrapping","sidebar":"docs"},{"id":"learn/p2p/p2p","path":"/learn/p2p/","sidebar":"docs"},{"id":"learn/p2p/self-repair","path":"/learn/p2p/self-repair","sidebar":"docs"},{"id":"learn/patents","path":"/learn/patents","sidebar":"docs"},{"id":"learn/sharding/beacon-chain/beacon-chain","path":"/learn/sharding/beacon-chain/","sidebar":"docs"},{"id":"learn/sharding/beacon-chain/explorer","path":"/learn/sharding/beacon-chain/explorer","sidebar":"docs"},{"id":"learn/sharding/replication-attestation","path":"/learn/sharding/replication-attestation","sidebar":"docs"},{"id":"learn/sharding/sharding","path":"/learn/sharding/","sidebar":"docs"},{"id":"learn/token","path":"/learn/token","sidebar":"docs"},{"id":"learn/transaction-chain","path":"/learn/transaction-chain","sidebar":"docs"},{"id":"learn/transaction-types","path":"/learn/transaction-types","sidebar":"docs"},{"id":"learn/uco","path":"/learn/uco","sidebar":"docs"},{"id":"participate/aeweb/aeweb","path":"/participate/aeweb/","sidebar":"docs"},{"id":"participate/aeweb/automation","path":"/participate/aeweb/automation","sidebar":"docs"},{"id":"participate/aeweb/dns","path":"/participate/aeweb/dns","sidebar":"docs"},{"id":"participate/aeweb/how-it-works","path":"/participate/aeweb/how-it-works","sidebar":"docs"},{"id":"participate/aeweb/usage/aeweb-front","path":"/participate/aeweb/usage/aeweb-front","sidebar":"docs"},{"id":"participate/aeweb/usage/cli","path":"/participate/aeweb/usage/cli","sidebar":"docs"},{"id":"participate/bridge/bridge","path":"/participate/bridge/","sidebar":"docs"},{"id":"participate/bridge/usage/bridge-front","path":"/participate/bridge/usage/bridge-front","sidebar":"docs"},{"id":"participate/cli/archethic-cli","path":"/participate/cli/","sidebar":"docs"},{"id":"participate/dex/dex","path":"/participate/dex/","sidebar":"docs"},{"id":"participate/dex/usage/aeSwap","path":"/participate/dex/usage/aeSwap","sidebar":"docs"},{"id":"participate/wallet/archethic-wallet","path":"/participate/wallet/","sidebar":"docs"},{"id":"participate/wallet/dapps-communication","path":"/participate/wallet/dapps-communication","sidebar":"docs"},{"id":"/category/participate","path":"/category/participate","sidebar":"docs"},{"id":"/category/usage","path":"/category/usage","sidebar":"docs"},{"id":"/category/usage-1","path":"/category/usage-1","sidebar":"docs"},{"id":"/category/usage-2","path":"/category/usage-2","sidebar":"docs"},{"id":"/category/build","path":"/category/build","sidebar":"docs"},{"id":"/category/clients","path":"/category/clients","sidebar":"docs"},{"id":"/category/api","path":"/category/api","sidebar":"docs"},{"id":"/category/graphql","path":"/category/graphql","sidebar":"docs"},{"id":"/category/faq","path":"/category/faq","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/learn/","label":"Learn"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(57529);const c=JSON.parse('{"docusaurusVersion":"2.4.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.4.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.4.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.4.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.4.1"},"@cmfcmf/docusaurus-search-local":{"type":"package","name":"@cmfcmf/docusaurus-search-local","version":"0.10.0"},"docusaurus-graphql-doc-generator":{"type":"package","name":"@graphql-markdown/docusaurus","version":"1.19.0"},"docusaurus-plugin-image-zoom":{"type":"package","name":"plugin-image-zoom","version":"1.1.0"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"2.4.1"}}}'),l={siteConfig:a.default,siteMetadata:c,globalData:o,i18n:i,codeTranslations:s},u=r.createContext(l);function d(e){let{children:t}=e;return r.createElement(u.Provider,{value:l},t)}},44763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(67294),a=n(10412),o=n(35742),i=n(18780),s=n(50254);function c(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"}},r.createElement("h1",{style:{fontSize:"3rem"}},"This page crashed"),r.createElement("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"}},"Try again"),r.createElement(l,{error:t}))}function l(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return r.createElement("p",{style:{whiteSpace:"pre-wrap"}},n)}function u(e){let{error:t,tryAgain:n}=e;return r.createElement(p,{fallback:()=>r.createElement(c,{error:t,tryAgain:n})},r.createElement(o.Z,null,r.createElement("title",null,"Page Error")),r.createElement(s.Z,null,r.createElement(c,{error:t,tryAgain:n})))}const d=e=>r.createElement(u,e);class p extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.Z.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??d)(e)}return e??null}}},10412:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},35742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(67294),a=n(70405);function o(e){return r.createElement(a.ql,e)}},39960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(87462),a=n(67294),o=n(73727),i=n(18780),s=n(52263),c=n(13919),l=n(10412);const u=a.createContext({collectLink:()=>{}});var d=n(44996);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:m,isActive:h,"data-noBrokenLinkCheck":b,autoAddBaseUrl:g=!0,...y}=e;const{siteConfig:{trailingSlash:v,baseUrl:w}}=(0,s.Z)(),{withBaseUrl:E}=(0,d.C)(),k=(0,a.useContext)(u),S=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(()=>S.current));const _=p||f;const x=(0,c.Z)(_),O=_?.replace("pathname://","");let P=void 0!==O?(C=O,g&&(e=>e.startsWith("/"))(C)?E(C):C):void 0;var C;P&&x&&(P=(0,i.applyTrailingSlash)(P,{trailingSlash:v,baseUrl:w}));const T=(0,a.useRef)(!1),I=n?o.OL:o.rU,A=l.Z.canUseIntersectionObserver,j=(0,a.useRef)(),N=()=>{T.current||null==P||(window.docusaurus.preload(P),T.current=!0)};(0,a.useEffect)((()=>(!A&&x&&null!=P&&window.docusaurus.prefetch(P),()=>{A&&j.current&&j.current.disconnect()})),[j,P,A,x]);const L=P?.startsWith("#")??!1,R=!P||!x||L;return R||b||k.collectLink(P),R?a.createElement("a",(0,r.Z)({ref:S,href:P},_&&!x&&{target:"_blank",rel:"noopener noreferrer"},y)):a.createElement(I,(0,r.Z)({},y,{onMouseEnter:N,onTouchStart:N,innerRef:e=>{S.current=e,A&&e&&x&&(j.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(j.current.unobserve(e),j.current.disconnect(),null!=P&&window.docusaurus.prefetch(P))}))})),j.current.observe(e))},to:P},n&&{isActive:h,activeClassName:m}))}const f=a.forwardRef(p)},95999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c,I:()=>s});var r=n(67294);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var o=n(57529);function i(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return o[t??n]??n??t}function s(e,t){let{message:n,id:r}=e;return a(i({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:o}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const s=i({message:t,id:n});return r.createElement(r.Fragment,null,a(s,o))}},29935:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});const r="default"},13919:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>a,b:()=>r})},44996:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,Z:()=>s});var r=n(67294),a=n(52263),o=n(13919);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,a.Z)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:a=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,o.b)(n))return n;if(a)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const s=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+s:s}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},52263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(67294),a=n(58940);function o(){return(0,r.useContext)(a._)}},28084:(e,t,n)=>{"use strict";n.d(t,{OD:()=>o,eZ:()=>i});var r=n(52263),a=n(29935);function o(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,r.Z)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}function i(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});const r=o(e),i=r?.[t];if(!i&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return i}},72389:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(67294),a=n(98934);function o(){return(0,r.useContext)(a._)}},99670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const s=a?`${a}.${o}`:o;r(i)?e(i,s):t[s]=i}))}(e),t}},30226:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,z:()=>o});var r=n(67294);const a=r.createContext(null);function o(e){let{children:t,value:n}=e;const o=r.useContext(a),i=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:o,value:n})),[o,n]);return r.createElement(a.Provider,{value:i},t)}},94104:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>h,gA:()=>d,WS:()=>p,_r:()=>l,Jo:()=>b,zh:()=>u,yW:()=>m,gB:()=>f});var r=n(16550),a=n(28084);const o=e=>e.versions.find((e=>e.isLast));function i(e,t){const n=o(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}function s(e,t){const n=i(e,t),a=n?.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const c={},l=()=>(0,a.OD)("docusaurus-plugin-content-docs")??c,u=e=>(0,a.eZ)("docusaurus-plugin-content-docs",e,{failfast:!0});function d(e){void 0===e&&(e={});const t=l(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function p(e){void 0===e&&(e={});const t=d(e),{pathname:n}=(0,r.TH)();if(!t)return;return{activePlugin:t,activeVersion:i(t.pluginData,n)}}function f(e){return u(e).versions}function m(e){const t=u(e);return o(t)}function h(e){const t=u(e),{pathname:n}=(0,r.TH)();return s(t,n)}function b(e){const t=u(e),{pathname:n}=(0,r.TH)();return function(e,t){const n=o(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},18320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(74865),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},3310:(e,t,n)=>{"use strict";n.r(t);var r=n(87410),a=n(36809);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{n(57461)(`./prism-${e}`)})),delete globalThis.Prism}(r.Z)},39471:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(67294);const a={iconExternalLink:"iconExternalLink_nPIU"};function o(e){let{width:t=13.5,height:n=13.5}=e;return r.createElement("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:a.iconExternalLink},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},50254:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ii});var r=n(67294),a=n(86010),o=n(44763),i=n(1944),s=n(87462),c=n(16550),l=n(95999),u=n(85936);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,c.k6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,u.S)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const m=(0,l.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){const t=e.children??m,{containerRef:n,onClick:a}=f();return r.createElement("div",{ref:n,role:"region","aria-label":m},r.createElement("a",(0,s.Z)({},e,{href:`#${d}`,onClick:a}),t))}var b=n(35281),g=n(19727);const y={skipToContent:"skipToContent_fXgn"};function v(){return r.createElement(h,{className:y.skipToContent})}var w=n(86668),E=n(59689);function k(e){let{width:t=21,height:n=21,color:a="currentColor",strokeWidth:o=1.2,className:i,...c}=e;return r.createElement("svg",(0,s.Z)({viewBox:"0 0 15 15",width:t,height:n},c),r.createElement("g",{stroke:a,strokeWidth:o},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const S={closeButton:"closeButton_CVFx"};function _(e){return r.createElement("button",(0,s.Z)({type:"button","aria-label":(0,l.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.Z)("clean-btn close",S.closeButton,e.className)}),r.createElement(k,{width:14,height:14,strokeWidth:3.1}))}const x={content:"content_knG7"};function O(e){const{announcementBar:t}=(0,w.L)(),{content:n}=t;return r.createElement("div",(0,s.Z)({},e,{className:(0,a.Z)(x.content,e.className),dangerouslySetInnerHTML:{__html:n}}))}const P={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function C(){const{announcementBar:e}=(0,w.L)(),{isActive:t,close:n}=(0,E.nT)();if(!t)return null;const{backgroundColor:a,textColor:o,isCloseable:i}=e;return r.createElement("div",{className:P.announcementBar,style:{backgroundColor:a,color:o},role:"banner"},i&&r.createElement("div",{className:P.announcementBarPlaceholder}),r.createElement(O,{className:P.announcementBarContent}),i&&r.createElement(_,{onClick:n,className:P.announcementBarClose}))}var T=n(93163),I=n(12466);var A=n(902),j=n(13102);const N=r.createContext(null);function L(e){let{children:t}=e;const n=function(){const e=(0,T.e)(),t=(0,j.HY)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,A.D9)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return r.createElement(N.Provider,{value:n},t)}function R(e){if(e.component){const t=e.component;return r.createElement(t,e.props)}}function D(){const e=(0,r.useContext)(N);if(!e)throw new A.i6("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,j.HY)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:R(o)})),[a,o,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:o}=e;const{shown:i}=D();return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var F=n(92949),B=n(72389);function z(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function U(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const $={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){let{className:t,buttonClassName:n,value:o,onChange:i}=e;const s=(0,B.Z)(),c=(0,l.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===o?(0,l.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)($.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",$.toggleButton,!s&&$.toggleButtonDisabled,n),type:"button",onClick:()=>i("dark"===o?"light":"dark"),disabled:!s,title:c,"aria-label":c,"aria-live":"polite"},r.createElement(z,{className:(0,a.Z)($.toggleIcon,$.lightToggleIcon)}),r.createElement(U,{className:(0,a.Z)($.toggleIcon,$.darkToggleIcon)})))}const H=r.memo(q),Q={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function Z(e){let{className:t}=e;const n=(0,w.L)().navbar.style,a=(0,w.L)().colorMode.disableSwitch,{colorMode:o,setColorMode:i}=(0,F.I)();return a?null:r.createElement(H,{className:t,buttonClassName:"dark"===n?Q.darkNavbarColorModeToggle:void 0,value:o,onChange:i})}var V=n(21327);function W(){return r.createElement(V.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function G(){const e=(0,T.e)();return r.createElement("button",{type:"button","aria-label":(0,l.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle()},r.createElement(k,{color:"var(--ifm-color-emphasis-600)"}))}function Y(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(W,null),r.createElement(Z,{className:"margin-right--md"}),r.createElement(G,null))}var K=n(39960),X=n(44996),J=n(13919);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(39471);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:a,href:o,label:i,html:c,isDropdownLink:l,prependBaseUrlToHref:u,...d}=e;const p=(0,X.Z)(a),f=(0,X.Z)(t),m=(0,X.Z)(o,{forcePrependBaseUrl:!0}),h=i&&o&&!(0,J.Z)(o),b=c?{dangerouslySetInnerHTML:{__html:c}}:{children:r.createElement(r.Fragment,null,i,h&&r.createElement(te.Z,l&&{width:12,height:12}))};return o?r.createElement(K.Z,(0,s.Z)({href:u?m:o},d,b)):r.createElement(K.Z,(0,s.Z)({to:p,isNavLink:!0},(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(f)},d,b))}function re(e){let{className:t,isDropdownItem:n=!1,...o}=e;const i=r.createElement(ne,(0,s.Z)({className:(0,a.Z)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n},o));return n?r.createElement("li",null,i):i}function ae(e){let{className:t,isDropdownItem:n,...o}=e;return r.createElement("li",{className:"menu__list-item"},r.createElement(ne,(0,s.Z)({className:(0,a.Z)("menu__link",t)},o)))}function oe(e){let{mobile:t=!1,position:n,...a}=e;const o=t?ae:re;return r.createElement(o,(0,s.Z)({},a,{activeClassName:a.activeClassName??(t?"menu__link--active":"navbar__link--active")}))}var ie=n(86043),se=n(48596),ce=n(52263);function le(e,t){return e.some((e=>function(e,t){return!!(0,se.Mg)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function ue(e){let{items:t,position:n,className:o,onClick:i,...c}=e;const l=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),r.createElement("div",{ref:l,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":u})},r.createElement(ne,(0,s.Z)({"aria-haspopup":"true","aria-expanded":u,role:"button",href:c.to?void 0:"#",className:(0,a.Z)("navbar__link",o)},c,{onClick:c.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!u))}}),c.children??c.label),r.createElement("ul",{className:"dropdown__menu"},t.map(((e,t)=>r.createElement(vo,(0,s.Z)({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))))))}function de(e){let{items:t,className:n,position:o,onClick:i,...l}=e;const u=function(){const{siteConfig:{baseUrl:e}}=(0,ce.Z)(),{pathname:t}=(0,c.TH)();return t.replace(e,"/")}(),d=le(t,u),{collapsed:p,toggleCollapsed:f,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[u,d,m]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":p})},r.createElement(ne,(0,s.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",n)},l,{onClick:e=>{e.preventDefault(),f()}}),l.children??l.label),r.createElement(ie.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:p},t.map(((e,t)=>r.createElement(vo,(0,s.Z)({mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active"},e,{key:t}))))))}function pe(e){let{mobile:t=!1,...n}=e;const a=t?de:ue;return r.createElement(a,n)}var fe=n(94711);function me(e){let{width:t=20,height:n=20,...a}=e;return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0},a),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const he="iconLanguage_nlXk";var be=n(73935);function ge(e,t){var n=void 0;return function(){for(var r=arguments.length,a=new Array(r),o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10}(e);function n(n,r,a){if(t&&void 0!==a){var o=a[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":o.appId,"X-Algolia-API-Key":o.apiKey};e.apply(void 0,[n].concat(Ce(r),[{headers:i}]))}else e.apply(void 0,[n].concat(Ce(r)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("clickedObjectIDsAfterSearch",Le(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("clickedObjectIDs",Le(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("convertedObjectIDsAfterSearch",Le(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("convertedObjectIDs",Le(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var n=t.items,r=Ie(t,Oe);return[].concat(Ce(e),Ce(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function De(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function Me(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function Fe(e){return Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(e)}function Be(e){return function(e){if(Array.isArray(e))return ze(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ze(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&Ze({onItemsChange:r,items:n,insights:s,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;i("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:s}}),n((function(e){var t=e.item,n=e.state,r=e.event,o=e.source;Me(t)&&a({state:n,event:r,insights:s,item:t,insightsEvents:[$e({eventName:"Item Selected"},ke({item:t,items:o.getItems().filter(Me)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,a=e.event;Me(t)&&o({state:r,event:a,insights:s,item:t,insightsEvents:[$e({eventName:"Item Active"},ke({item:t,items:n.getItems().filter(Me)}))]})}))},onStateChange:function(e){var t=e.state;l({state:t})},__autocomplete_pluginOptions:e}}function We(e){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},We(e)}function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ye(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==We(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==We(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===We(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ke(e,t,n){var r,a=t.initialState;return{getState:function(){return a},dispatch:function(r,o){var i=function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:ot(),plugins:a,initialState:mt({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(dt(a.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:Ee,onResolve:Ee};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=st(st({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return Xe(e)})).then((function(e){return e.map((function(e){return mt(mt({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:mt({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function gt(e){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gt(e)}function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var $t,qt,Ht,Qt=null,Zt=($t=-1,qt=-1,Ht=void 0,function(e){var t=++$t;return Promise.resolve(e).then((function(e){return Ht&&t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var en=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function tn(e){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(e)}var nn=["props","refresh","store"],rn=["inputElement","formElement","panelElement"],an=["inputElement"],on=["inputElement","maxLength"],sn=["sourceIndex"],cn=["sourceIndex"],ln=["item","source","sourceIndex"];function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dn(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function mn(e){var t=e.props,n=e.refresh,r=e.store,a=fn(e,nn),o=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var n=e.inputElement,a=e.formElement,o=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[a,o].some((function(t){return n=t,r=e.target,n===r||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return dn({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},fn(e,rn))},getRootProps:function(e){return dn({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return dn({action:"",noValidate:!0,role:"search",onSubmit:function(o){var i;o.preventDefault(),t.onSubmit(dn({event:o,refresh:n,state:r.getState()},a)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(o){var i;o.preventDefault(),t.onReset(dn({event:o,refresh:n,state:r.getState()},a)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},fn(e,an))},getLabelProps:function(e){var n=e||{},r=n.sourceIndex,a=fn(n,sn);return dn({htmlFor:"".concat(o(t.id,r),"-input"),id:"".concat(o(t.id,r),"-label")},a)},getInputProps:function(e){var o;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&Vt(dn({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},a)),r.dispatch("focus",null)}var s=e||{},c=(s.inputElement,s.maxLength),l=void 0===c?512:c,u=fn(s,on),d=Rt(r.getState()),p=function(e){return Boolean(e&&e.match(en))}((null===(o=t.environment.navigator)||void 0===o?void 0:o.userAgent)||""),f=null!=d&&d.itemUrl&&!p?"go":"search";return dn({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:f,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:l,type:"search",onChange:function(e){Vt(dn({event:e,props:t,query:e.currentTarget.value.slice(0,l),refresh:n,store:r},a))},onKeyDown:function(e){!function(e){var t=e.event,n=e.props,r=e.refresh,a=e.store,o=Jt(e,Gt);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=n.environment.document.getElementById("".concat(n.id,"-item-").concat(a.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},s=function(){var e=Rt(a.getState());if(null!==a.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,s=e.itemUrl,c=e.source;c.onActive(Kt({event:t,item:n,itemInputValue:i,itemUrl:s,refresh:r,source:c,state:a.getState()},o))}};t.preventDefault(),!1===a.getState().isOpen&&(n.openOnFocus||Boolean(a.getState().query))?Vt(Kt({event:t,props:n,query:a.getState().query,refresh:r,store:a},o)).then((function(){a.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(i,0)})):(a.dispatch(t.key,{}),s(),i())}else if("Escape"===t.key)t.preventDefault(),a.dispatch(t.key,null),a.pendingRequests.cancelAll();else if("Tab"===t.key)a.dispatch("blur",null),a.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===a.getState().activeItemId||a.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||a.pendingRequests.cancelAll());t.preventDefault();var c=Rt(a.getState()),l=c.item,u=c.itemInputValue,d=c.itemUrl,p=c.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(Kt({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:a.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(Kt({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:a.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(Kt({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),void n.navigator.navigate({itemUrl:d,item:l,state:a.getState()});Vt(Kt({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:a},o)).then((function(){p.onSelect(Kt({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o))}))}}}(dn({event:e,props:t,refresh:n,store:r},a))},onFocus:i,onBlur:Ee,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},u)},getPanelProps:function(e){return dn({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.sourceIndex,a=fn(n,cn);return dn({role:"listbox","aria-labelledby":"".concat(o(t.id,r),"-label"),id:"".concat(o(t.id,r),"-list")},a)},getItemProps:function(e){var i=e.item,s=e.source,c=e.sourceIndex,l=fn(e,ln);return dn({id:"".concat(o(t.id,c),"-item-").concat(i.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(e){if(i.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",i.__autocomplete_id);var t=Rt(r.getState());if(null!==r.getState().activeItemId&&t){var o=t.item,s=t.itemInputValue,c=t.itemUrl,l=t.source;l.onActive(dn({event:e,item:o,itemInputValue:s,itemUrl:c,refresh:n,source:l,state:r.getState()},a))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var o=s.getItemInputValue({item:i,state:r.getState()}),c=s.getItemUrl({item:i,state:r.getState()});(c?Promise.resolve():Vt(dn({event:e,nextState:{isOpen:!1},props:t,query:o,refresh:n,store:r},a))).then((function(){s.onSelect(dn({event:e,item:i,itemInputValue:o,itemUrl:c,refresh:n,source:s,state:r.getState()},a))}))}},l)}}}var hn="1.9.4",bn=[{segment:"autocomplete-core",version:hn}];function gn(e){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(e)}function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t=n?null===r?null:0:a}function _n(e){return _n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_n(e)}function xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function On(e){for(var t=1;t=5&&((a||!e&&5===r)&&(i.push(r,0,a,n),r=6),e&&(i.push(r,e,0,n),r=6)),a=""},c=0;c"===t?(r=1,a=""):a=t+a[0]:o?t===o?o="":a+=t:'"'===t||"'"===t?o=t:">"===t?(s(),r=1):r&&("="===t?(r=5,n=a,a=""):"/"===t&&(r<5||">"===e[c][l+1])?(s(),3===r&&(i=i[0]),r=i,(i=i[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),r=2):a+=t),3===r&&"!--"===a&&(r=4,i=i[0])}return s(),i}(e)),t),arguments,[])).length>1?t:t[0]}var Mn=function(e){var t=e.environment,n=t.document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("class","aa-SubmitIcon"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("fill","currentColor");var r=t.document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d","M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"),n.appendChild(r),n},Fn=function(e){var t=e.environment,n=t.document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("class","aa-ClearIcon"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("fill","currentColor");var r=t.document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d","M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"),n.appendChild(r),n},Bn=function(e){var t=e.environment.document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("class","aa-LoadingIcon"),t.setAttribute("viewBox","0 0 100 100"),t.setAttribute("width","20"),t.setAttribute("height","20"),t.innerHTML='\n \n',t},zn=["ontouchstart","ontouchend","ontouchmove","ontouchcancel"];function Un(e,t,n){e[t]=null===n?"":"number"!=typeof n?n:n+"px"}function $n(e){this._listeners[e.type](e)}function qn(e,t,n){var r,a,o=e[t];if("style"===t)if("string"==typeof n)e.style=n;else if(null===n)e.style="";else for(t in n)o&&n[t]===o[t]||Un(e.style,t,n[t]);else"o"===t[0]&&"n"===t[1]?(r=t!==(t=t.replace(/Capture$/,"")),((a=t.toLowerCase())in e||zn.includes(a))&&(t=a),t=t.slice(2),e._listeners||(e._listeners={}),e._listeners[t]=n,n?o||e.addEventListener(t,$n,r):e.removeEventListener(t,$n,r)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&"download"!==t&&"href"!==t&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function Hn(e){return"onChange"===e?"onInput":e}function Qn(e,t){for(var n in t)qn(e,Hn(n),t[n])}function Zn(e,t){for(var n in t)"o"===n[0]&&"n"===n[1]||qn(e,Hn(n),t[n])}var Vn=["children"];function Wn(e){return function(e){if(Array.isArray(e))return Gn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Kn(e){return function(t,n){var r=n.children,a=void 0===r?[]:r,o=Yn(n,Vn),i=e.document.createElement(t);return Qn(i,o),i.append.apply(i,Wn(a)),i}}function Xn(e){return Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xn(e)}var Jn=["autocompleteScopeApi","environment","classNames","getInputProps","getInputPropsCore","isDetached","state"];function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ar=function(e){var t=e.autocompleteScopeApi,n=e.environment,r=(e.classNames,e.getInputProps),a=e.getInputPropsCore,o=e.isDetached,i=e.state,s=rr(e,Jn),c=Kn(n)("input",s),l=r(tr({state:i,props:a({inputElement:c}),inputElement:c},t));return Qn(c,tr(tr({},l),{},{onKeyDown:function(e){o&&"Tab"===e.key||l.onKeyDown(e)}})),c};function or(e){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(e)}function ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sr(e){for(var t=1;t2&&(i.children=arguments.length>3?lr.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===i[o]&&(i[o]=e.defaultProps[o]);return Sr(e,i,r,a,null)}function Sr(e,t,n,r,a){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++dr:a};return null==a&&null!=ur.vnode&&ur.vnode(o),o}function _r(e){return e.children}function xr(e,t){this.props=e,this.context=t}function Or(e,t){if(null==t)return e.__?Or(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&pr.sort(hr));Tr.__r=0}function Ir(e,t,n,r,a,o,i,s,c,l){var u,d,p,f,m,h,b,g=r&&r.__k||gr,y=g.length;for(n.__k=[],u=0;u0?Sr(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(p=g[u])||p&&f.key==p.key&&f.type===p.type)g[u]=void 0;else for(d=0;d=0;t--)if((n=e.__k[t])&&(r=Nr(n)))return r;return null}function Lr(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||yr.test(t)?n:n+"px"}function Rr(e,t,n,r,a){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Lr(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Lr(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Mr:Dr,o):e.removeEventListener(t,o?Mr:Dr,o);else if("dangerouslySetInnerHTML"!==t){if(a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Dr(e){return this.l[e.type+!1](ur.event?ur.event(e):e)}function Mr(e){return this.l[e.type+!0](ur.event?ur.event(e):e)}function Fr(e,t,n,r,a,o,i,s,c){var l,u,d,p,f,m,h,b,g,y,v,w,E,k,S,_=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(c=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(l=ur.__b)&&l(t);try{e:if("function"==typeof _){if(b=t.props,g=(l=_.contextType)&&r[l.__c],y=l?g?g.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:("prototype"in _&&_.prototype.render?t.__c=u=new _(b,y):(t.__c=u=new xr(b,y),u.constructor=_,u.render=qr),g&&g.sub(u),u.props=b,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=_.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=wr({},u.__s)),wr(u.__s,_.getDerivedStateFromProps(b,u.__s))),p=u.props,f=u.state,u.__v=t,d)null==_.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==_.getDerivedStateFromProps&&b!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(b,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(b,u.__s,y)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=b,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),v=0;v0&&void 0!==arguments[0]?arguments[0]:[];return{get:function(){return e},add:function(t){var n=e[e.length-1];(null==n?void 0:n.isHighlighted)===t.isHighlighted?e[e.length-1]={value:n.value+t.value,isHighlighted:n.isHighlighted}:e.push(t)}}}(n?[{value:n,isHighlighted:!1}]:[]);return t.forEach((function(e){var t=e.split(Vr);r.add({value:t[0],isHighlighted:!0}),""!==t[1]&&r.add({value:t[1],isHighlighted:!1})})),r.get()}function Gr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yr(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""":'"',"'":"'"},ea=new RegExp(/\w/i),ta=/&(amp|quot|lt|gt|#39);/g,na=RegExp(ta.source);function ra(e,t){var n,r,a,o=e[t],i=(null===(n=e[t+1])||void 0===n?void 0:n.isHighlighted)||!0,s=(null===(r=e[t-1])||void 0===r?void 0:r.isHighlighted)||!0;return ea.test((a=o.value)&&na.test(a)?a.replace(ta,(function(e){return Jr[e]})):a)||s!==i?o.isHighlighted:s}function aa(e){return aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(e)}function oa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ia(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Sa={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",detachedSearchButtonQuery:"aa-DetachedSearchButtonQuery",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout aa-Panel--scrollable",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},_a=function(e,t){var n=e.children;(0,e.render)(n,t)},xa={createElement:kr,Fragment:_r,render:Hr};function Oa(e){var t=e.panelPlacement,n=e.container,r=e.form,a=e.environment,o=n.getBoundingClientRect(),i=(a.pageYOffset||a.document.documentElement.scrollTop||a.document.body.scrollTop||0)+o.top+o.height;switch(t){case"start":return{top:i,left:o.left};case"end":return{top:i,right:a.document.documentElement.clientWidth-(o.left+o.width)};case"full-width":return{top:i,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":var s=r.getBoundingClientRect();return{top:i,left:s.left,right:a.document.documentElement.clientWidth-(s.left+s.width),width:"unset",maxWidth:"unset"};default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(t)," is not valid."))}}function Pa(e){return Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pa(e)}function Ca(){return Ca=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Va(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wa(e){for(var t=1;t0;if(!p.value.core.openOnFocus&&!t.query)return n;var r=Boolean(l.current||p.value.renderer.renderNoResults);return!n&&r||n},__autocomplete_metadata:{userAgents:ja,options:e}}))})),h=ye(Wa({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},p.value.core.initialState)),b={getEnvironmentProps:p.value.renderer.getEnvironmentProps,getFormProps:p.value.renderer.getFormProps,getInputProps:p.value.renderer.getInputProps,getItemProps:p.value.renderer.getItemProps,getLabelProps:p.value.renderer.getLabelProps,getListProps:p.value.renderer.getListProps,getPanelProps:p.value.renderer.getPanelProps,getRootProps:p.value.renderer.getRootProps},g={setActiveItemId:m.value.setActiveItemId,setQuery:m.value.setQuery,setCollections:m.value.setCollections,setIsOpen:m.value.setIsOpen,setStatus:m.value.setStatus,setContext:m.value.setContext,refresh:m.value.refresh,navigator:m.value.navigator},y=s((function(){return Dn.bind(p.value.renderer.renderer.createElement)})),v=s((function(){return function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.classNames,a=e.environment,o=e.isDetached,i=e.placeholder,s=void 0===i?"Search":i,c=e.propGetters,l=e.setIsModalOpen,u=e.state,d=e.translations,p=Kn(a),f=c.getRootProps(sr({state:u,props:t.getRootProps({})},n)),m=p("div",sr({class:r.root},f)),h=p("div",{class:r.detachedContainer,onMouseDown:function(e){e.stopPropagation()}}),b=p("div",{class:r.detachedOverlay,children:[h],onMouseDown:function(){l(!1),t.setIsOpen(!1)}}),g=c.getLabelProps(sr({state:u,props:t.getLabelProps({})},n)),y=p("button",{class:r.submitButton,type:"submit",title:d.submitButtonTitle,children:[Mn({environment:a})]}),v=p("label",sr({class:r.label,children:[y]},g)),w=p("button",{class:r.clearButton,type:"reset",title:d.clearButtonTitle,children:[Fn({environment:a})]}),E=p("div",{class:r.loadingIndicator,children:[Bn({environment:a})]}),k=ar({class:r.input,environment:a,state:u,getInputProps:c.getInputProps,getInputPropsCore:t.getInputProps,autocompleteScopeApi:n,isDetached:o}),S=p("div",{class:r.inputWrapperPrefix,children:[v,E]}),_=p("div",{class:r.inputWrapperSuffix,children:[w]}),x=p("div",{class:r.inputWrapper,children:[k]}),O=c.getFormProps(sr({state:u,props:t.getFormProps({inputElement:k})},n)),P=p("form",sr({class:r.form,children:[S,x,_]},O)),C=c.getPanelProps(sr({state:u,props:t.getPanelProps({})},n)),T=p("div",sr({class:r.panel},C)),I=p("div",{class:r.detachedSearchButtonQuery,textContent:u.query}),A=p("div",{class:r.detachedSearchButtonPlaceholder,hidden:Boolean(u.query),textContent:s});if(o){var j=p("div",{class:r.detachedSearchButtonIcon,children:[Mn({environment:a})]}),N=p("button",{type:"button",class:r.detachedSearchButton,onClick:function(){l(!0)},children:[j,A,I]}),L=p("button",{type:"button",class:r.detachedCancelButton,textContent:d.detachedCancelButtonText,onTouchStart:function(e){e.stopPropagation()},onClick:function(){t.setIsOpen(!1),l(!1)}}),R=p("div",{class:r.detachedFormContainer,children:[P,L]});h.appendChild(R),m.appendChild(N)}else m.appendChild(P);return{detachedContainer:h,detachedOverlay:b,detachedSearchButtonQuery:I,detachedSearchButtonPlaceholder:A,inputWrapper:x,input:k,root:m,form:P,label:v,submitButton:y,clearButton:w,loadingIndicator:E,panel:T}}({autocomplete:m.value,autocompleteScopeApi:g,classNames:p.value.renderer.classNames,environment:p.value.core.environment,isDetached:f.value,placeholder:p.value.core.placeholder,propGetters:b,setIsModalOpen:S,state:h.current,translations:p.value.renderer.translations})}));function w(){Qn(v.value.panel,{style:f.value?{}:Oa({panelPlacement:p.value.renderer.panelPlacement,container:v.value.root,form:v.value.form,environment:p.value.core.environment})})}function E(e){h.current=e;var t={autocomplete:m.value,autocompleteScopeApi:g,classNames:p.value.renderer.classNames,components:p.value.renderer.components,container:p.value.renderer.container,html:y.value,dom:v.value,panelContainer:f.value?v.value.detachedContainer:p.value.renderer.panelContainer,propGetters:b,state:h.current,renderer:p.value.renderer.renderer},n=!rt(e)&&!l.current&&p.value.renderer.renderNoResults||p.value.renderer.render;!function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.dom,a=e.propGetters,o=e.state;Zn(r.root,a.getRootProps(Ia({state:o,props:t.getRootProps({})},n))),Zn(r.input,a.getInputProps(Ia({state:o,props:t.getInputProps({inputElement:r.input}),inputElement:r.input},n))),Qn(r.label,{hidden:"stalled"===o.status}),Qn(r.loadingIndicator,{hidden:"stalled"!==o.status}),Qn(r.clearButton,{hidden:!o.query}),Qn(r.detachedSearchButtonQuery,{textContent:o.query}),Qn(r.detachedSearchButtonPlaceholder,{hidden:Boolean(o.query)})}(t),function(e,t){var n=t.autocomplete,r=t.autocompleteScopeApi,a=t.classNames,o=t.html,i=t.dom,s=t.panelContainer,c=t.propGetters,l=t.state,u=t.components,d=t.renderer;if(l.isOpen){s.contains(i.panel)||"loading"===l.status||s.appendChild(i.panel),i.panel.classList.toggle("aa-Panel--stalled","stalled"===l.status);var p=l.collections.filter((function(e){var t=e.source,n=e.items;return t.templates.noResults||n.length>0})).map((function(e,t){var i=e.source,s=e.items;return d.createElement("section",{key:t,className:a.source,"data-autocomplete-source-id":i.sourceId},i.templates.header&&d.createElement("div",{className:a.sourceHeader},i.templates.header({components:u,createElement:d.createElement,Fragment:d.Fragment,items:s,source:i,state:l,html:o})),i.templates.noResults&&0===s.length?d.createElement("div",{className:a.sourceNoResults},i.templates.noResults({components:u,createElement:d.createElement,Fragment:d.Fragment,source:i,state:l,html:o})):d.createElement("ul",Ca({className:a.list},c.getListProps(Ia({state:l,props:n.getListProps({sourceIndex:t})},r))),s.map((function(e){var s=n.getItemProps({item:e,source:i,sourceIndex:t});return d.createElement("li",Ca({key:s.id,className:a.item},c.getItemProps(Ia({state:l,props:s},r))),i.templates.item({components:u,createElement:d.createElement,Fragment:d.Fragment,item:e,state:l,html:o}))}))),i.templates.footer&&d.createElement("div",{className:a.sourceFooter},i.templates.footer({components:u,createElement:d.createElement,Fragment:d.Fragment,items:s,source:i,state:l,html:o})))})),f=d.createElement(d.Fragment,null,d.createElement("div",{className:a.panelLayout},p),d.createElement("div",{className:"aa-GradientBottom"})),m=p.reduce((function(e,t){return e[t.props["data-autocomplete-source-id"]]=t,e}),{});e(Ia(Ia({children:f,state:l,sections:p,elements:m},d),{},{components:u,html:o},r),i.panel)}else s.contains(i.panel)&&s.removeChild(i.panel)}(n,t)}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a();var t,n,r=p.value.renderer,i=r.components,s=Za(r,Ha);u.current=Ma(s,p.value.core,{components:(t=i,n=function(e){return!e.value.hasOwnProperty("__autocomplete_componentName")},Object.entries(t).reduce((function(e,t){var r=$a(t,2),a=r[0],o=r[1];return n({key:a,value:o})?za(za({},e),{},Ua({},a,o)):e}),{})),initialState:h.current},e),c(),o(),m.value.refresh().then((function(){E(h.current)}))}function S(e){requestAnimationFrame((function(){var t=p.value.core.environment.document.body.contains(v.value.detachedOverlay);e!==t&&(e?(p.value.core.environment.document.body.appendChild(v.value.detachedOverlay),p.value.core.environment.document.body.classList.add("aa-Detached"),v.value.input.focus()):(p.value.core.environment.document.body.removeChild(v.value.detachedOverlay),p.value.core.environment.document.body.classList.remove("aa-Detached")))}))}return r((function(){var e=m.value.getEnvironmentProps({formElement:v.value.form,panelElement:v.value.panel,inputElement:v.value.input});return Qn(p.value.core.environment,e),function(){Qn(p.value.core.environment,Object.keys(e).reduce((function(e,t){return Wa(Wa({},e),{},Ga({},t,void 0))}),{}))}})),r((function(){var e=f.value?p.value.core.environment.document.body:p.value.renderer.panelContainer,t=f.value?v.value.detachedOverlay:v.value.panel;return f.value&&h.current.isOpen&&S(!0),E(h.current),function(){e.contains(t)&&e.removeChild(t)}})),r((function(){var e=p.value.renderer.container;return e.appendChild(v.value.root),function(){e.removeChild(v.value.root)}})),r((function(){var e=ge((function(e){E(e.state)}),0);return d.current=function(t){var n=t.state,r=t.prevState;(f.value&&r.isOpen!==n.isOpen&&S(n.isOpen),f.value||!n.isOpen||r.isOpen||w(),n.query!==r.query)&&p.value.core.environment.document.querySelectorAll(".aa-Panel--scrollable").forEach((function(e){0!==e.scrollTop&&(e.scrollTop=0)}));e({state:n})},function(){d.current=void 0}})),r((function(){var e=ge((function(){var e=f.value;f.value=p.value.core.environment.matchMedia(p.value.renderer.detachedMediaQuery).matches,e!==f.value?k({}):requestAnimationFrame(w)}),20);return p.value.core.environment.addEventListener("resize",e),function(){p.value.core.environment.removeEventListener("resize",e)}})),r((function(){if(!f.value)return function(){};function e(e){v.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",e)}function t(t){e(t.matches)}var n=p.value.core.environment.matchMedia(getComputedStyle(p.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));e(n.matches);var r=Boolean(n.addEventListener);return r?n.addEventListener("change",t):n.addListener(t),function(){r?n.removeEventListener("change",t):n.removeListener(t)}})),r((function(){return requestAnimationFrame(w),function(){}})),Wa(Wa({},g),{},{update:k,destroy:function(){a()}})}var Ka=n(35742);n(89414);const Xa=n(68965),Ja=Xa,eo=(n(68965),e=>Xa.tokenizer(e).map((e=>e.str))),to=Ja;var no=n(813),ro=n.n(no);function ao(){const e=(0,c.TH)(),t=(0,c.k6)(),{siteConfig:{baseUrl:n}}=(0,ce.Z)(),[a,o]=(0,r.useState)({terms:[],isDocsOrBlog:!1});return(0,r.useEffect)((()=>{if(!e.state?.cmfcmfhighlight||0===e.state.cmfcmfhighlight.terms.length)return;o(e.state.cmfcmfhighlight);const{cmfcmfhighlight:n,...r}=e.state;t.replace({...e,state:r})}),[e.state?.cmfcmfhighlight,t,e]),(0,r.useEffect)((()=>{if(0===a.terms.length)return;const e=a.isDocsOrBlog?document.getElementsByTagName("article")[0]:document.getElementsByTagName("main")[0];if(!e)return;const t=new(ro())(e),n={ignoreJoiners:!0};return t.mark(a.terms,n),()=>t.unmark(n)}),[a,n]),null}var oo=n(28084),io=n(43320);function so(e){let{document:t}=e;const[n,r]=t.sectionRoute.split("#");let a=n;return r&&(a+="#"+r),a}const co={documents:[],index:to((function(){this.ref("id"),this.field("title"),this.field("content")}))};const lo=()=>{const e=(0,B.Z)(),[t,n]=(0,r.useState)((()=>!!e&&"dark"===document.documentElement.getAttribute("data-theme")));(0,r.useEffect)((()=>{const e=new MutationObserver((()=>{n("dark"===document.documentElement.getAttribute("data-theme"))}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>e.disconnect()}),[]);const{siteConfig:{baseUrl:a}}=(0,ce.Z)(),{titleBoost:o,contentBoost:i,parentCategoriesBoost:s,indexDocSidebarParentCategories:u}=(0,oo.eZ)("@cmfcmf/docusaurus-search-local"),d=(0,c.k6)(),{tags:p}=(0,io._q)(),f=(0,r.useRef)(p);(0,r.useEffect)((()=>{f.current=p}),[p]);const m=(0,r.useRef)({}),h=async e=>{const t=m.current[e];switch(t?.state){case"ready":return t;case void 0:{const t=[];m.current[e]={state:"loading",callbacks:t};const n=await async function(e,t){{let r;try{const n=await fetch(`${e}search-index-${t}.json`);if(!n.ok)return co;r=await n.json()}catch(n){return co}return{documents:r.documents,index:to.Index.load(r.index)}}}(a,e);return t.forEach((e=>e(n))),m.current[e]={state:"ready",...n}}case"loading":return new Promise((e=>{t.callbacks.push(e)}))}},b=(0,l.I)({message:"cmfcmf/d-s-l.searchBar.placeholder",description:"Placeholder shown in the searchbar"}),g=(0,r.useRef)(null),y=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(g.current)return y.current=Ya({container:g.current,placeholder:b,renderer:{createElement:r.createElement,Fragment:r.Fragment},render(e,t){let{children:n}=e;(0,be.render)(n,t)},navigator:{navigate(e){let{item:t,itemUrl:n}=e;d.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},detachedMediaQuery:"",defaultActiveItemId:0,translations:{clearButtonTitle:(0,l.I)({message:"cmfcmf/d-s-l.searchBar.clearButtonTitle",description:"Title of the button to clear the current search input"}),detachedCancelButtonText:(0,l.I)({message:"cmfcmf/d-s-l.searchBar.detachedCancelButtonText",description:"Text of the button to close the detached search window"}),submitButtonTitle:(0,l.I)({message:"cmfcmf/d-s-l.searchBar.submitButtonTitle",description:"Title of the button to submit a new search"})},getSources(e){let{query:t}=e;return[{sourceId:"search-results",templates:{item(e){let{item:t}=e;const n=so(t);return r.createElement("a",{href:n,className:"aa-ItemLink",onClick:e=>{e.preventDefault(),d.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},r.createElement("div",{className:"aa-ItemContentTitle"},t.document.sectionTitle),t.document.pageTitle!==t.document.sectionTitle&&r.createElement("div",{className:"aa-ItemContentDescription"},t.document.pageTitle))),r.createElement("div",{className:"aa-ItemActions"},r.createElement("button",{className:"aa-ItemActionButton aa-DesktopOnly aa-ActiveOnly",type:"button",title:"Select"},r.createElement("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},r.createElement("path",{d:"M18.984 6.984h2.016v6h-15.188l3.609 3.609-1.406 1.406-6-6 6-6 1.406 1.406-3.609 3.609h13.172v-4.031z"})))))},noResults:()=>r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},(0,l.I)({message:"cmfcmf/d-s-l.searchBar.noResults",description:"message shown if no results are found"})))},getItemUrl(e){let{item:t}=e;return so(t)},async getItems(){const e=f.current,n=await Promise.all(e.map((e=>h(e)))),r=eo(t);return n.flatMap((e=>{let{index:t,documents:n}=e;return t.query((e=>{e.term(r,{fields:["title"],boost:o}),e.term(r,{fields:["title"],boost:o,wildcard:to.Query.wildcard.TRAILING}),e.term(r,{fields:["content"],boost:i}),e.term(r,{fields:["content"],boost:i,wildcard:to.Query.wildcard.TRAILING}),u&&(e.term(r,{fields:["sidebarParentCategories"],boost:s}),e.term(r,{fields:["sidebarParentCategories"],boost:s,wildcard:to.Query.wildcard.TRAILING}))})).slice(0,8).map((e=>({document:n.find((t=>t.id.toString()===e.ref)),score:e.score,terms:r})))})).sort(((e,t)=>t.score-e.score)).slice(0,8)}}]}}),()=>y.current?.destroy()}),[]),r.createElement(r.Fragment,null,r.createElement(Ka.Z,null,r.createElement("body",{"data-theme":t?"dark":"light"})),r.createElement(ao,null),r.createElement("div",{className:"dsla-search-wrapper"},r.createElement("div",{className:"dsla-search-field",ref:g,"data-tags":p.join(",")})))},uo={searchBox:"searchBox_ZlJk"};function po(e){let{children:t,className:n}=e;return r.createElement("div",{className:(0,a.Z)(n,uo.searchBox)},t)}var fo=n(94104),mo=n(53438);var ho=n(60373);const bo=e=>e.docs.find((t=>t.id===e.mainDocId));const go={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:a,...o}=e;const{i18n:{currentLocale:i,locales:u,localeConfigs:d}}=(0,ce.Z)(),p=(0,fe.l)(),{search:f,hash:m}=(0,c.TH)(),h=[...n,...u.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${m}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...a],b=t?(0,l.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return r.createElement(pe,(0,s.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(me,{className:he}),b),items:h}))},search:function(e){let{mobile:t,className:n}=e;return t?null:r.createElement(po,{className:n},r.createElement(lo,null))},dropdown:pe,html:function(e){let{value:t,className:n,mobile:o=!1,isDropdownItem:i=!1}=e;const s=i?"li":"div";return r.createElement(s,{className:(0,a.Z)({navbar__item:!o&&!i,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,fo.Iw)(a),c=(0,mo.vY)(t,a);return null===c?null:r.createElement(oe,(0,s.Z)({exact:!0},o,{isActive:()=>i?.path===c.path||!!i?.sidebar&&i.sidebar===c.sidebar,label:n??c.id,to:c.path}))},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,fo.Iw)(a),c=(0,mo.oz)(t,a).link;if(!c)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return r.createElement(oe,(0,s.Z)({exact:!0},o,{isActive:()=>i?.sidebar===t,label:n??c.label,to:c.path}))},docsVersion:function(e){let{label:t,to:n,docsPluginId:a,...o}=e;const i=(0,mo.lO)(a)[0],c=t??i.label,l=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(i).path;return r.createElement(oe,(0,s.Z)({},o,{label:c,to:l}))},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:a,dropdownItemsBefore:o,dropdownItemsAfter:i,...u}=e;const{search:d,hash:p}=(0,c.TH)(),f=(0,fo.Iw)(n),m=(0,fo.gB)(n),{savePreferredVersionName:h}=(0,ho.J)(n),b=m.map((e=>{const t=f.alternateDocVersions[e.name]??bo(e);return{label:e.label,to:`${t.path}${d}${p}`,isActive:()=>e===f.activeVersion,onClick:()=>h(e.name)}})),g=[...o,...b,...i],y=(0,mo.lO)(n)[0],v=t&&g.length>1?(0,l.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):y.label,w=t&&g.length>1?void 0:bo(y).path;return g.length<=1?r.createElement(oe,(0,s.Z)({},u,{mobile:t,label:v,to:w,isActive:a?()=>!1:void 0})):r.createElement(pe,(0,s.Z)({},u,{mobile:t,label:v,to:w,items:g,isActive:a?()=>!1:void 0}))}},yo=go;function vo(e){let{type:t,...n}=e;const a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=yo[a];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return r.createElement(o,n)}function wo(){const e=(0,T.e)(),t=(0,w.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map(((t,n)=>r.createElement(vo,(0,s.Z)({mobile:!0},t,{onClick:()=>e.toggle(),key:n})))))}function Eo(e){return r.createElement("button",(0,s.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(l.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function ko(){const e=0===(0,w.L)().navbar.items.length,t=D();return r.createElement(r.Fragment,null,!e&&r.createElement(Eo,{onClick:()=>t.hide()}),t.content)}function So(){const e=(0,T.e)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?r.createElement(M,{header:r.createElement(Y,null),primaryMenu:r.createElement(wo,null),secondaryMenu:r.createElement(ko,null)}):null}const _o={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function xo(e){return r.createElement("div",(0,s.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function Oo(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,w.L)(),i=(0,T.e)(),{navbarRef:s,isNavbarVisible:c}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,I.RF)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=s?n(!1):i+l{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return a.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return r.createElement("nav",{ref:s,"aria-label":(0,l.I)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,a.Z)("navbar","navbar--fixed-top",n&&[_o.navbarHideable,!c&&_o.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown})},t,r.createElement(xo,{onClick:i.toggle}),r.createElement(So,null))}var Po=n(18780);const Co={errorBoundaryError:"errorBoundaryError_a6uf"};function To(e){return r.createElement("button",(0,s.Z)({type:"button"},e),r.createElement(l.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error"},"Try again"))}function Io(e){let{error:t}=e;const n=(0,Po.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return r.createElement("p",{className:Co.errorBoundaryError},n)}class Ao extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const jo="right";function No(e){let{width:t=30,height:n=30,className:a,...o}=e;return r.createElement("svg",(0,s.Z)({className:a,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true"},o),r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}function Lo(){const{toggle:e,shown:t}=(0,T.e)();return r.createElement("button",{onClick:e,"aria-label":(0,l.I)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button"},r.createElement(No,null))}const Ro={colorModeToggle:"colorModeToggle_DEke"};function Do(e){let{items:t}=e;return r.createElement(r.Fragment,null,t.map(((e,t)=>r.createElement(Ao,{key:t,onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t})},r.createElement(vo,e)))))}function Mo(e){let{left:t,right:n}=e;return r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},t),r.createElement("div",{className:"navbar__items navbar__items--right"},n))}function Fo(){const e=(0,T.e)(),t=(0,w.L)().navbar.items,[n,a]=function(e){function t(e){return"left"===(e.position??jo)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return r.createElement(Mo,{left:r.createElement(r.Fragment,null,!e.disabled&&r.createElement(Lo,null),r.createElement(W,null),r.createElement(Do,{items:n})),right:r.createElement(r.Fragment,null,r.createElement(Do,{items:a}),r.createElement(Z,{className:Ro.colorModeToggle}),!o&&r.createElement(po,null,r.createElement(lo,null)))})}function Bo(){return r.createElement(Oo,null,r.createElement(Fo,null))}function zo(e){let{item:t}=e;const{to:n,href:a,label:o,prependBaseUrlToHref:i,...c}=t,l=(0,X.Z)(n),u=(0,X.Z)(a,{forcePrependBaseUrl:!0});return r.createElement(K.Z,(0,s.Z)({className:"footer__link-item"},a?{href:i?u:a}:{to:l},c),o,a&&!(0,J.Z)(a)&&r.createElement(te.Z,null))}function Uo(e){let{item:t}=e;return t.html?r.createElement("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement("li",{key:t.href??t.to,className:"footer__item"},r.createElement(zo,{item:t}))}function $o(e){let{column:t}=e;return r.createElement("div",{className:"col footer__col"},r.createElement("div",{className:"footer__title"},t.title),r.createElement("ul",{className:"footer__items clean-list"},t.items.map(((e,t)=>r.createElement(Uo,{key:t,item:e})))))}function qo(e){let{columns:t}=e;return r.createElement("div",{className:"row footer__links"},t.map(((e,t)=>r.createElement($o,{key:t,column:e}))))}function Ho(){return r.createElement("span",{className:"footer__link-separator"},"\xb7")}function Qo(e){let{item:t}=e;return t.html?r.createElement("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement(zo,{item:t})}function Zo(e){let{links:t}=e;return r.createElement("div",{className:"footer__links text--center"},r.createElement("div",{className:"footer__links"},t.map(((e,n)=>r.createElement(r.Fragment,{key:n},r.createElement(Qo,{item:e}),t.length!==n+1&&r.createElement(Ho,null))))))}function Vo(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?r.createElement(qo,{columns:t}):r.createElement(Zo,{links:t})}var Wo=n(50941);const Go={footerLogoLink:"footerLogoLink_BH7S"};function Yo(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.C)(),o={light:n(t.src),dark:n(t.srcDark??t.src)};return r.createElement(Wo.Z,{className:(0,a.Z)("footer__logo",t.className),alt:t.alt,sources:o,width:t.width,height:t.height,style:t.style})}function Ko(e){let{logo:t}=e;return t.href?r.createElement(K.Z,{href:t.href,className:Go.footerLogoLink,target:t.target},r.createElement(Yo,{logo:t})):r.createElement(Yo,{logo:t})}function Xo(e){let{copyright:t}=e;return r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function Jo(e){let{style:t,links:n,logo:o,copyright:i}=e;return r.createElement("footer",{className:(0,a.Z)("footer",{"footer--dark":"dark"===t})},r.createElement("div",{className:"container container-fluid"},n,(o||i)&&r.createElement("div",{className:"footer__bottom text--center"},o&&r.createElement("div",{className:"margin-bottom--sm"},o),i)))}function ei(){const{footer:e}=(0,w.L)();if(!e)return null;const{copyright:t,links:n,logo:a,style:o}=e;return r.createElement(Jo,{style:o,links:n&&n.length>0&&r.createElement(Vo,{links:n}),logo:a&&r.createElement(Ko,{logo:a}),copyright:t&&r.createElement(Xo,{copyright:t})})}const ti=r.memo(ei),ni=(0,A.Qc)([F.S,E.pl,I.OC,ho.L5,i.VC,function(e){let{children:t}=e;return r.createElement(j.n2,null,r.createElement(T.M,null,r.createElement(L,null,t)))}]);function ri(e){let{children:t}=e;return r.createElement(ni,null,t)}function ai(e){let{error:t,tryAgain:n}=e;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(l.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("div",{className:"margin-vert--lg"},r.createElement(To,{onClick:n,className:"button button--primary shadow--lw"})),r.createElement("hr",null),r.createElement("div",{className:"margin-vert--md"},r.createElement(Io,{error:t})))))}const oi={mainWrapper:"mainWrapper_z2l0"};function ii(e){const{children:t,noFooter:n,wrapperClassName:s,title:c,description:l}=e;return(0,g.t)(),r.createElement(ri,null,r.createElement(i.d,{title:c,description:l}),r.createElement(v,null),r.createElement(C,null),r.createElement(Bo,null),r.createElement("div",{id:d,className:(0,a.Z)(b.k.wrapper.main,oi.mainWrapper,s)},r.createElement(o.Z,{fallback:e=>r.createElement(ai,e)},t)),!n&&r.createElement(ti,null))}},21327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(87462),a=n(67294),o=n(39960),i=n(44996),s=n(52263),c=n(86668),l=n(50941);function u(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,i.Z)(t.src),dark:(0,i.Z)(t.srcDark||t.src)},s=a.createElement(l.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},s):s}function d(e){const{siteConfig:{title:t}}=(0,s.Z)(),{navbar:{title:n,logo:l}}=(0,c.L)(),{imageClassName:d,titleClassName:p,...f}=e,m=(0,i.Z)(l?.href||"/"),h=n?"":t,b=l?.alt??h;return a.createElement(o.Z,(0,r.Z)({to:m},f,l?.target&&{target:l.target}),l&&a.createElement(u,{logo:l,alt:b,imageClassName:d}),null!=n&&a.createElement("b",{className:p},n))}},90197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(67294),a=n(35742);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},50941:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(87462),a=n(67294),o=n(86010),i=n(72389),s=n(92949);const c={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"};function l(e){const t=(0,i.Z)(),{colorMode:n}=(0,s.I)(),{sources:l,className:u,alt:d,...p}=e,f=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,f.map((e=>a.createElement("img",(0,r.Z)({key:e,src:l[e],alt:d,className:(0,o.Z)(c.themedImage,c[`themedImage--${e}`],u)},p)))))}},86043:(e,t,n)=>{"use strict";n.d(t,{u:()=>c,z:()=>b});var r=n(87462),a=n(67294),o=n(10412),i=n(91442);const s="ease-in-out";function c(e){let{initialState:t}=e;const[n,r]=(0,a.useState)(t??!1),o=(0,a.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:o}}const l={display:"none",overflow:"hidden",height:"0px"},u={display:"block",overflow:"visible",height:"auto"};function d(e,t){const n=t?l:u;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const o=(0,a.useRef)(!1);(0,a.useEffect)((()=>{const e=t.current;function a(){const t=e.scrollHeight,n=r?.duration??function(e){if((0,i.n)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${r?.easing??s}`,height:`${t}px`}}function c(){const t=a();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return d(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(c(),requestAnimationFrame((()=>{e.style.height=l.height,e.style.overflow=l.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{c()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function f(e){if(!o.Z.canUseDOM)return e?l:u}function m(e){let{as:t="div",collapsed:n,children:r,animation:o,onCollapseTransitionEnd:i,className:s,disableSSRStyle:c}=e;const l=(0,a.useRef)(null);return p({collapsibleRef:l,collapsed:n,animation:o}),a.createElement(t,{ref:l,style:c?void 0:f(n),onTransitionEnd:e=>{"height"===e.propertyName&&(d(l.current,n),i?.(n))},className:s},r)}function h(e){let{collapsed:t,...n}=e;const[o,i]=(0,a.useState)(!t),[s,c]=(0,a.useState)(t);return(0,a.useLayoutEffect)((()=>{t||i(!0)}),[t]),(0,a.useLayoutEffect)((()=>{o&&c(t)}),[o,t]),o?a.createElement(m,(0,r.Z)({},n,{collapsed:s})):null}function b(e){let{lazy:t,...n}=e;const r=t?h:m;return a.createElement(r,n)}},59689:(e,t,n)=>{"use strict";n.d(t,{nT:()=>m,pl:()=>f});var r=n(67294),a=n(72389),o=n(50012),i=n(902),s=n(86668);const c=(0,o.WA)("docusaurus.announcement.dismiss"),l=(0,o.WA)("docusaurus.announcement.id"),u=()=>"true"===c.get(),d=e=>c.set(String(e)),p=r.createContext(null);function f(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.L)(),t=(0,a.Z)(),[n,o]=(0,r.useState)((()=>!!t&&u()));(0,r.useEffect)((()=>{o(u())}),[]);const i=(0,r.useCallback)((()=>{d(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=l.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;l.set(t),r&&d(!1),!r&&u()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return r.createElement(p.Provider,{value:n},t)}function m(){const e=(0,r.useContext)(p);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},92949:(e,t,n)=>{"use strict";n.d(t,{I:()=>b,S:()=>h});var r=n(67294),a=n(10412),o=n(902),i=n(50012),s=n(86668);const c=r.createContext(void 0),l="theme",u=(0,i.WA)(l),d={light:"light",dark:"dark"},p=e=>e===d.dark?d.dark:d.light,f=e=>a.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),m=e=>{u.set(p(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.L)(),[a,o]=(0,r.useState)(f(e));(0,r.useEffect)((()=>{t&&u.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&m(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?d.dark:d.light:e),u.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==l)return;const t=u.get();null!==t&&i(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const c=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||c.current?c.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===d.dark},setLightTheme(){i(d.light)},setDarkTheme(){i(d.dark)}})),[a,i])}();return r.createElement(c.Provider,{value:n},t)}function b(){const e=(0,r.useContext)(c);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},60373:(e,t,n)=>{"use strict";n.d(t,{J:()=>y,L5:()=>b,Oh:()=>v});var r=n(67294),a=n(94104),o=n(29935),i=n(86668),s=n(53438),c=n(902),l=n(50012);const u=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,l.WA)(u(e),{persistence:t}).set(n)},read:(e,t)=>(0,l.WA)(u(e),{persistence:t}).get(),clear:(e,t)=>{(0,l.WA)(u(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const f=r.createContext(null);function m(){const e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,s]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=m();return r.createElement(f.Provider,{value:n},t)}function b(e){let{children:t}=e;return s.cE?r.createElement(h,null,t):r.createElement(r.Fragment,null,t)}function g(){const e=(0,r.useContext)(f);if(!e)throw new c.i6("DocsPreferredVersionContextProvider");return e}function y(e){void 0===e&&(e=o.m);const t=(0,a.zh)(e),[n,i]=g(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function v(){const e=(0,a._r)(),[t]=g();function n(n){const r=e[n],{preferredVersionName:a}=t[n];return r.versions.find((e=>e.name===a))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},1116:(e,t,n)=>{"use strict";n.d(t,{V:()=>c,b:()=>s});var r=n(67294),a=n(902);const o=Symbol("EmptyContext"),i=r.createContext(o);function s(e){let{children:t,name:n,items:a}=e;const o=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return r.createElement(i.Provider,{value:o},t)}function c(){const e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},74477:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,q:()=>i});var r=n(67294),a=n(902);const o=r.createContext(null);function i(e){let{children:t,version:n}=e;return r.createElement(o.Provider,{value:n},t)}function s(){const e=(0,r.useContext)(o);if(null===e)throw new a.i6("DocsVersionProvider");return e}},93163:(e,t,n)=>{"use strict";n.d(t,{M:()=>d,e:()=>p});var r=n(67294),a=n(13102),o=n(87524),i=n(91980),s=n(86668),c=n(902);const l=r.createContext(void 0);function u(){const e=function(){const e=(0,a.HY)(),{items:t}=(0,s.L)().navbar;return 0===t.length&&!e.component}(),t=(0,o.i)(),n=!e&&"mobile"===t,[c,l]=(0,r.useState)(!1);(0,i.Rb)((()=>{if(c)return l(!1),!1}));const u=(0,r.useCallback)((()=>{l((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&l(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:c})),[e,n,u,c])}function d(e){let{children:t}=e;const n=u();return r.createElement(l.Provider,{value:n},t)}function p(){const e=r.useContext(l);if(void 0===e)throw new c.i6("NavbarMobileSidebarProvider");return e}},13102:(e,t,n)=>{"use strict";n.d(t,{HY:()=>s,Zo:()=>c,n2:()=>i});var r=n(67294),a=n(902);const o=r.createContext(null);function i(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function s(){const e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");const[,s]=i,c=(0,a.Ql)(n);return(0,r.useEffect)((()=>{s({component:t,props:c})}),[s,t,c]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},19727:(e,t,n)=>{"use strict";n.d(t,{h:()=>a,t:()=>o});var r=n(67294);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},87524:(e,t,n)=>{"use strict";n.d(t,{i:()=>l});var r=n(67294),a=n(10412);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(){return a.Z.canUseDOM?window.innerWidth>i?o.desktop:o.mobile:o.ssr}const c=!1;function l(){const[e,t]=(0,r.useState)((()=>c?"ssr":s()));return(0,r.useEffect)((()=>{function e(){t(s())}const n=c?window.setTimeout(e,1e3):void 0;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(n)}}),[]),e}},35281:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},91442:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:()=>r})},53438:(e,t,n)=>{"use strict";n.d(t,{MN:()=>x,Wl:()=>m,_F:()=>y,cE:()=>p,hI:()=>_,jA:()=>h,lO:()=>E,oz:()=>k,s1:()=>w,vY:()=>S,xz:()=>f});var r=n(67294),a=n(16550),o=n(18790),i=n(94104),s=n(60373),c=n(74477),l=n(1116),u=n(67392),d=n(48596);const p=!!i._r;function f(e){const t=(0,c.E)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function m(e){if(e.href)return e.href;for(const t of e.items){if("link"===t.type)return t.href;if("category"===t.type){const e=m(t);if(e)return e}}}function h(){const{pathname:e}=(0,a.TH)(),t=(0,l.V)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=v({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const b=(e,t)=>void 0!==e&&(0,d.Mg)(e,t),g=(e,t)=>e.some((e=>y(e,t)));function y(e,t){return"link"===e.type?b(e.href,t):"category"===e.type&&(b(e.href,t)||g(e.items,t))}function v(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,d.Mg)(o.href,n)||e(o.items))||"link"===o.type&&(0,d.Mg)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function w(){const e=(0,l.V)(),{pathname:t}=(0,a.TH)(),n=(0,i.gA)()?.pluginData.breadcrumbs;return!1!==n&&e?v({sidebarItems:e.items,pathname:t}):null}function E(e){const{activeVersion:t}=(0,i.Iw)(e),{preferredVersion:n}=(0,s.J)(e),a=(0,i.yW)(e);return(0,r.useMemo)((()=>(0,u.j)([t,n,a].filter(Boolean))),[t,n,a])}function k(e,t){const n=E(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function S(e,t){const n=E(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,u.j)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function _(e){let{route:t,versionMetadata:n}=e;const r=(0,a.TH)(),i=t.routes,s=i.find((e=>(0,a.LX)(r.pathname,e)));if(!s)return null;const c=s.sidebar,l=c?n.docsSidebars[c]:void 0;return{docElement:(0,o.H)(i),sidebarName:c,sidebarItems:l}}function x(e){return e.filter((e=>"category"!==e.type||!!m(e)))}},91980:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>s,_X:()=>c});var r=n(67294),a=n(16550),o=n(61688),i=n(902);function s(e){!function(e){const t=(0,a.k6)(),n=(0,i.zX)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function c(e){return function(e){const t=(0,a.k6)();return(0,o.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}},67392:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function a(e){return Array.from(new Set(e))}n.d(t,{j:()=>a,l:()=>r})},1944:(e,t,n)=>{"use strict";n.d(t,{FG:()=>p,d:()=>u,VC:()=>f});var r=n(67294),a=n(86010),o=n(35742),i=n(30226);function s(){const e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var c=n(44996),l=n(52263);function u(e){let{title:t,description:n,keywords:a,image:i,children:s}=e;const u=function(e){const{siteConfig:t}=(0,l.Z)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,c.C)(),p=i?d(i,{absolute:!0}):void 0;return r.createElement(o.Z,null,t&&r.createElement("title",null,u),t&&r.createElement("meta",{property:"og:title",content:u}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),p&&r.createElement("meta",{property:"og:image",content:p}),p&&r.createElement("meta",{name:"twitter:image",content:p}),s)}const d=r.createContext(void 0);function p(e){let{className:t,children:n}=e;const i=r.useContext(d),s=(0,a.Z)(i,t);return r.createElement(d.Provider,{value:s},r.createElement(o.Z,null,r.createElement("html",{className:s})),n)}function f(e){let{children:t}=e;const n=s(),o=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const i=`plugin-id-${n.plugin.id}`;return r.createElement(p,{className:(0,a.Z)(o,i)},t)}},902:(e,t,n)=>{"use strict";n.d(t,{D9:()=>i,Qc:()=>l,Ql:()=>c,i6:()=>s,zX:()=>o});var r=n(67294);const a=n(10412).Z.canUseDOM?r.useLayoutEffect:r.useEffect;function o(e){const t=(0,r.useRef)(e);return a((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function i(e){const t=(0,r.useRef)();return a((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function l(e){return t=>{let{children:n}=t;return r.createElement(r.Fragment,null,e.reduceRight(((e,t)=>r.createElement(t,null,e)),n))}}},48596:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>s});var r=n(67294),a=n(723),o=n(52263);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,o.Z)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.Z,baseUrl:e})),[e])}},12466:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>c,RF:()=>d,o5:()=>p});var r=n(67294),a=n(10412),o=n(72389),i=n(902);const s=r.createContext(void 0);function c(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return r.createElement(s.Provider,{value:n},t)}function l(){const e=(0,r.useContext)(s);if(null==e)throw new i.i6("ScrollControllerProvider");return e}const u=()=>a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function d(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=l(),a=(0,r.useRef)(u()),o=(0,i.zX)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=u();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function p(){const e=l(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),a=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,r.useLayoutEffect)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:a}}function f(){const e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&at&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},43320:(e,t,n)=>{"use strict";n.d(t,{HX:()=>i,_q:()=>c,os:()=>s});var r=n(94104),a=n(52263),o=n(60373);const i="default";function s(e,t){return`docs-${e}-${t}`}function c(){const{i18n:e}=(0,a.Z)(),t=(0,r._r)(),n=(0,r.WS)(),c=(0,o.Oh)();const l=[i,...Object.keys(t).map((function(e){const r=n?.activePlugin.pluginId===e?n.activeVersion:void 0,a=c[e],o=t[e].versions.find((e=>e.isLast));return s(e,(r??a??o).name)}))];return{locale:e.currentLocale,tags:l}}},50012:(e,t,n)=>{"use strict";n.d(t,{Nk:()=>d,WA:()=>u});var r=n(67294),a=n(61688);const o="localStorage";function i(e){let{key:t,oldValue:n,newValue:r,storage:a}=e;if(n===r)return;const o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}function s(e){if(void 0===e&&(e=o),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,c||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),c=!0),null}var t}let c=!1;const l={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=s(t?.persistence);return null===n?l:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),i({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),i({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}function d(e,t){const n=(0,r.useRef)((()=>null===e?l:u(e,t))).current(),o=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,a.useSyncExternalStore)(o,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},94711:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(52263),a=n(16550);function o(){const{siteConfig:{baseUrl:e,url:t},i18n:{defaultLocale:n,currentLocale:o}}=(0,r.Z)(),{pathname:i}=(0,a.TH)(),s=o===n?e:e.replace(`/${o}/`,"/"),c=i.replace(e,"");return{createUrl:function(e){let{locale:r,fullyQualified:a}=e;return`${a?t:""}${function(e){return e===n?`${s}`:`${s}${e}/`}(r)}${c}`}}}},85936:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(67294),a=n(16550),o=n(902);function i(e){const t=(0,a.TH)(),n=(0,o.D9)(t),i=(0,o.zX)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},86668:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(52263);function a(){return(0,r.Z)().siteConfig.themeConfig}},8802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},54143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},18780:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(8802);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}});var o=n(54143);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return o.getErrorCausalChain}})},86010:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ta});const a=function(){for(var e,t,n=0,a="";n{"use strict";n.d(t,{lX:()=>w,q_:()=>O,ob:()=>f,PP:()=>C,Ep:()=>p});var r=n(87462);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!l)for(;d--;d)i.unshift("..");!l||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(38776);function c(e){return"/"===e.charAt(0)?e:"/"+e}function l(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function f(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,h(),w.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(59864),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=c(t),h=c(n),b=0;b{"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,a,o,i,s],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},5826:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},813:function(e){e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=a,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var a=e.contentWindow;if(r=a.document,!a||!r)throw new Error("iframe inaccessible")}catch(o){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,a=!1,o=null,i=function i(){if(!a){a=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",i),r.getIframeContents(e,t,n))}catch(s){n()}}};e.addEventListener("load",i),o=setTimeout(i,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(r){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,(function(){return!0}),(function(e){r++,n.waitForIframes(e.querySelector("html"),(function(){--r||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,r){var a=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=t.querySelectorAll("iframe"),s=i.length,c=0;i=Array.prototype.slice.call(i);var l=function(){--s<=0&&o(c)};s||l(),i.forEach((function(t){e.matches(t,a.exclude)?l():a.onIframeReady(t,(function(e){n(t)&&(c++,r(e)),l()}),l)}))}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var a=!1,o=!1;return r.forEach((function(e,t){e.val===n&&(a=t,o=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==a||o?!1===a||o||(r[a].handled=!0):r.push({val:n,handled:!0}),!0):(!1===a&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var a=this;e.forEach((function(e){e.handled||a.getIframeContents(e.val,(function(e){a.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,a){for(var o=this,i=this.createIterator(t,e,r),s=[],c=[],l=void 0,u=void 0,d=function(){var e=o.getIteratorNode(i);return u=e.prevNode,l=e.node};d();)this.iframes&&this.forEachIframe(t,(function(e){return o.checkIframeFilter(l,u,e,s)}),(function(t){o.createInstanceOnIframe(t).forEachNode(e,(function(e){return c.push(e)}),r)})),c.push(l);c.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(s,e,n,r),a()}},{key:"forEachNode",value:function(e,t,n){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),i=o.length;i||a(),o.forEach((function(o){var s=function(){r.iterateThroughNodes(e,o,t,n,(function(){--i<=0&&a()}))};r.iframes?r.waitForIframes(o,s):s()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var a=!1;return n.every((function(t){return!r.call(e,t)||(a=!0,!1)})),a}return!1}}]),e}(),o=function(){function o(e){t(this,o),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(o,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var a in t)if(t.hasOwnProperty(a)){var o=t[a],i="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(a):this.escapeStr(a),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==i&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(i)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynomyms(i)+"|"+this.processSynomyms(s)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":"\x01"}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":"\x02"}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105","A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010d","C\xc7\u0106\u010c","d\u0111\u010f","D\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119","E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012b","I\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142","L\u0141","n\xf1\u0148\u0144","N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014d","O\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159","R\u0158","s\u0161\u015b\u0219\u015f","S\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163","T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016b","U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xff","Y\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017a","Z\u017d\u017b\u0179"]:["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010dC\xc7\u0106\u010c","d\u0111\u010fD\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012bI\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142L\u0141","n\xf1\u0148\u0144N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014dO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159R\u0158","s\u0161\u015b\u0219\u015fS\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016bU\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xffY\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017aZ\u017d\u017b\u0179"],r=[];return e.split("").forEach((function(a){n.every((function(n){if(-1!==n.indexOf(a)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\xa1\xbf",r=this.opt.accuracy,a="string"==typeof r?r:r.value,o="string"==typeof r?[]:r.limiters,i="";switch(o.forEach((function(e){i+="|"+t.escapeStr(e)})),a){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr(n)))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var a=t.callNoMatchOnInvalidRanges(e,r),o=a.start,i=a.end;a.valid&&(e.start=o,e.length=i-o,n.push(e),r=i)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,a=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?a=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:a}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,a=!0,o=n.length,i=t-o,s=parseInt(e.start,10)-i;return(r=(s=s>o?o:s)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),s<0||r-s<0||s>o||r>o?(a=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(a=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:a}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:r})}))}},{key:"matchesExclude",value:function(e){return a.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",a=e.splitText(t),o=a.splitText(n-t),i=document.createElement(r);return i.setAttribute("data-markjs","true"),this.opt.className&&i.setAttribute("class",this.opt.className),i.textContent=a.textContent,a.parentNode.replaceChild(i,a),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,a){var o=this;e.nodes.every((function(i,s){var c=e.nodes[s+1];if(void 0===c||c.start>t){if(!r(i.node))return!1;var l=t-i.start,u=(n>i.end?i.end:n)-i.start,d=e.value.substr(0,i.start),p=e.value.substr(u+i.start);if(i.node=o.wrapRangeInTextNode(i.node,l,u),e.value=d+p,e.nodes.forEach((function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=u),e.nodes[n].end-=u)})),n-=u,a(i.node.previousSibling,i.start),!(n>i.end))return!1;t=i.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,a){var o=this,i=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var a=void 0;null!==(a=e.exec(t.textContent))&&""!==a[i];)if(n(a[i],t)){var s=a.index;if(0!==i)for(var c=1;c{"use strict";n.r(t)},32497:(e,t,n)=>{"use strict";n.r(t)},52295:(e,t,n)=>{"use strict";n.r(t)},74865:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),l=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),c(l,i(e,u,d)),1===e?(c(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){c(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),l=document.querySelector(r.parent);return c(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),c=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function l(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;l(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);l(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},27418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,a){for(var o,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{var r=n(5826);e.exports=f,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=p;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,s="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],p=n[1],f=n.index;if(s+=e.slice(i,f),i=f+d.length,p)s+=p[1];else{var m=e[i],h=n[2],b=n[3],g=n[4],y=n[5],v=n[6],w=n[7];s&&(r.push(s),s="");var E=null!=h&&null!=m&&m!==h,k="+"===v||"*"===v,S="?"===v||"*"===v,_=n[2]||u,x=g||y;r.push({name:b||o++,prefix:h||"",delimiter:_,optional:S,repeat:k,partial:E,asterisk:!!w,pattern:x?l(x):w?".*":"[^"+c(_)+"]+?"})}}return i{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(36809),a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=window.Promise||function(e){function t(){}e(t,t)},o=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{}).target,t=function(){var e={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},t=void 0,n=void 0;if(g.container)if(g.container instanceof Object)t=(e=a({},e,g.container)).width-e.left-e.right-2*g.margin,n=e.height-e.top-e.bottom-2*g.margin;else{var r=(i(g.container)?g.container:document.querySelector(g.container)).getBoundingClientRect(),o=r.width,c=r.height,l=r.left,u=r.top;e=a({},e,{width:o,height:c,left:l,top:u})}t=t||e.width-2*g.margin,n=n||e.height-2*g.margin;var d=y.zoomedHd||y.original,p=s(d)?t:d.naturalWidth||t,f=s(d)?n:d.naturalHeight||n,m=d.getBoundingClientRect(),h=m.top,b=m.left,v=m.width,w=m.height,E=Math.min(Math.max(v,p),t)/v,k=Math.min(Math.max(w,f),n)/w,S=Math.min(E,k),_="scale("+S+") translate3d("+((t-v)/2-b+g.margin+e.left)/S+"px, "+((n-w)/2-h+g.margin+e.top)/S+"px, 0)";y.zoomed.style.transform=_,y.zoomedHd&&(y.zoomedHd.style.transform=_)};return new r((function(n){if(e&&-1===f.indexOf(e))n(w);else{if(y.zoomed)n(w);else{if(e)y.original=e;else{if(!(f.length>0))return void n(w);var r=f;y.original=r[0]}if(y.original.dispatchEvent(l("medium-zoom:open",{detail:{zoom:w}})),b=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,h=!0,y.zoomed=function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.left,a=t.width,o=t.height,i=e.cloneNode(),s=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return i.removeAttribute("id"),i.style.position="absolute",i.style.top=n+s+"px",i.style.left=r+c+"px",i.style.width=a+"px",i.style.height=o+"px",i.style.transform="",i}(y.original),document.body.appendChild(v),g.template){var a=i(g.template)?g.template:document.querySelector(g.template);y.template=document.createElement("div"),y.template.appendChild(a.content.cloneNode(!0)),document.body.appendChild(y.template)}if(y.original.parentElement&&"PICTURE"===y.original.parentElement.tagName&&y.original.currentSrc&&(y.zoomed.src=y.original.currentSrc),document.body.appendChild(y.zoomed),window.requestAnimationFrame((function(){document.body.classList.add("medium-zoom--opened")})),y.original.classList.add("medium-zoom-image--hidden"),y.zoomed.classList.add("medium-zoom-image--opened"),y.zoomed.addEventListener("click",d),y.zoomed.addEventListener("transitionend",(function e(){h=!1,y.zoomed.removeEventListener("transitionend",e),y.original.dispatchEvent(l("medium-zoom:opened",{detail:{zoom:w}})),n(w)})),y.original.getAttribute("data-zoom-src")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("srcset"),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading"),y.zoomedHd.src=y.zoomed.getAttribute("data-zoom-src"),y.zoomedHd.onerror=function(){clearInterval(o),console.warn("Unable to reach the zoom image target "+y.zoomedHd.src),y.zoomedHd=null,t()};var o=setInterval((function(){y.zoomedHd.complete&&(clearInterval(o),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",d),document.body.appendChild(y.zoomedHd),t())}),10)}else if(y.original.hasAttribute("srcset")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading");var s=y.zoomedHd.addEventListener("load",(function(){y.zoomedHd.removeEventListener("load",s),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",d),document.body.appendChild(y.zoomedHd),t()}))}else t()}}}))},d=function(){return new r((function(e){if(!h&&y.original){h=!0,document.body.classList.remove("medium-zoom--opened"),y.zoomed.style.transform="",y.zoomedHd&&(y.zoomedHd.style.transform=""),y.template&&(y.template.style.transition="opacity 150ms",y.template.style.opacity=0),y.original.dispatchEvent(l("medium-zoom:close",{detail:{zoom:w}})),y.zoomed.addEventListener("transitionend",(function t(){y.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(y.zoomed),y.zoomedHd&&document.body.removeChild(y.zoomedHd),document.body.removeChild(v),y.zoomed.classList.remove("medium-zoom-image--opened"),y.template&&document.body.removeChild(y.template),h=!1,y.zoomed.removeEventListener("transitionend",t),y.original.dispatchEvent(l("medium-zoom:closed",{detail:{zoom:w}})),y.original=null,y.zoomed=null,y.zoomedHd=null,y.template=null,e(w)}))}else e(w)}))},p=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).target;return y.original?d():u({target:e})},f=[],m=[],h=!1,b=0,g=n,y={original:null,zoomed:null,zoomedHd:null,template:null};"[object Object]"===Object.prototype.toString.call(t)?g=t:(t||"string"==typeof t)&&o(t);var v=function(e){var t=document.createElement("div");return t.classList.add("medium-zoom-overlay"),t.style.background=e,t}((g=a({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},g)).background);document.addEventListener("click",(function(e){var t=e.target;t!==v?-1!==f.indexOf(t)&&p({target:t}):d()})),document.addEventListener("keyup",(function(e){var t=e.key||e.keyCode;"Escape"!==t&&"Esc"!==t&&27!==t||d()})),document.addEventListener("scroll",(function(){if(!h&&y.original){var e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(b-e)>g.scrollOffset&&setTimeout(d,150)}})),window.addEventListener("resize",d);var w={open:u,close:d,toggle:p,update:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e;if(e.background&&(v.style.background=e.background),e.container&&e.container instanceof Object&&(t.container=a({},g.container,e.container)),e.template){var n=i(e.template)?e.template:document.querySelector(e.template);t.template=n}return g=a({},g,t),f.forEach((function(e){e.dispatchEvent(l("medium-zoom:update",{detail:{zoom:w}}))})),w},clone:function(){return e(a({},g,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}))},attach:o,detach:function(){for(var e=arguments.length,t=Array(e),n=0;n0?t.reduce((function(e,t){return[].concat(e,c(t))}),[]):f;return r.forEach((function(e){e.classList.remove("medium-zoom-image"),e.dispatchEvent(l("medium-zoom:detach",{detail:{zoom:w}}))})),f=f.filter((function(e){return-1===r.indexOf(e)})),w},on:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f.forEach((function(r){r.addEventListener("medium-zoom:"+e,t,n)})),m.push({type:"medium-zoom:"+e,listener:t,options:n}),w},off:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f.forEach((function(r){r.removeEventListener("medium-zoom:"+e,t,n)})),m=m.filter((function(n){return!(n.type==="medium-zoom:"+e&&n.listener.toString()===t.toString())})),w},getOptions:function(){return g},getImages:function(){return f},getZoomedImage:function(){return y.original}};return w},{themeConfig:d}=r.default,p=function(){if("undefined"==typeof window)return null;const e=d&&d.zoomSelector||".markdown img";return setTimeout((()=>{u(e)}),1e3),{onRouteUpdate({location:t}){t&&t.hash&&t.hash.length||setTimeout((()=>{u(e)}),1e3)}}}()},87410:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=k.value.length,k=k.next){var _=k.value;if(t.length>e.length)return;if(!(_ instanceof a)){var x,O=1;if(y){if(!(x=o(E,S,e,g))||x.index>=e.length)break;var P=x.index,C=x.index+x[0].length,T=S;for(T+=k.value.length;P>=T;)T+=(k=k.next).value.length;if(S=T-=k.value.length,k.value instanceof a)continue;for(var I=k;I!==t.tail&&(Td.reach&&(d.reach=L);var R=k.prev;if(j&&(R=c(t,R,j),S+=j.length),l(t,R,O),k=c(t,R,new a(p,b?r.tokenize(A,b):A,v,A)),N&&c(t,k,N),O>1){var D={cause:p+","+m,reach:L};i(e,t,n,k.prev,S,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function l(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(a),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(a),a.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:a.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},a.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var s=p(/^\{$/,/^\}$/);if(-1===s)continue;for(var c=n;c=0&&f(l,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function c(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function l(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,c(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function u(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,u={},d=c(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=s(i++,r)););return u[n]=a,n})).join(""),n,r),p=Object.keys(u);return i=0,function e(t){for(var n=0;n=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=p[i],o="string"==typeof r?r:r.content,s=o.indexOf(a);if(-1!==s){++i;var c=o.substring(0,s),d=l(u[a]),f=o.substring(s+a.length),m=[];if(c&&m.push(c),m.push(d),f){var h=[f];e(h),m.push.apply(m,h)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var b=r.content;Array.isArray(b)?e(b):e([b])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(a),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},s=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var c=i(a);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(c=i(t[r-1])+c,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",c,null,c)}a.content&&"string"!=typeof a.content&&s(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(a),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),a.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete a.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var c=0;c=o.length);c++){var l=s[c];if("string"==typeof l||l.content&&"string"==typeof l.content){var u=o[a],d=n.tokenStack[u],p="string"==typeof l?l:l.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++a;var h=p.substring(0,m),b=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),g=p.substring(m+f.length),y=[];h&&y.push.apply(y,i([h])),y.push(b),g&&y.push.apply(y,i([g])),"string"==typeof l?s.splice.apply(s,[c,1].concat(y)):l.content=y}}else l.content&&i(l.content)}return s}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(a),a.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.webmanifest=a.languages.json,a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},a.languages.objectivec=a.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.objc=a.languages.objectivec,a.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),a.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(a),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const o=a},68805:()=>{Prism.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach((function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}))},74277:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},57461:(e,t,n)=>{var r={"./prism-elixir":68805,"./prism-json":74277};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=57461},92703:(e,t,n)=>{"use strict";var r=n(50414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},45697:(e,t,n)=>{e.exports=n(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},64448:(e,t,n)=>{"use strict";var r=n(67294),a=n(27418),o=n(63840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n